Function at 0x1003f3f
Capabilities:
Check mutex on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x100502c]
and dword [ebp - 0x88], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], eax
mov ebx, 0x1001558
lea eax, [ebp - 0x84]
push ebx
push eax
mov esi, ecx
call dword [sym.imp.msvcrt.dll_wcscpy]
push ebx
call dword [sym.imp.msvcrt.dll_wcslen]
lea ebx, [ebp + eax*2 - 0x84]
movzx eax, byte [edi + 0xf]
push eax
movzx eax, byte [edi + 0xe]
push eax
movzx eax, byte [edi + 0xd]
push eax
movzx eax, byte [edi + 0xc]
push eax
movzx eax, byte [edi + 0xb]
push eax
movzx eax, byte [edi + 0xa]
push eax
movzx eax, byte [edi + 9]
push eax
movzx eax, byte [edi + 8]
push eax
movzx eax, word [edi + 6]
push eax
movzx eax, word [edi + 4]
push eax
push dword [edi]
push 0x10014c0
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x40
lea eax, [ebp - 0x84]
push eax
xor edi, edi
push edi
mov word [ebx], 0x4d
call fcn.010031e3
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, edi
mov dword [esi + 0x18], eax
je 0x10040e2
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
je 0x1004009
cmp eax, edi
je 0x1004009
mov ebx, 0x80004005
jmp 0x10040e7
push edi
push edi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, edi
mov dword [esi + 0x10], eax
je 0x10040e2
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0xc]
mov word [ebx], 0x46
push edi
push 4
call fcn.010031e3
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, edi
mov dword [esi + 0x14], eax
je 0x1003fff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x100405d
mov dword [ebp - 0x88], 1
test byte [ebp + 0x12], 1
je 0x1004072
cmp dword [ebp - 0x88], edi
jne 0x1004072
mov ebx, 0x80158180
jmp 0x10040e7
push edi
push edi
push edi
push 0xf001f
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
mov dword [esi + 4], eax
je 0x10040e2
mov eax, dword [ebp + 0xc]
push 0x18
pop ecx
xor edx, edx
div ecx
lea ecx, [ebp - 0x84]
push ecx
mov word [ebx], 0x53
inc eax
push eax
push edi
mov dword [ebp - 0x8c], eax
call fcn.010031e3
push eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
cmp eax, edi
mov dword [esi + 0x20], eax
je 0x10040e2
lea eax, [ebp - 0x84]
push eax
push dword [ebp - 0x8c]
mov word [ebx], 0x45
push edi
call fcn.010031e3
push eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
cmp eax, edi
mov dword [esi + 0x1c], eax
jne 0x100410a
mov ebx, 0x8007000e
mov ecx, esi
call fcn.01003d54
mov eax, dword [esi + 0x18]
cmp eax, edi
je 0x1004166
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x18], edi
jmp 0x1004166
cmp dword [ebp - 0x88], edi
mov ecx, dword [esi + 4]
mov dword [esi + 8], ecx
jne 0x1004149
mov eax, dword [ebp + 0x10]
and eax, 0xffff
mov dword [ecx], eax
mov eax, dword [esi + 8]
mov dword [eax + 4], edi
mov eax, dword [esi + 8]
mov dword [eax + 8], edi
mov ecx, dword [esi + 8]
mov eax, dword [ebp + 0xc]
add eax, 0xffffffe8
mov dword [ecx + 0x10], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 0x10]
mov dword [eax + 0xc], ecx
mov eax, dword [esi + 8]
mov dword [eax + 0x14], edi
mov eax, dword [esi + 8]
lea ecx, [eax + 0x18]
mov dword [esi + 0xc], ecx
mov dword [esi], 0x514d5344
inc dword [eax + 0x14]
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor ebx, ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
pop ebx
call fcn.01002dbd
leave
ret 0xc