Function at 0x409860
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x429c7c
mov eax, dword fs:[0]
push eax
sub esp, 0x130
mov eax, dword [0x43bca0]
xor eax, esp
mov dword [esp + 0x128], eax
push ebx
push esi
push edi
mov eax, dword [0x43bca0]
xor eax, esp
push eax
lea eax, [esp + 0x140]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, ecx
lea esi, [edi + 0xc]
mov ecx, esi
mov dword [edi + 4], eax
call fcn.00407070
or eax, 0xffffffff
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
add edi, 0x1c
mov dword [esp + 0x10], 3
mov edx, dword [esi + 4]
test edx, edx
jne 0x4098d3
xor ecx, ecx
jmp 0x4098db
mov ecx, dword [esi + 8]
sub ecx, edx
sar ecx, 2
test edx, edx
je 0x4098fc
mov eax, dword [esi + 0xc]
sub eax, edx
sar eax, 2
cmp ecx, eax
jae 0x4098fc
mov eax, dword [esi + 8]
mov dword [eax], 0xffffffff
add eax, 4
mov dword [esi + 8], eax
jmp 0x40991c
mov ebx, dword [esi + 8]
cmp edx, ebx
jbe 0x409909
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
lea ecx, [esp + 0x18]
push ecx
push ebx
push esi
lea edx, [esp + 0x28]
push edx
mov ecx, esi
call fcn.004071b0
mov edx, dword [edi + 4]
test edx, edx
jne 0x409927
xor ecx, ecx
jmp 0x40992f
mov ecx, dword [edi + 8]
sub ecx, edx
sar ecx, 2
test edx, edx
je 0x409950
mov eax, dword [edi + 0xc]
sub eax, edx
sar eax, 2
cmp ecx, eax
jae 0x409950
mov eax, dword [edi + 8]
mov dword [eax], 0xffffffff
add eax, 4
mov dword [edi + 8], eax
jmp 0x409970
mov ebx, dword [edi + 8]
cmp edx, ebx
jbe 0x40995d
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
lea eax, [esp + 0x14]
push eax
push ebx
push edi
lea ecx, [esp + 0x30]
push ecx
mov ecx, edi
call fcn.004071b0
sub dword [esp + 0x10], 1
jne 0x4098c8
xor edi, edi
lea edx, [edi*4 + 0x43ce8c]
push edx
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC80U.DLL_Ordinal_280]
mov dword [esp + 0x148], 0
mov ebx, dword [esp + 0x10]
cmp dword [ebx - 0xc], 0
je 0x409a51
push 0x103
lea eax, [esp + 0x31]
push 0
push eax
mov byte [esp + 0x38], 0
call sub.MSVCR80.dll_memset
mov eax, dword [ebx - 0xc]
add esp, 0xc
push eax
push eax
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC80U.DLL_Ordinal_2460]
push eax
lea ecx, [esp + 0x34]
push 0x104
push ecx
call fcn.0042082c
add esp, 0x10
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC80U.DLL_Ordinal_5398]
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x409a28
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x409a13
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x409a19
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
mov edx, dword [esi + 4]
mov eax, dword [ecx]
mov dword [edx + edi*4], eax
jmp 0x409a51
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x409a41
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x409a47
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ecx, dword [esi + 4]
mov dword [ecx + edi*4], 0xffffffff
lea ecx, [esp + 0x10]
mov dword [esp + 0x148], 0xffffffff
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
add edi, 1
cmp edi, 3
jb 0x40997d
mov eax, 1
mov ecx, dword [esp + 0x140]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x128]
xor ecx, esp
call fcn.00426052
mov esp, ebp
pop ebp
ret 4