Function at 0x14009dd10
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 + 0x58], rax
mov r14d, r8d
mov r8, r9
mov r15, r9
mov rsi, rcx
call fcn.14009d3f0
cmp rax, 0xffffffffffffffff
mov r12, rax
je 0x14009dee7
test rax, rax
je 0x14009dee7
xor eax, eax
lea rdx, [rsp + 0x38]
xor ebp, ebp
mov rcx, r12
mov dword [rsp + 0x38], ebp
mov dword [rsp + 0x3c], eax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14009ddad
call fcn.140049470
lea rcx, str..._bcd.cpp
mov edx, reloc.MFC80U.DLL_Ordinal_1199
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 0x14009dfb3
mov rdi, qword [rsp + 0x38]
mov qword [rsp + 0xb0], 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 ebx, ebp
mov dword [rsp + 0x30], ebp
nop
lea r9, [rsp + 0x30]
mov r8d, 0x1000
mov rdx, rdi
mov rcx, r12
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14009de0d
mov ecx, dword [rsp + 0x30]
add rdi, rcx
add ebx, ecx
test ecx, ecx
jne 0x14009dde0
add ebx, 0xfffffff8
mov edi, ebp
je 0x14009de93
mov r8, qword [rsp + 0xc0]
mov rdx, r13
nop
mov rax, qword [rdx]
cmp rax, qword [rsi + 8]
je 0x14009de2f
cmp rax, qword [rsi + 0x18]
jne 0x14009de42
movsxd rax, edi
xor ecx, ecx
add edi, 4
mov qword [rax + r13], rcx
mov dword [rdx], r14d
add rdx, 4
mov rax, qword [rsi + 0x10]
cmp qword [rdx], rax
jne 0x14009de65
mov ecx, dword [rsi]
movsxd rax, edi
xor r9d, r9d
mov qword [rax + r13], r9
add edi, 8
imul rcx, r15
mov qword [rdx], rcx
add rdx, 8
mov rax, qword [rsi + 0x20]
cmp qword [rdx], rax
jne 0x14009de88
mov ecx, dword [rsi]
movsxd rax, edi
xor r9d, r9d
mov qword [rax + r13], r9
add edi, 8
imul rcx, r8
mov qword [rdx], rcx
add rdx, 8
add edi, 1
add rdx, 1
cmp edi, ebx
jb 0x14009de20
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], ebp
mov qword [rsp + 0x20], rbp
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 + 0xb0]
mov eax, 1
jmp 0x14009dfb5
call fcn.140049470
lea rbp, [0x140434220]
xor edx, edx
mov rcx, rbp
mov r8d, 0x80
mov rbx, 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 0x14009df24
xor ebp, ebp
jmp 0x14009dfa0
xor eax, eax
lea rdx, [0x1402dfd08]
lea rcx, [rsp + 0x48]
mov r8d, reloc.MFC80U.DLL_Ordinal_1189
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, rbp
sub rcx, rdx
nop
nop
movzx eax, byte [rdx]
add rdx, 1
test al, al
mov byte [rcx + rdx - 1], al
jne 0x14009df60
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbp
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 0x14009df90
mov rax, qword [rbx]
lea rdx, str._s:_Failed_to_GetBcdHandle_in_UpdateBcd.
mov r8, rbp
mov rcx, rbx
call qword [rax + 0x10]
xor eax, eax
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140161080
add rsp, 0x60
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret