Function at 0x40c760
Capabilities:
Read file via mapping

Disassembly:
sub esp, 0x54
mov eax, dword [0x71a830]
xor eax, esp
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
push ebx
xor ebx, ebx
push ebp
mov ebp, dword [eax + 0x34c]
mov dword [esp + 0x3c], eax
push esi
mov eax, ebp
mov dword [esp + 0x3c], ecx
push edi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], ebx
lea ecx, [eax + 1]
jmp 0x40c7c0
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40c7c0
sub eax, ecx
add eax, 0x20
push 8
push eax
call fcn.0040aa20
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x40cba7
mov dword [esp + 0x14], ebx
jmp 0x40c7f0
mov edx, dword [esp + 0x14]
mov ebx, dword [edx + 0x4ae364]
push 0
push 0x493924
push ebp
push ebx
push esi
call fcn.00423880
mov edi, eax
push str.CONNECT_REQUEST
push edi
call fcn.00410fe0
add esp, 0x1c
push esi
push 0
push 0x100002
call dword [sym.imp.KERNEL32.dll_OpenEventA]
mov dword [esp + 0x34], eax
test eax, eax
jne 0x40c8e8
mov eax, dword [esp + 0x14]
add eax, 4
mov dword [esp + 0x14], eax
cmp eax, 8
jb 0x40c7f0
mov dword [esp + 0x10], 0x7f6
xor ebx, ebx
push esi
call sub.MSVCR90.dll_free
mov esi, dword [esp + 0x14]
add esp, 4
cmp esi, ebx
je 0x40c868
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x34]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x40c879
push eax
call ebp
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x40c884
push eax
call ebp
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x40c893
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x40c89e
push eax
call ebp
cmp esi, ebx
je 0x40cbfa
cmp esi, 0x7fc
jne 0x40cbb0
mov edx, dword [esp + 0x18]
mov eax, dword [str.Cant_open_shared_memory__client_could_not_create__s_event___lu_]
mov ecx, dword [esp + 0x44]
push edx
push edi
push eax
mov eax, dword [str.HY000]
push eax
push esi
push ecx
call fcn.0040c4f0
add esp, 0x18
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0046e712
add esp, 0x54
ret
push str.CONNECT_ANSWER
push edi
call fcn.00410fe0
add esp, 8
push esi
push 0
push 0x100002
call dword [sym.imp.KERNEL32.dll_OpenEventA]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x40c919
mov dword [esp + 0x10], 0x7f7
jmp 0x40c84b
push str.CONNECT_DATA
push edi
call fcn.00410fe0
add esp, 8
push esi
push 0
push 2
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov dword [esp + 0x3c], eax
test eax, eax
jne 0x40c947
mov dword [esp + 0x10], 0x7f8
jmp 0x40c84b
push 4
push 0
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esp + 0x28], eax
test eax, eax
jne 0x40c96b
mov dword [esp + 0x10], 0x7f9
jmp 0x40c84b
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x40c987
mov dword [esp + 0x10], 0x7fe
jmp 0x40c84b
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x24]
imul ecx, ecx, 0x3e8
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40c9ae
mov dword [esp + 0x10], 0x7fd
jmp 0x40c84b
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx]
push 0xa
lea eax, [esp + 0x4c]
push eax
push edx
call fcn.00419d30
push 0
push 0x493924
lea eax, [esp + 0x5c]
push eax
push 0x493924
push ebp
push ebx
push esi
call fcn.00423880
mov edi, eax
push str.DATA
push edi
call fcn.00410fe0
add esp, 0x30
push esi
push 0
push 2
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40ca68
mov dword [esp + 0x10], 0x7fa
mov ebx, dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
test ebx, ebx
je 0x40ca1e
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x30]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40ca2f
push eax
call ebx
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40ca3a
push eax
call ebx
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40ca45
push eax
call ebx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40ca54
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40c84b
push eax
call ebx
jmp 0x40c84b
push 0x3e84
push 0
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x40ca8f
mov dword [esp + 0x10], 0x7fb
jmp 0x40ca05
push str.SERVER_WROTE
push edi
call fcn.00410fe0
mov ebp, dword [sym.imp.KERNEL32.dll_OpenEventA]
add esp, 8
push esi
push 0
push 0x100002
call ebp
mov dword [esp + 0x30], eax
test eax, eax
jne 0x40cac2
mov dword [esp + 0x10], 0x7fc
jmp 0x40ca05
push str.SERVER_READ
push edi
call fcn.00410fe0
add esp, 8
push esi
push 0
push 0x100002
call ebp
mov ebx, eax
test ebx, ebx
jne 0x40caed
mov dword [esp + 0x10], 0x7fc
jmp 0x40ca09
push str.CLIENT_WROTE
push edi
call fcn.00410fe0
add esp, 8
push esi
push 0
push 0x100002
call ebp
mov dword [esp + 0x20], eax
test eax, eax
jne 0x40cb1a
mov dword [esp + 0x10], 0x7fc
jmp 0x40ca09
push str.CLIENT_READ
push edi
call fcn.00410fe0
add esp, 8
push esi
push 0
push 0x100002
call ebp
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x40cb47
mov dword [esp + 0x10], 0x7fc
jmp 0x40ca09
push str.CONNECTION_CLOSED
push edi
call fcn.00410fe0
add esp, 8
push esi
push 0
push 0x100002
call ebp
mov ebp, eax
test ebp, ebp
jne 0x40cb72
mov dword [esp + 0x10], 0x7fc
jmp 0x40ca09
push ebx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x30]
push ebp
push ecx
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0x20]
push ebx
push eax
push ecx
push edx
call fcn.00427ad0
mov ecx, dword [esp + 0x5c]
add esp, 0x1c
mov dword [ecx], eax
jmp 0x40c84b
mov edi, dword [esp + 0x40]
jmp 0x40c84d
lea edx, [esi - 0x7d0]
cmp edx, 0x3b
ja 0x40cbc4
mov eax, dword [esi*4 + 0x522200]
jmp 0x40cbc9
mov eax, dword [0x526080]
mov ecx, dword [esp + 0x18]
mov edx, dword [str.HY000]
push ecx
push eax
mov eax, dword [esp + 0x4c]
push edx
push esi
push eax
call fcn.0040c4f0
add esp, 0x14
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0046e712
add esp, 0x54
ret
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0046e712
add esp, 0x54
ret