Function at 0x402160
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x140
mov ecx, dword [0x426ad4]
mov eax, dword [0x426ad0]
mov edx, dword [0x426ad8]
push ebx
push esi
xor esi, esi
mov dword [esp + 0x18], ecx
push 2
mov dword [esp + 0x18], eax
mov eax, dword [0x426adc]
push esi
lea ecx, [esp + 0x1c]
push esi
push ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402418
push ebp
lea edx, [esp + 0x30]
push edi
push edx
push esi
push ebx
mov dword [esp + 0x40], 0x1c
mov dword [esp + 0x20], 1
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x402402
mov ebp, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
mov edi, dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x50]
push eax
push 0x100
lea edx, [esp + 0x38]
push ecx
push edx
lea eax, [esp + 0x44]
push 0
push eax
push ebx
call ebp
lea ecx, [esp + 0x50]
push 0x20
push ecx
call fcn.00402430
lea edx, [esp + 0x58]
push edx
push str.StrongRising_Diagnostic_Interface
call fcn.00412810
add esp, 0x10
test eax, eax
je 0x40232b
lea eax, [esp + 0x50]
push eax
push str.USB_Modem_Diagnostic_Interface
call fcn.00412810
add esp, 8
test eax, eax
je 0x40232b
lea ecx, [esp + 0x50]
push ecx
push str.USB_Wireless_Diagnostics
call fcn.00412810
add esp, 8
test eax, eax
je 0x40232b
lea edx, [esp + 0x50]
push edx
push str.AMOI_Diagnostics_Interface
call fcn.00412810
add esp, 8
test eax, eax
je 0x40232b
lea eax, [esp + 0x50]
push eax
push str.ONDA_Diagnostics_Interface
call fcn.00412810
add esp, 8
test eax, eax
je 0x40232b
lea ecx, [esp + 0x50]
push ecx
push str.HSDPA_Diagnostics_Interface
call fcn.00412810
add esp, 8
test eax, eax
je 0x40232b
lea edx, [esp + 0x50]
push edx
push str.Qualcomm_Diagnostics_Interface_3197
call fcn.00412810
add esp, 8
test eax, eax
je 0x40232b
lea eax, [esp + 0x50]
push eax
push str.Qualcomm_Diagnostics_Interface_6000
call fcn.00412810
add esp, 8
test eax, eax
je 0x40232b
lea ecx, [esp + 0x50]
push ecx
push str.TELIT_Diagnostics_Interface
call fcn.00412810
add esp, 8
test eax, eax
je 0x40232b
lea edx, [esp + 0x50]
push edx
push str.ONDA_Diagnostics_Interface_6000
call fcn.00412810
add esp, 8
test eax, eax
je 0x40232b
lea eax, [esp + 0x50]
push eax
push str.HSPA_Diagnostics_Interface_6000
call fcn.00412810
add esp, 8
test eax, eax
je 0x40232b
lea ecx, [esp + 0x50]
push ecx
push str.HSDPA_Diagnostics_Interface_7002
call fcn.00412810
add esp, 8
test eax, eax
jne 0x40236b
push 0x20019
push 1
push 0
lea edx, [esp + 0x40]
push 1
push edx
push ebx
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x40236b
lea eax, [esp + 0x18]
lea ecx, [esp + 0x50]
push eax
push ecx
push 0
push 0
push str.PortName
push esi
mov dword [esp + 0x30], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4023a1
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x34]
mov eax, ecx
push edx
inc ecx
push eax
push ebx
mov dword [esp + 0x20], ecx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x4021e1
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x140
ret
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, str.._
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x154]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], 1
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x50]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x140
ret
mov eax, esi
pop esi
pop ebx
add esp, 0x140
ret