From ceb4462e358ef670953abee683d73b04d21e462a Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 19 Oct 2017 19:27:37 +0200 Subject: [PATCH] Add function to patch --- Observer/dllmain.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Observer/dllmain.cpp b/Observer/dllmain.cpp index 16fd672..6fbb987 100644 --- a/Observer/dllmain.cpp +++ b/Observer/dllmain.cpp @@ -3,6 +3,26 @@ #include #include +/* +Function to patch + +.text:00403B70 ; void *__thiscall Class1::LogMessageWrapper(Class1 *this, void *message, size_t messageLength) +.text:00403B70 Class1__LogMessageWrapper proc near ; CODE XREF: CGbxGame__DestroyApp+58 +.text:00403B70 ; CGbxGame__DestroyApp+5F ... +.text:00403B70 +.text:00403B70 message = dword ptr 4 +.text:00403B70 messageLength = dword ptr 8 +.text:00403B70 +.text:00403B70 56 push esi +.text:00403B71 FF 74 24 0C push [esp+4+messageLength] +.text:00403B75 8B F1 mov esi, ecx +.text:00403B77 FF 74 24 0C push [esp+8+message] ; message +.text:00403B7B E8 D0 01 00 00 call Class1__LogMessage +.text:00403B80 8B C6 mov eax, esi +.text:00403B82 5E pop esi +.text:00403B83 C2 08 00 retn 8 +*/ + void __stdcall LogMessageWrapperHook() { std::cout << "[OK] Message wrapped called :D :D :D" << std::endl; }