{"type": "func", "start": 5373446368, "end": 5373446676, "name": "MusicDownloadManager::isSFXDownloaded", "pseudocode": "// \n// MusicDownloadManager::isSFXDownloaded from 0x1404848e0 to 0x140484a14 (308 bytes)\n// \n// 5 xrefs:\n// > AudioAssetsBrowser::onInfo @ 0x140099a12\n// > CustomSFXWidget::updateSFXInfo @ 0x14016296b\n// > CustomSongWidget::updateWithMultiAssets @ 0x14016d5ef\n// > EditorSoundConfigInfoLayer::missingSFXIDs @ 0x1401966d0\n// > <???> @ 0x140928ae4\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:32:46 +0000\n// \n\nchar __fastcall MusicDownloadManager::isSFXDownloaded(__int64 a1, int a2)\n{\n  __int64 v2; // r10\n  unsigned int v3; // r11d\n  _QWORD *v5; // rax\n  size_t v6; // r8\n  __int64 v7; // rcx\n  __int64 v8; // rax\n  char v9; // bl\n  void *v10; // r8\n  unsigned __int8 v11[8]; // [rsp+30h] [rbp-58h] BYREF\n  void *Block[2]; // [rsp+38h] [rbp-50h] BYREF\n  __m128i si128; // [rsp+48h] [rbp-40h]\n  _BYTE v14[32]; // [rsp+58h] [rbp-30h] BYREF\n\n  *(_DWORD *)v11 = a2;\n  if ( sub_140066B50((_QWORD *)(a1 + 520), v11) )\n    return 1;\n  v5 = (_QWORD *)MusicDownloadManager::pathForSFX(v2, v14, v3);\n  if ( v5[3] > 0xFu )\n    v5 = (_QWORD *)*v5;\n  *(_OWORD *)Block = 0;\n  si128 = 0;\n  v6 = -1;\n  do\n    ++v6;\n  while ( *((_BYTE *)v5 + v6) );\n  sub_14003D230(Block, v5, v6);\n  v8 = cocos2d::CCFileUtils::sharedFileUtils(v7);\n  v9 = (*(__int64 (__fastcall **)(__int64, void **))(*(_QWORD *)v8 + 152LL))(v8, Block);\n  if ( si128.m128i_i64[1] > 0xFuLL )\n  {\n    v10 = Block[0];\n    if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v10 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v10);\n  }\n  si128 = _mm_load_si128((const __m128i *)&Size);\n  LOBYTE(Block[0]) = 0;\n  sub_14003D310((__int64)v14);\n  return v9;\n}", "assembly": "; \n; MusicDownloadManager::isSFXDownloaded from 0x1404848e0 to 0x140484a14 (308 bytes)\n; \n; 5 xrefs:\n; > AudioAssetsBrowser::onInfo @ 0x140099a12\n; > CustomSFXWidget::updateSFXInfo @ 0x14016296b\n; > CustomSongWidget::updateWithMultiAssets @ 0x14016d5ef\n; > EditorSoundConfigInfoLayer::missingSFXIDs @ 0x1401966d0\n; > <???> @ 0x140928ae4\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:32:46 +0000\n; \npush    rbx                                                            ; +0x0, 0x1404848e0\nsub     rsp, 80h                                                       ; +0x2, 0x1404848e2\nmov     rax, cs:__security_cookie                                      ; +0x9, 0x1404848e9\nxor     rax, rsp                                                       ; +0x10, 0x1404848f0\nmov     [rsp+88h+var_10], rax                                          ; +0x13, 0x1404848f3\nmov     r11d, edx                                                      ; +0x18, 0x1404848f8\nmov     r10, rcx                                                       ; +0x1b, 0x1404848fb\nmov     dword ptr [rsp+88h+var_58], edx                                ; +0x1e, 0x1404848fe\nadd     rcx, 208h                                                      ; +0x22, 0x140484902\nlea     rdx, [rsp+88h+var_58]                                          ; +0x29, 0x140484909\ncall    sub_140066B50                                                  ; +0x2e, 0x14048490e\ntest    rax, rax                                                       ; +0x33, 0x140484913\njz      short loc_14048491F                                            ; +0x36, 0x140484916\nmov     al, 1                                                          ; +0x38, 0x140484918\njmp     loc_1404849FE                                                  ; +0x3a, 0x14048491a\nmov     r8d, r11d                                                      ; +0x3f, 0x14048491f\nlea     rdx, [rsp+88h+var_30]                                          ; +0x42, 0x140484922\nmov     rcx, r10                                                       ; +0x47, 0x140484927\ncall    MusicDownloadManager__pathForSFX                               ; +0x4a, 0x14048492a\nnop                                                                    ; +0x4f, 0x14048492f\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x50, 0x140484930\njbe     short loc_14048493A                                            ; +0x55, 0x140484935\nmov     rax, [rax]                                                     ; +0x57, 0x140484937\nxorps   xmm0, xmm0                                                     ; +0x5a, 0x14048493a\nmovups  xmmword ptr [rsp+88h+Block], xmm0                              ; +0x5d, 0x14048493d\nxorps   xmm1, xmm1                                                     ; +0x62, 0x140484942\nmovdqu  [rsp+88h+var_40], xmm1                                         ; +0x65, 0x140484945\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x6b, 0x14048494b\ninc     r8                                                             ; +0x72, 0x140484952\ncmp     byte ptr [rax+r8], 0                                           ; +0x75, 0x140484955\njnz     short loc_140484952                                            ; +0x7a, 0x14048495a\nmov     rdx, rax                                                       ; +0x7c, 0x14048495c\nlea     rcx, [rsp+88h+Block]                                           ; +0x7f, 0x14048495f\ncall    sub_14003D230                                                  ; +0x84, 0x140484964\nnop                                                                    ; +0x89, 0x140484969\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x8a, 0x14048496a\nmov     rcx, [rax]                                                     ; +0x90, 0x140484970\nmov     r8, [rcx+98h]                                                  ; +0x93, 0x140484973\nlea     rdx, [rsp+88h+Block]                                           ; +0x9a, 0x14048497a\nmov     rcx, rax                                                       ; +0x9f, 0x14048497f\ncall    r8                                                             ; +0xa2, 0x140484982\nmovzx   ebx, al                                                        ; +0xa5, 0x140484985\nmov     rdx, qword ptr [rsp+88h+var_40+8]                              ; +0xa8, 0x140484988\ncmp     rdx, 0Fh                                                       ; +0xad, 0x14048498d\njbe     short loc_1404849DE                                            ; +0xb1, 0x140484991\ninc     rdx                                                            ; +0xb3, 0x140484993\nmov     r8, [rsp+88h+Block]                                            ; +0xb6, 0x140484996\nmov     rcx, r8                                                        ; +0xbb, 0x14048499b\ncmp     rdx, 1000h                                                     ; +0xbe, 0x14048499e\njb      short loc_1404849D6                                            ; +0xc5, 0x1404849a5\nadd     rdx, 27h ; '''                                                 ; +0xc7, 0x1404849a7\nmov     r8, [r8-8]                                                     ; +0xcb, 0x1404849ab\nsub     rcx, r8                                                        ; +0xcf, 0x1404849af\nsub     rcx, 8                                                         ; +0xd2, 0x1404849b2\ncmp     rcx, 1Fh                                                       ; +0xd6, 0x1404849b6\njbe     short loc_1404849D6                                            ; +0xda, 0x1404849ba\nmov     [rsp+88h+Reserved], 0; Reserved                                ; +0xdc, 0x1404849bc\nxor     r9d, r9d; LineNo                                               ; +0xe5, 0x1404849c5\nxor     r8d, r8d; FileName                                             ; +0xe8, 0x1404849c8\nxor     edx, edx; FunctionName                                         ; +0xeb, 0x1404849cb\nxor     ecx, ecx; Expression                                           ; +0xed, 0x1404849cd\ncall    cs:_invoke_watson                                              ; +0xef, 0x1404849cf\nalign 2                                                                ; +0xf5, 0x1404849d5\nmov     rcx, r8; Block                                                 ; +0xf6, 0x1404849d6\ncall    j_j_free                                                       ; +0xf9, 0x1404849d9\nmovdqa  xmm0, cs:Size                                                  ; +0xfe, 0x1404849de\nmovdqu  [rsp+88h+var_40], xmm0                                         ; +0x106, 0x1404849e6\nmov     byte ptr [rsp+88h+Block], 0                                    ; +0x10c, 0x1404849ec\nlea     rcx, [rsp+88h+var_30]                                          ; +0x111, 0x1404849f1\ncall    sub_14003D310                                                  ; +0x116, 0x1404849f6\nmovzx   eax, bl                                                        ; +0x11b, 0x1404849fb\nmov     rcx, [rsp+88h+var_10]                                          ; +0x11e, 0x1404849fe\nxor     rcx, rsp; StackCookie                                          ; +0x123, 0x140484a03\ncall    __security_check_cookie                                        ; +0x126, 0x140484a06\nadd     rsp, 80h                                                       ; +0x12b, 0x140484a0b\npop     rbx                                                            ; +0x132, 0x140484a12\nretn                                                                   ; +0x133, 0x140484a13", "xrefs": ["AudioAssetsBrowser::onInfo @ 0x140099a12", "CustomSFXWidget::updateSFXInfo @ 0x14016296b", "CustomSongWidget::updateWithMultiAssets @ 0x14016d5ef", "EditorSoundConfigInfoLayer::missingSFXIDs @ 0x1401966d0", "<???> @ 0x140928ae4"], "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"}