EEEEEEEEdit 2:
I got your c++ source to work, geuss i was pretty annoeyed by the console box, I've handled my self the way with oss cout's and messageboxes to display my values using a hotkey, the weird and my hopefully last thing in the way is the g_DPlay / Client Adress.
Basicly, i found it as said, when breakpointing the start of the send function, it's also written as module adress right above the send adress, just as in your picture.
Now the weird part begins that I dont understand, and I'm betting my ass off that i'm doing something c++ related wrong maybe.
I Havent changed anything on your code, just the adress ofc, and i removed all your printings, no other changes. So now, i added the Neuz.exe+8D4E20 in cheatengine, what i found was the wanted client adress/ecx pointer found also in the send one, compared them both ofc. This part works absolutely fine and im quite sure i got what i need.
Weirdly, the adress doesnt show correctly in my messagebox, Target ID, Send Adress and Neuz Base adress showing fine and correct, only the g_DPlay is making trouble there, no foken clue why.
Maybe there's something wrong in my code, maybe you can clear me up if my code is fine atleast:
Edits:
Code:
// Only send attack if there is a selected mob to avoid crash
if(SelectedID != NULL)
{
pSendMeleeAttack((void*)g_DPlay, dwAtkMsg , SelectedID , nParam2 , nParam3,fItemAttakSpeed);
}else{
//MessageBox(0, "You must select a mob before calling the function!!", "", 0);
std::ostringstream oss;
oss
<< "Neuz: " << g_hExeModule << std::endl
<< "g_DPlay: " << g_DPlay << std::endl
<< "SendAtk: " << pSendMeleeAttack << std::endl;
std::string var = oss.str();
MessageBox(0, var.c_str(), "No Target, PointerData: ", 0);
}
And:
Code:
// Entry point of our DLL module
INT APIENTRY DllMain(HMODULE hDLL, DWORD Reason, LPVOID Reserved)
{
switch (Reason)
{
case DLL_PROCESS_ATTACH:
g_hModule = hDLL;
DisableThreadLibraryCalls(hDLL);
g_hExeModule = GetModuleHandle("Neuz.exe");
SelectedBase = (DWORD)g_hExeModule + 0xB6F648;
g_DPlay = (DWORD)g_hExeModule + 0x8D4E20;// 0x8D4E20;
pSendMeleeAttack = (SendMeleeAttack_t)((DWORD)g_hExeModule+0x5F580);
CreateThread(NULL, NULL, &MyThread, NULL, NULL, &g_threadID);
break;
case DLL_THREAD_ATTACH:
case DLL_PROCESS_DETACH:
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}
Well im clueless once again, waiting for a mentor to point me into the right direction, while that I'll keep on trying :P Will edit again if I got updates. :)
Edit 3:
Allright I've found out it was just not displayed in HEX tho. The Values seems fine, But I'm not sending attacks, might it be because of hardcoded values of speeds? I got no idea, anything seemsfine and also the dll doesnt hang itself no longer when trying to send an atk. So i geuss the adresses are ok and nothing wrong gets accessed, just a geuss tho.
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...][Only registered and activated users can see links. Click Here To Register...][Only registered and activated users can see links. Click Here To Register...]
Still cluesless a bit. Will experiment more but appericiate any help xD
Edit 4: The App seems to try to send attacks, thats good, sadly, no damage arrives, i noticed that it tells me to wait a moment before attacking again, if i have the wrong speed set inside of the app, in regards to your weapon ingame.
So as this seems to work now, what could be wrong still? Any idea?
Current Code prints Execution fine, and processes with the described problem:
Code:
// Main Thread
DWORD WINAPI MyThread(LPVOID)
{
DWORD hackOffsetsTargetID[] = { 0x20,0x2F0 }; // Offsets of the mob ID
BOOL unloaded = false;
// Loop
while (true)
{
if (GetAsyncKeyState(VK_F2) & 0x8000) // Press F2
{
//Beep(0x0FFF,1000); // Beeps to tell us that the hack was called. (frequency is 0x25 through 0x7FFF).
// Find the Targeted Mob ID
if(DWORD addy = FindDmaAddy(1, hackOffsetsTargetID, SelectedBase))
{
SelectedID = *(unsigned int*)addy;
}
// hard coded values => I didnt find a pointer to the current weapon attack speed so I used a hardcoded value
// there is also another way to do it: set a break point at Neuz.exe+14F21 and read "EDX +130" value, follow in dump and transform it to float type.
//Neuz.exe+14F21E - F3 0F10 82 30010000 - movss xmm0,[edx+00000130]
float fSwordAtkSpeed = 0.08500000089f;
float fKnuxAtkSpeed = 0.0700000003f;
fItemAttakSpeed = fSwordAtkSpeed;
// Only send attack if there is a selected mob to avoid crash
if(SelectedID != NULL)
{
pSendMeleeAttack((void*)g_DPlay, dwAtkMsg , SelectedID , nParam2 , nParam3, fItemAttakSpeed);
printLastExecution();
}else{
//MessageBox(0, "You must select a mob before calling the function!!", "", 0);
std::ostringstream oss;
oss
<< "Neuz: " << g_hExeModule << std::endl
<< "g_DPlay: " << std::hex << g_DPlay << std::endl
<< "SendAtk: " << pSendMeleeAttack << std::endl;
std::string var = oss.str();
MessageBox(0, var.c_str(), "No Target, PointerData: ", 0);
}
}
else if (GetAsyncKeyState(VK_F12) & 0x8000)
{
MessageBox(0, "DLL unloaded!", "", 0);
break;
}
Sleep(100);
}
FreeLibraryAndExitThread(g_hModule, 0);
return 0;
}
// It does some printing
void printLastExecution()
{
std::ostringstream oss;
oss <<
"-----------------------Results ---------------------\n" << std::endl <<
"[INFO]: g_DPlay: " << std::hex << g_DPlay << std::endl <<
"[INFO]: dwAtkMsg: " << dwAtkMsg << std::endl <<
"[INFO]: SelectedID: " << SelectedID << std::endl <<
"[INFO]: nParam2: " << nParam2 << std::endl <<
"[INFO]: nParam3: " << nParam3 << std::endl <<
"[INFO]: fItemAttakSpeed: " << fItemAttakSpeed << std::endl <<
"----------------------------------------------------\n" << std::endl;
std::string var = oss.str();
MessageBox(0, var.c_str(), "Processed: ", 0);
}