{"type": "func", "start": 4295186784, "end": 4295186982, "name": "GameStatsManager::hasPendingUserCoin", "pseudocode": "// \n// GameStatsManager::hasPendingUserCoin from 0x100035960 to 0x100035a26 (198 bytes)\n// \n// 10 xrefs:\n// > GameStatsManager::checkCoinsForLevel @ 0x100035673\n// > GameStatsManager::checkCoinsForLevel @ 0x100035766\n// > GameStatsManager::checkCoinsForLevel @ 0x100035859\n// > GJBaseGameLayer::hasUniqueCoin @ 0x10010646b\n// > GJBaseGameLayer::processItems @ 0x1001070f3\n// > LevelCell::loadCustomLevelCell @ 0x1002391df\n// > LevelInfoLayer::updateLabelValues @ 0x1002b0213\n// > PauseLayer::customSetup @ 0x1003c0756\n// > EndLevelLayer::customSetup @ 0x1004ba7aa\n// > GameLevelManager::getLevelLeaderboard @ 0x100565f05\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:19:32 +0000\n// \n\nbool __fastcall GameStatsManager::hasPendingUserCoin(__int64 a1, const char *a2)\n{\n  __int64 v2; // rbx\n  size_t v3; // rax\n  size_t v4; // r15\n  char *v5; // r12\n  size_t v6; // r13\n  __int64 v7; // rbx\n  _QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF\n  void *__p; // [rsp+10h] [rbp-30h]\n\n  v2 = *(_QWORD *)(a1 + 624);\n  v3 = strlen(a2);\n  if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v4 = v3;\n  if ( v3 >= 0x17 )\n  {\n    v6 = 26;\n    if ( (v3 | 7) != 0x17 )\n      v6 = (v3 | 7) + 1;\n    v5 = (char *)operator new(v6);\n    __p = v5;\n    __dst[0] = v6 + 1;\n    __dst[1] = v4;\n    goto LABEL_8;\n  }\n  LOBYTE(__dst[0]) = 2 * v3;\n  v5 = (char *)__dst + 1;\n  if ( v3 )\nLABEL_8:\n    memcpy(v5, a2, v4);\n  v5[v4] = 0;\n  v7 = cocos2d::CCDictionary::objectForKey(v2, __dst);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n  return v7 != 0;\n}", "assembly": "; \n; GameStatsManager::hasPendingUserCoin from 0x100035960 to 0x100035a26 (198 bytes)\n; \n; 10 xrefs:\n; > GameStatsManager::checkCoinsForLevel @ 0x100035673\n; > GameStatsManager::checkCoinsForLevel @ 0x100035766\n; > GameStatsManager::checkCoinsForLevel @ 0x100035859\n; > GJBaseGameLayer::hasUniqueCoin @ 0x10010646b\n; > GJBaseGameLayer::processItems @ 0x1001070f3\n; > LevelCell::loadCustomLevelCell @ 0x1002391df\n; > LevelInfoLayer::updateLabelValues @ 0x1002b0213\n; > PauseLayer::customSetup @ 0x1003c0756\n; > EndLevelLayer::customSetup @ 0x1004ba7aa\n; > GameLevelManager::getLevelLeaderboard @ 0x100565f05\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:19:32 +0000\n; \npush    rbp                                                            ; +0x0, 0x100035960\nmov     rbp, rsp                                                       ; +0x1, 0x100035961\npush    r15                                                            ; +0x4, 0x100035964\npush    r14                                                            ; +0x6, 0x100035966\npush    r13                                                            ; +0x8, 0x100035968\npush    r12                                                            ; +0xa, 0x10003596a\npush    rbx                                                            ; +0xc, 0x10003596c\nsub     rsp, 18h                                                       ; +0xd, 0x10003596d\nmov     r14, rsi                                                       ; +0x11, 0x100035971\nmov     rbx, [rdi+270h]                                                ; +0x14, 0x100035974\nmov     rdi, rsi; __s                                                  ; +0x1b, 0x10003597b\ncall    _strlen                                                        ; +0x1e, 0x10003597e\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x23, 0x100035983\njnb     loc_100035A21                                                  ; +0x27, 0x100035987\nmov     r15, rax                                                       ; +0x2d, 0x10003598d\ncmp     rax, 17h                                                       ; +0x30, 0x100035990\njnb     short loc_1000359A8                                            ; +0x34, 0x100035994\nlea     eax, [r15+r15]                                                 ; +0x36, 0x100035996\nmov     byte ptr [rbp+__dst], al                                       ; +0x3a, 0x10003599a\nlea     r12, [rbp+__dst+1]                                             ; +0x3d, 0x10003599d\ntest    r15, r15                                                       ; +0x41, 0x1000359a1\njnz     short loc_1000359DB                                            ; +0x44, 0x1000359a4\njmp     short loc_1000359E9                                            ; +0x46, 0x1000359a6\nmov     rax, r15                                                       ; +0x48, 0x1000359a8\nor      rax, 7                                                         ; +0x4b, 0x1000359ab\nlea     rcx, [rax+1]                                                   ; +0x4f, 0x1000359af\ncmp     rax, 17h                                                       ; +0x53, 0x1000359b3\nmov     r13d, 1Ah                                                      ; +0x57, 0x1000359b7\ncmovnz  r13, rcx                                                       ; +0x5d, 0x1000359bd\nmov     rdi, r13; __sz                                                 ; +0x61, 0x1000359c1\ncall    __Znwm; operator new(ulong)                                    ; +0x64, 0x1000359c4\nmov     r12, rax                                                       ; +0x69, 0x1000359c9\nmov     [rbp+__p], rax                                                 ; +0x6c, 0x1000359cc\ninc     r13                                                            ; +0x70, 0x1000359d0\nmov     [rbp+__dst], r13                                               ; +0x73, 0x1000359d3\nmov     [rbp+var_38], r15                                              ; +0x77, 0x1000359d7\nmov     rdi, r12; __dst                                                ; +0x7b, 0x1000359db\nmov     rsi, r14; __src                                                ; +0x7e, 0x1000359de\nmov     rdx, r15; __n                                                  ; +0x81, 0x1000359e1\ncall    _memcpy                                                        ; +0x84, 0x1000359e4\nmov     byte ptr [r12+r15], 0                                          ; +0x89, 0x1000359e9\nlea     rsi, [rbp+__dst]                                               ; +0x8e, 0x1000359ee\nmov     rdi, rbx                                                       ; +0x92, 0x1000359f2\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x95, 0x1000359f5\nmov     rbx, rax                                                       ; +0x9a, 0x1000359fa\ntest    byte ptr [rbp+__dst], 1                                        ; +0x9d, 0x1000359fd\njz      short loc_100035A0C                                            ; +0xa1, 0x100035a01\nmov     rdi, [rbp+__p]; __p                                            ; +0xa3, 0x100035a03\ncall    __ZdlPv; operator delete(void *)                               ; +0xa7, 0x100035a07\ntest    rbx, rbx                                                       ; +0xac, 0x100035a0c\nsetnz   al                                                             ; +0xaf, 0x100035a0f\nadd     rsp, 18h                                                       ; +0xb2, 0x100035a12\npop     rbx                                                            ; +0xb6, 0x100035a16\npop     r12                                                            ; +0xb7, 0x100035a17\npop     r13                                                            ; +0xb9, 0x100035a19\npop     r14                                                            ; +0xbb, 0x100035a1b\npop     r15                                                            ; +0xbd, 0x100035a1d\npop     rbp                                                            ; +0xbf, 0x100035a1f\nretn                                                                   ; +0xc0, 0x100035a20\ncall    sub_100003630                                                  ; +0xc1, 0x100035a21", "xrefs": ["GameStatsManager::checkCoinsForLevel @ 0x100035673", "GameStatsManager::checkCoinsForLevel @ 0x100035766", "GameStatsManager::checkCoinsForLevel @ 0x100035859", "GJBaseGameLayer::hasUniqueCoin @ 0x10010646b", "GJBaseGameLayer::processItems @ 0x1001070f3", "LevelCell::loadCustomLevelCell @ 0x1002391df", "LevelInfoLayer::updateLabelValues @ 0x1002b0213", "PauseLayer::customSetup @ 0x1003c0756", "EndLevelLayer::customSetup @ 0x1004ba7aa", "GameLevelManager::getLevelLeaderboard @ 0x100565f05"], "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"}