1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Question] Has this been converted right?

Discussion in 'Programming' started by Twister, Sep 5, 2010.

  1. Twister

    Twister Well-Known Member

    So Im quite new to programming C++ things.
    now I was wondering if this Pvac right was converted the right way?

    Code (Text):
    1.  
    2. //Original Script.
    3. [enable]
    4. alloc(PrevNext,50)
    5. label(PrevNextRet)
    6.  
    7. 00916769://8B 86 ?? ?? ?? ?? 8B 58 ?? 8B 86 ?? ?? ?? ?? 57 8d 48 ?? e8 ?? ?? ?? ?? dd 5d ?? 8b 86 ?? ?? ?? ?? dd 40 ?? 51 51 dd 1c 24 e8
    8. jmp PrevNext
    9. db 90
    10. PrevNextRet:
    11.  
    12. PrevNext:
    13. mov eax,[esi+110] // main opcode
    14. mov [eax+4c],00
    15. jmp PrevNextRet
    16.  
    17. [disable]
    18. 00916769:
    19. db 8B 86 10 01 00 00
    20. dealloc(PrevNext)
    Code (Text):
    1.  
    2. // My try at converting.
    3. #define jmp(frm, to) (int)(((int)to - (int)frm) - 5)
    4. DWORD pvacPointer = 0x00916769;
    5. DWORD pvacReturn = pvacPointer + 5;
    6.  
    7. __declspec(naked) void __stdcall pvacHook()
    8. {
    9.                  __asm
    10.                  {
    11.                      mov eax, [esi + 0x110]
    12.                      mov dword ptr[eax + 0x4c], 0x00
    13.                      jmp pvacReturn
    14.                  }
    15. }
    I doubt its right, if theres something missing, or something wrong with it, could you guys please point it out to me as I learn the best way like this.
     
  2. NonLeaf

    NonLeaf Well-Known Member

    You forgot the memcpy bytes, i think :o

    And also:

    Replace whit:

    Code (Text):
    1. [B]DWORD pvacPointer = 0x00916769;[/B]
    You did wrong again, remove the space
    Code (Text):
    1. DWORD pvacPointer = 0x 00916769;
    2.  
     
  3. lukyyy222

    lukyyy222 Banned Banned Trade Ban

    how u guys use this codes?
     
  4. Twister

    Twister Well-Known Member

    Its used to code in C++.
     
  5. NonLeaf

    NonLeaf Well-Known Member

    It's used in c++ @ lukyyy222
     

Share This Page