{"type": "func", "start": 5370373520, "end": 5370374034, "name": "EditorSoundConfigInfoLayer::missingSFXIDs", "pseudocode": "// \n// EditorSoundConfigInfoLayer::missingSFXIDs from 0x140196590 to 0x140196792 (514 bytes)\n// \n// 3 xrefs:\n// > EditorSoundConfigInfoLayer::onDownloadSFX @ 0x1401967cf\n// > EditorSoundConfigInfoLayer::downloadMissingSFX @ 0x140196a4a\n// > <???> @ 0x140919514\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:45 +0000\n// \n\n// Hidden C++ exception states: #wind=5\n__int64 __fastcall EditorSoundConfigInfoLayer::missingSFXIDs(__int64 a1, __int64 a2)\n{\n  __int64 v3; // rdx\n  unsigned __int64 v4; // r14\n  __int64 v5; // r8\n  __int64 v6; // rdx\n  __int64 v7; // rbp\n  unsigned __int64 v8; // rsi\n  int v9; // ebx\n  __int64 v10; // rcx\n  unsigned __int64 v11; // rcx\n  int *v12; // r9\n  _DWORD *v13; // rax\n  unsigned __int64 v14; // rdx\n  int v16; // [rsp+24h] [rbp-74h] BYREF\n  __int64 v17; // [rsp+28h] [rbp-70h] BYREF\n  __int64 v18; // [rsp+30h] [rbp-68h]\n  __int64 v19; // [rsp+40h] [rbp-58h]\n  void *v20; // [rsp+48h] [rbp-50h]\n  _BYTE v21[32]; // [rsp+50h] [rbp-48h] BYREF\n\n  v19 = a2;\n  *(_QWORD *)a2 = 0;\n  *(_QWORD *)(a2 + 8) = 0;\n  *(_QWORD *)(a2 + 16) = 0;\n  v3 = *(_QWORD *)(a1 + 1072);\n  if ( v3 && *(_BYTE *)(v3 + 544) )\n  {\n    sub_14003F4F0((__int64)v21, v3 + 512);\n    sub_140189D00(&v17, (__int64)v21);\n    sub_14003D310((__int64)v21);\n    v4 = 0;\n    v5 = v18;\n    v6 = v17;\n    if ( (v18 - v17) >> 5 )\n    {\n      v7 = 0;\n      do\n      {\n        v8 = 0;\n        if ( (__int64)(*(_QWORD *)(v6 + v7 + 16) - *(_QWORD *)(v6 + v7 + 8)) >> 2 )\n        {\n          do\n          {\n            v9 = *(_DWORD *)(*(_QWORD *)(v6 + v7 + 8) + 4 * v8);\n            v16 = v9;\n            if ( v9 > 0 )\n            {\n              v10 = qword_14090C070;\n              if ( !qword_14090C070 )\n              {\n                v20 = operator new(0x3D0u);\n                qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v20);\n                (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n                v10 = qword_14090C070;\n              }\n              if ( !(unsigned __int8)MusicDownloadManager::isSFXDownloaded(v10, (unsigned int)v9) )\n              {\n                v11 = 0;\n                v12 = *(int **)(a2 + 8);\n                v13 = *(_DWORD **)a2;\n                v14 = ((__int64)v12 - *(_QWORD *)a2) >> 2;\n                if ( v14 )\n                {\n                  while ( *v13 != v9 )\n                  {\n                    ++v11;\n                    ++v13;\n                    if ( v11 >= v14 )\n                      goto LABEL_13;\n                  }\n                }\n                else\n                {\nLABEL_13:\n                  if ( v12 == *(int **)(a2 + 16) )\n                  {\n                    sub_140069B30((const void **)a2, *(_BYTE **)(a2 + 8), &v16);\n                  }\n                  else\n                  {\n                    *v12 = v9;\n                    *(_QWORD *)(a2 + 8) += 4LL;\n                  }\n                }\n              }\n              v6 = v17;\n            }\n            ++v8;\n          }\n          while ( v8 < (__int64)(*(_QWORD *)(v6 + v7 + 16) - *(_QWORD *)(v6 + v7 + 8)) >> 2 );\n          v5 = v18;\n        }\n        ++v4;\n        v7 += 32;\n      }\n      while ( v4 < (v5 - v6) >> 5 );\n    }\n    sub_14018C460(&v17);\n  }\n  return a2;\n}", "assembly": "; \n; EditorSoundConfigInfoLayer::missingSFXIDs from 0x140196590 to 0x140196792 (514 bytes)\n; \n; 3 xrefs:\n; > EditorSoundConfigInfoLayer::onDownloadSFX @ 0x1401967cf\n; > EditorSoundConfigInfoLayer::downloadMissingSFX @ 0x140196a4a\n; > <???> @ 0x140919514\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:45 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x140196590\nmov     [rsp+arg_18], rbp                                              ; +0x5, 0x140196595\npush    rsi                                                            ; +0xa, 0x14019659a\npush    rdi                                                            ; +0xb, 0x14019659b\npush    r14                                                            ; +0xc, 0x14019659c\nsub     rsp, 80h                                                       ; +0xe, 0x14019659e\nmov     rax, cs:__security_cookie                                      ; +0x15, 0x1401965a5\nxor     rax, rsp                                                       ; +0x1c, 0x1401965ac\nmov     [rsp+98h+var_28], rax                                          ; +0x1f, 0x1401965af\nmov     rdi, rdx                                                       ; +0x24, 0x1401965b4\nmov     [rsp+98h+var_58], rdx                                          ; +0x27, 0x1401965b7\nmov     [rsp+98h+var_78], 1                                            ; +0x2c, 0x1401965bc\nmov     qword ptr [rdx], 0                                             ; +0x34, 0x1401965c4\nmov     qword ptr [rdx+8], 0                                           ; +0x3b, 0x1401965cb\nmov     qword ptr [rdx+10h], 0                                         ; +0x43, 0x1401965d3\nmov     [rsp+98h+var_78], 1                                            ; +0x4b, 0x1401965db\nmov     rdx, [rcx+430h]                                                ; +0x53, 0x1401965e3\ntest    rdx, rdx                                                       ; +0x5a, 0x1401965ea\njz      loc_14019676A                                                  ; +0x5d, 0x1401965ed\ncmp     byte ptr [rdx+220h], 0                                         ; +0x63, 0x1401965f3\njz      loc_14019676A                                                  ; +0x6a, 0x1401965fa\nadd     rdx, 200h                                                      ; +0x70, 0x140196600\nlea     rcx, [rsp+98h+var_48]                                          ; +0x77, 0x140196607\ncall    sub_14003F4F0                                                  ; +0x7c, 0x14019660c\nmov     [rsp+98h+var_78], 3                                            ; +0x81, 0x140196611\nlea     rdx, [rsp+98h+var_48]                                          ; +0x89, 0x140196619\nlea     rcx, [rsp+98h+var_70]                                          ; +0x8e, 0x14019661e\ncall    sub_140189D00                                                  ; +0x93, 0x140196623\nnop                                                                    ; +0x98, 0x140196628\nlea     rcx, [rsp+98h+var_48]                                          ; +0x99, 0x140196629\ncall    sub_14003D310                                                  ; +0x9e, 0x14019662e\nxor     r14d, r14d                                                     ; +0xa3, 0x140196633\nmov     r8, [rsp+98h+var_68]                                           ; +0xa6, 0x140196636\nmov     rax, r8                                                        ; +0xab, 0x14019663b\nmov     rdx, [rsp+98h+var_70]                                          ; +0xae, 0x14019663e\nsub     rax, rdx                                                       ; +0xb3, 0x140196643\nsar     rax, 5                                                         ; +0xb6, 0x140196646\ntest    rax, rax                                                       ; +0xba, 0x14019664a\njz      loc_14019675F                                                  ; +0xbd, 0x14019664d\nxor     ebp, ebp                                                       ; +0xc3, 0x140196653\nnop     word ptr [rax+rax+00000000h]                                   ; +0xc5, 0x140196655\nxor     esi, esi                                                       ; +0xd0, 0x140196660\nmov     rax, [rdx+rbp+10h]                                             ; +0xd2, 0x140196662\nsub     rax, [rdx+rbp+8]                                               ; +0xd7, 0x140196667\nsar     rax, 2                                                         ; +0xdc, 0x14019666c\ntest    rax, rax                                                       ; +0xe0, 0x140196670\njz      loc_140196745                                                  ; +0xe3, 0x140196673\nnop     dword ptr [rax+00000000h]                                      ; +0xe9, 0x140196679\nmov     rax, [rdx+rbp+8]                                               ; +0xf0, 0x140196680\nmov     ebx, [rax+rsi*4]                                               ; +0xf5, 0x140196685\nmov     [rsp+98h+var_74], ebx                                          ; +0xf8, 0x140196688\ntest    ebx, ebx                                                       ; +0xfc, 0x14019668c\njle     loc_140196726                                                  ; +0xfe, 0x14019668e\nmov     rcx, cs:qword_14090C070                                        ; +0x104, 0x140196694\ntest    rcx, rcx                                                       ; +0x10b, 0x14019669b\njnz     short loc_1401966CE                                            ; +0x10e, 0x14019669e\nmov     ecx, 3D0h; Size                                                ; +0x110, 0x1401966a0\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x115, 0x1401966a5\nmov     [rsp+98h+var_50], rax                                          ; +0x11a, 0x1401966aa\nmov     rcx, rax                                                       ; +0x11f, 0x1401966af\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x122, 0x1401966b2\nmov     rcx, rax                                                       ; +0x127, 0x1401966b7\nmov     cs:qword_14090C070, rax                                        ; +0x12a, 0x1401966ba\nmov     rax, [rax]                                                     ; +0x131, 0x1401966c1\ncall    qword ptr [rax+48h]                                            ; +0x134, 0x1401966c4\nmov     rcx, cs:qword_14090C070                                        ; +0x137, 0x1401966c7\nmov     edx, ebx                                                       ; +0x13e, 0x1401966ce\ncall    MusicDownloadManager__isSFXDownloaded                          ; +0x140, 0x1401966d0\ntest    al, al                                                         ; +0x145, 0x1401966d5\njnz     short loc_140196721                                            ; +0x147, 0x1401966d7\nxor     ecx, ecx                                                       ; +0x149, 0x1401966d9\nmov     r9, [rdi+8]                                                    ; +0x14b, 0x1401966db\nmov     rax, [rdi]                                                     ; +0x14f, 0x1401966df\nmov     rdx, r9                                                        ; +0x152, 0x1401966e2\nsub     rdx, rax                                                       ; +0x155, 0x1401966e5\nsar     rdx, 2                                                         ; +0x158, 0x1401966e8\ntest    rdx, rdx                                                       ; +0x15c, 0x1401966ec\njz      short loc_140196701                                            ; +0x15f, 0x1401966ef\ncmp     [rax], ebx                                                     ; +0x161, 0x1401966f1\njz      short loc_140196721                                            ; +0x163, 0x1401966f3\ninc     rcx                                                            ; +0x165, 0x1401966f5\nadd     rax, 4                                                         ; +0x168, 0x1401966f8\ncmp     rcx, rdx                                                       ; +0x16c, 0x1401966fc\njb      short loc_1401966F1                                            ; +0x16f, 0x1401966ff\ncmp     r9, [rdi+10h]                                                  ; +0x171, 0x140196701\njz      short loc_140196711                                            ; +0x175, 0x140196705\nmov     [r9], ebx                                                      ; +0x177, 0x140196707\nadd     qword ptr [rdi+8], 4                                           ; +0x17a, 0x14019670a\njmp     short loc_140196721                                            ; +0x17f, 0x14019670f\nlea     r8, [rsp+98h+var_74]                                           ; +0x181, 0x140196711\nmov     rdx, r9                                                        ; +0x186, 0x140196716\nmov     rcx, rdi                                                       ; +0x189, 0x140196719\ncall    sub_140069B30                                                  ; +0x18c, 0x14019671c\nmov     rdx, [rsp+98h+var_70]                                          ; +0x191, 0x140196721\ninc     rsi                                                            ; +0x196, 0x140196726\nmov     rax, [rdx+rbp+10h]                                             ; +0x199, 0x140196729\nsub     rax, [rdx+rbp+8]                                               ; +0x19e, 0x14019672e\nsar     rax, 2                                                         ; +0x1a3, 0x140196733\ncmp     rsi, rax                                                       ; +0x1a7, 0x140196737\njb      loc_140196680                                                  ; +0x1aa, 0x14019673a\nmov     r8, [rsp+98h+var_68]                                           ; +0x1b0, 0x140196740\ninc     r14                                                            ; +0x1b5, 0x140196745\nadd     rbp, 20h ; ' '                                                 ; +0x1b8, 0x140196748\nmov     rcx, r8                                                        ; +0x1bc, 0x14019674c\nsub     rcx, rdx                                                       ; +0x1bf, 0x14019674f\nsar     rcx, 5                                                         ; +0x1c2, 0x140196752\ncmp     r14, rcx                                                       ; +0x1c6, 0x140196756\njb      loc_140196660                                                  ; +0x1c9, 0x140196759\nlea     rcx, [rsp+98h+var_70]                                          ; +0x1cf, 0x14019675f\ncall    sub_14018C460                                                  ; +0x1d4, 0x140196764\nnop                                                                    ; +0x1d9, 0x140196769\nmov     rax, rdi                                                       ; +0x1da, 0x14019676a\nmov     rcx, [rsp+98h+var_28]                                          ; +0x1dd, 0x14019676d\nxor     rcx, rsp; StackCookie                                          ; +0x1e2, 0x140196772\ncall    __security_check_cookie                                        ; +0x1e5, 0x140196775\nlea     r11, [rsp+98h+var_18]                                          ; +0x1ea, 0x14019677a\nmov     rbx, [r11+30h]                                                 ; +0x1f2, 0x140196782\nmov     rbp, [r11+38h]                                                 ; +0x1f6, 0x140196786\nmov     rsp, r11                                                       ; +0x1fa, 0x14019678a\npop     r14                                                            ; +0x1fd, 0x14019678d\npop     rdi                                                            ; +0x1ff, 0x14019678f\npop     rsi                                                            ; +0x200, 0x140196790\nretn                                                                   ; +0x201, 0x140196791", "xrefs": ["EditorSoundConfigInfoLayer::onDownloadSFX @ 0x1401967cf", "EditorSoundConfigInfoLayer::downloadMissingSFX @ 0x140196a4a", "<???> @ 0x140919514"], "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"}