Function at 0x10012900
Capabilities:
Check mutex on windows

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi]
mov edx, dword [eax + 8]
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
mov ecx, esi
call edx
test eax, eax
je 0x10005919
mov esi, dword [esi + 4]
test esi, esi
je 0x10005919
lea ecx, [esi + 0x28]
mov edx, eax
pop esi
jmp 0x10012900
pop esi
ret
push ebp
lea ebp, [esp - 0x100c]
mov eax, 0x100c
call fcn.1001bd30
push 0xffffffffffffffff
push 0x10021370
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x1002b024]
xor eax, ebp
mov dword [ebp + 0x1008], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor ebx, ebx
xor eax, eax
mov esi, ecx
mov dword [ebp - 0x14], esi
mov edi, edx
mov byte [ebp - 0x60], bl
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 4], ebx
mov byte [ebp - 0x44], bl
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
push 0x7fe
lea ecx, [ebp + 0x80a]
push ebx
push ecx
mov byte [ebp], bl
mov byte [ebp + 1], bl
mov byte [ebp + 2], bl
mov byte [ebp + 3], bl
mov byte [ebp + 4], bl
mov byte [ebp + 5], 1
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], ebx
mov word [ebp + 0x808], ax
call fcn.100144d0
push 0x7fe
lea eax, [ebp + 0xa]
xor edx, edx
push ebx
push eax
mov word [ebp + 8], dx
call fcn.100144d0
add esp, 0x18
mov byte [ebp - 4], 2
call fcn.1000e700
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x100129df
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 8], ebx
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x100129f0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0xc], ebx
push 0x1f0001
lea ecx, [ebp]
push ecx
lea edx, [ebp - 0x60]
push edx
call fcn.1000f7a0
push 0x1f0003
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.1000f7a0
cmp edi, ebx
je 0x10012a90
mov eax, edi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x10012a20
sub eax, edx
sar eax, 1
je 0x10012a90
push 0x10025a40
lea edx, [ebp + 0x808]
push 0x400
push edx
call fcn.1001302e
push 0xffffffffffffffff
push edi
lea eax, [ebp + 0x808]
push 0x400
push eax
call fcn.10013e9b
push 0x10025a48
lea edx, [ebp + 8]
lea ecx, [ebp + 0x808]
push 0x400
push edx
mov dword [ebp - 0x1c], ecx
call fcn.1001302e
push 0xffffffffffffffff
push edi
lea eax, [ebp + 8]
push 0x400
push eax
call fcn.10013e9b
add esp, 0x38
lea edi, [ebp + 8]
jmp 0x10012a93
mov edi, dword [ebp - 0x28]
movzx eax, byte [ebp - 0x60]
mov edx, dword [ebp - 0x1c]
neg eax
push edx
sbb eax, eax
lea ecx, [ebp - 0x50]
and eax, ecx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi + 8], eax
cmp eax, ebx
je 0x10012b32
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x10012ad1
cmp dword [ebp - 0x18], ebx
je 0x10012ad1
mov eax, dword [esi + 8]
push eax
call fcn.1000f990
add esp, 4
movzx eax, byte [ebp - 0x44]
push edi
neg eax
push 0x10
sbb eax, eax
lea ecx, [ebp - 0x34]
and eax, ecx
push 0x10
push eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov dword [esi + 0xc], eax
cmp eax, ebx
je 0x10012b1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x10012b0f
cmp dword [ebp - 0x18], ebx
je 0x10012b0f
mov edx, dword [esi + 0xc]
push edx
call fcn.1000f990
add esp, 4
mov dword [esi + 4], 0x10
mov edi, 1
jmp 0x10012b5f
push 0x10026b2c
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x24], 0xffffffff
call fcn.10014cdc
push 0x10026b2c
lea ecx, [ebp - 0x20]
push ecx
mov dword [ebp - 0x20], 0xffffffff
call fcn.10014cdc
mov esi, dword [ebp - 0x14]
call fcn.100128d0
mov dword [ebp - 0x14], 0
mov eax, 0x10012b5c
ret
lea esi, [ebp - 0x44]
call fcn.1000f750
lea esi, [ebp - 0x60]
call fcn.1000f750
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1008]
xor ecx, ebp
call fcn.10012c7f
add ebp, 0x100c
mov esp, ebp
pop ebp
ret