Help with UsePower? menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    DennyPow's Avatar Corporal
    Reputation
    1
    Join Date
    May 2012
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with UsePower?

    Hi -

    I've a problem with UsePower function (0x97AC70)


    I don't know how I've to use this function (injected code)

    Yeah I've read all this threads about UsePower but at first i don't know what works currently and how I've to use the usercall wrapper => cdcel


    Would be nice if someone could explain this stuff

    Thanks
    Last edited by DennyPow; 06-18-2012 at 08:11 AM.

    Help with UsePower?
  2. #2
    Aftiagouras's Avatar Member
    Reputation
    2
    Join Date
    Mar 2008
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This func gets one argumet from eax wich is the register used for returning values so mb you could do something like that:

    int SetFirstArg(int a1) { return a1; }

    and call UsePower like that:

    SetFirstArg(a1);
    Usepower(a2, a3, a4);

    Then again your compiler could mess this up so you might have to call it manualy with asm code.

  3. #3
    DennyPow's Avatar Corporal
    Reputation
    1
    Join Date
    May 2012
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Aftiagouras View Post
    This func gets one argumet from eax wich is the register used for returning values so mb you could do something like that:

    int SetFirstArg(int a1) { return a1; }

    and call UsePower like that:

    SetFirstArg(a1);
    Usepower(a2, a3, a4);

    Then again your compiler could mess this up so you might have to call it manualy with asm code.
    Could you say me what's the params are?

    eax stores a stuture pointer which contains GUID to target....

  4. #4
    boredevil's Avatar Active Member
    Reputation
    46
    Join Date
    Feb 2008
    Posts
    166
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just scroll a bit to the top. the function just above yours is the "real" usepower. all its arguments are well explained in this forum.
    Last edited by boredevil; 06-18-2012 at 11:53 AM.

  5. #5
    DennyPow's Avatar Corporal
    Reputation
    1
    Join Date
    May 2012
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by boredevil View Post
    just scroll a bit to the top. the function just above yours is the "real" usepower. all its arguments are well explained in this forum.
    I think you mean 0x97AA30?
    I don't find something useful here all is confused, there is no thread who is only discuss this problem, which is up-to-date.


    EAX contains ActorPtr
    ECX contains ActorGUID

    ESI ?
    ...
    ...
    Last edited by DennyPow; 06-18-2012 at 03:24 PM.

  6. #6
    boredevil's Avatar Active Member
    Reputation
    46
    Join Date
    Feb 2008
    Posts
    166
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DennyPow View Post
    So just tell me how to call it.
    ...
    Sorry dude. No spoons in stock atm.
    Last edited by boredevil; 06-18-2012 at 02:02 PM.

  7. #7
    DennyPow's Avatar Corporal
    Reputation
    1
    Join Date
    May 2012
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No one knows? :confused:

  8. #8
    xzidez's Avatar Member
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    136
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DennyPow View Post
    No one knows? :confused:
    Create e delegate (I choosed stdcall so .net handles the stack for me)...
    Code:
    [UnmanagedFunctionPointer(CallingConvention.StdCall)]
    private delegate int UserPowerWrapperDelegate(uint cmdPacket,uint ptrHero, uint one, uint zero, uint address);
    private static UserPowerWrapperDelegate UsePowerInternal;
    private static IntPtr UsePowerWrapper = IntPtr.Zero;
    Create your wrapper.
    Code:
                    Byte[] asm = new Byte[]
                    {
                        0x55,                       //Push EBP
                        0x8B, 0xEC,                 //Mov EBP, ESP
                        0x8B, 0x5D, 0x18,           //mov ebx, [ebp+18]
                        0x8B, 0x45, 0x14,           //mov eax, [ebp+14]
                        0x50,                       //Push EAX
                        0x8B, 0x45, 0x10,           //mov eax, [ebp+10] 
                        0x50,                       //Push EAX
                        0x8B, 0x45, 0x0C,           //mov eax, [ebp+0C] //Hero
                        0x50,                       //Push EAX
                        0x8B, 0x45, 0x08,           //mov eax, [ebp+08] //Cmdpacket
                        0xFF, 0xD3,                 //Call ebx
                        0x8B, 0XE5,                 //Mov ESP, EBP
                        0x5D,                       //Pop ebp   
                        0xC3                        //Return
                    };
    Allocate some memory, copy our asm there and register our delegate.
    Code:
    UsePowerWrapper = Marshal.AllocCoTaskMem(asm.Length);
    Marshal.Copy(asm, 0, UsePowerWrapper, asm.Length);
    UsePowerInternal = Marshal.GetDelegateForFunctionPointer(ptr, typeof(UserPowerWrapperDelegate))
    And now we can call it with our UsePowerInternal.

    Edit: This is the "outer" usepower, you can only use this on actors.. Not on vectors.. for that you will have to reverse a bit
    good luck
    Last edited by xzidez; 06-21-2012 at 08:55 AM.

  9. #9
    DennyPow's Avatar Corporal
    Reputation
    1
    Join Date
    May 2012
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks but I'am not able to implement this in C don't know what's my mistake :confused:

    PHP Code:
    void _declspec(nakedUsePowerToActor_Wrapper()
    {
        
    _asm
        
    {
            
    push ebp
            mov EBP
    ESP
            mov ebx
    , [ebp+0x18]
            
    mov eax, [ebp+0x14]
            
    push EAX
            mov eax
    , [ebp+0x10]
            
    push EAX
            mov eax
    , [ebp+0x0C]
            
    mov eax, [ebp+0x08]
            
    push EAX
            call ebx
            mov ESP
    EBP
            pop ebp 
            ret
        
    }
    }

    void __stdcall UsePowerToActorFunc(int cmdPacketint ptrHeroint oneint zeroint address)
    {
        
    UsePowerToActor_Wrapper();

    Then I calling

    cmdPacket = SNOId?
    ptrHero = MyActorPtr
    one = 1?
    zero = 0?
    address = UsePowerToActorAddr (0x97C770)

    UsePowerToActorFunc(.........);

    What's wrong?

  10. #10
    xzidez's Avatar Member
    Reputation
    12
    Join Date
    Dec 2007
    Posts
    136
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I havent updated my framework to latest patch so I cant comment on the address... last patch it was 0x97AC70.
    And cmdPacket is not SNO its a struct with the target and the power you want to use. Im sorry to say this but I think you should go a few steps back and work on your reversing skills a bit. Even if I would give you a complete samplecode with everything you need you wont be able to use it and you will be stuck on the next thing you want to do.

    People here dont mind helping.. but just handing you the exact code will just get you stuck on your next problem. you gotta learn how to do stuffs yourself

  11. #11
    RamirezX's Avatar Member
    Reputation
    2
    Join Date
    Apr 2012
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My quick&dirty wrapper to UsePowerToActor used as MoveTo ...

    Code:
    #define f_UsePower	0x97C790
    
    typedef struct {
    
    		DWORD power_1;
    		DWORD power_2;
    		DWORD cmd;
    		DWORD acd_id;
    		float x, y, z;
    		DWORD world_id;
    		DWORD end;
    
    } INTERACT_PACKET;
    
    
    __declspec(naked) DWORD PlayerMoveTo(DWORD dwPlayerActorAddress, float x, float y, float z)	{
    
    	__asm { //prolog
    
    		push ebp
    		mov ebp, esp
    		sub esp, 0x80
    
    	}
    
    	DWORD PlayerActorAddress, *pPlayerActorAddress;
    	pPlayerActorAddress = &PlayerActorAddress;
    	PlayerActorAddress = dwPlayerActorAddress;
    
    	INTERACT_PACKET iPacket, *piPacket;
    	piPacket = &iPacket;
    
    	piPacket->power_1 = 0x0000777C;
    	piPacket->power_2 = 0x0000777C;
    	piPacket->cmd = 2;
    	piPacket->acd_id = 0xFFFFFFFF;
    	piPacket->x = x;
    	piPacket->y = y;
    	piPacket->z = z;
    	piPacket->world_id = 0x772E0000;
    	piPacket->end = 0xFFFFFFFF;
    
    	__asm {
    	
    		push pPlayerActorAddress
    		push 1
    		push 0
    		mov esi, piPacket
    		mov eax, PlayerActorAddress
    			
    		mov ecx, f_UsePower
    		call ecx
    
    		mov esp, ebp //epilog
    		pop ebp
    		ret
    	}
    
    }

  12. #12
    KOS0937's Avatar Member
    Reputation
    18
    Join Date
    May 2008
    Posts
    129
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RamirezX View Post
    My quick&dirty wrapper to UsePowerToActor used as MoveTo ...
    You are missing the 10th field in the callStruct. It will be fine usually (as you want that last value to be 0), but you never know...

    proof:
    Code:
    .text:0097C7FD                 cmp     dword ptr [esi+24h], 0

  13. #13
    ValvePro's Avatar Sergeant
    Reputation
    18
    Join Date
    Jun 2012
    Posts
    62
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RamirezX View Post
    My quick&dirty wrapper to UsePowerToActor used as MoveTo ...

    Code:
    #define f_UsePower	0x97C790
    
    typedef struct {
    
    		DWORD power_1;
    		DWORD power_2;
    		DWORD cmd;
    		DWORD acd_id;
    		float x, y, z;
    		DWORD world_id;
    		DWORD end;
    
    } INTERACT_PACKET;
    
    
    __declspec(naked) DWORD PlayerMoveTo(DWORD dwPlayerActorAddress, float x, float y, float z)	{
    
    	__asm { //prolog
    
    		push ebp
    		mov ebp, esp
    		sub esp, 0x80
    
    	}
    
    	DWORD PlayerActorAddress, *pPlayerActorAddress;
    	pPlayerActorAddress = &PlayerActorAddress;
    	PlayerActorAddress = dwPlayerActorAddress;
    
    	INTERACT_PACKET iPacket, *piPacket;
    	piPacket = &iPacket;
    
    	piPacket->power_1 = 0x0000777C;
    	piPacket->power_2 = 0x0000777C;
    	piPacket->cmd = 2;
    	piPacket->acd_id = 0xFFFFFFFF;
    	piPacket->x = x;
    	piPacket->y = y;
    	piPacket->z = z;
    	piPacket->world_id = 0x772E0000;
    	piPacket->end = 0xFFFFFFFF;
    
    	__asm {
    	
    		push pPlayerActorAddress
    		push 1
    		push 0
    		mov esi, piPacket
    		mov eax, PlayerActorAddress
    			
    		mov ecx, f_UsePower
    		call ecx
    
    		mov esp, ebp //epilog
    		pop ebp
    		ret
    	}
    
    }
    Nice - but is there any way to get the current World_ID?

  14. #14
    RamirezX's Avatar Member
    Reputation
    2
    Join Date
    Apr 2012
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by KOS0937 View Post
    You are missing the 10th field in the callStruct. It will be fine usually (as you want that last value to be 0), but you never know...

    proof:
    Code:
    .text:0097C7FD                 cmp     dword ptr [esi+24h], 0
    thx for a hint ;-)

  15. #15
    RamirezX's Avatar Member
    Reputation
    2
    Join Date
    Apr 2012
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ValvePro View Post
    Nice - but is there any way to get the current World_ID?
    Of course .. take it from PlayerActor ...
    I wrote _quick&dirty_
    Last edited by RamirezX; 06-28-2012 at 08:29 AM.

Page 1 of 2 12 LastLast

Similar Threads

  1. need help with shammy talents
    By jason in forum World of Warcraft General
    Replies: 5
    Last Post: 07-19-2006, 02:02 AM
  2. help with emu server
    By Chsz in forum World of Warcraft General
    Replies: 1
    Last Post: 07-04-2006, 10:01 PM
  3. Help with wowglider
    By Voldaroi in forum World of Warcraft General
    Replies: 6
    Last Post: 06-17-2006, 08:54 PM
  4. Help with Ranks!!
    By Krazzee in forum Community Chat
    Replies: 7
    Last Post: 06-16-2006, 06:58 PM
  5. Help with Auto-it!!
    By Krazzee in forum World of Warcraft General
    Replies: 7
    Last Post: 06-12-2006, 09:22 PM
All times are GMT -5. The time now is 08:58 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search