{"type": "func", "start": 4299058736, "end": 4299058903, "name": "FMODAudioEngine::loadAndPlayMusic", "pseudocode": "// \n// FMODAudioEngine::loadAndPlayMusic from 0x1003e6e30 to 0x1003e6ed7 (167 bytes)\n// \n// 3 xrefs:\n// > SongOptionsLayer::onPlayback @ 0x100217448\n// > CreateGuidelinesLayer::playMusic @ 0x10050c6c9\n// > FindBPMLayer::playMusic @ 0x10050d93f\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\nFMOD::Channel *__fastcall FMODAudioEngine::loadAndPlayMusic(\n        FMODAudioEngine *a1,\n        __int128 *a2,\n        unsigned int a3,\n        unsigned int a4,\n        double a5)\n{\n  FMOD::Channel *result; // rax\n  __int128 v8; // [rsp+0h] [rbp-30h] BYREF\n  void *__p; // [rsp+10h] [rbp-20h]\n\n  if ( (*(_BYTE *)a2 & 1) != 0 )\n  {\n    sub_100006B70(&v8, *((const void **)a2 + 2), *((_QWORD *)a2 + 1), a5);\n  }\n  else\n  {\n    __p = *((void **)a2 + 2);\n    v8 = *a2;\n  }\n  FMODAudioEngine::loadMusic((__int64)a1, (unsigned __int8 *)&v8, 0, a4, 0, 0, (__m128)0x3F800000u, 0.0, 1.0);\n  if ( (v8 & 1) != 0 )\n    operator delete(__p);\n  if ( a3 )\n    FMODAudioEngine::setMusicTimeMS(a1, a3, 0, a4);\n  result = FMODAudioEngine::getActiveMusicChannel(a1, a4);\n  if ( result )\n    return (FMOD::Channel *)FMOD::ChannelControl::setPaused(result, 0);\n  return result;\n}", "assembly": "; \n; FMODAudioEngine::loadAndPlayMusic from 0x1003e6e30 to 0x1003e6ed7 (167 bytes)\n; \n; 3 xrefs:\n; > SongOptionsLayer::onPlayback @ 0x100217448\n; > CreateGuidelinesLayer::playMusic @ 0x10050c6c9\n; > FindBPMLayer::playMusic @ 0x10050d93f\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\npush    rbp                                                            ; +0x0, 0x1003e6e30\nmov     rbp, rsp                                                       ; +0x1, 0x1003e6e31\npush    r15                                                            ; +0x4, 0x1003e6e34\npush    r14                                                            ; +0x6, 0x1003e6e36\npush    rbx                                                            ; +0x8, 0x1003e6e38\nsub     rsp, 18h                                                       ; +0x9, 0x1003e6e39\nmov     ebx, ecx                                                       ; +0xd, 0x1003e6e3d\nmov     r15d, edx                                                      ; +0xf, 0x1003e6e3f\nmov     r14, rdi                                                       ; +0x12, 0x1003e6e42\ntest    byte ptr [rsi], 1                                              ; +0x15, 0x1003e6e45\njnz     short loc_1003E6E5B                                            ; +0x18, 0x1003e6e48\nmov     rax, [rsi+10h]                                                 ; +0x1a, 0x1003e6e4a\nmov     [rbp+__p], rax                                                 ; +0x1e, 0x1003e6e4e\nmovups  xmm0, xmmword ptr [rsi]                                        ; +0x22, 0x1003e6e52\nmovaps  [rbp+var_30], xmm0                                             ; +0x25, 0x1003e6e55\njmp     short loc_1003E6E6C                                            ; +0x29, 0x1003e6e59\nmov     rdx, [rsi+8]                                                   ; +0x2b, 0x1003e6e5b\nmov     rsi, [rsi+10h]                                                 ; +0x2f, 0x1003e6e5f\nlea     rdi, [rbp+var_30]                                              ; +0x33, 0x1003e6e63\ncall    sub_100006B70                                                  ; +0x37, 0x1003e6e67\nlea     rsi, [rbp+var_30]                                              ; +0x3c, 0x1003e6e6c\nmovss   xmm0, cs:alpha                                                 ; +0x40, 0x1003e6e70\nxorps   xmm1, xmm1                                                     ; +0x48, 0x1003e6e78\nmov     rdi, r14                                                       ; +0x4b, 0x1003e6e7b\nmovaps  xmm2, xmm0                                                     ; +0x4e, 0x1003e6e7e\nxor     edx, edx                                                       ; +0x51, 0x1003e6e81\nmov     ecx, ebx                                                       ; +0x53, 0x1003e6e83\nxor     r8d, r8d                                                       ; +0x55, 0x1003e6e85\nxor     r9d, r9d                                                       ; +0x58, 0x1003e6e88\ncall    FMODAudioEngine__loadMusic                                     ; +0x5b, 0x1003e6e8b\ntest    byte ptr [rbp+var_30], 1                                       ; +0x60, 0x1003e6e90\njz      short loc_1003E6E9F                                            ; +0x64, 0x1003e6e94\nmov     rdi, [rbp+__p]; __p                                            ; +0x66, 0x1003e6e96\ncall    __ZdlPv; operator delete(void *)                               ; +0x6a, 0x1003e6e9a\ntest    r15d, r15d                                                     ; +0x6f, 0x1003e6e9f\njz      short loc_1003E6EB3                                            ; +0x72, 0x1003e6ea2\nmov     rdi, r14                                                       ; +0x74, 0x1003e6ea4\nmov     esi, r15d                                                      ; +0x77, 0x1003e6ea7\nxor     edx, edx                                                       ; +0x7a, 0x1003e6eaa\nmov     ecx, ebx                                                       ; +0x7c, 0x1003e6eac\ncall    FMODAudioEngine__setMusicTimeMS                                ; +0x7e, 0x1003e6eae\nmov     rdi, r14                                                       ; +0x83, 0x1003e6eb3\nmov     esi, ebx                                                       ; +0x86, 0x1003e6eb6\ncall    FMODAudioEngine__getActiveMusicChannel                         ; +0x88, 0x1003e6eb8\ntest    rax, rax                                                       ; +0x8d, 0x1003e6ebd\njz      short loc_1003E6ECC                                            ; +0x90, 0x1003e6ec0\nmov     rdi, rax; this                                                 ; +0x92, 0x1003e6ec2\nxor     esi, esi; bool                                                 ; +0x95, 0x1003e6ec5\ncall    __ZN4FMOD14ChannelControl9setPausedEb; FMOD::ChannelControl::setPaused(bool) ; +0x97, 0x1003e6ec7\nadd     rsp, 18h                                                       ; +0x9c, 0x1003e6ecc\npop     rbx                                                            ; +0xa0, 0x1003e6ed0\npop     r14                                                            ; +0xa1, 0x1003e6ed1\npop     r15                                                            ; +0xa3, 0x1003e6ed3\npop     rbp                                                            ; +0xa5, 0x1003e6ed5\nretn                                                                   ; +0xa6, 0x1003e6ed6", "xrefs": ["SongOptionsLayer::onPlayback @ 0x100217448", "CreateGuidelinesLayer::playMusic @ 0x10050c6c9", "FindBPMLayer::playMusic @ 0x10050d93f"], "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"}