Function at 0x4c9060
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ebx, [ebp - 0x2c]
mov dword [esp], ebx
mov dword [esp + 4], str.libusb_init_08X
mov dword [esp + 8], eax
call dbg.sprintf
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
sub esp, 0x10
test eax, eax
mov ebx, eax
je 0x4c9961
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test eax, eax
jne 0x4c98a0
add dword [0x56059c], 1
je 0x4c9110
xor edi, edi
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
sub esp, 0xc
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call dbg.get_windows_version
mov dword [esp + 0xc], str.Windows_Undefined
mov dword [esp + 8], str.windows_init
mov dword [esp + 4], 4
mov dword [esp], 0
call dbg.usbi_log
mov ecx, dword [0x560620]
test ecx, ecx
je 0x4c9458
mov dword [esp], 0x5bd34c
call dbg.usbi_mutex_init
call dbg.init_polling
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp], str.Cfgmgr32
call edi
sub esp, 4
test eax, eax
mov dword [0x5bd3a4], eax
je 0x4c9513
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esp + 4], str.CM_Get_Parent
mov dword [esp], eax
mov dword [ebp - 0x3c], eax
call esi
mov edx, dword [ebp - 0x3c]
sub esp, 8
test eax, eax
mov dword [0x5bd3a0], eax
je 0x4c94d3
mov eax, dword [0x5bd3a4]
mov dword [esp + 4], str.CM_Get_Child
mov dword [ebp - 0x3c], eax
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd39c], eax
je 0x4c95c7
mov eax, dword [0x5bd3a4]
mov dword [esp + 4], str.CM_Get_Sibling
mov dword [ebp - 0x3c], eax
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd398], eax
je 0x4c9582
mov eax, dword [0x5bd3a4]
mov dword [esp + 4], str.CM_Get_Device_IDA
mov dword [ebp - 0x3c], eax
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd394], eax
je 0x4c9540
mov dword [esp], str.AdvAPI32
call edi
sub esp, 4
test eax, eax
mov dword [0x5bd3b0], eax
je 0x4c9513
mov dword [esp + 4], str.RegQueryValueExW
mov dword [esp], eax
mov dword [ebp - 0x3c], eax
call esi
mov edx, dword [ebp - 0x3c]
sub esp, 8
test eax, eax
mov dword [0x5bd3ac], eax
je 0x4c9610
mov eax, dword [0x5bd3b0]
mov dword [esp + 4], str.RegCloseKey
mov dword [ebp - 0x3c], eax
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3a8], eax
je 0x4c9655
mov dword [esp], str.Kernel32
call edi
sub esp, 4
test eax, eax
mov dword [0x5bd3dc], eax
je 0x4c9513
mov dword [esp + 4], str.IsWow64Process
mov dword [esp], eax
mov dword [ebp - 0x3c], eax
call esi
mov edx, dword [ebp - 0x3c]
sub esp, 8
test eax, eax
mov dword [0x5bd3d8], eax
je 0x4c9928
mov dword [esp], str.OLE32
call edi
sub esp, 4
test eax, eax
mov dword [0x5bd3e4], eax
je 0x4c9513
mov dword [esp + 4], str.CLSIDFromString
mov dword [esp], eax
mov dword [ebp - 0x3c], eax
call esi
mov edx, dword [ebp - 0x3c]
sub esp, 8
test eax, eax
mov dword [0x5bd3e0], eax
je 0x4c96a0
mov dword [esp], str.SetupAPI
call edi
sub esp, 4
test eax, eax
mov edi, eax
mov dword [0x5bd3d4], eax
je 0x4c9513
mov dword [esp + 4], str.SetupDiGetClassDevsA
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3d0], eax
je 0x4c96e5
mov edi, dword [0x5bd3d4]
mov dword [esp + 4], str.SetupDiEnumDeviceInfo
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3cc], eax
je 0x4c9860
mov edi, dword [0x5bd3d4]
mov dword [esp + 4], str.SetupDiEnumDeviceInterfaces
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3c8], eax
je 0x4c9820
mov edi, dword [0x5bd3d4]
mov dword [esp + 4], str.SetupDiGetDeviceInterfaceDetailA
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3c4], eax
je 0x4c97e1
mov edi, dword [0x5bd3d4]
mov dword [esp + 4], str.SetupDiDestroyDeviceInfoList
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3c0], eax
je 0x4c97a2
mov edi, dword [0x5bd3d4]
mov dword [esp + 4], str.SetupDiOpenDevRegKey
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3bc], eax
je 0x4c9763
mov edi, dword [0x5bd3d4]
mov dword [esp + 4], str.SetupDiGetDeviceRegistryPropertyA
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3b8], eax
je 0x4c9724
mov edi, dword [0x5bd3d4]
mov dword [esp + 4], str.SetupDiOpenDeviceInterfaceRegKey
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3b4], eax
je 0x4c98e9
mov esi, 0x598310
mov eax, dword [ebp + 8]
mov dword [esp], 0xffffffff
mov dword [esp + 4], eax
call dword [esi]
add esi, 0x50
cmp esi, 0x5984a0
jne 0x4c941a
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.windows_common_init
test eax, eax
mov edi, eax
jne 0x4c9480
cmp dword [0x56059c], 0
je 0x4c90db
jmp 0x4c90d9
mov eax, dword [ebp + 8]
mov edi, 0xfffffff4
mov dword [esp + 0xc], str.This_version_of_Windows_is_NOT_supported
mov dword [esp + 8], str.windows_init
mov dword [esp + 4], 1
mov dword [esp], eax
call dbg.usbi_log
mov eax, dword [0x56059c]
mov esi, 0x598314
test eax, eax
jne 0x4c94c6
nop
mov dword [esp], 0xffffffff
call dword [esi]
add esi, 0x50
cmp esi, 0x5984a4
jne 0x4c9490
call dbg.exit_dlls
call dbg.exit_polling
nop
call dbg.windows_common_exit
mov dword [esp], 0x5bd34c
call dbg.usbi_mutex_destroy
mov eax, dword [0x56059c]
sub eax, 1
mov dword [0x56059c], eax
jmp 0x4c90db
mov dword [esp], edx
mov dword [ebp - 0x3c], edx
mov dword [esp + 4], str.CM_Get_ParentA
call esi
mov edx, dword [ebp - 0x3c]
sub esp, 8
test eax, eax
mov dword [0x5bd3a0], eax
jne 0x4c91a0
mov dword [esp + 4], str.CM_Get_ParentW
mov dword [esp], edx
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3a0], eax
jne 0x4c91a0
mov eax, dword [ebp + 8]
mov edi, 0xffffff9d
mov dword [esp + 0xc], 0x5961b8
mov dword [esp + 8], str.windows_init
mov dword [esp + 4], 1
mov dword [esp], eax
call dbg.usbi_log
jmp 0x4c9480
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.CM_Get_Device_IDAA
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd394], eax
jne 0x4c920f
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.CM_Get_Device_IDAW
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd394], eax
jne 0x4c920f
jmp 0x4c9513
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.CM_Get_SiblingA
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd398], eax
jne 0x4c91ea
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.CM_Get_SiblingW
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd398], eax
jne 0x4c91ea
jmp 0x4c9513
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.CM_Get_ChildA
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd39c], eax
jne 0x4c91c5
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.CM_Get_ChildW
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd39c], eax
jne 0x4c91c5
jmp 0x4c9513
mov dword [esp], edx
mov dword [ebp - 0x3c], edx
mov dword [esp + 4], str.RegQueryValueExWA
call esi
mov edx, dword [ebp - 0x3c]
sub esp, 8
test eax, eax
mov dword [0x5bd3ac], eax
jne 0x4c924b
mov dword [esp + 4], str.RegQueryValueExWW
mov dword [esp], edx
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3ac], eax
jne 0x4c924b
jmp 0x4c9513
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.RegCloseKeyA
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3a8], eax
jne 0x4c9270
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], str.RegCloseKeyW
mov dword [esp], eax
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3a8], eax
jne 0x4c9270
jmp 0x4c9513
mov dword [esp], edx
mov dword [ebp - 0x3c], edx
mov dword [esp + 4], str.CLSIDFromStringA
call esi
mov edx, dword [ebp - 0x3c]
sub esp, 8
test eax, eax
mov dword [0x5bd3e0], eax
jne 0x4c92e8
mov dword [esp + 4], str.CLSIDFromStringW
mov dword [esp], edx
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3e0], eax
jne 0x4c92e8
jmp 0x4c9513
mov dword [esp + 4], str.SetupDiGetClassDevsAA
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3d0], eax
jne 0x4c9320
mov dword [esp + 4], str.SetupDiGetClassDevsAW
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3d0], eax
jne 0x4c9320
jmp 0x4c9513
mov dword [esp + 4], str.SetupDiGetDeviceRegistryPropertyAA
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3b8], eax
jne 0x4c93f2
mov dword [esp + 4], str.SetupDiGetDeviceRegistryPropertyAW
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3b8], eax
jne 0x4c93f2
jmp 0x4c9513
mov dword [esp + 4], str.SetupDiOpenDevRegKeyA
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3bc], eax
jne 0x4c93cf
mov dword [esp + 4], str.SetupDiOpenDevRegKeyW
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3bc], eax
jne 0x4c93cf
jmp 0x4c9513
mov dword [esp + 4], str.SetupDiDestroyDeviceInfoListA
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3c0], eax
jne 0x4c93ac
mov dword [esp + 4], str.SetupDiDestroyDeviceInfoListW
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3c0], eax
jne 0x4c93ac
jmp 0x4c9513
mov dword [esp + 4], str.SetupDiGetDeviceInterfaceDetailAA
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3c4], eax
jne 0x4c9389
mov dword [esp + 4], str.SetupDiGetDeviceInterfaceDetailAW
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3c4], eax
jne 0x4c9389
jmp 0x4c9513
mov dword [esp + 4], str.SetupDiEnumDeviceInterfacesA
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3c8], eax
jne 0x4c9366
mov dword [esp + 4], str.SetupDiEnumDeviceInterfacesW
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3c8], eax
jne 0x4c9366
jmp 0x4c9513
mov dword [esp + 4], str.SetupDiEnumDeviceInfoA
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3cc], eax
jne 0x4c9343
mov dword [esp + 4], str.SetupDiEnumDeviceInfoW
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3cc], eax
jne 0x4c9343
jmp 0x4c9513
mov dword [esp], 0
call dbg.windows_error_str
mov dword [esp + 0xc], str.failure_to_access_semaphore:__s
mov dword [esp + 8], str.windows_init
mov dword [esp + 4], 1
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.usbi_log
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xfffffff5
sub esp, 4
jmp 0x4c9105
mov dword [esp + 4], str.SetupDiOpenDeviceInterfaceRegKeyA
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3b4], eax
jne 0x4c9415
mov dword [esp + 4], str.SetupDiOpenDeviceInterfaceRegKeyW
mov dword [esp], edi
call esi
sub esp, 8
test eax, eax
mov dword [0x5bd3b4], eax
jne 0x4c9415
jmp 0x4c9513
mov dword [esp], edx
mov dword [esp + 4], str.IsWow64ProcessA
call esi
mov edx, dword [ebp - 0x3c]
sub esp, 8
test eax, eax
mov dword [0x5bd3d8], eax
jne 0x4c92ac
mov dword [esp], edx
mov dword [esp + 4], str.IsWow64ProcessW
call esi
push edx
push edx
mov dword [0x5bd3d8], eax
jmp 0x4c92ac
mov dword [esp], 0
call dbg.windows_error_str
mov dword [esp + 0xc], str.could_not_create_semaphore:__s
mov dword [esp + 8], str.windows_init
mov dword [esp + 4], 1
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.usbi_log
mov eax, 0xfffffff5
jmp 0x4c9105