INNER CODE UNIT · JavaScript
parseMachO
hackcatml/frida-flutterproxy · script.js:576
function parseMachO(base) {
base = ptr(base)
var magic = base.readU32();
var is64bit = false;
if (magic == 0xfeedfacf) {
is64bit = true;
var number_of_commands_offset = 0x10
var command_size_offset = 0x4
var segment_name_offset = 0x8
var vm_address_offset = 0x18
var vm_size_offset = 0x20
var file_offset = 0x28
var number_of_sections_offset = 0x40
var section64_header_base_offset = 0x48
var section64_header_size = 0x50
} else {
console.log('Unknown magic:' + magic);
}