Function at 0x18005b420
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x278
mov rax, qword [0x18010f050]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rsi, rcx
mov r13, r8
mov r12, rdx
lea rcx, [rsp + 0x61]
xor ebx, ebx
xor edx, edx
mov r8d, 0x1ff
mov rdi, r9
mov byte [rsp + 0x60], bl
call fcn.1800795c0
cmp r12, 0xffffffffffffffff
je 0x18005b750
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x18005b536
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x60]
mov r8d, 0x200
mov rcx, r12
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18005b522
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6f8
je 0x18005b4d2
cmp eax, 0x3e6
je 0x18005b4d2
test eax, eax
jle 0x18005b53d
movzx eax, ax
or eax, 0x80070000
jmp 0x18005b53b
lea rcx, [rsi + 0x10]
mov edx, 0x200
call fcn.180003e00
test eax, eax
js 0x18005b755
cmp eax, 1
je 0x18005b53b
mov rdx, qword [rsi + 0x10]
lea r9, [rsp + 0x30]
mov r8d, 0x200
mov rcx, r12
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18005b536
mov rdx, qword [rsi + 0x10]
lea rcx, [rsp + 0x60]
mov r8d, 0x200
call fcn.1800785c0
cmp dword [rsp + 0x30], 0x200
je 0x18005b556
mov eax, 0xe00e1001
jmp 0x18005b755
call fcn.180003220
test eax, eax
js 0x18005b755
cmp eax, 1
je 0x18005b755
mov eax, 0xe00e1001
jmp 0x18005b755
cmp dword [rsp + 0xa0], 0xbeda107f
jne 0x18005b52c
mov ecx, dword [rsp + 0xa4]
mov eax, ecx
shr eax, 0x10
cmp eax, 1
je 0x18005b583
cmp ecx, 2
je 0x18005b583
mov eax, 0xe0034001
jmp 0x18005b755
test eax, eax
jne 0x18005b5d8
mov dword [rsi + 0x68], ebx
mov r8d, dword [rsp + 0xa8]
mov r9d, dword [rsi + 0x68]
cmp r9d, 1
jne 0x18005b629
cmp r8d, 0x180
jb 0x18005b5ce
mov eax, dword [rsp + 0x1b4]
cmp eax, 0x1c8
jb 0x18005b5ce
mov ecx, dword [rsp + 0x1e0]
lea rdx, [rax + rcx*4]
mov eax, dword [rsp + 0x1b8]
cmp rax, rdx
jae 0x18005b629
mov eax, 0xe0034000
jmp 0x18005b755
mov dword [rsi + 0x68], 1
cmp cx, 1
jne 0x18005b58a
mov r8d, dword [rsp + 0xa8]
cmp r8d, 0x190
jae 0x18005b592
mov r8d, 0x190
mov dword [rsp + 0x234], 0x200
mov dword [rsp + 0x228], ebx
mov dword [rsp + 0x22c], ebx
mov dword [rsp + 0x230], ebx
mov dword [rsp + 0xa8], r8d
jmp 0x18005b592
xor eax, eax
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
test r9d, r9d
jne 0x18005b664
cmp r8d, 1
jb 0x18005b5ce
lea r9, [rsp + 0x38]
lea rdx, [rsp + 0xa8]
mov r8, r13
mov rcx, rsi
call fcn.18005b8b0
jmp 0x18005b68a
cmp dword [rsp + 0xac], 1
jb 0x18005b5ce
lea r9, [rsp + 0x38]
lea rdx, [rsp + 0xa8]
mov r8, r13
mov rcx, rsi
call fcn.18005b9e0
test eax, eax
je 0x18005b5ce
test rdi, rdi
je 0x18005b6a2
cmp qword [rdi], rbx
jne 0x18005b6a2
cmp qword [rdi + 8], rbx
je 0x18005b6d8
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x18005b6bc
test rdi, rdi
jne 0x18005b6c6
cmp qword [rcx], rbx
jne 0x18005b6bc
cmp qword [rcx + 8], rbx
je 0x18005b6d8
mov eax, 0xe0034002
jmp 0x18005b755
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x18005b6bc
mov rax, qword [rdi + 8]
cmp qword [rcx + 8], rax
jne 0x18005b6bc
cmp dword [rsi + 0x68], 1
jne 0x18005b725
lea rcx, [rdi + 0x10]
test rcx, rcx
je 0x18005b6f2
cmp qword [rcx], rbx
jne 0x18005b6f2
cmp qword [rcx + 8], rbx
je 0x18005b725
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x18005b71e
test rcx, rcx
jne 0x18005b70c
cmp qword [rdx], rbx
jne 0x18005b71e
cmp qword [rdx + 8], rbx
jmp 0x18005b71c
mov rax, qword [rcx]
cmp qword [rdx], rax
jne 0x18005b71e
mov rax, qword [rcx + 8]
cmp qword [rdx + 8], rax
je 0x18005b725
mov eax, 0xe0034003
jmp 0x18005b755
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx]
mov qword [rdi], rax
mov rax, qword [rcx + 8]
mov rcx, qword [rsp + 0x50]
mov qword [rdi + 8], rax
mov rax, qword [rcx]
mov qword [rdi + 0x10], rax
mov rax, qword [rcx + 8]
mov qword [rdi + 0x18], rax
xor eax, eax
jmp 0x18005b755
mov eax, 0x80070057
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.180076a70
add rsp, 0x278
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret