Function at 0x40a930
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0x438170]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
push 0x40
push 0
push eax
mov dword [ebp - 0x120], edx
mov ebx, ecx
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x114], esi
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x110], 0
mov dword [edx], 0
call fcn.0041e930
push 0x40
push 0
push esi
call fcn.0041e930
push 0x40
push 0
push edi
call fcn.0041e930
mov ecx, 0xf
mov esi, str.SYSTEMCurrentControlSetServicesTcpipParametersInterfaces_
lea edi, [ebp - 0x104]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
add esp, 0x24
mov esi, ebx
mov al, byte [ebx]
inc ebx
test al, al
jne 0x40a9b1
lea edi, [ebp - 0x104]
sub ebx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40a9c1
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x110]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x104]
mov ecx, ebx
push eax
and ecx, 3
push reloc.WS2_32.dll_bind
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40aa0e
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x108]
push eax
push 0
push str.EnableDHCP
push dword [ebp - 0x110]
mov dword [ebp - 0x10c], 4
call ebx
mov ecx, dword [ebp - 0x120]
test eax, eax
jne 0x40aa5d
cmp dword [ebp - 0x108], 4
jne 0x40aa5d
mov eax, dword [ebp - 0x124]
mov dword [ecx], eax
cmp dword [ecx], 0
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x108]
push eax
mov dword [ebp - 0x10c], 0x100
push 0
je 0x40ac63
push str.DhcpIPAddress
push dword [ebp - 0x110]
call ebx
mov ebx, dword [sym.imp.WS2_32.dll_inet_addr]
test eax, eax
jne 0x40ab08
mov eax, dword [ebp - 0x108]
cmp eax, 1
jne 0x40aac7
lea eax, [ebp - 0x104]
push eax
call ebx
mov ecx, dword [ebp - 0x118]
mov dword [ecx], eax
mov eax, dword [ebp - 0x108]
mov dword [ecx + 4], 0
cmp eax, 7
jne 0x40ab08
xor edi, edi
cmp byte [ebp - 0x104], 0
lea esi, [ebp - 0x104]
je 0x40ab08
lea ecx, [ecx]
cmp edi, 0x10
jge 0x40ab08
push esi
call ebx
mov ecx, dword [ebp - 0x118]
inc edi
mov dword [ecx + edi*4 - 4], eax
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40aaf8
sub ecx, edx
inc esi
add esi, ecx
cmp byte [esi], al
jne 0x40aae0
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x108]
push eax
push 0
push str.DhcpSubnetMask
push dword [ebp - 0x110]
mov dword [ebp - 0x10c], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40aba8
mov eax, dword [ebp - 0x108]
cmp eax, 1
jne 0x40ab67
lea eax, [ebp - 0x104]
push eax
call ebx
mov ecx, dword [ebp - 0x114]
mov dword [ecx], eax
mov eax, dword [ebp - 0x108]
mov dword [ecx + 4], 0
cmp eax, 7
jne 0x40aba8
xor edi, edi
cmp byte [ebp - 0x104], 0
lea esi, [ebp - 0x104]
je 0x40aba8
lea ecx, [ecx]
cmp edi, 0x10
jge 0x40aba8
push esi
call ebx
mov ecx, dword [ebp - 0x114]
inc edi
mov dword [ecx + edi*4 - 4], eax
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ab98
sub ecx, edx
inc esi
add esi, ecx
cmp byte [esi], al
jne 0x40ab80
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x108]
push eax
push 0
push str.DhcpDefaultGateway
push dword [ebp - 0x110]
mov dword [ebp - 0x10c], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40ae10
mov eax, dword [ebp - 0x108]
cmp eax, 1
jne 0x40ac04
lea eax, [ebp - 0x104]
push eax
call ebx
mov ecx, dword [ebp - 0x11c]
mov dword [ecx], eax
mov eax, dword [ebp - 0x108]
cmp eax, 7
jne 0x40ae10
xor edi, edi
cmp byte [ebp - 0x104], 0
lea esi, [ebp - 0x104]
je 0x40ae10
cmp edi, 0x10
jge 0x40ae10
push esi
call ebx
mov ecx, dword [ebp - 0x11c]
inc edi
mov dword [ecx + edi*4 - 4], eax
mov ecx, esi
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ac40
sub ecx, edx
inc esi
add esi, ecx
cmp byte [esi], al
jne 0x40ac22
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret
push str.IPAddress
push dword [ebp - 0x110]
call ebx
mov ebx, dword [sym.imp.WS2_32.dll_inet_addr]
test eax, eax
jne 0x40ace0
mov eax, dword [ebp - 0x108]
cmp eax, 1
jne 0x40ac9c
lea eax, [ebp - 0x104]
push eax
call ebx
mov ecx, dword [ebp - 0x118]
mov dword [ecx], eax
mov eax, dword [ebp - 0x108]
cmp eax, 7
jne 0x40ace0
xor edi, edi
cmp byte [ebp - 0x104], 0
lea esi, [ebp - 0x104]
je 0x40ace0
cmp edi, 0x10
jge 0x40ace0
push esi
call ebx
mov ecx, dword [ebp - 0x118]
inc edi
mov dword [ecx + edi*4 - 4], eax
mov ecx, esi
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40acd0
sub ecx, edx
inc esi
add esi, ecx
cmp byte [esi], al
jne 0x40acb2
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x108]
push eax
push 0
push str.SubnetMask
push dword [ebp - 0x110]
mov dword [ebp - 0x10c], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40ad78
mov eax, dword [ebp - 0x108]
cmp eax, 1
jne 0x40ad38
lea eax, [ebp - 0x104]
push eax
call ebx
mov ecx, dword [ebp - 0x114]
mov dword [ecx], eax
mov eax, dword [ebp - 0x108]
cmp eax, 7
jne 0x40ad78
xor edi, edi
cmp byte [ebp - 0x104], 0
lea esi, [ebp - 0x104]
je 0x40ad78
mov edi, edi
cmp edi, 0x10
jge 0x40ad78
push esi
call ebx
mov ecx, dword [ebp - 0x114]
inc edi
mov dword [ecx + edi*4 - 4], eax
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ad68
sub ecx, edx
inc esi
add esi, ecx
cmp byte [esi], al
jne 0x40ad50
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x108]
push eax
push 0
push str.DefaultGateway
push dword [ebp - 0x110]
mov dword [ebp - 0x10c], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40ae10
mov eax, dword [ebp - 0x108]
cmp eax, 1
jne 0x40add0
lea eax, [ebp - 0x104]
push eax
call ebx
mov ecx, dword [ebp - 0x11c]
mov dword [ecx], eax
mov eax, dword [ebp - 0x108]
cmp eax, 7
jne 0x40ae10
xor edi, edi
cmp byte [ebp - 0x104], 0
lea esi, [ebp - 0x104]
je 0x40ae10
cmp edi, 0x10
jge 0x40ae10
push esi
call ebx
mov ecx, dword [ebp - 0x11c]
inc edi
mov dword [ecx + edi*4 - 4], eax
mov ecx, esi
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ae00
sub ecx, edx
inc esi
add esi, ecx
cmp byte [esi], al
jne 0x40ade6
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.004144c7
mov esp, ebp
pop ebp
ret