{"type": "func", "start": 4296041392, "end": 4296041635, "name": "GJBaseGameLayer::hasUniqueCoin", "pseudocode": "// \n// GJBaseGameLayer::hasUniqueCoin from 0x1001063b0 to 0x1001064a3 (243 bytes)\n// \n// 5 xrefs:\n// > PlayLayer::loadFromCheckpoint @ 0x10008b3f4\n// > GJBaseGameLayer::collisionCheckObjects @ 0x100104b0f\n// > GJBaseGameLayer::collisionCheckObjects @ 0x100104cfd\n// > GameObject::playDestroyObjectAnim @ 0x1002485a8\n// > EnhancedGameObject::updateUserCoin @ 0x10069321a\n// \n// This function is hookable on this platform (idp: pc, 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 12:21:31 +0000\n// \n\nchar __fastcall GJBaseGameLayer::hasUniqueCoin(__int64 a1, _DWORD *a2)\n{\n  __int64 v3; // rdi\n  int v4; // eax\n  int v5; // ecx\n  const char *CoinKey_1; // r14\n  int v7; // ebx\n  __int64 v8; // rdi\n  char result; // al\n  bool hasUserCoin; // cl\n  __int64 v11; // rax\n\n  v3 = *(_QWORD *)(a1 + 1936);\n  if ( *(_DWORD *)(v3 + 1140) == 2 )\n  {\n    if ( (*(unsigned int (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 1800LL))(a2) == 31 )\n    {\n      v4 = a2[448];\n      switch ( v4 )\n      {\n        case 3:\n          v5 = *(_DWORD *)(*(_QWORD *)(a1 + 1936) + 1032LL) - *(_DWORD *)(*(_QWORD *)(a1 + 1936) + 1036LL);\n          return v5 == 1;\n        case 2:\n          v5 = *(_DWORD *)(*(_QWORD *)(a1 + 1936) + 1020LL) - *(_DWORD *)(*(_QWORD *)(a1 + 1936) + 1024LL);\n          return v5 == 1;\n        case 1:\n          v5 = *(_DWORD *)(*(_QWORD *)(a1 + 1936) + 1008LL) - *(_DWORD *)(*(_QWORD *)(a1 + 1936) + 1012LL);\n          return v5 == 1;\n      }\n    }\n    return 0;\n  }\n  else\n  {\n    CoinKey_1 = (const char *)GJGameLevel::getCoinKey_1(v3, (unsigned int)a2[448]);\n    v7 = *(_DWORD *)(*(_QWORD *)(a1 + 1936) + 1140LL);\n    v8 = GameStatsManager::sharedState();\n    if ( v7 == 1 )\n    {\n      return GameStatsManager::hasSecretCoin(v8);\n    }\n    else\n    {\n      hasUserCoin = GameStatsManager::hasUserCoin(v8, CoinKey_1);\n      result = 1;\n      if ( !hasUserCoin )\n      {\n        v11 = GameStatsManager::sharedState();\n        return GameStatsManager::hasPendingUserCoin(v11, CoinKey_1);\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::hasUniqueCoin from 0x1001063b0 to 0x1001064a3 (243 bytes)\n; \n; 5 xrefs:\n; > PlayLayer::loadFromCheckpoint @ 0x10008b3f4\n; > GJBaseGameLayer::collisionCheckObjects @ 0x100104b0f\n; > GJBaseGameLayer::collisionCheckObjects @ 0x100104cfd\n; > GameObject::playDestroyObjectAnim @ 0x1002485a8\n; > EnhancedGameObject::updateUserCoin @ 0x10069321a\n; \n; This function is hookable on this platform (idp: pc, 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 12:21:31 +0000\n; \npush    rbp                                                            ; +0x0, 0x1001063b0\nmov     rbp, rsp                                                       ; +0x1, 0x1001063b1\npush    r14                                                            ; +0x4, 0x1001063b4\npush    rbx                                                            ; +0x6, 0x1001063b6\nmov     r14, rsi                                                       ; +0x7, 0x1001063b7\nmov     rbx, rdi                                                       ; +0xa, 0x1001063ba\nmov     rdi, [rdi+790h]                                                ; +0xd, 0x1001063bd\ncmp     dword ptr [rdi+474h], 2                                        ; +0x14, 0x1001063c4\njnz     short loc_100106410                                            ; +0x1b, 0x1001063cb\nmov     rax, [r14]                                                     ; +0x1d, 0x1001063cd\nmov     rdi, r14                                                       ; +0x20, 0x1001063d0\ncall    qword ptr [rax+708h]                                           ; +0x23, 0x1001063d3\ncmp     eax, 1Fh                                                       ; +0x29, 0x1001063d9\njnz     short loc_100106445                                            ; +0x2c, 0x1001063dc\nmov     eax, [r14+700h]                                                ; +0x2e, 0x1001063de\ncmp     eax, 3                                                         ; +0x35, 0x1001063e5\njz      loc_100106485                                                  ; +0x38, 0x1001063e8\ncmp     eax, 2                                                         ; +0x3e, 0x1001063ee\njz      short loc_100106470                                            ; +0x41, 0x1001063f1\ncmp     eax, 1                                                         ; +0x43, 0x1001063f3\njnz     short loc_100106445                                            ; +0x46, 0x1001063f6\nmov     rax, [rbx+790h]                                                ; +0x48, 0x1001063f8\nmov     ecx, [rax+3F0h]                                                ; +0x4f, 0x1001063ff\nsub     ecx, [rax+3F4h]                                                ; +0x55, 0x100106405\njmp     loc_100106498                                                  ; +0x5b, 0x10010640b\nmov     esi, [r14+700h]                                                ; +0x60, 0x100106410\ncall    GJGameLevel__getCoinKey_1                                      ; +0x67, 0x100106417\nmov     r14, rax                                                       ; +0x6c, 0x10010641c\nmov     rax, [rbx+790h]                                                ; +0x6f, 0x10010641f\nmov     ebx, [rax+474h]                                                ; +0x76, 0x100106426\ncall    GameStatsManager__sharedState                                  ; +0x7c, 0x10010642c\nmov     rdi, rax                                                       ; +0x81, 0x100106431\ncmp     ebx, 1                                                         ; +0x84, 0x100106434\njnz     short loc_10010644C                                            ; +0x87, 0x100106437\nmov     rsi, r14                                                       ; +0x89, 0x100106439\npop     rbx                                                            ; +0x8c, 0x10010643c\npop     r14                                                            ; +0x8d, 0x10010643d\npop     rbp                                                            ; +0x8f, 0x10010643f\njmp     GameStatsManager__hasSecretCoin                                ; +0x90, 0x100106440\nxor     eax, eax                                                       ; +0x95, 0x100106445\npop     rbx                                                            ; +0x97, 0x100106447\npop     r14                                                            ; +0x98, 0x100106448\npop     rbp                                                            ; +0x9a, 0x10010644a\nretn                                                                   ; +0x9b, 0x10010644b\nmov     rsi, r14                                                       ; +0x9c, 0x10010644c\ncall    GameStatsManager__hasUserCoin                                  ; +0x9f, 0x10010644f\nmov     ecx, eax                                                       ; +0xa4, 0x100106454\nmov     al, 1                                                          ; +0xa6, 0x100106456\ntest    cl, cl                                                         ; +0xa8, 0x100106458\njnz     short loc_100106447                                            ; +0xaa, 0x10010645a\ncall    GameStatsManager__sharedState                                  ; +0xac, 0x10010645c\nmov     rdi, rax                                                       ; +0xb1, 0x100106461\nmov     rsi, r14                                                       ; +0xb4, 0x100106464\npop     rbx                                                            ; +0xb7, 0x100106467\npop     r14                                                            ; +0xb8, 0x100106468\npop     rbp                                                            ; +0xba, 0x10010646a\njmp     GameStatsManager__hasPendingUserCoin                           ; +0xbb, 0x10010646b\nmov     rax, [rbx+790h]                                                ; +0xc0, 0x100106470\nmov     ecx, [rax+3FCh]                                                ; +0xc7, 0x100106477\nsub     ecx, [rax+400h]                                                ; +0xcd, 0x10010647d\njmp     short loc_100106498                                            ; +0xd3, 0x100106483\nmov     rax, [rbx+790h]                                                ; +0xd5, 0x100106485\nmov     ecx, [rax+408h]                                                ; +0xdc, 0x10010648c\nsub     ecx, [rax+40Ch]                                                ; +0xe2, 0x100106492\ncmp     ecx, 1                                                         ; +0xe8, 0x100106498\nsetz    al                                                             ; +0xeb, 0x10010649b\npop     rbx                                                            ; +0xee, 0x10010649e\npop     r14                                                            ; +0xef, 0x10010649f\npop     rbp                                                            ; +0xf1, 0x1001064a1\nretn                                                                   ; +0xf2, 0x1001064a2", "xrefs": ["PlayLayer::loadFromCheckpoint @ 0x10008b3f4", "GJBaseGameLayer::collisionCheckObjects @ 0x100104b0f", "GJBaseGameLayer::collisionCheckObjects @ 0x100104cfd", "GameObject::playDestroyObjectAnim @ 0x1002485a8", "EnhancedGameObject::updateUserCoin @ 0x10069321a"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}