Function at 0x405bd0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ef76
mov eax, dword fs:[0]
push eax
sub esp, 0x548
mov eax, dword [0x448070]
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.00409380
cmp byte [ebp + 0xc], 0
mov dword [ebp - 4], 0
jne 0x405c57
push str.CHBAAPIInt::InitHBAAPIMod_bEthInst__false_hence_returning
push 0x44aca0
call sym.SetupBD.exe_public:_void___cdecl_CNcsDebug::Print_wchar_t_const__
mov bl, byte [ebp - 0x525]
add esp, 8
jmp 0x405cc1
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 0x405c8f
push 0x2710
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x405cf3
push esi
call ebx
push str.CHBAAPIInt::InitHBAAPIMod_failed_to_acquire_Mutex
push 0x44aca0
call sym.SetupBD.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 0x405cb4
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.00409470
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.0041b486
mov esp, ebp
pop ebp
ret 0xc
cmp dword [edi], 0
je 0x405d01
cmp byte [edi + 0xe1], 0
jne 0x405d0e
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 0x405d30
call ebx
push eax
push str.LoadLibrary_of_intlhapi.dll_failed____d
push 0x44aca0
call sym.SetupBD.exe_public:_void___cdecl_CNcsDebug::Print_wchar_t_const__
add esp, 0xc
jmp 0x405d49
push str.LoadLibrary_of_intlhapi.dll_succeeded
push 0x44aca0
call sym.SetupBD.exe_public:_void___cdecl_CNcsDebug::Print_wchar_t_const__
add esp, 8
mov byte [edi + 0xe1], 1
cmp dword [edi], 0
je 0x405fb1
push 0x104
lea eax, [ebp - 0x524]
push 0
push eax
call fcn.0041c090
push 0
push 0
push 0x104
lea eax, [ebp - 0x524]
push eax
push 0xffffffffffffffff
push str.INTEL_InitializeLibrary
push 0
push 0
call sym.SetupBD.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 0x405db3
push str.CHBAAPIInt::GetAdapterAtrributes_ConvertTCHARToChar_failed
push 0x44aca0
call sym.SetupBD.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 0x405ca1
lea eax, [ebp - 0x524]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405df4
call eax
test eax, eax
je 0x405df4
push eax
push str.CHBAAPIInt::GetAdapterAtrributes_InitializeLibrary_failed___Status____d
push 0x44aca0
call sym.SetupBD.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 0x405ca1
push 0x104
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.0041c090
push 0
push 0
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0xffffffffffffffff
push str.HBA_RegisterLibraryV2
push 0
push 0
call sym.SetupBD.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 0x405d8c
lea eax, [ebp - 0x420]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405e4e
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.0041c090
push 0
push 0
push 0x104
lea eax, [ebp - 0x31c]
push eax
push 0xffffffffffffffff
push str.INTEL_GetFCoEControllerInfo
push 0
push 0
call sym.SetupBD.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 0x405d8c
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 0x405f9c
push 0x104
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0041c090
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 0x405ef8
push str.Error_Getting_Handle
jmp 0x405d91
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.0041c090
push 0x104
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.0041ad3a
add esp, 0x1c
test eax, eax
je 0x405f5f
push str.memcpy_s_failed__return_error
push 0x44aca0
call sym.SetupBD.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 0x405ca1
push 0x104
push dword [ebp - 0x530]
lea eax, [ebp - 0x114]
push 0xffffffffffffffff
push eax
push 0
push 0
call sym.SetupBD.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 0x405d8c
mov ebx, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
mov byte [ebp - 0x525], 1
call ebx
jmp 0x405ca1
call ebx
push eax
push str.GetProcAddress_of_INTEL_GetControllerHandle_failed_with_error__d
push 0x44aca0
call sym.SetupBD.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 0x405ca1