Function at 0x4056b0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x4d8
push ebx
push ebp
push esi
push edi
mov ecx, 0xf
mov esi, str.SYSTEMCurrentControlSetServicesTcpipParametersInterfaces_
lea edi, [esp + 0x2e8]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov ecx, 0x70
lea edi, [esp + 0x327]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
xor ebx, ebx
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0xe9]
mov byte [esp + 0xe8], bl
mov ebp, dword [esp + 0x4ec]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push ebx
push ebx
lea eax, [esp + 0xf0]
push 0x200
push eax
push ebp
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
push eax
push ebp
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edi, [esp + 0xf0]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2e8]
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 + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0x20019
lea ecx, [esp + 0x2f0]
push ebx
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x405789
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4d8
ret
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x69]
mov byte [esp + 0x68], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0xa9]
mov byte [esp + 0xa8], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x29]
mov byte [esp + 0x28], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x14]
stosb byte es:[edi], al
lea eax, [esp + 0x24]
push edx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push eax
push ecx
push ebx
push str.EnableDHCP
push edx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x2c], 4
mov dword [esp + 0x30], ebx
call esi
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x68]
cmp eax, ebx
lea eax, [esp + 0x14]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
mov dword [esp + 0x20], 0x40
push ebx
jne 0x40585f
mov eax, dword [esp + 0x20]
push str.IPAddress
push eax
call esi
lea ecx, [esp + 0x14]
lea edx, [esp + 0xa8]
push ecx
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push edx
push eax
push ebx
push str.SubnetMask
push ecx
call esi
lea edx, [esp + 0x14]
lea eax, [esp + 0x28]
push edx
lea ecx, [esp + 0x1c]
push eax
push ecx
push ebx
push str.DefaultGateway
jmp 0x40589f
mov eax, dword [esp + 0x20]
push str.DHCPIPAddress
push eax
call esi
lea ecx, [esp + 0x14]
lea edx, [esp + 0xa8]
push ecx
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push edx
push eax
push ebx
push str.DHCPSubnetMask
push ecx
call esi
lea edx, [esp + 0x14]
lea eax, [esp + 0x28]
push edx
lea ecx, [esp + 0x1c]
push eax
push ecx
push ebx
push str.DHCPDefaultGateway
mov edx, dword [esp + 0x24]
push edx
call esi
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.WS2_32.dll_inet_addr]
lea ecx, [esp + 0x68]
push ecx
call esi
lea edx, [esp + 0x28]
mov dword [ebp + 0x510], eax
push edx
call esi
cmp eax, ebx
mov dword [ebp + 0x514], eax
je 0x405983
mov ecx, dword [0x40e394]
mov byte [esp + 0x1c], bl
cmp ecx, ebx
mov byte [esp + 0x1d], bl
mov byte [esp + 0x1e], bl
mov byte [esp + 0x1f], bl
mov byte [esp + 0x20], bl
mov byte [esp + 0x21], bl
je 0x405942
mov ecx, 3
lea edi, [esp + 0x1c]
mov esi, 0x40e398
xor edx, edx
repe cmpsw word [esi], word es:[edi]
je 0x405942
cmp dword [0x40e388], ebx
je 0x405942
mov ecx, 3
lea edi, [esp + 0x1c]
mov esi, 0x40e38c
xor edx, edx
repe cmpsw word [esi], word es:[edi]
je 0x405942
mov ecx, 3
lea edi, [esp + 0x1c]
mov esi, 0x40e3a0
xor edx, edx
repe cmpsw word [esi], word es:[edi]
jne 0x405973
cmp eax, dword [0x40e394]
jne 0x405973
mov eax, dword [0x40e398]
add ebp, 0x518
pop edi
pop esi
mov dword [ebp], eax
mov cx, word [0x40e39c]
mov eax, 1
mov word [ebp + 4], cx
pop ebp
pop ebx
add esp, 0x4d8
ret
add ebp, 0x518
push ebp
push eax
call fcn.00405aa0
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x4d8
ret