functionchange_speed(speed) { var player = GetAddr("FirstPersonCharacter_C") var maxspeed = player.add(0x288).readPointer().add(0x18c) maxspeed.writeFloat(speed) console.log("changed") }
functiondestory_Cube() { var addr = GetAddr("EditorCube8") var destory_addr = addr.readPointer().add(0x318).readPointer() var destory = newNativeFunction(destory_addr,'void',['pointer']) destory(addr) console.log("destoryed")
}
发现锁的是Cube8。
通过cheatengine监听Cube8的坐标的内存来看什么地方访问了Cube8的内存。
首先获得Cube8坐标的地址:
1 2 3 4 5 6 7 8 9
functionget_location(actor) { var addr = GetAddr(actor).add(0x130).readPointer().add(0x1d0) var x = Memory.readFloat(addr) var y = Memory.readFloat(addr.add(0x4)) var z = Memory.readFloat(addr.add(0x8)) console.log(addr) console.log("pos: ", x, " ",y," ",z," ") }
// var GWorld = 0xAFAC398 // var GName = 0xADF07C0 // var GUObject = 0xAE34A98 var moduleBase; varGWorld; varGWorld_Offset = 0xAFAC398; varGName; varGName_Offset = 0xADF07C0; varGObjects; varGObjects_Offset = 0xAE34A98;
var offset_UObject_InternalIndex = 0xC; var offset_UObject_ClassPrivate = 0x10; var offset_UObject_FNameIndex = 0x18; var offset_UObject_OuterPrivate = 0x20;
functionchange_collide() { var wall1 = GetAddr("BigWall") var wall2 = GetAddr("BigWall2") var func = moduleBase.add(0x88A4884) var set_collide = newNativeFunction(func, 'void', ['pointer', 'char']) set_collide(ptr(wall1),1) set_collide(ptr(wall2),1) console.log("changed") }
functionset_speed(speed) { var player = GetAddr("FirstPersonCharacter_C") var maxspeed = player.add(0x288).readPointer().add(0x18c) maxspeed.writeFloat(speed) // console.log("speed set to " ,speed) }
functionfix_bullet() { var addr = GetAddr("FirstPersonProjectile_C") var should_bunce = addr.add(0x228).readPointer().add(0xf4) should_bunce.writeU32(0) console.log("bunce fixed") var destory_addr = addr.readPointer().add(0x318).readPointer() var destory = newNativeFunction(destory_addr,'void',['pointer']) destory(addr) console.log("destoryed") }
functionfix_selfaim() { // var xaddr = moduleBase.add(0x670FEAC) // Memory.protect(xaddr,4,"rwx"); // xaddr.writeByteArray([0xE1,0x03,0x27,0x1E]); // var yaddr = xaddr.add(0x4) // Memory.protect(yaddr,4,"rwx") // yaddr.writeByteArray([0xE4,0x03,0x27,0x1E]); // var zaddr = yaddr.add(0x4) // Memory.protect(zaddr,4,"rwx") // zaddr.writeByteArray([0xE5,0x03,0x27,0x1E]); // console.log("fixed!") var addr = moduleBase.add(0x670F3F8) Memory.protect(addr,4,"rwx") addr.writeByteArray([0x1f,0x20,0x03,0xD5]) //NOP console.log("fixed") }
functionget_location(actor) { var addr = GetAddr(actor).add(0x130).readPointer().add(0x1d0) var x = Memory.readFloat(addr) var y = Memory.readFloat(addr.add(0x4)) var z = Memory.readFloat(addr.add(0x8)) console.log(addr) console.log("pos: ", x, " ",y," ",z," ") }
functionhook_spwanBullet() { var loc = moduleBase.add(0x8D2EB60); Interceptor.attach(loc, { onEnter: function(args) { console.log(this.context.X24.readByteArray(4)); } }); }