Function at 0x4040f2
Capabilities:
Check mutex on windows
Create thread

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push edi
mov ecx, str.SHARED_MEMORY
mov dword [esp + 0x10], edx
call fcn.00403ad6
mov ebx, eax
mov ecx, str.SYNCHRONIZE
mov dword [esp + 0x2c], ebx
call fcn.00403ad6
push eax
xor ebp, ebp
mov dword [esp + 0x34], eax
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
push 0xffffffffffffffff
push esi
mov dword [esp + 0x1c], esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
push 0x800
push ebp
push 0x18000004
push ebp
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [0x408398], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4042c4
push ebp
push ebp
push ebp
push 2
push dword [0x408398]
mov edi, ebp
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x404296
mov ecx, str.SHARED_MEMORY_READ
call fcn.00403ad6
push eax
xor edi, edi
mov dword [esp + 0x2c], eax
push edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esp + 0x24], eax
xor ebx, ebx
mov eax, dword [ebp]
inc ebx
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 4]
mov dword [esp + 0x20], eax
cmp dword [esp + 0x10], edi
jle 0x4041d8
mov esi, dword [esp + 0x10]
mov ebp, dword [esp + 0x38]
push dword [ebp + edi*4]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc ebx
add ebx, eax
inc edi
cmp edi, esi
jl 0x4041be
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
push ebx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
xor edi, edi
mov ebx, eax
cmp dword [esp + 0x10], edi
jle 0x40421e
mov esi, dword [esp + 0x10]
mov ebp, dword [esp + 0x38]
push dword [ebp + edi*4]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x4060d4
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
inc edi
cmp edi, esi
jl 0x4041fa
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
push ebx
lea eax, [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
xor ebp, ebp
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esp + 0x1c]
call dword [sym.imp.USER32.dll_AllowSetForegroundWindow]
push ebp
push ebp
push 0x8702
push dword [esp + 0x2c]
call dword [sym.imp.USER32.dll_PostThreadMessageA]
mov ebx, dword [esp + 0x24]
push 0x1388
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x28]
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [esp + 0x2c]
jmp 0x404298
xor ebp, ebp
push dword [0x408398]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x408398], ebp
test edi, edi
jne 0x404135
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, ebp
jmp 0x4042ea
push 0x40839c
push ebp
push ebp
push 0x404306
push ebp
push ebp
mov dword [0x4083b8], 0x40384d
call dword [sym.imp.msvcrt.dll__beginthreadex]
add esp, 0x18
mov dword [0x408394], eax
push dword [esp + 0x30]
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret