Function at 0x476f30
Capabilities:
Get hostname
Resolve dns
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x26c
mov eax, dword [0x5d60c4]
xor eax, esp
mov dword [esp + 0x268], eax
cmp byte [0x5d960e], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
je 0x476f90
mov eax, dword [0x5d9a48]
cmp eax, 0xc
jge 0x476f90
push 0x5e1b58
inc eax
push 0x64
push edi
mov dword [0x5d9a48], eax
call fcn.0053193e
add esp, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0052b789
mov esp, ebp
pop ebp
ret 8
push 0x100
lea eax, [esp + 0x174]
mov dword [0x5d9a48], 0
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
je 0x476fda
push 0x64
push str.Host_name_unavailable
push 0x64
push edi
call fcn.0053a408
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0052b789
mov esp, ebp
pop ebp
ret 8
mov eax, dword [0x5e44e8]
cmp dword [eax + 0xe64], 0
je 0x47713d
lea eax, [esp + 0x10]
mov byte [edi], 0
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x14], 0
push eax
xorps xmm0, xmm0
mov dword [esp + 0x20], 0
push 0
lea eax, [esp + 0x17c]
movlpd qword [esp + 0x34], xmm0
push eax
movlpd qword [esp + 0x40], xmm0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], 6
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x47711c
mov esi, dword [esp + 0x10]
test esi, esi
je 0x47711c
cmp dword [esi + 4], 0x17
jne 0x477111
push 0x2e
lea eax, [esp + 0x44]
mov dword [esp + 0x18], 0x2e
push 0
push eax
call fcn.0052d9b0
add esp, 0xc
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x44]
push eax
push 0
push dword [esi + 0x10]
push dword [esi + 0x18]
call dword [sym.imp.WS2_32.dll_WSAAddressToStringA]
push 0x100
lea eax, [esp + 0x74]
push 0
push eax
call fcn.0052d9b0
mov eax, dword [esp + 0x20]
add esp, 0xc
add eax, 0xfffffffc
push eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x78]
push 0x100
push eax
call fcn.0053a408
push 0x5c49d8
lea eax, [esp + 0x84]
push 0x100
push eax
call fcn.00531998
mov edx, edi
add esp, 0x1c
lea ecx, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x4770e0
sub edx, ecx
lea ecx, [esp + 0x70]
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4770f0
sub ecx, ebx
lea eax, [ecx + edx]
cmp eax, 0x64
jge 0x477111
lea eax, [esp + 0x70]
push eax
push 0x64
push edi
call fcn.00531998
add esp, 0xc
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x477054
push dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0052b789
mov esp, ebp
pop ebp
ret 8
lea eax, [esp + 0x170]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
jne 0x47717a
push 0x64
push str.IP_address_unavailable
push 0x64
push edi
call fcn.0053a408
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0052b789
mov esp, ebp
pop ebp
ret 8
mov byte [edi], 0
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x14], 0
cmp dword [eax], 0
je 0x477258
xor ecx, ecx
mov dword [esp + 0x10], ecx
xor eax, eax
xor esi, esi
cmp ax, word [ebx + 0xa]
jge 0x4771f1
mov eax, dword [ebx + 0xc]
mov eax, dword [eax + ecx]
movzx eax, byte [eax + esi]
push eax
lea eax, [esp + 0x3c]
push 0x5c49f4
push eax
call fcn.0044c060
mov eax, edi
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4771c3
sub eax, edx
mov ecx, 0x63
sub ecx, eax
lea eax, [esp + 0x38]
push ecx
push eax
push 0x64
push edi
call fcn.0052f991
movsx eax, word [ebx + 0xa]
inc esi
mov ecx, dword [esp + 0x20]
add esp, 0x10
cmp esi, eax
jl 0x4771a1
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4771f6
sub ecx, edx
mov byte [ecx + edi - 1], al
mov eax, dword [ebx + 0xc]
mov ecx, dword [esp + 0x10]
cmp dword [ecx + eax + 4], 0
je 0x47723a
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x477216
sub ecx, edx
mov eax, 0x63
sub eax, ecx
push eax
push 0x5c49f8
push 0x64
push edi
call fcn.0052f991
mov eax, dword [ebx + 0xc]
add esp, 0x10
mov edx, dword [esp + 0x14]
inc edx
mov dword [esp + 0x14], edx
lea ecx, [edx*4]
cmp dword [ecx + eax], 0
mov dword [esp + 0x10], ecx
jne 0x477197
mov ecx, dword [esp + 0x274]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0052b789
mov esp, ebp
pop ebp
ret 8