{"type": "func", "start": 5370247280, "end": 5370247432, "name": "GJLevelList::completedLevels", "pseudocode": "// \n// GJLevelList::completedLevels from 0x140177870 to 0x140177908 (152 bytes)\n// \n// 5 xrefs:\n// > LevelListCell::loadFromList @ 0x1400bee96\n// > LevelListLayer::updateStatsArt @ 0x140305358\n// > LevelListLayer::onClaimReward @ 0x1403060e0\n// > LevelListLayer::onClaimReward @ 0x140306141\n// > <???> @ 0x1406cafec\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=1\nint GJLevelList::completedLevels(GJLevelList *a1)\n{\n  int result; // eax\n  int *Myfirst; // rbx\n  std::_Vector_val<std::_Simple_types<int>>::pointer i; // rsi\n  int v4; // edi\n  GameStatsManager *v5; // rcx\n  bool hasCompletedOnlineLevel; // cl\n  void *v7; // [rsp+30h] [rbp+8h]\n\n  result = 0;\n  Myfirst = a1->m_levels._Mypair._Myval2._Myfirst;\n  for ( i = a1->m_levels._Mypair._Myval2._Mylast; Myfirst != i; ++Myfirst )\n  {\n    v4 = result;\n    v5 = (GameStatsManager *)qword_1406C2EE8;\n    if ( !qword_1406C2EE8 )\n    {\n      v7 = operator new(0x3E0u);\n      qword_1406C2EE8 = sub_1401D0AE0(v7);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8);\n      v5 = (GameStatsManager *)qword_1406C2EE8;\n    }\n    hasCompletedOnlineLevel = GameStatsManager::hasCompletedOnlineLevel(v5, *Myfirst);\n    result = v4 + 1;\n    if ( !hasCompletedOnlineLevel )\n      result = v4;\n  }\n  return result;\n}", "assembly": "; \n; GJLevelList::completedLevels from 0x140177870 to 0x140177908 (152 bytes)\n; \n; 5 xrefs:\n; > LevelListCell::loadFromList @ 0x1400bee96\n; > LevelListLayer::updateStatsArt @ 0x140305358\n; > LevelListLayer::onClaimReward @ 0x1403060e0\n; > LevelListLayer::onClaimReward @ 0x140306141\n; > <???> @ 0x1406cafec\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, 0x140177870\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140177875\npush    rdi                                                            ; +0xa, 0x14017787a\nsub     rsp, 20h                                                       ; +0xb, 0x14017787b\nxor     eax, eax                                                       ; +0xf, 0x14017787f\nmov     rbx, [rcx+140h]                                                ; +0x11, 0x140177881\nmov     rsi, [rcx+148h]                                                ; +0x18, 0x140177888\ncmp     rbx, rsi                                                       ; +0x1f, 0x14017788f\njz      short loc_1401778F8                                            ; +0x22, 0x140177892\nnop     dword ptr [rax+00h]                                            ; +0x24, 0x140177894\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x28, 0x140177898\nmov     edi, eax                                                       ; +0x30, 0x1401778a0\nmov     rcx, cs:qword_1406C2EE8                                        ; +0x32, 0x1401778a2\ntest    rcx, rcx                                                       ; +0x39, 0x1401778a9\njnz     short loc_1401778DD                                            ; +0x3c, 0x1401778ac\nmov     ecx, 3E0h; Size                                                ; +0x3e, 0x1401778ae\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x43, 0x1401778b3\nmov     [rsp+28h+arg_0], rax                                           ; +0x48, 0x1401778b8\nmov     rcx, rax                                                       ; +0x4d, 0x1401778bd\ncall    sub_1401D0AE0                                                  ; +0x50, 0x1401778c0\nnop                                                                    ; +0x55, 0x1401778c5\nmov     cs:qword_1406C2EE8, rax                                        ; +0x56, 0x1401778c6\nmov     rdx, [rax]                                                     ; +0x5d, 0x1401778cd\nmov     rcx, rax                                                       ; +0x60, 0x1401778d0\ncall    qword ptr [rdx+48h]                                            ; +0x63, 0x1401778d3\nmov     rcx, cs:qword_1406C2EE8                                        ; +0x66, 0x1401778d6\nmov     edx, [rbx]                                                     ; +0x6d, 0x1401778dd\ncall    GameStatsManager__hasCompletedOnlineLevel                      ; +0x6f, 0x1401778df\nmovzx   ecx, al                                                        ; +0x74, 0x1401778e4\nlea     eax, [rdi+1]                                                   ; +0x77, 0x1401778e7\ntest    cl, cl                                                         ; +0x7a, 0x1401778ea\ncmovz   eax, edi                                                       ; +0x7c, 0x1401778ec\nadd     rbx, 4                                                         ; +0x7f, 0x1401778ef\ncmp     rbx, rsi                                                       ; +0x83, 0x1401778f3\njnz     short loc_1401778A0                                            ; +0x86, 0x1401778f6\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x88, 0x1401778f8\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x8d, 0x1401778fd\nadd     rsp, 20h                                                       ; +0x92, 0x140177902\npop     rdi                                                            ; +0x96, 0x140177906\nretn                                                                   ; +0x97, 0x140177907", "xrefs": ["LevelListCell::loadFromList @ 0x1400bee96", "LevelListLayer::updateStatsArt @ 0x140305358", "LevelListLayer::onClaimReward @ 0x1403060e0", "LevelListLayer::onClaimReward @ 0x140306141", "<???> @ 0x1406cafec"], "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"}