Function at 0x4bd160
Capabilities:
Read file via mapping

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov eax, dword [rdx]
and eax, 3
mov rbx, rcx
mov r14, rdx
cmp eax, 1
je 0x4bd380
cmp byte [rdx + 4], 0
jne 0x4bd358
mov rdi, qword [rcx + 0x180]
cmp rdi, 0xffffffffffffffff
je 0x4bd340
mov rsi, qword [r14 + 0x10]
cmp rsi, rdi
jle 0x4bd320
mov eax, dword [rbx + 0x170]
test eax, eax
je 0x4bd320
mov rcx, qword [rbx + 0x178]
lea r8d, [rax - 1]
xor edx, edx
shl r8, 4
lea rax, [rcx + 0x10]
add r8, rax
jmp 0x4bd1dc
add rax, 0x10
mov ecx, dword [rcx]
add rdx, rcx
mov rcx, rax
cmp r8, rax
jne 0x4bd1d8
sub rsi, rdi
cmp rsi, rdx
cmovg rsi, rdx
test rsi, rsi
je 0x4bd320
mov ecx, dword [0x00780de0]
mov rax, rdi
mov r8, rdi
mov ebp, dword [rbx + 0x150]
cqo
idiv rcx
mov rcx, qword [r14 + 8]
sub r8, rdx
lea rax, [rsi + rdx]
mov qword [rsp + 0x38], rdx
mov edx, 4
mov r9d, r8d
mov qword [rsp + 0x20], rax
shr r8, 0x20
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rsp + 0x30], rax
test rax, rax
je 0x4bd3a0
mov ecx, dword [rbx + 0x170]
xor r12d, r12d
xor r15d, r15d
test ecx, ecx
jne 0x4bd27d
mov r8d, 0x324
lea rdx, str.src_win_fs.c
lea rcx, str.done_read__read_size
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x4bd2ca
cmp rsi, r15
jbe 0x4bd2c5
mov eax, r12d
mov rdx, rsi
shl rax, 4
add rax, qword [rbx + 0x178]
sub rdx, r15
mov r8d, dword [rax]
mov rcx, qword [rax + 8]
mov rax, qword [rsp + 0x38]
cmp rdx, r8
cmovbe r8, rdx
lea rdx, [rax + r15]
add rdx, qword [rsp + 0x30]
add r12d, 1
mov r13, r8
call sub.msvcrt.dll_memcpy
add r15, r13
cmp dword [rbx + 0x170], r12d
ja 0x4bd278
cmp rsi, r15
jne 0x4bd258
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x4bd3a0
cmp qword [rbx + 0x180], 0xffffffffffffffff
je 0x4bd3c1
mov qword [rbx + 0x88], rsi
cmp rsi, 0xffffffffffffffff
jne 0x4bd32b
call qword [sym.imp.msvcrt.dll___doserrno]
mov ecx, dword [rax]
mov dword [rbx + 0x14c], ecx
call fcn.004bb150
cdqe
mov qword [rbx + 0x88], rax
jmp 0x4bd32b
mov qword [rbx + 0x88], 0
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdi, qword [rdx + 0x18]
mov rsi, qword [r14 + 0x10]
cmp rsi, rdi
jg 0x4bd1ac
jmp 0x4bd320
mov dword [rcx + 0x14c], 1
mov ecx, 1
call fcn.004bb150
cdqe
mov qword [rbx + 0x88], rax
jmp 0x4bd32b
mov dword [rcx + 0x14c], 5
mov ecx, 5
call fcn.004bb150
cdqe
mov qword [rbx + 0x88], rax
jmp 0x4bd32b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0x14c], eax
mov ecx, eax
call fcn.004bb150
cdqe
mov qword [rbx + 0x88], rax
jmp 0x4bd32b
add rdi, rsi
lea rcx, [0x00a09e00]
lea r12, [0x00780e00]
mov qword [r14 + 0x18], rdi
movzx edi, bpl
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, rdi
shl rax, 4
add rax, r12
mov r8, qword [rax]
test r8, r8
mov rcx, r8
setne r9b
and ecx, 0xf
jne 0x4bd49c
test r9b, r9b
je 0x4bd49c
mov r10, qword [rax + 8]
mov ecx, 0x10
mov rdx, r10
xor eax, eax
jmp 0x4bd431
add rax, 1
add rdx, 0x28
cmp rcx, rax
jbe 0x4bd4b1
cmp ebp, dword [rdx]
jne 0x4bd420
lea rax, [rax + rax*4]
lea rax, [r10 + rax*8]
test rax, rax
jne 0x4bd478
mov r13d, r8d
and r13d, 0xf
jne 0x4bd454
test r9b, r9b
jne 0x4bd4fd
shl rdi, 4
mov eax, r13d
add r8, 1
add r12, rdi
lea rax, [rax + rax*4]
mov rdx, qword [r12 + 8]
mov qword [r12], r8
lea rax, [rdx + rax*8]
mov dword [rax], ebp
nop dword [rax]
movdqu xmm0, xmmword [r14]
lea rcx, [0x00a09e00]
movups xmmword [rax + 8], xmm0
movdqu xmm1, xmmword [r14 + 0x10]
movups xmmword [rax + 0x18], xmm1
call fcn.004d4240
jmp 0x4bd2eb
mov rax, rdi
shl rax, 4
mov r10, qword [r12 + rax + 8]
test rcx, rcx
jne 0x4bd411
mov rcx, qword [r10 + 0x280]
test rcx, rcx
je 0x4bd442
nop dword [rax]
mov rdx, rcx
xor eax, eax
nop dword [rax]
cmp ebp, dword [rdx]
je 0x4bd4f0
add eax, 1
add rdx, 0x28
cmp eax, 0x10
jne 0x4bd4c8
mov rcx, qword [rcx + 0x280]
test rcx, rcx
jne 0x4bd4c0
jmp 0x4bd442
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8]
jmp 0x4bd478
mov ecx, 0x288
call fcn.004b75d0
mov rdx, rax
test rax, rax
je 0x4bd530
mov rax, rdi
shl rax, 4
add rax, r12
mov rcx, qword [rax + 8]
mov r8, qword [rax]
mov qword [rdx + 0x280], rcx
mov qword [rax + 8], rdx
jmp 0x4bd454
lea rdx, [0x0071ba8e]
mov ecx, 0xe
call fcn.004bb090
nop
nop word cs:[rax + rax]
nop dword [rax]