{"type": "func", "start": 5370934624, "end": 5370935121, "name": "GameLevelManager::getDemonLevelsString", "pseudocode": "// \n// GameLevelManager::getDemonLevelsString from 0x14021f560 to 0x14021f751 (497 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::updateUserScore @ 0x1402369c6\n// > <???> @ 0x14091bb3c\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:28:24 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n_QWORD *__fastcall GameLevelManager::getDemonLevelsString(__int64 a1, _QWORD *a2)\n{\n  char v4; // bp\n  __int64 v5; // rcx\n  __int64 v6; // rcx\n  __int64 i; // rdi\n  _DWORD *v8; // rax\n  _DWORD *v9; // rbx\n  __int64 v10; // rcx\n  _BYTE *v11; // rax\n  size_t v12; // r8\n  void *v14; // [rsp+38h] [rbp-270h]\n  __int128 v15; // [rsp+50h] [rbp-258h] BYREF\n  _BYTE v16[528]; // [rsp+60h] [rbp-248h] BYREF\n\n  fmt::BasicWriter<char>::BasicWriter<char>(v16);\n  v4 = 1;\n  v5 = *(_QWORD *)(a1 + 856);\n  if ( !v5 )\n    goto LABEL_19;\n  v6 = *(_QWORD *)(v5 + 56);\n  if ( !v6 )\n    goto LABEL_19;\n  for ( i = *(_QWORD *)(v6 + 288); ; i = *(_QWORD *)(i + 288) )\n  {\n    v8 = (_DWORD *)_RTDynamicCast(\n                     *(_QWORD *)(v6 + 264),\n                     0,\n                     &cocos2d::CCObject `RTTI Type Descriptor',\n                     &GJGameLevel `RTTI Type Descriptor',\n                     0);\n    v9 = v8;\n    if ( v8 && v8[255] - v8[256] == 10 && v8[233] - v8[232] == 100 )\n    {\n      v10 = qword_14090BFE0;\n      if ( !qword_14090BFE0 )\n      {\n        v14 = operator new(0x3E8u);\n        qword_14090BFE0 = sub_1402D6480(v14);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);\n        v10 = qword_14090BFE0;\n      }\n      if ( (unsigned __int8)GameStatsManager::hasCompletedLevel(v10, v9) )\n      {\n        if ( !v4 )\n        {\n          v15 = (unsigned __int64)byte_14070ECF8;\n          fmt::BasicWriter<char>::operator<<(v16, &v15);\n        }\n        fmt::BasicWriter<char>::operator<<(v16, (unsigned int)(v9[82] - v9[83]));\n        v4 = 0;\n      }\n    }\n    v6 = i;\n    if ( !i )\n      break;\n  }\n  if ( !v4 )\n  {\n    v11 = (_BYTE *)fmt::BasicWriter<char>::c_str(v16);\n    *(_OWORD *)a2 = 0;\n    a2[2] = 0;\n    a2[3] = 0;\n    v12 = -1;\n    do\n      ++v12;\n    while ( v11[v12] );\n    sub_14003D230(a2, v11, v12);\n  }\n  else\n  {\nLABEL_19:\n    *(_OWORD *)a2 = 0;\n    a2[2] = 0;\n    a2[3] = 15;\n    *(_BYTE *)a2 = 0;\n  }\n  fmt::BasicWriter<char>::~BasicWriter<char>(v16);\n  return a2;\n}", "assembly": "; \n; GameLevelManager::getDemonLevelsString from 0x14021f560 to 0x14021f751 (497 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::updateUserScore @ 0x1402369c6\n; > <???> @ 0x14091bb3c\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:28:24 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14021f560\npush    rbp                                                            ; +0x5, 0x14021f565\npush    rsi                                                            ; +0x6, 0x14021f566\npush    rdi                                                            ; +0x7, 0x14021f567\npush    r14                                                            ; +0x8, 0x14021f568\npush    r15                                                            ; +0xa, 0x14021f56a\nsub     rsp, 280h                                                      ; +0xc, 0x14021f56c\nmov     rax, cs:__security_cookie                                      ; +0x13, 0x14021f573\nxor     rax, rsp                                                       ; +0x1a, 0x14021f57a\nmov     [rsp+2A8h+var_38], rax                                         ; +0x1d, 0x14021f57d\nmov     rsi, rdx                                                       ; +0x25, 0x14021f585\nmov     rbx, rcx                                                       ; +0x28, 0x14021f588\nmov     [rsp+2A8h+var_270], rdx                                        ; +0x2b, 0x14021f58b\nxor     r14d, r14d                                                     ; +0x30, 0x14021f590\nlea     rcx, [rsp+2A8h+var_248]                                        ; +0x33, 0x14021f593\ncall    cs:??0?$BasicWriter@D@fmt@@QEAA@XZ; fmt::BasicWriter<char>::BasicWriter<char>(void) ; +0x38, 0x14021f598\nnop                                                                    ; +0x3e, 0x14021f59e\nmov     bpl, 1                                                         ; +0x3f, 0x14021f59f\nmov     rcx, [rbx+358h]                                                ; +0x42, 0x14021f5a2\ntest    rcx, rcx                                                       ; +0x49, 0x14021f5a9\njz      loc_14021F707                                                  ; +0x4c, 0x14021f5ac\nmov     rcx, [rcx+38h]                                                 ; +0x52, 0x14021f5b2\ntest    rcx, rcx                                                       ; +0x56, 0x14021f5b6\njz      loc_14021F707                                                  ; +0x59, 0x14021f5b9\nmov     rdi, [rcx+120h]                                                ; +0x5f, 0x14021f5bf\nlea     r15, byte_14070ECF8                                            ; +0x66, 0x14021f5c6\nnop     dword ptr [rax]                                                ; +0x6d, 0x14021f5cd\nmov     [rsp+2A8h+var_288], r14d                                       ; +0x70, 0x14021f5d0\nlea     r9, ??_R0?AVGJGameLevel@@@8; GJGameLevel `RTTI Type Descriptor' ; +0x75, 0x14021f5d5\nlea     r8, ??_R0?AVCCObject@cocos2d@@@8; cocos2d::CCObject `RTTI Type Descriptor' ; +0x7c, 0x14021f5dc\nxor     edx, edx                                                       ; +0x83, 0x14021f5e3\nmov     rcx, [rcx+108h]                                                ; +0x85, 0x14021f5e5\ncall    __RTDynamicCast                                                ; +0x8c, 0x14021f5ec\nmov     rbx, rax                                                       ; +0x91, 0x14021f5f1\ntest    rax, rax                                                       ; +0x94, 0x14021f5f4\njz      loc_14021F6B1                                                  ; +0x97, 0x14021f5f7\nmov     eax, [rax+3FCh]                                                ; +0x9d, 0x14021f5fd\nsub     eax, [rbx+400h]                                                ; +0xa3, 0x14021f603\ncmp     eax, 0Ah                                                       ; +0xa9, 0x14021f609\njnz     loc_14021F6B1                                                  ; +0xac, 0x14021f60c\nmov     eax, [rbx+3A4h]                                                ; +0xb2, 0x14021f612\nsub     eax, [rbx+3A0h]                                                ; +0xb8, 0x14021f618\ncmp     eax, 64h ; 'd'                                                 ; +0xbe, 0x14021f61e\njnz     loc_14021F6B1                                                  ; +0xc1, 0x14021f621\nmov     rcx, cs:qword_14090BFE0                                        ; +0xc7, 0x14021f627\ntest    rcx, rcx                                                       ; +0xce, 0x14021f62e\njnz     short loc_14021F661                                            ; +0xd1, 0x14021f631\nmov     ecx, 3E8h; Size                                                ; +0xd3, 0x14021f633\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xd8, 0x14021f638\nmov     [rsp+2A8h+var_270], rax                                        ; +0xdd, 0x14021f63d\nmov     rcx, rax                                                       ; +0xe2, 0x14021f642\ncall    sub_1402D6480                                                  ; +0xe5, 0x14021f645\nmov     rcx, rax                                                       ; +0xea, 0x14021f64a\nmov     cs:qword_14090BFE0, rax                                        ; +0xed, 0x14021f64d\nmov     rax, [rax]                                                     ; +0xf4, 0x14021f654\ncall    qword ptr [rax+48h]                                            ; +0xf7, 0x14021f657\nmov     rcx, cs:qword_14090BFE0                                        ; +0xfa, 0x14021f65a\nmov     rdx, rbx                                                       ; +0x101, 0x14021f661\ncall    GameStatsManager__hasCompletedLevel                            ; +0x104, 0x14021f664\ntest    al, al                                                         ; +0x109, 0x14021f669\njz      short loc_14021F6B1                                            ; +0x10b, 0x14021f66b\ntest    bpl, bpl                                                       ; +0x10d, 0x14021f66d\njnz     short loc_14021F697                                            ; +0x110, 0x14021f670\nmov     qword ptr [rsp+2A8h+var_268], r15                              ; +0x112, 0x14021f672\nmov     qword ptr [rsp+2A8h+var_268+8], r14                            ; +0x117, 0x14021f677\nmovaps  xmm0, [rsp+2A8h+var_268]                                       ; +0x11c, 0x14021f67c\nmovdqa  [rsp+2A8h+var_258], xmm0                                       ; +0x121, 0x14021f681\nlea     rdx, [rsp+2A8h+var_258]                                        ; +0x127, 0x14021f687\nlea     rcx, [rsp+2A8h+var_248]                                        ; +0x12c, 0x14021f68c\ncall    cs:??6?$BasicWriter@D@fmt@@QEAAAEAV01@V?$BasicStringRef@D@1@@Z; fmt::BasicWriter<char>::operator<<(fmt::BasicStringRef<char>) ; +0x131, 0x14021f691\nmov     edx, [rbx+148h]                                                ; +0x137, 0x14021f697\nsub     edx, [rbx+14Ch]                                                ; +0x13d, 0x14021f69d\nlea     rcx, [rsp+2A8h+var_248]                                        ; +0x143, 0x14021f6a3\ncall    cs:??6?$BasicWriter@D@fmt@@QEAAAEAV01@H@Z; fmt::BasicWriter<char>::operator<<(int) ; +0x148, 0x14021f6a8\nxor     bpl, bpl                                                       ; +0x14e, 0x14021f6ae\nmov     rcx, rdi                                                       ; +0x151, 0x14021f6b1\ntest    rdi, rdi                                                       ; +0x154, 0x14021f6b4\njz      short loc_14021F6C5                                            ; +0x157, 0x14021f6b7\nmov     rdi, [rdi+120h]                                                ; +0x159, 0x14021f6b9\njmp     loc_14021F5D0                                                  ; +0x160, 0x14021f6c0\ntest    bpl, bpl                                                       ; +0x165, 0x14021f6c5\njnz     short loc_14021F707                                            ; +0x168, 0x14021f6c8\nlea     rcx, [rsp+2A8h+var_248]                                        ; +0x16a, 0x14021f6ca\ncall    cs:?c_str@?$BasicWriter@D@fmt@@QEBAPEBDXZ; fmt::BasicWriter<char>::c_str(void) ; +0x16f, 0x14021f6cf\nxorps   xmm0, xmm0                                                     ; +0x175, 0x14021f6d5\nmovups  xmmword ptr [rsi], xmm0                                        ; +0x178, 0x14021f6d8\nmov     [rsi+10h], r14                                                 ; +0x17b, 0x14021f6db\nmov     [rsi+18h], r14                                                 ; +0x17f, 0x14021f6df\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x183, 0x14021f6e3\nnop     word ptr [rax+rax+00h]                                         ; +0x18a, 0x14021f6ea\ninc     r8                                                             ; +0x190, 0x14021f6f0\ncmp     byte ptr [rax+r8], 0                                           ; +0x193, 0x14021f6f3\njnz     short loc_14021F6F0                                            ; +0x198, 0x14021f6f8\nmov     rdx, rax                                                       ; +0x19a, 0x14021f6fa\nmov     rcx, rsi                                                       ; +0x19d, 0x14021f6fd\ncall    sub_14003D230                                                  ; +0x1a0, 0x14021f700\njmp     short loc_14021F71C                                            ; +0x1a5, 0x14021f705\nxorps   xmm0, xmm0                                                     ; +0x1a7, 0x14021f707\nmovups  xmmword ptr [rsi], xmm0                                        ; +0x1aa, 0x14021f70a\nmov     [rsi+10h], r14                                                 ; +0x1ad, 0x14021f70d\nmov     qword ptr [rsi+18h], 0Fh                                       ; +0x1b1, 0x14021f711\nmov     byte ptr [rsi], 0                                              ; +0x1b9, 0x14021f719\nlea     rcx, [rsp+2A8h+var_248]                                        ; +0x1bc, 0x14021f71c\ncall    cs:__imp_??1?$BasicWriter@D@fmt@@QEAA@XZ; fmt::BasicWriter<char>::~BasicWriter<char>(void) ; +0x1c1, 0x14021f721\nmov     rax, rsi                                                       ; +0x1c7, 0x14021f727\nmov     rcx, [rsp+2A8h+var_38]                                         ; +0x1ca, 0x14021f72a\nxor     rcx, rsp; StackCookie                                          ; +0x1d2, 0x14021f732\ncall    __security_check_cookie                                        ; +0x1d5, 0x14021f735\nmov     rbx, [rsp+2A8h+arg_10]                                         ; +0x1da, 0x14021f73a\nadd     rsp, 280h                                                      ; +0x1e2, 0x14021f742\npop     r15                                                            ; +0x1e9, 0x14021f749\npop     r14                                                            ; +0x1eb, 0x14021f74b\npop     rdi                                                            ; +0x1ed, 0x14021f74d\npop     rsi                                                            ; +0x1ee, 0x14021f74e\npop     rbp                                                            ; +0x1ef, 0x14021f74f\nretn                                                                   ; +0x1f0, 0x14021f750", "xrefs": ["GameLevelManager::updateUserScore @ 0x1402369c6", "<???> @ 0x14091bb3c"], "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"}