Function at 0x6d2070
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 0x6d2290
cmp byte [rdx + 4], 0
jne 0x6d2268
mov rdi, qword [rcx + 0x180]
cmp rdi, 0xffffffffffffffff
je 0x6d2250
mov rsi, qword [r14 + 0x10]
cmp rsi, rdi
jle 0x6d2230
mov eax, dword [rbx + 0x170]
test eax, eax
je 0x6d2230
mov rcx, qword [rbx + 0x178]
lea r8d, [rax - 1]
xor edx, edx
shl r8, 4
lea rax, [rcx + 0x10]
add r8, rax
jmp 0x6d20ec
add rax, 0x10
mov ecx, dword [rcx]
add rdx, rcx
mov rcx, rax
cmp r8, rax
jne 0x6d20e8
sub rsi, rdi
cmp rsi, rdx
cmovg rsi, rdx
test rsi, rsi
je 0x6d2230
mov ecx, dword [0x009f7780]
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 0x6d22b0
mov ecx, dword [rbx + 0x170]
xor r13d, r13d
xor r15d, r15d
test ecx, ecx
jne 0x6d218d
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 0x6d21da
cmp rsi, r15
jbe 0x6d21d5
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 0x6d2188
cmp rsi, r15
jne 0x6d2168
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x6d22b0
cmp qword [rbx + 0x180], 0xffffffffffffffff
je 0x6d22d1
mov qword [rbx + 0x88], rsi
cmp rsi, 0xffffffffffffffff
jne 0x6d223b
call qword [sym.imp.msvcrt.dll___doserrno]
mov ecx, dword [rax]
mov dword [rbx + 0x14c], ecx
call fcn.006cf860
cdqe
mov qword [rbx + 0x88], rax
jmp 0x6d223b
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 0x6d20bc
jmp 0x6d2230
mov dword [rcx + 0x14c], 1
mov ecx, 1
call fcn.006cf860
cdqe
mov qword [rbx + 0x88], rax
jmp 0x6d223b
mov dword [rcx + 0x14c], 5
mov ecx, 5
call fcn.006cf860
cdqe
mov qword [rbx + 0x88], rax
jmp 0x6d223b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0x14c], eax
mov ecx, eax
call fcn.006cf860
cdqe
mov qword [rbx + 0x88], rax
jmp 0x6d223b
add rdi, rsi
lea rcx, [0x00c807a0]
lea r12, [0x009f77a0]
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 0x6d23ac
test r9b, r9b
je 0x6d23ac
mov r10, qword [rax + 8]
mov ecx, 0x10
mov rdx, r10
xor eax, eax
jmp 0x6d2341
add rax, 1
add rdx, 0x28
cmp rcx, rax
jbe 0x6d23c1
cmp ebp, dword [rdx]
jne 0x6d2330
lea rax, [rax + rax*4]
lea rax, [r10 + rax*8]
test rax, rax
jne 0x6d2388
mov r13d, r8d
and r13d, 0xf
jne 0x6d2364
test r9b, r9b
jne 0x6d240d
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, [0x00c807a0]
movups xmmword [rax + 8], xmm0
movdqu xmm1, xmmword [r14 + 0x10]
movups xmmword [rax + 0x18], xmm1
call sub.KERNEL32.dll_LeaveCriticalSection
jmp 0x6d21fb
mov rax, rdi
shl rax, 4
mov r10, qword [r12 + rax + 8]
test rcx, rcx
jne 0x6d2321
mov rcx, qword [r10 + 0x280]
test rcx, rcx
je 0x6d2352
nop dword [rax]
mov rdx, rcx
xor eax, eax
nop dword [rax]
cmp ebp, dword [rdx]
je 0x6d2400
add eax, 1
add rdx, 0x28
cmp eax, 0x10
jne 0x6d23d8
mov rcx, qword [rcx + 0x280]
test rcx, rcx
jne 0x6d23d0
jmp 0x6d2352
lea rax, [rax + rax*4]
lea rax, [rcx + rax*8]
jmp 0x6d2388
mov ecx, 0x288
call fcn.006cb300
mov rdx, rax
test rax, rax
je 0x6d2440
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 0x6d2364
lea rdx, [0x00958547]
mov ecx, 0xe
call fcn.006cf7a0
nop
nop word cs:[rax + rax]
nop dword [rax]