{"type": "func", "start": 4129148, "end": 4129436, "name": "FMODAudioEngine::updateQueuedMusic", "pseudocode": "// \n// FMODAudioEngine::updateQueuedMusic from 0x3f017c to 0x3f029c (288 bytes)\n// \n// 1 xrefs:\n// > sub_3F1D80 @ 0x3f1dca\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:47:13 +0000\n// \n\nFMOD::Channel *__fastcall FMODAudioEngine::updateQueuedMusic(FMOD::Channel *this)\n{\n  int *v1; // r4\n  _DWORD *v2; // r9\n  int v3; // r10\n  FMODAudioEngine *v4; // r6\n  int isPersistentMatchPlaying; // r8\n  int v6; // r8\n  _DWORD *v7; // r0\n  int *v8; // r8\n  int v9[18]; // [sp+1Ch] [bp-4Ch] BYREF\n\n  v1 = *((int **)this + 169);\n  v2 = (_DWORD *)((char *)this + 668);\n  v3 = (int)this + 688;\n  v4 = this;\n  while ( v1 )\n  {\n    if ( !v1[19] )\n      goto LABEL_13;\n    if ( *((_BYTE *)v1 + 80) )\n    {\n      std::string::basic_string(v9, (int)(v1 + 3));\n      isPersistentMatchPlaying = FMODAudioEngine::isPersistentMatchPlaying(v4, (unsigned __int8 *)v9, v1[16]);\n      std::string::~string((int)v9);\n      if ( isPersistentMatchPlaying )\n        goto LABEL_13;\n    }\n    this = (FMOD::Channel *)FMODAudioEngine::isSoundReady(v4, (FMOD::Sound *)v1[19]);\n    if ( !this )\n      goto LABEL_14;\n    v6 = v1[18];\n    if ( v6 )\n    {\n      if ( v6 == 1 )\n      {\n        if ( *((_BYTE *)v1 + 68) )\n        {\n          FMODQueuedMusic::FMODQueuedMusic((FMODQueuedMusic *)v9, (const FMODQueuedMusic *)(v1 + 3));\n          FMODAudioEngine::triggerQueuedMusic(v4, (int)v9);\n          std::string::~string((int)v9);\n        }\n        else\n        {\n          v7 = std::unordered_map<int,FMODQueuedMusic>::operator[](v3, (unsigned int *)v1 + 2);\n          FMODQueuedMusic::operator=((int)v7, (int)(v1 + 3));\n        }\n      }\nLABEL_13:\n      v8 = (int *)*v1;\n      this = (FMOD::Channel *)std::__hash_table<std::__hash_value_type<int,FMODQueuedMusic>,std::__unordered_map_hasher<int,std::__hash_value_type<int,FMODQueuedMusic>,std::hash<int>,true>,std::__unordered_map_equal<int,std::__hash_value_type<int,FMODQueuedMusic>,std::equal_to<int>,true>,std::allocator<std::__hash_value_type<int,FMODQueuedMusic>>>::erase(\n                                v2,\n                                v1);\n      v1 = v8;\n    }\n    else\n    {\n      std::string::basic_string(v9, (int)(v1 + 3));\n      FMODAudioEngine::loadMusic(\n        (int)v4,\n        (unsigned __int8 *)v9,\n        *((float *)v1 + 6),\n        v1[7],\n        *((float *)v1 + 8),\n        *((_BYTE *)v1 + 52),\n        v1[14],\n        0,\n        *((_BYTE *)v1 + 80));\n      std::string::~string((int)v9);\n      this = FMODAudioEngine::setMusicTimeMS(v4, v1[9], 1u, v1[14]);\n      v1[18] = 1;\nLABEL_14:\n      v1 = (int *)*v1;\n    }\n  }\n  return this;\n}", "assembly": "; \n; FMODAudioEngine::updateQueuedMusic from 0x3f017c to 0x3f029c (288 bytes)\n; \n; 1 xrefs:\n; > sub_3F1D80 @ 0x3f1dca\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:47:13 +0000\n; \nLDR             R3, =(__stack_chk_guard_ptr - 0x3F0186)                ; +0x0, 0x3f017c\nPUSH.W          {R4-R10,LR}                                            ; +0x2, 0x3f017e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x6, 0x3f0182\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x8, 0x3f0184\nSUB             SP, SP, #0x68                                          ; +0xa, 0x3f0186\nLDR.W           R4, [R0,#0x2A4]                                        ; +0xc, 0x3f0188\nLDR             R2, [R3]                                               ; +0x10, 0x3f018c\nADD.W           R9, R0, #0x29C                                         ; +0x12, 0x3f018e\nADD.W           R10, R0, #0x2B0                                        ; +0x16, 0x3f0192\nADD             R5, SP, #0x68+var_4C                                   ; +0x1a, 0x3f0196\nMOV             R6, R0                                                 ; +0x1c, 0x3f0198\nMOV             R7, R3                                                 ; +0x1e, 0x3f019a\nSTR             R2, [SP,#0x68+var_4]                                   ; +0x20, 0x3f019c\nCMP             R4, #0                                                 ; +0x22, 0x3f019e\nBEQ             loc_3F028A                                             ; +0x24, 0x3f01a0\nLDR             R3, [R4,#0x4C]                                         ; +0x26, 0x3f01a2\nCMP             R3, #0                                                 ; +0x28, 0x3f01a4\nBEQ             loc_3F0276                                             ; +0x2a, 0x3f01a6\nLDRB.W          R3, [R4,#0x50]                                         ; +0x2c, 0x3f01a8\nCBZ             R3, loc_3F01D4                                         ; +0x30, 0x3f01ac\nADD.W           R1, R4, #0xC                                           ; +0x32, 0x3f01ae\nMOV             R0, R5                                                 ; +0x36, 0x3f01b2\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x38, 0x3f01b4\nMOV             R0, R6; int                                            ; +0x3c, 0x3f01b8\nMOV             R1, R5; int                                            ; +0x3e, 0x3f01ba\nLDR             R2, [R4,#0x40]; int                                    ; +0x40, 0x3f01bc\nBL              _ZN15FMODAudioEngine24isPersistentMatchPlayingENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEi; FMODAudioEngine::isPersistentMatchPlaying(std::string,int) ; +0x42, 0x3f01be\nMOV             R8, R0                                                 ; +0x46, 0x3f01c2\nMOV             R0, R5                                                 ; +0x48, 0x3f01c4\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x4a, 0x3f01c6\nCMP.W           R8, #0                                                 ; +0x4e, 0x3f01ca\nBNE             loc_3F0276                                             ; +0x52, 0x3f01ce\nB               loc_3F01D4                                             ; +0x54, 0x3f01d0\nB               loc_3F026A                                             ; +0x56, 0x3f01d2\nMOV             R0, R6; this                                           ; +0x58, 0x3f01d4\nLDR             R1, [R4,#0x4C]; FMOD::Sound *                          ; +0x5a, 0x3f01d6\nBL              _ZN15FMODAudioEngine12isSoundReadyEPN4FMOD5SoundE; FMODAudioEngine::isSoundReady(FMOD::Sound *) ; +0x5c, 0x3f01d8\nCMP             R0, #0                                                 ; +0x60, 0x3f01dc\nBEQ             loc_3F0286                                             ; +0x62, 0x3f01de\nLDR.W           R8, [R4,#0x48]                                         ; +0x64, 0x3f01e0\nCMP.W           R8, #0                                                 ; +0x68, 0x3f01e4\nBNE             loc_3F0230                                             ; +0x6c, 0x3f01e8\nADD.W           R1, R4, #0xC                                           ; +0x6e, 0x3f01ea\nMOV             R0, R5                                                 ; +0x72, 0x3f01ee\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2ERKS5_; std::string::basic_string(std::string const&) ; +0x74, 0x3f01f0\nLDR             R3, [R4,#0x20]                                         ; +0x78, 0x3f01f4\nMOV             R0, R6; int                                            ; +0x7a, 0x3f01f6\nMOV             R1, R5; int                                            ; +0x7c, 0x3f01f8\nSTR             R3, [SP,#0x68+var_68]; float                           ; +0x7e, 0x3f01fa\nLDRB.W          R3, [R4,#0x34]                                         ; +0x80, 0x3f01fc\nSTR             R3, [SP,#0x68+var_64]; char                            ; +0x84, 0x3f0200\nLDR             R3, [R4,#0x38]                                         ; +0x86, 0x3f0202\nSTR.W           R8, [SP,#0x68+var_5C]; int                             ; +0x88, 0x3f0204\nSTR             R3, [SP,#0x68+var_60]; int                             ; +0x8c, 0x3f0208\nLDRB.W          R3, [R4,#0x50]                                         ; +0x8e, 0x3f020a\nSTR             R3, [SP,#0x68+var_58]; char                            ; +0x92, 0x3f020e\nLDR             R2, [R4,#0x18]; int                                    ; +0x94, 0x3f0210\nLDR             R3, [R4,#0x1C]; int                                    ; +0x96, 0x3f0212\nBL              _ZN15FMODAudioEngine9loadMusicENSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEfffbiib; FMODAudioEngine::loadMusic(std::string,float,float,float,bool,int,int,bool) ; +0x98, 0x3f0214\nMOV             R0, R5                                                 ; +0x9c, 0x3f0218\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0x9e, 0x3f021a\nLDR             R3, [R4,#0x38]; int                                    ; +0xa2, 0x3f021e\nMOV             R0, R6; this                                           ; +0xa4, 0x3f0220\nLDR             R1, [R4,#0x24]; unsigned int                           ; +0xa6, 0x3f0222\nMOVS            R2, #1; bool                                           ; +0xa8, 0x3f0224\nBL              _ZN15FMODAudioEngine14setMusicTimeMSEjbi; FMODAudioEngine::setMusicTimeMS(uint,bool,int) ; +0xaa, 0x3f0226\nMOVS            R3, #1                                                 ; +0xae, 0x3f022a\nSTR             R3, [R4,#0x48]                                         ; +0xb0, 0x3f022c\nB               loc_3F0286                                             ; +0xb2, 0x3f022e\nCMP.W           R8, #1                                                 ; +0xb4, 0x3f0230\nBNE             loc_3F0276                                             ; +0xb8, 0x3f0234\nLDRB.W          R3, [R4,#0x44]                                         ; +0xba, 0x3f0236\nADD.W           R8, R4, #0xC                                           ; +0xbe, 0x3f023a\nCBZ             R3, loc_3F0258                                         ; +0xc2, 0x3f023e\nMOV             R1, R8; FMODQueuedMusic *                              ; +0xc4, 0x3f0240\nMOV             R0, R5; this                                           ; +0xc6, 0x3f0242\nBL              _ZN15FMODQueuedMusicC2ERKS_; FMODQueuedMusic::FMODQueuedMusic(FMODQueuedMusic const&) ; +0xc8, 0x3f0244\nMOV             R0, R6                                                 ; +0xcc, 0x3f0248\nMOV             R1, R5                                                 ; +0xce, 0x3f024a\nBL              _ZN15FMODAudioEngine18triggerQueuedMusicE15FMODQueuedMusic; FMODAudioEngine::triggerQueuedMusic(FMODQueuedMusic) ; +0xd0, 0x3f024c\nMOV             R0, R5                                                 ; +0xd4, 0x3f0250\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xd6, 0x3f0252\nB               loc_3F0276                                             ; +0xda, 0x3f0256\nADD.W           R1, R4, #8                                             ; +0xdc, 0x3f0258\nMOV             R0, R10                                                ; +0xe0, 0x3f025c\nBL              _ZNSt6__ndk113unordered_mapIi15FMODQueuedMusicNS_4hashIiEENS_8equal_toIiEENS_9allocatorINS_4pairIKiS1_EEEEEixERS8_; std::unordered_map<int,FMODQueuedMusic>::operator[](int const&) ; +0xe2, 0x3f025e\nMOV             R1, R8                                                 ; +0xe6, 0x3f0262\nBL              _ZN15FMODQueuedMusicaSERKS_; FMODQueuedMusic::operator=(FMODQueuedMusic const&) ; +0xe8, 0x3f0264\nB               loc_3F0276                                             ; +0xec, 0x3f0268\nMOV             R0, R5                                                 ; +0xee, 0x3f026a\nBL              _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED2Ev; std::string::~string() ; +0xf0, 0x3f026c\nBL              __cxa_end_cleanup                                      ; +0xf4, 0x3f0270\nB               loc_3F026A                                             ; +0xf8, 0x3f0274\nLDR.W           R8, [R4]                                               ; +0xfa, 0x3f0276\nMOV             R1, R4                                                 ; +0xfe, 0x3f027a\nMOV             R0, R9                                                 ; +0x100, 0x3f027c\nBL              _ZNSt6__ndk112__hash_tableINS_17__hash_value_typeIi15FMODQueuedMusicEENS_22__unordered_map_hasherIiS3_NS_4hashIiEELb1EEENS_21__unordered_map_equalIiS3_NS_8equal_toIiEELb1EEENS_9allocatorIS3_EEE5eraseENS_21__hash_const_iteratorIPNS_11__hash_nodeIS3_PvEEEE; std::__hash_table<std::__hash_value_type<int,FMODQueuedMusic>,std::__unordered_map_hasher<int,std::__hash_value_type<int,FMODQueuedMusic>,std::hash<int>,true>,std::__unordered_map_equal<int,std::__hash_value_type<int,FMODQueuedMusic>,std::equal_to<int>,true>,std::allocator<std::__hash_value_type<int,FMODQueuedMusic>>>::erase(std::__hash_const_iterator<std::__hash_node<std::__hash_value_type<int,FMODQueuedMusic>,void *> *>) ; +0x102, 0x3f027e\nMOV             R4, R8                                                 ; +0x106, 0x3f0282\nB               loc_3F019E                                             ; +0x108, 0x3f0284\nLDR             R4, [R4]                                               ; +0x10a, 0x3f0286\nB               loc_3F019E                                             ; +0x10c, 0x3f0288\nLDR             R2, [SP,#0x68+var_4]                                   ; +0x10e, 0x3f028a\nLDR             R3, [R7]                                               ; +0x110, 0x3f028c\nCMP             R2, R3                                                 ; +0x112, 0x3f028e\nBEQ             loc_3F0296                                             ; +0x114, 0x3f0290\nBLX             __stack_chk_fail                                       ; +0x116, 0x3f0292\nADD             SP, SP, #0x68 ; 'h'                                    ; +0x11a, 0x3f0296\nPOP.W           {R4-R10,PC}                                            ; +0x11c, 0x3f0298", "xrefs": ["sub_3F1D80 @ 0x3f1dca"], "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"}