Function at 0x140148a50
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 0x140148c70
cmp byte [rdx + 4], 0
jne 0x140148c48
mov rdi, qword [rcx + 0x180]
cmp rdi, 0xffffffffffffffff
je 0x140148c30
mov rsi, qword [r14 + 0x10]
cmp rsi, rdi
jle 0x140148c10
mov eax, dword [rbx + 0x170]
test eax, eax
je 0x140148c10
mov rcx, qword [rbx + 0x178]
lea r8d, [rax - 1]
xor edx, edx
shl r8, 4
lea rax, [rcx + 0x10]
add r8, rax
jmp 0x140148acc
add rax, 0x10
mov ecx, dword [rcx]
add rdx, rcx
mov rcx, rax
cmp r8, rax
jne 0x140148ac8
sub rsi, rdi
cmp rsi, rdx
cmovg rsi, rdx
test rsi, rsi
je 0x140148c10
mov ecx, dword [0x140529a80]
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 0x140148c90
mov ecx, dword [rbx + 0x170]
xor r13d, r13d
xor r15d, r15d
test ecx, ecx
jne 0x140148b6d
mov r8d, 0x347
lea rdx, str.src_win_fs.c
lea rcx, str.done_read__read_size
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x140148bba
cmp rsi, r15
jbe 0x140148bb5
mov eax, r13d
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 r13d, 1
mov r12, r8
call sub.msvcrt.dll_memcpy
add r15, r12
cmp dword [rbx + 0x170], r13d
ja 0x140148b68
cmp rsi, r15
jne 0x140148b48
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x140148c90
cmp qword [rbx + 0x180], 0xffffffffffffffff
je 0x140148cb1
mov qword [rbx + 0x88], rsi
cmp rsi, 0xffffffffffffffff
jne 0x140148c1b
call qword [sym.imp.msvcrt.dll___doserrno]
mov ecx, dword [rax]
mov dword [rbx + 0x14c], ecx
call fcn.140146240
cdqe
mov qword [rbx + 0x88], rax
jmp 0x140148c1b
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 0x140148a9c
jmp 0x140148c10
mov dword [rcx + 0x14c], 1
mov ecx, 1
call fcn.140146240
cdqe
mov qword [rbx + 0x88], rax
jmp 0x140148c1b
mov dword [rcx + 0x14c], 5
mov ecx, 5
call fcn.140146240
cdqe
mov qword [rbx + 0x88], rax
jmp 0x140148c1b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0x14c], eax
mov ecx, eax
call fcn.140146240
cdqe
mov qword [rbx + 0x88], rax
jmp 0x140148c1b
add rdi, rsi
lea rcx, [0x1407b2aa0]
lea r12, [0x140529aa0]
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 0x140148d8c
test r9b, r9b
je 0x140148d8c
mov r10, qword [rax + 8]
mov ecx, 0x10
mov rdx, r10
xor eax, eax
jmp 0x140148d21
add rax, 1
add rdx, 0x28
cmp rcx, rax
jbe 0x140148da1
cmp ebp, dword [rdx]
jne 0x140148d10
lea rax, [rax + rax*4]
lea rax, [r10 + rax*8]
test rax, rax
jne 0x140148d68
mov r13d, r8d
and r13d, 0xf
jne 0x140148d44
test r9b, r9b
jne 0x140148ded
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, [0x1407b2aa0]
movups xmmword [rax + 8], xmm0
movdqu xmm1, xmmword [r14 + 0x10]
movups xmmword [rax + 0x18], xmm1
call fcn.14015d780
jmp 0x140148bdb
mov rax, rdi
shl rax, 4
mov r10, qword [r12 + rax + 8]
test rcx, rcx
jne 0x140148d01
mov rcx, qword [r10 + 0x280]
test rcx, rcx
je 0x140148d32
nop dword [rax]
mov rdx, rcx
xor eax, eax
nop dword [rax]
cmp ebp, dword [rdx]
je 0x140148de0
add eax, 1
add rdx, 0x28
cmp eax, 0x10
jne 0x140148db8
mov rcx, qword [rcx + 0x280]
test rcx, rcx
jne 0x140148db0
jmp 0x140148d32
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8]
jmp 0x140148d68
mov ecx, 0x288
call fcn.1401419c0
mov rdx, rax
test rax, rax
je 0x140148e20
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 0x140148d44
lea rdx, [0x140471907]
mov ecx, 0xe
call fcn.140146180
nop
nop word cs:[rax + rax]
nop dword [rax]