Function at 0x1005fa6
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x310
mov eax, dword [0x1010100]
xor eax, dword [ebp + 4]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
cmp edi, esi
mov dword [ebp - 4], eax
jne 0x1005fcf
mov eax, 0x80070057
jmp 0x10061ff
push edi
push 0x1002014
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], 1
call fcn.01004423
pop ecx
pop ecx
movsx eax, byte [esi + edi]
push eax
call fcn.0100740a
test eax, eax
pop ecx
jne 0x1005ffe
inc esi
cmp esi, 0xff
jb 0x1005fe6
push ebx
push esi
push edi
push 0xff
lea eax, [ebp - 0x210]
push eax
call fcn.010039ba
mov ebx, eax
test ebx, ebx
jl 0x10061d9
lea eax, [ebp - 0x210]
push eax
call fcn.010054ec
test eax, eax
je 0x1006041
push 0x1001fdc
call fcn.01004423
pop ecx
mov eax, 0x80004004
jmp 0x10061fe
push 0
push 5
push 2
call fcn.01005162
test eax, eax
mov edi, 0x100
lea eax, [ebp - 0x110]
je 0x1006062
push 0x1001fd4
jmp 0x1006067
push 0x1001270
push edi
push eax
call fcn.010032e8
mov ebx, eax
test ebx, ebx
jl 0x10061d9
push dword [0x101007c]
lea eax, [ebp - 0x110]
push edi
push eax
call fcn.01003a97
mov ebx, eax
test ebx, ebx
jl 0x10061d9
lea eax, [ebp - 0x210]
push eax
push edi
lea eax, [ebp - 0x110]
push eax
call fcn.01003a97
mov ebx, eax
test ebx, ebx
jl 0x10061d9
lea eax, [ebp - 0x110]
push eax
push 0x1001fac
call fcn.01004423
pop ecx
pop ecx
lea eax, [ebp - 0x110]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push 0xffffffffffffffff
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x10060ff
lea eax, [ebp - 0x110]
push eax
push 0x1001f94
call fcn.01004423
pop ecx
pop ecx
jmp 0x10061cd
push eax
lea eax, [ebp - 0x110]
push eax
push 0x1001f74
call fcn.01004423
add esp, 0xc
jmp 0x10061cd
mov ecx, dword [ebp + 8]
mov al, byte [esi + ecx]
inc esi
test al, al
je 0x10061d9
mov al, byte [esi + ecx]
test al, al
mov dword [ebp - 0x10], esi
je 0x1006151
movsx eax, al
push eax
call fcn.0100740a
test eax, eax
pop ecx
je 0x100614e
mov eax, dword [ebp + 8]
inc esi
mov al, byte [esi + eax]
test al, al
mov dword [ebp - 0x10], esi
jne 0x1006132
mov ecx, dword [ebp + 8]
lea edi, [esi + ecx]
cmp byte [edi], 0x2b
jne 0x1006160
and dword [ebp - 8], 0
inc esi
jmp 0x10061cd
mov al, byte [edi]
jmp 0x1006179
movsx eax, al
push eax
call fcn.0100740a
test eax, eax
pop ecx
jne 0x100617d
mov eax, dword [ebp + 8]
inc esi
mov al, byte [esi + eax]
test al, al
jne 0x1006164
mov eax, esi
sub eax, dword [ebp - 0x10]
push eax
push edi
push 0xff
lea eax, [ebp - 0x310]
push eax
call fcn.010039ba
mov ebx, eax
test ebx, ebx
jl 0x10061d9
cmp dword [ebp - 8], 0
je 0x10061a7
cmp dword [ebp + 0xc], 0
je 0x10061cd
push dword [ebp - 8]
lea eax, [ebp - 0x310]
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.01005bd3
mov ebx, eax
test ebx, ebx
jge 0x10061cd
cmp ebx, 0x80070002
jne 0x10061d9
xor ebx, ebx
cmp esi, 0xff
jb 0x1006119
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push 0x1001f64
call fcn.01004423
test ebx, ebx
pop ecx
jge 0x10061fc
push 0x1001f2c
call fcn.01004423
pop ecx
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
call fcn.0100708e
leave
ret 8