Function at 0x100042c0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005217e
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x10072f40]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x18], 0
cmp dword [edi], 0
jne 0x10004515
mov dword [ebp - 4], 0
push 0x208
call fcn.1005025d
mov esi, eax
add esp, 4
test esi, esi
je 0x10004326
push 0x208
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
jmp 0x10004328
xor esi, esi
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 1
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], 1
mov byte [ebp - 4], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x24], esi
mov byte [ebp - 4], 2
mov eax, 1
mov dword [ebp - 0x18], eax
and eax, 0xfffffffe
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x1c], 0
call fcn.10004540
mov ecx, eax
test ecx, ecx
je 0x10004529
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 5
lea eax, [ebp - 0x10]
push dword [edi + 8]
push 0x1005d68c
push eax
call fcn.10004100
add esp, 0xc
lea ecx, [ebp - 0x10]
call fcn.100046c0
mov eax, dword [ebp - 0x10]
or ebx, 0xffffffff
cmp dword [eax - 0xc], 0
jl 0x10004435
push str._PID
push eax
call sub.VCRUNTIME140.dll_wcsstr
add esp, 8
test eax, eax
je 0x10004435
sub eax, dword [ebp - 0x10]
sar eax, 1
js 0x10004435
push 4
add eax, 5
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.10004720
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x14]
cmp dword [eax - 4], 1
jle 0x100043fb
push dword [eax - 0xc]
lea ecx, [ebp - 0x14]
call fcn.10004050
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 8]
mov dword [ebp - 0x20], ecx
lea ecx, [ebp - 0x20]
push 0x10
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstoul]
movzx eax, ax
add esp, 0xc
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 5
mov eax, ebx
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10004435
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1c]
movzx eax, ax
push eax
push str.Global2A4543DC_E12E_4524_9DCD_8E78C6EAC7BE__x
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [edi + 4], eax
test eax, eax
jne 0x10004465
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10004475
push 0xbb8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x100044b9
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x10004491
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x100044a5
push esi
call fcn.10050266
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push dword [edi + 8]
mov dword [edi + 0xc], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x100044e5
mov dword [edi], 0
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x10004501
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x10004515
push esi
call fcn.10050266
add esp, 4
mov eax, dword [edi]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10003510
int3