Function at 0x180084980
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 0x18], r8d
push rbx
push rbp
push r13
push r14
sub rsp, 0x48
xor r14d, r14d
mov rbp, rcx
mov ecx, dword [rcx + 0x48]
mov r13, rdx
mov ebx, r14d
lea eax, [rcx - 3]
cmp eax, 2
jbe 0x180084c0c
mov rax, qword [rbp + 0x60]
mov qword [rsp + 0x78], rsi
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r15
test rax, rax
jne 0x1800849dc
cmp qword [rbp + 0x38], rbx
jne 0x1800849dc
mov ecx, 0x8000ffff
call fcn.18008dee0
jmp 0x180084bb1
cmp dword [rbp + 0x40], 1
jb 0x180084c00
test rax, rax
je 0x180084be5
test byte [rbp + 8], 2
jne 0x1800849cd
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 0x180084a44
mov rdx, r14
je 0x180084a2d
mov rax, 0xffffffffffffffff
div r8
cmp rax, 1
jb 0x180084c26
mov rdx, r8
jmp 0x180084a30
mov r8, r14
mov rax, rcx
not rax
cmp rax, r8
jb 0x180084c26
add rcx, rdx
jmp 0x180084a47
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 0x180084a74
test ebx, ebx
jg 0x180084bfa
inc ebx
jmp 0x1800849f5
test ebx, ebx
jg 0x180084bfa
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 0x180084ab9
mov ecx, dword [0x180132548]
mov eax, edi
not eax
cmp eax, ecx
jb 0x180084ba4
add edi, ecx
inc ebx
test ebx, ebx
jle 0x180084a90
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 0x180084bde
mov edx, r15d
mov rcx, rbp
call fcn.180083fa0
test eax, eax
js 0x180084bae
mov rdx, qword [rbp + 0x38]
mov eax, dword [rbp + 0x48]
add rdx, r12
cmp eax, 1
je 0x180084b25
cmp eax, 6
je 0x180084b25
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 0x180084b5c
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 0x180084b60
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x180084b55
movzx eax, ax
or eax, 0x80070000
mov ecx, eax
call fcn.18008dee0
test eax, eax
js 0x180084bae
cmp esi, ebx
jge 0x180084b96
mov rcx, qword [rbp + 0x60]
mov dl, 1
call fcn.180026630
mov edx, esi
mov qword [rsp + 0x70], rax
sar edx, 3
lea rcx, [rsp + 0x70]
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 0x180084b64
test ebx, ebx
jle 0x1800849f5
mov rbx, qword [rbp + 0x38]
jmp 0x180084bb1
mov ecx, 0x80070057
call fcn.18008dee0
mov rbx, r14
mov r12, qword [rsp + 0x38]
sub r13b, bl
mov rdi, qword [rsp + 0x40]
test r13b, 3
mov rsi, qword [rsp + 0x78]
mov r15, qword [rsp + 0x30]
sete r14b
mov eax, r14d
add rsp, 0x48
pop r14
pop r13
pop rbp
pop rbx
ret
mov ecx, 0x8007000e
jmp 0x180084ba9
cmp qword [rbp + 0x20], rbx
jne 0x180084bfa
cmp qword [rbp + 0x28], rbx
jne 0x180084bfa
cmp ecx, 6
jne 0x1800849cd
mov rbx, qword [rbp + 0x38]
jmp 0x180084bb1
mov ecx, 0x80070057
call fcn.18008dee0
jmp 0x180084bb1
sub r13b, byte [rbp + 0x38]
test r13b, 3
sete r14b
mov eax, r14d
add rsp, 0x48
pop r14
pop r13
pop rbp
pop rbx
ret
mov ecx, 0x80131c36
call fcn.180025310
int3