Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. define(address,"UnityPlayer.dll"+D08435)
  2. define(bytes,F2 41 0F 11 8E D8 01 00 00)
  3.  
  4. [ENABLE]
  5. assert(address,bytes)
  6. alloc(newmem,$1000,"UnityPlayer.dll"+D08435)
  7.  
  8. label(return)
  9. label(save)
  10. label(load)
  11. label(presetlocationload)
  12. label(telecall)
  13. label(teledata)
  14. label(telecoords)
  15. label(teleregioncoords)
  16. registersymbol(teleregioncoords)
  17. registersymbol(teledata)
  18.  
  19. newmem:
  20. // original code, z update
  21. movsd [r14+000001D8],xmm1
  22.  
  23. // Save Base Address
  24. mov [teleregioncoords],r14
  25.  
  26. // Determine if hotkey was pressed
  27. mov eax,[teledata]
  28. mov [teledata],0
  29. cmp eax,1
  30. je save
  31. cmp eax,2
  32. je load
  33. cmp eax,3
  34. je presetlocationload
  35. jmp return
  36.  
  37. save:
  38. movupd [telecoords],xmm0
  39. movsd [telecoords+10],xmm1
  40. jmp return
  41.  
  42. load:
  43. mov rax, telecoords
  44. call telecall
  45. jmp return
  46.  
  47. presetlocationload:
  48. // get and verify index
  49. mov eax, [teledata+4]
  50. cmp eax,0
  51. jle return
  52. {$lua}
  53. local count = AddressList.getMemoryRecordByID(397).DropDownList.Count
  54. return 'cmp eax,' .. count
  55. {$asm}
  56. jge return
  57.  
  58. // load coordinates using index
  59. // this would be easier with lea rax, [teledata+rax*18+8] but that won't assemble...
  60. push rdx
  61. mov rdx, 18
  62. mul rdx // multiply rax (index) by rdx aka 0x18 aka 24 aka the size of 3 doubles
  63. mov rdx, telecoords
  64. add rax, rdx // add base of coordinates array (-8 since telecall adds 8)
  65. pop rdx
  66.  
  67. call telecall
  68. jmp return
  69.  
  70. telecall:
  71. movsd xmm0,[rax]
  72. movsd [r14+1C8],xmm0
  73. movsd xmm0,[rax+8]
  74. movsd [r14+1D0],xmm0
  75. movsd xmm0,[rax+10]
  76. movsd [r14+1D8],xmm0
  77. ret
  78.  
  79.  
  80. teleregioncoords:
  81. dq 0 // Base Address
  82.  
  83. teledata:
  84. dd 1 // Flag // [teledata]
  85. dd 1 //Preset Locations for player to select // [teledata+4]
  86. telecoords:
  87. dq 0 //X-Pos // [teledata+8]
  88. dq 0 //Y-Pos // [teledata+10]
  89. dq 0 //Z-Pos // [teledata+18]
  90.  
  91. // Preset Location Coords // PL
  92.  
  93. // Ranch // PL = 1
  94. dq (double)89.3 // X-Pos +20
  95. dq (double)16.0 // Y-Pos +28
  96. dq (double)-144.46 // Z-Pos +30
  97.  
  98. // Ogden's Retreat // PL = 2
  99. dq (double)900 // + 68
  100. dq (double)3 // +70
  101. dq (double)485 // +78
  102.  
  103. // Vault 1 // PL = 3
  104. dq (double)871.15 // +38
  105. dq (double)6.0 // +40
  106. dq (double)-2.25 // +48
  107.  
  108. // Vault 2 // PL = 4
  109. dq (double)831.34 // +50
  110. dq (double)12.8 // +58
  111. dq (double)105.9 // + 60
  112.  
  113. // Vault 3 // PL = 5
  114. dq (double)810.43 // + 68
  115. dq (double)18.0 // +70
  116. dq (double)206.63 // +78
  117.  
  118. address:
  119. jmp newmem
  120. nop
  121. nop
  122. nop
  123. nop
  124. return:
  125.  
  126. [DISABLE]
  127.  
  128. address:
  129. db bytes
  130.  
  131. dealloc(newmem)
  132. unregistersymbol(teledata)
  133. unregistersymbol(teleregiondata)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement