Function at 0x10001170
Capabilities:
Print debug messages
Query or enumerate registry value

Disassembly:
sub esp, 0x14c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x148], eax
mov eax, dword [esp + 0x150]
mov ecx, dword [esp + 0x154]
push ebx
push esi
push edi
mov edi, dword [esp + 0x164]
push 0x12
xor ebx, ebx
push ebx
push ebx
push 0x1000b190
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x34], edi
mov dword [esp + 0x2c], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x18], esi
jne 0x1000121e
push 0xff
lea edx, [esp + 0x59]
push ebx
push edx
mov byte [esp + 0x60], bl
call fcn.10002020
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x58]
push str._USBIO__SSUSBOPEN:_SetupDiGetClassDevs_fail_____d__n
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x148]
xor ecx, esp
call fcn.10002005
add esp, 0x14c
ret
mov dword [esp + 0x38], 0x1c
mov dword [esp + 0x20], ebx
push ebp
jmp 0x10001230
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x3c]
push edx
push eax
push 0x1000b190
push ebx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x10001278
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x103
jne 0x10001535
push eax
push str._USB_EP0_IO_Module__SetupDiEnumDeviceInterfaces___ERROR_error_code___d
call fcn.10001000
add esp, 8
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor eax, eax
jmp 0x100015da
cmp edi, ebx
je 0x1000143f
cmp byte [edi], 0
je 0x1000143f
cmp byte [edi + 1], 0
je 0x1000143f
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x18], ebx
mov ebx, 4
push 0x200
mov dword [esp + 0x18], ebx
call fcn.100021f8
push 0x200
mov ebp, eax
call fcn.100021f8
add esp, 8
test ebp, ebp
mov esi, eax
mov dword [esp + 0x10], 0
je 0x10001427
test esi, esi
je 0x1000141e
push 0x200
push 0
push ebp
call fcn.10002020
push 0x200
push 0
push esi
call fcn.10002020
mov edx, dword [esp + 0x34]
add esp, 0x18
push 0x20019
push 0
lea ecx, [esp + 0x44]
push ecx
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDeviceInterfaceRegKey]
mov edi, eax
test edi, edi
je 0x10001549
cmp edi, 0xffffffff
je 0x10001549
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x20]
push edx
push 0
push str.Port_Number
mov dword [esp + 0x28], ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push edi
mov dword [esp + 0x30], 0
call ebx
test eax, eax
je 0x10001381
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
call fcn.1000211b
push esi
call fcn.1000211b
push str._USB_EP0_IO_Module__Get_Port_Name_Fail_
call fcn.10001000
add dword [esp + 0x30], 1
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x28]
add esp, 0xc
xor ebx, ebx
jmp 0x10001230
lea eax, [esp + 0x14]
push eax
push esi
lea ecx, [esp + 0x20]
push ecx
push 0
push str.Base_Name
push edi
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0x100
call ebx
test eax, eax
je 0x100013e0
push str._USB_EP0_IO_Module__Get_Base_Name_Fail_
call fcn.10001000
mov eax, esi
add esp, 4
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x100013c0
sub eax, edx
jne 0x100013e0
push 0x1000b2f8
push 0x200
push esi
call fcn.100020b6
add esp, 0xc
cmp byte [esi], 0
je 0x10001417
mov edx, dword [esp + 0x2c]
push edx
push esi
push str._s_03d
push 0x200
push ebp
call fcn.1000209a
mov eax, dword [esp + 0x3c]
push 6
push eax
push ebp
call fcn.10001c99
add esp, 0x20
test eax, eax
jne 0x10001417
mov dword [esp + 0x10], 1
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
call fcn.1000211b
add esp, 4
test esi, esi
je 0x10001434
push esi
call fcn.1000211b
add esp, 4
cmp dword [esp + 0x10], 1
jne 0x10001535
mov edi, dword [esp + 0x1c]
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
push 0
lea ecx, [esp + 0x24]
push ecx
push 0
push 0
lea edx, [esp + 0x4c]
push edx
push edi
call esi
mov eax, dword [esp + 0x20]
push eax
call fcn.100021f8
add esp, 4
push 0
mov ebp, eax
push 0
mov dword [ebp], 5
mov ecx, dword [esp + 0x28]
push ecx
push ebp
lea edx, [esp + 0x4c]
push edx
push edi
call esi
test eax, eax
je 0x10001576
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
lea ebx, [ebp + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x1000152c
push 0x100
mov dword [esp + 0x14], 0x100
call fcn.100021f8
mov esi, eax
add esp, 4
test esi, esi
je 0x10001517
push 0x100
push 0
push esi
call fcn.10002020
lea eax, [esp + 0x1c]
push eax
push esi
push edi
call fcn.10001090
add esp, 0x18
test eax, eax
je 0x1000150e
mov ecx, dword [esp + 0x34]
push esi
push ecx
call fcn.10001010
add esp, 8
test eax, eax
push esi
jne 0x10001597
push str._USB_EP0_IO_Module__Device_ID_is_not_include_DeviceID_:__s
call fcn.10001000
add esp, 8
push esi
call fcn.1000211b
add esp, 4
push ebx
push str._USB_EP0_IO_Module__GetDeviceID_is_failed___s
call fcn.10001000
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call fcn.1000211b
add esp, 4
add dword [esp + 0x24], 1
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x1c]
xor ebx, ebx
jmp 0x10001230
push ebp
call fcn.1000211b
push esi
call fcn.1000211b
push str._USB_EP0_IO_Module__SetupDiOpenDeviceInterfaceRegKey___Fail_
call fcn.10001000
add dword [esp + 0x30], 1
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x28]
add esp, 0xc
xor ebx, ebx
jmp 0x10001230
push ebp
call fcn.1000211b
add esp, 4
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push str._USB_EP0_IO_Module__Error_in_SetupDiGetDeviceInterfaceDetail
call fcn.10001000
add esp, 4
xor eax, eax
jmp 0x100015da
mov eax, dword [esp + 0x34]
push eax
push str._USB_EP0_IO_Module__Success_get_port_name_:__s__DeviceID__s
call fcn.10001000
add esp, 0xc
lea edx, [ebp + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call fcn.1000211b
push esi
call fcn.1000211b
add esp, 8
mov eax, 1
mov ecx, dword [esp + 0x158]
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10002005
add esp, 0x14c
ret