Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 1e21375

Browse files
committed
More windows
1 parent 89e6275 commit 1e21375

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

byond-extools/src/core/find_functions.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,13 @@ bool Core::find_functions()
9494
offset = *(int*)((char*)GetGlobalByName + 11);
9595
GetTableHolderThingyById = (GetTableHolderThingyByIdPtr)((char*)GetGlobalByName + 11 + offset + 4);
9696

97-
char* x_ref_count_call = (char*)Pocket::Sigscan::FindPattern(BYONDCORE, "3D ?? ?? ?? ?? 74 14 50 E8 ?? ?? ?? ?? FF 75 0C FF 75 08 E8", 20);
98-
DecRefCount = (DecRefCountPtr)(x_ref_count_call + *(int*)x_ref_count_call + 4); //x_ref_count_call points to the relative offset to DecRefCount from the call site
99-
x_ref_count_call = (char*)Pocket::Sigscan::FindPattern(BYONDCORE, "FF 75 10 E8 ?? ?? ?? ?? FF 75 0C 8B F8 FF 75 08 E8 ?? ?? ?? ?? 57", 17);
100-
IncRefCount = (IncRefCountPtr)(x_ref_count_call + *(int*)x_ref_count_call + 4);
101-
102-
char* datum_inc_function = (char*)Pocket::Sigscan::FindPattern(BYONDCORE, "55 8b ec 8b 4d 08 3b 0d ?? ?? ?? ?? 73 11 a1 ?? ?? ?? ?? 8b 04 88 85 c0 74 05 ff 40 14 5d c3 6a 21 51 e8 ?? ?? ?? ??");
103-
datum_pointer_table_length = *(unsigned int**)(datum_inc_function + 8);
104-
datum_pointer_table = *(RawDatum****)(datum_inc_function + 15);
105-
97+
char *x_ref_count_call = (char *)Pocket::Sigscan::FindPattern(BYONDCORE, "3D ?? ?? ?? ?? 74 14 50 E8 ?? ?? ?? ?? FF 75 0C FF 75 08 E8", 20);
98+
DecRefCount = (DecRefCountPtr)(x_ref_count_call + *(int *)x_ref_count_call + 4); //x_ref_count_call points to the relative offset to DecRefCount from the call site
99+
x_ref_count_call = (char *)Pocket::Sigscan::FindPattern(BYONDCORE, "FF 75 10 E8 ?? ?? ?? ?? FF 75 0C 8B F8 FF 75 08 E8 ?? ?? ?? ?? 57", 17);
100+
IncRefCount = (IncRefCountPtr)(x_ref_count_call + *(int *)x_ref_count_call + 4);
101+
char *datum_inc_function = (char *)Pocket::Sigscan::FindPattern(BYONDCORE, "55 8B EC 8B 4D 08 3B 0D ?? ?? ?? ?? 73 11 A1 ?? ?? ?? ?? 8B 04 88 85 C0 74 05 FF 40 18 5D C3 6A");
102+
datum_pointer_table_length = *(unsigned int **)(datum_inc_function + 8);
103+
datum_pointer_table = *(RawDatum ****)(datum_inc_function + 15);
106104
// the signature below is for a function that fetches a list via the real GetListPointerById and then checks if the list exists, runtiming otherwise
107105
char* get_list_ptr_ptr = (char*)Pocket::Sigscan::FindPattern(BYONDCORE, "55 8B EC FF 75 08 E8 ?? ?? ?? ?? 83 C4 04 85 C0 75 13 68 ?? ?? ?? ?? E8 ?? ?? ?? ?? 83 C4 04 5D E9 ?? ?? ?? ?? 5D C3", 7);
108106
GetListPointerById = (GetListPointerByIdPtr)(get_list_ptr_ptr + *(int*)get_list_ptr_ptr + 4);

0 commit comments

Comments
 (0)