{"type": "func", "start": 5371849936, "end": 5371850251, "name": "LevelInfoLayer::onUpdate", "pseudocode": "// \n// LevelInfoLayer::onUpdate from 0x1402fecd0 to 0x1402fee0b (315 bytes)\n// \n// 2 xrefs:\n// > LevelInfoLayer::init @ 0x1402f8336\n// > <???> @ 0x1406d42e0\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=3\nvoid LevelInfoLayer::onUpdate(LevelInfoLayer *a1, cocos2d::CCObject *a2)\n{\n  int v3; // edi\n  GameLevelManager *v4; // rsi\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  LevelInfoLayer *v7; // rcx\n  GameLevelManager *v8; // rcx\n  void *v9; // [rsp+30h] [rbp+8h]\n  void *v10; // [rsp+30h] [rbp+8h]\n\n  if ( !a1->m_isBusy )\n  {\n    if ( LevelInfoLayer::shouldDownloadLevel(a1) )\n    {\n      LevelInfoLayer::downloadLevel(a1);\n    }\n    else\n    {\n      v3 = a1->m_level->m_levelID.random - a1->m_level->m_levelID.seed;\n      v4 = (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        v4 = (GameLevelManager *)qword_1406C2EC0;\n      }\n      v5 = cocos2d::CCString::createWithFormat(\"%i\", v3);\n      CString = cocos2d::CCString::getCString(v5);\n      if ( GameLevelManager::isTimeValid(v4, CString, 600.0) )\n      {\n        LevelInfoLayer::showUpdateAlert(v7, UpToDate);\n      }\n      else\n      {\n        v8 = (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          v8 = (GameLevelManager *)qword_1406C2EC0;\n        }\n        v8->m_levelUpdateDelegate = &a1->LevelUpdateDelegate;\n        GameLevelManager::updateLevel(v8, a1->m_level);\n      }\n    }\n  }\n}", "assembly": "; \n; LevelInfoLayer::onUpdate from 0x1402fecd0 to 0x1402fee0b (315 bytes)\n; \n; 2 xrefs:\n; > LevelInfoLayer::init @ 0x1402f8336\n; > <???> @ 0x1406d42e0\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, 0x1402fecd0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1402fecd5\npush    rdi                                                            ; +0xa, 0x1402fecda\nsub     rsp, 20h                                                       ; +0xb, 0x1402fecdb\nmov     rbx, rcx                                                       ; +0xf, 0x1402fecdf\ncmp     byte ptr [rcx+1E0h], 0                                         ; +0x12, 0x1402fece2\njnz     loc_1402FEDFB                                                  ; +0x19, 0x1402fece9\ncall    LevelInfoLayer__shouldDownloadLevel                            ; +0x1f, 0x1402fecef\ntest    al, al                                                         ; +0x24, 0x1402fecf4\njz      short loc_1402FED0F                                            ; +0x26, 0x1402fecf6\nmov     rcx, rbx                                                       ; +0x28, 0x1402fecf8\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x2b, 0x1402fecfb\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x30, 0x1402fed00\nadd     rsp, 20h                                                       ; +0x35, 0x1402fed05\npop     rdi                                                            ; +0x39, 0x1402fed09\njmp     LevelInfoLayer__downloadLevel                                  ; +0x3a, 0x1402fed0a\nmov     rax, [rbx+1F0h]                                                ; +0x3f, 0x1402fed0f\nmov     edi, [rax+148h]                                                ; +0x46, 0x1402fed16\nsub     edi, [rax+14Ch]                                                ; +0x4c, 0x1402fed1c\nmov     rsi, cs:qword_1406C2EC0                                        ; +0x52, 0x1402fed22\ntest    rsi, rsi                                                       ; +0x59, 0x1402fed29\njnz     short loc_1402FED5E                                            ; +0x5c, 0x1402fed2c\nmov     ecx, 3D0h; Size                                                ; +0x5e, 0x1402fed2e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x63, 0x1402fed33\nmov     [rsp+28h+arg_0], rax                                           ; +0x68, 0x1402fed38\nmov     rcx, rax                                                       ; +0x6d, 0x1402fed3d\ncall    sub_140141280                                                  ; +0x70, 0x1402fed40\nnop                                                                    ; +0x75, 0x1402fed45\nmov     cs:qword_1406C2EC0, rax                                        ; +0x76, 0x1402fed46\nmov     r8, [rax]                                                      ; +0x7d, 0x1402fed4d\nmov     rcx, rax                                                       ; +0x80, 0x1402fed50\ncall    qword ptr [r8+48h]                                             ; +0x83, 0x1402fed53\nmov     rsi, cs:qword_1406C2EC0                                        ; +0x87, 0x1402fed57\nmov     edx, edi                                                       ; +0x8e, 0x1402fed5e\nlea     rcx, aI_11; \"%i\"                                               ; +0x90, 0x1402fed60\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x97, 0x1402fed67\nmov     rcx, rax                                                       ; +0x9d, 0x1402fed6d\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xa0, 0x1402fed70\nmovss   xmm2, cs:dword_1406234D0                                       ; +0xa6, 0x1402fed76\nmov     rdx, rax                                                       ; +0xae, 0x1402fed7e\nmov     rcx, rsi                                                       ; +0xb1, 0x1402fed81\ncall    GameLevelManager__isTimeValid                                  ; +0xb4, 0x1402fed84\ntest    al, al                                                         ; +0xb9, 0x1402fed89\njz      short loc_1402FEDA6                                            ; +0xbb, 0x1402fed8b\nmov     edx, 1                                                         ; +0xbd, 0x1402fed8d\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xc2, 0x1402fed92\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xc7, 0x1402fed97\nadd     rsp, 20h                                                       ; +0xcc, 0x1402fed9c\npop     rdi                                                            ; +0xd0, 0x1402feda0\njmp     LevelInfoLayer__showUpdateAlert                                ; +0xd1, 0x1402feda1\nlea     rdi, [rbx+1A0h]                                                ; +0xd6, 0x1402feda6\nmov     rcx, cs:qword_1406C2EC0                                        ; +0xdd, 0x1402fedad\ntest    rcx, rcx                                                       ; +0xe4, 0x1402fedb4\njnz     short loc_1402FEDE8                                            ; +0xe7, 0x1402fedb7\nmov     ecx, 3D0h; Size                                                ; +0xe9, 0x1402fedb9\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xee, 0x1402fedbe\nmov     [rsp+28h+arg_0], rax                                           ; +0xf3, 0x1402fedc3\nmov     rcx, rax                                                       ; +0xf8, 0x1402fedc8\ncall    sub_140141280                                                  ; +0xfb, 0x1402fedcb\nnop                                                                    ; +0x100, 0x1402fedd0\nmov     cs:qword_1406C2EC0, rax                                        ; +0x101, 0x1402fedd1\nmov     rdx, [rax]                                                     ; +0x108, 0x1402fedd8\nmov     rcx, rax                                                       ; +0x10b, 0x1402feddb\ncall    qword ptr [rdx+48h]                                            ; +0x10e, 0x1402fedde\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x111, 0x1402fede1\nmov     [rcx+300h], rdi                                                ; +0x118, 0x1402fede8\nmov     rdx, [rbx+1F0h]                                                ; +0x11f, 0x1402fedef\ncall    GameLevelManager__updateLevel                                  ; +0x126, 0x1402fedf6\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x12b, 0x1402fedfb\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x130, 0x1402fee00\nadd     rsp, 20h                                                       ; +0x135, 0x1402fee05\npop     rdi                                                            ; +0x139, 0x1402fee09\nretn                                                                   ; +0x13a, 0x1402fee0a", "xrefs": ["LevelInfoLayer::init @ 0x1402f8336", "<???> @ 0x1406d42e0"], "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"}