Function at 0x140090ba0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x60
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov r14, rcx
mov rcx, qword [rcx]
mov r15, rdx
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov rdi, qword [rsp + 0x40]
mov eax, 2
lea rbx, [rdi + 0x32]
mov r12, 0xffffffffffffffff
mul rbx
cmovo rax, r12
mov rcx, rax
call sub.MFC80U.DLL_Ordinal_265
lea r8, [rbx + rbx]
xor edx, edx
mov rcx, rax
mov rsi, rax
call sub.ntdll.dll_memset
mov rcx, qword [r14]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [r14]
xor ebp, ebp
cmp rcx, r12
mov dword [rsp + 0x40], ebp
je 0x140090e7c
lea r9, [rsp + 0x40]
mov r8d, edi
mov rdx, rsi
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x40], ebp
je 0x140090e7c
mov eax, 2
mov qword [rsp + 0xb0], r13
mul rbx
cmovo rax, r12
mov rcx, rax
call sub.MFC80U.DLL_Ordinal_265
mov r8, rbx
xor edx, edx
mov rcx, rax
mov r13, rax
mov r12, rax
call sub.ntdll.dll_memset
lea rdx, [0x1402e82a8]
mov rcx, rsi
call qword [sym.imp.ntdll.dll_wcsstr]
test rax, rax
jne 0x140090cf0
mov rcx, rsi
call sub.MFC80U.DLL_Ordinal_266
mov rcx, r12
call sub.MFC80U.DLL_Ordinal_266
call fcn.140049470
lea rcx, str...configmgr.cpp
mov rbx, qword [rax]
mov edx, Ordinal_443
mov rdi, rax
call fcn.140090880
lea rdx, str._s:_Failed_to__tcsstr_DiskIndex.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
xor eax, eax
mov r13, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140161080
add rsp, 0x60
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
sub rax, rsi
mov rdx, rsi
mov rcx, r13
sar rax, 1
movsxd rbx, eax
add rbx, rbx
mov r8, rbx
call sub.ntdll.dll_memcpy
lea rdx, [rsp + 0x40]
add r13, rbx
mov rcx, r15
mov qword [rsp + 0x40], r13
call fcn.140090970
test eax, eax
jne 0x140090d66
mov rcx, rsi
call sub.MFC80U.DLL_Ordinal_266
mov rcx, r12
call sub.MFC80U.DLL_Ordinal_266
call fcn.140049470
lea rcx, str...configmgr.cpp
mov rbx, qword [rax]
mov edx, 0x1c5
mov rdi, rax
call fcn.140090880
lea rdx, str._s:_Failed_to__BeginConfigFile.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
xor eax, eax
jmp 0x140090ccc
lea rdx, [0x1402e8230]
mov rcx, rsi
call qword [sym.imp.ntdll.dll_wcsstr]
mov rbx, qword [rsp + 0x40]
shr rdi, 1
mov rcx, rax
mov rdx, rax
sub rcx, rsi
sar rcx, 1
sub edi, ecx
mov rcx, rbx
movsxd rdi, edi
add rdi, rdi
mov r8, rdi
call sub.ntdll.dll_memcpy
mov rcx, qword [r14]
add rbx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r9d, r9d
mov qword [rsp + 0x30], rbp
lea rcx, [r14 + 0x2c]
lea r8d, [r9 + 3]
mov edx, 0xc0000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
mov qword [r14], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [r14]
cmp rcx, 0xffffffffffffffff
je 0x140090e39
sub rbx, r12
lea r9, [rsp + 0x40]
mov rdx, r12
sar rbx, 1
mov dword [rsp + 0x40], ebp
mov qword [rsp + 0x20], rbp
lea r8d, [rbx + rbx]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140090e39
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, rsi
call sub.MFC80U.DLL_Ordinal_266
mov rcx, r12
call sub.MFC80U.DLL_Ordinal_266
mov eax, 1
jmp 0x140090ccc
mov rcx, rsi
call sub.MFC80U.DLL_Ordinal_266
mov rcx, r12
call sub.MFC80U.DLL_Ordinal_266
call fcn.140049470
lea rcx, str...configmgr.cpp
mov rbx, qword [rax]
mov edx, 0x1d5
mov rdi, rax
call fcn.140090880
lea rdx, str._s:_Failed_to_FileIO::Write.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
xor eax, eax
jmp 0x140090ccc
mov rcx, rsi
call sub.MFC80U.DLL_Ordinal_266
call fcn.140049470
lea rsi, [0x140434050]
mov rcx, rsi
xor edx, edx
mov r8d, 0x80
mov rbx, rax
call sub.ntdll.dll_memset
lea rcx, str...configmgr.cpp
mov edx, 0x5c
call qword [sym.imp.ntdll.dll_strrchr]
test rax, rax
mov rdi, rax
je 0x140090f33
xor eax, eax
lea rdx, [0x1402dfd08]
lea rcx, [rsp + 0x40]
mov r8d, Ordinal_431
mov byte [rsp + 0x40], bpl
mov qword [rsp + 0x41], rax
mov word [rsp + 0x49], ax
mov byte [rsp + 0x4b], al
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, rsi
sub rcx, rdx
nop
nop
nop
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rcx + rdx - 1], al
jne 0x140090f00
xor eax, eax
mov rdi, rsi
mov rcx, r12
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x40]
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x140090f20
mov rbp, rsi
mov rax, qword [rbx]
lea rdx, str._s:_Failed_to_FileIO::Read.
mov r8, rbp
mov rcx, rbx
call qword [rax + 0x10]
xor eax, eax
jmp 0x140090cd4