{"type": "func", "start": 4297608768, "end": 4297609020, "name": "GJBaseGameLayer::hasUniqueCoin", "pseudocode": "// \n// GJBaseGameLayer::hasUniqueCoin from 0x100284e40 to 0x100284f3c (252 bytes)\n// \n// 5 xrefs:\n// > PlayLayer::loadFromCheckpoint @ 0x10014a5a8\n// > GJBaseGameLayer::collisionCheckObjects @ 0x100283cfc\n// > GJBaseGameLayer::collisionCheckObjects @ 0x100283ea4\n// > EnhancedGameObject::updateUserCoin @ 0x1002fc834\n// > GameObject::playDestroyObjectAnim @ 0x1003e8190\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::hasUniqueCoin(__int64 a1, _DWORD *a2)\n{\n  __int64 v4; // x0\n  int v5; // w8\n  __int64 v6; // x8\n  int v7; // w9\n  int v8; // w8\n  __int64 CoinKey_1; // x20\n  int v10; // w19\n  __int64 v11; // x0\n  __int64 hasUserCoin; // x0\n  __int64 v14; // x0\n  __int64 v15; // x8\n  __int64 v16; // x8\n\n  v4 = *(_QWORD *)(a1 + 1936);\n  if ( *(_DWORD *)(v4 + 1140) == 2 )\n  {\n    if ( (*(unsigned int (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 1800LL))(a2) == 31 )\n    {\n      v5 = a2[448];\n      switch ( v5 )\n      {\n        case 3:\n          v16 = *(_QWORD *)(a1 + 1936);\n          v7 = *(_DWORD *)(v16 + 1032);\n          v8 = *(_DWORD *)(v16 + 1036);\n          return v7 - v8 == 1;\n        case 2:\n          v15 = *(_QWORD *)(a1 + 1936);\n          v7 = *(_DWORD *)(v15 + 1020);\n          v8 = *(_DWORD *)(v15 + 1024);\n          return v7 - v8 == 1;\n        case 1:\n          v6 = *(_QWORD *)(a1 + 1936);\n          v7 = *(_DWORD *)(v6 + 1008);\n          v8 = *(_DWORD *)(v6 + 1012);\n          return v7 - v8 == 1;\n      }\n    }\n    return 0;\n  }\n  CoinKey_1 = GJGameLevel::getCoinKey_1(v4, (unsigned int)a2[448]);\n  v10 = *(_DWORD *)(*(_QWORD *)(a1 + 1936) + 1140LL);\n  v11 = GameStatsManager::sharedState(CoinKey_1);\n  if ( v10 == 1 )\n    return GameStatsManager::hasSecretCoin(v11, CoinKey_1);\n  hasUserCoin = GameStatsManager::hasUserCoin(v11, CoinKey_1);\n  if ( (hasUserCoin & 1) != 0 )\n    return 1;\n  v14 = GameStatsManager::sharedState(hasUserCoin);\n  return GameStatsManager::hasPendingUserCoin(v14, CoinKey_1);\n}", "assembly": "; \n; GJBaseGameLayer::hasUniqueCoin from 0x100284e40 to 0x100284f3c (252 bytes)\n; \n; 5 xrefs:\n; > PlayLayer::loadFromCheckpoint @ 0x10014a5a8\n; > GJBaseGameLayer::collisionCheckObjects @ 0x100283cfc\n; > GJBaseGameLayer::collisionCheckObjects @ 0x100283ea4\n; > EnhancedGameObject::updateUserCoin @ 0x1002fc834\n; > GameObject::playDestroyObjectAnim @ 0x1003e8190\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; \nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x100284e40\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x100284e44\nADD             X29, SP, #0x10                                         ; +0x8, 0x100284e48\nMOV             X20, X1                                                ; +0xc, 0x100284e4c\nMOV             X19, X0                                                ; +0x10, 0x100284e50\nLDR             X0, [X0,#0x790]                                        ; +0x14, 0x100284e54\nLDR             W8, [X0,#0x474]                                        ; +0x18, 0x100284e58\nCMP             W8, #2                                                 ; +0x1c, 0x100284e5c\nB.NE            loc_100284EA8                                          ; +0x20, 0x100284e60\nLDR             X8, [X20]                                              ; +0x24, 0x100284e64\nLDR             X8, [X8,#0x708]                                        ; +0x28, 0x100284e68\nMOV             X0, X20                                                ; +0x2c, 0x100284e6c\nBLR             X8                                                     ; +0x30, 0x100284e70\nCMP             W0, #0x1F                                              ; +0x34, 0x100284e74\nB.NE            loc_100284ED8                                          ; +0x38, 0x100284e78\nLDR             W8, [X20,#0x700]                                       ; +0x3c, 0x100284e7c\nCMP             W8, #3                                                 ; +0x40, 0x100284e80\nB.EQ            loc_100284F18                                          ; +0x44, 0x100284e84\nCMP             W8, #2                                                 ; +0x48, 0x100284e88\nB.EQ            loc_100284F08                                          ; +0x4c, 0x100284e8c\nCMP             W8, #1                                                 ; +0x50, 0x100284e90\nB.NE            loc_100284ED8                                          ; +0x54, 0x100284e94\nLDR             X8, [X19,#0x790]                                       ; +0x58, 0x100284e98\nLDR             W9, [X8,#0x3F0]                                        ; +0x5c, 0x100284e9c\nLDR             W8, [X8,#0x3F4]                                        ; +0x60, 0x100284ea0\nB               loc_100284F24                                          ; +0x64, 0x100284ea4\nLDR             W1, [X20,#0x700]                                       ; +0x68, 0x100284ea8\nBL              GJGameLevel__getCoinKey_1                              ; +0x6c, 0x100284eac\nMOV             X20, X0                                                ; +0x70, 0x100284eb0\nLDR             X8, [X19,#0x790]                                       ; +0x74, 0x100284eb4\nLDR             W19, [X8,#0x474]                                       ; +0x78, 0x100284eb8\nBL              GameStatsManager__sharedState                          ; +0x7c, 0x100284ebc\nCMP             W19, #1                                                ; +0x80, 0x100284ec0\nB.NE            loc_100284EE0                                          ; +0x84, 0x100284ec4\nMOV             X1, X20                                                ; +0x88, 0x100284ec8\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x8c, 0x100284ecc\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x90, 0x100284ed0\nB               GameStatsManager__hasSecretCoin                        ; +0x94, 0x100284ed4\nMOV             W0, #0                                                 ; +0x98, 0x100284ed8\nB               loc_100284F30                                          ; +0x9c, 0x100284edc\nMOV             X1, X20                                                ; +0xa0, 0x100284ee0\nBL              GameStatsManager__hasUserCoin                          ; +0xa4, 0x100284ee4\nTBZ             W0, #0, loc_100284EF4                                  ; +0xa8, 0x100284ee8\nMOV             W0, #1                                                 ; +0xac, 0x100284eec\nB               loc_100284F30                                          ; +0xb0, 0x100284ef0\nBL              GameStatsManager__sharedState                          ; +0xb4, 0x100284ef4\nMOV             X1, X20                                                ; +0xb8, 0x100284ef8\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0xbc, 0x100284efc\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0xc0, 0x100284f00\nB               GameStatsManager__hasPendingUserCoin                   ; +0xc4, 0x100284f04\nLDR             X8, [X19,#0x790]                                       ; +0xc8, 0x100284f08\nLDR             W9, [X8,#0x3FC]                                        ; +0xcc, 0x100284f0c\nLDR             W8, [X8,#0x400]                                        ; +0xd0, 0x100284f10\nB               loc_100284F24                                          ; +0xd4, 0x100284f14\nLDR             X8, [X19,#0x790]                                       ; +0xd8, 0x100284f18\nLDR             W9, [X8,#0x408]                                        ; +0xdc, 0x100284f1c\nLDR             W8, [X8,#0x40C]                                        ; +0xe0, 0x100284f20\nSUB             W8, W9, W8                                             ; +0xe4, 0x100284f24\nCMP             W8, #1                                                 ; +0xe8, 0x100284f28\nCSET            W0, EQ                                                 ; +0xec, 0x100284f2c\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0xf0, 0x100284f30\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0xf4, 0x100284f34\nRET                                                                    ; +0xf8, 0x100284f38", "xrefs": ["PlayLayer::loadFromCheckpoint @ 0x10014a5a8", "GJBaseGameLayer::collisionCheckObjects @ 0x100283cfc", "GJBaseGameLayer::collisionCheckObjects @ 0x100283ea4", "EnhancedGameObject::updateUserCoin @ 0x1002fc834", "GameObject::playDestroyObjectAnim @ 0x1003e8190"], "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"}