{"type": "func", "start": 5372726720, "end": 5372727275, "name": "EditorSoundsSettingsPopup::onDownloadAll", "pseudocode": "// \n// EditorSoundsSettingsPopup::onDownloadAll from 0x1403d4dc0 to 0x1403d4feb (555 bytes)\n// \n// 2 xrefs:\n// > EditorSoundsSettingsPopup::init @ 0x1403d4bfe\n// > <???> @ 0x14092492c\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:31:36 +0000\n// \n\n// Hidden C++ exception states: #wind=3\nvoid __fastcall EditorSoundsSettingsPopup::onDownloadAll(__int64 a1)\n{\n  __int64 v2; // rax\n  __int64 v3; // rdx\n  __int64 v4; // rax\n  cocos2d::CCObject *v5; // rbx\n  __int64 v6; // rax\n  size_t v7; // r8\n  __int64 v8; // rax\n  __int128 v9; // [rsp+50h] [rbp-B0h] BYREF\n  __int64 v10; // [rsp+60h] [rbp-A0h]\n  __int64 v11; // [rsp+68h] [rbp-98h]\n  __int128 *v12; // [rsp+70h] [rbp-90h]\n  __int128 *v13; // [rsp+78h] [rbp-88h]\n  __int64 v14; // [rsp+80h] [rbp-80h] BYREF\n  __int64 v15; // [rsp+88h] [rbp-78h]\n  _BYTE v16[40]; // [rsp+98h] [rbp-68h] BYREF\n  wchar_t Buffer[64]; // [rsp+C0h] [rbp-40h] BYREF\n\n  v2 = EditorSFXManager::sharedState();\n  EditorSFXManager::collectAllSFXIDs(v2, (__int64)&v14);\n  (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);\n  LOBYTE(v3) = 1;\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 520LL))(a1, v3);\n  if ( v14 == v15 )\n  {\n    v9 = 0;\n    *(_QWORD *)&v9 = sub_14003D460(0x20u);\n    v10 = 23;\n    v11 = 31;\n    strcpy((char *)v9, \"No SFX IDs to download.\");\n    v12 = &v9;\n    v4 = sub_14003F4F0((__int64)v16, (__int64)&v9);\n    v5 = FLAlertLayer::create(0, (int)\"Download\", v4, (__int64)\"OK\", 0, 1132593152, 0, 0, 1065353216);\n  }\n  else\n  {\n    v6 = EditorSFXManager::sharedState();\n    EditorSFXManager::downloadAllMissing(v6);\n    swprintf(\n      Buffer,\n      0x80u,\n      \"Requested download for %u SFX. Missing files will be fetched in the background.\",\n      (v15 - v14) >> 2);\n    v9 = 0;\n    v10 = 0;\n    v11 = 0;\n    v7 = -1;\n    do\n      ++v7;\n    while ( *((_BYTE *)Buffer + v7) );\n    sub_14003D230(&v9, Buffer, v7);\n    v13 = &v9;\n    v8 = sub_14003F4F0((__int64)v16, (__int64)&v9);\n    v5 = FLAlertLayer::create(0, (int)\"Download\", v8, (__int64)\"OK\", 0, 1134559232, 0, 0, 1065353216);\n  }\n  sub_14003D310((__int64)&v9);\n  (*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v5 + 1064LL))(v5);\n  sub_140069730((__int64)&v14);\n}", "assembly": "; \n; EditorSoundsSettingsPopup::onDownloadAll from 0x1403d4dc0 to 0x1403d4feb (555 bytes)\n; \n; 2 xrefs:\n; > EditorSoundsSettingsPopup::init @ 0x1403d4bfe\n; > <???> @ 0x14092492c\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:31:36 +0000\n; \nmov     [rsp-8+arg_8], rbx                                             ; +0x0, 0x1403d4dc0\npush    rbp                                                            ; +0x5, 0x1403d4dc5\nlea     rbp, [rsp-50h]                                                 ; +0x6, 0x1403d4dc6\nsub     rsp, 150h                                                      ; +0xb, 0x1403d4dcb\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x1403d4dd2\nxor     rax, rsp                                                       ; +0x19, 0x1403d4dd9\nmov     [rbp+50h+var_10], rax                                          ; +0x1c, 0x1403d4ddc\nmov     rbx, rcx                                                       ; +0x20, 0x1403d4de0\ncall    EditorSFXManager__sharedState                                  ; +0x23, 0x1403d4de3\nmov     rcx, rax                                                       ; +0x28, 0x1403d4de8\nlea     rdx, [rbp+50h+var_D0]                                          ; +0x2b, 0x1403d4deb\ncall    EditorSFXManager__collectAllSFXIDs                             ; +0x2f, 0x1403d4def\nnop                                                                    ; +0x34, 0x1403d4df4\nmov     rax, [rbx]                                                     ; +0x35, 0x1403d4df5\nxor     edx, edx                                                       ; +0x38, 0x1403d4df8\nmov     rcx, rbx                                                       ; +0x3a, 0x1403d4dfa\ncall    qword ptr [rax+3E0h]                                           ; +0x3d, 0x1403d4dfd\nmov     rax, [rbx]                                                     ; +0x43, 0x1403d4e03\nmov     dl, 1                                                          ; +0x46, 0x1403d4e06\nmov     rcx, rbx                                                       ; +0x48, 0x1403d4e08\ncall    qword ptr [rax+208h]                                           ; +0x4b, 0x1403d4e0b\nmov     rax, [rbp+50h+var_C8]                                          ; +0x51, 0x1403d4e11\ncmp     [rbp+50h+var_D0], rax                                          ; +0x55, 0x1403d4e15\njnz     loc_1403D4EE5                                                  ; +0x59, 0x1403d4e19\nxorps   xmm0, xmm0                                                     ; +0x5f, 0x1403d4e1f\nmovups  [rsp+150h+var_100], xmm0                                       ; +0x62, 0x1403d4e22\nxor     ebx, ebx                                                       ; +0x67, 0x1403d4e27\nmov     [rsp+150h+var_F0], rbx                                         ; +0x69, 0x1403d4e29\nmov     [rsp+150h+var_E8], rbx                                         ; +0x6e, 0x1403d4e2e\nmov     ecx, 20h ; ' '                                                 ; +0x73, 0x1403d4e33\ncall    sub_14003D460                                                  ; +0x78, 0x1403d4e38\nmov     qword ptr [rsp+150h+var_100], rax                              ; +0x7d, 0x1403d4e3d\nmov     [rsp+150h+var_F0], 17h                                         ; +0x82, 0x1403d4e42\nmov     [rsp+150h+var_E8], 1Fh                                         ; +0x8b, 0x1403d4e4b\nmovups  xmm0, cs:xmmword_140785970                                     ; +0x94, 0x1403d4e54\nmovups  xmmword ptr [rax], xmm0                                        ; +0x9b, 0x1403d4e5b\nmov     ecx, cs:dword_140785980                                        ; +0x9e, 0x1403d4e5e\nmov     [rax+10h], ecx                                                 ; +0xa4, 0x1403d4e64\nmovzx   ecx, cs:word_140785984                                         ; +0xa7, 0x1403d4e67\nmov     [rax+14h], cx                                                  ; +0xae, 0x1403d4e6e\nmovzx   ecx, cs:byte_140785986                                         ; +0xb2, 0x1403d4e72\nmov     [rax+16h], cl                                                  ; +0xb9, 0x1403d4e79\nmov     [rax+17h], bl                                                  ; +0xbc, 0x1403d4e7c\nlea     rax, [rsp+150h+var_100]                                        ; +0xbf, 0x1403d4e7f\nmov     [rsp+150h+var_E0], rax                                         ; +0xc4, 0x1403d4e84\nlea     rdx, [rsp+150h+var_100]                                        ; +0xc9, 0x1403d4e89\nlea     rcx, [rbp+50h+var_B8]                                          ; +0xce, 0x1403d4e8e\ncall    sub_14003F4F0                                                  ; +0xd2, 0x1403d4e92\nmovss   xmm0, cs:flt_140835080                                         ; +0xd7, 0x1403d4e97\nmovss   [rsp+150h+var_110], xmm0                                       ; +0xdf, 0x1403d4e9f\nxorps   xmm1, xmm1                                                     ; +0xe5, 0x1403d4ea5\nmovss   [rsp+150h+var_118], xmm1                                       ; +0xe8, 0x1403d4ea8\nmov     [rsp+150h+var_120], bl                                         ; +0xee, 0x1403d4eae\nmovss   xmm0, cs:dword_14083596C                                       ; +0xf2, 0x1403d4eb2\nmovss   [rsp+150h+var_128], xmm0                                       ; +0xfa, 0x1403d4eba\nmov     [rsp+150h+var_130], rbx                                        ; +0x100, 0x1403d4ec0\nlea     r9, aOk; \"OK\"                                                  ; +0x105, 0x1403d4ec5\nmov     r8, rax                                                        ; +0x10c, 0x1403d4ecc\nlea     rdx, aDownload_0; \"Download\"                                   ; +0x10f, 0x1403d4ecf\nxor     ecx, ecx                                                       ; +0x116, 0x1403d4ed6\ncall    FLAlertLayer__create                                           ; +0x118, 0x1403d4ed8\nmov     rbx, rax                                                       ; +0x11d, 0x1403d4edd\njmp     loc_1403D4FAB                                                  ; +0x120, 0x1403d4ee0\ncall    EditorSFXManager__sharedState                                  ; +0x125, 0x1403d4ee5\nmov     rcx, rax                                                       ; +0x12a, 0x1403d4eea\ncall    EditorSFXManager__downloadAllMissing                           ; +0x12d, 0x1403d4eed\nmov     r9, [rbp+50h+var_C8]                                           ; +0x132, 0x1403d4ef2\nsub     r9, [rbp+50h+var_D0]                                           ; +0x136, 0x1403d4ef6\nsar     r9, 2                                                          ; +0x13a, 0x1403d4efa\nlea     r8, aRequestedDownl; \"Requested download for %u SFX. Missing \"... ; +0x13e, 0x1403d4efe\nmov     edx, 80h; BufferCount                                          ; +0x145, 0x1403d4f05\nlea     rcx, [rbp+50h+Buffer]; Buffer                                  ; +0x14a, 0x1403d4f0a\ncall    swprintf                                                       ; +0x14e, 0x1403d4f0e\nxorps   xmm0, xmm0                                                     ; +0x153, 0x1403d4f13\nmovups  [rsp+150h+var_100], xmm0                                       ; +0x156, 0x1403d4f16\nxor     ebx, ebx                                                       ; +0x15b, 0x1403d4f1b\nmov     [rsp+150h+var_F0], rbx                                         ; +0x15d, 0x1403d4f1d\nmov     [rsp+150h+var_E8], rbx                                         ; +0x162, 0x1403d4f22\nlea     rax, [rbp+50h+Buffer]                                          ; +0x167, 0x1403d4f27\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x16b, 0x1403d4f2b\ninc     r8                                                             ; +0x172, 0x1403d4f32\ncmp     [rax+r8], bl                                                   ; +0x175, 0x1403d4f35\njnz     short loc_1403D4F32                                            ; +0x179, 0x1403d4f39\nlea     rdx, [rbp+50h+Buffer]                                          ; +0x17b, 0x1403d4f3b\nlea     rcx, [rsp+150h+var_100]                                        ; +0x17f, 0x1403d4f3f\ncall    sub_14003D230                                                  ; +0x184, 0x1403d4f44\nlea     rax, [rsp+150h+var_100]                                        ; +0x189, 0x1403d4f49\nmov     [rsp+150h+var_D8], rax                                         ; +0x18e, 0x1403d4f4e\nlea     rdx, [rsp+150h+var_100]                                        ; +0x193, 0x1403d4f53\nlea     rcx, [rbp+50h+var_B8]                                          ; +0x198, 0x1403d4f58\ncall    sub_14003F4F0                                                  ; +0x19c, 0x1403d4f5c\nmovss   xmm0, cs:flt_140835080                                         ; +0x1a1, 0x1403d4f61\nmovss   [rsp+150h+var_110], xmm0                                       ; +0x1a9, 0x1403d4f69\nxorps   xmm1, xmm1                                                     ; +0x1af, 0x1403d4f6f\nmovss   [rsp+150h+var_118], xmm1                                       ; +0x1b2, 0x1403d4f72\nmov     [rsp+150h+var_120], 0                                          ; +0x1b8, 0x1403d4f78\nmovss   xmm0, cs:dword_1408359C0                                       ; +0x1bd, 0x1403d4f7d\nmovss   [rsp+150h+var_128], xmm0                                       ; +0x1c5, 0x1403d4f85\nmov     [rsp+150h+var_130], rbx                                        ; +0x1cb, 0x1403d4f8b\nlea     r9, aOk; \"OK\"                                                  ; +0x1d0, 0x1403d4f90\nmov     r8, rax                                                        ; +0x1d7, 0x1403d4f97\nlea     rdx, aDownload_0; \"Download\"                                   ; +0x1da, 0x1403d4f9a\nxor     ecx, ecx                                                       ; +0x1e1, 0x1403d4fa1\ncall    FLAlertLayer__create                                           ; +0x1e3, 0x1403d4fa3\nmov     rbx, rax                                                       ; +0x1e8, 0x1403d4fa8\nlea     rcx, [rsp+150h+var_100]                                        ; +0x1eb, 0x1403d4fab\ncall    sub_14003D310                                                  ; +0x1f0, 0x1403d4fb0\nmov     rcx, [rbx]                                                     ; +0x1f5, 0x1403d4fb5\nmov     rdx, [rcx+428h]                                                ; +0x1f8, 0x1403d4fb8\nmov     rcx, rbx                                                       ; +0x1ff, 0x1403d4fbf\ncall    rdx                                                            ; +0x202, 0x1403d4fc2\nnop                                                                    ; +0x204, 0x1403d4fc4\nlea     rcx, [rbp+50h+var_D0]                                          ; +0x205, 0x1403d4fc5\ncall    sub_140069730                                                  ; +0x209, 0x1403d4fc9\nmov     rcx, [rbp+50h+var_10]                                          ; +0x20e, 0x1403d4fce\nxor     rcx, rsp; StackCookie                                          ; +0x212, 0x1403d4fd2\ncall    __security_check_cookie                                        ; +0x215, 0x1403d4fd5\nmov     rbx, [rsp+150h+arg_8]                                          ; +0x21a, 0x1403d4fda\nadd     rsp, 150h                                                      ; +0x222, 0x1403d4fe2\npop     rbp                                                            ; +0x229, 0x1403d4fe9\nretn                                                                   ; +0x22a, 0x1403d4fea", "xrefs": ["EditorSoundsSettingsPopup::init @ 0x1403d4bfe", "<???> @ 0x14092492c"], "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"}