; ; FMODAudioEngine::swapMusicIndex from 0x14005bd10 to 0x14005c1b3 (1187 bytes) ; ; 2 xrefs: ; > FMODAudioEngine::triggerQueuedMusic @ 0x14005bc66 ; > @ 0x1406c53b8 ; ; This function is hookable on this platform! ; ; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA ; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings ; mov [rsp-8+arg_18], rbx ; +0x0, 0x14005bd10 push rbp ; +0x5, 0x14005bd15 push rsi ; +0x6, 0x14005bd16 push rdi ; +0x7, 0x14005bd17 push r12 ; +0x8, 0x14005bd18 push r13 ; +0xa, 0x14005bd1a push r14 ; +0xc, 0x14005bd1c push r15 ; +0xe, 0x14005bd1e lea rbp, [rsp-27h] ; +0x10, 0x14005bd20 sub rsp, 0B0h ; +0x15, 0x14005bd25 movaps [rsp+0E0h+var_40], xmm6 ; +0x1c, 0x14005bd2c mov rax, cs:__security_cookie ; +0x24, 0x14005bd34 xor rax, rsp ; +0x2b, 0x14005bd3b mov [rbp+57h+var_48], rax ; +0x2e, 0x14005bd3e mov rsi, rcx ; +0x32, 0x14005bd42 mov [rbp+57h+var_C0], edx ; +0x35, 0x14005bd45 mov [rbp+57h+var_B8], r8d ; +0x38, 0x14005bd48 lea rdi, [rcx+140h] ; +0x3c, 0x14005bd4c lea rdx, [rbp+57h+var_C0] ; +0x43, 0x14005bd53 mov rcx, rdi ; +0x47, 0x14005bd57 call sub_14005F8D0 ; +0x4a, 0x14005bd5a mov r13, rax ; +0x4f, 0x14005bd5f lea rdx, [rbp+57h+var_B8] ; +0x52, 0x14005bd62 mov rcx, rdi ; +0x56, 0x14005bd66 call sub_14005F8D0 ; +0x59, 0x14005bd69 mov r12, rax ; +0x5e, 0x14005bd6e lea r15, [rsi+428h] ; +0x61, 0x14005bd71 lea rdx, [rbp+57h+var_C0] ; +0x68, 0x14005bd78 mov rcx, r15 ; +0x6c, 0x14005bd7c call sub_14005F8D0 ; +0x6f, 0x14005bd7f test rax, rax ; +0x74, 0x14005bd84 jnz short loc_14005BDA3 ; +0x77, 0x14005bd87 lea r8, [rbp+57h+var_C0] ; +0x79, 0x14005bd89 lea rdx, [rbp+57h+var_B0] ; +0x7d, 0x14005bd8d mov rcx, r15 ; +0x81, 0x14005bd91 call sub_140060B20 ; +0x84, 0x14005bd94 mov rcx, [rax] ; +0x89, 0x14005bd99 mov dword ptr [rcx+14h], 3F800000h ; +0x8c, 0x14005bd9c lea rdx, [rbp+57h+var_B8] ; +0x93, 0x14005bda3 mov rcx, r15 ; +0x97, 0x14005bda7 call sub_14005F8D0 ; +0x9a, 0x14005bdaa test rax, rax ; +0x9f, 0x14005bdaf jnz short loc_14005BDCE ; +0xa2, 0x14005bdb2 lea r8, [rbp+57h+var_B8] ; +0xa4, 0x14005bdb4 lea rdx, [rbp+57h+var_B0] ; +0xa8, 0x14005bdb8 mov rcx, r15 ; +0xac, 0x14005bdbc call sub_140060B20 ; +0xaf, 0x14005bdbf mov rcx, [rax] ; +0xb4, 0x14005bdc4 mov dword ptr [rcx+14h], 3F800000h ; +0xb7, 0x14005bdc7 lea r14, [rsi+468h] ; +0xbe, 0x14005bdce lea rdx, [rbp+57h+var_C0] ; +0xc5, 0x14005bdd5 mov rcx, r14 ; +0xc9, 0x14005bdd9 call sub_14005F8D0 ; +0xcc, 0x14005bddc test rax, rax ; +0xd1, 0x14005bde1 jnz short loc_14005BE00 ; +0xd4, 0x14005bde4 lea r8, [rbp+57h+var_C0] ; +0xd6, 0x14005bde6 lea rdx, [rbp+57h+var_B0] ; +0xda, 0x14005bdea mov rcx, r14 ; +0xde, 0x14005bdee call sub_140060B20 ; +0xe1, 0x14005bdf1 mov rcx, [rax] ; +0xe6, 0x14005bdf6 mov dword ptr [rcx+14h], 3F800000h ; +0xe9, 0x14005bdf9 lea rdx, [rbp+57h+var_B8] ; +0xf0, 0x14005be00 mov rcx, r14 ; +0xf4, 0x14005be04 call sub_14005F8D0 ; +0xf7, 0x14005be07 test rax, rax ; +0xfc, 0x14005be0c jnz short loc_14005BE2B ; +0xff, 0x14005be0f lea r8, [rbp+57h+var_B8] ; +0x101, 0x14005be11 lea rdx, [rbp+57h+var_B0] ; +0x105, 0x14005be15 mov rcx, r14 ; +0x109, 0x14005be19 call sub_140060B20 ; +0x10c, 0x14005be1c mov rcx, [rax] ; +0x111, 0x14005be21 mov dword ptr [rcx+14h], 3F800000h ; +0x114, 0x14005be24 add rsi, 4A8h ; +0x11b, 0x14005be2b lea rdx, [rbp+57h+var_C0] ; +0x122, 0x14005be32 mov rcx, rsi ; +0x126, 0x14005be36 call sub_14005F8D0 ; +0x129, 0x14005be39 test rax, rax ; +0x12e, 0x14005be3e jnz short loc_14005BE5D ; +0x131, 0x14005be41 lea r8, [rbp+57h+var_C0] ; +0x133, 0x14005be43 lea rdx, [rbp+57h+var_B0] ; +0x137, 0x14005be47 mov rcx, rsi ; +0x13b, 0x14005be4b call sub_140060B20 ; +0x13e, 0x14005be4e mov rcx, [rax] ; +0x143, 0x14005be53 mov dword ptr [rcx+14h], 3F800000h ; +0x146, 0x14005be56 lea rdx, [rbp+57h+var_B8] ; +0x14d, 0x14005be5d mov rcx, rsi ; +0x151, 0x14005be61 call sub_14005F8D0 ; +0x154, 0x14005be64 test rax, rax ; +0x159, 0x14005be69 jnz short loc_14005BE88 ; +0x15c, 0x14005be6c lea r8, [rbp+57h+var_B8] ; +0x15e, 0x14005be6e lea rdx, [rbp+57h+var_B0] ; +0x162, 0x14005be72 mov rcx, rsi ; +0x166, 0x14005be76 call sub_140060B20 ; +0x169, 0x14005be79 mov rcx, [rax] ; +0x16e, 0x14005be7e mov dword ptr [rcx+14h], 3F800000h ; +0x171, 0x14005be81 lea r8, [rbp+57h+var_C0] ; +0x178, 0x14005be88 lea rdx, [rbp+57h+var_B0] ; +0x17c, 0x14005be8c mov rcx, r15 ; +0x180, 0x14005be90 call sub_140060B20 ; +0x183, 0x14005be93 mov rcx, [rax] ; +0x188, 0x14005be98 movss xmm6, dword ptr [rcx+14h] ; +0x18b, 0x14005be9b lea r8, [rbp+57h+var_B8] ; +0x190, 0x14005bea0 lea rdx, [rbp+57h+var_B0] ; +0x194, 0x14005bea4 mov rcx, r15 ; +0x198, 0x14005bea8 call sub_140060B20 ; +0x19b, 0x14005beab mov rbx, [rax] ; +0x1a0, 0x14005beb0 lea r8, [rbp+57h+var_C0] ; +0x1a3, 0x14005beb3 lea rdx, [rbp+57h+var_A0] ; +0x1a7, 0x14005beb7 mov rcx, r15 ; +0x1ab, 0x14005bebb call sub_140060B20 ; +0x1ae, 0x14005bebe mov rcx, [rax] ; +0x1b3, 0x14005bec3 mov eax, [rbx+14h] ; +0x1b6, 0x14005bec6 mov [rcx+14h], eax ; +0x1b9, 0x14005bec9 lea r8, [rbp+57h+var_B8] ; +0x1bc, 0x14005becc lea rdx, [rbp+57h+var_A0] ; +0x1c0, 0x14005bed0 mov rcx, r15 ; +0x1c4, 0x14005bed4 call sub_140060B20 ; +0x1c7, 0x14005bed7 mov rcx, [rax] ; +0x1cc, 0x14005bedc movss dword ptr [rcx+14h], xmm6 ; +0x1cf, 0x14005bedf lea r8, [rbp+57h+var_C0] ; +0x1d4, 0x14005bee4 lea rdx, [rbp+57h+var_A0] ; +0x1d8, 0x14005bee8 mov rcx, r14 ; +0x1dc, 0x14005beec call sub_140060B20 ; +0x1df, 0x14005beef mov rcx, [rax] ; +0x1e4, 0x14005bef4 movss xmm6, dword ptr [rcx+14h] ; +0x1e7, 0x14005bef7 lea r8, [rbp+57h+var_C0] ; +0x1ec, 0x14005befc lea rdx, [rbp+57h+var_A0] ; +0x1f0, 0x14005bf00 mov rcx, r14 ; +0x1f4, 0x14005bf04 call sub_140060B20 ; +0x1f7, 0x14005bf07 mov rbx, [rax] ; +0x1fc, 0x14005bf0c lea r8, [rbp+57h+var_B8] ; +0x1ff, 0x14005bf0f lea rdx, [rbp+57h+var_B0] ; +0x203, 0x14005bf13 mov rcx, r14 ; +0x207, 0x14005bf17 call sub_140060B20 ; +0x20a, 0x14005bf1a mov rcx, [rax] ; +0x20f, 0x14005bf1f mov eax, [rcx+14h] ; +0x212, 0x14005bf22 mov [rbx+14h], eax ; +0x215, 0x14005bf25 lea r8, [rbp+57h+var_B8] ; +0x218, 0x14005bf28 lea rdx, [rbp+57h+var_A0] ; +0x21c, 0x14005bf2c mov rcx, r14 ; +0x220, 0x14005bf30 call sub_140060B20 ; +0x223, 0x14005bf33 mov rcx, [rax] ; +0x228, 0x14005bf38 movss dword ptr [rcx+14h], xmm6 ; +0x22b, 0x14005bf3b lea r8, [rbp+57h+var_C0] ; +0x230, 0x14005bf40 lea rdx, [rbp+57h+var_A0] ; +0x234, 0x14005bf44 mov rcx, rsi ; +0x238, 0x14005bf48 call sub_140060B20 ; +0x23b, 0x14005bf4b mov rcx, [rax] ; +0x240, 0x14005bf50 movss xmm6, dword ptr [rcx+14h] ; +0x243, 0x14005bf53 lea r8, [rbp+57h+var_B8] ; +0x248, 0x14005bf58 lea rdx, [rbp+57h+var_A0] ; +0x24c, 0x14005bf5c mov rcx, rsi ; +0x250, 0x14005bf60 call sub_140060B20 ; +0x253, 0x14005bf63 mov rbx, [rax] ; +0x258, 0x14005bf68 lea r8, [rbp+57h+var_C0] ; +0x25b, 0x14005bf6b lea rdx, [rbp+57h+var_B0] ; +0x25f, 0x14005bf6f mov rcx, rsi ; +0x263, 0x14005bf73 call sub_140060B20 ; +0x266, 0x14005bf76 mov rcx, [rax] ; +0x26b, 0x14005bf7b mov eax, [rbx+14h] ; +0x26e, 0x14005bf7e mov [rcx+14h], eax ; +0x271, 0x14005bf81 lea r8, [rbp+57h+var_B8] ; +0x274, 0x14005bf84 lea rdx, [rbp+57h+var_A0] ; +0x278, 0x14005bf88 mov rcx, rsi ; +0x27c, 0x14005bf8c call sub_140060B20 ; +0x27f, 0x14005bf8f mov rcx, [rax] ; +0x284, 0x14005bf94 movss dword ptr [rcx+14h], xmm6 ; +0x287, 0x14005bf97 test r13, r13 ; +0x28c, 0x14005bf9c jz loc_14005C10E ; +0x28f, 0x14005bf9f lea r8, [rbp+57h+var_C0] ; +0x295, 0x14005bfa5 mov rcx, rdi ; +0x299, 0x14005bfa9 test r12, r12 ; +0x29c, 0x14005bfac jz loc_14005C0B8 ; +0x29f, 0x14005bfaf lea rdx, [rbp+57h+var_A0] ; +0x2a5, 0x14005bfb5 call sub_140061560 ; +0x2a9, 0x14005bfb9 mov rbx, [rax] ; +0x2ae, 0x14005bfbe mov eax, [rbx+18h] ; +0x2b1, 0x14005bfc1 mov [rbp+57h+var_80], eax ; +0x2b4, 0x14005bfc4 mov rax, [rbx+20h] ; +0x2b7, 0x14005bfc7 mov [rbp+57h+var_78], rax ; +0x2bb, 0x14005bfcb lea rdx, [rbx+28h] ; +0x2bf, 0x14005bfcf lea rcx, [rbp+57h+Src] ; +0x2c3, 0x14005bfd3 call sub_14003BDB0 ; +0x2c7, 0x14005bfd7 movzx r14d, byte ptr [rbx+48h] ; +0x2cc, 0x14005bfdc mov [rbp+57h+var_50], r14b ; +0x2d1, 0x14005bfe1 movzx r15d, byte ptr [rbx+49h] ; +0x2d5, 0x14005bfe5 mov [rbp+57h+var_4F], r15b ; +0x2da, 0x14005bfea lea r8, [rbp+57h+var_B8] ; +0x2de, 0x14005bfee lea rdx, [rbp+57h+var_B0] ; +0x2e2, 0x14005bff2 mov rcx, rdi ; +0x2e6, 0x14005bff6 call sub_140061560 ; +0x2e9, 0x14005bff9 mov rbx, [rax] ; +0x2ee, 0x14005bffe lea r8, [rbp+57h+var_C0] ; +0x2f1, 0x14005c001 lea rdx, [rbp+57h+var_90] ; +0x2f5, 0x14005c005 mov rcx, rdi ; +0x2f9, 0x14005c009 call sub_140061560 ; +0x2fc, 0x14005c00c mov rsi, [rax] ; +0x301, 0x14005c011 mov eax, [rbx+18h] ; +0x304, 0x14005c014 mov [rsi+18h], eax ; +0x307, 0x14005c017 mov rax, [rbx+20h] ; +0x30a, 0x14005c01a mov [rsi+20h], rax ; +0x30e, 0x14005c01e lea r8, [rbx+28h] ; +0x312, 0x14005c022 lea rcx, [rsi+28h]; void * ; +0x316, 0x14005c026 cmp rcx, r8 ; +0x31a, 0x14005c02a jz short loc_14005C045 ; +0x31d, 0x14005c02d mov rdx, r8 ; +0x31f, 0x14005c02f cmp qword ptr [r8+18h], 0Fh ; +0x322, 0x14005c032 jbe short loc_14005C03C ; +0x327, 0x14005c037 mov rdx, [r8]; Src ; +0x329, 0x14005c039 mov r8, [r8+10h]; Size ; +0x32c, 0x14005c03c call sub_14003CCE0 ; +0x330, 0x14005c040 movzx eax, byte ptr [rbx+48h] ; +0x335, 0x14005c045 mov [rsi+48h], al ; +0x339, 0x14005c049 movzx eax, byte ptr [rbx+49h] ; +0x33c, 0x14005c04c mov [rsi+49h], al ; +0x340, 0x14005c050 lea r8, [rbp+57h+var_B8] ; +0x343, 0x14005c053 lea rdx, [rbp+57h+var_90] ; +0x347, 0x14005c057 mov rcx, rdi ; +0x34b, 0x14005c05b call sub_140061560 ; +0x34e, 0x14005c05e mov rbx, [rax] ; +0x353, 0x14005c063 mov eax, [rbp+57h+var_80] ; +0x356, 0x14005c066 mov [rbx+18h], eax ; +0x359, 0x14005c069 mov rax, [rbp+57h+var_78] ; +0x35c, 0x14005c06c mov [rbx+20h], rax ; +0x360, 0x14005c070 lea rcx, [rbx+28h]; void * ; +0x364, 0x14005c074 lea rax, [rbp+57h+Src] ; +0x368, 0x14005c078 cmp rcx, rax ; +0x36c, 0x14005c07c jz short loc_14005C0A2 ; +0x36f, 0x14005c07f lea rdx, [rbp+57h+Src] ; +0x371, 0x14005c081 cmp [rbp+57h+var_58], 0Fh ; +0x375, 0x14005c085 cmova rdx, [rbp+57h+Src]; Src ; +0x37a, 0x14005c08a mov r8, [rbp+57h+Size]; Size ; +0x37f, 0x14005c08f call sub_14003CCE0 ; +0x383, 0x14005c093 movzx r15d, [rbp+57h+var_4F] ; +0x388, 0x14005c098 movzx r14d, [rbp+57h+var_50] ; +0x38d, 0x14005c09d mov [rbx+48h], r14b ; +0x392, 0x14005c0a2 mov [rbx+49h], r15b ; +0x396, 0x14005c0a6 lea rcx, [rbp+57h+Src] ; +0x39a, 0x14005c0aa call sub_14003A830 ; +0x39e, 0x14005c0ae jmp loc_14005C184 ; +0x3a3, 0x14005c0b3 lea rdx, [rbp+57h+var_90] ; +0x3a8, 0x14005c0b8 call sub_140061560 ; +0x3ac, 0x14005c0bc mov rbx, [rax] ; +0x3b1, 0x14005c0c1 lea r8, [rbp+57h+var_B8] ; +0x3b4, 0x14005c0c4 lea rdx, [rbp+57h+var_A0] ; +0x3b8, 0x14005c0c8 mov rcx, rdi ; +0x3bc, 0x14005c0cc call sub_140061560 ; +0x3bf, 0x14005c0cf mov rsi, [rax] ; +0x3c4, 0x14005c0d4 mov eax, [rbx+18h] ; +0x3c7, 0x14005c0d7 mov [rsi+18h], eax ; +0x3ca, 0x14005c0da mov rax, [rbx+20h] ; +0x3cd, 0x14005c0dd mov [rsi+20h], rax ; +0x3d1, 0x14005c0e1 lea r8, [rbx+28h] ; +0x3d5, 0x14005c0e5 lea rcx, [rsi+28h]; void * ; +0x3d9, 0x14005c0e9 cmp rcx, r8 ; +0x3dd, 0x14005c0ed jz short loc_14005C108 ; +0x3e0, 0x14005c0f0 mov rdx, r8 ; +0x3e2, 0x14005c0f2 cmp qword ptr [r8+18h], 0Fh ; +0x3e5, 0x14005c0f5 jbe short loc_14005C0FF ; +0x3ea, 0x14005c0fa mov rdx, [r8]; Src ; +0x3ec, 0x14005c0fc mov r8, [r8+10h]; Size ; +0x3ef, 0x14005c0ff call sub_14003CCE0 ; +0x3f3, 0x14005c103 lea rdx, [rbp+57h+var_C0] ; +0x3f8, 0x14005c108 jmp short loc_14005C16E ; +0x3fc, 0x14005c10c test r12, r12 ; +0x3fe, 0x14005c10e jz short loc_14005C184 ; +0x401, 0x14005c111 lea r8, [rbp+57h+var_B8] ; +0x403, 0x14005c113 lea rdx, [rbp+57h+var_90] ; +0x407, 0x14005c117 mov rcx, rdi ; +0x40b, 0x14005c11b call sub_140061560 ; +0x40e, 0x14005c11e mov rbx, [rax] ; +0x413, 0x14005c123 lea r8, [rbp+57h+var_C0] ; +0x416, 0x14005c126 lea rdx, [rbp+57h+var_A0] ; +0x41a, 0x14005c12a mov rcx, rdi ; +0x41e, 0x14005c12e call sub_140061560 ; +0x421, 0x14005c131 mov rsi, [rax] ; +0x426, 0x14005c136 mov eax, [rbx+18h] ; +0x429, 0x14005c139 mov [rsi+18h], eax ; +0x42c, 0x14005c13c mov rax, [rbx+20h] ; +0x42f, 0x14005c13f mov [rsi+20h], rax ; +0x433, 0x14005c143 lea r8, [rbx+28h] ; +0x437, 0x14005c147 lea rcx, [rsi+28h]; void * ; +0x43b, 0x14005c14b cmp rcx, r8 ; +0x43f, 0x14005c14f jz short loc_14005C16A ; +0x442, 0x14005c152 mov rdx, r8 ; +0x444, 0x14005c154 cmp qword ptr [r8+18h], 0Fh ; +0x447, 0x14005c157 jbe short loc_14005C161 ; +0x44c, 0x14005c15c mov rdx, [r8]; Src ; +0x44e, 0x14005c15e mov r8, [r8+10h]; Size ; +0x451, 0x14005c161 call sub_14003CCE0 ; +0x455, 0x14005c165 lea rdx, [rbp+57h+var_B8] ; +0x45a, 0x14005c16a movzx eax, byte ptr [rbx+48h] ; +0x45e, 0x14005c16e mov [rsi+48h], al ; +0x462, 0x14005c172 movzx eax, byte ptr [rbx+49h] ; +0x465, 0x14005c175 mov [rsi+49h], al ; +0x469, 0x14005c179 mov rcx, rdi ; +0x46c, 0x14005c17c call sub_14005DA90 ; +0x46f, 0x14005c17f mov rcx, [rbp+57h+var_48] ; +0x474, 0x14005c184 xor rcx, rsp; StackCookie ; +0x478, 0x14005c188 call __security_check_cookie ; +0x47b, 0x14005c18b mov rbx, [rsp+0E0h+arg_18] ; +0x480, 0x14005c190 movaps xmm6, [rsp+0E0h+var_40] ; +0x488, 0x14005c198 add rsp, 0B0h ; +0x490, 0x14005c1a0 pop r15 ; +0x497, 0x14005c1a7 pop r14 ; +0x499, 0x14005c1a9 pop r13 ; +0x49b, 0x14005c1ab pop r12 ; +0x49d, 0x14005c1ad pop rdi ; +0x49f, 0x14005c1af pop rsi ; +0x4a0, 0x14005c1b0 pop rbp ; +0x4a1, 0x14005c1b1 retn ; +0x4a2, 0x14005c1b2