Function at 0x405b80
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4245a6
mov eax, dword fs:[0]
push eax
sub esp, 0x548
mov eax, dword [0x439010]
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 eax, dword [ebp + 8]
lea ecx, [ebp - 0x554]
mov dword [ebp - 0x534], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x530], eax
lea eax, [ebp - 0x525]
push eax
push str.CHBAAPIInt::InitHBAAPIMod
mov byte [ebp - 0x525], 0
call fcn.00408740
cmp byte [ebp + 0xc], 0
mov dword [ebp - 4], 0
jne 0x405c07
push str.CHBAAPIInt::InitHBAAPIMod_bEthInst__false_hence_returning
push 0x43bf64
call sym.Prounstl.exe_public:_void___cdecl_CNcsDebug::Print_wchar_t_const__
mov bl, byte [ebp - 0x525]
add esp, 8
jmp 0x405c71
push str.GlobalCHBAAPINTMUT
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov esi, eax
mov dword [ebp - 0x53c], esi
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov byte [ebp - 4], 1
test esi, esi
je 0x405c3f
push 0x2710
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x405ca3
push esi
call ebx
push str.CHBAAPIInt::InitHBAAPIMod_failed_to_acquire_Mutex
push 0x43bf64
call sym.Prounstl.exe_public:_void___cdecl_CNcsDebug::Print_wchar_t_const__
add esp, 8
mov al, byte [ebp - 0x525]
mov byte [ebp - 0x526], al
test esi, esi
je 0x405c64
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [ebp - 0x526]
lea ecx, [ebp - 0x554]
mov dword [ebp - 4], 0xffffffff
call fcn.00408830
mov al, bl
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.00413026
mov esp, ebp
pop ebp
ret 0xc
cmp dword [edi], 0
je 0x405cb1
cmp byte [edi + 0xe1], 0
jne 0x405cbe
push str.intlhapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi], eax
cmp dword [edi], 0
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x405ce0
call ebx
push eax
push str.LoadLibrary_of_intlhapi.dll_failed____d
push 0x43bf64
call sym.Prounstl.exe_public:_void___cdecl_CNcsDebug::Print_wchar_t_const__
add esp, 0xc
jmp 0x405cf9
push str.LoadLibrary_of_intlhapi.dll_succeeded
push 0x43bf64
call sym.Prounstl.exe_public:_void___cdecl_CNcsDebug::Print_wchar_t_const__
add esp, 8
mov byte [edi + 0xe1], 1
cmp dword [edi], 0
je 0x405f61
push 0x104
lea eax, [ebp - 0x524]
push 0
push eax
call fcn.00413c30
push 0
push 0
push 0x104
lea eax, [ebp - 0x524]
push eax
push 0xffffffffffffffff
push str.INTEL_InitializeLibrary
push 0
push 0
call sym.Prounstl.exe_public:_static_int___cdecl_CNcsString::NcsWideCharToMultiByte_unsigned_int__unsigned_long_int__wchar_t_const___int__char___int__char_const___int__
add esp, 0x2c
test eax, eax
jg 0x405d63
push str.CHBAAPIInt::GetAdapterAtrributes_ConvertTCHARToChar_failed
push 0x43bf64
call sym.Prounstl.exe_public:_void___cdecl_CNcsDebug::Print_wchar_t_const__
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
add esp, 8
mov byte [ebp - 0x525], 0
push esi
call ebx
jmp 0x405c51
lea eax, [ebp - 0x524]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405da4
call eax
test eax, eax
je 0x405da4
push eax
push str.CHBAAPIInt::GetAdapterAtrributes_InitializeLibrary_failed___Status____d
push 0x43bf64
call sym.Prounstl.exe_public:_void___cdecl_CNcsDebug::Print_wchar_t_const__
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
add esp, 0xc
mov byte [ebp - 0x525], 0
push esi
call ebx
jmp 0x405c51
push 0x104
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.00413c30
push 0
push 0
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0xffffffffffffffff
push str.HBA_RegisterLibraryV2
push 0
push 0
call sym.Prounstl.exe_public:_static_int___cdecl_CNcsString::NcsWideCharToMultiByte_unsigned_int__unsigned_long_int__wchar_t_const___int__char___int__char_const___int__
add esp, 0x2c
test eax, eax
jle 0x405d3c
lea eax, [ebp - 0x420]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405dfe
lea ecx, [edi + 8]
push ecx
call eax
add esp, 4
push 0x104
lea eax, [ebp - 0x31c]
mov byte [edi + 0xe0], 1
push 0
push eax
call fcn.00413c30
push 0
push 0
push 0x104
lea eax, [ebp - 0x31c]
push eax
push 0xffffffffffffffff
push str.INTEL_GetFCoEControllerInfo
push 0
push 0
call sym.Prounstl.exe_public:_static_int___cdecl_CNcsString::NcsWideCharToMultiByte_unsigned_int__unsigned_long_int__wchar_t_const___int__char___int__char_const___int__
add esp, 0x2c
test eax, eax
jle 0x405d3c
lea eax, [ebp - 0x31c]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x538], eax
test eax, eax
je 0x405f4c
push 0x104
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00413c30
lea eax, [ebp - 0x218]
mov dword [ebp - 0x52c], 0
push eax
lea eax, [ebp - 0x52c]
push eax
push dword [ebp - 0x534]
call dword [ebp - 0x538]
add esp, 0x18
test eax, eax
je 0x405ea8
push str.Error_Getting_Handle
jmp 0x405d41
mov eax, dword [ebp - 0x52c]
push 0x103
mov dword [edi + 4], eax
lea eax, [ebp - 0x113]
push 0
push eax
mov byte [ebp - 0x114], 0
call fcn.00413c30
push 0x104
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.004128da
add esp, 0x1c
test eax, eax
je 0x405f0f
push str.memcpy_s_failed__return_error
push 0x43bf64
call sym.Prounstl.exe_public:_void___cdecl_CNcsDebug::Print_wchar_t_const__
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
add esp, 8
push esi
call ebx
jmp 0x405c51
push 0x104
push dword [ebp - 0x530]
lea eax, [ebp - 0x114]
push 0xffffffffffffffff
push eax
push 0
push 0
call sym.Prounstl.exe_public:_static_int___cdecl_CNcsString::NcsMultiByteToWideChar_unsigned_int__unsigned_long_int__char_const___int__wchar_t___int_
add esp, 0x18
test eax, eax
jle 0x405d3c
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
mov byte [ebp - 0x525], 1
call ebx
jmp 0x405c51
call ebx
push eax
push str.GetProcAddress_of_INTEL_GetControllerHandle_failed_with_error__d
push 0x43bf64
call sym.Prounstl.exe_public:_void___cdecl_CNcsDebug::Print_wchar_t_const__
add esp, 0xc
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call ebx
jmp 0x405c51