{"type": "func", "start": 5371865104, "end": 5371865478, "name": "LevelLeaderboard::onUpdate", "pseudocode": "// \n// LevelLeaderboard::onUpdate from 0x140302810 to 0x140302986 (374 bytes)\n// \n// 2 xrefs:\n// > LevelLeaderboard::init @ 0x14030145d\n// > <???> @ 0x1406d43dc\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=4\nvoid LevelLeaderboard::onUpdate(LevelLeaderboard *a1, cocos2d::CCObject *a2)\n{\n  GJAccountManager *v3; // rax\n  GameLevelManager *v4; // rcx\n  GameLevelManager *v5; // rcx\n  _BOOL8 v6; // rdx\n  GameLevelManager *v7; // rcx\n  void *v8; // [rsp+40h] [rbp+18h]\n  void *v9; // [rsp+40h] [rbp+18h]\n  void *v10; // [rsp+40h] [rbp+18h]\n\n  v3 = GJAccountManager::sharedState();\n  if ( v3->m_accountID - v3->m_unkInt1 > 0 )\n  {\n    v4 = (GameLevelManager *)qword_1406C2EC0;\n    if ( !qword_1406C2EC0 )\n    {\n      v8 = operator new(0x3D0u);\n      qword_1406C2EC0 = sub_140141280((__int64)v8);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n      v4 = (GameLevelManager *)qword_1406C2EC0;\n    }\n    if ( (unsigned int)(GameLevelManager::getTimeLeft(v4, \"upd_ll\", 5.0) - 1) > 4 )\n    {\n      v5 = (GameLevelManager *)qword_1406C2EC0;\n      if ( !qword_1406C2EC0 )\n      {\n        v9 = operator new(0x3D0u);\n        qword_1406C2EC0 = sub_140141280((__int64)v9);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n        v5 = (GameLevelManager *)qword_1406C2EC0;\n      }\n      GameLevelManager::makeTimeStamp(v5, \"upd_ll\");\n      a1->m_noInternet->setVisible(a1->m_noInternet, 0);\n      LOBYTE(v6) = 1;\n      a1->m_circle->setVisible(a1->m_circle, v6);\n      a1->m_refreshBtn->setVisible(a1->m_refreshBtn, 0);\n      LevelLeaderboard::setupLeaderboard(a1, nullptr);\n      v7 = (GameLevelManager *)qword_1406C2EC0;\n      if ( !qword_1406C2EC0 )\n      {\n        v10 = operator new(0x3D0u);\n        qword_1406C2EC0 = sub_140141280((__int64)v10);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n        v7 = (GameLevelManager *)qword_1406C2EC0;\n      }\n      v7->m_leaderboardManagerDelegate = &a1->LeaderboardManagerDelegate;\n      GameLevelManager::getLevelLeaderboard(v7, a1->m_level, a1->m_type, a1->m_mode);\n    }\n  }\n}", "assembly": "; \n; LevelLeaderboard::onUpdate from 0x140302810 to 0x140302986 (374 bytes)\n; \n; 2 xrefs:\n; > LevelLeaderboard::init @ 0x14030145d\n; > <???> @ 0x1406d43dc\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_0], rbx                                               ; +0x0, 0x140302810\npush    rdi                                                            ; +0x5, 0x140302815\nsub     rsp, 20h                                                       ; +0x6, 0x140302816\nmov     rbx, rcx                                                       ; +0xa, 0x14030281a\ncall    GJAccountManager__sharedState                                  ; +0xd, 0x14030281d\nmov     edx, [rax+168h]                                                ; +0x12, 0x140302822\nsub     edx, [rax+16Ch]                                                ; +0x18, 0x140302828\ntest    edx, edx                                                       ; +0x1e, 0x14030282e\njle     loc_14030297B                                                  ; +0x20, 0x140302830\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x26, 0x140302836\ntest    rcx, rcx                                                       ; +0x2d, 0x14030283d\njnz     short loc_140302871                                            ; +0x30, 0x140302840\nmov     ecx, 3D0h; Size                                                ; +0x32, 0x140302842\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x37, 0x140302847\nmov     [rsp+28h+arg_10], rax                                          ; +0x3c, 0x14030284c\nmov     rcx, rax                                                       ; +0x41, 0x140302851\ncall    sub_140141280                                                  ; +0x44, 0x140302854\nnop                                                                    ; +0x49, 0x140302859\nmov     cs:qword_1406C2EC0, rax                                        ; +0x4a, 0x14030285a\nmov     rdx, [rax]                                                     ; +0x51, 0x140302861\nmov     rcx, rax                                                       ; +0x54, 0x140302864\ncall    qword ptr [rdx+48h]                                            ; +0x57, 0x140302867\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x5a, 0x14030286a\nmovss   xmm2, cs:flt_140623010                                         ; +0x61, 0x140302871\nlea     rdx, aUpdLl; \"upd_ll\"                                          ; +0x69, 0x140302879\ncall    GameLevelManager__getTimeLeft                                  ; +0x70, 0x140302880\ndec     eax                                                            ; +0x75, 0x140302885\ncmp     eax, 4                                                         ; +0x77, 0x140302887\njbe     loc_14030297B                                                  ; +0x7a, 0x14030288a\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x80, 0x140302890\ntest    rcx, rcx                                                       ; +0x87, 0x140302897\njnz     short loc_1403028CC                                            ; +0x8a, 0x14030289a\nmov     ecx, 3D0h; Size                                                ; +0x8c, 0x14030289c\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x91, 0x1403028a1\nmov     [rsp+28h+arg_10], rax                                          ; +0x96, 0x1403028a6\nmov     rcx, rax                                                       ; +0x9b, 0x1403028ab\ncall    sub_140141280                                                  ; +0x9e, 0x1403028ae\nnop                                                                    ; +0xa3, 0x1403028b3\nmov     cs:qword_1406C2EC0, rax                                        ; +0xa4, 0x1403028b4\nmov     r8, [rax]                                                      ; +0xab, 0x1403028bb\nmov     rcx, rax                                                       ; +0xae, 0x1403028be\ncall    qword ptr [r8+48h]                                             ; +0xb1, 0x1403028c1\nmov     rcx, cs:qword_1406C2EC0                                        ; +0xb5, 0x1403028c5\nlea     rdx, aUpdLl; \"upd_ll\"                                          ; +0xbc, 0x1403028cc\ncall    GameLevelManager__makeTimeStamp                                ; +0xc3, 0x1403028d3\nmov     rcx, [rbx+2B0h]                                                ; +0xc8, 0x1403028d8\nmov     rax, [rcx]                                                     ; +0xcf, 0x1403028df\nxor     edx, edx                                                       ; +0xd2, 0x1403028e2\ncall    qword ptr [rax+140h]                                           ; +0xd4, 0x1403028e4\nmov     rcx, [rbx+2A8h]                                                ; +0xda, 0x1403028ea\nmov     rax, [rcx]                                                     ; +0xe1, 0x1403028f1\nmov     dl, 1                                                          ; +0xe4, 0x1403028f4\ncall    qword ptr [rax+140h]                                           ; +0xe6, 0x1403028f6\nmov     rcx, [rbx+2B8h]                                                ; +0xec, 0x1403028fc\nmov     rax, [rcx]                                                     ; +0xf3, 0x140302903\nxor     edx, edx                                                       ; +0xf6, 0x140302906\ncall    qword ptr [rax+140h]                                           ; +0xf8, 0x140302908\nxor     edx, edx                                                       ; +0xfe, 0x14030290e\nmov     rcx, rbx                                                       ; +0x100, 0x140302910\ncall    LevelLeaderboard__setupLeaderboard                             ; +0x103, 0x140302913\nlea     rdi, [rbx+278h]                                                ; +0x108, 0x140302918\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x10f, 0x14030291f\ntest    rcx, rcx                                                       ; +0x116, 0x140302926\njnz     short loc_14030295A                                            ; +0x119, 0x140302929\nmov     ecx, 3D0h; Size                                                ; +0x11b, 0x14030292b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x120, 0x140302930\nmov     [rsp+28h+arg_10], rax                                          ; +0x125, 0x140302935\nmov     rcx, rax                                                       ; +0x12a, 0x14030293a\ncall    sub_140141280                                                  ; +0x12d, 0x14030293d\nnop                                                                    ; +0x132, 0x140302942\nmov     cs:qword_1406C2EC0, rax                                        ; +0x133, 0x140302943\nmov     rdx, [rax]                                                     ; +0x13a, 0x14030294a\nmov     rcx, rax                                                       ; +0x13d, 0x14030294d\ncall    qword ptr [rdx+48h]                                            ; +0x140, 0x140302950\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x143, 0x140302953\nmov     [rcx+308h], rdi                                                ; +0x14a, 0x14030295a\nmov     r9d, [rbx+294h]                                                ; +0x151, 0x140302961\nmov     r8d, [rbx+290h]                                                ; +0x158, 0x140302968\nmov     rdx, [rbx+288h]                                                ; +0x15f, 0x14030296f\ncall    GameLevelManager__getLevelLeaderboard                          ; +0x166, 0x140302976\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x16b, 0x14030297b\nadd     rsp, 20h                                                       ; +0x170, 0x140302980\npop     rdi                                                            ; +0x174, 0x140302984\nretn                                                                   ; +0x175, 0x140302985", "xrefs": ["LevelLeaderboard::init @ 0x14030145d", "<???> @ 0x1406d43dc"], "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"}