Function at 0x407d30
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x244
mov eax, dword [0x48e4f0]
xor eax, esp
mov dword [esp + 0x23c], eax
mov eax, dword [esp + 0x24c]
push ebx
push ebp
mov ebp, dword [esp + 0x250]
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x8070], 0
mov esi, edx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], eax
jne 0x407d84
mov edi, eax
mov ecx, 6
mov esi, str.501_GSSAPI_not_initialized
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
or eax, 0xffffffff
jmp 0x407ff7
lea ebx, [edi + 0x58]
mov eax, ebp
mov dword [esp + 0x10], ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407d90
sub eax, edx
add eax, 0x3e8
cmp eax, 0x8000
jb 0x407dc9
mov eax, ebp
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407db0
sub eax, edx
add eax, 0x3e8
push eax
call fcn.004576a9
add esp, 4
mov ebx, eax
mov ecx, str.ADAT
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x407df0
test dl, dl
je 0x407dec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x407df0
add eax, 2
add ecx, 2
test dl, dl
jne 0x407dd0
xor eax, eax
jmp 0x407df5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407f70
mov eax, dword [edi]
mov eax, dword [eax + 0x30]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x34]
mov esi, 0x10
push edx
mov ecx, edi
mov dword [esp + 0x20], esi
call eax
test eax, eax
jne 0x407e46
cmp ebx, dword [esp + 0x10]
je 0x407e2c
push ebx
call fcn.00459522
add esp, 4
mov ecx, dword [esp + 0x14]
push str.501_unable_to_getpeername
push ecx
call fcn.00459b02
add esp, 8
or eax, 0xffffffff
jmp 0x407ff7
mov edx, dword [edi]
mov edx, dword [edx + 0x38]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, edi
mov dword [esp + 0x20], esi
call edx
test eax, eax
jne 0x407e8a
cmp ebx, dword [esp + 0x10]
je 0x407e70
push ebx
call fcn.00459522
add esp, 4
mov eax, dword [esp + 0x14]
push str.501_unable_to_getsockname
push eax
call fcn.00459b02
add esp, 8
or eax, 0xffffffff
jmp 0x407ff7
push 0x200
lea ecx, [esp + 0x44]
push ecx
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
je 0x407ecf
cmp ebx, dword [esp + 0x10]
je 0x407ead
push ebx
call fcn.00459522
add esp, 4
call fcn.00459bc8
mov edx, dword [eax]
mov eax, dword [esp + 0x14]
push edx
push str.501_couldnt_get_local_hostname___d_
push eax
call fcn.00459b02
add esp, 0xc
or eax, 0xffffffff
jmp 0x407ff7
lea ecx, [esp + 0x40]
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x407f07
cmp ebx, dword [esp + 0x10]
je 0x407eed
push ebx
call fcn.00459522
add esp, 4
mov edx, dword [esp + 0x14]
push str.501_couldnt_canonicalize_local_hostname
push edx
call fcn.00459b02
add esp, 8
or eax, 0xffffffff
jmp 0x407ff7
mov eax, dword [eax]
push 0x200
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.00459c20
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x40]
mov dword [ebx + 4], eax
mov dword [ebx], edx
lea eax, [esp + 0x4c]
lea edx, [ebx + 8]
mov ecx, eax
add esp, 0xc
mov byte [esp + 0x240], 0
sub edx, ecx
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x407f40
lea eax, [esp + 0x40]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407f51
sub eax, edx
mov ecx, ebp
lea edx, [eax + ebx + 9]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x407f60
mov esi, dword [esp + 0x1c]
jmp 0x407f80
mov edx, ebx
mov eax, ebp
sub edx, ebp
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x407f76
mov edx, dword [esp + 0x14]
mov eax, dword [edi + 0x806c]
mov ecx, dword [edi + 0x8078]
push edx
push ebx
push esi
push eax
call ecx
mov esi, eax
mov eax, dword [esp + 0x2c]
add esp, 0x10
mov ecx, str.ADAT
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x407fc4
test dl, dl
je 0x407fc0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x407fc4
add eax, 2
add ecx, 2
test dl, dl
jne 0x407fa4
xor eax, eax
jmp 0x407fc9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407fe6
cmp esi, 0xffffffff
je 0x407fe6
mov dword [edi + 0x805c], 3
mov dword [edi + 0x8074], 1
cmp ebx, dword [esp + 0x10]
je 0x407ff5
push ebx
call fcn.00459522
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x24c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004593ed
add esp, 0x244
ret 8