Thread: Asm Help

Results 1 to 10 of 10
  1. #1
    gcflames12's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    wada
    Posts
    181
    Reputation
    10
    Thanks
    24

    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.

  2. #2
    mmbob's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    ja
    Posts
    655
    Reputation
    70
    Thanks
    1,156
    My Mood
    Bitchy
    What the hell are you trying to do? You don't detour the random player pointer, you use offsets to change the XYZ.

  3. #3
    gcflames12's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    wada
    Posts
    181
    Reputation
    10
    Thanks
    24
    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

  4. #4
    mmbob's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    ja
    Posts
    655
    Reputation
    70
    Thanks
    1,156
    My Mood
    Bitchy
    Maybe you should learn how to use hexadecimal...

  5. #5
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,030
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    What the Fuck is this?
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  6. #6
    gcflames12's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    wada
    Posts
    181
    Reputation
    10
    Thanks
    24
    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?

  7. #7
    mmbob's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    ja
    Posts
    655
    Reputation
    70
    Thanks
    1,156
    My Mood
    Bitchy
    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...
    Last edited by mmbob; 09-17-2010 at 09:09 PM.

  8. #8
    gcflames12's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    wada
    Posts
    181
    Reputation
    10
    Thanks
    24
    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?

  9. #9
    mmbob's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    ja
    Posts
    655
    Reputation
    70
    Thanks
    1,156
    My Mood
    Bitchy
    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.

  10. #10
    gcflames12's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    wada
    Posts
    181
    Reputation
    10
    Thanks
    24
    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;       
       }
    }

Similar Threads

  1. Replies: 14
    Last Post: 10-22-2010, 08:37 PM
  2. [Help]Book for Asm
    By 258456 in forum Assembly
    Replies: 11
    Last Post: 10-05-2010, 10:52 PM
  3. Help Code Asm In C++
    By spartacchio in forum C++/C Programming
    Replies: 5
    Last Post: 04-03-2008, 10:00 AM
  4. Help ASM
    By jeremiahg2 in forum Visual Basic Programming
    Replies: 1
    Last Post: 03-31-2008, 03:44 PM
  5. Help with ASM in module...
    By gbitz in forum Visual Basic Programming
    Replies: 3
    Last Post: 03-13-2008, 08:07 PM