{"type": "func", "start": 4065216, "end": 4065374, "name": "CustomSongWidget::downloadAssetFinished", "pseudocode": "// \n// CustomSongWidget::downloadAssetFinished from 0x3e07c0 to 0x3e085e (158 bytes)\n// \n// 2 xrefs:\n// > CustomSongWidget::downloadSongFinished @ 0x3e0870\n// > CustomSongWidget::downloadSFXFinished @ 0x3e08e6\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  GJAssetDownloadAction *m_finish; // r3\n  GJAssetDownloadAction *i; // r1\n  GJAssetDownloadAction *v8; // r4\n  int m_assetType; // r2\n  GJAssetDownloadAction *v10; // r3\n  GJAssetDownloadAction *m_start; // r2\n  GJAssetDownloadAction *v12; // r3\n  int j; // r2\n  int *p_m_status; // r1\n  GJAssetType *p_m_assetType; // r0\n  GJAssetType v16; // t1\n\n  m_finish = a1->m_undownloadedAssets.m_finish;\n  for ( i = a1->m_undownloadedAssets.m_start; i != m_finish; i = (GJAssetDownloadAction *)((char *)i + 16) )\n  {\n    v8 = (GJAssetDownloadAction *)((char *)i + 16);\n    if ( i->m_id == a2 )\n    {\n      m_assetType = i->m_assetType;\n      if ( m_assetType == a3 )\n      {\n        if ( a3 == 1 )\n        {\n          *(_BYTE *)std::map<int,bool>::operator[](&a1->m_songs.compare.pad, i, m_assetType) = 1;\n        }\n        else if ( a3 == User )\n        {\n          *(_BYTE *)std::map<int,bool>::operator[](&a1->m_sfx.compare.pad, i, m_assetType) = 1;\n        }\n        v10 = a1->m_undownloadedAssets.m_finish;\n        if ( v8 != v10 )\n        {\n          for ( j = ((char *)v10 - (char *)v8) >> 4; ; --j )\n          {\n            v8 = (GJAssetDownloadAction *)((char *)v8 + 16);\n            if ( j <= 0 )\n              break;\n            p_m_status = &v8[-2].m_status;\n            p_m_assetType = &v8[-3].m_assetType;\n            do\n            {\n              v16 = *p_m_status++;\n              *p_m_assetType++ = v16;\n            }\n            while ( p_m_status != &v8[-1].m_status );\n            *(_BYTE *)p_m_assetType = *(_BYTE *)p_m_status;\n          }\n        }\n        m_start = a1->m_undownloadedAssets.m_start;\n        v12 = (GJAssetDownloadAction *)((char *)v10 - 16);\n        a1->m_undownloadedAssets.m_finish = v12;\n        if ( m_start != v12 )\n          CustomSongWidget::updateMultiAssetInfo(a1, 0);\n        CustomSongWidget::processNextMultiAsset(a1);\n        return;\n      }\n    }\n  }\n}", "assembly": "; \n; CustomSongWidget::downloadAssetFinished from 0x3e07c0 to 0x3e085e (158 bytes)\n; \n; 2 xrefs:\n; > CustomSongWidget::downloadSongFinished @ 0x3e0870\n; > CustomSongWidget::downloadSFXFinished @ 0x3e08e6\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\nPUSH            {R3-R7,LR}                                             ; +0x0, 0x3e07c0\nMOV             R5, R0                                                 ; +0x2, 0x3e07c2\nLDR.W           R3, [R5,#0x1AC]                                        ; +0x4, 0x3e07c4\nMOV             R0, R1                                                 ; +0x8, 0x3e07c8\nLDR.W           R1, [R5,#0x1A8]                                        ; +0xa, 0x3e07ca\nMOV             R6, R2                                                 ; +0xe, 0x3e07ce\nCMP             R1, R3                                                 ; +0x10, 0x3e07d0\nBEQ             locret_3E085C                                          ; +0x12, 0x3e07d2\nMOV             R4, R1                                                 ; +0x14, 0x3e07d4\nLDR.W           R2, [R4],#0x10                                         ; +0x16, 0x3e07d6\nCMP             R2, R0                                                 ; +0x1a, 0x3e07da\nBNE             loc_3E0858                                             ; +0x1c, 0x3e07dc\nLDR             R2, [R1,#4]                                            ; +0x1e, 0x3e07de\nCMP             R2, R6                                                 ; +0x20, 0x3e07e0\nBNE             loc_3E0858                                             ; +0x22, 0x3e07e2\nCMP             R6, #1                                                 ; +0x24, 0x3e07e4\nBNE             loc_3E07F4                                             ; +0x26, 0x3e07e6\nADD.W           R0, R5, #0x178                                         ; +0x28, 0x3e07e8\nBL              _ZNSt3mapIibSt4lessIiESaISt4pairIKibEEEixERS3_; std::map<int,bool>::operator[](int const&) ; +0x2c, 0x3e07ec\nSTRB            R6, [R0]                                               ; +0x30, 0x3e07f0\nB               loc_3E0804                                             ; +0x32, 0x3e07f2\nCMP             R6, #2                                                 ; +0x34, 0x3e07f4\nBNE             loc_3E0804                                             ; +0x36, 0x3e07f6\nADD.W           R0, R5, #0x190                                         ; +0x38, 0x3e07f8\nBL              _ZNSt3mapIibSt4lessIiESaISt4pairIKibEEEixERS3_; std::map<int,bool>::operator[](int const&) ; +0x3c, 0x3e07fc\nMOVS            R3, #1                                                 ; +0x40, 0x3e0800\nSTRB            R3, [R0]                                               ; +0x42, 0x3e0802\nLDR.W           R3, [R5,#0x1AC]                                        ; +0x44, 0x3e0804\nCMP             R4, R3                                                 ; +0x48, 0x3e0808\nBNE             loc_3E0824                                             ; +0x4a, 0x3e080a\nLDR.W           R2, [R5,#0x1A8]                                        ; +0x4c, 0x3e080c\nSUBS            R3, #0x10                                              ; +0x50, 0x3e0810\nSTR.W           R3, [R5,#0x1AC]                                        ; +0x52, 0x3e0812\nCMP             R2, R3                                                 ; +0x56, 0x3e0816\nBEQ             loc_3E084E                                             ; +0x58, 0x3e0818\nMOV             R0, R5; this                                           ; +0x5a, 0x3e081a\nMOVS            R1, #0; bool                                           ; +0x5c, 0x3e081c\nBL              _ZN16CustomSongWidget20updateMultiAssetInfoEb; CustomSongWidget::updateMultiAssetInfo(bool) ; +0x5e, 0x3e081e\nB               loc_3E084E                                             ; +0x62, 0x3e0822\nSUBS            R2, R3, R4                                             ; +0x64, 0x3e0824\nASRS            R2, R2, #4                                             ; +0x66, 0x3e0826\nCMP             R2, #0                                                 ; +0x68, 0x3e0828\nADD.W           R4, R4, #0x10                                          ; +0x6a, 0x3e082a\nBLE             loc_3E080C                                             ; +0x6e, 0x3e082e\nSUB.W           R1, R4, #0x10                                          ; +0x70, 0x3e0830\nSUB.W           R0, R4, #0x20 ; ' '                                    ; +0x74, 0x3e0834\nSUBS            R6, R4, #4                                             ; +0x78, 0x3e0838\nLDR.W           R7, [R1],#4                                            ; +0x7a, 0x3e083a\nCMP             R1, R6                                                 ; +0x7e, 0x3e083e\nSTR.W           R7, [R0],#4                                            ; +0x80, 0x3e0840\nBNE             loc_3E083A                                             ; +0x84, 0x3e0844\nLDRB            R1, [R1]                                               ; +0x86, 0x3e0846\nSUBS            R2, #1                                                 ; +0x88, 0x3e0848\nSTRB            R1, [R0]                                               ; +0x8a, 0x3e084a\nB               loc_3E0828                                             ; +0x8c, 0x3e084c\nMOV             R0, R5; this                                           ; +0x8e, 0x3e084e\nPOP.W           {R3-R7,LR}                                             ; +0x90, 0x3e0850\nB.W             _ZN16CustomSongWidget21processNextMultiAssetEv; CustomSongWidget::processNextMultiAsset(void) ; +0x94, 0x3e0854\nMOV             R1, R4                                                 ; +0x98, 0x3e0858\nB               loc_3E07D0                                             ; +0x9a, 0x3e085a\nPOP             {R3-R7,PC}                                             ; +0x9c, 0x3e085c", "xrefs": ["CustomSongWidget::downloadSongFinished @ 0x3e0870", "CustomSongWidget::downloadSFXFinished @ 0x3e08e6"], "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"}