{"type": "func", "start": 5372808272, "end": 5372808612, "name": "LevelBrowserLayer::onRefresh", "pseudocode": "// \n// LevelBrowserLayer::onRefresh from 0x1403e8c50 to 0x1403e8da4 (340 bytes)\n// \n// 3 xrefs:\n// > LevelBrowserLayer::init @ 0x1403e2fc8\n// > LevelListLayer::init @ 0x14042c755\n// > <???> @ 0x140925034\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:31:44 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nvoid __fastcall LevelBrowserLayer::onRefresh(__int64 a1)\n{\n  __int64 v2; // rcx\n  _BYTE *Key; // rax\n  size_t v4; // r8\n  void **v5; // rdi\n  __int64 v6; // rcx\n  __int64 v7; // rcx\n  void *v8; // rcx\n  void *v9; // [rsp+30h] [rbp-38h]\n  void *Block[2]; // [rsp+38h] [rbp-30h] BYREF\n  __int64 v11; // [rsp+48h] [rbp-20h]\n  unsigned __int64 v12; // [rsp+50h] [rbp-18h]\n\n  v2 = *(_QWORD *)(a1 + 664);\n  if ( v2 )\n  {\n    Key = (_BYTE *)GJSearchObject::getKey(v2);\n    *(_OWORD *)Block = 0;\n    v11 = 0;\n    v12 = 0;\n    v4 = -1;\n    do\n      ++v4;\n    while ( Key[v4] );\n    sub_14003D230(Block, Key, v4);\n    v5 = Block;\n    if ( v12 > 0xF )\n      v5 = (void **)Block[0];\n    v6 = *(_QWORD *)&qword_14090BFB0;\n    if ( !*(_QWORD *)&qword_14090BFB0 )\n    {\n      v9 = operator new(0x690u);\n      *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v9);\n      (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n      v6 = *(_QWORD *)&qword_14090BFB0;\n    }\n    GameLevelManager::resetTimerForKey(v6, v5);\n    LevelBrowserLayer::loadPage(a1, *(int **)(a1 + 664));\n    v7 = *(_QWORD *)(a1 + 648);\n    if ( v7 )\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 336LL))(v7, 0);\n    if ( v12 > 0xF )\n    {\n      v8 = Block[0];\n      if ( v12 + 1 >= 0x1000 )\n      {\n        v8 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v8);\n    }\n  }\n}", "assembly": "; \n; LevelBrowserLayer::onRefresh from 0x1403e8c50 to 0x1403e8da4 (340 bytes)\n; \n; 3 xrefs:\n; > LevelBrowserLayer::init @ 0x1403e2fc8\n; > LevelListLayer::init @ 0x14042c755\n; > <???> @ 0x140925034\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:31:44 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1403e8c50\npush    rdi                                                            ; +0x5, 0x1403e8c55\nsub     rsp, 60h                                                       ; +0x6, 0x1403e8c56\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1403e8c5a\nxor     rax, rsp                                                       ; +0x11, 0x1403e8c61\nmov     [rsp+68h+var_10], rax                                          ; +0x14, 0x1403e8c64\nmov     rbx, rcx                                                       ; +0x19, 0x1403e8c69\nmov     rcx, [rcx+298h]                                                ; +0x1c, 0x1403e8c6c\ntest    rcx, rcx                                                       ; +0x23, 0x1403e8c73\njz      loc_1403E8D8C                                                  ; +0x26, 0x1403e8c76\ncall    GJSearchObject__getKey                                         ; +0x2c, 0x1403e8c7c\nxorps   xmm0, xmm0                                                     ; +0x31, 0x1403e8c81\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x34, 0x1403e8c84\nmov     [rsp+68h+var_20], 0                                            ; +0x39, 0x1403e8c89\nmov     [rsp+68h+var_18], 0                                            ; +0x42, 0x1403e8c92\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x4b, 0x1403e8c9b\ninc     r8                                                             ; +0x52, 0x1403e8ca2\ncmp     byte ptr [rax+r8], 0                                           ; +0x55, 0x1403e8ca5\njnz     short loc_1403E8CA2                                            ; +0x5a, 0x1403e8caa\nmov     rdx, rax                                                       ; +0x5c, 0x1403e8cac\nlea     rcx, [rsp+68h+Block]                                           ; +0x5f, 0x1403e8caf\ncall    sub_14003D230                                                  ; +0x64, 0x1403e8cb4\nnop                                                                    ; +0x69, 0x1403e8cb9\nlea     rdi, [rsp+68h+Block]                                           ; +0x6a, 0x1403e8cba\ncmp     [rsp+68h+var_18], 0Fh                                          ; +0x6f, 0x1403e8cbf\ncmova   rdi, [rsp+68h+Block]                                           ; +0x75, 0x1403e8cc5\nmov     rcx, cs:qword_14090BFB0                                        ; +0x7b, 0x1403e8ccb\ntest    rcx, rcx                                                       ; +0x82, 0x1403e8cd2\njnz     short loc_1403E8D0A                                            ; +0x85, 0x1403e8cd5\nmov     ecx, 690h; Size                                                ; +0x87, 0x1403e8cd7\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x8c, 0x1403e8cdc\nmov     [rsp+68h+var_38], rax                                          ; +0x91, 0x1403e8ce1\nmov     rcx, rax                                                       ; +0x96, 0x1403e8ce6\ncall    GameLevelManager__GameLevelManager                             ; +0x99, 0x1403e8ce9\nnop                                                                    ; +0x9e, 0x1403e8cee\nmov     cs:qword_14090BFB0, rax                                        ; +0x9f, 0x1403e8cef\nmov     rcx, [rax]                                                     ; +0xa6, 0x1403e8cf6\nmov     r8, [rcx+48h]                                                  ; +0xa9, 0x1403e8cf9\nmov     rcx, rax                                                       ; +0xad, 0x1403e8cfd\ncall    r8                                                             ; +0xb0, 0x1403e8d00\nmov     rcx, cs:qword_14090BFB0                                        ; +0xb3, 0x1403e8d03\nmov     rdx, rdi                                                       ; +0xba, 0x1403e8d0a\ncall    GameLevelManager__resetTimerForKey                             ; +0xbd, 0x1403e8d0d\nmov     rdx, [rbx+298h]                                                ; +0xc2, 0x1403e8d12\nmov     rcx, rbx                                                       ; +0xc9, 0x1403e8d19\ncall    LevelBrowserLayer__loadPage                                    ; +0xcc, 0x1403e8d1c\nmov     rcx, [rbx+288h]                                                ; +0xd1, 0x1403e8d21\ntest    rcx, rcx                                                       ; +0xd8, 0x1403e8d28\njz      short loc_1403E8D39                                            ; +0xdb, 0x1403e8d2b\nmov     rax, [rcx]                                                     ; +0xdd, 0x1403e8d2d\nxor     edx, edx                                                       ; +0xe0, 0x1403e8d30\ncall    qword ptr [rax+150h]                                           ; +0xe2, 0x1403e8d32\nnop                                                                    ; +0xe8, 0x1403e8d38\nmov     rdx, [rsp+68h+var_18]                                          ; +0xe9, 0x1403e8d39\ncmp     rdx, 0Fh                                                       ; +0xee, 0x1403e8d3e\njbe     short loc_1403E8D8C                                            ; +0xf2, 0x1403e8d42\ninc     rdx                                                            ; +0xf4, 0x1403e8d44\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0xf7, 0x1403e8d47\nmov     rax, rcx                                                       ; +0xfc, 0x1403e8d4c\ncmp     rdx, 1000h                                                     ; +0xff, 0x1403e8d4f\njb      short loc_1403E8D87                                            ; +0x106, 0x1403e8d56\nadd     rdx, 27h ; '''                                                 ; +0x108, 0x1403e8d58\nmov     rcx, [rcx-8]                                                   ; +0x10c, 0x1403e8d5c\nsub     rax, rcx                                                       ; +0x110, 0x1403e8d60\nsub     rax, 8                                                         ; +0x113, 0x1403e8d63\ncmp     rax, 1Fh                                                       ; +0x117, 0x1403e8d67\njbe     short loc_1403E8D87                                            ; +0x11b, 0x1403e8d6b\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0x11d, 0x1403e8d6d\nxor     r9d, r9d; LineNo                                               ; +0x126, 0x1403e8d76\nxor     r8d, r8d; FileName                                             ; +0x129, 0x1403e8d79\nxor     edx, edx; FunctionName                                         ; +0x12c, 0x1403e8d7c\nxor     ecx, ecx; Expression                                           ; +0x12e, 0x1403e8d7e\ncall    cs:_invoke_watson                                              ; +0x130, 0x1403e8d80\ndb 0CCh                                                                ; +0x136, 0x1403e8d86\ncall    j_j_free                                                       ; +0x137, 0x1403e8d87\nmov     rcx, [rsp+68h+var_10]                                          ; +0x13c, 0x1403e8d8c\nxor     rcx, rsp; StackCookie                                          ; +0x141, 0x1403e8d91\ncall    __security_check_cookie                                        ; +0x144, 0x1403e8d94\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x149, 0x1403e8d99\nadd     rsp, 60h                                                       ; +0x14e, 0x1403e8d9e\npop     rdi                                                            ; +0x152, 0x1403e8da2\nretn                                                                   ; +0x153, 0x1403e8da3", "xrefs": ["LevelBrowserLayer::init @ 0x1403e2fc8", "LevelListLayer::init @ 0x14042c755", "<???> @ 0x140925034"], "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"}