{"type": "func", "start": 5369549984, "end": 5369550164, "name": "CustomSongWidget::downloadAssetFinished", "pseudocode": "// \n// CustomSongWidget::downloadAssetFinished from 0x1400cd4a0 to 0x1400cd554 (180 bytes)\n// \n// 3 xrefs:\n// > CustomSongWidget::downloadSongFinished @ 0x1400ccf4d\n// > CustomSongWidget::downloadSFXFinished @ 0x1400cd06d\n// > <???> @ 0x1406c83e8\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid CustomSongWidget::downloadAssetFinished(CustomSongWidget *a1, int a2, GJAssetType a3)\n{\n  std::_Vector_val<std::_Simple_types<GJAssetDownloadAction>>::pointer Myfirst; // rbx\n  std::_Vector_val<std::_Simple_types<GJAssetDownloadAction>>::pointer Mylast; // rax\n  GJAssetType m_assetType; // ecx\n  std::map<int,bool> *p_m_songs; // rcx\n\n  Myfirst = a1->m_undownloadedAssets._Mypair._Myval2._Myfirst;\n  Mylast = a1->m_undownloadedAssets._Mypair._Myval2._Mylast;\n  if ( Myfirst == Mylast )\n    return;\n  while ( 1 )\n  {\n    if ( Myfirst->m_id == a2 )\n    {\n      m_assetType = Myfirst->m_assetType;\n      if ( m_assetType == a3 )\n        break;\n    }\n    Myfirst = (std::_Vector_val<std::_Simple_types<GJAssetDownloadAction>>::pointer)((char *)Myfirst + 16);\n    if ( Myfirst == Mylast )\n      return;\n  }\n  if ( m_assetType == 1 )\n  {\n    p_m_songs = &a1->m_songs;\nLABEL_10:\n    *(_BYTE *)sub_1400CDBF0(p_m_songs, Myfirst) = 1;\n    goto LABEL_11;\n  }\n  if ( m_assetType == User )\n  {\n    p_m_songs = &a1->m_sfx;\n    goto LABEL_10;\n  }\nLABEL_11:\n  memmove(\n    Myfirst,\n    &Myfirst[1].m_assetType,\n    (char *)a1->m_undownloadedAssets._Mypair._Myval2._Mylast - ((char *)Myfirst + 16));\n  a1->m_undownloadedAssets._Mypair._Myval2._Mylast = (std::_Vector_val<std::_Simple_types<GJAssetDownloadAction>>::pointer)((char *)a1->m_undownloadedAssets._Mypair._Myval2._Mylast - 16);\n  if ( a1->m_undownloadedAssets._Mypair._Myval2._Myfirst != a1->m_undownloadedAssets._Mypair._Myval2._Mylast )\n    CustomSongWidget::updateMultiAssetInfo(a1, 0);\n  CustomSongWidget::processNextMultiAsset(a1);\n}", "assembly": "; \n; CustomSongWidget::downloadAssetFinished from 0x1400cd4a0 to 0x1400cd554 (180 bytes)\n; \n; 3 xrefs:\n; > CustomSongWidget::downloadSongFinished @ 0x1400ccf4d\n; > CustomSongWidget::downloadSFXFinished @ 0x1400cd06d\n; > <???> @ 0x1406c83e8\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1400cd4a0\npush    rdi                                                            ; +0x5, 0x1400cd4a5\nsub     rsp, 20h                                                       ; +0x6, 0x1400cd4a6\nmov     rbx, [rcx+230h]                                                ; +0xa, 0x1400cd4aa\nmov     rdi, rcx                                                       ; +0x11, 0x1400cd4b1\nmov     rax, [rcx+238h]                                                ; +0x14, 0x1400cd4b4\ncmp     rbx, rax                                                       ; +0x1b, 0x1400cd4bb\njz      loc_1400CD549                                                  ; +0x1e, 0x1400cd4be\ncmp     [rbx], edx                                                     ; +0x24, 0x1400cd4c4\njnz     short loc_1400CD4D0                                            ; +0x26, 0x1400cd4c6\nmov     ecx, [rbx+4]                                                   ; +0x28, 0x1400cd4c8\ncmp     ecx, r8d                                                       ; +0x2b, 0x1400cd4cb\njz      short loc_1400CD4E4                                            ; +0x2e, 0x1400cd4ce\nadd     rbx, 10h                                                       ; +0x30, 0x1400cd4d0\ncmp     rbx, rax                                                       ; +0x34, 0x1400cd4d4\njnz     short loc_1400CD4C4                                            ; +0x37, 0x1400cd4d7\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x39, 0x1400cd4d9\nadd     rsp, 20h                                                       ; +0x3e, 0x1400cd4de\npop     rdi                                                            ; +0x42, 0x1400cd4e2\nretn                                                                   ; +0x43, 0x1400cd4e3\ncmp     ecx, 1                                                         ; +0x44, 0x1400cd4e4\njnz     short loc_1400CD4F2                                            ; +0x47, 0x1400cd4e7\nlea     rcx, [rdi+210h]                                                ; +0x49, 0x1400cd4e9\njmp     short loc_1400CD4FE                                            ; +0x50, 0x1400cd4f0\ncmp     ecx, 2                                                         ; +0x52, 0x1400cd4f2\njnz     short loc_1400CD509                                            ; +0x55, 0x1400cd4f5\nlea     rcx, [rdi+220h]                                                ; +0x57, 0x1400cd4f7\nmov     rdx, rbx                                                       ; +0x5e, 0x1400cd4fe\ncall    sub_1400CDBF0                                                  ; +0x61, 0x1400cd501\nmov     byte ptr [rax], 1                                              ; +0x66, 0x1400cd506\nmov     r8, [rdi+238h]                                                 ; +0x69, 0x1400cd509\nlea     rdx, [rbx+10h]; Src                                            ; +0x70, 0x1400cd510\nsub     r8, rdx; Size                                                  ; +0x74, 0x1400cd514\nmov     rcx, rbx; void *                                               ; +0x77, 0x1400cd517\ncall    memmove                                                        ; +0x7a, 0x1400cd51a\nadd     qword ptr [rdi+238h], 0FFFFFFFFFFFFFFF0h                       ; +0x7f, 0x1400cd51f\nmov     rax, [rdi+238h]                                                ; +0x87, 0x1400cd527\ncmp     [rdi+230h], rax                                                ; +0x8e, 0x1400cd52e\njz      short loc_1400CD541                                            ; +0x95, 0x1400cd535\nxor     edx, edx                                                       ; +0x97, 0x1400cd537\nmov     rcx, rdi                                                       ; +0x99, 0x1400cd539\ncall    CustomSongWidget__updateMultiAssetInfo                         ; +0x9c, 0x1400cd53c\nmov     rcx, rdi                                                       ; +0xa1, 0x1400cd541\ncall    CustomSongWidget__processNextMultiAsset                        ; +0xa4, 0x1400cd544\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xa9, 0x1400cd549\nadd     rsp, 20h                                                       ; +0xae, 0x1400cd54e\npop     rdi                                                            ; +0xb2, 0x1400cd552\nretn                                                                   ; +0xb3, 0x1400cd553", "xrefs": ["CustomSongWidget::downloadSongFinished @ 0x1400ccf4d", "CustomSongWidget::downloadSFXFinished @ 0x1400cd06d", "<???> @ 0x1406c83e8"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}