Advertisement
Guest User

Untitled

a guest
Jan 19th, 2018
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.71 KB | None | 0 0
  1. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn ; Enable warnings to assist with detecting common errors.
  3. SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
  5.  
  6. ; <COMPILER: v1.0.48.5>
  7. F6::
  8.  
  9. Process = csgo.exe
  10. DllName = client.dll
  11. msgbox, Wait boi im getting it ready
  12.  
  13. Process, Exist, %Process%
  14. PID = %ErrorLevel%
  15. SetFormat, Integer, Hex
  16. Base := GetDllBase(DllName, PID)
  17.  
  18. start:=0x00000000
  19. loop {
  20. start:=start+0x1000
  21. check:=ReadMemory(start+0x4,"Counter-Strike: Global Offensive")
  22. check2:=ReadMemory(check,"Counter-Strike: Global Offensive")
  23.  
  24. if (check2==0x6574616D)
  25.  
  26.  
  27. {
  28.  
  29. break
  30. }
  31. if (start>0xDDDDDDDD)
  32. {
  33. msgbox, Something went wrong O.o
  34. }
  35.  
  36. }
  37. offset:=start+0x550
  38. end:=start+0x2000
  39.  
  40. loop
  41. {
  42. offset:=offset+0x4
  43. check:=ReadMemory(offset,"Counter-Strike: Global Offensive")
  44. checka:=check+0x1c
  45. check2:=ReadMemory(check+0x1c,"Counter-Strike: Global Offensive")
  46. if (check2==0x72617065)
  47. {
  48. break
  49. }
  50. if (offset>end)
  51. {
  52. msgbox, something went wrong OMG
  53. }
  54. }
  55.  
  56. msgbox, YES YES I HAVE THEEEE WALLS
  57.  
  58. offsets3:=offset
  59.  
  60. t1:=ReadMemory(offsets3,"Counter-Strike: Global Offensive")
  61. t2:=ReadMemory(offsets3+0x8,"Counter-Strike: Global Offensive")
  62. t3:=ReadMemory(offsets3+0x10,"Counter-Strike: Global Offensive")
  63. t4:=ReadMemory(offsets3+0x18,"Counter-Strike: Global Offensive")
  64. t5:=ReadMemory(offsets3+0x20,"Counter-Strike: Global Offensive")
  65. t6:=ReadMemory(offsets3+0x28,"Counter-Strike: Global Offensive")
  66. t7:=ReadMemory(offsets3+0x30,"Counter-Strike: Global Offensive")
  67.  
  68. offsetsct:=offsets3+0x30+0xC0
  69.  
  70. ct1:=ReadMemory(offsetsct,"Counter-Strike: Global Offensive")
  71. ct2:=ReadMemory(offsetsct+0x8,"Counter-Strike: Global Offensive")
  72. ct3:=ReadMemory(offsetsct+0x10,"Counter-Strike: Global Offensive")
  73. ct4:=ReadMemory(offsetsct+0x18,"Counter-Strike: Global Offensive")
  74. ct5:=ReadMemory(offsetsct+0x20,"Counter-Strike: Global Offensive")
  75. ct6:=ReadMemory(offsetsct+0x28,"Counter-Strike: Global Offensive")
  76. ct7:=ReadMemory(offsetsct+0x638,"Counter-Strike: Global Offensive")
  77.  
  78.  
  79. t11:=t1+0x96D
  80. t111:=ReadMemoryString(t11,"Counter-Strike: Global Offensive")
  81. rewritetex(t111,t11)
  82. t22:=t2+0xC0F
  83. t222:=ReadMemoryString(t22,"Counter-Strike: Global Offensive")
  84. rewritetex(t222,t22)
  85. t33:=t3+0x45D
  86. t333:=ReadMemoryString(t33,"Counter-Strike: Global Offensive")
  87. rewritetex(t333,t33)
  88. t44:=t4+0x7e1
  89. t444:=ReadMemoryString(t44,"Counter-Strike: Global Offensive")
  90. rewritetex(t444,t44)
  91. t55:=t5+0xACC
  92. t555:=ReadMemoryString(t55,"Counter-Strike: Global Offensive")
  93. rewritetex(t555,t55)
  94. t66:=t6+0xFD
  95. t666:=ReadMemoryString(t66,"Counter-Strike: Global Offensive")
  96. rewritetex(t666,t66)
  97. t77:=t7+0x838
  98. t777:=ReadMemoryString(t77,"Counter-Strike: Global Offensive")
  99. rewritetex(t777,t77)
  100.  
  101.  
  102.  
  103. ct11:=ct1+0x27D
  104. ct111:=ReadMemoryString(ct11,"Counter-Strike: Global Offensive")
  105. rewritetex2(ct111,ct11)
  106. ct22:=ct2+0x219d
  107. t222:=ReadMemoryString(ct22,"Counter-Strike: Global Offensive")
  108. rewritetex2(ct222,ct22)
  109. ct33:=ct3+0x378
  110. ct333:=ReadMemoryString(ct33,"Counter-Strike: Global Offensive")
  111. rewritetex2(ct333,ct33)
  112. ct44:=ct4+0x7e1
  113. ct444:=ReadMemoryString(ct44,"Counter-Strike: Global Offensive")
  114. rewritetex2(ct444,ct44)
  115. ct55:=ct5+0xA70
  116. ct555:=ReadMemoryString(ct55,"Counter-Strike: Global Offensive")
  117. rewritetex2(ct111,ct11)
  118. ct66:=ct6+0x111
  119. ct666:=ReadMemoryString(ct66,"Counter-Strike: Global Offensive")
  120. rewritetex2(ct666,ct66)
  121. ct77:=ct7+0xEB7
  122. ct777:=ReadMemoryString(ct77,"Counter-Strike: Global Offensive")
  123. rewritetex2(ct777,ct77)
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132. ExitApp
  133.  
  134.  
  135. rewritetex(Haystack,offsettex)
  136. {
  137.  
  138. Needle = "$rimlight"
  139. StringGetPos, pos, Haystack, %Needle%
  140. if (pos >= 0)
  141. { WriteMemory(0x6E676924,offsettex+pos+0x0,"Counter-Strike: Global Offensive")
  142. WriteMemory(0x7A65726F,offsettex+pos+0x4,"Counter-Strike: Global Offensive")
  143. WriteMemory(0x20203120,offsettex+pos+0x8,"Counter-Strike: Global Offensive")
  144. WriteMemory(0x0A0D0A0D,offsettex+pos+0xC,"Counter-Strike: Global Offensive")
  145. WriteMemory(0x6C6F6324,offsettex+pos+0x10,"Counter-Strike: Global Offensive")
  146. WriteMemory(0x2220726F,offsettex+pos+0x14,"Counter-Strike: Global Offensive")
  147. WriteMemory(0x3020395B,offsettex+pos+0x18,"Counter-Strike: Global Offensive")
  148. WriteMemory(0x225D3020,offsettex+pos+0x1C,"Counter-Strike: Global Offensive")
  149. WriteMemory(0x0A0D0A0D,offsettex+pos+0x20,"Counter-Strike: Global Offensive")
  150. WriteMemory(0x0A0D0A0D,offsettex+pos+0x24,"Counter-Strike: Global Offensive")
  151. WriteMemory(0x0A0D0A0D,offsettex+pos+0x28,"Counter-Strike: Global Offensive")
  152. }
  153. }
  154.  
  155. rewritetex2(Haystack,offsettex)
  156. {
  157.  
  158. Needle = "$rimlight"
  159. StringGetPos, pos, Haystack, %Needle%
  160. if (pos >= 0)
  161. { WriteMemory(0x6E676924,offsettex+pos+0x0,"Counter-Strike: Global Offensive")
  162. WriteMemory(0x7A65726F,offsettex+pos+0x4,"Counter-Strike: Global Offensive")
  163. WriteMemory(0x20203120,offsettex+pos+0x8,"Counter-Strike: Global Offensive")
  164. WriteMemory(0x0A0D0A0D,offsettex+pos+0xC,"Counter-Strike: Global Offensive")
  165. WriteMemory(0x6C6F6324,offsettex+pos+0x10,"Counter-Strike: Global Offensive")
  166. WriteMemory(0x2220726F,offsettex+pos+0x14,"Counter-Strike: Global Offensive")
  167. WriteMemory(0x3020305B,offsettex+pos+0x18,"Counter-Strike: Global Offensive")
  168. WriteMemory(0x225D3920,offsettex+pos+0x1C,"Counter-Strike: Global Offensive")
  169. WriteMemory(0x0A0D0A0D,offsettex+pos+0x20,"Counter-Strike: Global Offensive")
  170. WriteMemory(0x0A0D0A0D,offsettex+pos+0x24,"Counter-Strike: Global Offensive")
  171. WriteMemory(0x0A0D0A0D,offsettex+pos+0x28,"Counter-Strike: Global Offensive")
  172. }
  173. }
  174.  
  175.  
  176.  
  177.  
  178.  
  179. ReadMemory(MADDRESS,PROGRAM)
  180. {
  181. winget, pid, PID, %PROGRAM%
  182. VarSetCapacity(MVALUE,4,0)
  183. ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
  184. DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
  185. Loop 4
  186. result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)
  187. return, result
  188. }
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195. WriteMemory(WVALUE,MADDRESS,PROGRAM)
  196. {
  197. winget, pid, PID, %PROGRAM%
  198.  
  199.  
  200.  
  201. ProcessHandle := DllCall("OpenProcess", "int", 2035711, "char", 0, "UInt", PID, "UInt")
  202. DllCall("WriteProcessMemory", "UInt", ProcessHandle, "UInt", MADDRESS, "Uint*", WVALUE,"Uint", 4, "Uint *", 0)
  203.  
  204. DllCall("CloseHandle", "int", ProcessHandle)
  205. return
  206. }
  207.  
  208.  
  209.  
  210. GetDllBase(DllName, PID = 0)
  211. {
  212. TH32CS_SNAPMODULE := 0x00000008
  213. INVALID_HANDLE_VALUE = -1
  214. VarSetCapacity(me32, 548, 0)
  215. NumPut(548, me32)
  216. snapMod := DllCall("CreateToolhelp32Snapshot", "Uint", TH32CS_SNAPMODULE
  217. , "Uint", PID)
  218. If (snapMod = INVALID_HANDLE_VALUE) {
  219. Return 0
  220. }
  221. If (DllCall("Module32First", "Uint", snapMod, "Uint", &me32)){
  222. while(DllCall("Module32Next", "Uint", snapMod, "UInt", &me32)) {
  223. If !DllCall("lstrcmpi", "Str", DllName, "UInt", &me32 + 32) {
  224. DllCall("CloseHandle", "UInt", snapMod)
  225. Return NumGet(&me32 + 20)
  226. }
  227. }
  228. }
  229. DllCall("CloseHandle", "Uint", snapMod)
  230. Return 0
  231. }
  232.  
  233.  
  234. ReadMemoryString(MADDRESS,PROGRAM)
  235. {
  236. winget, pid, PID, %PROGRAM%
  237.  
  238. ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "Uint")
  239. teststr =
  240. Loop 32
  241. {
  242. Output := "x"
  243. tempVar := DllCall("ReadProcessMemory", "UInt", ProcessHandle, "UInt", MADDRESS, "str", Output, "Uint", 1, "Uint *", 0)
  244. if (ErrorLevel or !tempVar)
  245. {
  246. DllCall("CloseHandle", "int", ProcessHandle)
  247. return teststr
  248. }
  249.  
  250.  
  251.  
  252. teststr = %teststr%%Output%
  253. MADDRESS++
  254. }
  255. DllCall("CloseHandle", "int", ProcessHandle)
  256. return, teststr
  257.  
  258. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement