bool AlreadyHooked = false;
UINT32 gRWXBuf = NULL;
UINT32 gSendActMsgOrig = NULL;
UINT32 gStrongBowEnabled = NULL;
void BowHack()
{
UINT32 GameBase = (UINT32)GetModuleHandleA(0);
if (!GameBase)
{
return;
}
// SendActMsg: Neuz.exe + 19B780 | 55 8B EC F6 41 08 08 74 ??
// Inject shellcode if not already done
if (!AlreadyHooked)
{
// Get CActionMover Object
UINT32 Ptr1 = *(UINT32*)(GameBase + 0x004FFA94);
if (Ptr1)
{
UINT32 CActionMoverObj = *(UINT32*)(Ptr1 + 0x33C);
if (CActionMoverObj)
{
std::cout << "CActionMoverObj" << CActionMoverObj << std::endl;
// First 16 Bytes used for Shadow VMT
UINT32 CActionMoverObjVtable = *(UINT32*)CActionMoverObj;
if (CActionMoverObjVtable)
{
std::cout << "CActionMoverObj" << CActionMoverObjVtable << std::endl;
// Allocate space for vmt & shellcode
/*
16 bytes - ShadowVMT
4 bytes - Used for Settings
? bytes - Shellcode
*/
if (gRWXBuf == NULL)
{
SIZE_T RWXBufSize = 4096;
gRWXBuf = (UINT32)VirtualAlloc(NULL, RWXBufSize, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
std::cout << "gRWXBuf " << gRWXBuf << std::endl;
}
memcpy((void*)gRWXBuf, (void*)CActionMoverObjVtable, 16);
// Save SendActMsg
gSendActMsgOrig = *(UINT32*)(CActionMoverObjVtable + 4);
std::cout << "gSendActMsgOrig " << gSendActMsgOrig << std::endl;
// Save gStrongBowEnabled Ptr
gStrongBowEnabled = (UINT32)(gRWXBuf + 16);
// Setup shellcode
unsigned char Shellcode[] =
{
0x50, // push eax
0x8B, 0x45, 0xDC, // mov eax, [ebp-0x24] | eax now holds dwItemId
0x83, 0xF8, 0x00, // cmp eax, 0
0x75, 0x11, // jne $JMPBACK
0xA1, 0xAA, 0xAA, 0xAA, 0xAA, // mov eax, [StrongBowEnabled]
0x83, 0xF8, 0x01, // cmp eax, 1
0x75, 0x07, // jne $JMPBACK
0xC7, 0x45, 0xDC, 0x04, 0x00, 0x00, 0x00, // mov [ebp-0x24], 4
// $JMPBACK
0x58, // pop eax
0xE9, 0xBB, 0xBB, 0xBB, 0xBB, // jmp [gSendActMsgOrig]
};
*(UINT32*)(Shellcode + 10) = (UINT32)gStrongBowEnabled; // StrongBowEnabled
*(UINT32*)(Shellcode + 28) = (UINT32)(gSendActMsgOrig - (gRWXBuf + 47) - 5); // jmp back
// Copy Shellcode
memcpy((void*)(gRWXBuf + 20), Shellcode, sizeof(Shellcode));
// Patch VMT Ptr
*(UINT32*)(CActionMoverObjVtable + 4) = gRWXBuf + 20;
std::cout << "VMT Hook placed :)" << std::endl;
AlreadyHooked = true;
}
}
}
}
if (AlreadyHooked)
{
*(UINT32*)gStrongBowEnabled = 1;
}
}
INT APIENTRY DllMain(HMODULE hDLL, DWORD Reason, LPVOID Reserved)
{
switch (Reason)
{
case DLL_PROCESS_ATTACH:
{
DisableThreadLibraryCalls(hDLL);
//g_hModule = hDLL;
BowHack();
break;
}
case DLL_THREAD_ATTACH:
case DLL_PROCESS_DETACH:
{
break;
}
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}
Quote:
gosh just compile that shit and release it for the users
why always those BS posts where no one can use it ?
dont claim to release a hack if its just a source that 99% of the population can not use.
no everyone wants to spend hours on learing c++ and compiling programms or DLLs and injecting them.
People have other hobbys and a life too, its just a game so if you release something like that, then make it usable for everyone.
Somehow i got the feeling that you're just angry that you can not get it to work by urself, and now you blame Omdi for that?Quote:
gosh just compile that shit and release it for the users
why always those BS posts where no one can use it ?
dont claim to release a hack if its just a source that 99% of the population can not use.
no everyone wants to spend hours on learing c++ and compiling programms or DLLs and injecting them.
People have other hobbys and a life too, its just a game so if you release something like that, then make it usable for everyone.
no im not mad.Quote:
Somehow i got the feeling that you're just angry that you can not get it to work by urself, and now you blame Omdi for that?
Also, you need 0% knownledge of anything to download VS and simply compile it. There's even a given response of a regular dll file to use it inside. (No need to go r0 like Omdi did).
So now we're at the point that you most likely dont even know what VS is, or ure unable to install an application and hit a button.
Hooray. I love the Flyff Community.
Hello Sir, please make video sir. :lul:Quote:
Somehow i got the feeling that you're just angry that you can not get it to work by urself, and now you blame Omdi for that?
Also, you need 0% knownledge of anything to download VS and simply compile it. There's even a given response of a regular dll file to use it inside. (No need to go r0 like Omdi did).
So now we're at the point that you most likely dont even know what VS is, or ure unable to install an application and hit a button.
Hooray. I love the Flyff Community.
As Aiden told you before, and the first view of the first post should tell you:Quote:
no im not mad.
im not even playing official flyff.
but i dont get why people release something without making it available to use for everyone?
:rtfm:
just imagine flyff gets updated and the binaries do not work anymore who is going to update it since "im not even playing official flyff"? thats why i released the source and dude you should be thankful that i released this for free (+ source) instead of charging money for it.Quote:
no im not mad.
im not even playing official flyff.
but i dont get why people release something without making it available to use for everyone?
:rtfm:
I'd pay you to update it :)Quote:
just imagine flyff gets updated and the binaries do not work anymore who is going to update it since "im not even playing official flyff"? thats why i released the source and dude you should be thankful that i released this for free (+ source) instead of charging money for it.