{"type": "func", "start": 5134940, "end": 5135174, "name": "CustomSongWidget::startMultiAssetDownload", "pseudocode": "// \n// CustomSongWidget::startMultiAssetDownload from 0x4e5a5c to 0x4e5b46 (234 bytes)\n// \n// 1 xrefs:\n// > CustomSongWidget::onDownload @ 0x4e5bca\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::startMultiAssetDownload(\n        CustomSongWidget *this,\n        int a2,\n        int a3,\n        int a4)\n{\n  int v5; // r1\n  void *v6; // r2\n  int v7; // r3\n  char *v8; // r5\n  char *v9; // r8\n  int v10; // r0\n  int v11; // r2\n  unsigned int v12; // r3\n  unsigned int v13; // r1\n  _DWORD *i; // r5\n  int v15; // r0\n  int v16; // r2\n  unsigned int v17; // r3\n  unsigned int v18; // r1\n  int v20; // [sp+4h] [bp-Ch] BYREF\n  int v21[2]; // [sp+8h] [bp-8h] BYREF\n\n  v20 = a2;\n  v21[0] = a3;\n  v21[1] = a4;\n  v5 = *((_DWORD *)this + 103);\n  v6 = &_stack_chk_guard;\n  while ( 1 )\n  {\n    v7 = *((_DWORD *)this + 104);\n    if ( v5 == v7 )\n      break;\n    *((_DWORD *)this + 104) = v7 - 16;\n  }\n  v8 = *((char **)this + 97);\n  v9 = (char *)this + 392;\n  while ( v8 != v9 )\n  {\n    v10 = *((_DWORD *)v8 + 4);\n    v20 = v10;\n    v11 = (unsigned __int8)v8[20];\n    if ( !v8[20] )\n    {\n      v12 = *((_DWORD *)this + 104);\n      v13 = *((_DWORD *)this + 105);\n      v21[0] = 1;\n      if ( v12 >= v13 )\n      {\n        std::vector<GJAssetDownloadAction>::__emplace_back_slow_path<int &,GJAssetType>((char **)this + 103, &v20, v21);\n      }\n      else\n      {\n        if ( v12 )\n        {\n          *(_DWORD *)v12 = v10;\n          *(_DWORD *)(v12 + 4) = 1;\n          *(_DWORD *)(v12 + 8) = v11;\n          *(_BYTE *)(v12 + 12) = v11;\n        }\n        *((_DWORD *)this + 104) += 16;\n      }\n    }\n    v8 = (char *)std::__tree_next<std::__tree_node_base<void *> *>(v8);\n  }\n  for ( i = *((_DWORD **)this + 100);\n        i != (_DWORD *)((char *)this + 404);\n        i = std::__tree_next<std::__tree_node_base<void *> *>(i) )\n  {\n    v15 = i[4];\n    v20 = v15;\n    v16 = *((unsigned __int8 *)i + 20);\n    if ( !*((_BYTE *)i + 20) )\n    {\n      v17 = *((_DWORD *)this + 104);\n      v18 = *((_DWORD *)this + 105);\n      v21[0] = 2;\n      if ( v17 >= v18 )\n      {\n        std::vector<GJAssetDownloadAction>::__emplace_back_slow_path<int &,GJAssetType>((char **)this + 103, &v20, v21);\n      }\n      else\n      {\n        if ( v17 )\n        {\n          *(_DWORD *)v17 = v15;\n          *(_DWORD *)(v17 + 4) = 2;\n          *(_DWORD *)(v17 + 8) = v16;\n          *(_BYTE *)(v17 + 12) = v16;\n        }\n        *((_DWORD *)this + 104) += 16;\n      }\n    }\n  }\n  return CustomSongWidget::processNextMultiAsset(this, v5, (int)v6);\n}", "assembly": "; \n; CustomSongWidget::startMultiAssetDownload from 0x4e5a5c to 0x4e5b46 (234 bytes)\n; \n; 1 xrefs:\n; > CustomSongWidget::onDownload @ 0x4e5bca\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.W          {R0-R10,LR}                                            ; +0x0, 0x4e5a5c\nMOV             R4, R0                                                 ; +0x4, 0x4e5a60\nLDR             R2, =(__stack_chk_guard_ptr - 0x4E5A6C)                ; +0x6, 0x4e5a62\nLDR.W           R1, [R0,#0x19C]                                        ; +0x8, 0x4e5a64\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0xc, 0x4e5a68\nLDR             R2, [R2]; __stack_chk_guard                            ; +0xe, 0x4e5a6a\nLDR             R3, [R2]                                               ; +0x10, 0x4e5a6c\nMOV             R6, R2                                                 ; +0x12, 0x4e5a6e\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x14, 0x4e5a70\nLDR.W           R3, [R4,#0x1A0]                                        ; +0x16, 0x4e5a72\nCMP             R1, R3                                                 ; +0x1a, 0x4e5a76\nBEQ             loc_4E5A82                                             ; +0x1c, 0x4e5a78\nSUBS            R3, #0x10                                              ; +0x1e, 0x4e5a7a\nSTR.W           R3, [R4,#0x1A0]                                        ; +0x20, 0x4e5a7c\nB               loc_4E5A72                                             ; +0x24, 0x4e5a80\nLDR.W           R5, [R4,#0x184]                                        ; +0x26, 0x4e5a82\nADD.W           R8, R4, #0x188                                         ; +0x2a, 0x4e5a86\nADD.W           R9, R4, #0x19C                                         ; +0x2e, 0x4e5a8a\nADD.W           R10, SP, #0x10+var_C                                   ; +0x32, 0x4e5a8e\nMOVS            R7, #1                                                 ; +0x36, 0x4e5a92\nCMP             R5, R8                                                 ; +0x38, 0x4e5a94\nBEQ             loc_4E5AD8                                             ; +0x3a, 0x4e5a96\nLDR             R0, [R5,#0x10]                                         ; +0x3c, 0x4e5a98\nSTR             R0, [SP,#0x10+var_C]                                   ; +0x3e, 0x4e5a9a\nLDRB            R2, [R5,#0x14]                                         ; +0x40, 0x4e5a9c\nCBNZ            R2, loc_4E5ACE                                         ; +0x42, 0x4e5a9e\nLDR.W           R3, [R4,#0x1A0]                                        ; +0x44, 0x4e5aa0\nLDR.W           R1, [R4,#0x1A4]                                        ; +0x48, 0x4e5aa4\nSTR             R7, [SP,#0x10+var_8]                                   ; +0x4c, 0x4e5aa8\nCMP             R3, R1                                                 ; +0x4e, 0x4e5aaa\nBCS             loc_4E5AC4                                             ; +0x50, 0x4e5aac\nCBZ             R3, loc_4E5AB8                                         ; +0x52, 0x4e5aae\nSTM.W           R3, {R0,R7}                                            ; +0x54, 0x4e5ab0\nSTR             R2, [R3,#8]                                            ; +0x58, 0x4e5ab4\nSTRB            R2, [R3,#0xC]                                          ; +0x5a, 0x4e5ab6\nLDR.W           R3, [R4,#0x1A0]                                        ; +0x5c, 0x4e5ab8\nADDS            R3, #0x10                                              ; +0x60, 0x4e5abc\nSTR.W           R3, [R4,#0x1A0]                                        ; +0x62, 0x4e5abe\nB               loc_4E5ACE                                             ; +0x66, 0x4e5ac2\nMOV             R0, R9                                                 ; +0x68, 0x4e5ac4\nMOV             R1, R10                                                ; +0x6a, 0x4e5ac6\nADD             R2, SP, #0x10+var_8                                    ; +0x6c, 0x4e5ac8\nBL              _ZNSt6__ndk16vectorI21GJAssetDownloadActionNS_9allocatorIS1_EEE24__emplace_back_slow_pathIJRi11GJAssetTypeEEEvDpOT_; std::vector<GJAssetDownloadAction>::__emplace_back_slow_path<int &,GJAssetType>(int &,GJAssetType &&) ; +0x6e, 0x4e5aca\nMOV             R0, R5                                                 ; +0x72, 0x4e5ace\nBL              _ZNSt6__ndk111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_; std::__tree_next<std::__tree_node_base<void *> *>(std::__tree_node_base<void *> *) ; +0x74, 0x4e5ad0\nMOV             R5, R0                                                 ; +0x78, 0x4e5ad4\nB               loc_4E5A94                                             ; +0x7a, 0x4e5ad6\nLDR.W           R5, [R4,#0x190]                                        ; +0x7c, 0x4e5ad8\nADD.W           R8, R4, #0x194                                         ; +0x80, 0x4e5adc\nADD.W           R9, R4, #0x19C                                         ; +0x84, 0x4e5ae0\nADD.W           R10, SP, #0x10+var_C                                   ; +0x88, 0x4e5ae4\nMOVS            R7, #2                                                 ; +0x8c, 0x4e5ae8\nCMP             R5, R8                                                 ; +0x8e, 0x4e5aea\nBEQ             loc_4E5B2E                                             ; +0x90, 0x4e5aec\nLDR             R0, [R5,#0x10]                                         ; +0x92, 0x4e5aee\nSTR             R0, [SP,#0x10+var_C]                                   ; +0x94, 0x4e5af0\nLDRB            R2, [R5,#0x14]                                         ; +0x96, 0x4e5af2\nCBNZ            R2, loc_4E5B24                                         ; +0x98, 0x4e5af4\nLDR.W           R3, [R4,#0x1A0]                                        ; +0x9a, 0x4e5af6\nLDR.W           R1, [R4,#0x1A4]                                        ; +0x9e, 0x4e5afa\nSTR             R7, [SP,#0x10+var_8]                                   ; +0xa2, 0x4e5afe\nCMP             R3, R1                                                 ; +0xa4, 0x4e5b00\nBCS             loc_4E5B1A                                             ; +0xa6, 0x4e5b02\nCBZ             R3, loc_4E5B0E                                         ; +0xa8, 0x4e5b04\nSTM.W           R3, {R0,R7}                                            ; +0xaa, 0x4e5b06\nSTR             R2, [R3,#8]                                            ; +0xae, 0x4e5b0a\nSTRB            R2, [R3,#0xC]                                          ; +0xb0, 0x4e5b0c\nLDR.W           R3, [R4,#0x1A0]                                        ; +0xb2, 0x4e5b0e\nADDS            R3, #0x10                                              ; +0xb6, 0x4e5b12\nSTR.W           R3, [R4,#0x1A0]                                        ; +0xb8, 0x4e5b14\nB               loc_4E5B24                                             ; +0xbc, 0x4e5b18\nMOV             R0, R9                                                 ; +0xbe, 0x4e5b1a\nMOV             R1, R10                                                ; +0xc0, 0x4e5b1c\nADD             R2, SP, #0x10+var_8                                    ; +0xc2, 0x4e5b1e\nBL              _ZNSt6__ndk16vectorI21GJAssetDownloadActionNS_9allocatorIS1_EEE24__emplace_back_slow_pathIJRi11GJAssetTypeEEEvDpOT_; std::vector<GJAssetDownloadAction>::__emplace_back_slow_path<int &,GJAssetType>(int &,GJAssetType &&) ; +0xc4, 0x4e5b20\nMOV             R0, R5                                                 ; +0xc8, 0x4e5b24\nBL              _ZNSt6__ndk111__tree_nextIPNS_16__tree_node_baseIPvEEEET_S5_; std::__tree_next<std::__tree_node_base<void *> *>(std::__tree_node_base<void *> *) ; +0xca, 0x4e5b26\nMOV             R5, R0                                                 ; +0xce, 0x4e5b2a\nB               loc_4E5AEA                                             ; +0xd0, 0x4e5b2c\nMOV             R0, R4; this                                           ; +0xd2, 0x4e5b2e\nBL              _ZN16CustomSongWidget21processNextMultiAssetEv; CustomSongWidget::processNextMultiAsset(void) ; +0xd4, 0x4e5b30\nLDR             R2, [SP,#0x10+var_4]                                   ; +0xd8, 0x4e5b34\nLDR             R3, [R6]                                               ; +0xda, 0x4e5b36\nCMP             R2, R3                                                 ; +0xdc, 0x4e5b38\nBEQ             loc_4E5B40                                             ; +0xde, 0x4e5b3a\nBLX             __stack_chk_fail                                       ; +0xe0, 0x4e5b3c\nADD             SP, SP, #0x10                                          ; +0xe4, 0x4e5b40\nPOP.W           {R4-R10,PC}                                            ; +0xe6, 0x4e5b42", "xrefs": ["CustomSongWidget::onDownload @ 0x4e5bca"], "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"}