{"type": "func", "start": 5370829248, "end": 5370829887, "name": "EndLevelLayer::onLevelLeaderboard", "pseudocode": "// \n// EndLevelLayer::onLevelLeaderboard from 0x1402059c0 to 0x140205c3f (639 bytes)\n// \n// 2 xrefs:\n// > EndLevelLayer::customSetup @ 0x140205093\n// > <???> @ 0x14091b140\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 11:28:15 +0000\n// \n\n// Hidden C++ exception states: #wind=4\nvoid __fastcall EndLevelLayer::onLevelLeaderboard(__int64 a1)\n{\n  __int64 v2; // rbx\n  cocos2d::CCString *v3; // rax\n  unsigned int v4; // r14d\n  void *v5; // r8\n  __int64 v6; // rsi\n  cocos2d::CCString *v7; // rax\n  unsigned int v8; // esi\n  void *v9; // r8\n  __int64 v10; // rax\n  void *v11; // [rsp+30h] [rbp-50h]\n  void *v12; // [rsp+30h] [rbp-50h]\n  void *Block[2]; // [rsp+38h] [rbp-48h] BYREF\n  __int64 v14; // [rsp+48h] [rbp-38h]\n  unsigned __int64 v15; // [rsp+50h] [rbp-30h]\n  void *Src[2]; // [rsp+58h] [rbp-28h] BYREF\n  __int64 v17; // [rsp+68h] [rbp-18h]\n  unsigned __int64 v18; // [rsp+70h] [rbp-10h]\n\n  if ( !*(_BYTE *)(a1 + 619) && *(_QWORD *)(a1 + 608) )\n  {\n    v2 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v11 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager(v11);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v2 = qword_14090BFD0;\n    }\n    *(_OWORD *)Block = 0;\n    v14 = 3;\n    v15 = 15;\n    LODWORD(Block[0]) = 6256231;\n    sub_140044D80(Block, \"0164\", 4u);\n    v3 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v2 + 432), Block);\n    v4 = cocos2d::CCString::intValue(v3);\n    if ( v15 > 0xF )\n    {\n      v5 = Block[0];\n      if ( v15 + 1 >= 0x1000 )\n      {\n        v5 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v5);\n    }\n    v14 = 0;\n    v15 = 15;\n    LOBYTE(Block[0]) = 0;\n    v6 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v12 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager(v12);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v6 = qword_14090BFD0;\n    }\n    *(_OWORD *)Src = 0;\n    v17 = 3;\n    v18 = 15;\n    LODWORD(Src[0]) = 6256231;\n    sub_140044D80(Src, \"0098\", 4u);\n    v7 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v6 + 432), Src);\n    v8 = cocos2d::CCString::intValue(v7);\n    if ( v18 > 0xF )\n    {\n      v9 = Src[0];\n      if ( v18 + 1 >= 0x1000 )\n      {\n        v9 = *((void **)Src[0] - 1);\n        if ( (unsigned __int64)((char *)Src[0] - (char *)v9 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v9);\n    }\n    v10 = LevelLeaderboard::create(*(_QWORD *)(*(_QWORD *)(a1 + 608) + 2168LL), v8, v4);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 1064LL))(v10);\n  }\n}", "assembly": "; \n; EndLevelLayer::onLevelLeaderboard from 0x1402059c0 to 0x140205c3f (639 bytes)\n; \n; 2 xrefs:\n; > EndLevelLayer::customSetup @ 0x140205093\n; > <???> @ 0x14091b140\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 11:28:15 +0000\n; \nmov     [rsp-18h+arg_8], rbx                                           ; +0x0, 0x1402059c0\nmov     [rsp-18h+arg_10], rsi                                          ; +0x5, 0x1402059c5\npush    rbp                                                            ; +0xa, 0x1402059ca\npush    rdi                                                            ; +0xb, 0x1402059cb\npush    r14                                                            ; +0xc, 0x1402059cc\nmov     rbp, rsp                                                       ; +0xe, 0x1402059ce\nsub     rsp, 80h                                                       ; +0x11, 0x1402059d1\nmov     rax, cs:__security_cookie                                      ; +0x18, 0x1402059d8\nxor     rax, rsp                                                       ; +0x1f, 0x1402059df\nmov     [rbp+var_8], rax                                               ; +0x22, 0x1402059e2\nmov     rdi, rcx                                                       ; +0x26, 0x1402059e6\ncmp     byte ptr [rcx+26Bh], 0                                         ; +0x29, 0x1402059e9\njnz     loc_140205C1B                                                  ; +0x30, 0x1402059f0\ncmp     qword ptr [rcx+260h], 0                                        ; +0x36, 0x1402059f6\njz      loc_140205C1B                                                  ; +0x3e, 0x1402059fe\nmov     rbx, cs:qword_14090BFD0                                        ; +0x44, 0x140205a04\ntest    rbx, rbx                                                       ; +0x4b, 0x140205a0b\njnz     short loc_140205A41                                            ; +0x4e, 0x140205a0e\nmov     ecx, 6E8h; Size                                                ; +0x50, 0x140205a10\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x55, 0x140205a15\nmov     [rbp+var_50], rax                                              ; +0x5a, 0x140205a1a\nmov     rcx, rax                                                       ; +0x5e, 0x140205a1e\ncall    GameManager__GameManager                                       ; +0x61, 0x140205a21\nnop                                                                    ; +0x66, 0x140205a26\nmov     cs:qword_14090BFD0, rax                                        ; +0x67, 0x140205a27\nmov     rcx, [rax]                                                     ; +0x6e, 0x140205a2e\nmov     rdx, [rcx+48h]                                                 ; +0x71, 0x140205a31\nmov     rcx, rax                                                       ; +0x75, 0x140205a35\ncall    rdx                                                            ; +0x78, 0x140205a38\nmov     rbx, cs:qword_14090BFD0                                        ; +0x7a, 0x140205a3a\nxorps   xmm0, xmm0                                                     ; +0x81, 0x140205a41\nmovups  xmmword ptr [rbp+Block], xmm0                                  ; +0x84, 0x140205a44\nmov     [rbp+var_38], 3                                                ; +0x88, 0x140205a48\nmov     [rbp+var_30], 0Fh                                              ; +0x90, 0x140205a50\nmov     eax, cs:dword_140757618                                        ; +0x98, 0x140205a58\nmov     word ptr [rbp+Block], ax                                       ; +0x9e, 0x140205a5e\nmovzx   eax, byte ptr cs:dword_140757618+2                             ; +0xa2, 0x140205a62\nmov     byte ptr [rbp+Block+2], al                                     ; +0xa9, 0x140205a69\nmov     byte ptr [rbp+Block+3], 0                                      ; +0xac, 0x140205a6c\nmov     r8d, 4; Size                                                   ; +0xb0, 0x140205a70\nlea     rdx, a0164; \"0164\"                                             ; +0xb6, 0x140205a76\nlea     rcx, [rbp+Block]; Src                                          ; +0xbd, 0x140205a7d\ncall    sub_140044D80                                                  ; +0xc1, 0x140205a81\nlea     rdx, [rbp+Block]                                               ; +0xc6, 0x140205a86\nmov     rcx, [rbx+1B0h]                                                ; +0xca, 0x140205a8a\ncall    cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0xd1, 0x140205a91\nmov     rcx, rax                                                       ; +0xd7, 0x140205a97\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0xda, 0x140205a9a\nmov     r14d, eax                                                      ; +0xe0, 0x140205aa0\nmov     rdx, [rbp+var_30]                                              ; +0xe3, 0x140205aa3\ncmp     rdx, 0Fh                                                       ; +0xe7, 0x140205aa7\njbe     short loc_140205AF5                                            ; +0xeb, 0x140205aab\ninc     rdx                                                            ; +0xed, 0x140205aad\nmov     r8, [rbp+Block]                                                ; +0xf0, 0x140205ab0\nmov     rcx, r8                                                        ; +0xf4, 0x140205ab4\ncmp     rdx, 1000h                                                     ; +0xf7, 0x140205ab7\njb      short loc_140205AED                                            ; +0xfe, 0x140205abe\nadd     rdx, 27h ; '''                                                 ; +0x100, 0x140205ac0\nmov     r8, [r8-8]                                                     ; +0x104, 0x140205ac4\nsub     rcx, r8                                                        ; +0x108, 0x140205ac8\nsub     rcx, 8                                                         ; +0x10b, 0x140205acb\ncmp     rcx, 1Fh                                                       ; +0x10f, 0x140205acf\njbe     short loc_140205AED                                            ; +0x113, 0x140205ad3\nxor     ebx, ebx                                                       ; +0x115, 0x140205ad5\nmov     [rsp+80h+Reserved], rbx; Reserved                              ; +0x117, 0x140205ad7\nxor     r9d, r9d; LineNo                                               ; +0x11c, 0x140205adc\nxor     r8d, r8d; FileName                                             ; +0x11f, 0x140205adf\nxor     edx, edx; FunctionName                                         ; +0x122, 0x140205ae2\nxor     ecx, ecx; Expression                                           ; +0x124, 0x140205ae4\ncall    cs:_invoke_watson                                              ; +0x126, 0x140205ae6\ndb 0CCh                                                                ; +0x12c, 0x140205aec\nmov     rcx, r8; Block                                                 ; +0x12d, 0x140205aed\ncall    j_j_free                                                       ; +0x130, 0x140205af0\nxor     ebx, ebx                                                       ; +0x135, 0x140205af5\nmov     [rbp+var_38], rbx                                              ; +0x137, 0x140205af7\nmov     [rbp+var_30], 0Fh                                              ; +0x13b, 0x140205afb\nmov     byte ptr [rbp+Block], bl                                       ; +0x143, 0x140205b03\nmov     rsi, cs:qword_14090BFD0                                        ; +0x146, 0x140205b06\ntest    rsi, rsi                                                       ; +0x14d, 0x140205b0d\njnz     short loc_140205B43                                            ; +0x150, 0x140205b10\nmov     ecx, 6E8h; Size                                                ; +0x152, 0x140205b12\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x157, 0x140205b17\nmov     [rbp+var_50], rax                                              ; +0x15c, 0x140205b1c\nmov     rcx, rax                                                       ; +0x160, 0x140205b20\ncall    GameManager__GameManager                                       ; +0x163, 0x140205b23\nnop                                                                    ; +0x168, 0x140205b28\nmov     cs:qword_14090BFD0, rax                                        ; +0x169, 0x140205b29\nmov     rcx, [rax]                                                     ; +0x170, 0x140205b30\nmov     rdx, [rcx+48h]                                                 ; +0x173, 0x140205b33\nmov     rcx, rax                                                       ; +0x177, 0x140205b37\ncall    rdx                                                            ; +0x17a, 0x140205b3a\nmov     rsi, cs:qword_14090BFD0                                        ; +0x17c, 0x140205b3c\nxorps   xmm0, xmm0                                                     ; +0x183, 0x140205b43\nmovups  xmmword ptr [rbp+Src], xmm0                                    ; +0x186, 0x140205b46\nmov     [rbp+var_18], 3                                                ; +0x18a, 0x140205b4a\nmov     [rbp+var_10], 0Fh                                              ; +0x192, 0x140205b52\nmov     eax, cs:dword_140757618                                        ; +0x19a, 0x140205b5a\nmov     word ptr [rbp+Src], ax                                         ; +0x1a0, 0x140205b60\nmovzx   eax, byte ptr cs:dword_140757618+2                             ; +0x1a4, 0x140205b64\nmov     byte ptr [rbp+Src+2], al                                       ; +0x1ab, 0x140205b6b\nmov     byte ptr [rbp+Src+3], 0                                        ; +0x1ae, 0x140205b6e\nmov     r8d, 4; Size                                                   ; +0x1b2, 0x140205b72\nlea     rdx, a0098; \"0098\"                                             ; +0x1b8, 0x140205b78\nlea     rcx, [rbp+Src]; Src                                            ; +0x1bf, 0x140205b7f\ncall    sub_140044D80                                                  ; +0x1c3, 0x140205b83\nlea     rdx, [rbp+Src]                                                 ; +0x1c8, 0x140205b88\nmov     rcx, [rsi+1B0h]                                                ; +0x1cc, 0x140205b8c\ncall    cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0x1d3, 0x140205b93\nmov     rcx, rax                                                       ; +0x1d9, 0x140205b99\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0x1dc, 0x140205b9c\nmov     esi, eax                                                       ; +0x1e2, 0x140205ba2\nmov     rdx, [rbp+var_10]                                              ; +0x1e4, 0x140205ba4\ncmp     rdx, 0Fh                                                       ; +0x1e8, 0x140205ba8\njbe     short loc_140205BF4                                            ; +0x1ec, 0x140205bac\ninc     rdx                                                            ; +0x1ee, 0x140205bae\nmov     r8, [rbp+Src]                                                  ; +0x1f1, 0x140205bb1\nmov     rcx, r8                                                        ; +0x1f5, 0x140205bb5\ncmp     rdx, 1000h                                                     ; +0x1f8, 0x140205bb8\njb      short loc_140205BEC                                            ; +0x1ff, 0x140205bbf\nadd     rdx, 27h ; '''                                                 ; +0x201, 0x140205bc1\nmov     r8, [r8-8]                                                     ; +0x205, 0x140205bc5\nsub     rcx, r8                                                        ; +0x209, 0x140205bc9\nsub     rcx, 8                                                         ; +0x20c, 0x140205bcc\ncmp     rcx, 1Fh                                                       ; +0x210, 0x140205bd0\njbe     short loc_140205BEC                                            ; +0x214, 0x140205bd4\nmov     [rsp+80h+Reserved], rbx; Reserved                              ; +0x216, 0x140205bd6\nxor     r9d, r9d; LineNo                                               ; +0x21b, 0x140205bdb\nxor     r8d, r8d; FileName                                             ; +0x21e, 0x140205bde\nxor     edx, edx; FunctionName                                         ; +0x221, 0x140205be1\nxor     ecx, ecx; Expression                                           ; +0x223, 0x140205be3\ncall    cs:_invoke_watson                                              ; +0x225, 0x140205be5\nalign 4                                                                ; +0x22b, 0x140205beb\nmov     rcx, r8; Block                                                 ; +0x22c, 0x140205bec\ncall    j_j_free                                                       ; +0x22f, 0x140205bef\nmov     rcx, [rdi+260h]                                                ; +0x234, 0x140205bf4\nmov     r8d, r14d                                                      ; +0x23b, 0x140205bfb\nmov     edx, esi                                                       ; +0x23e, 0x140205bfe\nmov     rcx, [rcx+878h]                                                ; +0x240, 0x140205c00\ncall    LevelLeaderboard__create                                       ; +0x247, 0x140205c07\nmov     rcx, [rax]                                                     ; +0x24c, 0x140205c0c\nmov     rdx, [rcx+428h]                                                ; +0x24f, 0x140205c0f\nmov     rcx, rax                                                       ; +0x256, 0x140205c16\ncall    rdx                                                            ; +0x259, 0x140205c19\nmov     rcx, [rbp+var_8]                                               ; +0x25b, 0x140205c1b\nxor     rcx, rsp; StackCookie                                          ; +0x25f, 0x140205c1f\ncall    __security_check_cookie                                        ; +0x262, 0x140205c22\nlea     r11, [rsp+80h+var_s0]                                          ; +0x267, 0x140205c27\nmov     rbx, [r11+28h]                                                 ; +0x26f, 0x140205c2f\nmov     rsi, [r11+30h]                                                 ; +0x273, 0x140205c33\nmov     rsp, r11                                                       ; +0x277, 0x140205c37\npop     r14                                                            ; +0x27a, 0x140205c3a\npop     rdi                                                            ; +0x27c, 0x140205c3c\npop     rbp                                                            ; +0x27d, 0x140205c3d\nretn                                                                   ; +0x27e, 0x140205c3e", "xrefs": ["EndLevelLayer::customSetup @ 0x140205093", "<???> @ 0x14091b140"], "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"}