Function at 0x18005e1d0
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 0x18005e4d0
cmp eax, 6
je 0x18005e4d0
cmp eax, 7
je 0x18005e4d0
cmp eax, 8
je 0x18005e4d0
cmp qword [rcx + 0x18], 0xffffffffffffffff
jne 0x18005e21c
cmp qword [rcx + 0x20], 0
je 0x18005e221
test r9, r9
jne 0x18005e231
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 0x18005e254
mov dword [r12], esi
test r8d, 0x7ff
je 0x18005e267
mov eax, 0x80004001
jmp 0x18005e303
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 0x18005e31e
cmp dword [rdi + 0x38], 0xa
jne 0x18005e2bc
mov rcx, qword [rdi + 0x18]
mov r9d, r14d
shr rbx, 0xb
shr r9d, 0xb
mov r8d, ebx
mov rdx, r13
call fcn.180065450
test eax, eax
jne 0x18005e4b3
jmp 0x18005e37e
mov eax, dword [rdi + 0x34]
add rax, rbx
mov qword [rsp + 0x70], rax
test r14d, r14d
je 0x18005e2ea
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.18005e4e0
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.180063790
mov rdx, rax
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x18005e358
lea rcx, [rdi + 0x418]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x8007000e
jmp 0x18005e2f9
cmp dword [rdi + 0x38], 0xa
jne 0x18005e395
mov r15d, dword [rsp + 0x70]
mov rcx, qword [rdi + 0x18]
shr rbx, 0xb
mov r9d, r15d
mov r8d, ebx
call fcn.180065450
test eax, eax
jne 0x18005e469
lea rcx, [rdi + 0x418]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x80004005
jmp 0x18005e2f9
mov eax, dword [rdi + 0x28]
shr rbx, 0xb
imul rbx, rax
mov eax, dword [rdi + 0x34]
add rbx, rax
test r15d, r15d
je 0x18005e45d
mov rcx, qword [rdi + 0x20]
test rcx, rcx
je 0x18005e3cf
mov r8, rdx
mov r9d, r15d
mov rdx, rbx
mov qword [rsp + 0x20], rsi
call fcn.180013270
mov ebx, eax
jmp 0x18005e439
mov rcx, qword [rdi + 0x18]
cmp rcx, 0xffffffffffffffff
jne 0x18005e3f2
lea rcx, [rdi + 0x418]
mov ebx, 0x80004005
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
jmp 0x18005e2f9
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x18005e40e
call fcn.180003220
mov ebx, eax
jmp 0x18005e439
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 0x18005e456
call fcn.180003220
mov ebx, eax
test ebx, ebx
js 0x18005e442
cmp ebx, 1
jne 0x18005e464
lea rcx, [rdi + 0x418]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
jmp 0x18005e2f9
mov r15d, dword [rsp + 0x70]
jmp 0x18005e469
mov r15d, dword [rsp + 0x70]
jmp 0x18005e469
mov r15d, dword [rsp + 0x70]
test r15d, r15d
je 0x18005e4b3
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.1800785c0
inc esi
add r13, 0x800
cmp esi, r15d
jb 0x18005e480
mov r12, qword [rsp + 0x90]
lea rcx, [rdi + 0x418]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test r12, r12
je 0x18005e4c9
mov dword [r12], r14d
xor eax, eax
jmp 0x18005e2f9
xor eax, eax
add rsp, 0x48
pop r14
pop r13
pop rdi
pop rbx
ret