{"type": "func", "start": 5369122720, "end": 5369123015, "name": "FMODAudioEngine::setMusicTimeMS", "pseudocode": "// \n// FMODAudioEngine::setMusicTimeMS from 0x140064fa0 to 0x1400650c7 (295 bytes)\n// \n// 9 xrefs:\n// > FMODAudioEngine::loadAudioState @ 0x14005edfd\n// > FMODAudioEngine::loadAndPlayMusic @ 0x140062cca\n// > GJBaseGameLayer::processSongState @ 0x14035000d\n// > MusicBrowser::sliderEnded @ 0x14047c26e\n// > PlayLayer::prepareMusic @ 0x14051aea5\n// > SetupSongTriggerPopup::onPlayback @ 0x1405f36d0\n// > <???> @ 0x140888714\n// > <???> @ 0x140888724\n// > <???> @ 0x140910d30\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:45 +0000\n// \n\n__int64 __fastcall FMODAudioEngine::setMusicTimeMS(__int64 a1, int a2, char a3, int a4)\n{\n  __int64 v7; // rax\n  __int64 result; // rax\n  __int64 v9; // rsi\n  __int64 v10; // rax\n  int v11; // edx\n  __int64 v12; // rbx\n  _BYTE v13[56]; // [rsp+30h] [rbp-38h] BYREF\n  unsigned int v14; // [rsp+70h] [rbp+8h] BYREF\n  int v15; // [rsp+88h] [rbp+20h] BYREF\n\n  v15 = a4;\n  v7 = sub_140068620(a1 + 320, v13, &v15);\n  result = FMODAudioEngine::channelForChannelID((_QWORD *)a1, *(_DWORD *)(*(_QWORD *)v7 + 24LL));\n  v9 = result;\n  if ( result )\n  {\n    v10 = sub_140068620(a1 + 320, v13, &v15);\n    v11 = 40;\n    if ( *(_BYTE *)(*(_QWORD *)v10 + 72LL) )\n      v11 = 0;\n    result = FMOD::Channel::setPosition(v9, (unsigned int)(a2 + *(_DWORD *)(a1 + 620) + v11), 1);\n    if ( !a3 )\n    {\n      result = sub_140068620(a1 + 320, v13, &v15);\n      v12 = *(_QWORD *)(*(_QWORD *)result + 32LL);\n      if ( v12 )\n      {\n        *(_DWORD *)(a1 + 608) = FMOD::Sound::getOpenState(v12, &v14, 0, 0, 0);\n        for ( result = v14; v14; result = v14 )\n        {\n          result = (unsigned int)(result - 2);\n          if ( (result & 0xFFFFFFFB) == 0 )\n            break;\n          *(_DWORD *)(a1 + 608) = FMOD::Sound::getOpenState(v12, &v14, 0, 0, 0);\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; FMODAudioEngine::setMusicTimeMS from 0x140064fa0 to 0x1400650c7 (295 bytes)\n; \n; 9 xrefs:\n; > FMODAudioEngine::loadAudioState @ 0x14005edfd\n; > FMODAudioEngine::loadAndPlayMusic @ 0x140062cca\n; > GJBaseGameLayer::processSongState @ 0x14035000d\n; > MusicBrowser::sliderEnded @ 0x14047c26e\n; > PlayLayer::prepareMusic @ 0x14051aea5\n; > SetupSongTriggerPopup::onPlayback @ 0x1405f36d0\n; > <???> @ 0x140888714\n; > <???> @ 0x140888724\n; > <???> @ 0x140910d30\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:45 +0000\n; \nmov     [rsp+arg_18], r9d                                              ; +0x0, 0x140064fa0\npush    rbx                                                            ; +0x5, 0x140064fa5\npush    rbp                                                            ; +0x6, 0x140064fa6\npush    rsi                                                            ; +0x7, 0x140064fa7\npush    rdi                                                            ; +0x8, 0x140064fa8\npush    r14                                                            ; +0x9, 0x140064fa9\nsub     rsp, 40h                                                       ; +0xb, 0x140064fab\nmovzx   ebp, r8b                                                       ; +0xf, 0x140064faf\nmov     r14d, edx                                                      ; +0x13, 0x140064fb3\nmov     rdi, rcx                                                       ; +0x16, 0x140064fb6\nlea     r8, [rsp+68h+arg_18]                                           ; +0x19, 0x140064fb9\nlea     rdx, [rsp+68h+var_38]                                          ; +0x21, 0x140064fc1\nadd     rcx, 140h                                                      ; +0x26, 0x140064fc6\ncall    sub_140068620                                                  ; +0x2d, 0x140064fcd\nmov     rcx, rdi                                                       ; +0x32, 0x140064fd2\nmov     rdx, [rax]                                                     ; +0x35, 0x140064fd5\nmov     edx, [rdx+18h]                                                 ; +0x38, 0x140064fd8\ncall    FMODAudioEngine__channelForChannelID                           ; +0x3b, 0x140064fdb\nmov     rsi, rax                                                       ; +0x40, 0x140064fe0\ntest    rax, rax                                                       ; +0x43, 0x140064fe3\njz      loc_1400650BC                                                  ; +0x46, 0x140064fe6\nlea     r8, [rsp+68h+arg_18]                                           ; +0x4c, 0x140064fec\nmov     [rsp+68h+arg_8], r15                                           ; +0x54, 0x140064ff4\nlea     rdx, [rsp+68h+var_38]                                          ; +0x59, 0x140064ff9\nlea     rcx, [rdi+140h]                                                ; +0x5e, 0x140064ffe\ncall    sub_140068620                                                  ; +0x65, 0x140065005\nxor     r15d, r15d                                                     ; +0x6a, 0x14006500a\nmov     edx, 28h ; '('                                                 ; +0x6d, 0x14006500d\nmov     r8d, 1                                                         ; +0x72, 0x140065012\nmov     rcx, [rax]                                                     ; +0x78, 0x140065018\ncmp     [rcx+48h], r15b                                                ; +0x7b, 0x14006501b\nmov     rcx, rsi                                                       ; +0x7f, 0x14006501f\ncmovnz  edx, r15d                                                      ; +0x82, 0x140065022\nadd     edx, [rdi+26Ch]                                                ; +0x86, 0x140065026\nadd     edx, r14d                                                      ; +0x8c, 0x14006502c\ncall    cs:?setPosition@Channel@FMOD@@QEAA?AW4FMOD_RESULT@@II@Z; FMOD::Channel::setPosition(uint,uint) ; +0x8f, 0x14006502f\ntest    bpl, bpl                                                       ; +0x95, 0x140065035\njnz     short loc_1400650B7                                            ; +0x98, 0x140065038\nlea     r8, [rsp+68h+arg_18]                                           ; +0x9a, 0x14006503a\nlea     rdx, [rsp+68h+var_38]                                          ; +0xa2, 0x140065042\nlea     rcx, [rdi+140h]                                                ; +0xa7, 0x140065047\ncall    sub_140068620                                                  ; +0xae, 0x14006504e\nmov     rcx, [rax]                                                     ; +0xb3, 0x140065053\nmov     rbx, [rcx+20h]                                                 ; +0xb6, 0x140065056\ntest    rbx, rbx                                                       ; +0xba, 0x14006505a\njz      short loc_1400650B7                                            ; +0xbd, 0x14006505d\nxor     r9d, r9d                                                       ; +0xbf, 0x14006505f\nmov     [rsp+68h+var_48], r15                                          ; +0xc2, 0x140065062\nxor     r8d, r8d                                                       ; +0xc7, 0x140065067\nlea     rdx, [rsp+68h+arg_0]                                           ; +0xca, 0x14006506a\nmov     rcx, rbx                                                       ; +0xcf, 0x14006506f\ncall    cs:?getOpenState@Sound@FMOD@@QEAA?AW4FMOD_RESULT@@PEAW4FMOD_OPENSTATE@@PEAIPEA_N2@Z; FMOD::Sound::getOpenState(FMOD_OPENSTATE *,uint *,bool *,bool *) ; +0xd2, 0x140065072\nmov     [rdi+260h], eax                                                ; +0xd8, 0x140065078\nmov     eax, [rsp+68h+arg_0]                                           ; +0xde, 0x14006507e\ntest    eax, eax                                                       ; +0xe2, 0x140065082\njz      short loc_1400650B7                                            ; +0xe4, 0x140065084\nadd     eax, 0FFFFFFFEh                                                ; +0xe6, 0x140065086\ntest    eax, 0FFFFFFFBh                                                ; +0xe9, 0x140065089\njz      short loc_1400650B7                                            ; +0xee, 0x14006508e\nxor     r9d, r9d                                                       ; +0xf0, 0x140065090\nmov     [rsp+68h+var_48], r15                                          ; +0xf3, 0x140065093\nxor     r8d, r8d                                                       ; +0xf8, 0x140065098\nlea     rdx, [rsp+68h+arg_0]                                           ; +0xfb, 0x14006509b\nmov     rcx, rbx                                                       ; +0x100, 0x1400650a0\ncall    cs:?getOpenState@Sound@FMOD@@QEAA?AW4FMOD_RESULT@@PEAW4FMOD_OPENSTATE@@PEAIPEA_N2@Z; FMOD::Sound::getOpenState(FMOD_OPENSTATE *,uint *,bool *,bool *) ; +0x103, 0x1400650a3\nmov     [rdi+260h], eax                                                ; +0x109, 0x1400650a9\nmov     eax, [rsp+68h+arg_0]                                           ; +0x10f, 0x1400650af\ntest    eax, eax                                                       ; +0x113, 0x1400650b3\njnz     short loc_140065086                                            ; +0x115, 0x1400650b5\nmov     r15, [rsp+68h+arg_8]                                           ; +0x117, 0x1400650b7\nadd     rsp, 40h                                                       ; +0x11c, 0x1400650bc\npop     r14                                                            ; +0x120, 0x1400650c0\npop     rdi                                                            ; +0x122, 0x1400650c2\npop     rsi                                                            ; +0x123, 0x1400650c3\npop     rbp                                                            ; +0x124, 0x1400650c4\npop     rbx                                                            ; +0x125, 0x1400650c5\nretn                                                                   ; +0x126, 0x1400650c6", "xrefs": ["FMODAudioEngine::loadAudioState @ 0x14005edfd", "FMODAudioEngine::loadAndPlayMusic @ 0x140062cca", "GJBaseGameLayer::processSongState @ 0x14035000d", "MusicBrowser::sliderEnded @ 0x14047c26e", "PlayLayer::prepareMusic @ 0x14051aea5", "SetupSongTriggerPopup::onPlayback @ 0x1405f36d0", "<???> @ 0x140888714", "<???> @ 0x140888724", "<???> @ 0x140910d30"], "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"}