{"type": "func", "start": 4299069216, "end": 4299069362, "name": "FMODAudioEngine::waitUntilSoundReady", "pseudocode": "// \n// FMODAudioEngine::waitUntilSoundReady from 0x1003e9720 to 0x1003e97b2 (146 bytes)\n// \n// 0 xrefs:\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_OPENSTATE __fastcall FMODAudioEngine::waitUntilSoundReady(FMODAudioEngine *a1, FMOD::Sound *a2)\n{\n  __int64 v2; // rax\n  __int64 v3; // r13\n  int v4; // r12d\n  FMOD_OPENSTATE result; // eax\n  FMOD_OPENSTATE v6; // [rsp-34h] [rbp-34h] BYREF\n  __int64 v7; // [rsp-20h] [rbp-20h]\n\n  if ( !a2 )\n    return FMOD_OPENSTATE_ERROR;\n  v7 = v3;\n  v6 = HIDWORD(v2);\n  v4 = 69;\n  do\n  {\n    do\n    {\n      a1->m_lastResult = FMOD::Sound::getOpenState(a2, &v6, nullptr, nullptr, nullptr);\n      if ( v6 <= FMOD_OPENSTATE_PLAYING )\n      {\n        result = v6;\n        if ( _bittest(&v4, v6) )\n          break;\n      }\n      result = (unsigned int)v3;\n    }\n    while ( v6 > FMOD_OPENSTATE_PLAYING );\n    LODWORD(v3) = result;\n  }\n  while ( !_bittest(&v4, v6) );\n  return result;\n}", "assembly": "; \n; FMODAudioEngine::waitUntilSoundReady from 0x1003e9720 to 0x1003e97b2 (146 bytes)\n; \n; 0 xrefs:\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\ntest    rsi, rsi                                                       ; +0x0, 0x1003e9720\njz      loc_1003E97AC                                                  ; +0x3, 0x1003e9723\npush    rbp                                                            ; +0x9, 0x1003e9729\nmov     rbp, rsp                                                       ; +0xa, 0x1003e972a\npush    r15                                                            ; +0xd, 0x1003e972d\npush    r14                                                            ; +0xf, 0x1003e972f\npush    r13                                                            ; +0x11, 0x1003e9731\npush    r12                                                            ; +0x13, 0x1003e9733\npush    rbx                                                            ; +0x15, 0x1003e9735\npush    rax                                                            ; +0x16, 0x1003e9736\nmov     rbx, rsi                                                       ; +0x17, 0x1003e9737\nmov     r14, rdi                                                       ; +0x1a, 0x1003e973a\nlea     r15, [rbp-2Ch]                                                 ; +0x1d, 0x1003e973d\nmov     r12d, 45h ; 'E'                                                ; +0x21, 0x1003e9741\nnop     word ptr [rax+rax+00000000h]                                   ; +0x27, 0x1003e9747\nmov     rdi, rbx                                                       ; +0x30, 0x1003e9750\nmov     rsi, r15                                                       ; +0x33, 0x1003e9753\nxor     edx, edx                                                       ; +0x36, 0x1003e9756\nxor     ecx, ecx                                                       ; +0x38, 0x1003e9758\nxor     r8d, r8d                                                       ; +0x3a, 0x1003e975a\ncall    __ZN4FMOD5Sound12getOpenStateEP14FMOD_OPENSTATEPjPbS4_; FMOD::Sound::getOpenState(FMOD_OPENSTATE *,uint *,bool *,bool *) ; +0x3d, 0x1003e975d\nmov     [r14+210h], eax                                                ; +0x42, 0x1003e9762\nmov     ecx, [rbp-2Ch]                                                 ; +0x49, 0x1003e9769\ncmp     ecx, 6                                                         ; +0x4c, 0x1003e976c\nja      short loc_1003E9790                                            ; +0x4f, 0x1003e976f\nbt      r12d, ecx                                                      ; +0x51, 0x1003e9771\nmov     eax, ecx                                                       ; +0x55, 0x1003e9775\njnb     short loc_1003E9790                                            ; +0x57, 0x1003e9777\nmov     r13d, eax                                                      ; +0x59, 0x1003e9779\ncmp     ecx, 6                                                         ; +0x5c, 0x1003e977c\nja      short loc_1003E9750                                            ; +0x5f, 0x1003e977f\nbt      r12d, ecx                                                      ; +0x61, 0x1003e9781\nmov     r13d, eax                                                      ; +0x65, 0x1003e9785\njnb     short loc_1003E9750                                            ; +0x68, 0x1003e9788\njmp     short loc_1003E979D                                            ; +0x6a, 0x1003e978a\nalign 10h                                                              ; +0x6c, 0x1003e978c\nmov     eax, r13d                                                      ; +0x70, 0x1003e9790\nmov     r13d, eax                                                      ; +0x73, 0x1003e9793\ncmp     ecx, 6                                                         ; +0x76, 0x1003e9796\njbe     short loc_1003E9781                                            ; +0x79, 0x1003e9799\njmp     short loc_1003E9750                                            ; +0x7b, 0x1003e979b\nadd     rsp, 8                                                         ; +0x7d, 0x1003e979d\npop     rbx                                                            ; +0x81, 0x1003e97a1\npop     r12                                                            ; +0x82, 0x1003e97a2\npop     r13                                                            ; +0x84, 0x1003e97a4\npop     r14                                                            ; +0x86, 0x1003e97a6\npop     r15                                                            ; +0x88, 0x1003e97a8\npop     rbp                                                            ; +0x8a, 0x1003e97aa\nretn                                                                   ; +0x8b, 0x1003e97ab\nmov     eax, 2                                                         ; +0x8c, 0x1003e97ac\nretn                                                                   ; +0x91, 0x1003e97b1", "xrefs": [], "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"}