From 3322864d9358dede4a9ef449e9fa05e9343e01a9 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari Date: Tue, 13 Apr 2021 04:49:46 -0700 Subject: [PATCH] Change offsets to R5PC_J1624A_CL394493_2019_02_24_09_29_PM TODO: maybe add AOB/sigscanning if we move it all over to season 1 r5apex executable or later --- r5dev/console.cpp | 10 +++++----- r5dev/hooks.cpp | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/r5dev/console.cpp b/r5dev/console.cpp index 993e083b..bfaa9e30 100644 --- a/r5dev/console.cpp +++ b/r5dev/console.cpp @@ -5,8 +5,8 @@ #include -// Build 1038 R5pc_r5-80_J152_CL801289_2021_02_05_16_28 -void (*CommandExecute)(void * self, const char* cmd) = (void (*)(void*, const char*))0x140199C10; +// Build 313 R5PC_J1624A_CL394493_2019_02_24_09_29_PM +void (*CommandExecute)(void * self, const char* cmd) = (void (*)(void*, const char*))0x140244900; /*48 89 5C 24 ? 57 48 83 EC 20 48 8D 0D ? ? ? ? 41 8B D8*/ DWORD __stdcall ProcessConsoleWorker(LPVOID); @@ -20,7 +20,7 @@ void SetupConsole() } // Set the window title - SetConsoleTitle("R5pc_r5-80_J152_CL801289_2021_02_05_16_28"); + SetConsoleTitle("R5PC_J1624A_CL394493_2019_02_24_09_29_PM"); // Open input/output streams FILE* fDummy; @@ -33,8 +33,8 @@ void SetupConsole() CloseHandle(hThread); } -bool (*Cvar_IsFlagSet)(int ** cvar, int flag) = (bool (*)(int**, int))0x140427160; -bool Hook_Cvar_IsFlagSet(int ** cvar, int flag); +bool (*Cvar_IsFlagSet)(int ** cvar, int flag) = (bool (*)(int**, int))0x1404C87C0; +bool Hook_Cvar_IsFlagSet(int ** cvar, int flag); /*48 8B 41 48 85 50 38*/ bool Hook_Cvar_IsFlagSet(int ** cvar, int flag) { diff --git a/r5dev/hooks.cpp b/r5dev/hooks.cpp index 747b46f4..058b322b 100644 --- a/r5dev/hooks.cpp +++ b/r5dev/hooks.cpp @@ -9,17 +9,17 @@ // TODO pretty sloppy, all hooks / eng offets or patterns should probably go in their own header.. -void* SQVM_Print = (void*)0x140B40770; +void* SQVM_Print = (void*)0x1410A4330; /*48 8B C4 48 89 50 10 4C 89 40 18 4C 89 48 20 53 56 57 48 81 EC ? ? ? ? 48 8B DA 48 8D 70 18 48 8B F9 E8 ? ? ? ? 48 89 74 24 ? 48 8D 54 24 ? 33 F6 4C 8B CB 41 B8 ? ? ? ? 48 89 74 24 ? 48 8B 08 48 83 C9 01 E8 ? ? ? ? 85 C0 B9 ? ? ? ? 0F 48 C1 0F B6 8C 24 ? ? ? ? 3D ? ? ? ? 48 8B 47 50*/ void* Hook_SQVM_Print(void* sqvm, char* fmt, ...); -bool (*SQVM_LoadScript)(void* sqvm, const char* script_path, const char* script_name, int flag) = (bool (*)(void*, const char*, const char*, int))0x140B3E880; -bool Hook_SQVM_LoadScript(void* sqvm, const char* script_path, const char* script_name, int flag); +bool (*SQVM_LoadScript)(void* sqvm, const char* script_path, const char* script_name, int flag) = (bool (*)(void*, const char*, const char*, int))0x1410A1510; +bool Hook_SQVM_LoadScript(void* sqvm, const char* script_path, const char* script_name, int flag); /*E8 ? ? ? ? 84 C0 74 1C 41 B9 ? ? ? ?*/ -bool (*NET_ReceiveDatagram)(int, void*, bool) = (bool (*)(int, void*, bool))0x1401F9680; -bool Hook_NET_ReceiveDatagram(int sock, void* inpacket, bool raw); +bool (*NET_ReceiveDatagram)(int, void*, bool) = (bool (*)(int, void*, bool))0x1402B46B0; +bool Hook_NET_ReceiveDatagram(int sock, void* inpacket, bool raw); /*E8 ? ? ? ? 84 C0 75 35 48 8B D3*/ -unsigned int (*NET_SendDatagram)(SOCKET s, const char* ptxt, int len, void* netchan_maybe, bool raw) = (unsigned int (*)(SOCKET, const char*, int, void*, bool))0x1401F8220; -unsigned int Hook_NET_SendDatagram(SOCKET s, const char* ptxt, int len, void* netchan_maybe, bool raw); +unsigned int (*NET_SendDatagram)(SOCKET s, const char* ptxt, int len, void* netchan_maybe, bool raw) = (unsigned int (*)(SOCKET, const char*, int, void*, bool))0x1402B2C90; +unsigned int Hook_NET_SendDatagram(SOCKET s, const char* ptxt, int len, void* netchan_maybe, bool raw); /*E8 ? ? ? ? 40 88 6B 18*/ // // TODO move to utils @@ -101,7 +101,7 @@ void* Hook_SQVM_Print(void* sqvm, char* fmt, ...) bool Hook_SQVM_LoadScript(void* sqvm, const char* script_path, const char* script_name, int flag) { char filepath[MAX_PATH] = {0}; - sprintf_s(filepath, MAX_PATH, "C:\\r5\\%s", script_path); + sprintf_s(filepath, MAX_PATH, "platform\\%s", script_path); // flip forward slashes in filepath to windows-style backslash for (int i = 0; i < strlen(filepath); i++)