{"type": "func", "start": 4296008196, "end": 4296008468, "name": "CustomSongWidget::downloadAssetFinished", "pseudocode": "// \n// CustomSongWidget::downloadAssetFinished from 0x1000fe204 to 0x1000fe314 (272 bytes)\n// \n// 3 xrefs:\n// > CustomSongWidget::downloadSongFinished @ 0x1000fe164\n// > CustomSongWidget::downloadSFXFinished @ 0x1000fe414\n// > sub_1000FE418 @ 0x1000fe420\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 __fastcall CustomSongWidget::downloadAssetFinished(CustomSongWidget *a1, int a2, GJAssetType a3)\n{\n  std::__vector_base<GJAssetDownloadAction>::pointer begin; // x21\n  std::__vector_base<GJAssetDownloadAction>::pointer end; // x9\n  __int64 v6; // x22\n  std::map<int,bool> *p_m_sfx; // x0\n  char *v8; // x20\n  std::__vector_base<GJAssetDownloadAction>::pointer v9; // x1\n  std::__vector_base<GJAssetDownloadAction>::pointer v10; // x9\n  __int64 v11; // x8\n  __int64 v12; // x21\n  std::__vector_base<GJAssetDownloadAction>::pointer v13; // x8\n  char v14; // [xsp+7h] [xbp-29h] BYREF\n  char *v15; // [xsp+8h] [xbp-28h] BYREF\n\n  begin = a1->m_undownloadedAssets.__begin_;\n  end = a1->m_undownloadedAssets.__end_;\n  if ( begin == end )\n    return;\n  v6 = 0;\n  while ( *(int *)((char *)&begin->m_id + v6) != a2 || *(GJAssetType *)((char *)&begin->m_assetType + v6) != a3 )\n  {\n    v6 += 16;\n    if ( (std::__vector_base<GJAssetDownloadAction>::pointer)((char *)begin + v6) == end )\n      return;\n  }\n  if ( a3 == User )\n  {\n    v15 = (char *)begin + v6;\n    p_m_sfx = &a1->m_sfx;\n    goto LABEL_11;\n  }\n  if ( a3 == 1 )\n  {\n    v15 = (char *)begin + v6;\n    p_m_sfx = &a1->m_songs;\nLABEL_11:\n    *(_BYTE *)(sub_1000FE7D8(p_m_sfx, (char *)begin + v6, &unk_100636BF7, &v15, &v14) + 32) = 1;\n  }\n  v8 = (char *)begin + v6;\n  v9 = (std::__vector_base<GJAssetDownloadAction>::pointer)((char *)begin + v6 + 16);\n  v10 = a1->m_undownloadedAssets.__end_;\n  v11 = (char *)v10 - (char *)begin - v6;\n  v12 = v11 - 16;\n  if ( v9 != v10 )\n    memmove(v8, v9, v11 - 19);\n  v13 = a1->m_undownloadedAssets.__begin_;\n  a1->m_undownloadedAssets.__end_ = (std::__vector_base<GJAssetDownloadAction>::pointer)&v8[v12];\n  if ( v13 != (std::__vector_base<GJAssetDownloadAction>::pointer)&v8[v12] )\n    CustomSongWidget::updateMultiAssetInfo(a1, 0);\n  CustomSongWidget::processNextMultiAsset(a1);\n}", "assembly": "; \n; CustomSongWidget::downloadAssetFinished from 0x1000fe204 to 0x1000fe314 (272 bytes)\n; \n; 3 xrefs:\n; > CustomSongWidget::downloadSongFinished @ 0x1000fe164\n; > CustomSongWidget::downloadSFXFinished @ 0x1000fe414\n; > sub_1000FE418 @ 0x1000fe420\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\nSUB             SP, SP, #0x40                                          ; +0x0, 0x1000fe204\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x1000fe208\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1000fe20c\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1000fe210\nADD             X29, SP, #0x30                                         ; +0x10, 0x1000fe214\nLDR             X21, [X0,#0x240]                                       ; +0x14, 0x1000fe218\nLDR             X9, [X0,#0x248]                                        ; +0x18, 0x1000fe21c\nCMP             X21, X9                                                ; +0x1c, 0x1000fe220\nB.EQ            loc_1000FE300                                          ; +0x20, 0x1000fe224\nMOV             X8, X1                                                 ; +0x24, 0x1000fe228\nMOV             X19, X0                                                ; +0x28, 0x1000fe22c\nMOV             X22, #0                                                ; +0x2c, 0x1000fe230\nLDR             W10, [X21,X22]                                         ; +0x30, 0x1000fe234\nCMP             W10, W8                                                ; +0x34, 0x1000fe238\nB.NE            loc_1000FE250                                          ; +0x38, 0x1000fe23c\nADD             X1, X21, X22                                           ; +0x3c, 0x1000fe240\nLDR             W10, [X1,#4]                                           ; +0x40, 0x1000fe244\nCMP             W10, W2                                                ; +0x44, 0x1000fe248\nB.EQ            loc_1000FE264                                          ; +0x48, 0x1000fe24c\nADD             X22, X22, #0x10                                        ; +0x4c, 0x1000fe250\nADD             X10, X21, X22                                          ; +0x50, 0x1000fe254\nCMP             X10, X9                                                ; +0x54, 0x1000fe258\nB.NE            loc_1000FE234                                          ; +0x58, 0x1000fe25c\nB               loc_1000FE300                                          ; +0x5c, 0x1000fe260\nCMP             W2, #2                                                 ; +0x60, 0x1000fe264\nB.EQ            loc_1000FE288                                          ; +0x64, 0x1000fe268\nCMP             W2, #1                                                 ; +0x68, 0x1000fe26c\nB.NE            loc_1000FE2AC                                          ; +0x6c, 0x1000fe270\nSTR             X1, [SP,#0x30+var_28]                                  ; +0x70, 0x1000fe274\nADRL            X2, unk_100636BF7                                      ; +0x74, 0x1000fe278\nADD             X0, X19, #0x210                                        ; +0x7c, 0x1000fe280\nB               loc_1000FE298                                          ; +0x80, 0x1000fe284\nSTR             X1, [SP,#0x30+var_28]                                  ; +0x84, 0x1000fe288\nADRL            X2, unk_100636BF7                                      ; +0x88, 0x1000fe28c\nADD             X0, X19, #0x228                                        ; +0x90, 0x1000fe294\nADD             X3, SP, #0x30+var_28                                   ; +0x94, 0x1000fe298\nADD             X4, SP, #0x30+var_29                                   ; +0x98, 0x1000fe29c\nBL              sub_1000FE7D8                                          ; +0x9c, 0x1000fe2a0\nMOV             W8, #1                                                 ; +0xa0, 0x1000fe2a4\nSTRB            W8, [X0,#0x20]                                         ; +0xa4, 0x1000fe2a8\nADD             X20, X21, X22                                          ; +0xa8, 0x1000fe2ac\nADD             X1, X20, #0x10; __src                                  ; +0xac, 0x1000fe2b0\nLDR             X9, [X19,#0x248]                                       ; +0xb0, 0x1000fe2b4\nSUB             X8, X9, X21                                            ; +0xb4, 0x1000fe2b8\nSUB             X8, X8, X22                                            ; +0xb8, 0x1000fe2bc\nSUB             X21, X8, #0x10                                         ; +0xbc, 0x1000fe2c0\nCMP             X1, X9                                                 ; +0xc0, 0x1000fe2c4\nB.EQ            loc_1000FE2D8                                          ; +0xc4, 0x1000fe2c8\nSUB             X2, X8, #0x13; __len                                   ; +0xc8, 0x1000fe2cc\nMOV             X0, X20; __dst                                         ; +0xcc, 0x1000fe2d0\nBL              _memmove                                               ; +0xd0, 0x1000fe2d4\nLDR             X8, [X19,#0x240]                                       ; +0xd4, 0x1000fe2d8\nADD             X9, X20, X21                                           ; +0xd8, 0x1000fe2dc\nSTR             X9, [X19,#0x248]                                       ; +0xdc, 0x1000fe2e0\nCMP             X8, X9                                                 ; +0xe0, 0x1000fe2e4\nB.EQ            loc_1000FE2F8                                          ; +0xe4, 0x1000fe2e8\nMOV             X0, X19                                                ; +0xe8, 0x1000fe2ec\nMOV             W1, #0                                                 ; +0xec, 0x1000fe2f0\nBL              CustomSongWidget__updateMultiAssetInfo                 ; +0xf0, 0x1000fe2f4\nMOV             X0, X19                                                ; +0xf4, 0x1000fe2f8\nBL              CustomSongWidget__processNextMultiAsset                ; +0xf8, 0x1000fe2fc\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xfc, 0x1000fe300\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x100, 0x1000fe304\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x104, 0x1000fe308\nADD             SP, SP, #0x40 ; '@'                                    ; +0x108, 0x1000fe30c\nRET                                                                    ; +0x10c, 0x1000fe310", "xrefs": ["CustomSongWidget::downloadSongFinished @ 0x1000fe164", "CustomSongWidget::downloadSFXFinished @ 0x1000fe414", "sub_1000FE418 @ 0x1000fe420"], "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"}