{"type": "func", "start": 5371881232, "end": 5371881680, "name": "LevelListLayer::onRefreshLevelList", "pseudocode": "// \n// LevelListLayer::onRefreshLevelList from 0x140306710 to 0x1403068d0 (448 bytes)\n// \n// 2 xrefs:\n// > LevelListLayer::init @ 0x140304538\n// > <???> @ 0x1406d449c\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 LevelListLayer::onRefreshLevelList(LevelListLayer *a1, cocos2d::CCObject *a2)\n{\n  LevelManagerDelegate *v3; // rbx\n  __int64 v4; // rax\n  CCMenuItemSpriteExtra *m_refreshBtn; // rcx\n  GJSearchObject *v6; // rsi\n  std::string *v7; // rax\n  __int64 v8; // rbx\n  std::string *m_bigStorage; // rdx\n  char *Key; // rax\n  size_t v11; // r8\n  std::string *p_m_searchKey2; // rbx\n  GameLevelManager *v13; // rcx\n  GameLevelManager *v14; // rcx\n  __int64 v15[5]; // [rsp+20h] [rbp-28h] BYREF\n  void *v16; // [rsp+50h] [rbp+8h]\n  void *v17; // [rsp+50h] [rbp+8h]\n  void *v18; // [rsp+50h] [rbp+8h]\n\n  v3 = &a1->LevelManagerDelegate;\n  if ( !a1 )\n    v3 = nullptr;\n  v4 = qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v16 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v16);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v4 = qword_1406C2EC0;\n  }\n  *(_QWORD *)(v4 + 720) = v3;\n  m_refreshBtn = a1->m_refreshBtn;\n  if ( m_refreshBtn )\n    m_refreshBtn->setVisible(m_refreshBtn, 0);\n  LOBYTE(a2) = 1;\n  a1->m_circle->setVisible(a1->m_circle, (bool)a2);\n  LevelBrowserLayer::setupLevelBrowser(a1, nullptr);\n  v6 = GJSearchObject::create_2((SearchType)0);\n  v7 = (std::string *)GameToolbox::intToString(v15, a1->m_levelList->m_listID);\n  v8 = (__int64)v7;\n  if ( &v6->m_searchQuery != v7 )\n  {\n    m_bigStorage = v7;\n    if ( v7->m_data.m_capacity > 0xF )\n      m_bigStorage = (std::string *)v7->m_data.m_bigStorage;\n    sub_14003CCE0((void **)&v6->m_searchQuery, m_bigStorage, v7->m_data.m_size);\n  }\n  sub_14003A830(v8);\n  v6->m_searchMode = 1;\n  Key = (char *)GJSearchObject::getKey(v6);\n  v11 = -1;\n  do\n    ++v11;\n  while ( Key[v11] );\n  p_m_searchKey2 = &a1->m_searchKey2;\n  sub_14003CCE0((void **)&a1->m_searchKey2, Key, v11);\n  if ( a1->m_searchKey2.m_data.m_capacity > 0xF )\n    p_m_searchKey2 = (std::string *)p_m_searchKey2->m_data.m_bigStorage;\n  v13 = (GameLevelManager *)qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v17 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v17);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v13 = (GameLevelManager *)qword_1406C2EC0;\n  }\n  GameLevelManager::resetTimerForKey(v13, p_m_searchKey2->m_data.m_smallStorage._Elems);\n  v14 = (GameLevelManager *)qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v18 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v18);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v14 = (GameLevelManager *)qword_1406C2EC0;\n  }\n  GameLevelManager::getLevelLists(v14, v6);\n}", "assembly": "; \n; LevelListLayer::onRefreshLevelList from 0x140306710 to 0x1403068d0 (448 bytes)\n; \n; 2 xrefs:\n; > LevelListLayer::init @ 0x140304538\n; > <???> @ 0x1406d449c\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, 0x140306710\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140306715\npush    rdi                                                            ; +0xa, 0x14030671a\nsub     rsp, 40h                                                       ; +0xb, 0x14030671b\nmov     rdi, rcx                                                       ; +0xf, 0x14030671f\nlea     rbx, [rcx+220h]                                                ; +0x12, 0x140306722\nxor     eax, eax                                                       ; +0x19, 0x140306729\ntest    rcx, rcx                                                       ; +0x1b, 0x14030672b\ncmovz   rbx, rax                                                       ; +0x1e, 0x14030672e\nmov     rax, cs:qword_1406C2EC0                                        ; +0x22, 0x140306732\ntest    rax, rax                                                       ; +0x29, 0x140306739\njnz     short loc_14030676D                                            ; +0x2c, 0x14030673c\nmov     ecx, 3D0h; Size                                                ; +0x2e, 0x14030673e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x33, 0x140306743\nmov     [rsp+48h+arg_0], rax                                           ; +0x38, 0x140306748\nmov     rcx, rax                                                       ; +0x3d, 0x14030674d\ncall    sub_140141280                                                  ; +0x40, 0x140306750\nnop                                                                    ; +0x45, 0x140306755\nmov     cs:qword_1406C2EC0, rax                                        ; +0x46, 0x140306756\nmov     rdx, [rax]                                                     ; +0x4d, 0x14030675d\nmov     rcx, rax                                                       ; +0x50, 0x140306760\ncall    qword ptr [rdx+48h]                                            ; +0x53, 0x140306763\nmov     rax, cs:qword_1406C2EC0                                        ; +0x56, 0x140306766\nmov     [rax+2D0h], rbx                                                ; +0x5d, 0x14030676d\nmov     rcx, [rdi+288h]                                                ; +0x64, 0x140306774\ntest    rcx, rcx                                                       ; +0x6b, 0x14030677b\njz      short loc_14030678B                                            ; +0x6e, 0x14030677e\nmov     rax, [rcx]                                                     ; +0x70, 0x140306780\nxor     edx, edx                                                       ; +0x73, 0x140306783\ncall    qword ptr [rax+140h]                                           ; +0x75, 0x140306785\nmov     rcx, [rdi+2E0h]                                                ; +0x7b, 0x14030678b\nmov     rax, [rcx]                                                     ; +0x82, 0x140306792\nmov     dl, 1                                                          ; +0x85, 0x140306795\ncall    qword ptr [rax+140h]                                           ; +0x87, 0x140306797\nxor     edx, edx                                                       ; +0x8d, 0x14030679d\nmov     rcx, rdi                                                       ; +0x8f, 0x14030679f\ncall    LevelBrowserLayer__setupLevelBrowser                           ; +0x92, 0x1403067a2\nxor     ecx, ecx                                                       ; +0x97, 0x1403067a7\ncall    GJSearchObject__create_2                                       ; +0x99, 0x1403067a9\nmov     rsi, rax                                                       ; +0x9e, 0x1403067ae\nmov     rdx, [rdi+368h]                                                ; +0xa1, 0x1403067b1\nmov     edx, [rdx+158h]                                                ; +0xa8, 0x1403067b8\nlea     rcx, [rsp+48h+var_28]                                          ; +0xae, 0x1403067be\ncall    GameToolbox__intToString                                       ; +0xb3, 0x1403067c3\nmov     rbx, rax                                                       ; +0xb8, 0x1403067c8\nmov     [rsp+48h+arg_0], rax                                           ; +0xbb, 0x1403067cb\nlea     rcx, [rsi+148h]; void *                                        ; +0xc0, 0x1403067d0\ncmp     rcx, rax                                                       ; +0xc7, 0x1403067d7\njz      short loc_1403067F3                                            ; +0xca, 0x1403067da\nmov     rdx, rax                                                       ; +0xcc, 0x1403067dc\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0xcf, 0x1403067df\njbe     short loc_1403067E9                                            ; +0xd4, 0x1403067e4\nmov     rdx, [rax]; Src                                                ; +0xd6, 0x1403067e6\nmov     r8, [rax+10h]; Size                                            ; +0xd9, 0x1403067e9\ncall    sub_14003CCE0                                                  ; +0xdd, 0x1403067ed\nnop                                                                    ; +0xe2, 0x1403067f2\nmov     rcx, rbx                                                       ; +0xe3, 0x1403067f3\ncall    sub_14003A830                                                  ; +0xe6, 0x1403067f6\nmov     dword ptr [rsi+1D0h], 1                                        ; +0xeb, 0x1403067fb\nmov     rcx, rsi                                                       ; +0xf5, 0x140306805\ncall    GJSearchObject__getKey                                         ; +0xf8, 0x140306808\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xfd, 0x14030680d\ninc     r8; Size                                                       ; +0x104, 0x140306814\ncmp     byte ptr [rax+r8], 0                                           ; +0x107, 0x140306817\njnz     short loc_140306814                                            ; +0x10c, 0x14030681c\nlea     rbx, [rdi+370h]                                                ; +0x10e, 0x14030681e\nmov     rdx, rax; Src                                                  ; +0x115, 0x140306825\nmov     rcx, rbx; void *                                               ; +0x118, 0x140306828\ncall    sub_14003CCE0                                                  ; +0x11b, 0x14030682b\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x120, 0x140306830\njbe     short loc_14030683A                                            ; +0x125, 0x140306835\nmov     rbx, [rbx]                                                     ; +0x127, 0x140306837\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x12a, 0x14030683a\ntest    rcx, rcx                                                       ; +0x131, 0x140306841\njnz     short loc_140306876                                            ; +0x134, 0x140306844\nmov     ecx, 3D0h; Size                                                ; +0x136, 0x140306846\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x13b, 0x14030684b\nmov     [rsp+48h+arg_0], rax                                           ; +0x140, 0x140306850\nmov     rcx, rax                                                       ; +0x145, 0x140306855\ncall    sub_140141280                                                  ; +0x148, 0x140306858\nnop                                                                    ; +0x14d, 0x14030685d\nmov     cs:qword_1406C2EC0, rax                                        ; +0x14e, 0x14030685e\nmov     r8, [rax]                                                      ; +0x155, 0x140306865\nmov     rcx, rax                                                       ; +0x158, 0x140306868\ncall    qword ptr [r8+48h]                                             ; +0x15b, 0x14030686b\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x15f, 0x14030686f\nmov     rdx, rbx                                                       ; +0x166, 0x140306876\ncall    GameLevelManager__resetTimerForKey                             ; +0x169, 0x140306879\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x16e, 0x14030687e\ntest    rcx, rcx                                                       ; +0x175, 0x140306885\njnz     short loc_1403068B9                                            ; +0x178, 0x140306888\nmov     ecx, 3D0h; Size                                                ; +0x17a, 0x14030688a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x17f, 0x14030688f\nmov     [rsp+48h+arg_0], rax                                           ; +0x184, 0x140306894\nmov     rcx, rax                                                       ; +0x189, 0x140306899\ncall    sub_140141280                                                  ; +0x18c, 0x14030689c\nnop                                                                    ; +0x191, 0x1403068a1\nmov     cs:qword_1406C2EC0, rax                                        ; +0x192, 0x1403068a2\nmov     rdx, [rax]                                                     ; +0x199, 0x1403068a9\nmov     rcx, rax                                                       ; +0x19c, 0x1403068ac\ncall    qword ptr [rdx+48h]                                            ; +0x19f, 0x1403068af\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x1a2, 0x1403068b2\nmov     rdx, rsi                                                       ; +0x1a9, 0x1403068b9\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x1ac, 0x1403068bc\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x1b1, 0x1403068c1\nadd     rsp, 40h                                                       ; +0x1b6, 0x1403068c6\npop     rdi                                                            ; +0x1ba, 0x1403068ca\njmp     GameLevelManager__getLevelLists                                ; +0x1bb, 0x1403068cb", "xrefs": ["LevelListLayer::init @ 0x140304538", "<???> @ 0x1406d449c"], "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"}