Function at 0x45ce10
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ea5d8
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x677000]
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 eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x30]
xor edi, edi
push eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x38], 0
push edi
xorps xmm0, xmm0
push ebx
mov dword [ebp - 0x40], edi
movq qword [ebp - 0x2c], xmm0
movq qword [ebp - 0x24], xmm0
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x30], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x45d0a0
lea eax, [ebp - 0x38]
push eax
push 0
push 0
lea eax, [ebp - 0x14]
push eax
push 0
lea eax, [ebp - 0x30]
push eax
push ebx
mov esi, 2
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
mov eax, dword [ebp - 0x38]
xor ecx, ecx
mul esi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00495002
mov esi, eax
add esp, 4
test esi, esi
je 0x45d0d8
mov eax, dword [ebp - 0x38]
add eax, eax
push eax
push 0
push esi
call fcn.005bb1c0
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x38]
lea eax, [ebp - 0x14]
push esi
push eax
push 0
lea eax, [ebp - 0x30]
push eax
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
push esi
test eax, eax
je 0x45d0c4
push dword [ebp - 0x44]
call fcn.0045d530
push esi
test eax, eax
jne 0x45cf25
call fcn.0049500b
add esp, 4
lea eax, [ebp - 0x30]
inc edi
push eax
push edi
jmp 0x45ce68
call fcn.0049500b
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
add esp, 4
lea eax, [ebp - 0x38]
push eax
push 0
push 0
lea eax, [ebp - 0x14]
push eax
push 1
lea eax, [ebp - 0x30]
push eax
push ebx
call esi
mov eax, dword [ebp - 0x38]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00495002
mov edi, eax
add esp, 4
test edi, edi
je 0x45d0d8
mov eax, dword [ebp - 0x38]
add eax, eax
push eax
push 0
push edi
call fcn.005bb1c0
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x38]
lea eax, [ebp - 0x14]
push edi
push eax
push 1
lea eax, [ebp - 0x30]
push eax
push ebx
call esi
test eax, eax
je 0x45d0c3
cmp dword [ebp - 0x14], 7
jne 0x45d01d
cmp word [edi], 0
mov esi, edi
je 0x45d01d
mov ebx, dword [ebp - 0x4c]
lea ecx, [ecx]
push esi
lea ecx, [ebp - 0x64]
call fcn.00405d00
lea eax, [ebp - 0x64]
push eax
mov ecx, ebx
mov dword [ebp - 4], 0
call fcn.0045d5c0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x50], 8
jb 0x45cfe3
push dword [ebp - 0x64]
call fcn.0049500b
add esp, 4
xor eax, eax
mov word [ebp - 0x64], ax
mov eax, esi
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], 0
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x45d000
sub eax, edx
sar eax, 1
lea esi, [esi + eax*2]
add esi, 2
cmp word [esi], cx
jne 0x45cfb0
mov ebx, dword [ebp - 0x48]
push 0x208
push 0
push dword [ebp - 0x3c]
mov dword [ebp - 0x34], 0x208
call fcn.005bb1c0
add esp, 0xc
lea eax, [ebp - 0x30]
push 0x20019
push 1
push 0
push 1
push eax
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov esi, eax
cmp esi, 0xffffffff
je 0x45d07a
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x3c]
push 0
push 0
push str.PortName
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [ebp - 0x3c]
push esi
cmp word [eax], 0
jne 0x45d091
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call fcn.0049500b
mov edi, dword [ebp - 0x40]
add esp, 4
lea eax, [ebp - 0x30]
inc edi
push eax
push edi
jmp 0x45ce68
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call fcn.0049500b
add esp, 4
mov eax, 1
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.005b7f8f
mov esp, ebp
pop ebp
ret 0x10
push edi
call fcn.0049500b
add esp, 4
push str.CDlgWaitConnectUSB::GetHardwareIDFromReg__SetupDiGetDeviceRegistryProperty___Failed
call fcn.00418730
jmp 0x45d0a0
push str.CDlgWaitConnectUSB::GetHardwareIDFromReg__TCHAR_create_error
call fcn.00418730
xor eax, eax
jmp 0x45d0a5