Advertisement
Guest User

QB shared.bin move code

a guest
Nov 15th, 2015
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import struct
  2.  
  3. with open('EBOOT.orig','rb') as f:
  4.     filedata = bytearray(f.read())
  5. pos = [0x1509b0, 0x1627c0]
  6. diff = 0x6c100 - 0x47e70
  7. for p in pos:
  8.     filedata[p:p+4] = struct.pack('<I', 0x6c100)
  9. pos = 0x15dc88
  10. for x in range(24):
  11.     val = struct.unpack('<I', filedata[pos:pos+4])[0] + diff
  12.     filedata[pos:pos+4] = struct.pack('<I',val)
  13.     pos += 12
  14.  
  15. with open('EBOOT.BIN','wb') as f:
  16.     f.write(filedata)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement