View previous topic :: View next topic |
Author |
Message |
PIEzLOVERS How do I cheat?
Reputation: 0
Joined: 11 Apr 2010 Posts: 3 Location: South East Asia
|
Posted: Mon Mar 14, 2011 1:18 am Post subject: [C++ to ASM] |
|
|
Well , here's the problem o-o
I want to add a random value to [iDamage] , but VS gives me the improper error o-o
how do i put a value into a textbox and convert it , make it compatiable for native C++ ?
P.S google didn't help me -.-
Codecave
Code: | int iDamage = Convert::ToInt32(textBox3->Text);
DWORD dwDamageControl = XXXXXX;
DWORD dwDControl = dwDamageControl + 0xA;
__declspec(naked) void __stdcall DamageControl()
{
__asm
{
mov [esp+0xc4],[iDamage]
jmp dword ptr [dwDControl]
}
} |
CheckBox Checked
Code: | void Form1::checkBox4_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {
BYTE dDControl[8] = {0x83,0xbc,0x24,0xc8,0x00,0x00,0x00,0x00};
if(checkBox4->Checked == true)
{
Jump(dwDamageControl,DamageControl,3);
}
else if (checkBox4->Checked == false)
{
memcpy((void*)dwDamageControl, dDControl, sizeof(dDControl));
}
}
|
Any Solutions to this problem ?
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Mon Mar 14, 2011 2:21 am Post subject: |
|
|
Eww at native C++ >.>
Anyway..
Code: | mov [esp+0xc4],[iDamage] |
This is not valid ASM. Which is probably why you are getting errors.
_________________
- Retired. |
|
Back to top |
|
 |
PIEzLOVERS How do I cheat?
Reputation: 0
Joined: 11 Apr 2010 Posts: 3 Location: South East Asia
|
Posted: Mon Mar 14, 2011 2:38 am Post subject: |
|
|
i tried
Code: | int iDamage = Convert::ToInt32(textBox3->Text);
DWORD dwDamageControl = XXXXXX;
DWORD dwDControl = dwDamageControl + 0xA;
__declspec(naked) void __stdcall DamageControl()
{
__asm
{
mov edi , [iDamage]
mov [esp+0xc4],edi
jmp dword ptr [dwDControl]
}
} |
and it still doesn't work @.@
|
|
Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Mon Mar 14, 2011 6:19 am Post subject: |
|
|
You can't just trash edi. Wrap it in a push/pop
|
|
Back to top |
|
 |
PIEzLOVERS How do I cheat?
Reputation: 0
Joined: 11 Apr 2010 Posts: 3 Location: South East Asia
|
Posted: Mon Mar 14, 2011 6:53 am Post subject: |
|
|
It still crashes , what i want is actually how to get a variable from a textbox in C++ and convert it so it's compatiable for Native C++
|
|
Back to top |
|
 |
natanreis1 Cheater
Reputation: 1
Joined: 01 Apr 2008 Posts: 44 Location: Somewhere over the rainbow
|
Posted: Tue Mar 15, 2011 2:33 pm Post subject: |
|
|
int iDamage = Convert::ToInt32(textBox3->Text);
DWORD dwDamageControl = XXXXXX;
DWORD dwDControl = dwDamageControl + 5; //<<< ------ assuming you're writing nops after the hook.
__declspec(naked) void __stdcall DamageControl()
{
__asm
{
push edi
lea edi, iDamage
mov edi, [edi]
mov [esp+0xc4], edi
pop edi
jmp dword ptr [dwDControl]
}
}
|
|
Back to top |
|
 |
|