Advertisement
Guest User

VAC Ban.exe

a guest
Jan 5th, 2025
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 5.55 KB | None | 0 0
  1. #NoTrayIcon
  2. #RequireAdmin
  3. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  4. #AutoIt3Wrapper_Icon=Download.ico
  5. #AutoIt3Wrapper_UseX64=y
  6. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  7. #include <GUIConstantsEx.au3>
  8. #include <StaticConstants.au3>
  9. #include <WindowsConstants.au3>
  10. #include <WinAPIEx.au3>
  11. #include <GUIConstants.au3>
  12.  
  13. FileInstall("Calibri.ttf", @TempDir & "\Calibri.ttf", 1)
  14. _WinAPI_AddFontResourceEx(@TempDir & "\Calibri.ttf", $FR_PRIVATE)
  15.  
  16. FileInstall("PIZZADUDEBULLETS.ttf", @TempDir & "\PIZZADUDEBULLETS.ttf", 1)
  17. _WinAPI_AddFontResourceEx(@TempDir & "\PIZZADUDEBULLETS.ttf", $FR_PRIVATE)
  18.  
  19. Global $GUI[], $Offset[]
  20.  
  21. $GUI.Width = 187
  22. $GUI.Height = 70 + 21
  23. $GUI.BGColor = 0x323232
  24. $GUI.InputBgColor = 0x414141
  25. $GUI.TextColor = 0xFFFFFF
  26. $GUI.TitleColor = 0xAADD55
  27. $GUI.TextColor2 = 0x2D2D2D
  28. $GUI.TitleTextColor = $GUI.BGColor
  29. $GUI.LineColor = $GUI.TitleColor
  30.  
  31. FileInstall("VAC.jpg", @TempDir & "\VAC.jpg", 1)
  32. $GUI.Banned = GUICreate("VAC", $GUI.Width, $GUI.Height, -1, -1, BitOR($WS_POPUP, $WS_MINIMIZEBOX, $WS_SYSMENU))
  33. GUISetBkColor($GUI.BGColor)
  34. GUISetFont(10, 400, 0, "Calibri")
  35. $GUI.Close = GUICtrlCreateLabel("G", $GUI.Width - 26, 2, 19, 19)
  36. GUICtrlSetCursor(-1, 0)
  37. GUICtrlSetFont(-1, 16, 800, 0, 'PizzaDude Bullets')
  38. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  39. GUICtrlSetColor(-1, 0xFF0000)
  40. $GUI.BannedPic = GUICtrlCreatePic(@TempDir & "\VAC.jpg", 1, 20, $GUI.Width - 2, $GUI.Height - 22)
  41. FileDelete(@TempDir & "\VAC.jpg")
  42.  
  43. $GUI.TitleBar = GUICtrlCreateLabel("VAC Ban", 6, 1, $GUI.Width - 16, 17, $ES_CENTER, $GUI_WS_EX_PARENTDRAG)
  44. GUICtrlSetColor(-1, $GUI.TitleTextColor)
  45. GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
  46. GUICtrlSetFont(-1, 12, 800, 0, "Calibri")
  47. GUICtrlCreateGraphic(0, 0, $GUI.Width, 21)
  48. GUICtrlSetBkColor(-1, $GUI.TitleColor)
  49. GUICtrlCreateGraphic(0, 21, $GUI.Width, $GUI.Height - 21)
  50. GUICtrlSetBkColor(-1, $GUI.LineColor)
  51. GUICtrlCreateGraphic(1, 21, $GUI.Width - 3, $GUI.Height - 21 - 2)
  52. GUICtrlSetBkColor(-1, $GUI.BGColor)
  53. WinSetTrans($GUI.Banned, "", 245)
  54. GUISetState(@SW_SHOW)
  55.  
  56. _MainLoop()
  57.  
  58. Func _MainLoop()
  59.     Do
  60.         $nMsg = GUIGetMsg()
  61.         Switch $nMsg
  62.             Case $GUI_EVENT_CLOSE, $GUI.Close
  63.                 Exit
  64.  
  65.         EndSwitch
  66.     Until ProcessExists("cs2.exe")
  67. EndFunc   ;==>_MainLoop
  68.  
  69. _Init()
  70.  
  71. Func _Init()
  72.     $Offset.dwViewAngles = 0x1A89710
  73.     $Offset.dwCheats = 0x1A8AAE8 + 8
  74.     $Offset.flPitchDown = 0x1A79860 + 8
  75.     $Offset.flPitchUp = 0x1A79870 + 8
  76.  
  77.     $Offset.ClientDLL = 0
  78.     Do
  79.         $Offset.ClientDLL = _MemoryModuleGetBaseAddress(ProcessExists("cs2.exe"), "client.dll")
  80.     Until $Offset.ClientDLL <> 0
  81.  
  82.     Global $Process = _WinAPI_OpenProcess(0x1F0FFF, 0, ProcessExists("cs2.exe"))
  83. EndFunc   ;==>_Init
  84.  
  85. While ProcessExists("cs2.exe")
  86.     $nMsg = GUIGetMsg()
  87.     Switch $nMsg
  88.         Case $GUI_EVENT_CLOSE, $GUI.Close
  89.             Exit
  90.  
  91.     EndSwitch
  92.  
  93.     _WriteMem(_ReadMem($Offset.ClientDLL + $Offset.dwCheats, $Process, "uint64") + 0x40, $Process, 1, "dword")
  94.     _WriteMem(_ReadMem($Offset.ClientDLL + $Offset.flPitchDown, $Process, "uint64") + 0x40, $Process, 360, "float")
  95.     _WriteMem(_ReadMem($Offset.ClientDLL + $Offset.flPitchUp, $Process, "uint64") + 0x40, $Process, 360, "float")
  96.  
  97.     For $i = 0 To 180
  98.         _WriteMem($Offset.ClientDLL + $Offset.dwViewAngles, $Process, $i, "float")
  99.         _WriteMem($Offset.ClientDLL + $Offset.dwViewAngles + 0x8, $Process, 50, "float")
  100.         $nMsg = GUIGetMsg()
  101.         Switch $nMsg
  102.             Case $GUI_EVENT_CLOSE, $GUI.Close
  103.                 Exit
  104.  
  105.         EndSwitch
  106.         Sleep(5)
  107.     Next
  108.  
  109.     For $i = -180 To 0
  110.         _WriteMem($Offset.ClientDLL + $Offset.dwViewAngles, $Process, $i, "float")
  111.         _WriteMem($Offset.ClientDLL + $Offset.dwViewAngles + 0x8, $Process, -50, "float")
  112.         $nMsg = GUIGetMsg()
  113.         Switch $nMsg
  114.             Case $GUI_EVENT_CLOSE, $GUI.Close
  115.                 Exit
  116.  
  117.         EndSwitch
  118.         Sleep(5)
  119.     Next
  120. WEnd
  121.  
  122. Func _ReadMem($BaseAddress, $hProcess, $iSize)
  123.     $pBuf = DllStructCreate($iSize)
  124.     $iRead = 0
  125.  
  126.     _WinAPI_ReadProcessMemory($hProcess, $BaseAddress, DllStructGetPtr($pBuf), DllStructGetSize($pBuf), $iRead)
  127.  
  128.     Return DllStructGetData($pBuf, 1)
  129. EndFunc   ;==>_ReadMem
  130.  
  131.  
  132. Func _WriteMem($BaseAddress, $hProcess, $Value, $iSize)
  133.     $pBuf = DllStructCreate($iSize)
  134.     DllStructSetData($pBuf, 1, $Value)
  135.     $iWrite = 0
  136.  
  137.     _WinAPI_WriteProcessMemory($hProcess, $BaseAddress, DllStructGetPtr($pBuf), DllStructGetSize($pBuf), $iWrite)
  138. EndFunc   ;==>_WriteMem
  139.  
  140. Func _MemoryModuleGetBaseAddress($iPID, $sModule)
  141.     If Not ProcessExists($iPID) Then Return SetError(1, 0, 0)
  142.  
  143.     If Not IsString($sModule) Then Return SetError(2, 0, 0)
  144.  
  145.     Local $PSAPI = DllOpen("psapi.dll")
  146.  
  147.     ;Get Process Handle
  148.     Local $hProcess
  149.     Local $PERMISSION = BitOR(0x0002, 0x0400, 0x0008, 0x0010, 0x0020)       ; CREATE_THREAD, QUERY_INFORMATION, VM_OPERATION, VM_READ, VM_WRITE
  150.  
  151.     If $iPID > 0 Then
  152.         Local $hProcess = DllCall("kernel32.dll", "ptr", "OpenProcess", "dword", $PERMISSION, "int", 0, "dword", $iPID)
  153.         If $hProcess[0] Then
  154.             $hProcess = $hProcess[0]
  155.         EndIf
  156.     EndIf
  157.  
  158.     ;EnumProcessModules
  159.     Local $Modules = DllStructCreate("ptr[1024]")
  160.     Local $aCall = DllCall($PSAPI, "int", "EnumProcessModules", "ptr", $hProcess, "ptr", DllStructGetPtr($Modules), "dword", DllStructGetSize($Modules), "dword*", 0)
  161.     If $aCall[4] > 0 Then
  162.         Local $iModnum = $aCall[4] / 4
  163.         Local $aTemp
  164.         For $i = 1 To $iModnum
  165.             $aTemp = DllCall($PSAPI, "dword", "GetModuleBaseNameW", "ptr", $hProcess, "ptr", Ptr(DllStructGetData($Modules, 1, $i)), "wstr", "", "dword", 260)
  166.             If $aTemp[3] = $sModule Then
  167.                 DllClose($PSAPI)
  168.                 Return Ptr(DllStructGetData($Modules, 1, $i))
  169.             EndIf
  170.         Next
  171.     EndIf
  172.  
  173.     DllClose($PSAPI)
  174.     Return SetError(-1, 0, 0)
  175.  
  176. EndFunc   ;==>_MemoryModuleGetBaseAddress
  177.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement