Crusader_Decomp/alarmhat_0x0A_pseudocode.txt

1704 lines
37 KiB
Text

{
"schema_version": "crusader-usecode-ir-v1-poc",
"source": {
"game_variant": "regret",
"flex_path": "USECODE/EUSECODE.FLX",
"extracted_root": "USECODE/EUSECODE_extracted",
"chunk_file": "USECODE/EUSECODE_extracted/chunks/chunk_321_table_2B98_off_010074_len_00025F.bin"
},
"class": {
"entry_index": 321,
"object_index": 1379,
"class_id": 1377,
"class_name": "ALARMHAT",
"raw_code_base_u32": 212,
"code_base_minus_one": 211,
"conservative_event_count": 32
},
"event": {
"slot": 10,
"event_name_hint": "equip",
"raw_event_entry_word": 395,
"raw_code_offset": 1,
"derived_body_start": 212,
"derived_body_end": 607,
"derived_body_length": 395,
"repeated_template_status": ""
},
"body": {
"end_reason": "debug_symbols_then_end",
"raw_body_sha1": "eecc2fcbdaa0454f7d8ab8d05bc9443324b654cd",
"unknown_trailing_bytes": "",
"decoded_op_count": 147,
"debug_symbol_offset": 355,
"debug_symbol_count": 4,
"field_tag_count": 0
},
"ops": [
{
"offset": 0,
"absolute_body_offset": 212,
"opcode": 90,
"mnemonic": "init",
"raw_bytes": "5a04",
"operands": {
"local_bytes": 4
}
},
{
"offset": 2,
"absolute_body_offset": 214,
"opcode": 92,
"mnemonic": "symbol_info",
"raw_bytes": "5c5e01414c41524d48415400",
"operands": {
"symbol_offset": 355,
"symbol": "ALARMHAT",
"trailing_zero": 0
}
},
{
"offset": 14,
"absolute_body_offset": 226,
"opcode": 11,
"mnemonic": "push_word_immediate",
"raw_bytes": "0b1102",
"operands": {
"value_u16": 529
}
},
{
"offset": 17,
"absolute_body_offset": 229,
"opcode": 64,
"mnemonic": "push_local_dword",
"raw_bytes": "4006",
"operands": {
"bp_offset": 6,
"target": "[BP+06h]"
}
},
{
"offset": 19,
"absolute_body_offset": 231,
"opcode": 76,
"mnemonic": "push_indirect",
"raw_bytes": "4c02",
"operands": {
"size": 2
}
},
{
"offset": 21,
"absolute_body_offset": 233,
"opcode": 119,
"mnemonic": "set_info",
"raw_bytes": "77",
"operands": {}
},
{
"offset": 22,
"absolute_body_offset": 234,
"opcode": 120,
"mnemonic": "process_exclude",
"raw_bytes": "78",
"operands": {}
},
{
"offset": 23,
"absolute_body_offset": 235,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b1100",
"operands": {
"line_number": 17
}
},
{
"offset": 26,
"absolute_body_offset": 238,
"opcode": 64,
"mnemonic": "push_local_dword",
"raw_bytes": "4006",
"operands": {
"bp_offset": 6,
"target": "[BP+06h]"
}
},
{
"offset": 28,
"absolute_body_offset": 240,
"opcode": 15,
"mnemonic": "call_intrinsic",
"raw_bytes": "0f040100",
"operands": {
"intrinsic_ordinal": 1,
"arg_bytes": 4,
"intrinsic_name_hint": "Item::getFrame(void)"
}
},
{
"offset": 32,
"absolute_body_offset": 244,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6efc",
"operands": {
"value_u8": 252
}
},
{
"offset": 34,
"absolute_body_offset": 246,
"opcode": 94,
"mnemonic": "push_retval_word",
"raw_bytes": "5e",
"operands": {}
},
{
"offset": 35,
"absolute_body_offset": 247,
"opcode": 81,
"mnemonic": "jne",
"raw_bytes": "515c00",
"operands": {
"relative_u16": 92,
"relative_signed": 92,
"target_offset": 130
}
},
{
"offset": 38,
"absolute_body_offset": 250,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "7424",
"operands": {
"value_u8": 36
}
},
{
"offset": 40,
"absolute_body_offset": 252,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "743d",
"operands": {
"value_u8": 61
}
},
{
"offset": 42,
"absolute_body_offset": 254,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "7440",
"operands": {
"value_u8": 64
}
},
{
"offset": 44,
"absolute_body_offset": 256,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b1500",
"operands": {
"line_number": 21
}
},
{
"offset": 47,
"absolute_body_offset": 259,
"opcode": 11,
"mnemonic": "push_word_immediate",
"raw_bytes": "0bd004",
"operands": {
"value_u16": 1232
}
},
{
"offset": 50,
"absolute_body_offset": 262,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "7425",
"operands": {
"value_u8": 37
}
},
{
"offset": 52,
"absolute_body_offset": 264,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a02",
"operands": {
"value_u8": 2,
"value_signed": 2
}
},
{
"offset": 54,
"absolute_body_offset": 266,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a20",
"operands": {
"value_u8": 32,
"value_signed": 32
}
},
{
"offset": 56,
"absolute_body_offset": 268,
"opcode": 30,
"mnemonic": "mul",
"raw_bytes": "1e",
"operands": {}
},
{
"offset": 57,
"absolute_body_offset": 269,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b1600",
"operands": {
"line_number": 22
}
},
{
"offset": 60,
"absolute_body_offset": 272,
"opcode": 64,
"mnemonic": "push_local_dword",
"raw_bytes": "4006",
"operands": {
"bp_offset": 6,
"target": "[BP+06h]"
}
},
{
"offset": 62,
"absolute_body_offset": 274,
"opcode": 76,
"mnemonic": "push_indirect",
"raw_bytes": "4c02",
"operands": {
"size": 2
}
},
{
"offset": 64,
"absolute_body_offset": 276,
"opcode": 112,
"mnemonic": "loop",
"raw_bytes": "70fe0602",
"operands": {
"current_var": 254,
"string_bytes": 6,
"loop_type": 2
}
},
{
"offset": 68,
"absolute_body_offset": 280,
"opcode": 81,
"mnemonic": "jne",
"raw_bytes": "513600",
"operands": {
"relative_u16": 54,
"relative_signed": 54,
"target_offset": 125
}
},
{
"offset": 71,
"absolute_body_offset": 283,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b1700",
"operands": {
"line_number": 23
}
},
{
"offset": 74,
"absolute_body_offset": 286,
"opcode": 75,
"mnemonic": "push_local_addr",
"raw_bytes": "4bfe",
"operands": {
"bp_offset": 254,
"target": "[BP-02h]"
}
},
{
"offset": 76,
"absolute_body_offset": 288,
"opcode": 15,
"mnemonic": "call_intrinsic",
"raw_bytes": "0f040100",
"operands": {
"intrinsic_ordinal": 1,
"arg_bytes": 4,
"intrinsic_name_hint": "Item::getFrame(void)"
}
},
{
"offset": 80,
"absolute_body_offset": 292,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6efc",
"operands": {
"value_u8": 252
}
},
{
"offset": 82,
"absolute_body_offset": 294,
"opcode": 94,
"mnemonic": "push_retval_word",
"raw_bytes": "5e",
"operands": {}
},
{
"offset": 83,
"absolute_body_offset": 295,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a00",
"operands": {
"value_u8": 0,
"value_signed": 0
}
},
{
"offset": 85,
"absolute_body_offset": 297,
"opcode": 36,
"mnemonic": "cmp",
"raw_bytes": "24",
"operands": {}
},
{
"offset": 86,
"absolute_body_offset": 298,
"opcode": 81,
"mnemonic": "jne",
"raw_bytes": "512000",
"operands": {
"relative_u16": 32,
"relative_signed": 32,
"target_offset": 121
}
},
{
"offset": 89,
"absolute_body_offset": 301,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b1900",
"operands": {
"line_number": 25
}
},
{
"offset": 92,
"absolute_body_offset": 304,
"opcode": 89,
"mnemonic": "push_pid",
"raw_bytes": "59",
"operands": {}
},
{
"offset": 93,
"absolute_body_offset": 305,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a17",
"operands": {
"value_u8": 23,
"value_signed": 23
}
},
{
"offset": 95,
"absolute_body_offset": 307,
"opcode": 75,
"mnemonic": "push_local_addr",
"raw_bytes": "4bfe",
"operands": {
"bp_offset": 254,
"target": "[BP-02h]"
}
},
{
"offset": 97,
"absolute_body_offset": 309,
"opcode": 15,
"mnemonic": "call_intrinsic",
"raw_bytes": "0f060600",
"operands": {
"intrinsic_ordinal": 6,
"arg_bytes": 6,
"intrinsic_name_hint": "Item::equip(sint16)"
}
},
{
"offset": 101,
"absolute_body_offset": 313,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6efa",
"operands": {
"value_u8": 250
}
},
{
"offset": 103,
"absolute_body_offset": 315,
"opcode": 94,
"mnemonic": "push_retval_word",
"raw_bytes": "5e",
"operands": {}
},
{
"offset": 104,
"absolute_body_offset": 316,
"opcode": 84,
"mnemonic": "implies",
"raw_bytes": "540101",
"operands": {
"arg0": 1,
"arg1": 1
}
},
{
"offset": 107,
"absolute_body_offset": 319,
"opcode": 18,
"mnemonic": "pop_temp",
"raw_bytes": "12",
"operands": {}
},
{
"offset": 108,
"absolute_body_offset": 320,
"opcode": 83,
"mnemonic": "suspend",
"raw_bytes": "53",
"operands": {}
},
{
"offset": 109,
"absolute_body_offset": 321,
"opcode": 92,
"mnemonic": "symbol_info",
"raw_bytes": "5cf300414c41524d48415400",
"operands": {
"symbol_offset": 355,
"symbol": "ALARMHAT",
"trailing_zero": 0
}
},
{
"offset": 121,
"absolute_body_offset": 333,
"opcode": 115,
"mnemonic": "loopnext",
"raw_bytes": "73",
"operands": {}
},
{
"offset": 122,
"absolute_body_offset": 334,
"opcode": 82,
"mnemonic": "jmp",
"raw_bytes": "52c7ff",
"operands": {
"relative_u16": 65479,
"relative_signed": -57,
"target_offset": 68
}
},
{
"offset": 125,
"absolute_body_offset": 337,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6ec6",
"operands": {
"value_u8": 198
}
},
{
"offset": 127,
"absolute_body_offset": 339,
"opcode": 82,
"mnemonic": "jmp",
"raw_bytes": "52dd00",
"operands": {
"relative_u16": 221,
"relative_signed": 221,
"target_offset": 351
}
},
{
"offset": 130,
"absolute_body_offset": 342,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b2200",
"operands": {
"line_number": 34
}
},
{
"offset": 133,
"absolute_body_offset": 345,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b2100",
"operands": {
"line_number": 33
}
},
{
"offset": 136,
"absolute_body_offset": 348,
"opcode": 64,
"mnemonic": "push_local_dword",
"raw_bytes": "4006",
"operands": {
"bp_offset": 6,
"target": "[BP+06h]"
}
},
{
"offset": 138,
"absolute_body_offset": 350,
"opcode": 15,
"mnemonic": "call_intrinsic",
"raw_bytes": "0f040700",
"operands": {
"intrinsic_ordinal": 7,
"arg_bytes": 4,
"intrinsic_name_hint": "Item::isEntirelyOnScreen()"
}
},
{
"offset": 142,
"absolute_body_offset": 354,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6efc",
"operands": {
"value_u8": 252
}
},
{
"offset": 144,
"absolute_body_offset": 356,
"opcode": 93,
"mnemonic": "push_retval_byte",
"raw_bytes": "5d",
"operands": {}
},
{
"offset": 145,
"absolute_body_offset": 357,
"opcode": 48,
"mnemonic": "not",
"raw_bytes": "30",
"operands": {}
},
{
"offset": 146,
"absolute_body_offset": 358,
"opcode": 81,
"mnemonic": "jne",
"raw_bytes": "51ca00",
"operands": {
"relative_u16": 202,
"relative_signed": 202,
"target_offset": 351
}
},
{
"offset": 149,
"absolute_body_offset": 361,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "7424",
"operands": {
"value_u8": 36
}
},
{
"offset": 151,
"absolute_body_offset": 363,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "743d",
"operands": {
"value_u8": 61
}
},
{
"offset": 153,
"absolute_body_offset": 365,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "743a",
"operands": {
"value_u8": 58
}
},
{
"offset": 155,
"absolute_body_offset": 367,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b2300",
"operands": {
"line_number": 35
}
},
{
"offset": 158,
"absolute_body_offset": 370,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a06",
"operands": {
"value_u8": 6,
"value_signed": 6
}
},
{
"offset": 160,
"absolute_body_offset": 372,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "7425",
"operands": {
"value_u8": 37
}
},
{
"offset": 162,
"absolute_body_offset": 374,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a08",
"operands": {
"value_u8": 8,
"value_signed": 8
}
},
{
"offset": 164,
"absolute_body_offset": 376,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a20",
"operands": {
"value_u8": 32,
"value_signed": 32
}
},
{
"offset": 166,
"absolute_body_offset": 378,
"opcode": 30,
"mnemonic": "mul",
"raw_bytes": "1e",
"operands": {}
},
{
"offset": 167,
"absolute_body_offset": 379,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b2400",
"operands": {
"line_number": 36
}
},
{
"offset": 170,
"absolute_body_offset": 382,
"opcode": 64,
"mnemonic": "push_local_dword",
"raw_bytes": "4006",
"operands": {
"bp_offset": 6,
"target": "[BP+06h]"
}
},
{
"offset": 172,
"absolute_body_offset": 384,
"opcode": 76,
"mnemonic": "push_indirect",
"raw_bytes": "4c02",
"operands": {
"size": 2
}
},
{
"offset": 174,
"absolute_body_offset": 386,
"opcode": 112,
"mnemonic": "loop",
"raw_bytes": "70fc0602",
"operands": {
"current_var": 252,
"string_bytes": 6,
"loop_type": 2
}
},
{
"offset": 178,
"absolute_body_offset": 390,
"opcode": 81,
"mnemonic": "jne",
"raw_bytes": "514f00",
"operands": {
"relative_u16": 79,
"relative_signed": 79,
"target_offset": 260
}
},
{
"offset": 181,
"absolute_body_offset": 393,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b2500",
"operands": {
"line_number": 37
}
},
{
"offset": 184,
"absolute_body_offset": 396,
"opcode": 75,
"mnemonic": "push_local_addr",
"raw_bytes": "4bfc",
"operands": {
"bp_offset": 252,
"target": "[BP-04h]"
}
},
{
"offset": 186,
"absolute_body_offset": 398,
"opcode": 15,
"mnemonic": "call_intrinsic",
"raw_bytes": "0f040800",
"operands": {
"intrinsic_ordinal": 8,
"arg_bytes": 4,
"intrinsic_name_hint": "Item::isNpc(void)"
}
},
{
"offset": 190,
"absolute_body_offset": 402,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6efc",
"operands": {
"value_u8": 252
}
},
{
"offset": 192,
"absolute_body_offset": 404,
"opcode": 93,
"mnemonic": "push_retval_byte",
"raw_bytes": "5d",
"operands": {}
},
{
"offset": 193,
"absolute_body_offset": 405,
"opcode": 81,
"mnemonic": "jne",
"raw_bytes": "513c00",
"operands": {
"relative_u16": 60,
"relative_signed": 60,
"target_offset": 256
}
},
{
"offset": 196,
"absolute_body_offset": 408,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b2800",
"operands": {
"line_number": 40
}
},
{
"offset": 199,
"absolute_body_offset": 411,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b2700",
"operands": {
"line_number": 39
}
},
{
"offset": 202,
"absolute_body_offset": 414,
"opcode": 75,
"mnemonic": "push_local_addr",
"raw_bytes": "4bfc",
"operands": {
"bp_offset": 252,
"target": "[BP-04h]"
}
},
{
"offset": 204,
"absolute_body_offset": 416,
"opcode": 15,
"mnemonic": "call_intrinsic",
"raw_bytes": "0f040900",
"operands": {
"intrinsic_ordinal": 9,
"arg_bytes": 4,
"intrinsic_name_hint": "Item::getZ(void)"
}
},
{
"offset": 208,
"absolute_body_offset": 420,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6efc",
"operands": {
"value_u8": 252
}
},
{
"offset": 210,
"absolute_body_offset": 422,
"opcode": 93,
"mnemonic": "push_retval_byte",
"raw_bytes": "5d",
"operands": {}
},
{
"offset": 211,
"absolute_body_offset": 423,
"opcode": 64,
"mnemonic": "push_local_dword",
"raw_bytes": "4006",
"operands": {
"bp_offset": 6,
"target": "[BP+06h]"
}
},
{
"offset": 213,
"absolute_body_offset": 425,
"opcode": 15,
"mnemonic": "call_intrinsic",
"raw_bytes": "0f040900",
"operands": {
"intrinsic_ordinal": 9,
"arg_bytes": 4,
"intrinsic_name_hint": "Item::getZ(void)"
}
},
{
"offset": 217,
"absolute_body_offset": 429,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6efc",
"operands": {
"value_u8": 252
}
},
{
"offset": 219,
"absolute_body_offset": 431,
"opcode": 93,
"mnemonic": "push_retval_byte",
"raw_bytes": "5d",
"operands": {}
},
{
"offset": 220,
"absolute_body_offset": 432,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a0a",
"operands": {
"value_u8": 10,
"value_signed": 10
}
},
{
"offset": 222,
"absolute_body_offset": 434,
"opcode": 28,
"mnemonic": "sub",
"raw_bytes": "1c",
"operands": {}
},
{
"offset": 223,
"absolute_body_offset": 435,
"opcode": 44,
"mnemonic": "gt",
"raw_bytes": "2c",
"operands": {}
},
{
"offset": 224,
"absolute_body_offset": 436,
"opcode": 75,
"mnemonic": "push_local_addr",
"raw_bytes": "4bfc",
"operands": {
"bp_offset": 252,
"target": "[BP-04h]"
}
},
{
"offset": 226,
"absolute_body_offset": 438,
"opcode": 15,
"mnemonic": "call_intrinsic",
"raw_bytes": "0f040900",
"operands": {
"intrinsic_ordinal": 9,
"arg_bytes": 4,
"intrinsic_name_hint": "Item::getZ(void)"
}
},
{
"offset": 230,
"absolute_body_offset": 442,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6efc",
"operands": {
"value_u8": 252
}
},
{
"offset": 232,
"absolute_body_offset": 444,
"opcode": 93,
"mnemonic": "push_retval_byte",
"raw_bytes": "5d",
"operands": {}
},
{
"offset": 233,
"absolute_body_offset": 445,
"opcode": 64,
"mnemonic": "push_local_dword",
"raw_bytes": "4006",
"operands": {
"bp_offset": 6,
"target": "[BP+06h]"
}
},
{
"offset": 235,
"absolute_body_offset": 447,
"opcode": 15,
"mnemonic": "call_intrinsic",
"raw_bytes": "0f040900",
"operands": {
"intrinsic_ordinal": 9,
"arg_bytes": 4,
"intrinsic_name_hint": "Item::getZ(void)"
}
},
{
"offset": 239,
"absolute_body_offset": 451,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6efc",
"operands": {
"value_u8": 252
}
},
{
"offset": 241,
"absolute_body_offset": 453,
"opcode": 93,
"mnemonic": "push_retval_byte",
"raw_bytes": "5d",
"operands": {}
},
{
"offset": 242,
"absolute_body_offset": 454,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a0a",
"operands": {
"value_u8": 10,
"value_signed": 10
}
},
{
"offset": 244,
"absolute_body_offset": 456,
"opcode": 20,
"mnemonic": "add",
"raw_bytes": "14",
"operands": {}
},
{
"offset": 245,
"absolute_body_offset": 457,
"opcode": 40,
"mnemonic": "lt",
"raw_bytes": "28",
"operands": {}
},
{
"offset": 246,
"absolute_body_offset": 458,
"opcode": 50,
"mnemonic": "and",
"raw_bytes": "32",
"operands": {}
},
{
"offset": 247,
"absolute_body_offset": 459,
"opcode": 81,
"mnemonic": "jne",
"raw_bytes": "510600",
"operands": {
"relative_u16": 6,
"relative_signed": 6,
"target_offset": 256
}
},
{
"offset": 250,
"absolute_body_offset": 462,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b2900",
"operands": {
"line_number": 41
}
},
{
"offset": 253,
"absolute_body_offset": 465,
"opcode": 82,
"mnemonic": "jmp",
"raw_bytes": "525f00",
"operands": {
"relative_u16": 95,
"relative_signed": 95,
"target_offset": 351
}
},
{
"offset": 256,
"absolute_body_offset": 468,
"opcode": 115,
"mnemonic": "loopnext",
"raw_bytes": "73",
"operands": {}
},
{
"offset": 257,
"absolute_body_offset": 469,
"opcode": 82,
"mnemonic": "jmp",
"raw_bytes": "52aeff",
"operands": {
"relative_u16": 65454,
"relative_signed": -82,
"target_offset": 178
}
},
{
"offset": 260,
"absolute_body_offset": 472,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6ec6",
"operands": {
"value_u8": 198
}
},
{
"offset": 262,
"absolute_body_offset": 474,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "7424",
"operands": {
"value_u8": 36
}
},
{
"offset": 264,
"absolute_body_offset": 476,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "743d",
"operands": {
"value_u8": 61
}
},
{
"offset": 266,
"absolute_body_offset": 478,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "7440",
"operands": {
"value_u8": 64
}
},
{
"offset": 268,
"absolute_body_offset": 480,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b2d00",
"operands": {
"line_number": 45
}
},
{
"offset": 271,
"absolute_body_offset": 483,
"opcode": 11,
"mnemonic": "push_word_immediate",
"raw_bytes": "0bd004",
"operands": {
"value_u16": 1232
}
},
{
"offset": 274,
"absolute_body_offset": 486,
"opcode": 116,
"mnemonic": "loopscr",
"raw_bytes": "7425",
"operands": {
"value_u8": 37
}
},
{
"offset": 276,
"absolute_body_offset": 488,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a02",
"operands": {
"value_u8": 2,
"value_signed": 2
}
},
{
"offset": 278,
"absolute_body_offset": 490,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a20",
"operands": {
"value_u8": 32,
"value_signed": 32
}
},
{
"offset": 280,
"absolute_body_offset": 492,
"opcode": 30,
"mnemonic": "mul",
"raw_bytes": "1e",
"operands": {}
},
{
"offset": 281,
"absolute_body_offset": 493,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b2e00",
"operands": {
"line_number": 46
}
},
{
"offset": 284,
"absolute_body_offset": 496,
"opcode": 64,
"mnemonic": "push_local_dword",
"raw_bytes": "4006",
"operands": {
"bp_offset": 6,
"target": "[BP+06h]"
}
},
{
"offset": 286,
"absolute_body_offset": 498,
"opcode": 76,
"mnemonic": "push_indirect",
"raw_bytes": "4c02",
"operands": {
"size": 2
}
},
{
"offset": 288,
"absolute_body_offset": 500,
"opcode": 112,
"mnemonic": "loop",
"raw_bytes": "70fe0602",
"operands": {
"current_var": 254,
"string_bytes": 6,
"loop_type": 2
}
},
{
"offset": 292,
"absolute_body_offset": 504,
"opcode": 81,
"mnemonic": "jne",
"raw_bytes": "513600",
"operands": {
"relative_u16": 54,
"relative_signed": 54,
"target_offset": 349
}
},
{
"offset": 295,
"absolute_body_offset": 507,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b2f00",
"operands": {
"line_number": 47
}
},
{
"offset": 298,
"absolute_body_offset": 510,
"opcode": 75,
"mnemonic": "push_local_addr",
"raw_bytes": "4bfe",
"operands": {
"bp_offset": 254,
"target": "[BP-02h]"
}
},
{
"offset": 300,
"absolute_body_offset": 512,
"opcode": 15,
"mnemonic": "call_intrinsic",
"raw_bytes": "0f040100",
"operands": {
"intrinsic_ordinal": 1,
"arg_bytes": 4,
"intrinsic_name_hint": "Item::getFrame(void)"
}
},
{
"offset": 304,
"absolute_body_offset": 516,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6efc",
"operands": {
"value_u8": 252
}
},
{
"offset": 306,
"absolute_body_offset": 518,
"opcode": 94,
"mnemonic": "push_retval_word",
"raw_bytes": "5e",
"operands": {}
},
{
"offset": 307,
"absolute_body_offset": 519,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a00",
"operands": {
"value_u8": 0,
"value_signed": 0
}
},
{
"offset": 309,
"absolute_body_offset": 521,
"opcode": 36,
"mnemonic": "cmp",
"raw_bytes": "24",
"operands": {}
},
{
"offset": 310,
"absolute_body_offset": 522,
"opcode": 81,
"mnemonic": "jne",
"raw_bytes": "512000",
"operands": {
"relative_u16": 32,
"relative_signed": 32,
"target_offset": 345
}
},
{
"offset": 313,
"absolute_body_offset": 525,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b3100",
"operands": {
"line_number": 49
}
},
{
"offset": 316,
"absolute_body_offset": 528,
"opcode": 89,
"mnemonic": "push_pid",
"raw_bytes": "59",
"operands": {}
},
{
"offset": 317,
"absolute_body_offset": 529,
"opcode": 10,
"mnemonic": "push_byte_immediate",
"raw_bytes": "0a15",
"operands": {
"value_u8": 21,
"value_signed": 21
}
},
{
"offset": 319,
"absolute_body_offset": 531,
"opcode": 75,
"mnemonic": "push_local_addr",
"raw_bytes": "4bfe",
"operands": {
"bp_offset": 254,
"target": "[BP-02h]"
}
},
{
"offset": 321,
"absolute_body_offset": 533,
"opcode": 15,
"mnemonic": "call_intrinsic",
"raw_bytes": "0f060600",
"operands": {
"intrinsic_ordinal": 6,
"arg_bytes": 6,
"intrinsic_name_hint": "Item::equip(sint16)"
}
},
{
"offset": 325,
"absolute_body_offset": 537,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6efa",
"operands": {
"value_u8": 250
}
},
{
"offset": 327,
"absolute_body_offset": 539,
"opcode": 94,
"mnemonic": "push_retval_word",
"raw_bytes": "5e",
"operands": {}
},
{
"offset": 328,
"absolute_body_offset": 540,
"opcode": 84,
"mnemonic": "implies",
"raw_bytes": "540101",
"operands": {
"arg0": 1,
"arg1": 1
}
},
{
"offset": 331,
"absolute_body_offset": 543,
"opcode": 18,
"mnemonic": "pop_temp",
"raw_bytes": "12",
"operands": {}
},
{
"offset": 332,
"absolute_body_offset": 544,
"opcode": 83,
"mnemonic": "suspend",
"raw_bytes": "53",
"operands": {}
},
{
"offset": 333,
"absolute_body_offset": 545,
"opcode": 92,
"mnemonic": "symbol_info",
"raw_bytes": "5c1300414c41524d48415400",
"operands": {
"symbol_offset": 355,
"symbol": "ALARMHAT",
"trailing_zero": 0
}
},
{
"offset": 345,
"absolute_body_offset": 557,
"opcode": 115,
"mnemonic": "loopnext",
"raw_bytes": "73",
"operands": {}
},
{
"offset": 346,
"absolute_body_offset": 558,
"opcode": 82,
"mnemonic": "jmp",
"raw_bytes": "52c7ff",
"operands": {
"relative_u16": 65479,
"relative_signed": -57,
"target_offset": 292
}
},
{
"offset": 349,
"absolute_body_offset": 561,
"opcode": 110,
"mnemonic": "add_sp",
"raw_bytes": "6ec6",
"operands": {
"value_u8": 198
}
},
{
"offset": 351,
"absolute_body_offset": 563,
"opcode": 91,
"mnemonic": "line_number",
"raw_bytes": "5b3600",
"operands": {
"line_number": 54
}
},
{
"offset": 354,
"absolute_body_offset": 566,
"opcode": 80,
"mnemonic": "ret",
"raw_bytes": "50",
"operands": {}
}
],
"debug_symbols": [
{
"index": 0,
"unknown1": 1,
"type_id": 105,
"type_char": "i",
"bp_offset": 0,
"bp_repr": "[BP+00h]",
"unknown3": 0,
"name": "referent"
},
{
"index": 1,
"unknown1": 0,
"type_id": 105,
"type_char": "i",
"bp_offset": 10,
"bp_repr": "[BP+0Ah]",
"unknown3": 0,
"name": "var"
},
{
"index": 2,
"unknown1": 0,
"type_id": 36,
"type_char": "$",
"bp_offset": 254,
"bp_repr": "[BP-02h]",
"unknown3": 2,
"name": "item"
},
{
"index": 3,
"unknown1": 0,
"type_id": 36,
"type_char": "$",
"bp_offset": 252,
"bp_repr": "[BP-04h]",
"unknown3": 2,
"name": "npc"
}
],
"field_tags": [],
"annotation_hints": {
"runtime_family": "slot-backed-owner-loaded-body",
"payload_shape_hint": "word",
"compiled_anchors": [
{
"address": "000d:46ec",
"role": "context_create_from_slot"
},
{
"address": "000d:0988",
"role": "referent_chain_mutator"
},
{
"address": "000d:177c",
"role": "push_frame_word_literal"
},
{
"address": "000d:1acb",
"role": "compare_stream_dword_and_push_bool"
},
{
"address": "000d:208b",
"role": "materialize_or_forward_value"
},
{
"address": "000d:21ed",
"role": "prepend_inline_payload"
},
{
"address": "000d:22bc",
"role": "matrix_pushback_stage"
},
{
"address": "000d:2104",
"role": "finalize_to_outptr"
},
{
"address": "000d:ebe3",
"role": "opcode_sequence_run"
}
],
"runtime_stage_hints": [
{
"stage_address": "000d:177c",
"ir_name": "PUSH_FRAME_WORD_LITERAL",
"opcode_or_lane": "same FUN_000d_ebe3 sequencer family",
"payload_shape": "word scalar pushed to stream stack",
"evidence": "000d:177c subtracts 2 from [context+0xcc] and stores frame-local word before entity_vm_opcode_finish"
},
{
"stage_address": "000d:1acb",
"ir_name": "COMPARE_STREAM_DWORD_AND_PUSH_BOOL",
"opcode_or_lane": "same FUN_000d_ebe3 sequencer family",
"payload_shape": "stream dword pair consumed, predicate word emitted",
"evidence": "000d:1acb reads one 32-bit pair from stream, compares against AX:DX, pushes boolean word result"
},
{
"stage_address": "000d:21ed",
"ir_name": "PREPEND_INLINE_PAYLOAD",
"opcode_or_lane": "inline payload substage",
"payload_shape": "caller-owned blob copied into context +0x102 buffer",
"evidence": "000d:21ed prepends caller bytes into backward-growing context buffer before metadata-driven follow-on work"
},
{
"stage_address": "000d:22bc",
"ir_name": "BUILD_ENTITY_LINK_MATRIX",
"opcode_or_lane": "inline payload follow-on stage",
"payload_shape": "two signed metadata bytes plus streamed entity/link ids",
"evidence": "000d:22bc consumes two signed bytes from +0xd6/+0xd8 and streamed words for repeated entity_link calls"
},
{
"stage_address": "000d:22bc",
"ir_name": "EMIT_OR_PUSHBACK_RESULT",
"opcode_or_lane": "inline payload follow-on stage",
"payload_shape": "stream writeback filter",
"evidence": "000d:23da..2421 pushes back only results without 0x0400 list flag before opcode finish"
},
{
"stage_address": "000d:2104",
"ir_name": "FINALIZE_MIXED_VALUE_TO_OUTPTR",
"opcode_or_lane": "same FUN_000d_ebe3 sequencer family",
"payload_shape": "mixed immediate/object scalar return",
"evidence": "000d:2104 writes either frame-local dword or object word with high word cleared to caller out-ptr"
}
],
"slot_taxonomy": {
"slot": 10,
"event_name_hint": "equip"
}
}
}
function alarmhat_equip() /* entry=321 class_id=0x0561 slot=0x0A */
{
var
referent, /* [BP+00h] type=0x69 */
var, /* [BP+0Ah] type=0x69 */
item, /* [BP-02h] type=0x24 */
npc; /* [BP-04h] type=0x24 */
set_info(0x0211, *(arg_06));
process_exclude();
if (!Item.getFrame(arg_06)) {
for item in nearby_items(shape=0x04D0, origin=arg_06) {
if (Item.getFrame(item) == 0) {
suspend;
}
/* loopnext */
}
return;
}
else if (Item.isEntirelyOnScreen(arg_06)) {
for npc in nearby_items(family=6, origin=arg_06) {
if (!Item.isNpc(npc)) {
if ((Item.getZ(npc) > (Item.getZ(arg_06) - 10)) && (Item.getZ(npc) >= (Item.getZ(arg_06) + 10))) {
return;
}
}
/* loopnext */
}
for item in nearby_items(shape=0x04D0, origin=arg_06) {
if (Item.getFrame(item) == 0) {
suspend;
}
/* loopnext */
}
}
return;
}