Function at 0x180017b70
Capabilities:
Read file on windows

Disassembly:
push rbx
push rdi
push r13
push r14
sub rsp, 0x48
mov eax, dword [rcx + 0x38]
mov r13, r9
mov r14d, r8d
mov rbx, rdx
mov rdi, rcx
cmp eax, 5
je 0x180017e70
cmp eax, 6
je 0x180017e70
cmp eax, 7
je 0x180017e70
cmp eax, 8
je 0x180017e70
cmp qword [rcx + 0x18], 0xffffffffffffffff
jne 0x180017bbc
cmp qword [rcx + 0x20], 0
je 0x180017bc1
test r9, r9
jne 0x180017bd1
mov eax, 0x80004005
add rsp, 0x48
pop r14
pop r13
pop rdi
pop rbx
ret
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x88], r12
mov r12, qword [rsp + 0x90]
xor esi, esi
test r12, r12
je 0x180017bf4
mov dword [r12], esi
test r8d, 0x7ff
je 0x180017c07
mov eax, 0x80004001
jmp 0x180017ca3
add rcx, 0x418
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x40], r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r15d, dword [rdi + 0x28]
cmp r15d, 0x800
jne 0x180017cbe
cmp dword [rdi + 0x38], 0xa
jne 0x180017c5c
mov rcx, qword [rdi + 0x18]
mov r9d, r14d
shr rbx, 0xb
shr r9d, 0xb
mov r8d, ebx
mov rdx, r13
call fcn.18001ef00
test eax, eax
jne 0x180017e53
jmp 0x180017d1e
mov eax, dword [rdi + 0x34]
add rax, rbx
mov qword [rsp + 0x70], rax
test r14d, r14d
je 0x180017c8a
lea rdx, [rsp + 0x70]
mov r9d, r14d
mov r8, r13
mov rcx, rdi
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], r12
call fcn.180017e80
mov esi, eax
lea rcx, [rdi + 0x418]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov rbp, qword [rsp + 0x78]
mov r15, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x80]
mov r12, qword [rsp + 0x88]
add rsp, 0x48
pop r14
pop r13
pop rdi
pop rbx
ret
mov eax, r14d
mov rcx, rdi
shr eax, 0xb
mov dword [rsp + 0x70], eax
imul r15d, eax
mov edx, r15d
call fcn.18001d130
mov rdx, rax
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x180017cf8
lea rcx, [rdi + 0x418]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x8007000e
jmp 0x180017c99
cmp dword [rdi + 0x38], 0xa
jne 0x180017d35
mov r15d, dword [rsp + 0x70]
mov rcx, qword [rdi + 0x18]
shr rbx, 0xb
mov r9d, r15d
mov r8d, ebx
call fcn.18001ef00
test eax, eax
jne 0x180017e09
lea rcx, [rdi + 0x418]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x80004005
jmp 0x180017c99
mov eax, dword [rdi + 0x28]
shr rbx, 0xb
imul rbx, rax
mov eax, dword [rdi + 0x34]
add rbx, rax
test r15d, r15d
je 0x180017dfd
mov rcx, qword [rdi + 0x20]
test rcx, rcx
je 0x180017d6f
mov r8, rdx
mov r9d, r15d
mov rdx, rbx
mov qword [rsp + 0x20], rsi
call fcn.180013110
mov ebx, eax
jmp 0x180017dd9
mov rcx, qword [rdi + 0x18]
cmp rcx, 0xffffffffffffffff
jne 0x180017d92
lea rcx, [rdi + 0x418]
mov ebx, 0x80004005
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
jmp 0x180017c99
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x180017dae
call fcn.180003180
mov ebx, eax
jmp 0x180017dd9
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rdi + 0x18]
lea r9, [rsp + 0x30]
mov r8d, r15d
mov dword [rsp + 0x30], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180017df6
call fcn.180003180
mov ebx, eax
test ebx, ebx
js 0x180017de2
cmp ebx, 1
jne 0x180017e04
lea rcx, [rdi + 0x418]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
jmp 0x180017c99
mov r15d, dword [rsp + 0x70]
jmp 0x180017e09
mov r15d, dword [rsp + 0x70]
jmp 0x180017e09
mov r15d, dword [rsp + 0x70]
test r15d, r15d
je 0x180017e53
mov r12, qword [rsp + 0x38]
nop word [rax + rax]
mov eax, dword [rdi + 0x28]
mov edx, dword [rdi + 0x2c]
mov rcx, r13
mov r8d, 0x800
imul eax, esi
add rax, r12
add rdx, rax
call fcn.18006c2d0
inc esi
add r13, 0x800
cmp esi, r15d
jb 0x180017e20
mov r12, qword [rsp + 0x90]
lea rcx, [rdi + 0x418]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test r12, r12
je 0x180017e69
mov dword [r12], r14d
xor eax, eax
jmp 0x180017c99
xor eax, eax
add rsp, 0x48
pop r14
pop r13
pop rdi
pop rbx
ret