Thread: asm problem

Results 1 to 8 of 8
  1. #1
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    Code:
    teleport proc x:word y:word z:word
    pushad
    mov eax, player1 ; player1 is the address
    mov edx, dword ptr ds:[eax]
    add edx, dword ptr ofs_new_x
    mov [edx], word ptr x
    add edx, 4h
    mov [edx], word ptr y
    add edx, 4h
    mov [edx], word ptr z
    popad
    ret
    teleport endp
    im trying to make a teleport hack in asm for a game. but it will not work. in c++, i would do this, and it would work:
    Code:
    void teleport(float x, float y, float z)
    {
    	local = *(cPlayer**)(0x004E4DBC);
    	local->pos.x = x;
    	local->pos.y = y;
    	local->pos.z = z;
    }
    can anyone help?

    @.::SCHiM::.
    @Void
    Last edited by kibbles18; 07-05-2011 at 01:17 PM.

  2. #2
    SNal2F's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    175
    Reputation
    30
    Thanks
    99
    Quote Originally Posted by kibbles18 View Post
    Code:
    teleport proc x:word y:word z:word
    pushad
    mov eax, player1 ; player1 is the address
    mov edx, dword ptr ds:[eax]
    add edx, dword ptr ofs_new_x
    mov [edx], word ptr x
    add edx, 4h
    mov [edx], word ptr y
    add edx, 4h
    mov [edx], word ptr z
    popad
    ret
    teleport endp
    im trying to make a teleport hack in asm for a game. but it will not work. in c++, i would do this, and it would work:
    Code:
    void teleport(float x, float y, float z)
    {
    	local = *(cPlayer**)(0x004E4DBC);
    	local->pos.x = x;
    	local->pos.y = y;
    	local->pos.z = z;
    }
    can anyone help?

    @.::SCHiM::.
    @Void

    what game , decent games usually keep your pos server side.

  3. #3
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,014
    Reputation
    202
    Thanks
    2,934
    My Mood
    Twisted
    Quote Originally Posted by SNal2F View Post
    what game , decent games usually keep your pos server side.
    Yeah, your local position is server sided but your local Camera position is not. PlayerMgr points to its object.

    Current Works:
    ---Horror Game






    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  4. #4
    SNal2F's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    175
    Reputation
    30
    Thanks
    99
    Quote Originally Posted by CAFlames View Post


    Yeah, your local position is server sided but your local Camera position is not. PlayerMgr points to its object.

    in asm for a game, he didnt say what game. Ya you can move your camera but it doesnt mean u can kill someone if the game handles bullet flight pattern from the server.......lithtech is a shit engine try that crap on a decent game.......

  5. #5
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    assualtcube lol... i made an aimbot in c++ and im converting it to asm so i did this for a test because i found the position i can write to

  6. #6
    DeadLinez's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    http://mpgh.net Sexy Points: 989,576,420
    Posts
    465
    Reputation
    11
    Thanks
    499
    My Mood
    Psychedelic
    Well ASM wont work in c++ unless you tell it when your gonna start and end the code, and is the hack 100% ASM? if not, your making it harder for yourself, And you code looks fine.
    Code:
    void ASM_Teleport(float x, float y, float z)//or what ever the data type is
    {
         _asm
        {
            mov eax, player1 ; player1 is the address
            mov edx, dword ptr ds:[eax]
            add edx, dword ptr ofs_new_x
            mov [edx], word ptr x
            add edx, 4h
            mov [edx], word ptr y
            add edx, 4h
            mov [edx], word ptr z
        }
    }

  7. #7
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    Im converting to 100% asm and compiling in masm if that helps

    And when is it appropriate to use ds: ?
    Last edited by kibbles18; 07-05-2011 at 10:48 PM.

  8. #8
    .::SCHiM::.'s Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    733
    Reputation
    180
    Thanks
    833
    My Mood
    Twisted
    Quote Originally Posted by kibbles18 View Post
    Im converting to 100% asm and compiling in masm if that helps

    And when is it appropriate to use ds: ?
    Normally the compiler understands that the first operand is the destination (ds) operand, and the second operand is the source operand (ss). Older compilers may complain about that if you simply do:

    Code:
    mov ebx, dword ptr[eax]
    so instead you do:

    Code:
    mov ebx, dword ptr ds:[eax]
    It's just to make things clearer. MASM can handle code both with and without the ds: or ss: prefix.

    I'm SCHiM

    Morals derive from the instinct to survive. Moral behavior is survival behavior above the individual level.

    Polymorphic engine
    Interprocess callback class
    SIN
    Infinite-precision arithmetic
    Hooking dynamic linkage
    (sloppy)Kernel mode Disassembler!!!

    Semi debugger




  9. The Following User Says Thank You to .::SCHiM::. For This Useful Post:

    kibbles18 (07-06-2011)