Function at 0x14009e940
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x170
mov rax, qword [0x14042d950]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov r15d, r9d
mov rbp, r8
mov r12d, edx
mov r13, rcx
call fcn.14009d190
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x14009ec28
test rax, rax
je 0x14009ec28
xor eax, eax
xor ebx, ebx
mov qword [rsp + 0x1b8], r14
mov byte [rsp + 0x58], 0
mov esi, 0xffffffa0
mov dword [rsp + 0x38], ebx
mov r14d, ebx
mov dword [rsp + 0x59], eax
mov word [rsp + 0x5d], ax
mov byte [rsp + 0x5f], al
nop
nop
nop
lea r9, [rsp + 0x38]
lea rdx, [rsp + 0x58]
mov r8d, 8
mov rcx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14009eb3f
cmp qword [rsp + 0x58], rsi
jne 0x14009eb35
mov r9d, 1
lea r8, [rsp + 0x34]
mov rcx, rdi
lea edx, [r9 + 0x1b]
mov dword [rsp + 0x34], ebx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x14009eb35
xor eax, eax
lea r9, [rsp + 0x3c]
lea rdx, [rsp + 0x48]
lea r8d, [rax + 8]
mov rcx, rdi
mov byte [rsp + 0x48], bl
mov dword [rsp + 0x49], eax
mov word [rsp + 0x4d], ax
mov byte [rsp + 0x4f], al
mov dword [rsp + 0x3c], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14009eb35
mov rax, qword [rsp + 0x48]
mov ecx, dword [r13]
cqo
idiv rcx
cmp rax, 0xffffffffffffffff
mov rsi, rax
je 0x14009eb1b
mov r9d, 1
lea r8, [rsp + 0x34]
mov rcx, rdi
lea edx, [r9 + 0xf]
mov dword [rsp + 0x34], ebx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x14009eb14
xor eax, eax
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x30]
lea r8d, [rax + 4]
mov rcx, rdi
mov byte [rsp + 0x30], bl
mov word [rsp + 0x31], ax
mov byte [rsp + 0x33], al
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14009eb0d
mov eax, dword [rsp + 0x30]
cmp eax, 0xffffffff
je 0x14009eb22
cmp r12d, eax
jne 0x14009eb30
cmp rbp, rsi
jne 0x14009eb29
mov rax, qword [rsp + 0x1d0]
mov r9, rbp
mov r8d, r12d
mov qword [rsp + 0x28], rax
mov rdx, rdi
mov rcx, r13
mov dword [rsp + 0x20], r15d
call fcn.14009cd80
test eax, eax
je 0x14009ebe6
mov esi, 0xffffffa0
mov r14d, 1
jmp 0x14009eb35
mov esi, 0xffffffa0
jmp 0x14009eb35
mov esi, 0xffffffa0
jmp 0x14009eb35
mov esi, 0xffffffa0
jmp 0x14009eb35
mov esi, 0xffffffa0
jmp 0x14009eb35
mov esi, 0xffffffa0
jmp 0x14009eb35
mov esi, 0xffffffa0
cmp dword [rsp + 0x38], ebx
jne 0x14009e9c0
mov rax, qword [rsp + 0x1d0]
mov r9, rbp
mov r8d, r12d
mov qword [rsp + 0x28], rax
mov rdx, rdi
mov rcx, r13
mov dword [rsp + 0x20], r15d
call fcn.14009e720
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, rdi
call qword [sym.imp.ntdll.dll_ZwClose]
test r14d, r14d
je 0x14009ec24
lea rcx, [rsp + 0x62]
xor edx, edx
mov r8d, 0xfe
mov word [rsp + 0x60], bx
call sub.ntdll.dll_memset
call fcn.140049400
mov rdi, qword [rax]
lea rdx, [rsp + 0x60]
mov r8d, 0x80
mov rcx, rax
call qword [rdi + 0x48]
lea rcx, [rsp + 0x60]
call fcn.14009cb10
mov eax, 1
mov r14, qword [rsp + 0x1b8]
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.140161080
add rsp, 0x170
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, rdi
call qword [sym.imp.ntdll.dll_ZwClose]
call fcn.140049470
lea rcx, str..._bcd.cpp
mov rbx, qword [rax]
mov edx, Ordinal_452
mov rdi, rax
call fcn.14009bd30
lea rdx, str._s:_Failed_to_UpdateBcdFile_in_UpdateBcd.
mov rcx, rdi
mov r8, rax
call qword [rbx + 0x10]
xor eax, eax
jmp 0x14009ebbc
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 0x14009ec65
xor ebx, ebx
jmp 0x14009ece0
xor eax, eax
lea rdx, [0x1402dfd08]
lea rcx, [rsp + 0x48]
mov r8d, 0x19b
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 0x14009eca0
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 0x14009ecd0
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
jmp 0x14009ebc4