Function at 0x140001650
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r13
sub rsp, 0x2b0
mov rax, qword [0x1401620c0]
xor rax, rsp
mov qword [rsp + 0x2a0], rax
xor r13d, r13d
mov esi, edx
mov rbp, rcx
mov edi, r13d
or rbx, 0xffffffffffffffff
cmp edi, esi
ja 0x1400017f8
mov qword [rsp + 0x30], r13
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, rbp
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
test esi, esi
mov rbx, rax
je 0x1400016ca
cmp rax, 0xffffffffffffffff
jne 0x1400016ca
lea ecx, [rax + 0x65]
call qword [sym.imp.KERNEL32.dll_Sleep]
add edi, 0x64
cmp rbx, 0xffffffffffffffff
je 0x140001686
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x260]
mov r8d, 0x40
mov rcx, rbx
mov qword [rsp + 0x2d8], r12
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [rsp + 0x29c]
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x50]
mov r8d, pe_nt_image_headers64
mov rcx, rbx
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [rsp + 0x54], 0x8664
je 0x140001809
mov ecx, dword [rsp + 0xa0]
call fcn.14008c4a0
mov r8d, dword [rsp + 0xa0]
xor edx, edx
mov rcx, rax
mov rbp, rax
call fcn.1400c2840
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov r8d, dword [rsp + 0xa4]
lea r9, [rsp + 0x40]
mov rdx, rbp
mov rcx, rbx
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd r12, dword [rbp + 0x3c]
mov esi, r13d
add r12, rbp
cmp word [r12 + 6], si
movzx eax, word [r12 + 0x14]
jbe 0x1400018f3
lea rdi, [rax + r12 + 0x2c]
nop
mov edx, dword [rdi]
test edx, edx
je 0x1400017e2
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [rdi - 8]
mov r8d, dword [rdi - 4]
lea r9, [rsp + 0x40]
add rdx, rbp
mov rcx, rbx
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [r12 + 6]
add esi, 1
add rdi, 0x28
cmp esi, eax
jb 0x1400017b0
jmp 0x1400018f3
cmp rbx, 0xffffffffffffffff
jne 0x1400016d3
xor eax, eax
jmp 0x140001907
mov edx, dword [rsp + 0x29c]
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x150]
mov r8d, 0x108
mov rcx, rbx
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rsp + 0x1a0]
call fcn.14008c4a0
mov r8d, dword [rsp + 0x1a0]
xor edx, edx
mov rcx, rax
mov rbp, rax
call fcn.1400c2840
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov r8d, dword [rsp + 0x1a4]
lea r9, [rsp + 0x40]
mov rdx, rbp
mov rcx, rbx
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd r12, dword [rbp + 0x3c]
mov esi, r13d
add r12, rbp
cmp word [r12 + 6], si
movzx eax, word [r12 + 0x14]
jbe 0x1400018f3
lea rdi, [rax + r12 + 0x2c]
nop
mov edx, dword [rdi]
test edx, edx
je 0x1400018e2
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [rdi - 8]
mov r8d, dword [rdi - 4]
lea r9, [rsp + 0x40]
add rdx, rbp
mov rcx, rbx
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [r12 + 6]
add esi, 1
add rdi, 0x28
cmp esi, eax
jb 0x1400018b0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12, qword [rsp + 0x2d8]
mov rax, rbp
mov rcx, qword [rsp + 0x2a0]
xor rcx, rsp
call fcn.1400c2a20
lea r11, [rsp + 0x2b0]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop rdi
pop rsi
ret