Function at 0x403120
Capabilities:
Reference opendns dns server

Disassembly:
mov eax, 0x2030
call fcn.0040a600
mov al, byte [0x41ba6c]
push ebp
test al, al
push esi
jne 0x403140
pop esi
xor eax, eax
pop ebp
add esp, 0x2030
ret
xor ebp, ebp
push ebp
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0xc], esi
jne 0x403163
pop esi
xor eax, eax
pop ebp
add esp, 0x2030
ret
push ebp
push ebp
push esi
mov dword [esp + 0x1c], ebp
call fcn.00406bf0
add esp, 0xc
test eax, eax
je 0x403386
xor eax, eax
push ebx
mov dword [esp + 0x1c], eax
push edi
mov dword [esp + 0x24], eax
push ebp
push 0x413990
mov dword [esp + 0x30], eax
push str.Shell.Dusn
push SysReAllocStringLen
mov dword [esp + 0x3c], eax
mov word [esp + 0x30], 2
call fcn.004033c0
add esp, 0x10
cmp eax, 1
jb 0x4031bc
cmp eax, 7
ja 0x4031bc
lea ebx, [eax - 1]
jmp 0x4031cc
call fcn.004071a0
xor edx, edx
mov ecx, 7
div ecx
mov ebx, edx
lea edx, [ebx + ebx*4]
lea eax, [edx*4 + str.208.67.222.222]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x35
mov dword [esp + 0x28], eax
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [esp + 0x2044]
lea ecx, [esp + 0x10]
push ecx
push edi
mov word [esp + 0x2a], ax
mov dword [esp + 0x18], ebp
call fcn.00402fd0
add esp, 8
cmp eax, ebp
jbe 0x40336c
push ebp
push 0x3e8
lea edx, [esp + 0x28]
push 0x10
push edx
push ebp
push eax
mov eax, dword [esp + 0x28]
push eax
push esi
call fcn.004082a0
push ebp
lea ecx, [esp + 0x20]
push 0x3e8
lea edx, [esp + 0x38]
push ecx
push edx
push ebp
lea eax, [esp + 0x54]
push 0x2000
push eax
push esi
mov dword [esp + 0x3c], 0x10
call fcn.00408420
test eax, eax
jl 0x40339a
xor ecx, ecx
xor eax, eax
mov cl, byte [esp + 0x45]
mov al, byte [esp + 0x49]
mov ch, byte [esp + 0x44]
mov ah, byte [esp + 0x48]
mov word [esp + 0x44], cx
xor ecx, ecx
mov cl, byte [esp + 0x4b]
mov word [esp + 0x48], ax
mov ch, byte [esp + 0x4a]
xor eax, eax
mov word [esp + 0x4a], cx
or ecx, 0xffffffff
xor edx, edx
mov dl, byte [esp + 0x47]
repne scasb al, byte es:[edi]
mov dh, byte [esp + 0x46]
xor edi, edi
not ecx
dec ecx
mov word [esp + 0x46], dx
test dx, dx
lea esi, [esp + ecx + 0x52]
jbe 0x403368
mov ax, word [esi + 2]
xor edx, edx
mov dl, ah
xor ecx, ecx
mov dh, al
mov ax, word [esi + 4]
mov cl, ah
mov word [esi + 2], dx
mov ch, al
mov ax, word [esi + 0xa]
xor edx, edx
mov word [esi + 4], cx
mov dl, ah
mov dh, al
mov eax, dword [esi + 6]
mov word [esi + 0xa], dx
mov ecx, eax
mov edx, eax
and ecx, 0xff0000
shr edx, 0x10
or ecx, edx
mov edx, eax
shl edx, 0x10
and eax, 0xff00
or edx, eax
shr ecx, 8
shl edx, 8
or ecx, edx
mov dword [esi + 6], ecx
cmp word [esi + 2], 1
jne 0x40334b
cmp word [esi + 0xa], 4
jne 0x40334b
mov eax, dword [esi + 0xc]
cmp eax, 0x100007f
mov dword [esp + 0x18], eax
je 0x40334b
cmp al, 0xc0
jne 0x403327
cmp ah, 0xa8
je 0x40334b
test ebp, ebp
jne 0x40334b
lea eax, [ebx + 1]
push eax
push 0x413990
push str.Shell.Dusn
push SysReAllocStringLen
call fcn.00403410
add esp, 0x10
mov ebp, 1
mov edx, dword [esp + 0x46]
xor ecx, ecx
mov cx, word [esi + 0xa]
inc edi
and edx, 0xffff
cmp edi, edx
lea esi, [esi + ecx + 0xc]
jb 0x4032af
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
pop edi
test eax, eax
pop ebx
je 0x403386
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
add esp, 0x2030
ret
push ebp
push 0x413990
push str.Shell.Dusn
push SysReAllocStringLen
call fcn.00403410
add esp, 0x10
jmp 0x40336c