Function at 0x140054708
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
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 eax, dword [rsp + 0xc8]
mov r10d, dword [rsp + 0xd0]
mov rbx, qword [rsp + 0xb8]
test eax, eax
mov edi, 0x200
movsxd r15, r9d
cmovne edi, eax
mov rax, qword [rsp + 0xc0]
mov r11, rdx
mov rsi, rdx
test r10d, r10d
je 0x14005477c
test rax, rax
je 0x140054767
lea rsi, [rbx + rax]
cmp edi, 1
jle 0x1400547bf
mov rax, rbx
movsxd rcx, edi
cqo
idiv rcx
sub rbx, rdx
jmp 0x14005479e
test rax, rax
je 0x140054785
lea rsi, [rbx + rax]
cmp edi, 1
jle 0x1400547bf
mov rax, rbx
movsxd rcx, edi
cqo
idiv rcx
movsxd rax, edx
mov r10, rdx
sub rbx, rax
movsxd rax, r10d
add rbx, rax
mov rax, rbx
cqo
idiv rcx
mov rcx, qword [rsp + 0x90]
movsxd rax, edx
mov rbp, rdx
sub rbx, rax
jmp 0x1400547c1
xor ebp, ebp
cmp rsi, r11
mov rax, 0xfffffffffffffe00
mov r14, rbx
cmovg rsi, r11
and r14, rax
lea rdx, [rsi + 0x1ff]
mov r13, rsi
and rdx, rax
movsxd rax, ebp
cmp rdx, r11
lea r12, [rax + rbx]
mov qword [rsp + 0x30], rax
cmovg rdx, r11
sub r13, r15
sub rdx, r14
sub r13, r12
cmp rdx, 0x7fffffff
jg 0x140054871
mov r9, r14
mov r8d, 2
call fcn.1400a7110
mov r11, rax
test rax, rax
je 0x140054871
mov r9, rax
xor r10d, r10d
sub r9, r14
add r9, r12
test r13, r13
js 0x140054856
mov rbx, qword [rsp + 0xa0]
mov r8d, r15d
mov rdx, rbx
mov rcx, r9
call fcn.140044f54
test eax, eax
je 0x14005486b
movsxd rax, edi
add r10, rax
add r9, rax
cmp r10, r13
jle 0x140054836
or rbx, 0xffffffffffffffff
mov rcx, r11
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rax, rbx
jmp 0x140054a9a
lea rbx, [r10 + r12]
jmp 0x14005485a
lea r12d, [r15 + rbp]
mov rcx, rsi
xor r8d, r8d
movsxd rax, r12d
mov rdx, rbx
mov dword [rsp + 0xd0], r12d
sub rcx, rax
mov qword [rsp + 0x98], rcx
mov rcx, qword [rsp + 0x90]
call fcn.140045f34
cmp rbx, rax
jne 0x140054a96
mov ebp, r12d
sub rsi, rbx
lea r13d, [r12 + 0x1ff]
shl ebp, 2
mov r14, 0xfffffffffffffe00
movsxd rax, ebp
cmp rax, rsi
mov eax, 0x200000
cmovg ebp, esi
and r13d, r14d
lea r12d, [rbp + 0x1ff]
and r12d, r14d
cmp r12d, eax
cmovl r12d, eax
and qword [rsp + 0xb8], 0
lea edx, [r12 + 0x100000]
lea rcx, [rsp + 0xb8]
call fcn.14004bd00
mov rsi, rax
test rax, rax
je 0x14005491a
add rsi, 0x100000
and rsi, 0xfffffffffff00000
jne 0x14005493a
cmp r12d, ebp
jl 0x140054a89
mov eax, r12d
cdq
sub eax, edx
sar eax, 1
lea r12d, [rax + 0x1ff]
and r12d, r14d
test rsi, rsi
je 0x1400548ed
cmp r12d, r13d
mov r14, rsi
jl 0x140054a89
xor ecx, ecx
xor ebp, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r15d, 0x3e8
mov rax, qword [rsp + 0x98]
cmp rbx, rax
jg 0x140054a89
mov rcx, rax
mov r13d, r12d
sub rcx, rbx
sub r13d, ebp
add rcx, 0x1ff
movsxd rax, r13d
and rcx, 0xfffffffffffffe00
cmp rcx, rax
cmovg rcx, rax
test rcx, rcx
jle 0x140054a89
and dword [rsp + 0xc8], 0
and qword [rsp + 0x20], 0
mov r8d, ecx
mov rcx, qword [rsp + 0x90]
movsxd rdx, ebp
lea r9, [rsp + 0xc8]
add rdx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400549d0
mov eax, dword [rsp + 0xc8]
test eax, eax
jg 0x1400549de
dec r15d
test r15d, r15d
jle 0x140054a73
xor eax, eax
mov ecx, dword [rsp + 0xd0]
cmp eax, r13d
cmovg eax, r13d
add eax, ebp
cmp eax, ecx
mov dword [rsp + 0xc8], eax
mov ebp, eax
jl 0x140054956
mov rsi, qword [rsp + 0x30]
sub eax, ecx
xor r10d, r10d
add eax, edi
lea r11, [rsi + r14]
cdq
idiv edi
mov r9d, eax
test eax, eax
jle 0x140054a46
mov r8d, dword [rsp + 0xa8]
mov rdx, qword [rsp + 0xa0]
mov rcx, r11
call fcn.140044f54
test eax, eax
je 0x140054a6e
movsxd rax, edi
inc r10d
add rbx, rax
add r11, rax
cmp r10d, r9d
jl 0x140054a19
imul r9d, edi
mov rsi, r14
sub ebp, r9d
test ebp, ebp
jle 0x140054956
movsxd rdx, r9d
movsxd r8, ebp
mov rcx, r14
add rdx, r14
call fcn.1400177b0
jmp 0x140054956
add rbx, rsi
jmp 0x140054a77
or rbx, 0xffffffffffffffff
lea rcx, [rsp + 0xb8]
call fcn.140044f24
jmp 0x140054863
lea rcx, [rsp + 0xb8]
call fcn.140044f24
or rax, 0xffffffffffffffff
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret