{"type": "func", "start": 8758976, "end": 8759256, "name": "GJBaseGameLayer::hasUniqueCoin", "pseudocode": "// \n// GJBaseGameLayer::hasUniqueCoin from 0x85a6c0 to 0x85a7d8 (280 bytes)\n// \n// 5 xrefs:\n// > EnhancedGameObject::updateUserCoin @ 0x65276c\n// > GJBaseGameLayer::collisionCheckObjects @ 0x88bed0\n// > GJBaseGameLayer::collisionCheckObjects @ 0x88c184\n// > GameObject::playDestroyObjectAnim @ 0x9b3150\n// > <???> @ 0xad670\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\nbool GJBaseGameLayer::hasUniqueCoin(GJBaseGameLayer *a1, EffectGameObject *a2)\n{\n  GJGameLevel *m_level; // x0\n  const char *CoinKey; // x20\n  GameStatsManager *v5; // x0\n  bool result; // w0\n  bool v7; // zf\n  int m_secretCoinID; // w1\n  GameStatsManager *v9; // x0\n  GameStatsManager *v10; // x0\n\n  m_level = a1->m_level;\n  if ( m_level->m_levelType == Editor )\n  {\n    v7 = a2->getType(a2) == (Collectible|0x1);\n    result = 0;\n    if ( v7 )\n    {\n      m_secretCoinID = a2->m_secretCoinID;\n      switch ( m_secretCoinID )\n      {\n        case 1:\n          return a1->m_level->m_firstCoinVerified.random - a1->m_level->m_firstCoinVerified.seed == 1;\n        case 2:\n          return a1->m_level->m_secondCoinVerified.random - a1->m_level->m_secondCoinVerified.seed == 1;\n        case 3:\n          return a1->m_level->m_thirdCoinVerified.random - a1->m_level->m_thirdCoinVerified.seed == 1;\n      }\n    }\n  }\n  else\n  {\n    CoinKey = GJGameLevel::getCoinKey(m_level, a2->m_secretCoinID);\n    if ( a1->m_level->m_levelType == Main )\n    {\n      v10 = GameStatsManager::sharedState();\n      return GameStatsManager::hasSecretCoin(v10, CoinKey);\n    }\n    else\n    {\n      v5 = GameStatsManager::sharedState();\n      result = GameStatsManager::hasUserCoin(v5, CoinKey);\n      if ( !result )\n      {\n        v9 = GameStatsManager::sharedState();\n        return GameStatsManager::hasPendingUserCoin(v9, CoinKey);\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::hasUniqueCoin from 0x85a6c0 to 0x85a7d8 (280 bytes)\n; \n; 5 xrefs:\n; > EnhancedGameObject::updateUserCoin @ 0x65276c\n; > GJBaseGameLayer::collisionCheckObjects @ 0x88bed0\n; > GJBaseGameLayer::collisionCheckObjects @ 0x88c184\n; > GameObject::playDestroyObjectAnim @ 0x9b3150\n; > <???> @ 0xad670\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             X29, X30, [SP,#var_30]!                                ; +0x0, 0x85a6c0\nMOV             X29, SP                                                ; +0x4, 0x85a6c4\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x85a6c8\nMOV             X19, X0                                                ; +0xc, 0x85a6cc\nLDR             X0, [X0,#0x8A0]; this                                  ; +0x10, 0x85a6d0\nLDR             W2, [X0,#0x364]                                        ; +0x14, 0x85a6d4\nCMP             W2, #2                                                 ; +0x18, 0x85a6d8\nB.EQ            loc_85A71C                                             ; +0x1c, 0x85a6dc\nLDR             W1, [X1,#0x6F0]; int                                   ; +0x20, 0x85a6e0\nBL              _ZN11GJGameLevel10getCoinKeyEi; GJGameLevel::getCoinKey(int) ; +0x24, 0x85a6e4\nMOV             X20, X0                                                ; +0x28, 0x85a6e8\nLDR             X0, [X19,#0x8A0]                                       ; +0x2c, 0x85a6ec\nLDR             W0, [X0,#0x364]; this                                  ; +0x30, 0x85a6f0\nCMP             W0, #1                                                 ; +0x34, 0x85a6f4\nB.EQ            loc_85A78C                                             ; +0x38, 0x85a6f8\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0x3c, 0x85a6fc\nMOV             X1, X20; char *                                        ; +0x40, 0x85a700\nBL              _ZN16GameStatsManager11hasUserCoinEPKc; GameStatsManager::hasUserCoin(char const*) ; +0x44, 0x85a704\nUXTB            W0, W0; this                                           ; +0x48, 0x85a708\nCBZ             W0, loc_85A778                                         ; +0x4c, 0x85a70c\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x50, 0x85a710\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x54, 0x85a714\nRET                                                                    ; +0x58, 0x85a718\nLDR             X2, [X1]                                               ; +0x5c, 0x85a71c\nMOV             X0, X1                                                 ; +0x60, 0x85a720\nSTR             X1, [X29,#0x30+var_8]                                  ; +0x64, 0x85a724\nLDR             X2, [X2,#0x6F8]                                        ; +0x68, 0x85a728\nBLR             X2                                                     ; +0x6c, 0x85a72c\nCMP             W0, #0x1F                                              ; +0x70, 0x85a730\nLDR             X1, [X29,#0x30+var_8]                                  ; +0x74, 0x85a734\nMOV             W0, #0                                                 ; +0x78, 0x85a738\nB.NE            loc_85A710                                             ; +0x7c, 0x85a73c\nLDR             W1, [X1,#0x6F0]                                        ; +0x80, 0x85a740\nCMP             W1, #1                                                 ; +0x84, 0x85a744\nB.EQ            loc_85A7A0                                             ; +0x88, 0x85a748\nCMP             W1, #2                                                 ; +0x8c, 0x85a74c\nB.EQ            loc_85A7BC                                             ; +0x90, 0x85a750\nCMP             W1, #3                                                 ; +0x94, 0x85a754\nB.NE            loc_85A710                                             ; +0x98, 0x85a758\nLDR             X1, [X19,#0x8A0]                                       ; +0x9c, 0x85a75c\nLDR             W0, [X1,#0x304]                                        ; +0xa0, 0x85a760\nLDR             W1, [X1,#0x308]                                        ; +0xa4, 0x85a764\nSUB             W0, W0, W1                                             ; +0xa8, 0x85a768\nCMP             W0, #1                                                 ; +0xac, 0x85a76c\nCSET            W0, EQ                                                 ; +0xb0, 0x85a770\nB               loc_85A710                                             ; +0xb4, 0x85a774\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0xb8, 0x85a778\nMOV             X1, X20; char *                                        ; +0xbc, 0x85a77c\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0xc0, 0x85a780\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0xc4, 0x85a784\nB               _ZN16GameStatsManager18hasPendingUserCoinEPKc; GameStatsManager::hasPendingUserCoin(char const*) ; +0xc8, 0x85a788\nBL              _ZN16GameStatsManager11sharedStateEv; GameStatsManager::sharedState(void) ; +0xcc, 0x85a78c\nMOV             X1, X20; char *                                        ; +0xd0, 0x85a790\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0xd4, 0x85a794\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0xd8, 0x85a798\nB               _ZN16GameStatsManager13hasSecretCoinEPKc; GameStatsManager::hasSecretCoin(char const*) ; +0xdc, 0x85a79c\nLDR             X1, [X19,#0x8A0]                                       ; +0xe0, 0x85a7a0\nLDR             W0, [X1,#0x2EC]                                        ; +0xe4, 0x85a7a4\nLDR             W1, [X1,#0x2F0]                                        ; +0xe8, 0x85a7a8\nSUB             W0, W0, W1                                             ; +0xec, 0x85a7ac\nCMP             W0, #1                                                 ; +0xf0, 0x85a7b0\nCSET            W0, EQ                                                 ; +0xf4, 0x85a7b4\nB               loc_85A710                                             ; +0xf8, 0x85a7b8\nLDR             X1, [X19,#0x8A0]                                       ; +0xfc, 0x85a7bc\nLDR             W0, [X1,#0x2F8]                                        ; +0x100, 0x85a7c0\nLDR             W1, [X1,#0x2FC]                                        ; +0x104, 0x85a7c4\nSUB             W0, W0, W1                                             ; +0x108, 0x85a7c8\nCMP             W0, #1                                                 ; +0x10c, 0x85a7cc\nCSET            W0, EQ                                                 ; +0x110, 0x85a7d0\nB               loc_85A710                                             ; +0x114, 0x85a7d4", "xrefs": ["EnhancedGameObject::updateUserCoin @ 0x65276c", "GJBaseGameLayer::collisionCheckObjects @ 0x88bed0", "GJBaseGameLayer::collisionCheckObjects @ 0x88c184", "GameObject::playDestroyObjectAnim @ 0x9b3150", "<???> @ 0xad670"], "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"}