Function at 0x406248
Capabilities:
Resolve dns

Disassembly:
mov eax, 0x41a664
call fcn.00410e40
sub esp, 0x28
mov eax, dword [0x4240b8]
push ebx
push esi
push edi
mov dword [ebp - 0x10], eax
mov eax, dword [0x424e6c]
mov esi, ecx
mov edi, 0x424e6c
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x30], eax
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [0x424e6c]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp + 8]
add eax, 0x34
push eax
mov byte [ebp - 4], 1
call fcn.00406c4f
mov eax, dword [0x424e6c]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 2
mov eax, dword [0x424e6c]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
mov byte [ebp - 4], 3
call fcn.0040608b
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040608b
cmp dword [0x425db8], 1
mov edi, dword [sym.imp.WS2_32.dll_inet_addr]
jbe 0x406358
mov ebx, 0x425dc0
push ebx
mov word [0x4258e0], 2
call edi
cmp eax, 0xffffffff
mov dword [0x4258e4], eax
jne 0x406333
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x406327
or ebx, 0xffffffff
jmp 0x406415
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [0x4258e4], eax
xor eax, eax
mov ax, word [0x425dbc]
push eax
call dword [sym.imp.WS2_32.dll_htons]
and dword [0x4258e8], 0
and dword [0x4258ec], 0
mov word [0x4258e2], ax
xor ebx, ebx
cmp dword [0x425db8], 2
mov eax, dword [ebp - 0x34]
mov word [ebp - 0x1e], ax
je 0x4063a3
push eax
mov word [ebp - 0x20], 2
call dword [sym.imp.WS2_32.dll_htons]
push dword [ebp - 0x24]
mov word [ebp - 0x1e], ax
call edi
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
jne 0x40639d
push dword [ebp - 0x24]
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
je 0x40631f
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
push ebx
push ebx
push dword [esi + 0x3c]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
push dword [ebp - 0x2c]
mov dword [esi + 0x30], eax
push dword [ebp - 0x24]
lea eax, [ebp - 0x20]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push esi
call fcn.00405857
mov edi, eax
mov eax, esi
call fcn.004056b6
push ebx
call fcn.00402ce1
test eax, eax
jne 0x40631f
cmp edi, 1
je 0x406412
cmp edi, ebx
je 0x406402
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4063b1
push dword [ebp + 8]
mov eax, esi
call fcn.004057a9
test eax, eax
jne 0x4063a3
jmp 0x406415
xor ebx, ebx
inc ebx
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
call fcn.0040252d
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
call fcn.0040252d
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
call fcn.0040252d
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
call fcn.0040252d
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
mov eax, ebx
pop ebx
call fcn.00410647
leave
ret 8