Function at 0x408840
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40fcf0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x416008]
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 esi, ecx
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push eax
push 0x408c40
push 6
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
test eax, eax
je 0x408b31
cmp dword [ebp - 0x44], 0
je 0x408b31
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 4], 1
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x40]
push str.9CDB4DA2_ACEA_446E_AA3A_D25628140939__d__p
push eax
call fcn.00405650
add esp, 0x10
lea eax, [ebp - 0x40]
cmp dword [ebp - 0x2c], 8
cmovae eax, dword [ebp - 0x40]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esi], eax
test eax, eax
jne 0x4089e5
cmp dword [0x41605c], eax
je 0x408ad5
push eax
mov ecx, 0x416058
call fcn.00408fa0
mov eax, dword [0x41605c]
cmp byte [eax + 0x54], 0
je 0x408ad5
cmp dword [eax + 0x58], 4
jb 0x408ad5
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], 2
lea ecx, [ebp - 0x28]
push 0x1a
push 0x411b4c
call fcn.00402b30
push 0x2d
push str.RC::RCModuleThreadSync::AcquireLock
push ecx
lea eax, [ebp - 0x28]
push eax
push ecx
mov ecx, 0x416058
call fcn.0040a3d0
test bl, bl
je 0x40898c
lea eax, [ebp - 0x28]
mov ecx, 0x416058
push eax
call fcn.0040aa60
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4089cc
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4089c2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4089c2
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040d8bc
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
jmp 0x408ad5
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4089fb
mov byte [esi + 4], 1
jmp 0x408ad5
push ecx
mov ecx, 0x416058
call fcn.0040a390
mov edi, eax
test edi, edi
je 0x408ac3
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], 3
lea ecx, [ebp - 0x28]
push 0x1c
push 0x411b84
call fcn.00402b30
push 0x37
push str.RC::RCModuleThreadSync::AcquireLock
push ecx
lea eax, [ebp - 0x28]
push eax
push ecx
mov ecx, 0x416058
call fcn.0040a3d0
cmp edi, 1
jbe 0x408a6f
lea eax, [ebp - 0x28]
mov ecx, 0x416058
push eax
call fcn.0040aa60
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x408aaf
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408aa5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408aa5
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040d8bc
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
push dword [esi]
mov byte [esi + 4], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x408b18
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408b0e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408b0e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040d8bc
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
jmp 0x408c1a
cmp dword [0x41605c], 0
je 0x408c1a
push 0
mov ecx, 0x416058
call fcn.00408fa0
mov eax, dword [0x41605c]
cmp byte [eax + 0x54], 0
je 0x408c1a
cmp dword [eax + 0x58], 4
jb 0x408c1a
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 dword [ebp - 4], eax
lea ecx, [ebp - 0x28]
push 0x1a
push 0x411984
call fcn.00402b30
push 0x22
push str.RC::RCModuleThreadSync::AcquireLock
push ecx
lea eax, [ebp - 0x28]
push eax
push ecx
mov ecx, 0x416058
call fcn.0040a3d0
test bl, bl
je 0x408bc3
lea eax, [ebp - 0x28]
mov ecx, 0x416058
push eax
call fcn.0040aa60
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x408c06
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408bfc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x408bfc
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040d8bc
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
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.0040d87b
mov esp, ebp
pop ebp
ret