{"type": "func", "start": 5369972832, "end": 5369973088, "name": "EndLevelLayer::onLevelLeaderboard", "pseudocode": "// \n// EndLevelLayer::onLevelLeaderboard from 0x140134860 to 0x140134960 (256 bytes)\n// \n// 2 xrefs:\n// > EndLevelLayer::customSetup @ 0x140134023\n// > <???> @ 0x1406c9e94\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\n// Hidden C++ exception states: #wind=2\nvoid EndLevelLayer::onLevelLeaderboard(EndLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // rsi\n  GameManager *v4; // rbp\n  GJGameLevel *m_level; // rdi\n  LevelLeaderboardMode IntGameVariable; // ebx\n  LevelLeaderboardType v7; // eax\n  LevelLeaderboard *v8; // rax\n  void *v9; // [rsp+30h] [rbp+8h]\n  void *v10; // [rsp+30h] [rbp+8h]\n\n  if ( !a1->m_exiting && a1->m_playLayer )\n  {\n    v3 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v9 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v9);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v3 = (GameManager *)qword_1406C2ED8;\n    }\n    v4 = v3;\n    if ( !v3 )\n    {\n      v10 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v10);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v3 = (GameManager *)qword_1406C2ED8;\n    }\n    m_level = a1->m_playLayer->m_level;\n    IntGameVariable = GameManager::getIntGameVariable(v4, \"0164\");\n    v7 = GameManager::getIntGameVariable(v3, \"0098\");\n    v8 = LevelLeaderboard::create(m_level, v7, IntGameVariable);\n    v8->show(v8);\n  }\n}", "assembly": "; \n; EndLevelLayer::onLevelLeaderboard from 0x140134860 to 0x140134960 (256 bytes)\n; \n; 2 xrefs:\n; > EndLevelLayer::customSetup @ 0x140134023\n; > <???> @ 0x1406c9e94\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140134860\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140134865\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x14013486a\npush    rdi                                                            ; +0xf, 0x14013486f\nsub     rsp, 20h                                                       ; +0x10, 0x140134870\nmov     rbx, rcx                                                       ; +0x14, 0x140134874\ncmp     byte ptr [rcx+26Bh], 0                                         ; +0x17, 0x140134877\njnz     loc_14013494B                                                  ; +0x1e, 0x14013487e\ncmp     qword ptr [rcx+260h], 0                                        ; +0x24, 0x140134884\njz      loc_14013494B                                                  ; +0x2c, 0x14013488c\nmov     rsi, cs:qword_1406C2ED8                                        ; +0x32, 0x140134892\ntest    rsi, rsi                                                       ; +0x39, 0x140134899\njnz     short loc_1401348CD                                            ; +0x3c, 0x14013489c\nmov     ecx, 668h; Size                                                ; +0x3e, 0x14013489e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x43, 0x1401348a3\nmov     [rsp+28h+arg_0], rax                                           ; +0x48, 0x1401348a8\nmov     rcx, rax                                                       ; +0x4d, 0x1401348ad\ncall    sub_14017AB00                                                  ; +0x50, 0x1401348b0\nnop                                                                    ; +0x55, 0x1401348b5\nmov     cs:qword_1406C2ED8, rax                                        ; +0x56, 0x1401348b6\nmov     rdx, [rax]                                                     ; +0x5d, 0x1401348bd\nmov     rcx, rax                                                       ; +0x60, 0x1401348c0\ncall    qword ptr [rdx+48h]                                            ; +0x63, 0x1401348c3\nmov     rsi, cs:qword_1406C2ED8                                        ; +0x66, 0x1401348c6\nmov     rbp, rsi                                                       ; +0x6d, 0x1401348cd\ntest    rsi, rsi                                                       ; +0x70, 0x1401348d0\njnz     short loc_140134904                                            ; +0x73, 0x1401348d3\nmov     ecx, 668h; Size                                                ; +0x75, 0x1401348d5\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x7a, 0x1401348da\nmov     [rsp+28h+arg_0], rax                                           ; +0x7f, 0x1401348df\nmov     rcx, rax                                                       ; +0x84, 0x1401348e4\ncall    sub_14017AB00                                                  ; +0x87, 0x1401348e7\nnop                                                                    ; +0x8c, 0x1401348ec\nmov     cs:qword_1406C2ED8, rax                                        ; +0x8d, 0x1401348ed\nmov     rdx, [rax]                                                     ; +0x94, 0x1401348f4\nmov     rcx, rax                                                       ; +0x97, 0x1401348f7\ncall    qword ptr [rdx+48h]                                            ; +0x9a, 0x1401348fa\nmov     rsi, cs:qword_1406C2ED8                                        ; +0x9d, 0x1401348fd\nmov     rax, [rbx+260h]                                                ; +0xa4, 0x140134904\nmov     rdi, [rax+878h]                                                ; +0xab, 0x14013490b\nlea     rdx, a0164; \"0164\"                                             ; +0xb2, 0x140134912\nmov     rcx, rbp                                                       ; +0xb9, 0x140134919\ncall    GameManager__getIntGameVariable                                ; +0xbc, 0x14013491c\nmov     ebx, eax                                                       ; +0xc1, 0x140134921\nlea     rdx, a0098; \"0098\"                                             ; +0xc3, 0x140134923\nmov     rcx, rsi                                                       ; +0xca, 0x14013492a\ncall    GameManager__getIntGameVariable                                ; +0xcd, 0x14013492d\nmov     edx, eax                                                       ; +0xd2, 0x140134932\nmov     r8d, ebx                                                       ; +0xd4, 0x140134934\nmov     rcx, rdi                                                       ; +0xd7, 0x140134937\ncall    LevelLeaderboard__create                                       ; +0xda, 0x14013493a\nmov     rdx, [rax]                                                     ; +0xdf, 0x14013493f\nmov     rcx, rax                                                       ; +0xe2, 0x140134942\ncall    qword ptr [rdx+410h]                                           ; +0xe5, 0x140134945\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xeb, 0x14013494b\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xf0, 0x140134950\nmov     rsi, [rsp+28h+arg_18]                                          ; +0xf5, 0x140134955\nadd     rsp, 20h                                                       ; +0xfa, 0x14013495a\npop     rdi                                                            ; +0xfe, 0x14013495e\nretn                                                                   ; +0xff, 0x14013495f", "xrefs": ["EndLevelLayer::customSetup @ 0x140134023", "<???> @ 0x1406c9e94"], "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"}