Advertisement
thebadCB

Moveplayer WYD

May 3rd, 2012
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 5.52 KB | None | 0 0
  1. #include <ButtonConstants.au3>
  2. #include <EditConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <StaticConstants.au3>
  5. #include <WindowsConstants.au3>
  6. #include <NomadMemory.au3>
  7. #include <WinAPI.au3>
  8. #Region ### START Koda GUI section ### Form=
  9. $Form1 = GUICreate("Move", 374, 83, Default, Default)
  10. $Input1 = GUICtrlCreateInput("", 98, 13, 57, 24, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
  11. $Label1 = GUICtrlCreateLabel("ID char move", 8, 16, 83, 20)
  12.  
  13. $Input2 = GUICtrlCreateInput("", 183, 12, 57, 24, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
  14. $Label2 = GUICtrlCreateLabel("X", 162, 16, 12, 20)
  15. $Input3 = GUICtrlCreateInput("", 265, 10, 57, 24, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
  16. $Label3 = GUICtrlCreateLabel("Y", 244, 14, 13, 20)
  17. $Button1 = GUICtrlCreateButton("Mover", 8, 48, 75, 25, $WS_GROUP)
  18. $janela = "WYD.exe"
  19. GUISetState(@SW_SHOW)
  20. Global $open = _MemoryOpen(ProcessExists($janela))
  21. Global $hProcess = _WinAPI_OpenProcess(0x001F0FFF, False, ProcessExists($janela))
  22. $slot_0_addr = _Pointer1(0x01F61234, "7C8")
  23. Global $ClientID_ADDR = _Pointer1(0x005F7A24, "570")
  24. Global $clientid_1
  25. Global $clientid_2
  26. Global $cx
  27. Global $cy
  28. Global $clientid = _MemoryRead($ClientID_ADDR, $open)
  29. $clientid = Hex($clientid)
  30. $clientid = StringRight($clientid, 4)
  31.  
  32. $clientid_1 = StringRight($clientid, 2)
  33. $clientid_2 = StringLeft($clientid, 2)
  34. Global $ID_Alvo[3]
  35. Global $ID_Atacante[3]
  36. While 1
  37.     $nMsg = GUIGetMsg()
  38.     Switch $nMsg
  39.         Case $GUI_EVENT_CLOSE
  40.             Exit
  41.         Case $Button1
  42.             Moved(GUICtrlRead($Input2),GUICtrlRead($Input3))
  43.     EndSwitch
  44. WEnd
  45. Func _Pointer1($ADD_Base, $ADD1)
  46.     $Pointer = _MemoryRead($ADD_Base, $open)
  47.     $Pointer = $Pointer + Dec($ADD1)
  48.     $Pointer = Hex($Pointer)
  49.     $Pointer = "0x" & $Pointer
  50. ;~          =
  51.     Return $Pointer
  52. EndFunc   ;==>_Pointer1
  53.  
  54. Func _Pointer3($ADD_Base, $ADD1, $ADD2, $ADD3, $OPEN)
  55.     $Pointer = _MemoryRead($ADD_Base, $OPEN)
  56.     $Pointer = $Pointer + Dec($ADD1)
  57.     $Pointer = Hex($Pointer)
  58.     $Pointer = "0x" & $Pointer
  59. ;~      =
  60.     $Pointer = _MemoryRead($Pointer, $OPEN)
  61.     $Pointer = $Pointer + Dec($ADD2)
  62.     $Pointer = Hex($Pointer)
  63.     $Pointer = "0x" & $Pointer
  64. ;~      =
  65.     $Pointer = _MemoryRead($Pointer, $OPEN)
  66.     $Pointer = $Pointer + Dec($ADD3)
  67.     $Pointer = Hex($Pointer)
  68.     $Pointer = "0x" & $Pointer
  69. ;~      =
  70.     Return $Pointer
  71. EndFunc   ;==>_Pointer3
  72.  
  73. Func Moved($c_x, $c_y)
  74.     $cx = _Pointer3(0x01F61234, "21734", "54", "634", $OPEN)
  75.     $cy = _Pointer3(0x01F61234, "21734", "54", "638", $OPEN)
  76.     $x = $c_x
  77.     $y = $c_y
  78.     $c_x = Hex($c_x)
  79.     $c_x_x = StringRight($c_x, 4)
  80.     $c_x = StringLeft($c_x_x, 2)
  81.     $c_x_2 = $c_x_x
  82.     $c_x_2 = StringRight($c_x_2, 4)
  83.     $c_x_2 = StringTrimLeft($c_x_2, 2)
  84.     $c_y = Hex($c_y)
  85.     $c_y_y = StringRight($c_y, 4)
  86.     $c_y = StringLeft($c_y_y, 2)
  87.     $c_y_2 = $c_y_y
  88.     $c_y_2 = StringRight($c_y_2, 4)
  89.     $c_y_2 = StringTrimLeft($c_y_2, 2)
  90.     $velo_move = _memoryread(0x5F9F64, $OPEN)
  91.     $clientid = _MemoryRead($ClientID_ADDR, $OPEN)
  92.     $clientid = Hex($clientid)
  93.     $clientid = StringRight($clientid, 4)
  94.     $clientid_1 = StringRight($clientid, 2)
  95.     $clientid_2 = StringLeft($clientid, 2)
  96.     $c_xx = _MemoryRead($cx, $OPEN)
  97.     $c_xx = Hex($c_xx)
  98.     $c_xx = StringRight($c_xx, 4)
  99.     $x1 = StringRight($c_xx, 2)
  100.     $x2 = StringLeft($c_xx, 2)
  101.     $c_yy = _MemoryRead($cy, $OPEN)
  102.     $c_yy = Hex($c_yy)
  103.     $c_yy = StringRight($c_yy, 4)
  104.     $y1 = StringRight($c_yy, 2)
  105.     $y2 = StringLeft($c_yy, 2)
  106.             $ID = GUICtrlRead($Input1)
  107.             $ID = Hex($ID, 4)
  108.             $ID_Alvo[1] = StringRight($ID, 2)
  109.             $ID_Alvo[2] = StringLeft($ID, 2)
  110. ;~              00 00 00 00 6C 03        7E           03          4C 78 94 E0        2B 08 2F 08          01 00 00 00            04            00 00 00 00 00 00 00 00 00 00 00 00 00 14 04 00 00 00 00 00 00 00 00 5F 00 53 08 21 08
  111.     SendPacket("00 00 00 00 6C 03" & $ID_Alvo[1] & $ID_Alvo[2] & "4C 78 94 E0" & $x1 & $x2 & $y1 & $y2 & "01 00 00 00" & Hex($velo_move, 2) & "00 00 00 00 00 00 00 00 00 00 00 00 00 14 04 00 00 00 00 00 00 00 00 5B 00 00 00" & $c_x_2 & $c_x & $c_y_2 & $c_y, 34)
  112.     Sleep(1000)
  113.     SendPacket("00 00 00 00 6C 03" & $clientid_1 & $clientid_2 & "4C 78 94 E0" & $x1 & $x2 & $y1 & $y2 & "01 00 00 00" & Hex($velo_move, 2) & "00 00 00 00 00 00 00 00 00 00 00 00 00 14 04 00 00 00 00 00 00 00 00 5F 00 00 00 34 08 34 08", 34)
  114.     Return $x & " " & $y
  115. EndFunc   ;==>Moved
  116.  
  117. Func _ByteWrite($address, $Byte)
  118.     Local $count = 1
  119.     $fim = StringLen($Byte)
  120.     $Byte = StringReplace($Byte, " ", "")
  121.     For $inicio = 1 To $fim Step +2
  122.         $Write = Dec(StringMid($Byte, $count, 2))
  123.         _MemoryWrite($address, $open, $Write, 'byte')
  124.         $address = $address + 0x1
  125.         $count = $count + 2
  126.     Next
  127.     Return Hex($address)
  128.     ;Func By Necros e BabyLoves
  129.     ;Thanks Necros ;D
  130. EndFunc   ;==>_ByteWrite
  131.  
  132. Func CreateRemoteThread($hProcess, $lpThreadAttributes, $dwStackSize, $lpStartAddress, $lpParameter, $dwCreationFlags, $lpThreadId)
  133.     Return DllCall("Kernel32.dll", "ptr", "CreateRemoteThread", _
  134.             "ptr", $hProcess, _
  135.             "ptr", $lpThreadAttributes, _
  136.             "uint", $dwStackSize, _
  137.             "ptr", $lpStartAddress, _
  138.             "ptr", $lpParameter, _
  139.             "dword", $dwCreationFlags, _
  140.             "ptr", $lpThreadId)
  141. EndFunc   ;==>CreateRemoteThread
  142.  
  143. Func SendPacket($packet, $SIZE = '')
  144.     If $SIZE = "" Then $SIZE = StringLeft($packet, 2)
  145.     $packet = StringReplace($packet, " ", "")
  146.  
  147.     _ByteWrite(0x05DCD24, $packet) ; Escreve o pak
  148.     $aRet = DllCall("Kernel32.dll", 'int', 'VirtualProtectEx', 'int', $hProcess, 'ptr', 0x05DCD24, _
  149.             'ulong_ptr', 52, 'dword', 0x40, 'dword*', '')
  150.     _ByteWrite(0x005DCD9F, "55 8B EC 6A" & $SIZE & "68 24 CD 5D 00 E8 1A 04 F7 FF 8B E5 5D C3")
  151.     $hThread_2 = CreateRemoteThread($hProcess, "", "", 0x005DCD9F, "", 0, "")
  152.  
  153. EndFunc   ;==>SendPacket do BabyLovS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement