Function at 0x404fb0
Capabilities:
Check mutex on windows

Disassembly:
push 0xffffffffffffffff
push 0x4324bd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x80
push ebx
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push esi
push edi
lea eax, [esp + 0x44]
push 1
push eax
call ebp
mov ebx, dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push 0
push 0
lea ecx, [esp + 0x4c]
push 1
push ecx
call ebx
mov eax, dword [0x44723c]
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
push eax
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x48]
push 1
push ecx
mov dword [esp + 0x24], 0xc
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], 0
call edi
mov esi, eax
test esi, esi
jne 0x4050b2
mov dl, byte [esp + 0x13]
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x28], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x446fe0
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x28]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x405081
mov edi, dword [esp + 0x28]
mov ecx, ebx
mov eax, ecx
mov esi, 0x446fe0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
lea ecx, [esp + 0x24]
mov dword [esp + 0x98], 0
push ecx
lea ecx, [esp + 0x5c]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::runtime_error::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea edx, [esp + 0x58]
push 0x43bd40
push edx
mov dword [esp + 0x60], vtable.SystemError.0
call sub.MSVCRT.dll__CxxThrowException
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0xa4]
lea ecx, [esp + 0x44]
push 1
push ecx
mov dword [eax], esi
call ebp
xor ebp, ebp
lea edx, [esp + 0x44]
push ebp
push ebp
push 1
push edx
call ebx
mov ecx, dword [0x447238]
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x48]
push 1
push edx
mov dword [esp + 0x24], 0xc
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebp
call edi
mov esi, eax
cmp esi, ebp
jne 0x4051b6
mov al, byte [esp + 0x13]
push ebp
lea ecx, [esp + 0x28]
mov byte [esp + 0x28], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x446fe0
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x28]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40515e
mov edi, dword [esp + 0x28]
mov ecx, ebx
mov edx, ecx
mov esi, 0x446fe0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x58]
push eax
mov dword [esp + 0x9c], 1
mov dword [esp + 0x18], 0x446fe0
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
lea ecx, [esp + 0x24]
mov byte [esp + 0x98], 2
push ecx
lea ecx, [esp + 0x68]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea edx, [esp + 0x58]
push 0x43bd40
push edx
mov byte [esp + 0xa0], 1
mov dword [esp + 0x60], vtable.SystemError.0
call sub.MSVCRT.dll__CxxThrowException
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov eax, dword [esp + 0xa8]
mov dword [eax], esi
mov ecx, dword [0x447240]
push ecx
push ebp
push ebp
call edi
mov esi, eax
cmp esi, ebp
jne 0x40526a
mov edi, 0x446fe0
or ecx, 0xffffffff
xor eax, eax
mov dl, byte [esp + 0x13]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x34], dl
push ecx
push 0x446fe0
lea ecx, [esp + 0x3c]
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x48], ebp
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [esp + 0x14]
mov ebx, 3
push eax
lea ecx, [esp + 0x78]
mov dword [esp + 0x9c], ebx
mov dword [esp + 0x18], 0x446fe0
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
lea ecx, [esp + 0x34]
mov byte [esp + 0x98], 4
push ecx
lea ecx, [esp + 0x84]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea edx, [esp + 0x74]
push 0x43bd40
push edx
mov byte [esp + 0xa0], bl
mov dword [esp + 0x7c], vtable.SystemError.0
call sub.MSVCRT.dll__CxxThrowException
call ebx
cmp eax, 0xb7
jne 0x405275
xor esi, esi
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + 0x90]
pop edi
mov dword [eax], esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x8c
ret 0xc