Function at 0x140003ce0
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push rbx
push rsi
push rdi
push r13
sub rsp, 0x58
mov rax, qword [0x14001d008]
xor rax, rsp
mov qword [rsp + 0x40], rax
cmp byte [rcx], 0
mov rsi, rcx
je 0x140003d4b
cmp byte [rcx + 1], 0
je 0x140003d7d
mov rcx, qword [rcx + 8]
mov r9d, 2
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [rsi], 0
je 0x140003d51
cmp byte [rsi + 1], 0
je 0x140003d43
mov rcx, qword [rsi + 8]
mov r9d, 1
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, eax
sub edi, dword [rsi + 0x14]
jmp 0x140003d54
xor edi, edi
mov dword [rsp + 0x34], edi
jmp 0x140003d65
mov eax, dword [rcx + 0x20]
mov dword [rcx + 0x24], eax
mov edi, dword [rsi + 0x24]
mov ebx, 0xffff
mov dword [rsp + 0x34], edi
mov dword [rsp + 0x38], ebx
cmp edi, ebx
jae 0x140003d6b
mov ebx, edi
mov dword [rsp + 0x38], ebx
mov ecx, 0x404
call fcn.140007c34
mov r13, rax
test rax, rax
jne 0x140003d84
xor eax, eax
jmp 0x140003f26
mov qword [rsp + 0x98], r14
mov r14d, 4
mov qword [rsp + 0x50], r15
xor r15d, r15d
mov dword [rsp + 0x30], r15d
cmp ebx, r14d
jbe 0x140003f0e
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x90], r12
nop dword [rax + rax]
lea eax, [r14 + 0x400]
mov r12d, edi
cmp eax, ebx
mov r14d, ebx
cmovbe r14d, eax
mov eax, 0x404
sub r12d, r14d
mov ebp, r14d
cmp r14d, eax
cmova ebp, eax
cmp byte [rsi], 0
je 0x140003e3d
cmp byte [rsi + 1], 0
je 0x140003efe
mov edx, dword [rsi + 0x14]
xor r9d, r9d
mov rcx, qword [rsi + 8]
add edx, r12d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [rsi], 0
mov r8d, ebp
mov r15d, ebp
je 0x140003e47
mov rcx, qword [rsi + 8]
lea r9, [rsp + 0x3c]
mov rdx, r13
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140003e37
mov byte [rsi + 0x10], 1
mov eax, dword [rsp + 0x3c]
jmp 0x140003e7c
mov dword [rsi + 0x24], r12d
mov r8d, ebp
mov r15d, ebp
mov edi, dword [rsi + 0x24]
mov ecx, dword [rsi + 0x20]
mov edx, edi
sub ecx, edi
lea eax, [rdi + rbp]
cmp eax, dword [rsi + 0x20]
cmovbe ecx, r8d
add rdx, qword [rsi + 0x18]
mov ebx, ecx
mov r8d, ecx
mov rcx, r13
call fcn.140007840
lea ecx, [rbx + rdi]
mov eax, ebx
mov ebx, dword [rsp + 0x38]
mov edi, dword [rsp + 0x34]
mov dword [rsi + 0x24], ecx
xor edx, edx
div r15
cmp rax, 1
jne 0x140003ef9
lea edx, [rbp - 3]
movsxd rax, edx
test edx, edx
jle 0x140003ed9
add rax, 3
mov r8, 0xfffffffffffffffd
add rax, r13
sub r8, r13
nop dword [rax]
nop word [rax + rax]
mov rcx, rax
lea edx, [rdx - 1]
dec rax
cmp byte [rax - 3], 0x50
jne 0x140003ed0
cmp byte [rcx - 3], 0x4b
jne 0x140003ed0
cmp byte [rax - 1], 5
jne 0x140003ed0
cmp byte [rax], 6
je 0x140003ee9
lea rcx, [r8 + rax]
test rcx, rcx
jg 0x140003eb0
mov r15d, dword [rsp + 0x30]
cmp r14d, ebx
jb 0x140003dc0
jmp 0x140003efe
lea r15d, [rdx + r12]
mov dword [rsp + 0x30], r15d
test r15d, r15d
jne 0x140003efe
jmp 0x140003ede
mov r15d, dword [rsp + 0x30]
mov rbp, qword [rsp + 0x88]
mov r12, qword [rsp + 0x90]
mov rcx, r13
call fcn.140007c20
mov r14, qword [rsp + 0x98]
mov eax, r15d
mov r15, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140005d90
add rsp, 0x58
pop r13
pop rdi
pop rsi
pop rbx
ret