Asm Help

Posts 110 of 10 · Page 1 of 1
Asm Help
I am trying to Do a opk in asm for knowledge purposes and i keep getting an error invalid operand!!

Here is my Asm code that im using.

Code:
DWORD OPK == 0x37828110; 


nvoid OPK()
{
   __asm 
   {
    mov ebx,37828110;
    mov eax,0;
    mov [ecx+00000174],ebx;
    mov [ecx+00000178],eax;
    mov [ecx+0000017c],ebx;
    jmp OPK;     
   }
}
Here is where i hook my addy
Code:
DetourFucntion(( BYTE* )0x37828110,( BYTE* )OPK );
This is how i enable it.

Credits to Cobra for teaching basic codecave in asm.
What the hell are you trying to do? You don't detour the random player pointer, you use offsets to change the XYZ.
i changed the address to random player pointer just because it was the return address for the enemy pp. and im trying to do a asm opk
Maybe you should learn how to use hexadecimal...
Quote Originally Posted by mmbob View Post
Maybe you should learn how to use hexadecimal...
Code:
 mov eax,0; // here i store my value of the player
    mov [ecx+00000174],ebx; // x position
    mov [ecx+00000178],eax; //y position
    mov [ecx+0000017c],ebx; //z position
    jmp OPK; // here i return my address that i got from UCE
i added comments so you can see what im trying to doo with the code. wouldn't it work fine?
Quote Originally Posted by gcflames12 View Post
Code:
 mov eax,0; // here i store my value of the player
    mov [ecx+00000174],ebx; // x position
    mov [ecx+00000178],eax; //y position
    mov [ecx+0000017c],ebx; //z position
    jmp OPK; // here i return my address that i got from UCE
i added comments so you can see what im trying to doo with the code. wouldn't it work fine?
Even if you corrected the hexadecimal, your code would just send whatever this thing which has XYZ at those offsets to some odd position. You should really do this in C++ since you don't know what you're doing right now...
Quote Originally Posted by mmbob View Post
Even if you corrected the hexadecimal, you're code would just send whatever this thing which has XYZ at those offsets to some odd position. You should really do this in C++ since you don't know what you're doing right now...
alright haha. i just started asm a few days ago. im just trying to get this too work. any tips on how to get it too the player?
Quote Originally Posted by gcflames12 View Post
alright haha. i just started asm a few days ago. im just trying to get this too work. any tips on how to get it too the player?
Everything in the game has the position in HOBJECT, with the offsets at C8 CC and D0. I can't think of anything you could be trying to do with this.
Quote Originally Posted by mmbob View Post
Everything in the game has the position in HOBJECT, with the offsets at C8 CC and D0. I can't think of anything you could be trying to do with this.
Ill work on it. in warrok i got the fast as famas working by using this, soo would i need to do that same thing for that?

Ex:
Code:
DWORD pFastAs == 0x523D0A;

void nFastAs()
{
   __asm 
   {
   mov ebp,0x3F;    
   cmp ebp,0x35;    
   jmp pFastAs;       
   }
}
What the Fuck is this?
Posts 110 of 10 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?