Function at 0x140004ae0
Capabilities:
Read file via mapping

Disassembly:
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0x50
mov eax, edx
mov rbp, rcx
pxor xmm0, xmm0
mov dword [rbp + 0x160], eax
mov qword [rbp + 0x168], r8
movups xmmword [rsp + 0x40], xmm0
xor edx, edx
xor r11d, r11d
cmp eax, 1
jle 0x1400049a4
mov r14, qword [rsp + 0x48]
lea r15d, [rax - 1]
mov ecx, r15d
mov r9, r14
shr ecx, 0x1f
xor r10d, r10d
lea eax, [rax + rcx - 1]
sar eax, 1
test eax, eax
jbe 0x140004ace
lea r12d, [r10 + r10]
movsxd r12, r12d
mov rcx, qword [r8 + r12*8 + 8]
mov r13b, byte [rcx]
cmp r13b, 0x2d
jne 0x140004a9f
cmp byte [rcx + 1], 0
jne 0x1400048b0
mov qword [rsp + 0x40], r9
mov r9, rcx
mov qword [rsp + 0x48], rcx
mov r14, rcx
mov r11d, 2
jmp 0x1400048c3
cmp dword [rcx + 1], 0x3d786469
jne 0x1400048c3
cmp r11d, 1
je 0x1400048c3
movzx edx, word [rcx + 5]
mov r13, qword [r8 + r12*8 + 0x10]
mov r12b, byte [r13]
cmp r12b, 0x2d
jne 0x140004a70
cmp byte [r13 + 1], 0
jne 0x1400048f5
mov qword [rsp + 0x40], r9
mov r9, r13
mov qword [rsp + 0x48], r13
mov r14, r13
mov r11d, 2
jmp 0x14000490a
cmp dword [r13 + 1], 0x3d786469
jne 0x14000490a
cmp r11d, 1
je 0x14000490a
movzx edx, word [r13 + 5]
inc r10d
cmp r10d, eax
jb 0x140004879
add r10d, r10d
cmp r10d, r15d
jae 0x140004962
movsxd r10, r10d
mov r8, qword [r8 + r10*8 + 8]
mov al, byte [r8]
cmp al, 0x2d
jne 0x140004a48
cmp byte [r8 + 1], 0
jne 0x14000494d
mov qword [rsp + 0x40], r9
mov r14, r8
mov qword [rsp + 0x48], r8
mov r11d, 2
jmp 0x140004967
cmp dword [r8 + 1], 0x3d786469
jne 0x140004962
cmp r11d, 1
je 0x140004967
movzx edx, word [r8 + 5]
test r11d, r11d
je 0x1400049a4
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1400049a4
cmp r11d, 2
jne 0x14000497b
test edx, edx
je 0x1400049a4
mov dword [rbp + 0x28c], r11d
mov byte [rbp + 0x15c], 0
cmp r11d, 1
je 0x1400049b6
mov rcx, rbp
add rsp, 0x50
pop rbp
pop r15
pop r14
pop r13
pop r12
jmp 0x140004ae0
xor eax, eax
dec eax
add rsp, 0x50
pop rbp
pop r15
pop r14
pop r13
pop r12
ret
mov rax, rsp
mov edx, 0x80000000
xor r8d, r8d
inc r8d
xor r9d, r9d
mov dword [rax + 0x20], 3
mov dword [rax + 0x28], 0x8000080
mov qword [rax + 0x30], 0
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r15, rax
mov rax, rsp
mov rcx, r14
mov edx, 0x40000000
xor r8d, r8d
inc r8d
xor r9d, r9d
mov qword [rbp + 0x290], r15
mov dword [rax + 0x20], 2
mov dword [rax + 0x28], 0x80
mov qword [rax + 0x30], 0
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbp + 0x298], rax
cmp r15, 0xffffffffffffffff
je 0x1400049a4
cmp rax, 0xffffffffffffffff
je 0x1400049a4
xor eax, eax
add rsp, 0x50
pop rbp
pop r15
pop r14
pop r13
pop r12
ret
cmp al, 0x2f
je 0x140004962
cmp al, 0x5c
je 0x140004962
mov qword [rsp + 0x40], r9
mov r14, r8
mov qword [rsp + 0x48], r8
mov r11d, 1
jmp 0x140004967
cmp r12b, 0x2f
je 0x14000490a
cmp r12b, 0x5c
je 0x14000490a
mov qword [rsp + 0x40], r9
mov r9, r13
mov qword [rsp + 0x48], r13
mov r14, r13
mov r11d, 1
jmp 0x14000490a
cmp r13b, 0x2f
je 0x1400048c3
cmp r13b, 0x5c
je 0x1400048c3
mov qword [rsp + 0x40], r9
mov r9, rcx
mov qword [rsp + 0x48], rcx
mov r14, rcx
mov r11d, 1
jmp 0x1400048c3
test r15d, r15d
jne 0x14000491e
jmp 0x1400049a4
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0x138
mov esi, edx
lea rdx, str.Bufsize
mov r8d, 0x80000
lea r9, str.1024k
mov rbp, rcx
call fcn.140004fa0
mov rbx, rax
mov rcx, rbp
lea rdx, str.transfer_ReadBufsize
mov r8d, 0x10000
lea r9, str.512k
call fcn.140004fa0
mov r15, rax
mov rcx, rbp
lea rdx, str.transfer_WriteBufsize
mov r8d, 0x10000
lea r9, str.1024k
mov edi, r15d
call fcn.140004fa0
mov r12, rax
mov rax, qword [str.IOEvent_]
mov r13d, r12d
mov qword [rsp + 0x30], rax
mov dl, byte [0x14002e8c8]
mov byte [rsp + 0x38], dl
mov rdx, qword [rbp + 0x170]
lea r14, [rsp + 0x30]
mov rax, r14
call fcn.1400101d0
mov rdx, r14
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x140004bad
mov rax, rdx
add rdx, rcx
call fcn.1400106b0
mov ecx, 0x1f0003
xor edx, edx
mov r8, r14
mov dword [rax + r14], esi
call qword [sym.imp.KERNEL32.dll_OpenEventA]
mov qword [rbp], rax
test rax, rax
je 0x140004f6a
movups xmm0, xmmword [str.IOCompleteEvent_]
movups xmmword [rsp + 0x30], xmm0
mov r9b, byte [0x14002e8e0]
mov byte [rsp + 0x40], r9b
mov rax, r14
mov rdx, qword [rbp + 0x170]
call fcn.1400101d0
mov rdx, r14
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x140004c20
mov rax, rdx
add rdx, rcx
call fcn.1400106b0
mov ecx, 0x1f0003
xor edx, edx
mov r8, r14
mov dword [rax + r14], esi
call qword [sym.imp.KERNEL32.dll_OpenEventA]
mov qword [rbp + 8], rax
test rax, rax
je 0x140004f36
mov r9, qword [str.IO_MapFile_]
mov qword [rsp + 0x30], r9
mov r10d, dword [0x14002e8f8]
mov dword [rsp + 0x38], r10d
mov rax, r14
mov rdx, qword [rbp + 0x170]
call fcn.1400101d0
mov rdx, r14
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x140004c93
mov rax, rdx
add rdx, rcx
call fcn.1400106b0
mov ecx, 0xf001f
xor edx, edx
mov r8, r14
mov dword [rax + r14], esi
call qword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov r10, rsp
xor r8d, r8d
mov rcx, rax
mov edx, 0xf001f
xor r9d, r9d
mov qword [rbp + 0x10], rax
mov qword [r10 + 0x20], 0x100
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x10], 0
je 0x140004f02
test rax, rax
je 0x140004f02
mov r9, qword [str.Global_]
mov qword [rsp + 0x30], r9
mov rax, r14
lea rdx, str.Read_MapFile_
call fcn.1400101d0
mov rax, r14
mov rdx, qword [rbp + 0x170]
call fcn.1400101d0
mov rdx, r14
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x140004d37
mov rax, rdx
add rdx, rcx
call fcn.1400106b0
mov r10, rsp
mov rcx, 0xffffffffffffffff
xor edx, edx
mov r8d, 4
xor r9d, r9d
mov dword [rax + r14], esi
mov dword [r10 + 0x20], edi
mov qword [r10 + 0x28], r14
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov r10, rsp
xor r8d, r8d
mov rcx, rax
mov edx, 0xf001f
xor r9d, r9d
mov r15d, r15d
mov qword [rbp + 0x18], rax
mov qword [r10 + 0x20], r15
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rbp + 0x30], rax
mov qword [rbp + 0x38], r15
cmp qword [rbp + 0x18], 0
je 0x140004ece
test rax, rax
je 0x140004ece
mov r9, qword [str.Global_]
mov qword [rsp + 0x30], r9
mov rax, r14
lea rdx, str.Write_MapFile_
call fcn.1400101d0
mov rax, r14
mov rdx, qword [rbp + 0x170]
call fcn.1400101d0
mov rdx, r14
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x140004df1
mov rax, rdx
add rdx, rcx
call fcn.1400106b0
mov rcx, 0xffffffffffffffff
xor edx, edx
mov r8d, 4
xor r9d, r9d
mov dword [rax + r14], esi
mov rsi, rsp
mov dword [rsi + 0x20], r13d
mov qword [rsi + 0x28], r14
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov rcx, rax
mov rax, rsp
xor r8d, r8d
mov edx, 0xf001f
xor r9d, r9d
mov esi, r12d
mov qword [rbp + 0x20], rcx
mov qword [rax + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rbp + 0x40], rax
mov qword [rbp + 0x48], rsi
cmp qword [rbp + 0x18], 0
je 0x140004e9a
cmp qword [rbp + 0x30], 0
je 0x140004e9a
mov rdx, qword [rbp + 0x28]
mov eax, 0x10000000
cmp ebx, 0x10000000
cmovb eax, ebx
mov dword [rdx], eax
mov dword [rdx + 4], edi
mov dword [rdx + 8], r13d
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rbp + 8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
add rsp, 0x138
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov r8, qword [rbp + 0x170]
lea rdx, str.Cant_create_write_mapping_
xor ecx, ecx
mov r9d, 0x10
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
dec eax
add rsp, 0x138
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov r8, qword [rbp + 0x170]
lea rdx, str.Cant_create_read_mapping_
xor ecx, ecx
mov r9d, 0x10
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
dec eax
add rsp, 0x138
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov r8, qword [rbp + 0x170]
lea rdx, str.Cant_open_i_o_mapping_
xor ecx, ecx
mov r9d, 0x10
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
dec eax
add rsp, 0x138
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov r8, qword [rbp + 0x170]
lea rdx, str.Cant_open_i_o_complete_event_
xor ecx, ecx
mov r9d, 0x10
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
dec eax
add rsp, 0x138
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov r8, qword [rbp + 0x170]
lea rdx, str.Cant_open_i_o_event_
xor ecx, ecx
mov r9d, 0x10
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
dec eax
add rsp, 0x138
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret