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

Disassembly:
sub esp, 0x83c
push ebx
push ebp
push esi
push edi
mov eax, dword [str.DriverDesc]
mov ecx, 0x13
mov esi, str.SystemCurrentControlSetControlClass4D36E96D_E325_11CE_BFC1_08002BE10318
lea edi, [esp + 0x7c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x410a3c]
mov dx, word [0x410a40]
mov dword [esp + 0x28], eax
mov al, byte [0x410a42]
mov byte [esp + 0x32], al
mov eax, dword [0x41443c]
mov ebx, 1
mov dword [esp + 0x2c], ecx
cmp eax, ebx
mov word [esp + 0x30], dx
movsw word es:[edi], word [esi]
mov dword [esp + 0x14], 0x40
jne 0x40573f
mov edx, dword [str.SystemCurrentControlSetServicesLtmodemr]
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
push edx
jmp 0x405752
mov ecx, dword [str.SystemCurrentControlSetServicesLtmodem]
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push ecx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 0x80000002
call ebp
test eax, eax
je 0x405770
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x83c
ret
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x1c]
lea eax, [esp + 0x1cc]
push edx
push eax
push 0
push 0
push str.ModemName
push ecx
mov dword [esp + 0x34], 0x280
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4057b5
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x83c
ret
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x7c]
push ecx
push 0x20019
push 0
push edx
push 0x80000002
call ebp
test eax, eax
je 0x4057ff
push 0
push str.Debug
push str.FindOldPort_failed
push 0
call fcn.00404fa0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x83c
ret
lea eax, [esp + 0x34]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
lea edx, [esp + 0x4c]
push ecx
push edx
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x405976
or ecx, 0xffffffff
lea edi, [esp + 0x7c]
xor eax, eax
lea edx, [esp + 0x44c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
shr ecx, 2
mov edi, edx
lea edx, [esp + 0x44c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x410350
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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 edx, [esp + 0x44c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x3c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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 + 0x18]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0xf003f
lea ecx, [esp + 0x454]
push 0
push ecx
push 0x80000002
call ebp
test eax, eax
jne 0x40594a
lea edx, [esp + 0x24]
lea eax, [esp + 0xcc]
push edx
mov edx, dword [esp + 0x1c]
push eax
push 0
lea ecx, [esp + 0x34]
push 0
push ecx
push edx
mov dword [esp + 0x3c], 0x100
mov dword [esp + 0x2c], 0x40
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40594a
lea esi, [esp + 0x1cc]
lea eax, [esp + 0xcc]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x405936
test cl, cl
je 0x405932
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x405936
add eax, 2
add esi, 2
test cl, cl
jne 0x405912
xor eax, eax
jmp 0x40593b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x405976
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x34]
lea edx, [esp + 0x14]
push ecx
push 0
push 0
push 0
lea ecx, [esp + 0x4c]
mov eax, ebx
push edx
mov edx, dword [esp + 0x24]
push ecx
push eax
push edx
inc ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x405829
lea esi, [esp + 0x1cc]
lea eax, [esp + 0xcc]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x4059ac
test cl, cl
je 0x4059a8
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x4059ac
add eax, 2
add esi, 2
test cl, cl
jne 0x405984
xor eax, eax
jmp 0x4059b1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4059c2
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x83c
ret
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x20]
push eax
push 0x416380
push 0
push 0
push str.AttachedTo
push ecx
mov dword [esp + 0x38], 0x40
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
inc eax
pop ebx
add esp, 0x83c
ret