Function at 0x406cf0
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push esi
push edi
push ebx
sub esp, 0x124
mov edi, ecx
movq xmm0, qword [0x4229b0]
mov dword [esp], str.Bufsize
movq qword [esp + 4], xmm0
mov dword [esp + 0xc], str.1024k
call fcn.004067a0
mov dword [esp + 0x104], eax
add esp, 0xfffffff0
mov ecx, edi
movq xmm0, qword [0x4229b8]
mov dword [esp], str.transfer_ReadBufsize
movq qword [esp + 4], xmm0
mov dword [esp + 0xc], str.512k
call fcn.004067a0
mov esi, eax
add esp, 0xfffffff0
mov ecx, edi
movq xmm0, qword [0x4229b8]
mov dword [esp], str.transfer_WriteBufsize
movq qword [esp + 4], xmm0
mov dword [esp + 0xc], str.1024k
call fcn.004067a0
mov ebx, eax
movsd xmm0, qword [0x422a50]
mov al, byte [0x422a58]
movsd qword [esp], xmm0
mov byte [esp + 8], al
mov edx, dword [edi + 0x13c]
lea eax, [esp]
call fcn.00407a60
lea edx, [esp]
mov ecx, edx
and edx, 0xfffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [edx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x406dc7
mov eax, edx
add edx, ecx
call fcn.00407580
mov edx, eax
lea ecx, [esp]
push ecx
push 0
mov eax, dword [ebp + 8]
push 0x1f0003
mov dword [edx + ecx], eax
call dword [sym.imp.KERNEL32.dll_OpenEventA]
mov dword [edi], eax
test eax, eax
je 0x4070f7
movups xmm0, xmmword [str.IOCompleteEvent_]
mov al, byte [0x4226c0]
movups xmmword [esp], xmm0
mov byte [esp + 0x10], al
mov edx, dword [edi + 0x13c]
lea eax, [esp]
call fcn.00407a60
lea edx, [esp]
mov ecx, edx
and edx, 0xfffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [edx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x406e33
mov eax, edx
add edx, ecx
call fcn.00407580
mov edx, eax
lea ecx, [esp]
push ecx
push 0
mov eax, dword [ebp + 8]
push 0x1f0003
mov dword [edx + ecx], eax
call dword [sym.imp.KERNEL32.dll_OpenEventA]
mov dword [edi + 4], eax
test eax, eax
je 0x4070ce
movsd xmm0, qword [str.IO_MapFile_]
mov eax, dword [0x422a64]
movsd qword [esp], xmm0
mov dword [esp + 8], eax
mov edx, dword [edi + 0x13c]
lea eax, [esp]
call fcn.00407a60
lea edx, [esp]
mov ecx, edx
and edx, 0xfffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [edx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x406ea2
mov eax, edx
add edx, ecx
call fcn.00407580
mov edx, eax
lea ecx, [esp]
push ecx
push 0
mov eax, dword [ebp + 8]
push 0xf001f
mov dword [edx + ecx], eax
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov edx, eax
push 0x100
xor eax, eax
push eax
push eax
push 0xf001f
push edx
mov dword [edi + 8], edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 0x14], eax
cmp dword [edi + 8], 0
je 0x4070a5
test eax, eax
je 0x4070a5
movsd xmm0, qword [str.Global_]
movsd qword [esp], xmm0
mov edx, str.Read_MapFile_
lea eax, [esp]
call fcn.00407a60
mov edx, dword [edi + 0x13c]
lea eax, [esp]
call fcn.00407a60
lea edx, [esp]
mov ecx, edx
and edx, 0xfffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [edx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x406f39
mov eax, edx
add edx, ecx
call fcn.00407580
xor ecx, ecx
lea edx, [esp]
push edx
push esi
push ecx
push 4
push ecx
mov ecx, dword [ebp + 8]
push 0xffffffffffffffff
mov dword [eax + edx], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edx, eax
push esi
xor eax, eax
push eax
push eax
push 0xf001f
push edx
mov dword [edi + 0xc], edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], esi
cmp dword [edi + 0xc], 0
je 0x40707c
test eax, eax
je 0x40707c
movsd xmm0, qword [str.Global_]
movsd qword [esp], xmm0
mov edx, str.Write_MapFile_
lea eax, [esp]
call fcn.00407a60
mov edx, dword [edi + 0x13c]
lea eax, [esp]
call fcn.00407a60
lea edx, [esp]
mov ecx, edx
and edx, 0xfffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [edx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x406fcf
mov eax, edx
add edx, ecx
call fcn.00407580
xor ecx, ecx
lea edx, [esp]
push edx
push ebx
push ecx
push 4
push ecx
mov ecx, dword [ebp + 8]
push 0xffffffffffffffff
mov dword [eax + edx], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edx, eax
push ebx
xor eax, eax
push eax
push eax
push 0xf001f
push edx
mov dword [edi + 0x10], edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], ebx
cmp dword [edi + 0xc], 0
je 0x407053
cmp dword [edi + 0x18], 0
je 0x407053
mov ecx, dword [edi + 0x14]
mov edx, 0x10000000
mov eax, dword [esp + 0x104]
cmp eax, 0x10000000
cmovb edx, eax
mov dword [ecx], edx
mov dword [ecx + 4], esi
mov dword [ecx + 8], ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
add esp, 0x114
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push 0x10
push dword [edi + 0x13c]
push str.Cant_create_write_mapping_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0xffffffff
add esp, 0x114
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push 0x10
push dword [edi + 0x13c]
push str.Cant_create_read_mapping_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0xffffffff
add esp, 0x114
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push 0x10
push dword [edi + 0x13c]
push str.Cant_open_i_o_mapping_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0xffffffff
add esp, 0x114
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push 0x10
push dword [edi + 0x13c]
push str.Cant_open_i_o_complete_event_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0xffffffff
add esp, 0x114
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
push 0x10
push dword [edi + 0x13c]
push str.Cant_open_i_o_event_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 0xffffffff
add esp, 0x114
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4