Function at 0x40ce56
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
push ebx
push esi
push edi
mov dword [ebp - 0x138], ecx
mov byte [ebp - 8], 1
pushfd
pushal
call 0x40ce73
pop eax
mov dword [ebp - 0x120], eax
add dword [ebp - 0x120], 0x20
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x120]
mov dword [eax + 0x8608], ecx
popal
popfd
pushfd
pushal
cmp dword [ebp + 0x14], 1
jne 0x40cea2
jmp 0x40d86a
mov eax, dword [ebp - 0x138]
cmp dword [eax + 0x8610], 0
jne 0x40d647
push 0x900
push 0
mov eax, dword [ebp - 0x138]
add eax, 0x8620
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x518]
inc eax
mov ecx, dword [ebp - 0x138]
mov dword [ecx + 0x8620], eax
push 0
call dword [sym.imp.MSVCRT.dll_time]
pop ecx
mov ecx, dword [ebp - 0x138]
mov dword [ecx + 0x8628], eax
mov eax, dword [ebp - 0x138]
cmp dword [eax + 0x8f38], 0xfffffffd
jne 0x40cf35
mov eax, dword [0x454704]
mov eax, dword [eax + 0x20]
mov eax, dword [eax + 0x48]
mov dword [ebp - 0x128], eax
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x128]
mov dword [eax + 0x862c], ecx
jmp 0x40d027
mov eax, dword [ebp - 0x138]
cmp dword [eax + 0x8f38], 0xfffffffe
jne 0x40d00f
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x560]
cmp dword [eax + 0x6c], 0
je 0x40cfea
push 0x104
push 0
lea eax, [ebp - 0x110]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x103
lea eax, [ebp - 0x110]
push eax
push str.timeout
mov eax, dword [ebp + 8]
push dword [eax + 0x564]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x560]
call dword [eax + 0x6c]
add esp, 0x10
mov dword [ebp - 0x118], eax
cmp dword [ebp - 0x118], 0
jne 0x40cfc5
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
pop ecx
mov ecx, dword [ebp - 0x138]
mov dword [ecx + 0x862c], eax
jmp 0x40cfe8
mov eax, dword [0x454704]
mov eax, dword [eax + 0x20]
mov eax, dword [eax + 0x48]
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x12c]
mov dword [eax + 0x862c], ecx
jmp 0x40d00d
mov eax, dword [0x454704]
mov eax, dword [eax + 0x20]
mov eax, dword [eax + 0x48]
mov dword [ebp - 0x130], eax
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x130]
mov dword [eax + 0x862c], ecx
jmp 0x40d027
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x138]
mov ecx, dword [ecx + 0x8f38]
mov dword [eax + 0x862c], ecx
push 0x18
mov eax, dword [ebp - 0x138]
add eax, 0x8630
push eax
push str.msgid
mov eax, dword [ebp + 8]
push dword [eax + 0x564]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x560]
call dword [eax + 0x6c]
add esp, 0x10
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x138]
mov ecx, dword [ecx + 0x8f34]
mov dword [eax + 0x885c], ecx
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x138]
mov ecx, dword [ecx + 0x8f2c]
mov dword [eax + 0x8860], ecx
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x138]
mov ecx, dword [ecx + 0x8f30]
mov dword [eax + 0x8864], ecx
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x138]
mov cl, byte [ecx + 0x85f4]
mov byte [eax + 0x8868], cl
mov esi, dword [ebp - 0x138]
add esi, 0x8528
mov edi, dword [ebp - 0x138]
add edi, 0x8869
push 0x1a
pop ecx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x138]
add esi, 0x3d0
mov edi, dword [ebp - 0x138]
add edi, 0x88d4
push 0x1e
pop ecx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x138]
add esi, 0x20
mov edi, dword [ebp - 0x138]
add edi, 0x894c
mov ecx, 0xc6
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x138]
add esi, 0x85f8
mov edi, dword [ebp - 0x138]
add edi, 0x8c64
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x138]
mov ecx, dword [ecx + 0x1c]
mov dword [eax + 0x8c70], ecx
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x138]
mov ecx, dword [ecx + 0x85a4]
mov dword [eax + 0x8c74], ecx
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x138]
mov cl, byte [ecx + 0x8604]
mov byte [eax + 0x8c78], cl
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x138]
mov cl, byte [ecx + 0x8605]
mov byte [eax + 0x8c79], cl
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x138]
mov cl, byte [ecx + 0x8606]
mov byte [eax + 0x8c7a], cl
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
mov ecx, dword [ebp - 0x138]
mov eax, dword [eax + 0xb4]
mov dword [ecx + 0x8c7c], eax
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
mov ecx, dword [ebp - 0x138]
mov eax, dword [eax + 8]
mov dword [ecx + 0x8c80], eax
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
mov ecx, dword [ebp - 0x138]
mov eax, dword [eax + 0xc]
mov dword [ecx + 0x8c84], eax
push 0x18
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
add eax, 0x10
push eax
mov eax, dword [ebp - 0x138]
add eax, 0x8c88
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
push 0x18
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
add eax, 0x29
push eax
mov eax, dword [ebp - 0x138]
add eax, 0x8ca1
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
push 9
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
add eax, 0x42
push eax
mov eax, dword [ebp - 0x138]
add eax, 0x8cba
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
push 0x20
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
add eax, 0x4c
push eax
mov eax, dword [ebp - 0x138]
add eax, 0x8cc4
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
push 0xf
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
add eax, 0x6d
push eax
mov eax, dword [ebp - 0x138]
add eax, 0x8ce5
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
push 0x1a
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
add eax, 0x7d
push eax
mov eax, dword [ebp - 0x138]
add eax, 0x8cf5
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
push 8
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
add eax, 0x98
push eax
mov eax, dword [ebp - 0x138]
add eax, 0x8d10
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
mov ecx, dword [ebp - 0x138]
mov eax, dword [eax + 0xa4]
mov dword [ecx + 0x8d1c], eax
push 0x200
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
add eax, 0xe8
push eax
mov eax, dword [ebp - 0x138]
add eax, 0x8d20
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov dword [ebp - 0xc], esp
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x8f2c]
sub eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x138]
mov dword [ecx + 0x8750], eax
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x8618]
mov dword [ebp - 0x13c], eax
push dword [ebp - 0x13c]
mov eax, dword [ebp - 0x138]
push dword [eax + 0x518]
push 0x104
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.MSVCRT.dll__getcwd]
pop ecx
pop ecx
push eax
push str._sStack_03d_010d
mov eax, dword [ebp - 0x138]
add eax, 0x8649
push eax
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x8618]
inc eax
mov ecx, dword [ebp - 0x138]
mov dword [ecx + 0x8618], eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
and dword [ebp - 0x11c], 0
jmp 0x40d3eb
mov eax, dword [ebp - 0x11c]
inc eax
mov dword [ebp - 0x11c], eax
mov eax, dword [ebp - 0x138]
add eax, 0x8649
push eax
call sub.MSVCRT.dll_strlen
pop ecx
cmp dword [ebp - 0x11c], eax
jge 0x40d432
mov eax, dword [ebp - 0x138]
add eax, dword [ebp - 0x11c]
movsx eax, byte [eax + 0x8649]
cmp eax, 0x5c
jne 0x40d430
mov eax, dword [ebp - 0x138]
add eax, dword [ebp - 0x11c]
mov byte [eax + 0x8649], 0x2f
jmp 0x40d3de
mov eax, dword [ebp - 0x138]
add eax, 0x8649
push eax
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x8750]
inc eax
push eax
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0
je 0x40d47f
cmp dword [ebp - 0x114], 0
je 0x40d4b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40d4b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CAppServer::XA_AsyncRead_CreateFileMapping_for_stack_fail__GetLastError_d
push 0x7d1
push 0
call fcn.00426a9a
add esp, 0x10
mov eax, dword [ebp - 0x138]
mov dword [eax + 0x44c], 0x424
and byte [ebp - 8], 0
jmp 0x40d868
push 0
push 0
push 0
push 6
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x124], eax
mov eax, dword [ebp - 0x124]
and byte [eax], 0
mov eax, dword [ebp - 0x138]
push dword [eax + 0x8750]
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x124]
inc eax
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push dword [ebp - 0x124]
push dword [ebp - 0x114]
mov eax, dword [ebp - 0x138]
add eax, 0x8649
push eax
mov eax, dword [ebp - 0x138]
add eax, 0x861c
push eax
call fcn.0042db7a
add esp, 0x10
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x862c]
imul eax, eax, 0x3e8
cmp eax, 0xffffffff
jle 0x40d552
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x862c]
imul eax, eax, 0x3e8
mov dword [ebp - 0x140], eax
jmp 0x40d559
or dword [ebp - 0x140], 0xffffffff
push dword [ebp - 0x140]
push 0
push 0x900
mov eax, dword [ebp - 0x138]
add eax, 0x8620
push eax
mov ecx, dword [0x4546f8]
call fcn.0042c243
cmp eax, 0xffffffff
jne 0x40d5ef
push dword [ebp - 0x124]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x45479c]
mov ecx, dword fs:[0x2c]
mov eax, dword [ecx + eax*4]
mov eax, dword [eax + 4]
mov dword [ebp - 0x134], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x134]
push str.CAppServer::XA_AsyncRead_send_fail__errno_d__GetLastError_d
push 0x7d1
push 0
call fcn.00426a9a
add esp, 0x14
mov eax, dword [ebp - 0x138]
mov dword [eax + 0x44c], 0x424
and byte [ebp - 8], 0
jmp 0x40d866
mov eax, dword [ebp - 0x138]
mov dword [eax + 0x8610], 1
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x8614]
inc eax
mov ecx, dword [ebp - 0x138]
mov dword [ecx + 0x8614], eax
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x8f2c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x8f30]
mov dword [ebp - 0x120], eax
mov esp, dword [ebp - 0xc]
jmp dword [ebp - 0x120]
mov eax, dword [ebp - 0x138]
cmp dword [eax + 0x8610], 2
jne 0x40d85b
mov eax, dword [ebp - 0x138]
and dword [eax + 0x8610], 0
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x33c]
mov ecx, dword [ebp - 0x138]
mov ecx, dword [ecx + 0x8c7c]
cmp ecx, dword [eax + 0xb4]
jne 0x40d6a0
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x8614]
dec eax
mov ecx, dword [ebp - 0x138]
mov dword [ecx + 0x8614], eax
mov eax, dword [ebp - 0x138]
cmp dword [eax + 0x8858], 0
jne 0x40d6ba
mov eax, dword [ebp + 0xc]
and dword [eax], 0
jmp 0x40d81f
mov eax, dword [ebp - 0x138]
add eax, 0x8754
push eax
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x8858]
inc eax
push eax
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0
je 0x40d707
cmp dword [ebp - 0x114], 0
je 0x40d73b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40d73b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CAppServer::XA_AsyncRead_CreateFileMapping_for_data_fail__GetLastError_d
push 0x7d1
push 0
call fcn.00426a9a
add esp, 0x10
mov eax, dword [ebp - 0x138]
mov dword [eax + 0x44c], 0x424
and byte [ebp - 8], 0
jmp 0x40d864
push 0
push 0
push 0
push 6
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x124], eax
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x8858]
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
pop ecx
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40d7c4
mov eax, dword [ebp - 0x138]
push dword [eax + 0x8858]
push str.CAppServer::XA_AsyncRead_malloc_return__d_NULL
push 0x7d1
push 0
call fcn.00426a9a
add esp, 0x10
push dword [ebp - 0x124]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x138]
mov dword [eax + 0x44c], 0x424
and byte [ebp - 8], 0
jmp 0x40d862
mov eax, dword [ebp - 0x138]
mov eax, dword [eax + 0x8858]
mov ecx, dword [ebp - 4]
and byte [ecx + eax], 0
mov eax, dword [ebp - 0x138]
push dword [eax + 0x8858]
mov eax, dword [ebp - 0x124]
inc eax
push eax
push dword [ebp - 4]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x124]
mov byte [eax], 1
push dword [ebp - 0x124]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x138]
mov ecx, dword [ecx + 0x8858]
mov dword [eax], ecx
mov eax, dword [ebp - 0x138]
cmp dword [eax + 0x8624], 0
je 0x40d85b
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x138]
mov ecx, dword [ecx + 0x8624]
mov dword [eax + 0x44c], ecx
and byte [ebp - 8], 0
popal
popfd
mov al, byte [ebp - 8]
jmp 0x40d86c
jmp 0x40d85b
jmp 0x40d85b
jmp 0x40d85b
jmp 0x40d85b
jmp 0x40d85b
pop edi
pop esi
pop ebx
leave
ret 0x10