{"type": "func", "start": 6443241296, "end": 6443241410, "name": "FMOD_OS_File_Write", "pseudocode": "// \n// FMOD_OS_File_Write from 0x1800c0f50 to 0x1800c0fc2 (114 bytes)\n// \n// 9 xrefs:\n// > sub_18003B250 @ 0x18003b3f9\n// > sub_18003B250 @ 0x18003b410\n// > sub_18003B250 @ 0x18003b427\n// > sub_18003B250 @ 0x18003b43d\n// > sub_18003B250 @ 0x18003b454\n// > sub_1800BF120 @ 0x1800bf1ed\n// > sub_1800BF560 @ 0x1800bf5ad\n// > <???> @ 0x180194348\n// > <???> @ 0x1801fdb6c\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\n__int64 __fastcall FMOD_OS_File_Write(HANDLE hFile, const void *a2, DWORD a3, char a4)\n{\n  DWORD NumberOfBytesWritten; // [rsp+30h] [rbp-18h] BYREF\n\n  NumberOfBytesWritten = 0;\n  if ( WriteFile(hFile, a2, a3, &NumberOfBytesWritten, nullptr)\n    && NumberOfBytesWritten == a3\n    && (!a4 || FlushFileBuffers(hFile)) )\n  {\n    return 0;\n  }\n  else\n  {\n    return 13;\n  }\n}", "assembly": "; \n; FMOD_OS_File_Write from 0x1800c0f50 to 0x1800c0fc2 (114 bytes)\n; \n; 9 xrefs:\n; > sub_18003B250 @ 0x18003b3f9\n; > sub_18003B250 @ 0x18003b410\n; > sub_18003B250 @ 0x18003b427\n; > sub_18003B250 @ 0x18003b43d\n; > sub_18003B250 @ 0x18003b454\n; > sub_1800BF120 @ 0x1800bf1ed\n; > sub_1800BF560 @ 0x1800bf5ad\n; > <???> @ 0x180194348\n; > <???> @ 0x1801fdb6c\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800c0f50\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800c0f55\npush    rdi                                                            ; +0xa, 0x1800c0f5a\nsub     rsp, 40h                                                       ; +0xb, 0x1800c0f5b\nxor     eax, eax                                                       ; +0xf, 0x1800c0f5f\nmovzx   esi, r9b                                                       ; +0x11, 0x1800c0f61\nlea     r9, [rsp+48h+NumberOfBytesWritten]; lpNumberOfBytesWritten     ; +0x15, 0x1800c0f65\nmov     [rsp+48h+NumberOfBytesWritten], eax                            ; +0x1a, 0x1800c0f6a\nmov     [rsp+48h+lpOverlapped], rax; lpOverlapped                      ; +0x1e, 0x1800c0f6e\nmov     ebx, r8d                                                       ; +0x23, 0x1800c0f73\nmov     rdi, rcx                                                       ; +0x26, 0x1800c0f76\ncall    cs:WriteFile                                                   ; +0x29, 0x1800c0f79\ntest    eax, eax                                                       ; +0x2f, 0x1800c0f7f\njz      short loc_1800C0FAD                                            ; +0x31, 0x1800c0f81\ncmp     [rsp+48h+NumberOfBytesWritten], ebx                            ; +0x33, 0x1800c0f83\njnz     short loc_1800C0FAD                                            ; +0x37, 0x1800c0f87\ntest    sil, sil                                                       ; +0x39, 0x1800c0f89\njz      short loc_1800C0F9B                                            ; +0x3c, 0x1800c0f8c\nmov     rcx, rdi; hFile                                                ; +0x3e, 0x1800c0f8e\ncall    cs:FlushFileBuffers                                            ; +0x41, 0x1800c0f91\ntest    eax, eax                                                       ; +0x47, 0x1800c0f97\njz      short loc_1800C0FAD                                            ; +0x49, 0x1800c0f99\nxor     eax, eax                                                       ; +0x4b, 0x1800c0f9b\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x4d, 0x1800c0f9d\nmov     rsi, [rsp+48h+arg_8]                                           ; +0x52, 0x1800c0fa2\nadd     rsp, 40h                                                       ; +0x57, 0x1800c0fa7\npop     rdi                                                            ; +0x5b, 0x1800c0fab\nretn                                                                   ; +0x5c, 0x1800c0fac\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x5d, 0x1800c0fad\nmov     eax, 0Dh                                                       ; +0x62, 0x1800c0fb2\nmov     rsi, [rsp+48h+arg_8]                                           ; +0x67, 0x1800c0fb7\nadd     rsp, 40h                                                       ; +0x6c, 0x1800c0fbc\npop     rdi                                                            ; +0x70, 0x1800c0fc0\nretn                                                                   ; +0x71, 0x1800c0fc1", "xrefs": ["sub_18003B250 @ 0x18003b3f9", "sub_18003B250 @ 0x18003b410", "sub_18003B250 @ 0x18003b427", "sub_18003B250 @ 0x18003b43d", "sub_18003B250 @ 0x18003b454", "sub_1800BF120 @ 0x1800bf1ed", "sub_1800BF560 @ 0x1800bf5ad", "<???> @ 0x180194348", "<???> @ 0x1801fdb6c"], "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"}