Function at 0x6a2110
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 0x6a2312
cmp byte [rdx + 4], 0
jne 0x6a22f3
mov rdi, qword [rcx + 0x180]
cmp rdi, 0xffffffffffffffff
je 0x6a22e0
mov rsi, qword [r14 + 0x10]
cmp rsi, rdi
jle 0x6a22c0
mov eax, dword [rbx + 0x170]
test eax, eax
je 0x6a22c0
mov rcx, qword [rbx + 0x178]
lea r8d, [rax - 1]
xor edx, edx
shl r8, 4
lea rax, [rcx + 0x10]
add r8, rax
jmp 0x6a2188
add rax, 0x10
mov ecx, dword [rcx]
add rdx, rcx
mov rcx, rax
cmp r8, rax
jne 0x6a2184
sub rsi, rdi
cmp rsi, rdx
cmovg rsi, rdx
test rsi, rsi
je 0x6a22c0
mov ecx, dword [0x009a3520]
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 0x6a2331
mov edx, dword [rbx + 0x170]
xor r13d, r13d
xor r15d, r15d
test edx, edx
jne 0x6a2225
mov r8d, 0x326
lea rdx, str.src_win_fs.c
lea rcx, str.done_read__read_size
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6a2274
cmp rsi, r15
jbe 0x6a226f
mov eax, r13d
mov r10, rsi
shl rax, 4
add rax, qword [rbx + 0x178]
sub r10, r15
mov edx, dword [rax]
mov rcx, qword [rax + 8]
mov rax, qword [rsp + 0x38]
cmp r10, rdx
cmovbe rdx, r10
add r13d, 1
mov r12, rdx
lea rdx, [rax + r15]
add rdx, qword [rsp + 0x30]
mov r8, r12
add r15, r12
call sub.msvcrt.dll_memcpy
cmp dword [rbx + 0x170], r13d
ja 0x6a2220
cmp rsi, r15
jne 0x6a2204
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x6a2331
cmp qword [rbx + 0x180], 0xffffffffffffffff
je 0x6a2352
mov qword [rbx + 0x88], rsi
cmp rsi, 0xffffffffffffffff
jne 0x6a22cb
call qword [sym.imp.msvcrt.dll___doserrno]
mov ecx, dword [rax]
mov dword [rbx + 0x14c], ecx
call fcn.0069fed0
cdqe
mov qword [rbx + 0x88], rax
jmp 0x6a22cb
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 0x6a215c
jmp 0x6a22c0
mov dword [rcx + 0x14c], 1
mov ecx, 1
call fcn.0069fed0
cdqe
mov qword [rbx + 0x88], rax
jmp 0x6a22cb
mov dword [rcx + 0x14c], 5
mov ecx, 5
call fcn.0069fed0
cdqe
mov qword [rbx + 0x88], rax
jmp 0x6a22cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0x14c], eax
mov ecx, eax
call fcn.0069fed0
cdqe
mov qword [rbx + 0x88], rax
jmp 0x6a22cb
add rdi, rsi
lea rcx, [0x00c2c540]
lea r12, [0x009a3540]
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 r13, r8
setne r9b
and r13d, 0xf
jne 0x6a2489
test r9b, r9b
je 0x6a2489
mov r11, qword [rax + 8]
mov r13d, 0x10
lea rdx, [r11 + 0x28]
mov eax, 1
cmp ebp, dword [r11]
jne 0x6a23d5
jmp 0x6a2445
mov ecx, dword [rdx]
lea r10, [rax + 1]
add rdx, 0x28
cmp ebp, ecx
je 0x6a247f
mov rax, r10
cmp rax, r13
jb 0x6a23c0
mov rcx, qword [r11 + 0x280]
test rcx, rcx
je 0x6a2411
nop word cs:[rax + rax]
mov rdx, rcx
xor eax, eax
cmp ebp, dword [rdx]
je 0x6a2470
add eax, 1
add rdx, 0x28
cmp eax, 0x10
jne 0x6a23f5
mov rcx, qword [rcx + 0x280]
test rcx, rcx
jne 0x6a23f0
mov r13d, r8d
and r13d, 0xf
jne 0x6a2423
test r9b, r9b
jne 0x6a24a3
shl rdi, 4
mov eax, r13d
add r8, 1
add r12, rdi
lea r11, [rax + rax*4]
mov rax, qword [r12 + 8]
mov qword [r12], r8
lea r11, [rax + r11*8]
mov dword [r11], ebp
movdqu xmm0, xmmword [r14]
lea rcx, [0x00c2c540]
movups xmmword [r11 + 8], xmm0
movdqu xmm1, xmmword [r14 + 0x10]
movups xmmword [r11 + 0x18], xmm1
call sub.KERNEL32.dll_LeaveCriticalSection
jmp 0x6a2295
lea rax, [rax + rax*4]
lea r11, [rcx + rax*8]
test r11, r11
jne 0x6a2445
jmp 0x6a2411
lea rax, [rax + rax*4]
lea r11, [r11 + rax*8]
jmp 0x6a2478
mov rax, rdi
shl rax, 4
mov r11, qword [r12 + rax + 8]
test r13, r13
jne 0x6a23a4
jmp 0x6a23da
mov ecx, 0x288
call fcn.0069b410
test rax, rax
je 0x6a24d3
mov rdx, rdi
shl rdx, 4
add rdx, r12
mov rcx, qword [rdx + 8]
mov r8, qword [rdx]
mov qword [rax + 0x280], rcx
mov qword [rdx + 8], rax
jmp 0x6a2423
lea rdx, [0x0090d64e]
mov ecx, 0xe
call fcn.0069fe10
nop
nop
nop word cs:[rax + rax]