Function at 0x14009dfe0
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
sub rsp, 0x68
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov r14, r9
mov rbp, rcx
call fcn.14009d3f0
cmp rax, 0xffffffffffffffff
mov r12, rax
je 0x14009e1d9
test rax, rax
je 0x14009e1d9
xor eax, eax
lea rdx, [rsp + 0x38]
xor ebx, ebx
mov rcx, r12
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x3c], eax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14009e075
call fcn.140049470
lea rcx, str..._bcd.cpp
mov edx, Ordinal_1282
mov rbx, qword [rax]
mov rdi, rax
call fcn.14009bd30
lea rdx, str._s:_Failed_to_get_file_size.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
mov rcx, r12
call qword [sym.imp.ntdll.dll_ZwClose]
jmp 0x14009e2a3
mov rdi, qword [rsp + 0x38]
mov qword [rsp + 0x60], r13
lea rcx, [rdi + 0x10]
call sub.MFC80U.DLL_Ordinal_774
lea r8, [rdi + 0x10]
xor edx, edx
mov rcx, rax
mov r13, rax
call sub.ntdll.dll_memset
mov rdi, r13
mov esi, ebx
mov dword [rsp + 0x30], ebx
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov rdx, rdi
mov rcx, r12
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14009e0cf
mov ecx, dword [rsp + 0x30]
add rdi, rcx
add esi, ecx
test ecx, ecx
jne 0x14009e0a2
add esi, 0xfffffff8
mov edx, ebx
je 0x14009e188
mov rdi, qword [rsp + 0xc8]
mov r8, qword [rsp + 0xc0]
mov rcx, r13
nop
mov rax, qword [rcx]
cmp rax, qword [rbp + 8]
je 0x14009e0ff
cmp rax, qword [rbp + 0x18]
jne 0x14009e121
mov eax, dword [r14]
add edx, 0x10
add rcx, 0x10
mov dword [rcx - 0x10], eax
mov eax, dword [r14 + 4]
mov dword [rcx - 0xc], eax
mov eax, dword [r14 + 8]
mov dword [rcx - 8], eax
mov eax, dword [r14 + 0xc]
mov dword [rcx - 4], eax
mov rax, qword [rbp + 0x10]
cmp qword [rcx], rax
jne 0x14009e14f
mov eax, dword [r8]
add edx, 0x10
add rcx, 0x10
mov dword [rcx - 0x10], eax
mov eax, dword [r8 + 4]
mov dword [rcx - 0xc], eax
mov eax, dword [r8 + 8]
mov dword [rcx - 8], eax
mov eax, dword [r8 + 0xc]
mov dword [rcx - 4], eax
mov qword [rcx], rbx
mov rax, qword [rbp + 0x20]
cmp qword [rcx], rax
jne 0x14009e179
mov eax, dword [rdi]
add edx, 0x10
add rcx, 0x10
mov dword [rcx - 0x10], eax
mov eax, dword [rdi + 4]
mov dword [rcx - 0xc], eax
mov eax, dword [rdi + 8]
mov dword [rcx - 8], eax
mov eax, dword [rdi + 0xc]
mov dword [rcx - 4], eax
mov qword [rcx], rbx
add edx, 1
add rcx, 1
cmp edx, esi
jb 0x14009e0f0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov r8d, dword [rsp + 0x38]
lea r9, [rsp + 0x40]
mov rdx, r13
mov rcx, r12
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, r12
call qword [sym.imp.ntdll.dll_ZwClose]
mov r13, qword [rsp + 0x60]
mov eax, 1
jmp 0x14009e2a5
call fcn.140049470
lea rbx, [0x140434220]
xor edx, edx
mov rcx, rbx
mov r8d, 0x80
mov rsi, rax
call sub.ntdll.dll_memset
lea rcx, str..._bcd.cpp
mov edx, 0x5c
call qword [sym.imp.ntdll.dll_strrchr]
test rax, rax
mov rdi, rax
jne 0x14009e216
xor ebx, ebx
jmp 0x14009e290
xor eax, eax
lea rdx, [0x1402dfd08]
lea rcx, [rsp + 0x48]
mov r8d, 0x4f7
mov byte [rsp + 0x48], 0
mov qword [rsp + 0x49], rax
mov word [rsp + 0x51], ax
mov byte [rsp + 0x53], al
call qword [sym.imp.ntdll.dll_sprintf]
lea rdx, [rdi + 1]
mov rcx, rbx
sub rcx, rdx
nop
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rcx + rdx - 1], al
jne 0x14009e250
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
xor ecx, ecx
lea rdx, [rsp + 0x48]
nop
nop
nop
nop
movzx eax, byte [rdx + rcx]
add rcx, 1
test al, al
mov byte [rdi + rcx - 2], al
jne 0x14009e280
mov rax, qword [rsi]
lea rdx, str._s:_Failed_to_GetBcdHandle_in_UpdateBcd.
mov r8, rbx
mov rcx, rsi
call qword [rax + 0x10]
xor eax, eax
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140161080
add rsp, 0x68
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret