{"type": "func", "start": 4296973412, "end": 4296973784, "name": "GJBaseGameLayer::processItems", "pseudocode": "// \n// GJBaseGameLayer::processItems from 0x1001e9c64 to 0x1001e9dd8 (372 bytes)\n// \n// 1 xrefs:\n// > PlayLayer::levelComplete @ 0x10011a03c\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\nvoid __fastcall GJBaseGameLayer::processItems(GJBaseGameLayer *a1)\n{\n  cocos2d::CCArray *v2; // x20\n  __int64 v3; // x21\n  cocos2d::CCString *v4; // x0\n  char *CString; // x0\n  cocos2d::CCDictionary *m_collectedItems; // x24\n  int *v7; // x24\n  int v8; // w0\n  const char *v9; // x24\n  GJGameLevel *m_level; // x8\n  int random; // w25\n  int seed; // w26\n  GameStatsManager *v13; // x0\n  GameStatsManager *v14; // x0\n  const char *CoinKey; // x24\n  GameStatsManager *v16; // x0\n  GameStatsManager *v17; // x0\n  GameStatsManager *v18; // x0\n  const char *v19; // x1\n  GameStatsManager *v20; // x0\n  void *__p[2]; // [xsp+8h] [xbp-58h] BYREF\n  char v22; // [xsp+1Fh] [xbp-41h]\n\n  v2 = cocos2d::CCDictionary::allKeys(a1->m_collectedItems);\n  if ( (unsigned int)sub_10024A36C(v2) )\n  {\n    v3 = 0;\n    do\n    {\n      v4 = (cocos2d::CCString *)sub_10024A388(v2, v3);\n      CString = (char *)cocos2d::CCString::getCString(v4);\n      m_collectedItems = a1->m_collectedItems;\n      sub_100009900(__p, CString);\n      v7 = (int *)cocos2d::CCDictionary::objectForKey_1(m_collectedItems, __p);\n      if ( v22 < 0 )\n        operator delete(__p[0]);\n      v8 = (*(__int64 (__fastcall **)(int *))(*(_QWORD *)v7 + 1784LL))(v7);\n      if ( v8 == 22 )\n      {\n        CoinKey = GJGameLevel::getCoinKey(a1->m_level, v7[448]);\n        v16 = GameStatsManager::sharedState();\n        if ( !GameStatsManager::hasSecretCoin(v16, CoinKey) )\n        {\n          v17 = GameStatsManager::sharedState();\n          GameStatsManager::storeSecretCoin(v17, CoinKey);\n          v18 = GameStatsManager::sharedState();\n          v19 = \"8\";\nLABEL_14:\n          GameStatsManager::incrementStat_1(v18, v19);\n        }\n      }\n      else if ( v8 == 31 )\n      {\n        v9 = GJGameLevel::getCoinKey(a1->m_level, v7[448]);\n        m_level = a1->m_level;\n        random = m_level->m_coinsVerified.random;\n        seed = m_level->m_coinsVerified.seed;\n        v13 = GameStatsManager::sharedState();\n        if ( random == seed )\n        {\n          if ( !GameStatsManager::hasPendingUserCoin(v13, v9) )\n          {\n            v14 = GameStatsManager::sharedState();\n            GameStatsManager::storePendingUserCoin(v14, v9);\n          }\n          goto LABEL_15;\n        }\n        if ( !GameStatsManager::hasUserCoin(v13, v9) )\n        {\n          v20 = GameStatsManager::sharedState();\n          GameStatsManager::storeUserCoin(v20, v9);\n          v18 = GameStatsManager::sharedState();\n          v19 = \"12\";\n          goto LABEL_14;\n        }\n      }\nLABEL_15:\n      v3 = (unsigned int)(v3 + 1);\n    }\n    while ( (unsigned int)v3 < (unsigned int)sub_10024A36C(v2) );\n  }\n}", "assembly": "; \n; GJBaseGameLayer::processItems from 0x1001e9c64 to 0x1001e9dd8 (372 bytes)\n; \n; 1 xrefs:\n; > PlayLayer::levelComplete @ 0x10011a03c\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\nSUB             SP, SP, #0x70                                          ; +0x0, 0x1001e9c64\nSTP             X26, X25, [SP,#0x60+var_40]                            ; +0x4, 0x1001e9c68\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x8, 0x1001e9c6c\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0xc, 0x1001e9c70\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x10, 0x1001e9c74\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x14, 0x1001e9c78\nADD             X29, SP, #0x60                                         ; +0x18, 0x1001e9c7c\nMOV             X19, X0                                                ; +0x1c, 0x1001e9c80\nLDR             X0, [X0,#0x30A8]                                       ; +0x20, 0x1001e9c84\nBL              cocos2d__CCDictionary__allKeys                         ; +0x24, 0x1001e9c88\nMOV             X20, X0                                                ; +0x28, 0x1001e9c8c\nBL              sub_10024A36C                                          ; +0x2c, 0x1001e9c90\nCBZ             W0, loc_1001E9DBC                                      ; +0x30, 0x1001e9c94\nMOV             W21, #0                                                ; +0x34, 0x1001e9c98\nADRL            X22, a8; \"8\"                                           ; +0x38, 0x1001e9c9c\nADRL            X23, a12; \"12\"                                         ; +0x40, 0x1001e9ca4\nMOV             X0, X20                                                ; +0x48, 0x1001e9cac\nMOV             X1, X21                                                ; +0x4c, 0x1001e9cb0\nBL              sub_10024A388                                          ; +0x50, 0x1001e9cb4\nBL              cocos2d__CCString__getCString                          ; +0x54, 0x1001e9cb8\nMOV             X1, X0; __s                                            ; +0x58, 0x1001e9cbc\nLDR             X24, [X19,#0x30A8]                                     ; +0x5c, 0x1001e9cc0\nADD             X0, SP, #0x60+__p; int                                 ; +0x60, 0x1001e9cc4\nBL              sub_100009900                                          ; +0x64, 0x1001e9cc8\nADD             X1, SP, #0x60+__p                                      ; +0x68, 0x1001e9ccc\nMOV             X0, X24                                                ; +0x6c, 0x1001e9cd0\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0x70, 0x1001e9cd4\nMOV             X24, X0                                                ; +0x74, 0x1001e9cd8\nLDRSB           W8, [SP,#0x60+var_41]                                  ; +0x78, 0x1001e9cdc\nTBZ             W8, #0x1F, loc_1001E9CEC                               ; +0x7c, 0x1001e9ce0\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x80, 0x1001e9ce4\nBL              __ZdlPv; operator delete(void *)                       ; +0x84, 0x1001e9ce8\nLDR             X8, [X24]                                              ; +0x88, 0x1001e9cec\nLDR             X8, [X8,#0x6F8]                                        ; +0x8c, 0x1001e9cf0\nMOV             X0, X24                                                ; +0x90, 0x1001e9cf4\nBLR             X8                                                     ; +0x94, 0x1001e9cf8\nCMP             W0, #0x16                                              ; +0x98, 0x1001e9cfc\nB.EQ            loc_1001E9D50                                          ; +0x9c, 0x1001e9d00\nCMP             W0, #0x1F                                              ; +0xa0, 0x1001e9d04\nB.NE            loc_1001E9DA8                                          ; +0xa4, 0x1001e9d08\nLDR             X0, [X19,#0x790]                                       ; +0xa8, 0x1001e9d0c\nLDR             W1, [X24,#0x700]                                       ; +0xac, 0x1001e9d10\nBL              GJGameLevel__getCoinKey                                ; +0xb0, 0x1001e9d14\nMOV             X24, X0                                                ; +0xb4, 0x1001e9d18\nLDR             X8, [X19,#0x790]                                       ; +0xb8, 0x1001e9d1c\nLDR             W25, [X8,#0x354]                                       ; +0xbc, 0x1001e9d20\nLDR             W26, [X8,#0x358]                                       ; +0xc0, 0x1001e9d24\nBL              GameStatsManager__sharedState                          ; +0xc4, 0x1001e9d28\nMOV             X1, X24                                                ; +0xc8, 0x1001e9d2c\nCMP             W25, W26                                               ; +0xcc, 0x1001e9d30\nB.NE            loc_1001E9D88                                          ; +0xd0, 0x1001e9d34\nBL              GameStatsManager__hasPendingUserCoin                   ; +0xd4, 0x1001e9d38\nTBNZ            W0, #0, loc_1001E9DA8                                  ; +0xd8, 0x1001e9d3c\nBL              GameStatsManager__sharedState                          ; +0xdc, 0x1001e9d40\nMOV             X1, X24                                                ; +0xe0, 0x1001e9d44\nBL              GameStatsManager__storePendingUserCoin                 ; +0xe4, 0x1001e9d48\nB               loc_1001E9DA8                                          ; +0xe8, 0x1001e9d4c\nLDR             X0, [X19,#0x790]                                       ; +0xec, 0x1001e9d50\nLDR             W1, [X24,#0x700]                                       ; +0xf0, 0x1001e9d54\nBL              GJGameLevel__getCoinKey                                ; +0xf4, 0x1001e9d58\nMOV             X24, X0                                                ; +0xf8, 0x1001e9d5c\nBL              GameStatsManager__sharedState                          ; +0xfc, 0x1001e9d60\nMOV             X1, X24                                                ; +0x100, 0x1001e9d64\nBL              GameStatsManager__hasSecretCoin                        ; +0x104, 0x1001e9d68\nTBNZ            W0, #0, loc_1001E9DA8                                  ; +0x108, 0x1001e9d6c\nBL              GameStatsManager__sharedState                          ; +0x10c, 0x1001e9d70\nMOV             X1, X24                                                ; +0x110, 0x1001e9d74\nBL              GameStatsManager__storeSecretCoin                      ; +0x114, 0x1001e9d78\nBL              GameStatsManager__sharedState                          ; +0x118, 0x1001e9d7c\nMOV             X1, X22                                                ; +0x11c, 0x1001e9d80\nB               loc_1001E9DA4                                          ; +0x120, 0x1001e9d84\nBL              GameStatsManager__hasUserCoin                          ; +0x124, 0x1001e9d88\nTBNZ            W0, #0, loc_1001E9DA8                                  ; +0x128, 0x1001e9d8c\nBL              GameStatsManager__sharedState                          ; +0x12c, 0x1001e9d90\nMOV             X1, X24                                                ; +0x130, 0x1001e9d94\nBL              GameStatsManager__storeUserCoin                        ; +0x134, 0x1001e9d98\nBL              GameStatsManager__sharedState                          ; +0x138, 0x1001e9d9c\nMOV             X1, X23                                                ; +0x13c, 0x1001e9da0\nBL              GameStatsManager__incrementStat_1                      ; +0x140, 0x1001e9da4\nADD             W21, W21, #1                                           ; +0x144, 0x1001e9da8\nMOV             X0, X20                                                ; +0x148, 0x1001e9dac\nBL              sub_10024A36C                                          ; +0x14c, 0x1001e9db0\nCMP             W21, W0                                                ; +0x150, 0x1001e9db4\nB.CC            loc_1001E9CAC                                          ; +0x154, 0x1001e9db8\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x158, 0x1001e9dbc\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x15c, 0x1001e9dc0\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x160, 0x1001e9dc4\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x164, 0x1001e9dc8\nLDP             X26, X25, [SP,#0x60+var_40]                            ; +0x168, 0x1001e9dcc\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x16c, 0x1001e9dd0\nRET                                                                    ; +0x170, 0x1001e9dd4", "xrefs": ["PlayLayer::levelComplete @ 0x10011a03c"], "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"}