{"type": "func", "start": 5371652672, "end": 5371652987, "name": "LevelBrowserLayer::onRefresh", "pseudocode": "// \n// LevelBrowserLayer::onRefresh from 0x1402cea40 to 0x1402ceb7b (315 bytes)\n// \n// 3 xrefs:\n// > LevelBrowserLayer::init @ 0x1402c9b0f\n// > LevelListLayer::init @ 0x14030499d\n// > <???> @ 0x1406d2de0\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 LevelBrowserLayer::onRefresh(LevelBrowserLayer *a1, cocos2d::CCObject *a2)\n{\n  GJSearchObject *m_searchObject; // rcx\n  const char *Key; // rax\n  size_t v5; // r8\n  void **v6; // rdi\n  GameLevelManager *v7; // rcx\n  CCMenuItemSpriteExtra *m_refreshBtn; // rcx\n  void *v9; // rcx\n  void *v10; // [rsp+20h] [rbp-38h]\n  void *Block[2]; // [rsp+28h] [rbp-30h] BYREF\n  __int64 v12; // [rsp+38h] [rbp-20h]\n  unsigned __int64 v13; // [rsp+40h] [rbp-18h]\n\n  m_searchObject = a1->m_searchObject;\n  if ( m_searchObject )\n  {\n    Key = GJSearchObject::getKey(m_searchObject);\n    *(_OWORD *)Block = 0;\n    v12 = 0;\n    v13 = 0;\n    v5 = -1;\n    do\n      ++v5;\n    while ( Key[v5] );\n    sub_14003A930(Block, Key, v5);\n    v6 = Block;\n    if ( v13 > 0xF )\n      v6 = (void **)Block[0];\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    GameLevelManager::resetTimerForKey(v7, (const char *)v6);\n    LevelBrowserLayer::loadPage(a1, a1->m_searchObject);\n    m_refreshBtn = a1->m_refreshBtn;\n    if ( m_refreshBtn )\n      m_refreshBtn->setVisible(m_refreshBtn, 0);\n    if ( v13 > 0xF )\n    {\n      v9 = Block[0];\n      if ( v13 + 1 >= 0x1000 )\n      {\n        v9 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v9);\n    }\n  }\n}", "assembly": "; \n; LevelBrowserLayer::onRefresh from 0x1402cea40 to 0x1402ceb7b (315 bytes)\n; \n; 3 xrefs:\n; > LevelBrowserLayer::init @ 0x1402c9b0f\n; > LevelListLayer::init @ 0x14030499d\n; > <???> @ 0x1406d2de0\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, 0x1402cea40\npush    rdi                                                            ; +0x5, 0x1402cea45\nsub     rsp, 50h                                                       ; +0x6, 0x1402cea46\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1402cea4a\nxor     rax, rsp                                                       ; +0x11, 0x1402cea51\nmov     [rsp+58h+var_10], rax                                          ; +0x14, 0x1402cea54\nmov     rbx, rcx                                                       ; +0x19, 0x1402cea59\nmov     rcx, [rcx+298h]                                                ; +0x1c, 0x1402cea5c\ntest    rcx, rcx                                                       ; +0x23, 0x1402cea63\njz      loc_1402CEB63                                                  ; +0x26, 0x1402cea66\ncall    GJSearchObject__getKey                                         ; +0x2c, 0x1402cea6c\nxorps   xmm0, xmm0                                                     ; +0x31, 0x1402cea71\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x34, 0x1402cea74\nxor     ecx, ecx                                                       ; +0x39, 0x1402cea79\nmov     [rsp+58h+var_20], rcx                                          ; +0x3b, 0x1402cea7b\nmov     [rsp+58h+var_18], rcx                                          ; +0x40, 0x1402cea80\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x45, 0x1402cea85\nnop     dword ptr [rax+00h]                                            ; +0x4c, 0x1402cea8c\ninc     r8                                                             ; +0x50, 0x1402cea90\ncmp     [rax+r8], cl                                                   ; +0x53, 0x1402cea93\njnz     short loc_1402CEA90                                            ; +0x57, 0x1402cea97\nmov     rdx, rax                                                       ; +0x59, 0x1402cea99\nlea     rcx, [rsp+58h+Block]                                           ; +0x5c, 0x1402cea9c\ncall    sub_14003A930                                                  ; +0x61, 0x1402ceaa1\nnop                                                                    ; +0x66, 0x1402ceaa6\nlea     rdi, [rsp+58h+Block]                                           ; +0x67, 0x1402ceaa7\ncmp     [rsp+58h+var_18], 0Fh                                          ; +0x6c, 0x1402ceaac\ncmova   rdi, [rsp+58h+Block]                                           ; +0x72, 0x1402ceab2\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x78, 0x1402ceab8\ntest    rcx, rcx                                                       ; +0x7f, 0x1402ceabf\njnz     short loc_1402CEAF4                                            ; +0x82, 0x1402ceac2\nmov     ecx, 3D0h; Size                                                ; +0x84, 0x1402ceac4\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x89, 0x1402ceac9\nmov     [rsp+58h+var_38], rax                                          ; +0x8e, 0x1402ceace\nmov     rcx, rax                                                       ; +0x93, 0x1402cead3\ncall    sub_140141280                                                  ; +0x96, 0x1402cead6\nnop                                                                    ; +0x9b, 0x1402ceadb\nmov     cs:qword_1406C2EC0, rax                                        ; +0x9c, 0x1402ceadc\nmov     r8, [rax]                                                      ; +0xa3, 0x1402ceae3\nmov     rcx, rax                                                       ; +0xa6, 0x1402ceae6\ncall    qword ptr [r8+48h]                                             ; +0xa9, 0x1402ceae9\nmov     rcx, cs:qword_1406C2EC0                                        ; +0xad, 0x1402ceaed\nmov     rdx, rdi                                                       ; +0xb4, 0x1402ceaf4\ncall    GameLevelManager__resetTimerForKey                             ; +0xb7, 0x1402ceaf7\nmov     rdx, [rbx+298h]                                                ; +0xbc, 0x1402ceafc\nmov     rcx, rbx                                                       ; +0xc3, 0x1402ceb03\ncall    LevelBrowserLayer__loadPage                                    ; +0xc6, 0x1402ceb06\nmov     rcx, [rbx+288h]                                                ; +0xcb, 0x1402ceb0b\ntest    rcx, rcx                                                       ; +0xd2, 0x1402ceb12\njz      short loc_1402CEB23                                            ; +0xd5, 0x1402ceb15\nmov     rax, [rcx]                                                     ; +0xd7, 0x1402ceb17\nxor     edx, edx                                                       ; +0xda, 0x1402ceb1a\ncall    qword ptr [rax+140h]                                           ; +0xdc, 0x1402ceb1c\nnop                                                                    ; +0xe2, 0x1402ceb22\nmov     rdx, [rsp+58h+var_18]                                          ; +0xe3, 0x1402ceb23\ncmp     rdx, 0Fh                                                       ; +0xe8, 0x1402ceb28\njbe     short loc_1402CEB63                                            ; +0xec, 0x1402ceb2c\ninc     rdx                                                            ; +0xee, 0x1402ceb2e\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0xf1, 0x1402ceb31\nmov     rax, rcx                                                       ; +0xf6, 0x1402ceb36\ncmp     rdx, 1000h                                                     ; +0xf9, 0x1402ceb39\njb      short loc_1402CEB5E                                            ; +0x100, 0x1402ceb40\nadd     rdx, 27h ; '''                                                 ; +0x102, 0x1402ceb42\nmov     rcx, [rcx-8]                                                   ; +0x106, 0x1402ceb46\nsub     rax, rcx                                                       ; +0x10a, 0x1402ceb4a\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x10d, 0x1402ceb4d\ncmp     rax, 1Fh                                                       ; +0x111, 0x1402ceb51\njbe     short loc_1402CEB5E                                            ; +0x115, 0x1402ceb55\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x117, 0x1402ceb57\nalign 2                                                                ; +0x11d, 0x1402ceb5d\ncall    j_j_free                                                       ; +0x11e, 0x1402ceb5e\nmov     rcx, [rsp+58h+var_10]                                          ; +0x123, 0x1402ceb63\nxor     rcx, rsp; StackCookie                                          ; +0x128, 0x1402ceb68\ncall    __security_check_cookie                                        ; +0x12b, 0x1402ceb6b\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x130, 0x1402ceb70\nadd     rsp, 50h                                                       ; +0x135, 0x1402ceb75\npop     rdi                                                            ; +0x139, 0x1402ceb79\nretn                                                                   ; +0x13a, 0x1402ceb7a", "xrefs": ["LevelBrowserLayer::init @ 0x1402c9b0f", "LevelListLayer::init @ 0x14030499d", "<???> @ 0x1406d2de0"], "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"}