Function at 0x475540
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4adb68
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x12c
push ebx
push esi
push edi
lea eax, [ebp - 0x138]
mov dword [ebp - 0x10], esp
mov esi, ecx
push 0x100
push eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x4756e4
lea ecx, [ebp - 0x138]
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
test edi, edi
je 0x47567a
cmp word [edi + 0xa], 4
jne 0x47567a
mov edx, dword [edi + 0xc]
cmp dword [edx], 0
je 0x47567a
mov al, byte [ebp - 0x19]
push 0
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x30], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [edi + 0xc]
mov byte [ebp - 4], 1
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov esi, eax
mov eax, dword [ebp - 0x18]
mov edi, esi
or ecx, 0xffffffff
lea ebx, [eax + 0x84]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov edi, ecx
mov ecx, ebx
push edi
mov dword [ebp - 0x20], edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x475628
mov ecx, edi
mov edi, dword [ebx + 4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 4]
mov dword [ebx + 8], eax
mov byte [ecx + eax], 0
mov edx, dword [ebp - 0x18]
mov ax, word [ebp - 0x14]
mov word [edx + 0xa4], ax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x47564f
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x475660
cmp al, 0xff
je 0x475660
dec al
mov byte [ecx], al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
call fcn.0049c000
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 0x4d0f10
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esi + 0x84]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov edi, ecx
mov ecx, ebx
push edi
mov dword [ebp - 0x14], edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x4756ca
mov ecx, edi
mov edi, dword [ebx + 4]
mov edx, ecx
mov esi, 0x4d0f10
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x18]
mov dword [ebx + 8], eax
mov ecx, dword [ebx + 4]
mov byte [ecx + eax], 0
mov ecx, dword [ebp - 0xc]
mov word [esi + 0xa4], 0
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 0x4d0f10
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esi + 0x84]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov edi, ecx
mov ecx, ebx
push edi
mov dword [ebp - 0x14], edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x4756ca
mov ecx, edi
mov edi, dword [ebx + 4]
mov edx, ecx
mov esi, 0x4d0f10
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4756bd