Function at 0x180022a40
Capabilities:
Read file on windows

Disassembly:
push rbx
push rdi
push r13
push r14
sub rsp, 0x88
mov rax, qword [0x180185680]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov r14d, r8d
mov rbx, r9
mov qword [rsp + 0x50], rbx
mov r10, rdx
mov qword [rsp + 0x40], rdx
mov rdi, rcx
test r8d, r8d
jne 0x180022a87
xor r13d, r13d
lea eax, [r8 + 1]
mov dword [r9], r13d
jmp 0x180022da3
mov r8, qword [rcx + 0x18c]
mov r11d, dword [rcx + 0xba]
mov rdx, r8
mov rcx, qword [rcx + 0x1b8]
sub rdx, rcx
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x78], rsi
mov dword [rsp + 0x38], r11d
cmp rdx, r14
jae 0x180022abf
mov r14d, r8d
sub r14d, ecx
mov r9, qword [rdi + 0x1a0]
xor edx, edx
mov rax, rcx
mov qword [rsp + 0x70], r12
div r11
mov rdx, qword [rdi + 0x1a8]
xor r13d, r13d
sub rdx, r9
mov qword [rsp + 0x68], r15
sar rdx, 4
mov r8, rax
mov rsi, r11
mov ebp, r13d
test rdx, rdx
je 0x180022b20
mov eax, r13d
nop word [rax + rax]
add rax, rax
mov rcx, qword [r9 + rax*8 + 8]
cmp r8, rcx
jb 0x180022b5a
inc ebp
sub r8, rcx
mov eax, ebp
cmp rax, rdx
jb 0x180022b00
mov rcx, qword [rdi + 0x1b8]
mov qword [rsp + 0x50], rcx
lea r8, [rsp + 0x54]
mov edx, ecx
xor r9d, r9d
mov rcx, qword [rdi + 0x178]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x180022d4f
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x180022d4f
xor eax, eax
jmp 0x180022d8c
mov edx, r8d
lea r8d, [r11 - 1]
mov ecx, ebp
add rcx, rcx
mov dword [rsp + 0x30], r8d
mov rbx, qword [r9 + rcx*8]
mov r9, qword [r9 + rcx*8 + 8]
add rbx, rdx
mov ecx, dword [rdi + 0x1b8]
sub r9, rdx
imul rbx, rsi
mov qword [rsp + 0x48], r9
add rbx, qword [rdi + 0xb2]
and ecx, r8d
je 0x180022bf3
mov eax, ecx
sub esi, ecx
add rbx, rax
mov r8, r10
lea rax, [rsp + 0x34]
cmp esi, r14d
mov rdx, rbx
mov qword [rsp + 0x20], rax
cmovae esi, r14d
mov rcx, rdi
mov r9d, esi
call fcn.180019000
test eax, eax
je 0x180022b53
mov r10, qword [rsp + 0x40]
sub r14d, esi
mov r9, qword [rsp + 0x48]
mov r13d, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x30]
mov r11d, dword [rsp + 0x38]
mov eax, esi
add r10, rax
add rbx, rax
dec r9
mov qword [rsp + 0x40], r10
mov qword [rsp + 0x48], r9
xor edx, edx
not r8d
and r8d, r14d
mov eax, r8d
mov dword [rsp + 0x30], r8d
div r11d
mov r12d, eax
test r8d, r8d
je 0x180022cf7
nop dword [rax]
nop word [rax + rax]
mov ecx, r12d
mov r15d, r9d
cmp rcx, r9
cmovb r15d, r12d
mov esi, r15d
imul esi, r11d
test esi, esi
je 0x180022c92
lea rax, [rsp + 0x34]
mov r9d, esi
mov r8, r10
mov qword [rsp + 0x20], rax
mov rdx, rbx
mov rcx, rdi
call fcn.180019000
test eax, eax
je 0x180022b53
mov r8d, dword [rsp + 0x30]
sub r12d, r15d
mov r10, qword [rsp + 0x40]
sub r8d, esi
add r13d, dword [rsp + 0x34]
mov eax, esi
add r10, rax
mov dword [rsp + 0x30], r8d
mov qword [rsp + 0x40], r10
sub r14d, esi
je 0x180022d1a
mov r9, qword [rsp + 0x48]
mov r11d, dword [rsp + 0x38]
test r12d, r12d
je 0x180022cbc
mov rax, qword [rdi + 0x1a0]
inc ebp
mov ebx, dword [rdi + 0xba]
mov ecx, ebp
add rcx, rcx
mov r9, qword [rax + rcx*8 + 8]
imul rbx, qword [rax + rcx*8]
mov qword [rsp + 0x48], r9
jmp 0x180022ce7
mov eax, r15d
cmp rax, r9
jae 0x180022ccb
mov eax, esi
add rbx, rax
jmp 0x180022cee
mov rbx, qword [rdi + 0x1a0]
inc ebp
mov eax, dword [rdi + 0xba]
mov ecx, ebp
add rcx, rcx
mov rbx, qword [rbx + rcx*8]
imul rbx, rax
add rbx, qword [rdi + 0xb2]
test r8d, r8d
jne 0x180022c20
test r14d, r14d
je 0x180022d1a
lea rax, [rsp + 0x34]
mov r9d, r14d
mov r8, r10
mov qword [rsp + 0x20], rax
mov rdx, rbx
mov rcx, rdi
call fcn.180019000
add r13d, r14d
mov rax, qword [rsp + 0x50]
mov dword [rax], r13d
mov rcx, qword [rdi + 0x18c]
mov eax, r13d
add qword [rdi + 0x1b8], rax
mov rax, qword [rdi + 0x1b8]
cmp rax, rcx
cmova rax, rcx
mov qword [rdi + 0x1b8], rax
mov eax, 1
jmp 0x180022d8c
mov rdx, qword [rsp + 0x40]
mov r9, rbx
mov rcx, qword [rdi + 0x178]
mov r8d, r14d
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rbx]
add qword [rdi + 0x1b8], rcx
mov rcx, qword [rdi + 0x18c]
cmp qword [rdi + 0x1b8], rcx
jbe 0x180022d8c
mov qword [rdi + 0x1b8], rcx
mov r12, qword [rsp + 0x70]
mov r15, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.18010faf0
add rsp, 0x88
pop r14
pop r13
pop rdi
pop rbx
ret