{"type": "func", "start": 5370220032, "end": 5370220364, "name": "DailyLevelPage::levelDownloadFinished", "pseudocode": "// \n// DailyLevelPage::levelDownloadFinished from 0x140170e00 to 0x140170f4c (332 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1407454d8\n// > <???> @ 0x140918314\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:27:31 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nvoid __fastcall DailyLevelPage::levelDownloadFinished(__int64 a1, __int64 a2)\n{\n  int v4; // esi\n  _DWORD *v5; // rcx\n  int v6; // edx\n  int v7; // edx\n  int v8; // eax\n  int v9; // esi\n  int v10; // edx\n  int v11; // edx\n  int v12; // eax\n  int v13; // r9d\n  void *v14; // [rsp+48h] [rbp+10h]\n  void *v15; // [rsp+48h] [rbp+10h]\n\n  if ( !a2 )\n    return;\n  v4 = *(_DWORD *)(a2 + 992) - *(_DWORD *)(a2 + 996);\n  if ( v4 <= 0 )\n    return;\n  v5 = *(_DWORD **)&qword_14090BFB0;\n  if ( !*(_QWORD *)&qword_14090BFB0 )\n  {\n    v14 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v14);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v5 = *(_DWORD **)&qword_14090BFB0;\n  }\n  v6 = *(_DWORD *)(a1 + 52);\n  if ( !v6 )\n  {\n    v8 = v5[239];\nLABEL_11:\n    if ( v4 == v8 )\n    {\nLABEL_22:\n      (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 24) + 336LL))(*(_QWORD *)(a1 + 24), 0);\n      if ( !*(_BYTE *)(a1 + 48) )\n        DailyLevelPage::createDailyNode(a1 - 680, a2, 0, v13, 1);\n      return;\n    }\n    goto LABEL_12;\n  }\n  v7 = v6 - 1;\n  if ( !v7 )\n  {\n    v8 = v5[242];\n    goto LABEL_11;\n  }\n  if ( v7 == 1 )\n  {\n    v8 = v5[245];\n    goto LABEL_11;\n  }\nLABEL_12:\n  v9 = *(_DWORD *)(a2 + 992) - *(_DWORD *)(a2 + 996);\n  if ( !v5 )\n  {\n    v15 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v15);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v5 = *(_DWORD **)&qword_14090BFB0;\n  }\n  v10 = *(_DWORD *)(a1 + 52);\n  if ( v10 )\n  {\n    v11 = v10 - 1;\n    if ( v11 )\n    {\n      if ( v11 == 1 )\n        v12 = v5[246];\n      else\n        v12 = 0;\n    }\n    else\n    {\n      v12 = v5[243];\n    }\n  }\n  else\n  {\n    v12 = v5[240];\n  }\n  if ( v9 == v12 )\n    goto LABEL_22;\n}", "assembly": "; \n; DailyLevelPage::levelDownloadFinished from 0x140170e00 to 0x140170f4c (332 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1407454d8\n; > <???> @ 0x140918314\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:27:31 +0000\n; \ntest    rdx, rdx                                                       ; +0x0, 0x140170e00\njz      locret_140170F4B                                               ; +0x3, 0x140170e03\nmov     [rsp+arg_0], rbx                                               ; +0x9, 0x140170e09\nmov     [rsp+arg_10], rsi                                              ; +0xe, 0x140170e0e\npush    rdi                                                            ; +0x13, 0x140170e13\nsub     rsp, 30h                                                       ; +0x14, 0x140170e14\nmov     rdi, rdx                                                       ; +0x18, 0x140170e18\nmov     rbx, rcx                                                       ; +0x1b, 0x140170e1b\nmov     esi, [rdx+3E0h]                                                ; +0x1e, 0x140170e1e\nsub     esi, [rdx+3E4h]                                                ; +0x24, 0x140170e24\ntest    esi, esi                                                       ; +0x2a, 0x140170e2a\njle     loc_140170F3C                                                  ; +0x2c, 0x140170e2c\nmov     rcx, cs:qword_14090BFB0                                        ; +0x32, 0x140170e32\ntest    rcx, rcx                                                       ; +0x39, 0x140170e39\njnz     short loc_140170E70                                            ; +0x3c, 0x140170e3c\nmov     ecx, 690h; Size                                                ; +0x3e, 0x140170e3e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x43, 0x140170e43\nmov     [rsp+38h+arg_8], rax                                           ; +0x48, 0x140170e48\nmov     rcx, rax                                                       ; +0x4d, 0x140170e4d\ncall    GameLevelManager__GameLevelManager                             ; +0x50, 0x140170e50\nnop                                                                    ; +0x55, 0x140170e55\nmov     cs:qword_14090BFB0, rax                                        ; +0x56, 0x140170e56\nmov     rcx, [rax]                                                     ; +0x5d, 0x140170e5d\nmov     rdx, [rcx+48h]                                                 ; +0x60, 0x140170e60\nmov     rcx, rax                                                       ; +0x64, 0x140170e64\ncall    rdx                                                            ; +0x67, 0x140170e67\nmov     rcx, cs:qword_14090BFB0                                        ; +0x69, 0x140170e69\nmov     edx, [rbx+34h]                                                 ; +0x70, 0x140170e70\ntest    edx, edx                                                       ; +0x73, 0x140170e73\njz      short loc_140170E91                                            ; +0x75, 0x140170e75\nsub     edx, 1                                                         ; +0x77, 0x140170e77\njz      short loc_140170E89                                            ; +0x7a, 0x140170e7a\ncmp     edx, 1                                                         ; +0x7c, 0x140170e7c\njnz     short loc_140170E9B                                            ; +0x7f, 0x140170e7f\nmov     eax, [rcx+3D4h]                                                ; +0x81, 0x140170e81\njmp     short loc_140170E97                                            ; +0x87, 0x140170e87\nmov     eax, [rcx+3C8h]                                                ; +0x89, 0x140170e89\njmp     short loc_140170E97                                            ; +0x8f, 0x140170e8f\nmov     eax, [rcx+3BCh]                                                ; +0x91, 0x140170e91\ncmp     esi, eax                                                       ; +0x97, 0x140170e97\njz      short loc_140170F0D                                            ; +0x99, 0x140170e99\nmov     esi, [rdi+3E0h]                                                ; +0x9b, 0x140170e9b\nsub     esi, [rdi+3E4h]                                                ; +0xa1, 0x140170ea1\ntest    rcx, rcx                                                       ; +0xa7, 0x140170ea7\njnz     short loc_140170EDE                                            ; +0xaa, 0x140170eaa\nmov     ecx, 690h; Size                                                ; +0xac, 0x140170eac\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xb1, 0x140170eb1\nmov     [rsp+38h+arg_8], rax                                           ; +0xb6, 0x140170eb6\nmov     rcx, rax                                                       ; +0xbb, 0x140170ebb\ncall    GameLevelManager__GameLevelManager                             ; +0xbe, 0x140170ebe\nnop                                                                    ; +0xc3, 0x140170ec3\nmov     cs:qword_14090BFB0, rax                                        ; +0xc4, 0x140170ec4\nmov     rcx, [rax]                                                     ; +0xcb, 0x140170ecb\nmov     rdx, [rcx+48h]                                                 ; +0xce, 0x140170ece\nmov     rcx, rax                                                       ; +0xd2, 0x140170ed2\ncall    rdx                                                            ; +0xd5, 0x140170ed5\nmov     rcx, cs:qword_14090BFB0                                        ; +0xd7, 0x140170ed7\nmov     edx, [rbx+34h]                                                 ; +0xde, 0x140170ede\ntest    edx, edx                                                       ; +0xe1, 0x140170ee1\njz      short loc_140170F03                                            ; +0xe3, 0x140170ee3\nsub     edx, 1                                                         ; +0xe5, 0x140170ee5\njz      short loc_140170EFB                                            ; +0xe8, 0x140170ee8\ncmp     edx, 1                                                         ; +0xea, 0x140170eea\njz      short loc_140170EF3                                            ; +0xed, 0x140170eed\nxor     eax, eax                                                       ; +0xef, 0x140170eef\njmp     short loc_140170F09                                            ; +0xf1, 0x140170ef1\nmov     eax, [rcx+3D8h]                                                ; +0xf3, 0x140170ef3\njmp     short loc_140170F09                                            ; +0xf9, 0x140170ef9\nmov     eax, [rcx+3CCh]                                                ; +0xfb, 0x140170efb\njmp     short loc_140170F09                                            ; +0x101, 0x140170f01\nmov     eax, [rcx+3C0h]                                                ; +0x103, 0x140170f03\ncmp     esi, eax                                                       ; +0x109, 0x140170f09\njnz     short loc_140170F3C                                            ; +0x10b, 0x140170f0b\nmov     rcx, [rbx+18h]                                                 ; +0x10d, 0x140170f0d\nmov     rax, [rcx]                                                     ; +0x111, 0x140170f11\nxor     edx, edx                                                       ; +0x114, 0x140170f14\ncall    qword ptr [rax+150h]                                           ; +0x116, 0x140170f16\ncmp     byte ptr [rbx+30h], 0                                          ; +0x11c, 0x140170f1c\njnz     short loc_140170F3C                                            ; +0x120, 0x140170f20\nlea     rcx, [rbx-2A8h]                                                ; +0x122, 0x140170f22\nmov     [rsp+38h+var_18], 1                                            ; +0x129, 0x140170f29\nxorps   xmm3, xmm3                                                     ; +0x12e, 0x140170f2e\nxor     r8d, r8d                                                       ; +0x131, 0x140170f31\nmov     rdx, rdi                                                       ; +0x134, 0x140170f34\ncall    DailyLevelPage__createDailyNode                                ; +0x137, 0x140170f37\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x13c, 0x140170f3c\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x141, 0x140170f41\nadd     rsp, 30h                                                       ; +0x146, 0x140170f46\npop     rdi                                                            ; +0x14a, 0x140170f4a\nretn                                                                   ; +0x14b, 0x140170f4b", "xrefs": ["<???> @ 0x1407454d8", "<???> @ 0x140918314"], "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"}