Function at 0x180085160
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov rbp, qword [rcx + 8]
mov rbx, r8
mov rdi, rdx
mov rax, qword [rbp + 0x60]
test rax, rax
jne 0x18008519d
cmp qword [rbp + 0x38], rax
jne 0x18008519d
mov ecx, 0x8000ffff
jmp 0x18008540d
cmp dword [rbp + 0x40], 0x10
jb 0x180085408
test rax, rax
je 0x1800853e5
test byte [rbp + 8], 2
je 0x1800851c0
mov ecx, 0x8000ffff
jmp 0x18008540d
xor edx, edx
mov eax, 0xf
div dword [0x180132548]
xor r14d, r14d
mov r13d, eax
mov ebx, r14d
test eax, eax
js 0x1800853a9
nop
mov rcx, qword [rbp + 0x60]
mov dl, 1
call fcn.180026630
mov rcx, rax
mov eax, ebx
sar eax, 3
movsxd r8, eax
test eax, eax
js 0x18008522f
mov rdx, r14
je 0x180085218
mov rax, 0xffffffffffffffff
div r8
cmp rax, 1
jb 0x18008543d
mov rdx, r8
jmp 0x18008521b
mov r8, r14
mov rax, rcx
not rax
cmp rax, r8
jb 0x18008543d
add rcx, rdx
jmp 0x180085232
add rcx, r8
mov r9b, 1
mov edx, 1
movzx r8d, r9b
call fcn.180025540
mov ecx, ebx
mov edx, 1
and ecx, 7
shl edx, cl
test byte [rax], dl
je 0x180085260
cmp ebx, r13d
jg 0x1800853a1
inc ebx
jmp 0x1800851e0
cmp ebx, r13d
jg 0x1800853a1
mov r15d, ebx
mov edi, r14d
imul r15d, dword [0x180132548]
mov esi, ebx
nop dword [rax]
mov rcx, qword [rbp + 0x60]
mov edx, ebx
call fcn.180084cb0
test eax, eax
jne 0x1800852aa
mov ecx, dword [0x180132548]
mov eax, edi
not eax
cmp eax, ecx
jb 0x1800853b7
add edi, ecx
inc ebx
cmp ebx, r13d
jle 0x180085280
mov rcx, qword [rbp + 0x38]
mov r9d, 4
mov r12d, r15d
mov r8d, 0x1000
add rcx, r12
mov edx, edi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
je 0x1800853ce
mov edx, r15d
mov rcx, rbp
call fcn.180083fa0
test eax, eax
js 0x18008542c
mov rdx, qword [rbp + 0x38]
mov eax, dword [rbp + 0x48]
add rdx, r12
cmp eax, 1
je 0x180085316
cmp eax, 6
je 0x180085316
mov rcx, qword [rbp + 0x10]
lea r9, [rsp + 0x80]
mov r8d, edi
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [0x180102408]
jmp 0x18008534d
mov rcx, qword [rbp + 0x18]
lea r9, [rsp + 0x80]
mov r8d, edi
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180085355
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x180085346
movzx eax, ax
or eax, 0x80070000
mov ecx, eax
call fcn.18008dee0
test eax, eax
js 0x18008542c
cmp esi, ebx
jge 0x180085398
nop dword [rax]
mov rcx, qword [rbp + 0x60]
mov dl, 1
call fcn.180026630
mov edx, esi
mov qword [rsp + 0x98], rax
sar edx, 3
lea rcx, [rsp + 0x98]
call fcn.180084c40
mov ecx, esi
inc esi
and ecx, 7
movzx edx, byte [rax]
bts edx, ecx
mov byte [rax], dl
cmp esi, ebx
jl 0x180085360
cmp ebx, r13d
jle 0x1800851e0
mov rdi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x90]
mov r14, qword [rbp + 0x38]
jmp 0x18008541e
mov rbx, qword [rsp + 0x90]
mov ecx, 0x80070057
mov rdi, qword [rsp + 0x88]
jmp 0x180085415
mov rbx, qword [rsp + 0x90]
mov ecx, 0x8007000e
mov rdi, qword [rsp + 0x88]
jmp 0x180085415
cmp qword [rbp + 0x20], 0
jne 0x1800853b1
cmp qword [rbp + 0x28], 0
jne 0x1800853b1
mov eax, dword [rbp + 0x48]
sub eax, 4
cmp eax, 2
jbe 0x1800853b1
xor r14d, r14d
mov ecx, 0x8000ffff
jmp 0x180085415
mov ecx, 0x80070057
mov r14, qword [rsp + 0x80]
call fcn.18008dee0
test eax, eax
js 0x18008542c
mov eax, dword [r14 + 0xc]
add eax, 0x10
mov dword [rbx], eax
xor eax, eax
mov qword [rdi], r14
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov ecx, 0x80131c36
call fcn.180025310
int3