Function at 0x470f50
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x540
mov eax, dword [0x5a6008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
push 0x100
lea ebx, [esi + 0x756]
push ebx
push 0x66
push dword [0x5b4878]
mov dword [ebp - 0x540], ebx
call dword [sym.imp.USER32.dll_LoadStringW]
push 0xffffffffffffffff
push 0x5983c4
push 0x80
push ebx
call fcn.00524f42
mov ecx, dword [esi]
add esp, 0x10
mov eax, dword [ecx]
call dword [eax + 0xd0]
mov esi, dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
je 0x47115e
cmp byte [0x5ab767], 0
je 0x470fe5
mov eax, dword [0x5abb14]
cmp eax, 0xc
jge 0x470fe5
inc eax
push 0x5b4570
mov dword [0x5abb14], eax
lea eax, [ebp - 0x70]
push 0x64
push eax
call fcn.0051736e
add esp, 0xc
jmp 0x471133
push 0x100
lea eax, [ebp - 0x338]
mov dword [0x5abb14], 0
push eax
call esi
test eax, eax
je 0x47101b
push 0x64
push str.Host_name_unavailable
lea eax, [ebp - 0x70]
push 0x64
push eax
call fcn.00522f4c
add esp, 0x10
jmp 0x471133
push edi
lea eax, [ebp - 0x338]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
test edi, edi
jne 0x471049
push 0x64
push str.IP_address_unavailable
lea eax, [ebp - 0x70]
push 0x64
push eax
call fcn.00522f4c
add esp, 0x10
jmp 0x471132
mov byte [ebp - 0x70], 0
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x53c], 0
cmp dword [eax], 0
je 0x471132
xor ebx, ebx
xor eax, eax
xor esi, esi
cmp ax, word [edi + 0xa]
jge 0x4710be
nop
mov eax, dword [edi + 0xc]
mov eax, dword [eax + ebx]
movzx eax, byte [eax + esi]
push eax
lea eax, [ebp - 0xc]
push 0x593b20
push eax
call fcn.00446dc0
lea eax, [ebp - 0x70]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x471092
sub eax, edx
mov ecx, 0x63
sub ecx, eax
lea eax, [ebp - 0xc]
push ecx
push eax
lea eax, [ebp - 0x70]
push 0x64
push eax
call fcn.00515301
movsx eax, word [edi + 0xa]
inc esi
add esp, 0x10
cmp esi, eax
jl 0x471070
lea ecx, [ebp - 0x70]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4710c4
sub ecx, edx
mov byte [ebp + ecx - 0x71], al
mov eax, dword [edi + 0xc]
cmp dword [ebx + eax + 4], 0
je 0x471108
lea ecx, [ebp - 0x70]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4710e1
sub ecx, edx
mov eax, 0x63
sub eax, ecx
push eax
push 0x593b24
lea eax, [ebp - 0x70]
push 0x64
push eax
call fcn.00515301
mov eax, dword [edi + 0xc]
add esp, 0x10
mov ecx, dword [ebp - 0x53c]
inc ecx
mov dword [ebp - 0x53c], ecx
lea ebx, [ecx*4]
cmp dword [ebx + eax], 0
jne 0x471065
mov ebx, dword [ebp - 0x540]
mov esi, dword [sym.imp.WS2_32.dll_gethostname]
pop edi
push 0x64
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x238]
push eax
call fcn.005170c0
push 0xffffffffffffffff
lea eax, [ebp - 0x238]
push eax
push 0x80
push ebx
call fcn.00524f42
add esp, 0x1c
jmp 0x471173
push 0xffffffffffffffff
push str.Not_listening
push 0x80
push ebx
call fcn.00524f42
add esp, 0x10
push 0x200
lea eax, [ebp - 0x538]
push 0
push eax
call fcn.00513330
push 0x100
lea eax, [ebp - 0x170]
push 0
push eax
call fcn.00513330
add esp, 0x18
lea eax, [ebp - 0x170]
push 0x100
push eax
call esi
test eax, eax
jne 0x4711fd
lea ecx, [ebp - 0x170]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4711b7
sub ecx, edx
lea eax, [ebp - 0x170]
push ecx
push eax
lea eax, [ebp - 0x538]
push eax
call fcn.005170c0
push 0xffffffffffffffff
push 0x5983c4
push 0x80
push ebx
call fcn.00524f42
push 0xffffffffffffffff
lea eax, [ebp - 0x538]
push eax
push 0x80
push ebx
call fcn.00524f42
add esp, 0x2c
mov eax, dword [0x5b6e6c]
mov edx, str.___service__
push 0xffffffffffffffff
mov ecx, str.___application__
cmp dword [eax + 0xe20], 0
cmovne ecx, edx
push ecx
push 0x80
push ebx
call fcn.00524f42
push 0xffffffffffffffff
push 0x5ac550
push 0x80
push ebx
call fcn.00524f42
mov ecx, dword [ebp - 4]
add esp, 0x20
xor ecx, ebp
pop esi
pop ebx
call fcn.00511339
mov esp, ebp
pop ebp
ret