Function at 0x404522
Capabilities:
Get hostname
Query or enumerate registry key
Query or enumerate registry value
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2b8
mov dword [ebp - 0x2b8], ecx
mov dword [ebp - 0x2b0], 0
mov dword [ebp - 0x250], 0x104
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x218], 0
push 0x10
push 0
mov eax, dword [ebp + 8]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x104]
push ecx
call sub.WSOCK32.dll_gethostname
lea edx, [ebp - 0x104]
push edx
call sub.WSOCK32.dll_gethostbyname
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x238], 0
jmp 0x4045bb
mov eax, dword [ebp - 0x238]
add eax, 1
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 4
jge 0x404689
mov ecx, dword [ebp - 0x230]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebp - 0x238]
cmp dword [edx + eax*4], 0
je 0x404682
mov ecx, dword [ebp - 0x230]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebp - 0x238]
mov ecx, dword [edx + eax*4]
mov edx, dword [ebp - 0x238]
mov eax, dword [ecx]
mov dword [ebp + edx*4 - 0x24c], eax
mov ecx, dword [ebp - 0x230]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebp - 0x238]
mov ecx, dword [edx + eax*4]
xor edx, edx
mov dl, byte [ecx + 3]
push edx
mov eax, dword [ebp - 0x230]
mov ecx, dword [eax + 0xc]
mov edx, dword [ebp - 0x238]
mov eax, dword [ecx + edx*4]
xor ecx, ecx
mov cl, byte [eax + 2]
push ecx
mov edx, dword [ebp - 0x230]
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp - 0x238]
mov edx, dword [eax + ecx*4]
xor eax, eax
mov al, byte [edx + 1]
push eax
mov ecx, dword [ebp - 0x230]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebp - 0x238]
mov ecx, dword [edx + eax*4]
xor edx, edx
mov dl, byte [ecx]
push edx
push str._u._u._u._u
mov eax, dword [ebp - 0x238]
imul eax, eax, 0x14
lea ecx, [ebp + eax - 0x2a8]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x18
jmp 0x404684
jmp 0x404689
jmp 0x4045ac
lea edx, [ebp - 0x2ac]
push edx
push 8
push 0
push str.SYSTEMCurrentControlSetServicesTcpipParametersInterfaces
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404ac8
lea eax, [ebp - 0x10c]
push eax
push 0
push 0
push 0
lea ecx, [ebp - 0x250]
push ecx
lea edx, [ebp - 0x214]
push edx
mov eax, dword [ebp - 0x2b0]
push eax
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x404ab6
mov dword [ebp - 0x23c], 0
lea edx, [ebp - 0x228]
push edx
push 1
push 0
lea eax, [ebp - 0x214]
push eax
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404a98
mov dword [ebp - 0x250], 0x104
lea edx, [ebp - 0x250]
push edx
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x110]
push ecx
push 0
push 0x407730
mov edx, dword [ebp - 0x228]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4048ce
mov dword [ebp - 0x258], 0
jmp 0x40476a
mov eax, dword [ebp - 0x258]
add eax, 1
mov dword [ebp - 0x258], eax
mov ecx, dword [ebp - 0x258]
cmp ecx, dword [ebp - 0x238]
jge 0x4048ce
lea edx, [ebp - 0x104]
push edx
mov eax, dword [ebp - 0x258]
imul eax, eax, 0x14
lea ecx, [ebp + eax - 0x2a8]
push ecx
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x4048c9
mov dword [ebp - 0x250], 0x104
lea edx, [ebp - 0x250]
push edx
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x110]
push ecx
push 0
push str.SubnetMask
mov edx, dword [ebp - 0x228]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4048c9
mov eax, dword [ebp - 0x258]
mov dword [ebp + eax*4 - 0x224], 1
mov dword [ebp - 0x23c], 1
push 0xa
lea ecx, [ebp - 0x254]
push ecx
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
mov dword [ebp - 0x22c], eax
push 0xa
lea eax, [ebp - 0x2b4]
push eax
mov ecx, dword [ebp - 0x254]
add ecx, 1
push ecx
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
shl eax, 8
mov edx, dword [ebp - 0x22c]
add edx, eax
mov dword [ebp - 0x22c], edx
push 0xa
lea eax, [ebp - 0x254]
push eax
mov ecx, dword [ebp - 0x2b4]
add ecx, 1
push ecx
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
shl eax, 0x10
mov edx, dword [ebp - 0x22c]
add edx, eax
mov dword [ebp - 0x22c], edx
push 0xa
lea eax, [ebp - 0x2b4]
push eax
mov ecx, dword [ebp - 0x254]
add ecx, 1
push ecx
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
shl eax, 0x18
mov edx, dword [ebp - 0x22c]
add edx, eax
mov dword [ebp - 0x22c], edx
mov eax, dword [ebp - 0x258]
mov ecx, dword [ebp + eax*4 - 0x24c]
and ecx, dword [ebp - 0x22c]
mov edx, dword [ebp - 0x22c]
not edx
or ecx, edx
mov eax, dword [ebp - 0x258]
mov edx, dword [ebp + 8]
mov dword [edx + eax*4], ecx
jmp 0x40475b
cmp dword [ebp - 0x23c], 0
jne 0x404a8b
mov dword [ebp - 0x250], 0x104
lea eax, [ebp - 0x250]
push eax
lea ecx, [ebp - 0x104]
push ecx
lea edx, [ebp - 0x110]
push edx
push 0
push 0x407748
mov eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404a8b
mov dword [ebp - 0x258], 0
jmp 0x404931
mov ecx, dword [ebp - 0x258]
add ecx, 1
mov dword [ebp - 0x258], ecx
mov edx, dword [ebp - 0x258]
cmp edx, dword [ebp - 0x238]
jge 0x404a8b
lea eax, [ebp - 0x104]
push eax
mov ecx, dword [ebp - 0x258]
imul ecx, ecx, 0x14
lea edx, [ebp + ecx - 0x2a8]
push edx
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x404a86
mov dword [ebp - 0x250], 0x104
lea eax, [ebp - 0x250]
push eax
lea ecx, [ebp - 0x104]
push ecx
lea edx, [ebp - 0x110]
push edx
push 0
push 0x407758
mov eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404a86
mov ecx, dword [ebp - 0x258]
mov dword [ebp + ecx*4 - 0x224], 1
push 0xa
lea edx, [ebp - 0x254]
push edx
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
mov dword [ebp - 0x22c], eax
push 0xa
lea ecx, [ebp - 0x2b4]
push ecx
mov edx, dword [ebp - 0x254]
add edx, 1
push edx
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
shl eax, 8
mov ecx, dword [ebp - 0x22c]
add ecx, eax
mov dword [ebp - 0x22c], ecx
push 0xa
lea edx, [ebp - 0x254]
push edx
mov eax, dword [ebp - 0x2b4]
add eax, 1
push eax
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
shl eax, 0x10
mov ecx, dword [ebp - 0x22c]
add ecx, eax
mov dword [ebp - 0x22c], ecx
push 0xa
lea edx, [ebp - 0x2b4]
push edx
mov eax, dword [ebp - 0x254]
add eax, 1
push eax
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
shl eax, 0x18
mov ecx, dword [ebp - 0x22c]
add ecx, eax
mov dword [ebp - 0x22c], ecx
mov edx, dword [ebp - 0x258]
mov eax, dword [ebp + edx*4 - 0x24c]
and eax, dword [ebp - 0x22c]
mov ecx, dword [ebp - 0x22c]
not ecx
or eax, ecx
mov edx, dword [ebp - 0x258]
mov ecx, dword [ebp + 8]
mov dword [ecx + edx*4], eax
jmp 0x404922
mov edx, dword [ebp - 0x228]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x2b0]
add eax, 1
mov dword [ebp - 0x2b0], eax
mov dword [ebp - 0x250], 0x104
jmp 0x4046ac
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x404f04
lea edx, [ebp - 0x2ac]
push edx
push 8
push 0
push str.SYSTEMCurrentControlSetServicesClassNetTrans
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404f04
lea eax, [ebp - 0x10c]
push eax
push 0
push 0
push 0
lea ecx, [ebp - 0x250]
push ecx
lea edx, [ebp - 0x214]
push edx
mov eax, dword [ebp - 0x2b0]
push eax
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x404d38
mov dword [ebp - 0x23c], 0
lea edx, [ebp - 0x228]
push edx
push 1
push 0
lea eax, [ebp - 0x214]
push eax
mov ecx, dword [ebp - 0x2ac]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404d1a
mov dword [ebp - 0x250], 0x104
lea edx, [ebp - 0x250]
push edx
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x110]
push ecx
push 0
push str.IPAddress
mov edx, dword [ebp - 0x228]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404d0d
mov dword [ebp - 0x258], 0
jmp 0x404ba9
mov eax, dword [ebp - 0x258]
add eax, 1
mov dword [ebp - 0x258], eax
mov ecx, dword [ebp - 0x258]
cmp ecx, dword [ebp - 0x238]
jge 0x404d0d
lea edx, [ebp - 0x104]
push edx
mov eax, dword [ebp - 0x258]
imul eax, eax, 0x14
lea ecx, [ebp + eax - 0x2a8]
push ecx
call sub.MSVCRT.dll_strcmp
add esp, 8
test eax, eax
jne 0x404d08
mov dword [ebp - 0x250], 0x104
lea edx, [ebp - 0x250]
push edx
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x110]
push ecx
push 0
push str.IPMask
mov edx, dword [ebp - 0x228]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404d08
mov eax, dword [ebp - 0x258]
mov dword [ebp + eax*4 - 0x224], 1
mov dword [ebp - 0x23c], 1
push 0xa
lea ecx, [ebp - 0x254]
push ecx
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
mov dword [ebp - 0x22c], eax
push 0xa
lea eax, [ebp - 0x2b4]
push eax
mov ecx, dword [ebp - 0x254]
add ecx, 1
push ecx
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
shl eax, 8
mov edx, dword [ebp - 0x22c]
add edx, eax
mov dword [ebp - 0x22c], edx
push 0xa
lea eax, [ebp - 0x254]
push eax
mov ecx, dword [ebp - 0x2b4]
add ecx, 1
push ecx
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
shl eax, 0x10
mov edx, dword [ebp - 0x22c]
add edx, eax
mov dword [ebp - 0x22c], edx
push 0xa
lea eax, [ebp - 0x2b4]
push eax
mov ecx, dword [ebp - 0x254]
add ecx, 1
push ecx
call dword [sym.imp.MSVCRT.dll_strtoul]
add esp, 0xc
shl eax, 0x18
mov edx, dword [ebp - 0x22c]
add edx, eax
mov dword [ebp - 0x22c], edx
mov eax, dword [ebp - 0x258]
mov ecx, dword [ebp + eax*4 - 0x24c]
and ecx, dword [ebp - 0x22c]
mov edx, dword [ebp - 0x22c]
not edx
or ecx, edx
mov eax, dword [ebp - 0x258]
mov edx, dword [ebp + 8]
mov dword [edx + eax*4], ecx
jmp 0x404b9a
mov eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x2b0]
add ecx, 1
mov dword [ebp - 0x2b0], ecx
mov dword [ebp - 0x250], 0x104
jmp 0x404aeb
mov edx, dword [ebp - 0x2ac]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x2ac]
push eax
push 8
push 0
push str.SYSTEMCurrentControlSetServicesVxDDHCP
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404f04
mov dword [ebp - 0x2b0], 0
lea ecx, [ebp - 0x10c]
push ecx
push 0
push 0
push 0
lea edx, [ebp - 0x250]
push edx
lea eax, [ebp - 0x214]
push eax
mov ecx, dword [ebp - 0x2b0]
push ecx
mov edx, dword [ebp - 0x2ac]
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x404ef7
mov dword [ebp - 0x23c], 0
lea eax, [ebp - 0x228]
push eax
push 1
push 0
lea ecx, [ebp - 0x214]
push ecx
mov edx, dword [ebp - 0x2ac]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404ed9
mov dword [ebp - 0x250], 4
lea eax, [ebp - 0x250]
push eax
lea ecx, [ebp - 0x234]
push ecx
lea edx, [ebp - 0x110]
push edx
push 0
push str.DhcpIPAddress
mov eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404ecc
mov dword [ebp - 0x258], 0
jmp 0x404e30
mov ecx, dword [ebp - 0x258]
add ecx, 1
mov dword [ebp - 0x258], ecx
mov edx, dword [ebp - 0x258]
cmp edx, dword [ebp - 0x238]
jge 0x404ecc
mov eax, dword [ebp - 0x258]
cmp dword [ebp + eax*4 - 0x224], 0
jne 0x404ec7
mov ecx, dword [ebp - 0x258]
mov edx, dword [ebp + ecx*4 - 0x24c]
cmp edx, dword [ebp - 0x234]
jne 0x404ec7
mov dword [ebp - 0x250], 4
lea eax, [ebp - 0x250]
push eax
lea ecx, [ebp - 0x22c]
push ecx
lea edx, [ebp - 0x110]
push edx
push 0
push str.DhcpSubnetMask
mov eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x404ec7
mov ecx, dword [ebp - 0x258]
mov edx, dword [ebp + ecx*4 - 0x24c]
and edx, dword [ebp - 0x22c]
mov eax, dword [ebp - 0x22c]
not eax
or edx, eax
mov ecx, dword [ebp - 0x258]
mov eax, dword [ebp + 8]
mov dword [eax + ecx*4], edx
jmp 0x404e21
mov ecx, dword [ebp - 0x228]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x2b0]
add edx, 1
mov dword [ebp - 0x2b0], edx
mov dword [ebp - 0x250], 0x104
jmp 0x404d72
mov eax, dword [ebp - 0x2ac]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esp, ebp
pop ebp
ret 4