{"type": "func", "start": 4298971492, "end": 4298971660, "name": "GJRewardItem::getRewardObjectForType", "pseudocode": "// \n// GJRewardItem::getRewardObjectForType from 0x1003d1964 to 0x1003d1a0c (168 bytes)\n// \n// 1 xrefs:\n// > sub_1003D1760 @ 0x1003d18b8\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:04:11 +0000\n// \n\n_DWORD *__fastcall GJRewardItem::getRewardObjectForType(__int64 a1, int a2)\n{\n  __int64 v4; // x0\n  _QWORD *v5; // x0\n  unsigned int v6; // w21\n  __int64 v7; // x0\n  _DWORD *v8; // x22\n\n  v4 = *(_QWORD *)(a1 + 72);\n  if ( !v4 )\n  {\n    v5 = sub_1002E736C();\n    sub_1001E3D38(a1, (__int64)v5);\n    v4 = *(_QWORD *)(a1 + 72);\n  }\n  if ( (unsigned int)sub_1002E757C(v4) )\n  {\n    v6 = 0;\n    while ( 1 )\n    {\n      v7 = sub_1002E75A0(*(_QWORD *)(a1 + 72), v6);\n      if ( *(_DWORD *)(v7 + 56) == a2 )\n        return (_DWORD *)v7;\n      if ( ++v6 >= (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 72)) )\n        goto LABEL_7;\n    }\n  }\n  else\n  {\nLABEL_7:\n    v8 = GJRewardObject::create(a2, 0, 0);\n    sub_1002E74E0(*(_QWORD *)(a1 + 72));\n  }\n  return v8;\n}", "assembly": "; \n; GJRewardItem::getRewardObjectForType from 0x1003d1964 to 0x1003d1a0c (168 bytes)\n; \n; 1 xrefs:\n; > sub_1003D1760 @ 0x1003d18b8\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:04:11 +0000\n; \nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1003d1964\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1003d1968\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1003d196c\nADD             X29, SP, #0x20                                         ; +0xc, 0x1003d1970\nMOV             X20, X1                                                ; +0x10, 0x1003d1974\nMOV             X19, X0                                                ; +0x14, 0x1003d1978\nLDR             X0, [X0,#0x48]                                         ; +0x18, 0x1003d197c\nCBNZ            X0, loc_1003D1998                                      ; +0x1c, 0x1003d1980\nBL              sub_1002E736C                                          ; +0x20, 0x1003d1984\nMOV             X1, X0                                                 ; +0x24, 0x1003d1988\nMOV             X0, X19                                                ; +0x28, 0x1003d198c\nBL              sub_1001E3D38                                          ; +0x2c, 0x1003d1990\nLDR             X0, [X19,#0x48]                                        ; +0x30, 0x1003d1994\nBL              sub_1002E757C                                          ; +0x34, 0x1003d1998\nCBZ             W0, loc_1003D19D0                                      ; +0x38, 0x1003d199c\nMOV             W21, #0                                                ; +0x3c, 0x1003d19a0\nLDR             X0, [X19,#0x48]                                        ; +0x40, 0x1003d19a4\nMOV             X1, X21                                                ; +0x44, 0x1003d19a8\nBL              sub_1002E75A0                                          ; +0x48, 0x1003d19ac\nLDR             W8, [X0,#0x38]                                         ; +0x4c, 0x1003d19b0\nCMP             W8, W20                                                ; +0x50, 0x1003d19b4\nB.EQ            loc_1003D19F4                                          ; +0x54, 0x1003d19b8\nADD             W21, W21, #1                                           ; +0x58, 0x1003d19bc\nLDR             X0, [X19,#0x48]                                        ; +0x5c, 0x1003d19c0\nBL              sub_1002E757C                                          ; +0x60, 0x1003d19c4\nCMP             W21, W0                                                ; +0x64, 0x1003d19c8\nB.CC            loc_1003D19A4                                          ; +0x68, 0x1003d19cc\nMOV             X0, X20                                                ; +0x6c, 0x1003d19d0\nMOV             W1, #0                                                 ; +0x70, 0x1003d19d4\nMOV             W2, #0                                                 ; +0x74, 0x1003d19d8\nBL              GJRewardObject__create                                 ; +0x78, 0x1003d19dc\nMOV             X22, X0                                                ; +0x7c, 0x1003d19e0\nLDR             X0, [X19,#0x48]                                        ; +0x80, 0x1003d19e4\nMOV             X1, X22                                                ; +0x84, 0x1003d19e8\nBL              sub_1002E74E0                                          ; +0x88, 0x1003d19ec\nB               loc_1003D19F8                                          ; +0x8c, 0x1003d19f0\nMOV             X22, X0                                                ; +0x90, 0x1003d19f4\nMOV             X0, X22                                                ; +0x94, 0x1003d19f8\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x98, 0x1003d19fc\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x9c, 0x1003d1a00\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0xa0, 0x1003d1a04\nRET                                                                    ; +0xa4, 0x1003d1a08", "xrefs": ["sub_1003D1760 @ 0x1003d18b8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}