Function at 0x4020c0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d418
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x414008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [ebp + 8]
test esi, esi
jne 0x4020fc
lea eax, [esi + 1]
jmp 0x4023e1
mov ecx, esi
mov dword [ebp - 0x30], 0
xor eax, eax
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402123
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x40]
call fcn.00402c10
mov dword [ebp - 4], 0
cmp dword [ebp - 0x30], 0
mov ebx, dword [ebp - 0x40]
je 0x402386
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
mov edx, 0x40f384
cmovae ecx, ebx
call fcn.004051d0
test al, al
jne 0x40219c
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
mov edx, str.__typeupdatecenter
cmovae ecx, ebx
call fcn.004051d0
test al, al
jne 0x40219c
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
mov edx, str.__typemanusaferepair
cmovae ecx, ebx
call fcn.004051d0
test al, al
je 0x402386
push str.49F7842B_4B56_4F36_B720_F9A34011323F
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [edi + 8], eax
test eax, eax
jne 0x4021ba
or esi, 0xffffffff
jmp 0x40238b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x402306
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.CAB97D49_CEE6_4BDC_94AF_67AA7B8F28A9
push 0
push 0
push 0
mov dword [edi + 8], 0
call dword [sym.imp.USER32.dll_FindWindowExW]
mov esi, eax
test esi, esi
je 0x4022fc
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x4c], 0
push eax
push 2
push 0x4a
push esi
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
call dword [sym.imp.USER32.dll_SendMessageW]
cmp dword [0x414028], 0
je 0x4022fc
push 0
mov ecx, 0x414024
call fcn.00403020
mov eax, dword [0x414028]
cmp byte [eax + 0x54], 0
je 0x4022fc
cmp dword [eax + 0x58], 4
jb 0x4022fc
mov bl, byte [eax + 0x5c]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
push esi
push 0x40f54c
push eax
call fcn.00405630
lea eax, [ebp - 0x28]
push eax
push ecx
mov ecx, 0x414024
call fcn.004041c0
test bl, bl
je 0x4022a5
lea eax, [ebp - 0x28]
mov ecx, 0x414024
push eax
call fcn.00404830
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4022e5
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4022db
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4022db
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040be72
add esp, 8
mov ebx, dword [ebp - 0x40]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov esi, 2
jmp 0x40238b
push esi
lea ecx, [ebp - 0x28]
call fcn.00402b40
mov byte [ebp - 4], 2
lea eax, [ebp - 0x28]
push eax
mov ecx, edi
call fcn.00402400
mov esi, eax
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x402360
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402356
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402356
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040be72
add esp, 8
push dword [edi + 8]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], 0
jmp 0x40238b
mov esi, 1
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x4023cb
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x4023c1
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4023c1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push ebx
call fcn.0040be72
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
mov eax, esi
mov dword [ebp - 0x2c], 7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040be31
mov esp, ebp
pop ebp
ret 4