Function at 0x401f80
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x530
lea eax, [esp + 0x10]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push edi
push eax
xor edi, edi
push 0x20019
push edi
push str.HARDWAREDEVICEMAPSERIALCOMM
push 0x80000002
call esi
test eax, eax
jne 0x402767
lea ecx, [esp + 0x18]
push ecx
push 0x20019
push edi
push str.SYSTEMCurrentControlSetControlClass4D36E978_E325_11CE_BFC1_08002BE10318
push 0x80000002
call esi
test eax, eax
mov ebp, 0x100
jne 0x402556
mov dword [esp + 0x1c], edi
mov ecx, dword [esp + 0x1c]
push edi
push edi
push edi
lea edx, [esp + 0x30]
push edi
lea eax, [esp + 0x250]
push edx
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
mov dword [esp + 0x44], ebp
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov ebx, eax
cmp ebx, edi
mov dword [esp + 0x3c], ebx
jne 0x4024e7
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push 0x20019
lea ecx, [esp + 0x248]
push edi
push ecx
push edx
call esi
test eax, eax
jne 0x4024e7
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x40]
push eax
push ecx
push edi
push edi
push str.DriverDesc
push edx
mov dword [esp + 0x28], ebp
call esi
test eax, eax
jne 0x4024d4
lea eax, [esp + 0x40]
mov dword [0x4150b0], edi
push eax
call fcn.0040d97c
lea ecx, [esp + 0x44]
push str.HUAWEI
push ecx
call fcn.00409fe0
add esp, 0xc
test eax, eax
je 0x4020b9
lea edx, [esp + 0x40]
push str.3G_PC_UI_INTERFACE
push edx
call fcn.00409fe0
add esp, 8
test eax, eax
jne 0x4020aa
lea eax, [esp + 0x40]
push str.SECONDARY_PORT
push eax
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x4020b9
mov dword [0x4150b0], 1
jmp 0x402259
lea ecx, [esp + 0x40]
push str.GLOBETROTTER
push ecx
call fcn.00409fe0
add esp, 8
test eax, eax
jne 0x4020e5
lea edx, [esp + 0x40]
push str.FUSION
push edx
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x40210a
lea eax, [esp + 0x40]
push str.APPLICATION_INTERFACE
push eax
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x40210a
mov dword [0x4150b0], 2
jmp 0x402259
lea ecx, [esp + 0x40]
push str.NOVATEL_WIRELESS
push ecx
call fcn.00409fe0
add esp, 8
test eax, eax
jne 0x402136
lea edx, [esp + 0x40]
push str.DELL_WIRELESS
push edx
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x40216a
lea eax, [esp + 0x40]
push str.STATUS_PORT
push eax
call fcn.00409fe0
add esp, 8
test eax, eax
jne 0x402241
lea ecx, [esp + 0x40]
push str.SECONDARY_PORT
push ecx
call fcn.00409fe0
add esp, 8
test eax, eax
jne 0x402241
lea edx, [esp + 0x40]
push str.SIERRA_WIRELESS
push edx
call fcn.00409fe0
add esp, 8
test eax, eax
jne 0x402196
lea eax, [esp + 0x40]
push str.HP_HS2300
push eax
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x4021bb
lea ecx, [esp + 0x40]
push str.AT_COMMAND_PORT
push ecx
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x4021bb
mov dword [0x4150b0], 4
jmp 0x402259
lea edx, [esp + 0x40]
push str.NOKIA
push edx
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x4021f3
lea eax, [esp + 0x40]
push str.MODEM
push eax
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x4021f3
mov dword [0x4150b0], 5
jmp 0x402259
lea ecx, [esp + 0x40]
push 0x40f710
push ecx
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x40221f
lea edx, [esp + 0x40]
push str.NMEA_DEVICE
push edx
call fcn.00409fe0
add esp, 8
test eax, eax
jne 0x402235
lea eax, [esp + 0x40]
push str.SECONDARY_PORT
push eax
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x40224d
mov dword [0x4150b0], 6
jmp 0x402259
mov dword [0x4150b0], 3
jmp 0x402259
cmp dword [0x4150b0], edi
je 0x4024d4
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x140]
push ecx
push edx
push edi
push edi
push str.MatchingDeviceId
push eax
mov dword [esp + 0x28], ebp
call esi
test eax, eax
jne 0x4024d4
cmp dword [0x4150b0], 4
jne 0x4022d7
mov ecx, dword [str.SWMUXBUSSW_SERIAL]
mov edx, dword [0x40f6e0]
mov eax, dword [0x40f6e4]
mov dword [esp + 0x140], ecx
mov ecx, dword [0x40f6e8]
mov dword [esp + 0x144], edx
mov dx, word [0x40f6ec]
mov dword [esp + 0x148], eax
mov al, byte [0x40f6ee]
mov dword [esp + 0x14c], ecx
mov word [esp + 0x150], dx
mov byte [esp + 0x152], al
mov ecx, 7
mov esi, str.SYSTEMCurrentControlSetEnum_
lea edi, [esp + 0x240]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x140]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x240]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x2c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0x20019
lea ecx, [esp + 0x248]
push 0
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4024d4
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x30]
push 0
push 0
push 0
lea edx, [esp + 0x30]
push 0
lea eax, [esp + 0x250]
push edx
mov edx, dword [esp + 0x40]
push eax
push ecx
push edx
mov dword [esp + 0x44], ebp
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov ebx, eax
test ebx, ebx
jne 0x4024b0
mov edx, dword [esp + 0x2c]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 0x28]
lea ecx, [esp + 0x240]
push eax
push 0x20019
push ebx
push ecx
push edx
call esi
test eax, eax
jne 0x4024b0
mov edx, dword [esp + 0x28]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x140]
push eax
push ecx
push ebx
push ebx
push str.DeviceDesc
push edx
mov dword [esp + 0x28], ebp
call edi
test eax, eax
jne 0x4024a5
lea eax, [esp + 0x40]
lea ecx, [esp + 0x140]
push eax
push ecx
call fcn.0040d97c
add esp, 4
push eax
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x4024a5
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x38]
push edx
push 0x20019
push ebx
push str.Device_Parameters
push eax
call esi
test eax, eax
jne 0x4024a5
lea ecx, [esp + 0x10]
lea edx, [esp + 0x340]
push ecx
push edx
push eax
push eax
mov eax, dword [esp + 0x48]
push str.PortName
push eax
mov dword [esp + 0x28], ebp
call edi
test eax, eax
jne 0x40249a
xor edi, edi
lea ecx, [esp + 0x10]
lea edx, [esp + 0x140]
push ecx
push edx
mov edx, dword [esp + 0x28]
push 0
lea eax, [esp + 0x40]
push 0
lea ecx, [esp + 0x450]
push eax
push ecx
push edi
push edx
mov dword [esp + 0x54], ebp
mov dword [esp + 0x30], ebp
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov esi, eax
test esi, esi
jne 0x402491
lea eax, [esp + 0x340]
lea ecx, [esp + 0x140]
push eax
push ecx
call fcn.0040d8f0
add esp, 8
test eax, eax
je 0x4024fd
inc edi
cmp esi, 0x103
jne 0x40243d
mov edx, dword [esp + 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x30]
inc ecx
cmp ebx, 0x103
mov dword [esp + 0x30], ecx
jne 0x40234b
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [esp + 0x3c]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
xor edi, edi
mov ecx, dword [esp + 0x1c]
inc ecx
cmp ebx, 0x103
mov dword [esp + 0x1c], ecx
je 0x40254b
jmp 0x401fd9
lea edi, [esp + 0x340]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x544]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x38]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
mov edx, dword [esp + 0x28]
push edx
call esi
mov eax, dword [esp + 0x2c]
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
jmp 0x402731
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x18]
push edx
push 0x20019
push edi
push str.SYSTEMCurrentControlSetControlClass4D36E96D_E325_11CE_BFC1_08002BE10318
push 0x80000002
call esi
test eax, eax
jne 0x40275c
mov dword [esp + 0x1c], edi
mov edx, dword [esp + 0x1c]
push edi
push edi
push edi
lea eax, [esp + 0x30]
push edi
lea ecx, [esp + 0x250]
push eax
mov eax, dword [esp + 0x2c]
push ecx
push edx
push eax
mov dword [esp + 0x44], ebp
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov ebx, eax
cmp ebx, edi
jne 0x4026e7
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x14]
push ecx
push 0x20019
lea edx, [esp + 0x248]
push edi
push edx
push eax
call esi
test eax, eax
jne 0x4026e7
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x140]
push ecx
push edx
push edi
push edi
push str.DriverDesc
push eax
mov dword [esp + 0x28], ebp
call esi
test eax, eax
jne 0x4026d4
lea ecx, [esp + 0x140]
mov dword [0x4150b0], edi
push ecx
call fcn.0040d97c
lea edx, [esp + 0x144]
push str.NOKIA
push edx
call fcn.00409fe0
add esp, 0xc
test eax, eax
je 0x402648
lea eax, [esp + 0x140]
push str.MODEM
push eax
call fcn.00409fe0
add esp, 8
test eax, eax
je 0x402648
mov dword [0x4150b0], 5
jmp 0x402654
cmp dword [0x4150b0], edi
je 0x4026d4
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x340]
push ecx
push edx
push edi
push edi
push str.AttachedTo
push eax
mov dword [esp + 0x28], ebp
call esi
test eax, eax
jne 0x4026d4
lea ecx, [esp + 0x10]
lea edx, [esp + 0x140]
push ecx
push edx
mov edx, dword [esp + 0x28]
push 0
lea eax, [esp + 0x40]
push 0
lea ecx, [esp + 0x450]
push eax
push ecx
push edi
push edx
mov dword [esp + 0x54], ebp
mov dword [esp + 0x30], ebp
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov esi, eax
test esi, esi
jne 0x4026cb
lea eax, [esp + 0x340]
lea ecx, [esp + 0x140]
push eax
push ecx
call fcn.0040d8f0
add esp, 8
test eax, eax
je 0x4026fd
inc edi
cmp esi, 0x103
jne 0x402677
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
xor edi, edi
mov ecx, dword [esp + 0x1c]
inc ecx
cmp ebx, 0x103
mov dword [esp + 0x1c], ecx
je 0x402751
jmp 0x402579
lea edi, [esp + 0x340]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x544]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
mov edx, dword [esp + 0x18]
push edx
call esi
mov eax, dword [esp + 0x20]
push eax
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x530
ret
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x530
ret