{"type": "func", "start": 5135588, "end": 5135758, "name": "CustomSongWidget::downloadAssetFinished", "pseudocode": "// \n// CustomSongWidget::downloadAssetFinished from 0x4e5ce4 to 0x4e5d8e (170 bytes)\n// \n// 2 xrefs:\n// > CustomSongWidget::downloadSongFinished @ 0x4e5da0\n// > CustomSongWidget::downloadSFXFinished @ 0x4e5e16\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:51:05 +0000\n// \n\nMusicDownloadManager *__fastcall CustomSongWidget::downloadAssetFinished(MusicDownloadManager *result, int *a2, int a3)\n{\n  CustomSongWidget *v3; // r4\n  int *v4; // r5\n  int *v5; // r3\n  int *v6; // r6\n  int *v7; // r0\n  int *i; // r3\n  int *v9; // r2\n  int v10; // t1\n  char *v11; // r3\n  char *v12; // r2\n  int v13; // r2\n\n  v3 = result;\n  v4 = *((int **)result + 103);\n  v5 = *((int **)result + 104);\n  if ( v4 != v5 )\n  {\n    while ( 1 )\n    {\n      v6 = v4 + 4;\n      if ( (int *)*v4 == a2 && v4[1] == a3 )\n        break;\n      v4 += 4;\n      if ( v6 == v5 )\n        return result;\n    }\n    if ( a3 == 1 )\n    {\n      *(_BYTE *)std::map<int,bool>::operator[]((int **)result + 97, v4) = 1;\n    }\n    else if ( a3 == 2 )\n    {\n      *(_BYTE *)std::map<int,bool>::operator[]((int **)result + 100, v4) = 1;\n    }\n    v7 = *((int **)v3 + 104);\n    for ( i = v4 + 4; i != v7; i += 4 )\n    {\n      a2 = i - 4;\n      v9 = i;\n      do\n      {\n        v10 = *v9++;\n        *a2++ = v10;\n      }\n      while ( v9 != i + 3 );\n      *(_BYTE *)a2 = *(_BYTE *)v9;\n    }\n    v11 = (char *)v4 + (((char *)i - (char *)v6) & 0xFFFFFFF0);\n    while ( 1 )\n    {\n      v12 = *((char **)v3 + 104);\n      if ( v11 == v12 )\n        break;\n      *((_DWORD *)v3 + 104) = v12 - 16;\n    }\n    v13 = *((_DWORD *)v3 + 103);\n    if ( (char *)v13 != v11 )\n      CustomSongWidget::updateMultiAssetInfo(v3, 0);\n    return CustomSongWidget::processNextMultiAsset(v3, (int)a2, v13);\n  }\n  return result;\n}", "assembly": "; \n; CustomSongWidget::downloadAssetFinished from 0x4e5ce4 to 0x4e5d8e (170 bytes)\n; \n; 2 xrefs:\n; > CustomSongWidget::downloadSongFinished @ 0x4e5da0\n; > CustomSongWidget::downloadSFXFinished @ 0x4e5e16\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:51:05 +0000\n; \nPUSH            {R3-R7,LR}                                             ; +0x0, 0x4e5ce4\nMOV             R4, R0                                                 ; +0x2, 0x4e5ce6\nLDR.W           R5, [R0,#0x19C]                                        ; +0x4, 0x4e5ce8\nMOV             R7, R2                                                 ; +0x8, 0x4e5cec\nLDR.W           R3, [R0,#0x1A0]                                        ; +0xa, 0x4e5cee\nCMP             R5, R3                                                 ; +0xe, 0x4e5cf2\nBEQ             locret_4E5D8C                                          ; +0x10, 0x4e5cf4\nMOV             R6, R5                                                 ; +0x12, 0x4e5cf6\nLDR.W           R2, [R6],#0x10                                         ; +0x14, 0x4e5cf8\nCMP             R2, R1                                                 ; +0x18, 0x4e5cfc\nBNE             loc_4E5D6A                                             ; +0x1a, 0x4e5cfe\nLDR             R2, [R5,#4]                                            ; +0x1c, 0x4e5d00\nCMP             R2, R7                                                 ; +0x1e, 0x4e5d02\nBNE             loc_4E5D6A                                             ; +0x20, 0x4e5d04\nCMP             R7, #1                                                 ; +0x22, 0x4e5d06\nBNE             loc_4E5D18                                             ; +0x24, 0x4e5d08\nADD.W           R0, R4, #0x184                                         ; +0x26, 0x4e5d0a\nMOV             R1, R5                                                 ; +0x2a, 0x4e5d0e\nBL              _ZNSt6__ndk13mapIibNS_4lessIiEENS_9allocatorINS_4pairIKibEEEEEixERS5_; std::map<int,bool>::operator[](int const&) ; +0x2c, 0x4e5d10\nSTRB            R7, [R0]                                               ; +0x30, 0x4e5d14\nB               loc_4E5D2A                                             ; +0x32, 0x4e5d16\nCMP             R7, #2                                                 ; +0x34, 0x4e5d18\nBNE             loc_4E5D2A                                             ; +0x36, 0x4e5d1a\nADD.W           R0, R4, #0x190                                         ; +0x38, 0x4e5d1c\nMOV             R1, R5                                                 ; +0x3c, 0x4e5d20\nBL              _ZNSt6__ndk13mapIibNS_4lessIiEENS_9allocatorINS_4pairIKibEEEEEixERS5_; std::map<int,bool>::operator[](int const&) ; +0x3e, 0x4e5d22\nMOVS            R3, #1                                                 ; +0x42, 0x4e5d26\nSTRB            R3, [R0]                                               ; +0x44, 0x4e5d28\nLDR.W           R0, [R4,#0x1A0]                                        ; +0x46, 0x4e5d2a\nMOV             R3, R6                                                 ; +0x4a, 0x4e5d2e\nCMP             R3, R0                                                 ; +0x4c, 0x4e5d30\nBEQ             loc_4E5D52                                             ; +0x4e, 0x4e5d32\nSUB.W           R1, R3, #0x10                                          ; +0x50, 0x4e5d34\nADD.W           R7, R3, #0xC                                           ; +0x54, 0x4e5d38\nMOV             R2, R3                                                 ; +0x58, 0x4e5d3c\nLDR.W           LR, [R2],#4                                            ; +0x5a, 0x4e5d3e\nCMP             R2, R7                                                 ; +0x5e, 0x4e5d42\nSTR.W           LR, [R1],#4                                            ; +0x60, 0x4e5d44\nBNE             loc_4E5D3E                                             ; +0x64, 0x4e5d48\nLDRB            R2, [R2]                                               ; +0x66, 0x4e5d4a\nADDS            R3, #0x10                                              ; +0x68, 0x4e5d4c\nSTRB            R2, [R1]                                               ; +0x6a, 0x4e5d4e\nB               loc_4E5D30                                             ; +0x6c, 0x4e5d50\nSUBS            R3, R3, R6                                             ; +0x6e, 0x4e5d52\nBIC.W           R3, R3, #0xF                                           ; +0x70, 0x4e5d54\nADD             R3, R5                                                 ; +0x74, 0x4e5d58\nLDR.W           R2, [R4,#0x1A0]                                        ; +0x76, 0x4e5d5a\nCMP             R3, R2                                                 ; +0x7a, 0x4e5d5e\nBEQ             loc_4E5D72                                             ; +0x7c, 0x4e5d60\nSUBS            R2, #0x10                                              ; +0x7e, 0x4e5d62\nSTR.W           R2, [R4,#0x1A0]                                        ; +0x80, 0x4e5d64\nB               loc_4E5D5A                                             ; +0x84, 0x4e5d68\nCMP             R6, R3                                                 ; +0x86, 0x4e5d6a\nMOV             R5, R6                                                 ; +0x88, 0x4e5d6c\nBNE             loc_4E5CF6                                             ; +0x8a, 0x4e5d6e\nPOP             {R3-R7,PC}                                             ; +0x8c, 0x4e5d70\nLDR.W           R2, [R4,#0x19C]                                        ; +0x8e, 0x4e5d72\nCMP             R2, R3                                                 ; +0x92, 0x4e5d76\nBEQ             loc_4E5D82                                             ; +0x94, 0x4e5d78\nMOV             R0, R4; this                                           ; +0x96, 0x4e5d7a\nMOVS            R1, #0; bool                                           ; +0x98, 0x4e5d7c\nBL              _ZN16CustomSongWidget20updateMultiAssetInfoEb; CustomSongWidget::updateMultiAssetInfo(bool) ; +0x9a, 0x4e5d7e\nMOV             R0, R4; this                                           ; +0x9e, 0x4e5d82\nPOP.W           {R3-R7,LR}                                             ; +0xa0, 0x4e5d84\nB.W             _ZN16CustomSongWidget21processNextMultiAssetEv; CustomSongWidget::processNextMultiAsset(void) ; +0xa4, 0x4e5d88\nPOP             {R3-R7,PC}                                             ; +0xa8, 0x4e5d8c", "xrefs": ["CustomSongWidget::downloadSongFinished @ 0x4e5da0", "CustomSongWidget::downloadSFXFinished @ 0x4e5e16"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}