Function at 0x180049680
Capabilities:
Read file on windows

Disassembly:
mov r11, rsp
push rbx
push rdi
push r12
push r14
sub rsp, 0x48
mov eax, dword [rcx + 0x30]
mov r12, r9
mov r14d, r8d
mov rbx, rdx
mov rdi, rcx
cmp eax, 5
je 0x180049918
cmp eax, 6
je 0x180049918
cmp eax, 7
je 0x180049918
cmp eax, 8
je 0x180049918
cmp qword [rcx + 0x18], 0xffffffffffffffff
je 0x180049908
test r9, r9
je 0x180049908
mov qword [r11 + 0x18], rsi
mov qword [r11 + 0x20], r13
mov r13, qword [rsp + 0x90]
xor esi, esi
test r13, r13
je 0x1800496ef
mov dword [r13], esi
test r8d, 0x7ff
je 0x180049702
mov eax, 0x80004001
jmp 0x1800497f6
add rcx, 0x410
mov qword [rsp + 0x78], rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [rdi + 0x20]
cmp eax, 0x800
jne 0x1800497b2
cmp dword [rdi + 0x30], 0xa
jne 0x180049777
mov rcx, qword [rdi + 0x18]
mov r9d, r14d
shr rbx, 0xb
shr r9d, 0xb
mov r8d, ebx
mov rdx, r12
call fcn.180050550
test eax, eax
jne 0x18004975d
lea rcx, [rdi + 0x410]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x80004005
jmp 0x1800497f1
lea rcx, [rdi + 0x410]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test r13, r13
je 0x180049773
mov dword [r13], r14d
xor eax, eax
jmp 0x1800497f1
mov eax, dword [rdi + 0x2c]
add rax, rbx
mov qword [rsp + 0x70], rax
test r14d, r14d
je 0x1800497a1
lea rdx, [rsp + 0x70]
mov r9d, r14d
mov r8, r12
mov rcx, rdi
mov qword [rsp + 0x20], r13
call fcn.180049930
mov esi, eax
lea rcx, [rdi + 0x410]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
jmp 0x1800497f1
mov qword [rsp + 0x40], r15
mov r15d, r14d
mov rcx, rdi
shr r15d, 0xb
imul eax, r15d
mov edx, eax
mov dword [rsp + 0x70], eax
call fcn.18004e8b0
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x180049811
lea rcx, [rdi + 0x410]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x8007000e
mov r15, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
mov r13, qword [rsp + 0x88]
add rsp, 0x48
pop r14
pop r12
pop rdi
pop rbx
ret
cmp dword [rdi + 0x30], 0xa
jne 0x180049848
mov rcx, qword [rdi + 0x18]
shr rbx, 0xb
mov r9d, r15d
mov r8d, ebx
mov rdx, rax
mov rbx, rax
call fcn.180050550
test eax, eax
jne 0x1800498ad
lea rcx, [rdi + 0x410]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x80004005
jmp 0x1800497ec
mov eax, dword [rdi + 0x20]
mov edx, dword [rdi + 0x2c]
mov rcx, qword [rdi + 0x18]
shr rbx, 0xb
xor r9d, r9d
xor r8d, r8d
imul rbx, rax
add rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x180049892
mov rbx, qword [rsp + 0x38]
mov r8d, dword [rsp + 0x70]
mov rcx, qword [rdi + 0x18]
lea r9, [rsp + 0x30]
mov rdx, rbx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1800498ad
call fcn.1800030e0
lea rcx, [rdi + 0x410]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
jmp 0x1800497ec
test r15d, r15d
je 0x1800498eb
nop word [rax + rax]
mov eax, dword [rdi + 0x20]
mov edx, dword [rdi + 0x24]
mov rcx, r12
mov r8d, 0x800
imul eax, esi
add rax, rbx
add rdx, rax
call fcn.180063290
inc esi
add r12, 0x800
cmp esi, r15d
jb 0x1800498c0
lea rcx, [rdi + 0x410]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test r13, r13
je 0x180049901
mov dword [r13], r14d
xor eax, eax
jmp 0x1800497ec
mov eax, 0x80004005
add rsp, 0x48
pop r14
pop r12
pop rdi
pop rbx
ret
xor eax, eax
add rsp, 0x48
pop r14
pop r12
pop rdi
pop rbx
ret