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

Disassembly:
sub esp, 0x99c
mov eax, dword [esp + 0x9a0]
push ebx
xor ebx, ebx
cmp eax, 3
mov dword [esp + 4], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], 0xff
je 0x40503c
cmp eax, 2
je 0x40503c
cmp eax, 4
je 0x40503c
mov eax, 1
pop ebx
add esp, 0x99c
ret
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push esi
push edi
lea eax, [esp + 0x10]
push eax
push 0x20019
mov ecx, 0xb
mov esi, str.SystemCurrentControlSetServicesClassNet
lea edi, [esp + 0x5b4]
rep movsd dword es:[edi], dword [esi]
push ebx
lea ecx, [esp + 0x5b8]
push ecx
push 0x80000002
call ebp
test eax, eax
jne 0x40521f
push ebx
push ebx
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x24]
push eax
push ebx
push ebx
push ebx
lea ecx, [esp + 0x3c]
push ecx
push ebx
push ebx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x405214
mov eax, dword [esp + 0x20]
dec eax
cmp eax, ebx
mov dword [esp + 0x24], eax
jl 0x405214
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0xc0]
push edx
push eax
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x4051fe
mov dword [esp + 0x14], ebx
mov dword [esp + 0x28], 0xff
jmp 0x4050f0
mov cl, byte [esp + eax + 0x5ac]
mov byte [esp + eax + 0x1ac], cl
inc eax
cmp cl, bl
jne 0x4050f0
mov eax, 0x412d84
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405110
lea edi, [esp + 0x1ac]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x405121
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0xac]
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x405142
lea edi, [esp + 0x1ac]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
cmp cl, bl
jne 0x405155
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push ebx
lea edx, [esp + 0x1b8]
push edx
push 0x80000002
call ebp
test eax, eax
jne 0x4051fe
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x24]
push edx
push ebx
push str.DriverDesc
push eax
mov dword [esp + 0x30], 0x80
mov dword [esp + 0x34], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4051f3
lea esi, [esp + 0x2c]
mov eax, str.Dial_Up_Adapter
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4051ea
cmp cl, bl
je 0x4051e6
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4051ea
add eax, 2
add esi, 2
cmp cl, bl
jne 0x4051c6
xor eax, eax
jmp 0x4051ef
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40520f
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x24]
dec eax
mov dword [esp + 0x24], eax
jns 0x4050b5
jmp 0x405214
mov ebx, 1
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x99c
ret