{"type": "func", "start": 5369106256, "end": 5369106446, "name": "FMODAudioEngine::channelForChannelID", "pseudocode": "// \n// FMODAudioEngine::channelForChannelID from 0x140060f50 to 0x14006100e (190 bytes)\n// \n// 35 xrefs:\n// > FMODAudioEngine::resumeSuspendedAudio @ 0x14005e085\n// > FMODAudioEngine::saveAudioState @ 0x14005e7ef\n// > FMODAudioEngine::loadAudioState @ 0x14005ec4c\n// > FMODAudioEngine::playEffectAdvanced @ 0x14005fc06\n// > FMODAudioEngine::setChannelVolume @ 0x140061b18\n// > FMODAudioEngine::setChannelVolume @ 0x140061b48\n// > FMODAudioEngine::setChannelVolumeMod @ 0x140061ce8\n// > FMODAudioEngine::setChannelVolumeMod @ 0x140061d18\n// > FMODAudioEngine::setChannelPitch @ 0x140061e51\n// > FMODAudioEngine::isMusicPlaying_1 @ 0x140062977\n// > FMODAudioEngine::stopAllMusic @ 0x140062a75\n// > FMODAudioEngine::resumeAllMusic @ 0x140062adc\n// > FMODAudioEngine::loadAndPlayMusic @ 0x140062d0c\n// > FMODAudioEngine::playMusic @ 0x140062e1e\n// > FMODAudioEngine::playMusic @ 0x140062e83\n// > FMODAudioEngine::loadMusic @ 0x140062fac\n// > FMODAudioEngine::startMusic @ 0x1400632f2\n// > FMODAudioEngine::updateQueuedMusic @ 0x14006446e\n// > FMODAudioEngine::setMusicTimeMS @ 0x140064fdb\n// > FMODAudioEngine::getMusicTimeMS @ 0x140065105\n// > FMODAudioEngine::getMusicLengthMS @ 0x14006516b\n// > FMODAudioEngine::fadeInMusic @ 0x1400653bb\n// > FMODAudioEngine::fadeOutMusic @ 0x1400654fb\n// > FMODAudioEngine::fadeMusic @ 0x140065643\n// > FMODAudioEngine::stopAndRemoveMusic @ 0x140065a7a\n// > AppDelegate::applicationDidEnterBackground @ 0x1400986e6\n// > GJBaseGameLayer::pauseAudio @ 0x140340406\n// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x14034dd9f\n// > GJBaseGameLayer::processActivatedAudioTriggers @ 0x14034ef4f\n// > GJBaseGameLayer::processSongState @ 0x14034ff60\n// > PlayLayer::showCompleteEffect @ 0x140507d61\n// > PlayLayer::destroyPlayer @ 0x140512e5c\n// > PlayLayer::loadFromCheckpoint @ 0x1405168fc\n// > PlayLayer::resetLevel @ 0x140518dfc\n// > <???> @ 0x140910aa8\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:25:44 +0000\n// \n\n__int64 __fastcall FMODAudioEngine::channelForChannelID(_QWORD *a1, int a2)\n{\n  __int64 *v3; // rcx\n  __int64 result; // rax\n  __int64 v5; // rcx\n  _BYTE v6[24]; // [rsp+20h] [rbp-18h] BYREF\n  int v7; // [rsp+48h] [rbp+10h] BYREF\n\n  v7 = a2;\n  v3 = (__int64 *)(a1[208]\n                 + 16\n                 * (a1[211]\n                  & (0x100000001B3LL\n                   * ((0x100000001B3LL\n                     * (BYTE2(a2)\n                      ^ (0x100000001B3LL\n                       * (BYTE1(a2) ^ (0x100000001B3LL * ((unsigned __int8)a2 ^ 0xCBF29CE484222325uLL))))))\n                    ^ HIBYTE(a2)))));\n  result = v3[1];\n  if ( result != a1[206] )\n  {\n    v5 = *v3;\n    if ( a2 == *(_DWORD *)(result + 16) )\n      goto LABEL_7;\n    while ( result != v5 )\n    {\n      result = *(_QWORD *)(result + 8);\n      if ( a2 == *(_DWORD *)(result + 16) )\n        goto LABEL_7;\n    }\n  }\n  result = 0;\nLABEL_7:\n  if ( result )\n    return *(_QWORD *)(*(_QWORD *)sub_1400677E0(a1 + 205, v6, &v7) + 24LL);\n  return result;\n}", "assembly": "; \n; FMODAudioEngine::channelForChannelID from 0x140060f50 to 0x14006100e (190 bytes)\n; \n; 35 xrefs:\n; > FMODAudioEngine::resumeSuspendedAudio @ 0x14005e085\n; > FMODAudioEngine::saveAudioState @ 0x14005e7ef\n; > FMODAudioEngine::loadAudioState @ 0x14005ec4c\n; > FMODAudioEngine::playEffectAdvanced @ 0x14005fc06\n; > FMODAudioEngine::setChannelVolume @ 0x140061b18\n; > FMODAudioEngine::setChannelVolume @ 0x140061b48\n; > FMODAudioEngine::setChannelVolumeMod @ 0x140061ce8\n; > FMODAudioEngine::setChannelVolumeMod @ 0x140061d18\n; > FMODAudioEngine::setChannelPitch @ 0x140061e51\n; > FMODAudioEngine::isMusicPlaying_1 @ 0x140062977\n; > FMODAudioEngine::stopAllMusic @ 0x140062a75\n; > FMODAudioEngine::resumeAllMusic @ 0x140062adc\n; > FMODAudioEngine::loadAndPlayMusic @ 0x140062d0c\n; > FMODAudioEngine::playMusic @ 0x140062e1e\n; > FMODAudioEngine::playMusic @ 0x140062e83\n; > FMODAudioEngine::loadMusic @ 0x140062fac\n; > FMODAudioEngine::startMusic @ 0x1400632f2\n; > FMODAudioEngine::updateQueuedMusic @ 0x14006446e\n; > FMODAudioEngine::setMusicTimeMS @ 0x140064fdb\n; > FMODAudioEngine::getMusicTimeMS @ 0x140065105\n; > FMODAudioEngine::getMusicLengthMS @ 0x14006516b\n; > FMODAudioEngine::fadeInMusic @ 0x1400653bb\n; > FMODAudioEngine::fadeOutMusic @ 0x1400654fb\n; > FMODAudioEngine::fadeMusic @ 0x140065643\n; > FMODAudioEngine::stopAndRemoveMusic @ 0x140065a7a\n; > AppDelegate::applicationDidEnterBackground @ 0x1400986e6\n; > GJBaseGameLayer::pauseAudio @ 0x140340406\n; > GJBaseGameLayer::processActivatedAudioTriggers @ 0x14034dd9f\n; > GJBaseGameLayer::processActivatedAudioTriggers @ 0x14034ef4f\n; > GJBaseGameLayer::processSongState @ 0x14034ff60\n; > PlayLayer::showCompleteEffect @ 0x140507d61\n; > PlayLayer::destroyPlayer @ 0x140512e5c\n; > PlayLayer::loadFromCheckpoint @ 0x1405168fc\n; > PlayLayer::resetLevel @ 0x140518dfc\n; > <???> @ 0x140910aa8\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:25:44 +0000\n; \nmov     [rsp+arg_8], edx                                               ; +0x0, 0x140060f50\nsub     rsp, 38h                                                       ; +0x4, 0x140060f54\nmov     r10, rcx                                                       ; +0x8, 0x140060f58\nmovzx   r9d, dl                                                        ; +0xb, 0x140060f5b\nmov     r11, 100000001B3h                                              ; +0xf, 0x140060f5f\nmov     rax, 0CBF29CE484222325h                                        ; +0x19, 0x140060f69\nxor     r9, rax                                                        ; +0x23, 0x140060f73\nmov     eax, edx                                                       ; +0x26, 0x140060f76\nsar     eax, 8                                                         ; +0x28, 0x140060f78\nmovzx   r8d, al                                                        ; +0x2b, 0x140060f7b\nmov     eax, edx                                                       ; +0x2f, 0x140060f7f\nimul    r9, r11                                                        ; +0x31, 0x140060f81\nsar     eax, 10h                                                       ; +0x35, 0x140060f85\nmovzx   ecx, al                                                        ; +0x38, 0x140060f88\nxor     r9, r8                                                         ; +0x3b, 0x140060f8b\nimul    r9, r11                                                        ; +0x3e, 0x140060f8e\nmov     eax, edx                                                       ; +0x42, 0x140060f92\nxor     r9, rcx                                                        ; +0x44, 0x140060f94\nsar     eax, 18h                                                       ; +0x47, 0x140060f97\nimul    r9, r11                                                        ; +0x4a, 0x140060f9a\nmovzx   ecx, al                                                        ; +0x4e, 0x140060f9e\nxor     rcx, r9                                                        ; +0x51, 0x140060fa1\nimul    rcx, r11                                                       ; +0x54, 0x140060fa4\nand     rcx, [r10+698h]                                                ; +0x58, 0x140060fa8\nshl     rcx, 4                                                         ; +0x5f, 0x140060faf\nadd     rcx, [r10+680h]                                                ; +0x63, 0x140060fb3\nmov     rax, [rcx+8]                                                   ; +0x6a, 0x140060fba\ncmp     rax, [r10+670h]                                                ; +0x6e, 0x140060fbe\njz      short loc_140060FE0                                            ; +0x75, 0x140060fc5\nmov     rcx, [rcx]                                                     ; +0x77, 0x140060fc7\ncmp     edx, [rax+10h]                                                 ; +0x7a, 0x140060fca\njz      short loc_140060FE2                                            ; +0x7d, 0x140060fcd\nnop                                                                    ; +0x7f, 0x140060fcf\ncmp     rax, rcx                                                       ; +0x80, 0x140060fd0\njz      short loc_140060FE0                                            ; +0x83, 0x140060fd3\nmov     rax, [rax+8]                                                   ; +0x85, 0x140060fd5\ncmp     edx, [rax+10h]                                                 ; +0x89, 0x140060fd9\njnz     short loc_140060FD0                                            ; +0x8c, 0x140060fdc\njmp     short loc_140060FE2                                            ; +0x8e, 0x140060fde\nxor     eax, eax                                                       ; +0x90, 0x140060fe0\ntest    rax, rax                                                       ; +0x92, 0x140060fe2\njz      short loc_140061009                                            ; +0x95, 0x140060fe5\nlea     rcx, [r10+668h]                                                ; +0x97, 0x140060fe7\nlea     r8, [rsp+38h+arg_8]                                            ; +0x9e, 0x140060fee\nlea     rdx, [rsp+38h+var_18]                                          ; +0xa3, 0x140060ff3\ncall    sub_1400677E0                                                  ; +0xa8, 0x140060ff8\nmov     rax, [rax]                                                     ; +0xad, 0x140060ffd\nmov     rax, [rax+18h]                                                 ; +0xb0, 0x140061000\nadd     rsp, 38h                                                       ; +0xb4, 0x140061004\nretn                                                                   ; +0xb8, 0x140061008\nadd     rsp, 38h                                                       ; +0xb9, 0x140061009\nretn                                                                   ; +0xbd, 0x14006100d", "xrefs": ["FMODAudioEngine::resumeSuspendedAudio @ 0x14005e085", "FMODAudioEngine::saveAudioState @ 0x14005e7ef", "FMODAudioEngine::loadAudioState @ 0x14005ec4c", "FMODAudioEngine::playEffectAdvanced @ 0x14005fc06", "FMODAudioEngine::setChannelVolume @ 0x140061b18", "FMODAudioEngine::setChannelVolume @ 0x140061b48", "FMODAudioEngine::setChannelVolumeMod @ 0x140061ce8", "FMODAudioEngine::setChannelVolumeMod @ 0x140061d18", "FMODAudioEngine::setChannelPitch @ 0x140061e51", "FMODAudioEngine::isMusicPlaying_1 @ 0x140062977", "FMODAudioEngine::stopAllMusic @ 0x140062a75", "FMODAudioEngine::resumeAllMusic @ 0x140062adc", "FMODAudioEngine::loadAndPlayMusic @ 0x140062d0c", "FMODAudioEngine::playMusic @ 0x140062e1e", "FMODAudioEngine::playMusic @ 0x140062e83", "FMODAudioEngine::loadMusic @ 0x140062fac", "FMODAudioEngine::startMusic @ 0x1400632f2", "FMODAudioEngine::updateQueuedMusic @ 0x14006446e", "FMODAudioEngine::setMusicTimeMS @ 0x140064fdb", "FMODAudioEngine::getMusicTimeMS @ 0x140065105", "FMODAudioEngine::getMusicLengthMS @ 0x14006516b", "FMODAudioEngine::fadeInMusic @ 0x1400653bb", "FMODAudioEngine::fadeOutMusic @ 0x1400654fb", "FMODAudioEngine::fadeMusic @ 0x140065643", "FMODAudioEngine::stopAndRemoveMusic @ 0x140065a7a", "AppDelegate::applicationDidEnterBackground @ 0x1400986e6", "GJBaseGameLayer::pauseAudio @ 0x140340406", "GJBaseGameLayer::processActivatedAudioTriggers @ 0x14034dd9f", "GJBaseGameLayer::processActivatedAudioTriggers @ 0x14034ef4f", "GJBaseGameLayer::processSongState @ 0x14034ff60", "PlayLayer::showCompleteEffect @ 0x140507d61", "PlayLayer::destroyPlayer @ 0x140512e5c", "PlayLayer::loadFromCheckpoint @ 0x1405168fc", "PlayLayer::resetLevel @ 0x140518dfc", "<???> @ 0x140910aa8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}