{"type": "func", "start": 4117316, "end": 4117500, "name": "FMODAudioEngine::registerChannel", "pseudocode": "// \n// FMODAudioEngine::registerChannel from 0x3ed344 to 0x3ed3fc (184 bytes)\n// \n// 2 xrefs:\n// > FMODAudioEngine::loadMusic @ 0x3efc26\n// > FMODAudioEngine::playEffectAdvanced @ 0x3f1008\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:10 +0000\n// \n\nvoid *__fastcall FMODAudioEngine::registerChannel(FMODAudioEngine *this, FMOD::Channel *a2, void *a3, unsigned int a4)\n{\n  _DWORD *v6; // r0\n  _DWORD *v7; // r0\n  void **v8; // r0\n  unsigned int v10; // [sp+0h] [bp-18h] BYREF\n  void *v11[2]; // [sp+4h] [bp-14h] BYREF\n  int v12; // [sp+Ch] [bp-Ch] BYREF\n  int v13; // [sp+10h] [bp-8h] BYREF\n\n  v10 = a4;\n  v11[0] = a3;\n  if ( !a3 )\n    v11[0] = (void *)FMODAudioEngine::getNextChannelID(this);\n  FMOD::ChannelControl::setUserData(a2, v11[0]);\n  *std::unordered_map<int,FMOD::Channel *>::operator[]((int)this + 768, (unsigned int *)v11) = a2;\n  v12 = 0;\n  FMOD::ChannelControl::getVolume(a2, (float *)&v12);\n  v6 = std::unordered_map<int,float>::operator[]((int)this + 468, (unsigned int *)v11);\n  *v6 = v12;\n  *std::unordered_map<int,float>::operator[]((int)this + 488, (unsigned int *)v11) = 1065353216;\n  v13 = 0;\n  FMOD::ChannelControl::getPitch(a2, (float *)&v13);\n  v7 = std::unordered_map<int,float>::operator[]((int)this + 508, (unsigned int *)v11);\n  *v7 = v13;\n  if ( v10 )\n  {\n    *std::unordered_map<int,int>::operator[]((int)this + 812, (unsigned int *)v11) = v10;\n    v8 = (void **)std::unordered_map<int,int>::operator[]((int)this + 832, &v10);\n    *v8 = v11[0];\n  }\n  return v11[0];\n}", "assembly": "; \n; FMODAudioEngine::registerChannel from 0x3ed344 to 0x3ed3fc (184 bytes)\n; \n; 2 xrefs:\n; > FMODAudioEngine::loadMusic @ 0x3efc26\n; > FMODAudioEngine::playEffectAdvanced @ 0x3f1008\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:10 +0000\n; \nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x3ed344\nSUB             SP, SP, #0x18                                          ; +0x4, 0x3ed348\nMOV             R5, R1                                                 ; +0x6, 0x3ed34a\nMOV             R7, R0                                                 ; +0x8, 0x3ed34c\nSTR             R3, [SP,#0x18+var_18]                                  ; +0xa, 0x3ed34e\nLDR             R3, =(__stack_chk_guard_ptr - 0x3ED358)                ; +0xc, 0x3ed350\nSTR             R2, [SP,#0x18+var_14]                                  ; +0xe, 0x3ed352\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x10, 0x3ed354\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x12, 0x3ed356\nLDR             R1, [R3]                                               ; +0x14, 0x3ed358\nMOV             R6, R3                                                 ; +0x16, 0x3ed35a\nSTR             R1, [SP,#0x18+var_4]                                   ; +0x18, 0x3ed35c\nCBNZ            R2, loc_3ED366                                         ; +0x1a, 0x3ed35e\nBL              _ZN15FMODAudioEngine16getNextChannelIDEv; FMODAudioEngine::getNextChannelID(void) ; +0x1c, 0x3ed360\nSTR             R0, [SP,#0x18+var_14]                                  ; +0x20, 0x3ed364\nADD             R4, SP, #0x18+var_s0                                   ; +0x22, 0x3ed366\nMOV             R0, R5; this                                           ; +0x24, 0x3ed368\nMOV.W           R8, #0                                                 ; +0x26, 0x3ed36a\nLDR.W           R1, [R4,#-0x14]!; void *                               ; +0x2a, 0x3ed36e\nBLX             _ZN4FMOD14ChannelControl11setUserDataEPv; FMOD::ChannelControl::setUserData(void *) ; +0x2e, 0x3ed372\nADD.W           R0, R7, #0x300                                         ; +0x32, 0x3ed376\nMOV             R1, R4                                                 ; +0x36, 0x3ed37a\nBL              _ZNSt6__ndk113unordered_mapIiPN4FMOD7ChannelENS_4hashIiEENS_8equal_toIiEENS_9allocatorINS_4pairIKiS3_EEEEEixERSA_; std::unordered_map<int,FMOD::Channel *>::operator[](int const&) ; +0x38, 0x3ed37c\nADD             R1, SP, #0x18+var_s0                                   ; +0x3c, 0x3ed380\nSTR             R5, [R0]                                               ; +0x3e, 0x3ed382\nMOV             R0, R5; this                                           ; +0x40, 0x3ed384\nSTR.W           R8, [R1,#-0xC]!; float *                               ; +0x42, 0x3ed386\nBLX             _ZN4FMOD14ChannelControl9getVolumeEPf; FMOD::ChannelControl::getVolume(float *) ; +0x46, 0x3ed38a\nMOV             R1, R4                                                 ; +0x4a, 0x3ed38e\nADD.W           R0, R7, #0x1D4                                         ; +0x4c, 0x3ed390\nBL              _ZNSt6__ndk113unordered_mapIifNS_4hashIiEENS_8equal_toIiEENS_9allocatorINS_4pairIKifEEEEEixERS7_; std::unordered_map<int,float>::operator[](int const&) ; +0x50, 0x3ed394\nLDR             R3, [SP,#0x18+var_C]                                   ; +0x54, 0x3ed398\nMOV             R1, R4                                                 ; +0x56, 0x3ed39a\nSTR             R3, [R0]                                               ; +0x58, 0x3ed39c\nADD.W           R0, R7, #0x1E8                                         ; +0x5a, 0x3ed39e\nBL              _ZNSt6__ndk113unordered_mapIifNS_4hashIiEENS_8equal_toIiEENS_9allocatorINS_4pairIKifEEEEEixERS7_; std::unordered_map<int,float>::operator[](int const&) ; +0x5e, 0x3ed3a2\nADD             R1, SP, #0x18+var_s0                                   ; +0x62, 0x3ed3a6\nMOV.W           R3, #0x3F800000                                        ; +0x64, 0x3ed3a8\nSTR             R3, [R0]                                               ; +0x68, 0x3ed3ac\nMOV             R0, R5; this                                           ; +0x6a, 0x3ed3ae\nSTR.W           R8, [R1,#-8]!; float *                                 ; +0x6c, 0x3ed3b0\nBLX             _ZN4FMOD14ChannelControl8getPitchEPf; FMOD::ChannelControl::getPitch(float *) ; +0x70, 0x3ed3b4\nADD.W           R0, R7, #0x1FC                                         ; +0x74, 0x3ed3b8\nMOV             R1, R4                                                 ; +0x78, 0x3ed3bc\nBL              _ZNSt6__ndk113unordered_mapIifNS_4hashIiEENS_8equal_toIiEENS_9allocatorINS_4pairIKifEEEEEixERS7_; std::unordered_map<int,float>::operator[](int const&) ; +0x7a, 0x3ed3be\nLDR             R3, [SP,#0x18+var_8]                                   ; +0x7e, 0x3ed3c2\nSTR             R3, [R0]                                               ; +0x80, 0x3ed3c4\nLDR             R3, [SP,#0x18+var_18]                                  ; +0x82, 0x3ed3c6\nCBZ             R3, loc_3ED3E8                                         ; +0x84, 0x3ed3c8\nMOV             R1, R4                                                 ; +0x86, 0x3ed3ca\nADD.W           R0, R7, #0x32C                                         ; +0x88, 0x3ed3cc\nBL              _ZNSt6__ndk113unordered_mapIiiNS_4hashIiEENS_8equal_toIiEENS_9allocatorINS_4pairIKiiEEEEEixERS7_; std::unordered_map<int,int>::operator[](int const&) ; +0x8c, 0x3ed3d0\nADD             R1, SP, #0x18+var_s0                                   ; +0x90, 0x3ed3d4\nLDR.W           R3, [R1,#-0x18]!                                       ; +0x92, 0x3ed3d6\nSTR             R3, [R0]                                               ; +0x96, 0x3ed3da\nADD.W           R0, R7, #0x340                                         ; +0x98, 0x3ed3dc\nBL              _ZNSt6__ndk113unordered_mapIiiNS_4hashIiEENS_8equal_toIiEENS_9allocatorINS_4pairIKiiEEEEEixERS7_; std::unordered_map<int,int>::operator[](int const&) ; +0x9c, 0x3ed3e0\nLDR             R3, [SP,#0x18+var_14]                                  ; +0xa0, 0x3ed3e4\nSTR             R3, [R0]                                               ; +0xa2, 0x3ed3e6\nLDR             R2, [SP,#0x18+var_4]                                   ; +0xa4, 0x3ed3e8\nLDR             R3, [R6]                                               ; +0xa6, 0x3ed3ea\nLDR             R0, [SP,#0x18+var_14]                                  ; +0xa8, 0x3ed3ec\nCMP             R2, R3                                                 ; +0xaa, 0x3ed3ee\nBEQ             loc_3ED3F6                                             ; +0xac, 0x3ed3f0\nBLX             __stack_chk_fail                                       ; +0xae, 0x3ed3f2\nADD             SP, SP, #0x18                                          ; +0xb2, 0x3ed3f6\nPOP.W           {R4-R8,PC}                                             ; +0xb4, 0x3ed3f8", "xrefs": ["FMODAudioEngine::loadMusic @ 0x3efc26", "FMODAudioEngine::playEffectAdvanced @ 0x3f1008"], "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"}