Function at 0x14005f004
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
mov r12, qword [rsp + 0xe8]
mov r10, r8
mov r11, rcx
test r12, r12
mov esi, 0x200
sets r15b
test r15b, r15b
je 0x14005f045
neg r12
mov eax, dword [rsp + 0xd0]
mov ecx, dword [rsp + 0xd8]
mov rdi, qword [rsp + 0xc0]
test eax, eax
mov rbp, r8
cmovne esi, eax
mov rax, qword [rsp + 0xc8]
test ecx, ecx
je 0x14005f08d
test rax, rax
je 0x14005f078
lea rbp, [rdi + rax]
cmp esi, 1
jle 0x14005f0c8
mov rax, rdi
movsxd r8, esi
cqo
idiv r8
sub rdi, rdx
jmp 0x14005f0af
test rax, rax
je 0x14005f096
lea rbp, [rdi + rax]
cmp esi, 1
jle 0x14005f0c8
mov rax, rdi
movsxd r8, esi
cqo
idiv r8
movsxd rax, edx
mov rcx, rdx
sub rdi, rax
movsxd rax, ecx
add rdi, rax
mov rax, rdi
cqo
idiv r8
movsxd rax, edx
mov r14, rdx
sub rdi, rax
jmp 0x14005f0cb
xor r14d, r14d
movsxd r8, dword [rsp + 0xb0]
cmp rbp, r10
mov rax, 0xfffffffffffffe00
cmovg rbp, r10
mov rcx, rdi
mov qword [rsp + 0xe8], r8
and rcx, rax
lea rdx, [rbp + 0x1ff]
mov r13, rbp
and rdx, rax
movsxd rax, r14d
mov qword [rsp + 0x38], rcx
cmp rdx, r10
lea r9, [rax + rdi]
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0xe0]
cmovg rdx, r10
sub r13, r8
xor ebx, ebx
sub r13, r9
mov qword [rsp + 0xc0], r9
mov r10, r8
test rax, rax
jne 0x14005f17f
sub rdx, rcx
mov r9, rcx
mov rcx, qword [rsp + 0x98]
lea r8d, [rbx + 2]
call fcn.1400bf510
mov r9, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x38]
mov r8d, dword [rsp + 0xb0]
mov r11, qword [rsp + 0x90]
mov r10, qword [rsp + 0xe8]
mov rbx, rax
test rax, rax
je 0x14005f257
mov rbp, r9
xor edi, edi
sub rbp, rcx
add rbp, rax
test r15b, r15b
je 0x14005f1ae
cmp esi, 1
mov rdi, r13
jle 0x14005f1a9
movsxd rcx, esi
mov rax, r13
cqo
idiv rcx
mov rdi, rax
imul rdi, rcx
add rbp, rdi
neg esi
or r14, 0xffffffffffffffff
cmp rdi, r13
jg 0x14005f525
mov r15, qword [rsp + 0xa8]
test rdi, rdi
js 0x14005f525
mov r8, r10
mov rdx, r15
mov rcx, rbp
call fcn.14004f594
test eax, eax
jne 0x14005f20d
test r11, r11
je 0x14005f23e
lea rdx, [rdi + r9]
mov rcx, r11
call fcn.14005ee50
xor r14d, r14d
test r12, r12
jle 0x14005f1fd
sub r12, 1
je 0x14005f229
mov r10, qword [rsp + 0xe8]
mov r9, qword [rsp + 0xc0]
movsxd rax, esi
add rdi, rax
add rbp, rax
cmp rdi, r13
jg 0x14005f525
mov r11, qword [rsp + 0x90]
jmp 0x14005f1c3
test rbx, rbx
je 0x14005f237
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
xor eax, eax
jmp 0x14005f536
add rdi, r9
test rbx, rbx
je 0x14005f24f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rax, rdi
jmp 0x14005f536
add r14d, r8d
mov rcx, rbp
movsxd rax, r14d
mov dword [rsp + 0xd8], r14d
sub rcx, rax
mov qword [rsp + 0x38], rcx
test r15b, r15b
je 0x14005f28f
test rbx, rbx
je 0x14005f283
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rax, 0xffffffff80070057
jmp 0x14005f536
mov rcx, qword [rsp + 0x98]
xor r8d, r8d
mov rdx, rdi
call fcn.140050964
cmp rdi, rax
je 0x14005f2be
test rbx, rbx
je 0x14005f2b5
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
or rax, 0xffffffffffffffff
jmp 0x14005f536
sub rbp, rdi
mov r13d, r14d
shl r13d, 2
movsxd rax, r13d
cmp rax, rbp
mov eax, 0x200000
cmovg r13d, ebp
add r14d, 0x1ff
and r14d, 0xfffffe00
lea r15d, [r13 + 0x1ff]
and r15d, 0xfffffe00
cmp r15d, eax
cmovl r15d, eax
and qword [rsp + 0xc0], 0
lea eax, [r15 + 0x100000]
lea rcx, [rsp + 0xc0]
movsxd rdx, eax
call fcn.140056fe0
mov rbp, rax
test rax, rax
je 0x14005f332
add rbp, 0x100000
and rbp, 0xfffffffffff00000
jne 0x14005f356
cmp r15d, r13d
jl 0x14005f514
mov eax, r15d
cdq
sub eax, edx
sar eax, 1
lea r15d, [rax + 0x1ff]
and r15d, 0xfffffe00
test rbp, rbp
je 0x14005f303
cmp r15d, r14d
mov qword [rsp + 0x30], rbp
jl 0x14005f514
xor ecx, ecx
xor r14d, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov dword [rsp + 0xd0], 0x3e8
mov rax, qword [rsp + 0x38]
cmp rdi, rax
jg 0x14005f514
mov rcx, rax
mov r13d, r15d
sub rcx, rdi
sub r13d, r14d
add rcx, 0x1ff
movsxd rax, r13d
and rcx, 0xfffffffffffffe00
cmp rcx, rax
cmovg rcx, rax
test rcx, rcx
jle 0x14005f514
and dword [rsp + 0xb0], 0
and qword [rsp + 0x20], 0
mov r8d, ecx
mov rcx, qword [rsp + 0x98]
movsxd rdx, r14d
lea r9, [rsp + 0xb0]
add rdx, rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14005f3f1
mov eax, dword [rsp + 0xb0]
test eax, eax
jg 0x14005f40b
mov eax, dword [rsp + 0xd0]
dec eax
mov dword [rsp + 0xd0], eax
test eax, eax
jle 0x14005f514
xor eax, eax
mov edx, dword [rsp + 0xd8]
cmp eax, r13d
cmovg eax, r13d
add eax, r14d
cmp eax, edx
mov dword [rsp + 0xb0], eax
mov r14d, eax
jl 0x14005f37a
mov rax, qword [rsp + 0x30]
mov r9, qword [rsp + 0xa0]
xor ebp, ebp
lea rcx, [r9 + rax]
mov eax, r14d
sub eax, edx
mov qword [rsp + 0xe0], rcx
add eax, esi
cdq
idiv esi
mov r13d, eax
test eax, eax
jle 0x14005f4bf
mov r8, qword [rsp + 0xe8]
mov rdx, qword [rsp + 0xa8]
call fcn.14004f594
test eax, eax
jne 0x14005f49f
mov rax, qword [rsp + 0x90]
test rax, rax
je 0x14005f4ff
lea rdx, [r9 + rdi]
mov rcx, rax
call fcn.14005ee50
test r12, r12
jle 0x14005f497
sub r12, 1
je 0x14005f4ed
mov r9, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0xe0]
movsxd rax, esi
inc ebp
add rcx, rax
add rdi, rax
cmp ebp, r13d
mov qword [rsp + 0xe0], rcx
jl 0x14005f45a
mov rax, qword [rsp + 0x30]
imul r13d, esi
sub r14d, r13d
mov rbp, rax
test r14d, r14d
jle 0x14005f37a
movsxd rdx, r13d
movsxd r8, r14d
mov rcx, rax
add rdx, rax
call fcn.14001a968
jmp 0x14005f37a
lea rcx, [rsp + 0xc0]
call fcn.14004f564
jmp 0x14005f229
lea rcx, [rsp + 0xc0]
add rdi, r9
call fcn.14004f564
jmp 0x14005f241
lea rcx, [rsp + 0xc0]
call fcn.14004f564
or r14, 0xffffffffffffffff
test rbx, rbx
je 0x14005f533
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rax, r14
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret