Function at 0x4065a1
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
push esi
lea eax, [ebp - 0x18]
push eax
push edi
push 7
pop eax
call fcn.00405512
test al, al
jne 0x4065cb
xor al, al
jmp 0x40677e
xor ebx, ebx
inc ebx
jmp 0x4065d6
cmp byte [ebp - 5], 0
je 0x4065e9
push esi
lea eax, [ebp - 5]
push eax
push edi
mov eax, ebx
call fcn.00405512
test al, al
jne 0x4065d0
jmp 0x4065c4
mov ecx, dword [ebp - 0x15]
mov eax, ecx
and eax, 0xff0000
mov edx, ecx
shr edx, 0x10
or eax, edx
mov edx, ecx
and edx, 0xff00
shl ecx, 0x10
or edx, ecx
shr eax, 8
shl edx, 8
or eax, edx
dec eax
mov byte [ebp - 9], 0x5a
cmp eax, 0xfe
ja 0x4066a2
push 0
lea eax, [ebp - 5]
push eax
push edi
mov eax, ebx
call fcn.00405512
test al, al
je 0x4065c4
mov al, byte [ebp - 5]
mov byte [ebp + esi - 0x12c], al
test al, al
je 0x40664d
inc esi
cmp esi, 0xff
jle 0x40661f
jmp 0x4065c4
lea eax, [ebp - 0x10]
push eax
xor edi, edi
push edi
push edi
lea eax, [ebp - 0x12c]
push eax
mov dword [ebp - 0x10], edi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x40666f
mov byte [ebp - 9], 0x5b
jmp 0x4066a2
mov esi, dword [ebp - 0x10]
jmp 0x40667d
cmp dword [esi + 4], 2
je 0x406683
mov esi, dword [esi + 0x1c]
cmp esi, edi
jne 0x406674
jmp 0x406695
mov eax, dword [esi + 0x18]
push 4
add eax, 4
push eax
lea eax, [ebp - 0x15]
push eax
call fcn.00403e04
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp esi, edi
je 0x406669
cmp byte [ebp - 9], 0x5a
mov byte [ebp - 5], bl
jne 0x4067ec
push 0x10
push 0
lea eax, [ebp - 0x28]
push eax
call fcn.00403e7b
push 2
pop eax
mov word [ebp - 0x28], ax
movzx eax, byte [ebp - 0x18]
dec eax
je 0x406785
dec eax
je 0x4066da
mov byte [ebp - 9], 0x5b
jmp 0x4067ec
push ebx
push 0x10
lea edi, [ebp - 0x28]
call fcn.004056a2
mov esi, eax
mov dword [ebp - 0x10], esi
cmp esi, 0xffffffff
je 0x4066d1
push 0
push 0x5a
push esi
push dword [ebp + 8]
call fcn.0040652b
mov edi, eax
cmp edi, ebx
jne 0x406765
lea eax, [ebp + 8]
push eax
xor esi, esi
push esi
lea eax, [ebp - 0x10]
push eax
mov eax, ebx
call fcn.004058d2
mov edi, eax
cmp edi, 0xffffffff
je 0x406726
push esi
push esi
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
mov esi, dword [ebp - 0x10]
call fcn.004059dd
cmp edi, 0xffffffff
je 0x4066d1
push edi
call fcn.004059f3
push 2
push 0x5a
push edi
push dword [ebp + 8]
call fcn.0040652b
mov dword [ebp - 0x10], eax
cmp eax, ebx
jne 0x406759
mov ebx, dword [ebp + 8]
push edi
call fcn.00405743
xor ebx, ebx
inc ebx
mov esi, edi
call fcn.004059dd
mov edi, dword [ebp - 0x10]
jmp 0x40676a
call fcn.004059dd
cmp edi, 0xffffffff
je 0x4066d1
cmp edi, ebx
je 0x40677b
mov byte [ebp - 5], 0
mov al, byte [ebp - 5]
pop edi
pop esi
pop ebx
leave
ret 4
mov ax, word [ebp - 0x17]
mov word [ebp - 0x26], ax
mov eax, dword [ebp - 0x15]
push 0x10
lea edi, [ebp - 0x28]
mov dword [ebp - 0x24], eax
call fcn.00405591
mov esi, eax
cmp esi, 0xffffffff
je 0x4066d1
push esi
call fcn.004059f3
push 0
push 0x5a
push esi
push dword [ebp + 8]
call fcn.0040652b
cmp eax, ebx
jne 0x4067cd
mov ebx, dword [ebp + 8]
push esi
call fcn.00405743
xor ebx, ebx
inc ebx
jmp 0x4067dc
cmp eax, 0xffffffff
jne 0x4067d8
mov byte [ebp - 9], 0x5b
jmp 0x4067dc
mov byte [ebp - 5], 0
call fcn.004059dd
cmp byte [ebp - 5], bl
jne 0x40677b
cmp byte [ebp - 9], 0x5a
je 0x40677b
push 0
push dword [ebp - 9]
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040652b
test eax, eax
setne al
jmp 0x40677e