{"type": "func", "start": 4298324120, "end": 4298324288, "name": "GJRewardItem::getRewardObjectForType", "pseudocode": "// \n// GJRewardItem::getRewardObjectForType from 0x100333898 to 0x100333940 (168 bytes)\n// \n// 1 xrefs:\n// > GameStatsManager::preProcessReward @ 0x1003337ec\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nGJRewardObject *__fastcall GJRewardItem::getRewardObjectForType(GJRewardItem *a1, SpecialRewardItem a2)\n{\n  cocos2d::CCArray *m_rewardObjects; // x0\n  cocos2d::CCObject *v5; // x0\n  unsigned int v6; // w21\n  __int64 v7; // x0\n  GJRewardObject *v8; // x22\n\n  m_rewardObjects = a1->m_rewardObjects;\n  if ( !m_rewardObjects )\n  {\n    v5 = sub_10024A15C();\n    sub_10015C71C((__int64)a1, v5);\n    m_rewardObjects = a1->m_rewardObjects;\n  }\n  if ( (unsigned int)sub_10024A36C((__int64)m_rewardObjects) )\n  {\n    v6 = 0;\n    while ( 1 )\n    {\n      v7 = sub_10024A388((__int64)a1->m_rewardObjects, v6);\n      if ( *(_DWORD *)(v7 + 56) == a2 )\n        return (GJRewardObject *)v7;\n      if ( ++v6 >= (unsigned int)sub_10024A36C((__int64)a1->m_rewardObjects) )\n        goto LABEL_7;\n    }\n  }\n  else\n  {\nLABEL_7:\n    v8 = GJRewardObject::create(a2, 0, 0);\n    sub_10024A2D0((__int64)a1->m_rewardObjects);\n  }\n  return v8;\n}", "assembly": "; \n; GJRewardItem::getRewardObjectForType from 0x100333898 to 0x100333940 (168 bytes)\n; \n; 1 xrefs:\n; > GameStatsManager::preProcessReward @ 0x1003337ec\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x100333898\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x10033389c\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1003338a0\nADD             X29, SP, #0x20                                         ; +0xc, 0x1003338a4\nMOV             X20, X1                                                ; +0x10, 0x1003338a8\nMOV             X19, X0                                                ; +0x14, 0x1003338ac\nLDR             X0, [X0,#0x48]                                         ; +0x18, 0x1003338b0\nCBNZ            X0, loc_1003338CC                                      ; +0x1c, 0x1003338b4\nBL              sub_10024A15C                                          ; +0x20, 0x1003338b8\nMOV             X1, X0                                                 ; +0x24, 0x1003338bc\nMOV             X0, X19                                                ; +0x28, 0x1003338c0\nBL              sub_10015C71C                                          ; +0x2c, 0x1003338c4\nLDR             X0, [X19,#0x48]                                        ; +0x30, 0x1003338c8\nBL              sub_10024A36C                                          ; +0x34, 0x1003338cc\nCBZ             W0, loc_100333904                                      ; +0x38, 0x1003338d0\nMOV             W21, #0                                                ; +0x3c, 0x1003338d4\nLDR             X0, [X19,#0x48]                                        ; +0x40, 0x1003338d8\nMOV             X1, X21                                                ; +0x44, 0x1003338dc\nBL              sub_10024A388                                          ; +0x48, 0x1003338e0\nLDR             W8, [X0,#0x38]                                         ; +0x4c, 0x1003338e4\nCMP             W8, W20                                                ; +0x50, 0x1003338e8\nB.EQ            loc_100333928                                          ; +0x54, 0x1003338ec\nADD             W21, W21, #1                                           ; +0x58, 0x1003338f0\nLDR             X0, [X19,#0x48]                                        ; +0x5c, 0x1003338f4\nBL              sub_10024A36C                                          ; +0x60, 0x1003338f8\nCMP             W21, W0                                                ; +0x64, 0x1003338fc\nB.CC            loc_1003338D8                                          ; +0x68, 0x100333900\nMOV             X0, X20                                                ; +0x6c, 0x100333904\nMOV             W1, #0                                                 ; +0x70, 0x100333908\nMOV             W2, #0                                                 ; +0x74, 0x10033390c\nBL              GJRewardObject__create                                 ; +0x78, 0x100333910\nMOV             X22, X0                                                ; +0x7c, 0x100333914\nLDR             X0, [X19,#0x48]                                        ; +0x80, 0x100333918\nMOV             X1, X22                                                ; +0x84, 0x10033391c\nBL              sub_10024A2D0                                          ; +0x88, 0x100333920\nB               loc_10033392C                                          ; +0x8c, 0x100333924\nMOV             X22, X0                                                ; +0x90, 0x100333928\nMOV             X0, X22                                                ; +0x94, 0x10033392c\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x98, 0x100333930\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x9c, 0x100333934\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0xa0, 0x100333938\nRET                                                                    ; +0xa4, 0x10033393c", "xrefs": ["GameStatsManager::preProcessReward @ 0x1003337ec"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}