{"type": "func", "start": 5369673552, "end": 5369673955, "name": "LevelPickerPopup::buildSavedPage", "pseudocode": "// \n// LevelPickerPopup::buildSavedPage from 0x1400eb750 to 0x1400eb8e3 (403 bytes)\n// \n// 6 xrefs:\n// > LevelPickerPopup::onToggleKind @ 0x1400e9a8c\n// > LevelPickerPopup::onToggleFavorites @ 0x1400e9f7a\n// > LevelPickerPopup::doPageRequest @ 0x1400e9fe8\n// > LevelPickerPopup::onOnlineMode @ 0x1400ea3fc\n// > LevelPickerPopup::textChanged @ 0x1400eab26\n// > <???> @ 0x140914f48\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:26:34 +0000\n// \n\nvoid __fastcall LevelPickerPopup::buildSavedPage(__int64 a1)\n{\n  __int64 *v2; // r15\n  cocos2d::CCArray *v3; // r12\n  __int64 v4; // rbp\n  __int64 v5; // rcx\n  cocos2d::CCArray *v6; // r14\n  int v7; // ebx\n  __int64 i; // rsi\n  int v9; // edx\n  __int64 v10; // r8\n  int v11; // r9d\n  char v12; // cl\n  const char *v13; // rdx\n  const char *v14; // rax\n  int v15; // ebx\n  int v16; // eax\n\n  v2 = sub_1400EACF0(a1);\n  sub_1400EB320(a1, v2);\n  v3 = nullptr;\n  v4 = (__int64)(*(_QWORD *)(a1 + 1032) - *(_QWORD *)(a1 + 1024)) >> 2;\n  v5 = (unsigned int)(10 * *(_DWORD *)(a1 + 680));\n  if ( (int)v5 >= (int)v4 )\n    *(_DWORD *)(a1 + 680) = 0;\n  v6 = (cocos2d::CCArray *)cocos2d::CCArray::create(v5);\n  v7 = 10 * *(_DWORD *)(a1 + 680);\n  for ( i = 4LL * v7; ; i += 4 )\n  {\n    v9 = 10 * (*(_DWORD *)(a1 + 680) + 1);\n    if ( (int)v4 < v9 )\n      v9 = v4;\n    if ( v7 >= v9 )\n      break;\n    cocos2d::CCArray::addObject(v6, *(struct cocos2d::CCObject **)(*v2 + 80LL * *(int *)(*(_QWORD *)(a1 + 1024) + i)));\n    ++v7;\n  }\n  if ( cocos2d::CCArray::count(v6) )\n    v3 = v6;\n  LevelPickerPopup::setupList(a1, v3, v10, v11);\n  if ( !cocos2d::CCArray::count(v6) )\n  {\n    v12 = *(_BYTE *)(a1 + 809);\n    v13 = \"No saved levels\";\n    if ( v12 )\n    {\n      v13 = \"No saved lists\";\n    }\n    else if ( *(_BYTE *)(a1 + 810) )\n    {\n      v14 = \"No favorite levels\";\n      if ( *(_QWORD *)(a1 + 896) )\n        v14 = \"No saved levels\";\n      v13 = v14;\n    }\n    if ( *v2 != v2[1] && (v12 || !*(_BYTE *)(a1 + 810) || *(_QWORD *)(a1 + 896)) )\n      v13 = \"Nothing found\";\n    PagedListPopup::showStatus(a1, v13);\n  }\n  v15 = 10 * *(_DWORD *)(a1 + 680);\n  v16 = cocos2d::CCArray::count(v6);\n  PagedListPopup::updatePageUI((_QWORD *)a1, (unsigned int)v4, v15, v16);\n}", "assembly": "; \n; LevelPickerPopup::buildSavedPage from 0x1400eb750 to 0x1400eb8e3 (403 bytes)\n; \n; 6 xrefs:\n; > LevelPickerPopup::onToggleKind @ 0x1400e9a8c\n; > LevelPickerPopup::onToggleFavorites @ 0x1400e9f7a\n; > LevelPickerPopup::doPageRequest @ 0x1400e9fe8\n; > LevelPickerPopup::onOnlineMode @ 0x1400ea3fc\n; > LevelPickerPopup::textChanged @ 0x1400eab26\n; > <???> @ 0x140914f48\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:26:34 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1400eb750\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1400eb755\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1400eb75a\nmov     [rsp+arg_18], rdi                                              ; +0xf, 0x1400eb75f\npush    r12                                                            ; +0x14, 0x1400eb764\npush    r14                                                            ; +0x16, 0x1400eb766\npush    r15                                                            ; +0x18, 0x1400eb768\nsub     rsp, 20h                                                       ; +0x1a, 0x1400eb76a\nmov     rdi, rcx                                                       ; +0x1e, 0x1400eb76e\ncall    sub_1400EACF0                                                  ; +0x21, 0x1400eb771\nmov     rdx, rax                                                       ; +0x26, 0x1400eb776\nmov     rcx, rdi                                                       ; +0x29, 0x1400eb779\nmov     r15, rax                                                       ; +0x2c, 0x1400eb77c\ncall    sub_1400EB320                                                  ; +0x2f, 0x1400eb77f\nmov     eax, [rdi+2A8h]                                                ; +0x34, 0x1400eb784\nxor     r12d, r12d                                                     ; +0x3a, 0x1400eb78a\nmov     rbp, [rdi+408h]                                                ; +0x3d, 0x1400eb78d\nsub     rbp, [rdi+400h]                                                ; +0x44, 0x1400eb794\nsar     rbp, 2                                                         ; +0x4b, 0x1400eb79b\nlea     ecx, [rax+rax*4]                                               ; +0x4f, 0x1400eb79f\nadd     ecx, ecx                                                       ; +0x52, 0x1400eb7a2\ncmp     ecx, ebp                                                       ; +0x54, 0x1400eb7a4\njl      short loc_1400EB7AF                                            ; +0x56, 0x1400eb7a6\nmov     [rdi+2A8h], r12d                                               ; +0x58, 0x1400eb7a8\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x5f, 0x1400eb7af\nmov     ecx, [rdi+2A8h]                                                ; +0x65, 0x1400eb7b5\nmov     r14, rax                                                       ; +0x6b, 0x1400eb7bb\nlea     ebx, [rcx+rcx*4]                                               ; +0x6e, 0x1400eb7be\nadd     ebx, ebx                                                       ; +0x71, 0x1400eb7c1\nmovsxd  rcx, ebx                                                       ; +0x73, 0x1400eb7c3\nlea     rsi, ds:0[rcx*4]                                               ; +0x76, 0x1400eb7c6\nxchg    ax, ax                                                         ; +0x7e, 0x1400eb7ce\nmov     ecx, [rdi+2A8h]                                                ; +0x80, 0x1400eb7d0\ninc     ecx                                                            ; +0x86, 0x1400eb7d6\nlea     edx, [rcx+rcx*4]                                               ; +0x88, 0x1400eb7d8\nadd     edx, edx                                                       ; +0x8b, 0x1400eb7db\ncmp     ebp, edx                                                       ; +0x8d, 0x1400eb7dd\ncmovl   edx, ebp                                                       ; +0x8f, 0x1400eb7df\ncmp     ebx, edx                                                       ; +0x92, 0x1400eb7e2\njge     short loc_1400EB810                                            ; +0x94, 0x1400eb7e4\nmov     rax, [rdi+400h]                                                ; +0x96, 0x1400eb7e6\nmov     rdx, [r15]                                                     ; +0x9d, 0x1400eb7ed\nmovsxd  rcx, dword ptr [rax+rsi]                                       ; +0xa0, 0x1400eb7f0\nlea     rax, [rcx+rcx*4]                                               ; +0xa4, 0x1400eb7f4\nmov     rcx, r14                                                       ; +0xa8, 0x1400eb7f8\nadd     rax, rax                                                       ; +0xab, 0x1400eb7fb\nmov     rdx, [rdx+rax*8]                                               ; +0xae, 0x1400eb7fe\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0xb2, 0x1400eb802\ninc     ebx                                                            ; +0xb8, 0x1400eb808\nadd     rsi, 4                                                         ; +0xba, 0x1400eb80a\njmp     short loc_1400EB7D0                                            ; +0xbe, 0x1400eb80e\nmov     rcx, r14                                                       ; +0xc0, 0x1400eb810\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xc3, 0x1400eb813\ntest    eax, eax                                                       ; +0xc9, 0x1400eb819\nmov     rcx, rdi                                                       ; +0xcb, 0x1400eb81b\ncmovnz  r12, r14                                                       ; +0xce, 0x1400eb81e\nmov     rdx, r12                                                       ; +0xd2, 0x1400eb822\ncall    LevelPickerPopup__setupList                                    ; +0xd5, 0x1400eb825\nmov     rcx, r14                                                       ; +0xda, 0x1400eb82a\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xdd, 0x1400eb82d\ntest    eax, eax                                                       ; +0xe3, 0x1400eb833\njnz     short loc_1400EB8A1                                            ; +0xe5, 0x1400eb835\nmovzx   ecx, byte ptr [rdi+329h]                                       ; +0xe7, 0x1400eb837\nlea     rax, aNoSavedLists; \"No saved lists\"                           ; +0xee, 0x1400eb83e\ntest    cl, cl                                                         ; +0xf5, 0x1400eb845\nlea     rdx, aNoSavedLevels; \"No saved levels\"                         ; +0xf7, 0x1400eb847\ncmovnz  rdx, rax                                                       ; +0xfe, 0x1400eb84e\njnz     short loc_1400EB873                                            ; +0x102, 0x1400eb852\ncmp     byte ptr [rdi+32Ah], 0                                         ; +0x104, 0x1400eb854\njz      short loc_1400EB873                                            ; +0x10b, 0x1400eb85b\ncmp     qword ptr [rdi+380h], 0                                        ; +0x10d, 0x1400eb85d\nlea     rax, aNoFavoriteLeve; \"No favorite levels\"                     ; +0x115, 0x1400eb865\ncmovnz  rax, rdx                                                       ; +0x11c, 0x1400eb86c\nmov     rdx, rax                                                       ; +0x120, 0x1400eb870\nmov     rax, [r15+8]                                                   ; +0x123, 0x1400eb873\ncmp     [r15], rax                                                     ; +0x127, 0x1400eb877\njz      short loc_1400EB899                                            ; +0x12a, 0x1400eb87a\ntest    cl, cl                                                         ; +0x12c, 0x1400eb87c\njnz     short loc_1400EB892                                            ; +0x12e, 0x1400eb87e\ncmp     [rdi+32Ah], cl                                                 ; +0x130, 0x1400eb880\njz      short loc_1400EB892                                            ; +0x136, 0x1400eb886\ncmp     qword ptr [rdi+380h], 0                                        ; +0x138, 0x1400eb888\njz      short loc_1400EB899                                            ; +0x140, 0x1400eb890\nlea     rdx, aNothingFound; \"Nothing found\"                            ; +0x142, 0x1400eb892\nmov     rcx, rdi                                                       ; +0x149, 0x1400eb899\ncall    PagedListPopup__showStatus                                     ; +0x14c, 0x1400eb89c\nmov     eax, [rdi+2A8h]                                                ; +0x151, 0x1400eb8a1\nmov     rcx, r14                                                       ; +0x157, 0x1400eb8a7\nlea     ebx, [rax+rax*4]                                               ; +0x15a, 0x1400eb8aa\nadd     ebx, ebx                                                       ; +0x15d, 0x1400eb8ad\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x15f, 0x1400eb8af\nmov     r8d, ebx                                                       ; +0x165, 0x1400eb8b5\nmov     edx, ebp                                                       ; +0x168, 0x1400eb8b8\nmov     r9d, eax                                                       ; +0x16a, 0x1400eb8ba\nmov     rcx, rdi                                                       ; +0x16d, 0x1400eb8bd\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x170, 0x1400eb8c0\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x175, 0x1400eb8c5\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x17a, 0x1400eb8ca\nmov     rdi, [rsp+38h+arg_18]                                          ; +0x17f, 0x1400eb8cf\nadd     rsp, 20h                                                       ; +0x184, 0x1400eb8d4\npop     r15                                                            ; +0x188, 0x1400eb8d8\npop     r14                                                            ; +0x18a, 0x1400eb8da\npop     r12                                                            ; +0x18c, 0x1400eb8dc\njmp     PagedListPopup__updatePageUI                                   ; +0x18e, 0x1400eb8de", "xrefs": ["LevelPickerPopup::onToggleKind @ 0x1400e9a8c", "LevelPickerPopup::onToggleFavorites @ 0x1400e9f7a", "LevelPickerPopup::doPageRequest @ 0x1400e9fe8", "LevelPickerPopup::onOnlineMode @ 0x1400ea3fc", "LevelPickerPopup::textChanged @ 0x1400eab26", "<???> @ 0x140914f48"], "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"}