{"type": "func", "start": 3141260, "end": 3141356, "name": "FMODAudioEngine::countActiveMusic", "pseudocode": "// \n// FMODAudioEngine::countActiveMusic from 0x2fee8c to 0x2feeec (96 bytes)\n// \n// 2 xrefs:\n// > FMODAudioEngine::countActiveEffects @ 0x2feef6\n// > PlayLayer::updateInfoLabel @ 0x31b72a\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\nint FMODAudioEngine::countActiveMusic(FMODAudioEngine *a1)\n{\n  std::__detail::_Hash_node_base *M_nxt; // r4\n  int v2; // r6\n  int v4; // [sp+4h] [bp-8h]\n  _BYTE v5[8]; // [sp+Ch] [bp+0h] BYREF\n\n  M_nxt = a1->m_fmodMusic._M_h._M_before_begin._M_nxt;\n  v2 = 0;\n  while ( M_nxt )\n  {\n    v4 = (int)M_nxt[2]._M_nxt;\n    sub_775C20(v5, &M_nxt[4]);\n    v5[4] = M_nxt[5]._M_nxt;\n    v5[5] = BYTE1(M_nxt[5]._M_nxt);\n    if ( v4 > 0 )\n      ++v2;\n    sub_774008(v5);\n    M_nxt = M_nxt->_M_nxt;\n  }\n  return v2;\n}", "assembly": "; \n; FMODAudioEngine::countActiveMusic from 0x2fee8c to 0x2feeec (96 bytes)\n; \n; 2 xrefs:\n; > FMODAudioEngine::countActiveEffects @ 0x2feef6\n; > PlayLayer::updateInfoLabel @ 0x31b72a\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x2FEE94)                ; +0x0, 0x2fee8c\nPUSH            {R4-R7,LR}                                             ; +0x2, 0x2fee8e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x2fee90\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x2fee92\nSUB             SP, SP, #0x1C                                          ; +0x8, 0x2fee94\nLDR.W           R4, [R0,#0x110]                                        ; +0xa, 0x2fee96\nLDR             R2, [R3]                                               ; +0xe, 0x2fee9a\nADD             R7, SP, #0xC                                           ; +0x10, 0x2fee9c\nMOVS            R6, #0                                                 ; +0x12, 0x2fee9e\nMOV             R5, R3                                                 ; +0x14, 0x2feea0\nSTR             R2, [SP,#0x1C+var_8]                                   ; +0x16, 0x2feea2\nCBZ             R4, loc_2FEEDA                                         ; +0x18, 0x2feea4\nLDR             R3, [R4,#4]                                            ; +0x1a, 0x2feea6\nADD.W           R1, R4, #0x10                                          ; +0x1c, 0x2feea8\nMOV             R0, R7                                                 ; +0x20, 0x2feeac\nSTR             R3, [SP,#0x1C+var_1C]                                  ; +0x22, 0x2feeae\nLDR             R3, [R4,#8]                                            ; +0x24, 0x2feeb0\nSTR             R3, [SP,#0x1C+var_18]                                  ; +0x26, 0x2feeb2\nLDR             R3, [R4,#0xC]                                          ; +0x28, 0x2feeb4\nSTR             R3, [SP,#0x1C+var_14]                                  ; +0x2a, 0x2feeb6\nBL              sub_775C20                                             ; +0x2c, 0x2feeb8\nLDRB            R3, [R4,#0x14]                                         ; +0x30, 0x2feebc\nMOV             R0, R7                                                 ; +0x32, 0x2feebe\nSTRB.W          R3, [SP,#0x1C+var_C]                                   ; +0x34, 0x2feec0\nLDRB            R3, [R4,#0x15]                                         ; +0x38, 0x2feec4\nSTRB.W          R3, [SP,#0x1C+var_B]                                   ; +0x3a, 0x2feec6\nLDR             R3, [SP,#0x1C+var_18]                                  ; +0x3e, 0x2feeca\nCMP             R3, #0                                                 ; +0x40, 0x2feecc\nIT GT                                                                  ; +0x42, 0x2feece\nADDGT           R6, #1                                                 ; +0x44, 0x2feed0\nBL              sub_774008                                             ; +0x46, 0x2feed2\nLDR             R4, [R4]                                               ; +0x4a, 0x2feed6\nB               loc_2FEEA4                                             ; +0x4c, 0x2feed8\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x4e, 0x2feeda\nMOV             R0, R6                                                 ; +0x50, 0x2feedc\nLDR             R3, [R5]                                               ; +0x52, 0x2feede\nCMP             R2, R3                                                 ; +0x54, 0x2feee0\nBEQ             loc_2FEEE8                                             ; +0x56, 0x2feee2\nBLX             __stack_chk_fail                                       ; +0x58, 0x2feee4\nADD             SP, SP, #0x1C                                          ; +0x5c, 0x2feee8\nPOP             {R4-R7,PC}                                             ; +0x5e, 0x2feeea", "xrefs": ["FMODAudioEngine::countActiveEffects @ 0x2feef6", "PlayLayer::updateInfoLabel @ 0x31b72a"], "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"}