{"type": "func", "start": 4297610708, "end": 4297611080, "name": "GJBaseGameLayer::processItems", "pseudocode": "// \n// GJBaseGameLayer::processItems from 0x1002855d4 to 0x100285748 (372 bytes)\n// \n// 1 xrefs:\n// > PlayLayer::levelComplete @ 0x100142f18\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:01:57 +0000\n// \n\n__int64 __fastcall GJBaseGameLayer::processItems(__int64 a1)\n{\n  __int64 v2; // x20\n  __int64 result; // x0\n  __int64 v4; // x21\n  __int64 v5; // x0\n  char *CString; // x0\n  __int64 v7; // x24\n  unsigned int *v8; // x24\n  int v9; // w0\n  __int64 v10; // x24\n  __int64 v11; // x8\n  int v12; // w25\n  int v13; // w26\n  __int64 v14; // x0\n  __int64 hasPendingUserCoin; // x0\n  __int64 v16; // x0\n  __int64 CoinKey_1; // x24\n  __int64 v18; // x0\n  __int64 hasSecretCoin; // x0\n  __int64 v20; // x0\n  __int64 v21; // x0\n  __int64 v22; // x0\n  const char *v23; // x1\n  __int64 hasUserCoin; // x0\n  __int64 v25; // x0\n  __int64 v26; // x0\n  void *__p[2]; // [xsp+8h] [xbp-58h] BYREF\n  char v28; // [xsp+1Fh] [xbp-41h]\n\n  v2 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 12584));\n  result = sub_1002E757C(v2);\n  if ( (_DWORD)result )\n  {\n    v4 = 0;\n    do\n    {\n      v5 = sub_1002E75A0(v2, v4);\n      CString = (char *)cocos2d::CCString::getCString(v5);\n      v7 = *(_QWORD *)(a1 + 12584);\n      sub_100009900(__p, CString);\n      v8 = (unsigned int *)cocos2d::CCDictionary::objectForKey(v7, __p);\n      if ( v28 < 0 )\n        operator delete(__p[0]);\n      v9 = (*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)v8 + 1800LL))(v8);\n      if ( v9 == 22 )\n      {\n        CoinKey_1 = GJGameLevel::getCoinKey_1(*(_QWORD *)(a1 + 1936), v8[448]);\n        v18 = GameStatsManager::sharedState(CoinKey_1);\n        hasSecretCoin = GameStatsManager::hasSecretCoin(v18, CoinKey_1);\n        if ( (hasSecretCoin & 1) == 0 )\n        {\n          v20 = GameStatsManager::sharedState(hasSecretCoin);\n          v21 = sub_1003D002C(v20, CoinKey_1);\n          v22 = GameStatsManager::sharedState(v21);\n          v23 = \"8\";\nLABEL_14:\n          GameStatsManager::incrementStat_1(v22, v23);\n        }\n      }\n      else if ( v9 == 31 )\n      {\n        v10 = GJGameLevel::getCoinKey_1(*(_QWORD *)(a1 + 1936), v8[448]);\n        v11 = *(_QWORD *)(a1 + 1936);\n        v12 = *(_DWORD *)(v11 + 968);\n        v13 = *(_DWORD *)(v11 + 972);\n        v14 = GameStatsManager::sharedState(v10);\n        if ( v12 == v13 )\n        {\n          hasPendingUserCoin = GameStatsManager::hasPendingUserCoin(v14, v10);\n          if ( (hasPendingUserCoin & 1) == 0 )\n          {\n            v16 = GameStatsManager::sharedState(hasPendingUserCoin);\n            sub_1003CFFC0(v16, v10);\n          }\n          goto LABEL_15;\n        }\n        hasUserCoin = GameStatsManager::hasUserCoin(v14, v10);\n        if ( (hasUserCoin & 1) == 0 )\n        {\n          v25 = GameStatsManager::sharedState(hasUserCoin);\n          v26 = GameStatsManager::storeUserCoin(v25, v10);\n          v22 = GameStatsManager::sharedState(v26);\n          v23 = \"12\";\n          goto LABEL_14;\n        }\n      }\nLABEL_15:\n      v4 = (unsigned int)(v4 + 1);\n      result = sub_1002E757C(v2);\n    }\n    while ( (unsigned int)v4 < (unsigned int)result );\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::processItems from 0x1002855d4 to 0x100285748 (372 bytes)\n; \n; 1 xrefs:\n; > PlayLayer::levelComplete @ 0x100142f18\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:01:57 +0000\n; \nSUB             SP, SP, #0x70                                          ; +0x0, 0x1002855d4\nSTP             X26, X25, [SP,#0x60+var_40]                            ; +0x4, 0x1002855d8\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x8, 0x1002855dc\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0xc, 0x1002855e0\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x10, 0x1002855e4\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x14, 0x1002855e8\nADD             X29, SP, #0x60                                         ; +0x18, 0x1002855ec\nMOV             X19, X0                                                ; +0x1c, 0x1002855f0\nLDR             X0, [X0,#0x3128]                                       ; +0x20, 0x1002855f4\nBL              cocos2d__CCDictionary__allKeys                         ; +0x24, 0x1002855f8\nMOV             X20, X0                                                ; +0x28, 0x1002855fc\nBL              sub_1002E757C                                          ; +0x2c, 0x100285600\nCBZ             W0, loc_10028572C                                      ; +0x30, 0x100285604\nMOV             W21, #0                                                ; +0x34, 0x100285608\nADRL            X22, a8; \"8\"                                           ; +0x38, 0x10028560c\nADRL            X23, a12; \"12\"                                         ; +0x40, 0x100285614\nMOV             X0, X20                                                ; +0x48, 0x10028561c\nMOV             X1, X21                                                ; +0x4c, 0x100285620\nBL              sub_1002E75A0                                          ; +0x50, 0x100285624\nBL              cocos2d__CCString__getCString                          ; +0x54, 0x100285628\nMOV             X1, X0; __s                                            ; +0x58, 0x10028562c\nLDR             X24, [X19,#0x3128]                                     ; +0x5c, 0x100285630\nADD             X0, SP, #0x60+__p; int                                 ; +0x60, 0x100285634\nBL              sub_100009900                                          ; +0x64, 0x100285638\nADD             X1, SP, #0x60+__p                                      ; +0x68, 0x10028563c\nMOV             X0, X24                                                ; +0x6c, 0x100285640\nBL              cocos2d__CCDictionary__objectForKey                    ; +0x70, 0x100285644\nMOV             X24, X0                                                ; +0x74, 0x100285648\nLDRSB           W8, [SP,#0x60+var_41]                                  ; +0x78, 0x10028564c\nTBZ             W8, #0x1F, loc_10028565C                               ; +0x7c, 0x100285650\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0x80, 0x100285654\nBL              __ZdlPv; operator delete(void *)                       ; +0x84, 0x100285658\nLDR             X8, [X24]                                              ; +0x88, 0x10028565c\nLDR             X8, [X8,#0x708]                                        ; +0x8c, 0x100285660\nMOV             X0, X24                                                ; +0x90, 0x100285664\nBLR             X8                                                     ; +0x94, 0x100285668\nCMP             W0, #0x16                                              ; +0x98, 0x10028566c\nB.EQ            loc_1002856C0                                          ; +0x9c, 0x100285670\nCMP             W0, #0x1F                                              ; +0xa0, 0x100285674\nB.NE            loc_100285718                                          ; +0xa4, 0x100285678\nLDR             X0, [X19,#0x790]                                       ; +0xa8, 0x10028567c\nLDR             W1, [X24,#0x700]                                       ; +0xac, 0x100285680\nBL              GJGameLevel__getCoinKey_1                              ; +0xb0, 0x100285684\nMOV             X24, X0                                                ; +0xb4, 0x100285688\nLDR             X8, [X19,#0x790]                                       ; +0xb8, 0x10028568c\nLDR             W25, [X8,#0x3C8]                                       ; +0xbc, 0x100285690\nLDR             W26, [X8,#0x3CC]                                       ; +0xc0, 0x100285694\nBL              GameStatsManager__sharedState                          ; +0xc4, 0x100285698\nMOV             X1, X24                                                ; +0xc8, 0x10028569c\nCMP             W25, W26                                               ; +0xcc, 0x1002856a0\nB.NE            loc_1002856F8                                          ; +0xd0, 0x1002856a4\nBL              GameStatsManager__hasPendingUserCoin                   ; +0xd4, 0x1002856a8\nTBNZ            W0, #0, loc_100285718                                  ; +0xd8, 0x1002856ac\nBL              GameStatsManager__sharedState                          ; +0xdc, 0x1002856b0\nMOV             X1, X24                                                ; +0xe0, 0x1002856b4\nBL              sub_1003CFFC0                                          ; +0xe4, 0x1002856b8\nB               loc_100285718                                          ; +0xe8, 0x1002856bc\nLDR             X0, [X19,#0x790]                                       ; +0xec, 0x1002856c0\nLDR             W1, [X24,#0x700]                                       ; +0xf0, 0x1002856c4\nBL              GJGameLevel__getCoinKey_1                              ; +0xf4, 0x1002856c8\nMOV             X24, X0                                                ; +0xf8, 0x1002856cc\nBL              GameStatsManager__sharedState                          ; +0xfc, 0x1002856d0\nMOV             X1, X24                                                ; +0x100, 0x1002856d4\nBL              GameStatsManager__hasSecretCoin                        ; +0x104, 0x1002856d8\nTBNZ            W0, #0, loc_100285718                                  ; +0x108, 0x1002856dc\nBL              GameStatsManager__sharedState                          ; +0x10c, 0x1002856e0\nMOV             X1, X24                                                ; +0x110, 0x1002856e4\nBL              sub_1003D002C                                          ; +0x114, 0x1002856e8\nBL              GameStatsManager__sharedState                          ; +0x118, 0x1002856ec\nMOV             X1, X22                                                ; +0x11c, 0x1002856f0\nB               loc_100285714                                          ; +0x120, 0x1002856f4\nBL              GameStatsManager__hasUserCoin                          ; +0x124, 0x1002856f8\nTBNZ            W0, #0, loc_100285718                                  ; +0x128, 0x1002856fc\nBL              GameStatsManager__sharedState                          ; +0x12c, 0x100285700\nMOV             X1, X24                                                ; +0x130, 0x100285704\nBL              GameStatsManager__storeUserCoin                        ; +0x134, 0x100285708\nBL              GameStatsManager__sharedState                          ; +0x138, 0x10028570c\nMOV             X1, X23                                                ; +0x13c, 0x100285710\nBL              GameStatsManager__incrementStat_1                      ; +0x140, 0x100285714\nADD             W21, W21, #1                                           ; +0x144, 0x100285718\nMOV             X0, X20                                                ; +0x148, 0x10028571c\nBL              sub_1002E757C                                          ; +0x14c, 0x100285720\nCMP             W21, W0                                                ; +0x150, 0x100285724\nB.CC            loc_10028561C                                          ; +0x154, 0x100285728\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x158, 0x10028572c\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x15c, 0x100285730\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x160, 0x100285734\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x164, 0x100285738\nLDP             X26, X25, [SP,#0x60+var_40]                            ; +0x168, 0x10028573c\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x16c, 0x100285740\nRET                                                                    ; +0x170, 0x100285744", "xrefs": ["PlayLayer::levelComplete @ 0x100142f18"], "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"}