Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define(address,"UnityPlayer.dll"+D08435)
- define(bytes,F2 41 0F 11 8E D8 01 00 00)
- [ENABLE]
- assert(address,bytes)
- alloc(newmem,$1000,"UnityPlayer.dll"+D08435)
- label(return)
- label(save)
- label(load)
- label(presetlocationload)
- label(telecall)
- label(teledata)
- label(telecoords)
- label(teleregioncoords)
- registersymbol(teleregioncoords)
- registersymbol(teledata)
- newmem:
- // original code, z update
- movsd [r14+000001D8],xmm1
- // Save Base Address
- mov [teleregioncoords],r14
- // Determine if hotkey was pressed
- mov eax,[teledata]
- mov [teledata],0
- cmp eax,1
- je save
- cmp eax,2
- je load
- cmp eax,3
- je presetlocationload
- jmp return
- save:
- movupd [telecoords],xmm0
- movsd [telecoords+10],xmm1
- jmp return
- load:
- mov rax, telecoords
- call telecall
- jmp return
- presetlocationload:
- // get and verify index
- mov eax, [teledata+4]
- cmp eax,0
- jle return
- {$lua}
- local count = AddressList.getMemoryRecordByID(397).DropDownList.Count
- return 'cmp eax,' .. count
- {$asm}
- jge return
- // load coordinates using index
- // this would be easier with lea rax, [teledata+rax*18+8] but that won't assemble...
- push rdx
- mov rdx, 18
- mul rdx // multiply rax (index) by rdx aka 0x18 aka 24 aka the size of 3 doubles
- mov rdx, telecoords
- add rax, rdx // add base of coordinates array (-8 since telecall adds 8)
- pop rdx
- call telecall
- jmp return
- telecall:
- movsd xmm0,[rax]
- movsd [r14+1C8],xmm0
- movsd xmm0,[rax+8]
- movsd [r14+1D0],xmm0
- movsd xmm0,[rax+10]
- movsd [r14+1D8],xmm0
- ret
- teleregioncoords:
- dq 0 // Base Address
- teledata:
- dd 1 // Flag // [teledata]
- dd 1 //Preset Locations for player to select // [teledata+4]
- telecoords:
- dq 0 //X-Pos // [teledata+8]
- dq 0 //Y-Pos // [teledata+10]
- dq 0 //Z-Pos // [teledata+18]
- // Preset Location Coords // PL
- // Ranch // PL = 1
- dq (double)89.3 // X-Pos +20
- dq (double)16.0 // Y-Pos +28
- dq (double)-144.46 // Z-Pos +30
- // Ogden's Retreat // PL = 2
- dq (double)900 // + 68
- dq (double)3 // +70
- dq (double)485 // +78
- // Vault 1 // PL = 3
- dq (double)871.15 // +38
- dq (double)6.0 // +40
- dq (double)-2.25 // +48
- // Vault 2 // PL = 4
- dq (double)831.34 // +50
- dq (double)12.8 // +58
- dq (double)105.9 // + 60
- // Vault 3 // PL = 5
- dq (double)810.43 // + 68
- dq (double)18.0 // +70
- dq (double)206.63 // +78
- address:
- jmp newmem
- nop
- nop
- nop
- nop
- return:
- [DISABLE]
- address:
- db bytes
- dealloc(newmem)
- unregistersymbol(teledata)
- unregistersymbol(teleregiondata)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement