{"type": "func", "start": 5370256192, "end": 5370256532, "name": "EditLevelLayer::onLevelLeaderboard", "pseudocode": "// \n// EditLevelLayer::onLevelLeaderboard from 0x140179b40 to 0x140179c94 (340 bytes)\n// \n// 2 xrefs:\n// > EditLevelLayer::init @ 0x140179708\n// > <???> @ 0x1409186bc\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:27:34 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall EditLevelLayer::onLevelLeaderboard(__int64 a1)\n{\n  __int64 v2; // rbx\n  cocos2d::CCString *v3; // rax\n  unsigned int v4; // ebx\n  void *v5; // r8\n  __int64 v6; // rax\n  void *v8; // [rsp+30h] [rbp-38h]\n  void *Block[2]; // [rsp+38h] [rbp-30h] BYREF\n  __int64 v10; // [rsp+48h] [rbp-20h]\n  unsigned __int64 v11; // [rsp+50h] [rbp-18h]\n\n  v2 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v8 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v8);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v2 = qword_14090BFD0;\n  }\n  *(_OWORD *)Block = 0;\n  v10 = 3;\n  v11 = 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 ( v11 > 0xF )\n  {\n    v5 = Block[0];\n    if ( v11 + 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  v6 = LevelLeaderboard::create(*(_QWORD *)(a1 + 472), 3, v4);\n  return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 1064LL))(v6);\n}", "assembly": "; \n; EditLevelLayer::onLevelLeaderboard from 0x140179b40 to 0x140179c94 (340 bytes)\n; \n; 2 xrefs:\n; > EditLevelLayer::init @ 0x140179708\n; > <???> @ 0x1409186bc\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:27:34 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140179b40\npush    rdi                                                            ; +0x5, 0x140179b45\nsub     rsp, 60h                                                       ; +0x6, 0x140179b46\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x140179b4a\nxor     rax, rsp                                                       ; +0x11, 0x140179b51\nmov     [rsp+68h+var_10], rax                                          ; +0x14, 0x140179b54\nmov     rdi, rcx                                                       ; +0x19, 0x140179b59\nmov     rbx, cs:qword_14090BFD0                                        ; +0x1c, 0x140179b5c\ntest    rbx, rbx                                                       ; +0x23, 0x140179b63\njnz     short loc_140179B9A                                            ; +0x26, 0x140179b66\nmov     ecx, 6E8h; Size                                                ; +0x28, 0x140179b68\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2d, 0x140179b6d\nmov     [rsp+68h+var_38], rax                                          ; +0x32, 0x140179b72\nmov     rcx, rax                                                       ; +0x37, 0x140179b77\ncall    GameManager__GameManager                                       ; +0x3a, 0x140179b7a\nnop                                                                    ; +0x3f, 0x140179b7f\nmov     cs:qword_14090BFD0, rax                                        ; +0x40, 0x140179b80\nmov     rcx, [rax]                                                     ; +0x47, 0x140179b87\nmov     rdx, [rcx+48h]                                                 ; +0x4a, 0x140179b8a\nmov     rcx, rax                                                       ; +0x4e, 0x140179b8e\ncall    rdx                                                            ; +0x51, 0x140179b91\nmov     rbx, cs:qword_14090BFD0                                        ; +0x53, 0x140179b93\nxorps   xmm0, xmm0                                                     ; +0x5a, 0x140179b9a\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x5d, 0x140179b9d\nmov     [rsp+68h+var_20], 3                                            ; +0x62, 0x140179ba2\nmov     [rsp+68h+var_18], 0Fh                                          ; +0x6b, 0x140179bab\nmov     eax, cs:dword_140757618                                        ; +0x74, 0x140179bb4\nmov     word ptr [rsp+68h+Block], ax                                   ; +0x7a, 0x140179bba\nmovzx   eax, byte ptr cs:dword_140757618+2                             ; +0x7f, 0x140179bbf\nmov     byte ptr [rsp+68h+Block+2], al                                 ; +0x86, 0x140179bc6\nmov     byte ptr [rsp+68h+Block+3], 0                                  ; +0x8a, 0x140179bca\nmov     r8d, 4; Size                                                   ; +0x8f, 0x140179bcf\nlea     rdx, a0164; \"0164\"                                             ; +0x95, 0x140179bd5\nlea     rcx, [rsp+68h+Block]; Src                                      ; +0x9c, 0x140179bdc\ncall    sub_140044D80                                                  ; +0xa1, 0x140179be1\nlea     rdx, [rsp+68h+Block]                                           ; +0xa6, 0x140179be6\nmov     rcx, [rbx+1B0h]                                                ; +0xab, 0x140179beb\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 &) ; +0xb2, 0x140179bf2\nmov     rcx, rax                                                       ; +0xb8, 0x140179bf8\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0xbb, 0x140179bfb\nmov     ebx, eax                                                       ; +0xc1, 0x140179c01\nmov     rdx, [rsp+68h+var_18]                                          ; +0xc3, 0x140179c03\ncmp     rdx, 0Fh                                                       ; +0xc8, 0x140179c08\njbe     short loc_140179C59                                            ; +0xcc, 0x140179c0c\ninc     rdx                                                            ; +0xce, 0x140179c0e\nmov     r8, [rsp+68h+Block]                                            ; +0xd1, 0x140179c11\nmov     rcx, r8                                                        ; +0xd6, 0x140179c16\ncmp     rdx, 1000h                                                     ; +0xd9, 0x140179c19\njb      short loc_140179C51                                            ; +0xe0, 0x140179c20\nadd     rdx, 27h ; '''                                                 ; +0xe2, 0x140179c22\nmov     r8, [r8-8]                                                     ; +0xe6, 0x140179c26\nsub     rcx, r8                                                        ; +0xea, 0x140179c2a\nsub     rcx, 8                                                         ; +0xed, 0x140179c2d\ncmp     rcx, 1Fh                                                       ; +0xf1, 0x140179c31\njbe     short loc_140179C51                                            ; +0xf5, 0x140179c35\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0xf7, 0x140179c37\nxor     r9d, r9d; LineNo                                               ; +0x100, 0x140179c40\nxor     r8d, r8d; FileName                                             ; +0x103, 0x140179c43\nxor     edx, edx; FunctionName                                         ; +0x106, 0x140179c46\nxor     ecx, ecx; Expression                                           ; +0x108, 0x140179c48\ncall    cs:_invoke_watson                                              ; +0x10a, 0x140179c4a\ndb 0CCh                                                                ; +0x110, 0x140179c50\nmov     rcx, r8; Block                                                 ; +0x111, 0x140179c51\ncall    j_j_free                                                       ; +0x114, 0x140179c54\nmov     r8d, ebx                                                       ; +0x119, 0x140179c59\nmov     edx, 3                                                         ; +0x11c, 0x140179c5c\nmov     rcx, [rdi+1D8h]                                                ; +0x121, 0x140179c61\ncall    LevelLeaderboard__create                                       ; +0x128, 0x140179c68\nmov     rcx, [rax]                                                     ; +0x12d, 0x140179c6d\nmov     rdx, [rcx+428h]                                                ; +0x130, 0x140179c70\nmov     rcx, rax                                                       ; +0x137, 0x140179c77\ncall    rdx                                                            ; +0x13a, 0x140179c7a\nmov     rcx, [rsp+68h+var_10]                                          ; +0x13c, 0x140179c7c\nxor     rcx, rsp; StackCookie                                          ; +0x141, 0x140179c81\ncall    __security_check_cookie                                        ; +0x144, 0x140179c84\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x149, 0x140179c89\nadd     rsp, 60h                                                       ; +0x14e, 0x140179c8e\npop     rdi                                                            ; +0x152, 0x140179c92\nretn                                                                   ; +0x153, 0x140179c93", "xrefs": ["EditLevelLayer::init @ 0x140179708", "<???> @ 0x1409186bc"], "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"}