Function at 0x1400016e0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x50
lea rbp, [rsp + 0x50]
mov edi, edx
mov rsi, rcx
mov rax, qword [0x1400a9c40]
xor rax, rbp
mov qword [rbp - 8], rax
cmp dword [0x1400aa7c4], 0xa
jl 0x1400017ff
mov eax, dword [0x1400aa7c0]
lea ecx, [rax + 1]
imul ecx, eax
and ecx, 1
je 0x1400017ff
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x50], rax
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x28], rax
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x38], rax
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x20], rax
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x18], rax
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x28]
mov dword [rax], edi
mov rax, qword [rbp - 0x38]
mov qword [rax], rsi
mov rax, qword [rbp - 0x20]
mov rax, qword [rbp - 0x20]
mov dword [rax], 0
mov rax, qword [rbp - 0x18]
sub rsp, 0x40
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
lea rcx, [0x1400aa7e0]
mov edx, 0x80000000
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
add rsp, 0x40
mov rcx, qword [rbp - 0x18]
mov qword [rcx], rax
mov rax, qword [rbp - 0x18]
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x50], rax
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x28], rax
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x38], rax
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x20], rax
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x18], rax
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x30], rax
mov eax, 0x10
call fcn.140001d30
sub rsp, rax
mov rax, rsp
mov qword [rbp - 0x40], rax
mov rax, qword [rbp - 0x28]
mov dword [rax], edi
mov rax, qword [rbp - 0x38]
mov qword [rax], rsi
mov rax, qword [rbp - 0x20]
mov rax, qword [rbp - 0x20]
mov dword [rax], 0
mov rax, qword [rbp - 0x18]
sub rsp, 0x40
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
lea rcx, [0x1400aa7e0]
mov edx, 0x80000000
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
add rsp, 0x40
mov rcx, qword [rbp - 0x18]
mov qword [rcx], rax
mov rax, qword [rbp - 0x18]
cmp qword [rax], 0xffffffffffffffff
sete byte [rbp - 9]
cmp byte [rbp - 9], 0
je 0x14000190e
mov rax, qword [rbp - 0x50]
mov dword [rax], 0
jmp 0x140001a2d
mov rsi, qword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x140001937
mov rax, qword [rbp - 0x40]
mov rax, qword [rbp - 0x30]
mov eax, dword [rax]
mov dword [rbp - 0x44], eax
cmp dword [rbp - 0x44], 0
jne 0x140001a0e
mov rax, qword [rbp - 0x28]
cmp dword [rax], 0
jle 0x140001a0e
mov rax, qword [rbp - 0x40]
mov rax, qword [rbp - 0x28]
mov r8d, dword [rax]
mov rax, qword [rbp - 0x38]
mov rdx, qword [rax]
mov rax, qword [rbp - 0x18]
mov rcx, qword [rax]
mov r9, qword [rbp - 0x20]
sub rsp, 0x30
mov qword [rsp + 0x20], 0
call rsi
add rsp, 0x30
mov rcx, qword [rbp - 0x40]
mov dword [rcx], eax
mov rax, qword [rbp - 0x40]
cmp dword [rax], 0
je 0x1400019d0
mov rax, qword [rbp - 0x20]
mov eax, dword [rax]
mov rcx, qword [rbp - 0x38]
add rax, qword [rcx]
mov rcx, qword [rbp - 0x38]
mov qword [rcx], rax
mov rax, qword [rbp - 0x20]
mov rcx, qword [rbp - 0x28]
mov ecx, dword [rcx]
sub ecx, dword [rax]
mov rax, qword [rbp - 0x28]
mov dword [rax], ecx
mov rax, qword [rbp - 0x30]
mov dword [rax], 0
cmp dword [0x1400aa7cc], 0xa
jge 0x1400019e7
jmp 0x140001920
mov rax, qword [rbp - 0x30]
mov dword [rax], 3
cmp dword [0x1400aa7cc], 0xa
jl 0x140001920
mov eax, dword [0x1400aa7c8]
lea ecx, [rax + 1]
imul ecx, eax
and ecx, 1
je 0x140001920
mov rax, qword [rbp - 0x40]
mov rax, qword [rbp - 0x30]
mov eax, dword [rax]
mov dword [rbp - 0x44], eax
jmp 0x140001920
mov rax, qword [rbp - 0x18]
mov rcx, qword [rax]
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x20
mov rax, qword [rbp - 0x50]
mov dword [rax], 1
mov rax, qword [rbp - 0x30]
mov dword [rax], 1
mov rax, qword [rbp - 0x18]
mov rax, qword [rbp - 0x20]
mov rax, qword [rbp - 0x50]
mov esi, dword [rax]
mov rcx, qword [rbp - 8]
xor rcx, rbp
sub rsp, 0x20
call fcn.140001d90
add rsp, 0x20
mov eax, esi
mov rsp, rbp
pop rdi
pop rsi
pop rbp
ret