Function at 0x405720
Capabilities:
Check mutex on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b238
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x60
mov eax, dword [0x43e070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x38], edx
mov esi, ecx
mov eax, dword [ebx + 8]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x40], 0
push 1
lea eax, [ebp - 0x6c]
mov byte [ebp - 0x6c], 0
xorps xmm0, xmm0
mov word [ebp - 0x5b], 0
push eax
movups xmmword [ebp - 0x6b], xmm0
mov byte [ebp - 0x59], 0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
xorps xmm0, xmm0
mov dword [ebp - 0x58], 0xc
lea eax, [ebp - 0x6c]
movq qword [ebp - 0x54], xmm0
mov dword [ebp - 0x54], eax
xor eax, eax
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
push eax
push 0x80
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.00405370
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], 0
cmovae eax, dword [ebp - 0x2c]
xor ecx, ecx
push 7
push str.Global_
mov word [eax], cx
lea ecx, [ebp - 0x2c]
call fcn.00406e10
push 0xffffffffffffffff
push 0
push esi
lea ecx, [ebp - 0x2c]
call fcn.00406f40
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00406110
push 0x28
push str.MDL_E9624365_E188_497D_A83E_9FEE5F248714
lea ecx, [ebp - 0x2c]
call fcn.00406e10
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
push 0
lea eax, [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x40], ecx
call esi
cmp dword [ebp - 0x18], 8
lea ecx, [ebp - 0x2c]
mov edi, eax
mov dword [ebp - 0x1c], 0
cmovae ecx, dword [ebp - 0x2c]
xor eax, eax
mov word [ecx], ax
push 7
push str.Global_
lea ecx, [ebp - 0x2c]
call fcn.00406e10
push 0x28
push str.APP_78D84DC5_5F4F_4B57_8540_D4D89617ADA8
lea ecx, [ebp - 0x2c]
call fcn.00406e10
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
push eax
push 0
lea eax, [ebp - 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov ecx, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x30], ecx
call esi
cmp edi, 0xb7
jne 0x4058cf
mov esi, 1
jmp 0x4058e1
cmp eax, 0xb7
mov ecx, 2
mov esi, 0
cmove esi, ecx
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4058f2
xor ecx, ecx
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x405902
mov ecx, dword [ebp - 0x48]
xor edi, edi
mov dword [eax], ecx
jmp 0x405905
mov edi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x40591a
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.00405680
mov ecx, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
test edi, edi
je 0x405946
cmp edi, 0xffffffff
je 0x405946
push edi
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x405955
cmp eax, 0xffffffff
je 0x405955
push eax
call ecx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004127dd
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4