Function at 0x4018e0
Capabilities:
Check mutex on windows

Disassembly:
push 0xffffffffffffffff
push 0x421dbb
mov eax, dword fs:[0]
push eax
sub esp, 0x13c
mov eax, dword [0x42c070]
xor eax, esp
mov dword [esp + 0x138], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42c070]
xor eax, esp
push eax
lea eax, [esp + 0x150]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x160]
mov ebx, 1
mov edi, ecx
mov dword [esp + 0x1c], edi
test byte [0x42dde8], bl
jne 0x40196a
or dword [0x42dde8], ebx
push 0
push 0
push 0
mov byte [0x42dde4], 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x42dde0], eax
test eax, eax
je 0x40195d
mov byte [0x42dde4], bl
push 0x422250
call fcn.00413e3b
add esp, 4
cmp byte [0x42dde4], 0
je 0x401981
mov eax, dword [0x42dde0]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 2
push 0
push 0
push 0x42d0ac
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x4019c6
push str.FindDevForHardID___SetupDiGetClassDevs_return_INVALID_HANDLE_VALUE.
call fcn.00412950
add esp, 4
cmp byte [0x42dde4], 0
je 0x4019be
mov ecx, dword [0x42dde0]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
or eax, 0xffffffff
jmp 0x401b9e
push 0x103
lea edx, [esp + 0x49]
push 0
push edx
mov byte [esp + 0x50], 0
call fcn.00418e90
mov dword [ebp], 0x1c
mov esi, dword [edi + 0x70]
add esp, 0xc
cmp esi, dword [edi + 0x74]
jbe 0x4019f3
call fcn.00414207
mov edi, dword [edi + 0x64]
mov ebx, esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ebx
push 0xd
xor esi, esi
push str.vid_12d1pid_
lea ecx, [esp + 0x30]
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], esi
mov byte [esp + 0x34], 0
call fcn.00407f80
mov dword [esp + 0x158], esi
cmp edi, esi
jne 0x401bc8
call fcn.00414207
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x401a43
call fcn.00414207
push esi
push ebx
or eax, 0xffffffff
lea esi, [esp + 0x30]
call fcn.00407540
mov eax, dword [esp + 0x18]
push ebp
xor esi, esi
push esi
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x401add
mov ebx, dword [esp + 0x18]
mov edi, ebp
call fcn.00401820
test eax, eax
je 0x401ac3
push 0x103
push eax
lea ecx, [esp + 0x4c]
push 0x104
push ecx
call fcn.0041464f
lea edx, [esp + 0x54]
push 0x104
push edx
call fcn.0041377b
mov eax, dword [esp + 0x44]
mov ebx, 0x10
add esp, 0x18
cmp dword [esp + 0x40], ebx
jae 0x401aad
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x48]
push eax
call fcn.004139d0
add esp, 8
test eax, eax
jne 0x401bd6
mov ecx, dword [esp + 0x18]
push ebp
inc esi
push esi
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x401a64
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
test edi, edi
jne 0x401bcf
call fcn.00414207
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x401af6
call fcn.00414207
add ebx, 0x38
mov dword [esp + 0x158], 0xffffffff
cmp dword [esp + 0x40], 0x10
mov dword [esp + 0x24], ebx
jb 0x401b1c
mov edx, dword [esp + 0x2c]
push edx
call fcn.0041300c
add esp, 4
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + 0x74]
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], 0
mov byte [esp + 0x2c], 0
cmp dword [eax + 0x70], esi
jbe 0x401b46
call fcn.00414207
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x64]
test edi, edi
je 0x401b51
cmp edi, eax
je 0x401b56
call fcn.00414207
cmp ebx, esi
jne 0x401a00
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [esp + 0x1c]
push 0
push 0x424da5
add ecx, 0x28
call fcn.00407f80
mov dword [esp + 0x18], 0xffffffff
cmp byte [0x42dde4], 0
je 0x401b9a
mov edx, dword [0x42dde0]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x150]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.00413017
add esp, 0x148
ret 8
mov eax, dword [edi]
jmp 0x401a39
mov eax, dword [edi]
jmp 0x401aec
cmp byte [esp + 0x164], 0
jne 0x401bf3
mov edi, dword [esp + 0x1c]
add edi, 0xc8
mov ecx, 7
mov esi, ebp
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x401c3d
call fcn.00414207
xor eax, eax
mov esi, dword [esp + 0x24]
cmp esi, dword [eax + 0x10]
jb 0x401c10
call fcn.00414207
mov ecx, dword [esp + 0x1c]
push 0xffffffffffffffff
push 0
push esi
add ecx, 0x28
call fcn.004077d0
cmp dword [esp + 0x40], ebx
jb 0x401b84
mov eax, dword [esp + 0x2c]
push eax
call fcn.0041300c
add esp, 4
jmp 0x401b84
mov eax, dword [eax]
jmp 0x401c02