{"type": "func", "start": 4298982288, "end": 4298982455, "name": "FMODAudioEngine::loadAndPlayMusic", "pseudocode": "// \n// FMODAudioEngine::loadAndPlayMusic from 0x1003d4390 to 0x1003d4437 (167 bytes)\n// \n// 3 xrefs:\n// > SongOptionsLayer::onPlayback @ 0x1001faab8\n// > CreateGuidelinesLayer::playMusic @ 0x10050dcf9\n// > FindBPMLayer::playMusic @ 0x10050ee3f\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 12:29:40 +0000\n// \n\nFMOD::ChannelControl *__fastcall FMODAudioEngine::loadAndPlayMusic(__int64 a1, __int128 *a2, int a3, unsigned int a4)\n{\n  FMOD::ChannelControl *result; // rax\n  __int128 v7; // [rsp+0h] [rbp-30h] BYREF\n  void *__p; // [rsp+10h] [rbp-20h]\n\n  if ( (*(_BYTE *)a2 & 1) != 0 )\n  {\n    sub_10001AD30(&v7, *((const void **)a2 + 2), *((_QWORD *)a2 + 1));\n  }\n  else\n  {\n    __p = *((void **)a2 + 2);\n    v7 = *a2;\n  }\n  FMODAudioEngine::loadMusic(a1, (unsigned __int8 *)&v7, 0, a4, 0, 0, (__m128)0x3F800000u, 0.0, 1.0);\n  if ( (v7 & 1) != 0 )\n    operator delete(__p);\n  if ( a3 )\n    FMODAudioEngine::setMusicTimeMS(a1, a3, 0, a4);\n  result = (FMOD::ChannelControl *)FMODAudioEngine::getActiveMusicChannel(a1, a4);\n  if ( result )\n    return (FMOD::ChannelControl *)FMOD::ChannelControl::setPaused(result, 0);\n  return result;\n}", "assembly": "; \n; FMODAudioEngine::loadAndPlayMusic from 0x1003d4390 to 0x1003d4437 (167 bytes)\n; \n; 3 xrefs:\n; > SongOptionsLayer::onPlayback @ 0x1001faab8\n; > CreateGuidelinesLayer::playMusic @ 0x10050dcf9\n; > FindBPMLayer::playMusic @ 0x10050ee3f\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 12:29:40 +0000\n; \npush    rbp                                                            ; +0x0, 0x1003d4390\nmov     rbp, rsp                                                       ; +0x1, 0x1003d4391\npush    r15                                                            ; +0x4, 0x1003d4394\npush    r14                                                            ; +0x6, 0x1003d4396\npush    rbx                                                            ; +0x8, 0x1003d4398\nsub     rsp, 18h                                                       ; +0x9, 0x1003d4399\nmov     ebx, ecx                                                       ; +0xd, 0x1003d439d\nmov     r15d, edx                                                      ; +0xf, 0x1003d439f\nmov     r14, rdi                                                       ; +0x12, 0x1003d43a2\ntest    byte ptr [rsi], 1                                              ; +0x15, 0x1003d43a5\njnz     short loc_1003D43BB                                            ; +0x18, 0x1003d43a8\nmov     rax, [rsi+10h]                                                 ; +0x1a, 0x1003d43aa\nmov     [rbp+__p], rax                                                 ; +0x1e, 0x1003d43ae\nmovups  xmm0, xmmword ptr [rsi]                                        ; +0x22, 0x1003d43b2\nmovaps  [rbp+var_30], xmm0                                             ; +0x25, 0x1003d43b5\njmp     short loc_1003D43CC                                            ; +0x29, 0x1003d43b9\nmov     rdx, [rsi+8]                                                   ; +0x2b, 0x1003d43bb\nmov     rsi, [rsi+10h]                                                 ; +0x2f, 0x1003d43bf\nlea     rdi, [rbp+var_30]                                              ; +0x33, 0x1003d43c3\ncall    sub_10001AD30                                                  ; +0x37, 0x1003d43c7\nlea     rsi, [rbp+var_30]                                              ; +0x3c, 0x1003d43cc\nmovss   xmm0, cs:alpha                                                 ; +0x40, 0x1003d43d0\nxorps   xmm1, xmm1                                                     ; +0x48, 0x1003d43d8\nmov     rdi, r14                                                       ; +0x4b, 0x1003d43db\nmovaps  xmm2, xmm0                                                     ; +0x4e, 0x1003d43de\nxor     edx, edx                                                       ; +0x51, 0x1003d43e1\nmov     ecx, ebx                                                       ; +0x53, 0x1003d43e3\nxor     r8d, r8d                                                       ; +0x55, 0x1003d43e5\nxor     r9d, r9d                                                       ; +0x58, 0x1003d43e8\ncall    FMODAudioEngine__loadMusic                                     ; +0x5b, 0x1003d43eb\ntest    byte ptr [rbp+var_30], 1                                       ; +0x60, 0x1003d43f0\njz      short loc_1003D43FF                                            ; +0x64, 0x1003d43f4\nmov     rdi, [rbp+__p]; __p                                            ; +0x66, 0x1003d43f6\ncall    __ZdlPv; operator delete(void *)                               ; +0x6a, 0x1003d43fa\ntest    r15d, r15d                                                     ; +0x6f, 0x1003d43ff\njz      short loc_1003D4413                                            ; +0x72, 0x1003d4402\nmov     rdi, r14                                                       ; +0x74, 0x1003d4404\nmov     esi, r15d                                                      ; +0x77, 0x1003d4407\nxor     edx, edx                                                       ; +0x7a, 0x1003d440a\nmov     ecx, ebx                                                       ; +0x7c, 0x1003d440c\ncall    FMODAudioEngine__setMusicTimeMS                                ; +0x7e, 0x1003d440e\nmov     rdi, r14                                                       ; +0x83, 0x1003d4413\nmov     esi, ebx                                                       ; +0x86, 0x1003d4416\ncall    FMODAudioEngine__getActiveMusicChannel                         ; +0x88, 0x1003d4418\ntest    rax, rax                                                       ; +0x8d, 0x1003d441d\njz      short loc_1003D442C                                            ; +0x90, 0x1003d4420\nmov     rdi, rax; this                                                 ; +0x92, 0x1003d4422\nxor     esi, esi; bool                                                 ; +0x95, 0x1003d4425\ncall    __ZN4FMOD14ChannelControl9setPausedEb; FMOD::ChannelControl::setPaused(bool) ; +0x97, 0x1003d4427\nadd     rsp, 18h                                                       ; +0x9c, 0x1003d442c\npop     rbx                                                            ; +0xa0, 0x1003d4430\npop     r14                                                            ; +0xa1, 0x1003d4431\npop     r15                                                            ; +0xa3, 0x1003d4433\npop     rbp                                                            ; +0xa5, 0x1003d4435\nretn                                                                   ; +0xa6, 0x1003d4436", "xrefs": ["SongOptionsLayer::onPlayback @ 0x1001faab8", "CreateGuidelinesLayer::playMusic @ 0x10050dcf9", "FindBPMLayer::playMusic @ 0x10050ee3f"], "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"}