Function at 0x426830
Capabilities:
Get hostname
Get local ipv4 addresses
Get socket information
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4b4
push edi
xor eax, eax
test esi, esi
mov ecx, 0x24
lea edi, [esp + 0x24]
mov dword [esp + 0x20], 0
rep stosd dword es:[edi], eax
je 0x426ab5
push 0x50
push esi
call sub.WS2_32.dll_gethostname
test eax, eax
jne 0x4268f7
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x14]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 8]
push edx
push eax
mov dword [esp + 0x14], 0x10
call sub.WS2_32.dll_getsockname
test eax, eax
jne 0x4268be
cmp dword [esp + 8], 8
jl 0x4268be
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x16]
mov dl, byte [esp + 0x17]
mov byte [esi + 0x57], 1
mov byte [esi + 0x58], al
mov byte [esi + 0x59], ah
mov byte [esi + 0x5a], cl
mov byte [esi + 0x5b], dl
jmp 0x4268f7
push esi
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x4268f7
mov byte [esi + 0x57], 1
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov cl, byte [edx]
mov byte [esi + 0x58], cl
mov edx, dword [eax + 0xc]
mov ecx, dword [edx]
mov dl, byte [ecx + 1]
mov byte [esi + 0x59], dl
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov cl, byte [edx + 2]
mov byte [esi + 0x5a], cl
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov cl, byte [eax + 3]
mov byte [esi + 0x5b], cl
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x24], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x426ab5
cmp dword [esp + 0x30], 2
jne 0x426ab5
cmp dword [esp + 0x24], 4
jne 0x426ab5
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x426ab5
cmp byte [esi], 0
jne 0x4269ae
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0xb8]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0xbc]
push ecx
lea edx, [esp + 0x14]
push edx
push str.Hostname
push str.SystemCurrentControlSetServicesTcpipParameters
push 0x80000002
mov dword [esp + 0x20], 0x3ff
call fcn.00404c80
add esp, 0x18
test eax, eax
jne 0x4269ae
mov eax, dword [esp + 8]
test eax, eax
jle 0x4269ae
cmp eax, 0x3ff
jge 0x4269ae
mov eax, dword [esp + 0xc]
cmp eax, 1
je 0x42699b
cmp eax, 7
jne 0x4269ae
push 0x50
lea eax, [esp + 0xbc]
push eax
push esi
call fcn.00458f80
add esp, 0xc
xor eax, eax
mov ecx, 0x100
lea edi, [esp + 0xb8]
rep stosd dword es:[edi], eax
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0xbc]
push edx
lea eax, [esp + 0x14]
push eax
push str.Bind
push str.SystemCurrentControlSetServicesTcpipLinkage
push 0x80000002
mov dword [esp + 0x20], 0x3ff
call fcn.00404c80
add esp, 0x18
test eax, eax
jne 0x426ab5
mov ecx, dword [esp + 8]
test ecx, ecx
jle 0x426ab5
cmp ecx, 0x3ff
jge 0x426ab5
mov eax, dword [esp + 0xc]
cmp eax, 1
je 0x426a26
cmp eax, 3
je 0x426a26
cmp eax, 7
jne 0x426ab5
lea edi, [esp + 0xb8]
lea ecx, [esp + ecx + 0xb8]
mov edx, edi
cmp edx, ecx
jae 0x426aae
lea ebx, [ebx]
cmp byte [edi], 0
je 0x426aae
push 0x5c
push edi
call fcn.0045a180
add esp, 8
test eax, eax
je 0x426a57
inc eax
jmp 0x426a59
mov eax, edi
push eax
push esi
call fcn.00426090
add esp, 8
cmp eax, 3
jl 0x426a7d
mov al, byte [esi + 0x57]
test al, al
je 0x426a7d
mov al, byte [esi + 0x5c]
test al, al
je 0x426a7d
mov al, byte [esi + 0x75]
test al, al
jne 0x426aae
mov eax, edi
mov byte [esi + 0x61], 0
mov byte [esi + 0x66], 0
mov byte [esi + 0x6b], 0
mov byte [esi + 0x70], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x426a92
sub eax, edx
lea edi, [edi + eax + 1]
mov eax, dword [esp + 8]
lea ecx, [esp + eax + 0xb8]
cmp edi, ecx
jb 0x426a40
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop edi
mov esp, ebp
pop ebp
ret