Function at 0x1004702
Capabilities:
Check mutex on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x1008018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x40
lea eax, [ebp - 0x84]
mov dword [ebp - 0x88], eax
pop eax
push 0x1000
mov esi, ecx
lea ecx, [ebp - 0x90]
push ecx
lea ecx, [ebp - 0x88]
push ecx
push 0x1001578
push eax
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x84]
xor ebx, ebx
push eax
mov dword [ebp - 0x8c], ebx
call fcn.01004594
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]
mov edi, dword [ebp - 0x88]
push 0x10014e0
push dword [ebp - 0x90]
push edi
call fcn.01003647
add esp, 0x38
push 0x4d
pop eax
mov word [edi], ax
lea eax, [ebp - 0x84]
push eax
push ebx
call fcn.01003304
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 0x18], eax
cmp eax, ebx
je 0x10048d1
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x80
je 0x10047e8
cmp eax, ebx
jne 0x1004826
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x10], eax
cmp eax, ebx
je 0x10048d1
push 0x46
pop eax
mov word [edi], ax
lea eax, [ebp - 0x84]
push eax
push dword [ebp + 0xc]
push ebx
push 4
call fcn.01003304
push eax
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 0x14], eax
cmp eax, ebx
jne 0x1004830
mov edi, 0x80004005
jmp 0x10048d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1004847
mov dword [ebp - 0x8c], 1
test dword [ebp + 0x10], 0x10000
je 0x100485f
cmp dword [ebp - 0x8c], ebx
jne 0x100485f
mov edi, 0x80158180
jmp 0x10048d6
push ebx
push ebx
push ebx
push 0xf001f
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 4], eax
cmp eax, ebx
je 0x10048d1
push 0x53
pop eax
push 0x18
pop ecx
mov word [edi], ax
mov eax, dword [ebp + 0xc]
xor edx, edx
div ecx
lea ecx, [ebp - 0x84]
push ecx
inc eax
push eax
push ebx
mov dword [ebp - 0x88], eax
call fcn.01003304
push eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov dword [esi + 0x20], eax
cmp eax, ebx
je 0x10048d1
push 0x45
pop eax
mov word [edi], ax
lea eax, [ebp - 0x84]
push eax
push dword [ebp - 0x88]
push ebx
call fcn.01003304
push eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov dword [esi + 0x1c], eax
cmp eax, ebx
jne 0x10048f9
mov edi, 0x8007000e
mov ecx, esi
call fcn.01004233
mov eax, dword [esi + 0x18]
cmp eax, ebx
je 0x1004951
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x18], ebx
jmp 0x1004951
mov eax, dword [esi + 4]
mov dword [esi + 8], eax
cmp dword [ebp - 0x8c], ebx
jne 0x1004934
movzx ecx, word [ebp + 0x10]
mov dword [eax], ecx
mov eax, dword [esi + 8]
mov dword [eax + 4], ebx
mov eax, dword [esi + 8]
mov dword [eax + 8], ebx
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], ebx
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 edi, edi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.010030c4
leave
ret 0xc