- Introduced a new command 'annotate-usecode' to import USECODE IR JSON annotation hints as Ghidra comments on compiled anchors. - Added argument parsing for multiple IR JSON files, comment type selection, and a dry-run option. - Implemented logic to read annotation records from the provided IR files and set comments on the corresponding addresses in Ghidra. - Enhanced JSON schema to include response structure for the new command.
117 lines
6.5 KiB
Text
117 lines
6.5 KiB
Text
Class NPCTRIG entry=191 class_id=0x363
|
|
Slot 0x0A hint=equip body=0x00DA..0x024F
|
|
End reason: unknown_opcode ops=111 sha1=98524ea452eae2723f4b27e630c33a920c16def7
|
|
|
|
00DA: 5A init local_bytes=0x6 raw=5a06
|
|
00DC: 5C symbol_info symbol_offset=0x143 symbol=NPCTRIG trailing_zero=0x0 raw=5c3e014e5043545249470000
|
|
00E8: 0B push_word_immediate value_u16=0x211 raw=0b1102
|
|
00EB: 40 push_local_dword bp_offset=0x6 target=[BP+06h] raw=4006
|
|
00ED: 4C push_indirect size=0x2 raw=4c02
|
|
00EF: 77 set_info raw=77
|
|
00F0: 78 process_exclude raw=78
|
|
00F1: 5B line_number line_number=0x20 raw=5b2000
|
|
00F4: 5B line_number line_number=0x1F raw=5b1f00
|
|
00F7: 40 push_local_dword bp_offset=0x6 target=[BP+06h] raw=4006
|
|
00F9: 0F call_intrinsic arg_bytes=0x4 intrinsic_ordinal=0x4 intrinsic_name_hint=Item::getStatus(void) raw=0f040400
|
|
00FD: 6E add_sp value_u8=0xFC raw=6efc
|
|
00FF: 5E push_retval_word raw=5e
|
|
0100: 5B line_number line_number=0x20 raw=5b2000
|
|
0103: 0B push_word_immediate value_u16=0x1000 raw=0b0010
|
|
0106: 39 bit_and raw=39
|
|
0107: 51 jne relative_u16=0x6 relative_signed=0x6 target_offset=0x36 raw=510600
|
|
010A: 5B line_number line_number=0x21 raw=5b2100
|
|
010D: 52 jmp relative_u16=0x109 relative_signed=0x109 target_offset=0x13F raw=520901
|
|
0110: 5B line_number line_number=0x24 raw=5b2400
|
|
0113: 0B push_word_immediate value_u16=0x1000 raw=0b0010
|
|
0116: 40 push_local_dword bp_offset=0x6 target=[BP+06h] raw=4006
|
|
0118: 11 call_class_event target_class_id=0xA1E target_event_slot=0x23 target_event_name_hint=None raw=111e0a2300
|
|
011D: 6E add_sp value_u8=0xFA raw=6efa
|
|
011F: 3F push_local_word bp_offset=0xA target=[BP+0Ah] raw=3f0a
|
|
0121: 0A push_byte_immediate value_u8=0x1 value_signed=0x1 raw=0a01
|
|
0123: 24 cmp raw=24
|
|
0124: 51 jne relative_u16=0x27 relative_signed=0x27 target_offset=0x74 raw=512700
|
|
0127: 5B line_number line_number=0x2C raw=5b2c00
|
|
012A: 59 push_pid raw=59
|
|
012B: 0B push_word_immediate value_u16=0x2FD raw=0bfd02
|
|
012E: 40 push_local_dword bp_offset=0x6 target=[BP+06h] raw=4006
|
|
0130: 57 spawn arg_bytes=0x2 this_size=0x2 target_class_id=0x363 target_event_slot=0x20 target_event_name_hint=None raw=57020263032000
|
|
0137: 6E add_sp value_u8=0xFE raw=6efe
|
|
0139: 5E push_retval_word raw=5e
|
|
013A: 54 implies arg0=0x1 arg1=0x1 raw=540101
|
|
013D: 12 pop_temp raw=12
|
|
013E: 53 suspend raw=53
|
|
013F: 5C symbol_info symbol_offset=0x143 symbol=NPCTRIG trailing_zero=0x0 raw=5cdb004e5043545249470000
|
|
014B: 52 jmp relative_u16=0xBC relative_signed=0xBC target_offset=0x130 raw=52bc00
|
|
014E: 3F push_local_word bp_offset=0xA target=[BP+0Ah] raw=3f0a
|
|
0150: 0A push_byte_immediate value_u8=0x2 value_signed=0x2 raw=0a02
|
|
0152: 24 cmp raw=24
|
|
0153: 51 jne relative_u16=0x27 relative_signed=0x27 target_offset=0xA3 raw=512700
|
|
0156: 5B line_number line_number=0x31 raw=5b3100
|
|
0159: 59 push_pid raw=59
|
|
015A: 0B push_word_immediate value_u16=0x384 raw=0b8403
|
|
015D: 40 push_local_dword bp_offset=0x6 target=[BP+06h] raw=4006
|
|
015F: 57 spawn arg_bytes=0x2 this_size=0x2 target_class_id=0x363 target_event_slot=0x20 target_event_name_hint=None raw=57020263032000
|
|
0166: 6E add_sp value_u8=0xFE raw=6efe
|
|
0168: 5E push_retval_word raw=5e
|
|
0169: 54 implies arg0=0x1 arg1=0x1 raw=540101
|
|
016C: 12 pop_temp raw=12
|
|
016D: 53 suspend raw=53
|
|
016E: 5C symbol_info symbol_offset=0x143 symbol=NPCTRIG trailing_zero=0x0 raw=5cac004e5043545249470000
|
|
017A: 52 jmp relative_u16=0x8D relative_signed=0x8D target_offset=0x130 raw=528d00
|
|
017D: 3F push_local_word bp_offset=0xA target=[BP+0Ah] raw=3f0a
|
|
017F: 0A push_byte_immediate value_u8=0x3 value_signed=0x3 raw=0a03
|
|
0181: 24 cmp raw=24
|
|
0182: 51 jne relative_u16=0x27 relative_signed=0x27 target_offset=0xD2 raw=512700
|
|
0185: 5B line_number line_number=0x36 raw=5b3600
|
|
0188: 59 push_pid raw=59
|
|
0189: 0B push_word_immediate value_u16=0x371 raw=0b7103
|
|
018C: 40 push_local_dword bp_offset=0x6 target=[BP+06h] raw=4006
|
|
018E: 57 spawn arg_bytes=0x2 this_size=0x2 target_class_id=0x363 target_event_slot=0x20 target_event_name_hint=None raw=57020263032000
|
|
0195: 6E add_sp value_u8=0xFE raw=6efe
|
|
0197: 5E push_retval_word raw=5e
|
|
0198: 54 implies arg0=0x1 arg1=0x1 raw=540101
|
|
019B: 12 pop_temp raw=12
|
|
019C: 53 suspend raw=53
|
|
019D: 5C symbol_info symbol_offset=0x143 symbol=NPCTRIG trailing_zero=0x0 raw=5c7d004e5043545249470000
|
|
01A9: 52 jmp relative_u16=0x5E relative_signed=0x5E target_offset=0x130 raw=525e00
|
|
01AC: 3F push_local_word bp_offset=0xA target=[BP+0Ah] raw=3f0a
|
|
01AE: 0A push_byte_immediate value_u8=0x4 value_signed=0x4 raw=0a04
|
|
01B0: 24 cmp raw=24
|
|
01B1: 51 jne relative_u16=0x27 relative_signed=0x27 target_offset=0x101 raw=512700
|
|
01B4: 5B line_number line_number=0x3B raw=5b3b00
|
|
01B7: 59 push_pid raw=59
|
|
01B8: 0B push_word_immediate value_u16=0x4D1 raw=0bd104
|
|
01BB: 40 push_local_dword bp_offset=0x6 target=[BP+06h] raw=4006
|
|
01BD: 57 spawn arg_bytes=0x2 this_size=0x2 target_class_id=0x363 target_event_slot=0x20 target_event_name_hint=None raw=57020263032000
|
|
01C4: 6E add_sp value_u8=0xFE raw=6efe
|
|
01C6: 5E push_retval_word raw=5e
|
|
01C7: 54 implies arg0=0x1 arg1=0x1 raw=540101
|
|
01CA: 12 pop_temp raw=12
|
|
01CB: 53 suspend raw=53
|
|
01CC: 5C symbol_info symbol_offset=0x143 symbol=NPCTRIG trailing_zero=0x0 raw=5c4e004e5043545249470000
|
|
01D8: 52 jmp relative_u16=0x2F relative_signed=0x2F target_offset=0x130 raw=522f00
|
|
01DB: 3F push_local_word bp_offset=0xA target=[BP+0Ah] raw=3f0a
|
|
01DD: 0A push_byte_immediate value_u8=0x5 value_signed=0x5 raw=0a05
|
|
01DF: 24 cmp raw=24
|
|
01E0: 51 jne relative_u16=0x27 relative_signed=0x27 target_offset=0x130 raw=512700
|
|
01E3: 5B line_number line_number=0x40 raw=5b4000
|
|
01E6: 59 push_pid raw=59
|
|
01E7: 0B push_word_immediate value_u16=0x1B4 raw=0bb401
|
|
01EA: 40 push_local_dword bp_offset=0x6 target=[BP+06h] raw=4006
|
|
01EC: 57 spawn arg_bytes=0x2 this_size=0x2 target_class_id=0x363 target_event_slot=0x20 target_event_name_hint=None raw=57020263032000
|
|
01F3: 6E add_sp value_u8=0xFE raw=6efe
|
|
01F5: 5E push_retval_word raw=5e
|
|
01F6: 54 implies arg0=0x1 arg1=0x1 raw=540101
|
|
01F9: 12 pop_temp raw=12
|
|
01FA: 53 suspend raw=53
|
|
01FB: 5C symbol_info symbol_offset=0x143 symbol=NPCTRIG trailing_zero=0x0 raw=5c1f004e5043545249470000
|
|
0207: 52 jmp relative_u16=0x0 relative_signed=0x0 target_offset=0x130 raw=520000
|
|
020A: 5B line_number line_number=0x45 raw=5b4500
|
|
020D: 0B push_word_immediate value_u16=0x1000 raw=0b0010
|
|
0210: 40 push_local_dword bp_offset=0x6 target=[BP+06h] raw=4006
|
|
0212: 11 call_class_event target_class_id=0xA1E target_event_slot=0x24 target_event_name_hint=None raw=111e0a2400
|
|
0217: 6E add_sp value_u8=0xFA raw=6efa
|
|
0219: 5B line_number line_number=0x47 raw=5b4700
|
|
021C: 50 ret raw=50
|
|
|
|
unknown_trailing_bytes=05016900007265666572656e740000690a006576656e74000024fe026974656d000024fc026974656d32000024fa026e007a
|