Add function to patch

This commit is contained in:
Quentin 2017-10-19 19:27:37 +02:00
parent 2ad9977ff9
commit ceb4462e35

View file

@ -3,6 +3,26 @@
#include <iostream>
#include <fstream>
/*
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;
}