Function at 0x406b50
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5366a0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x592dc4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x10]
push 0xffffffffffffffff
push 0
mov ecx, edi
mov dword [ebp - 4], 1
call fcn.0042dd69
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push 0
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push esi
push ecx
mov dword [ebp - 0x18], 0
call sub.DNSAPI.dll_DnsQuery_A
test eax, eax
jne 0x406d8b
call fcn.0041ec06
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x406bcd
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
mov ebx, eax
mov byte [ebp - 4], 2
mov dword [ebp - 0x14], ebx
test eax, eax
je 0x406d60
jmp 0x406bf5
mov ebx, dword [ebp - 0x14]
cmp word [ebx + 8], si
jne 0x406d50
cmp si, 1
jne 0x406c57
mov eax, dword [ebx + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401680
mov eax, dword [edi + 8]
lea ecx, [ebp - 0x1c]
push ecx
push eax
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.0042e069
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406d50
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x406d50
cmp si, 0xf
jne 0x406cce
mov edx, dword [ebx + 0x18]
test edx, edx
jne 0x406c68
xor eax, eax
jmp 0x406c7c
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406c70
sub eax, esi
mov esi, dword [ebp + 0xc]
push eax
push edx
lea ecx, [ebp - 0x10]
call fcn.004014f0
mov eax, dword [ebp + 0x14]
cmp dword [eax - 0xc], 0
je 0x406cba
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 0xc], 0
jl 0x406d50
push eax
push ecx
call fcn.0051dbe5
add esp, 8
test eax, eax
je 0x406d50
sub eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x406d50
mov eax, dword [edi + 8]
lea ecx, [ebp - 0x10]
push ecx
push eax
mov ecx, edi
call fcn.0042e069
jmp 0x406d50
cmp si, 0x10
jne 0x406deb
xor edi, edi
cmp dword [ebx + 0x18], edi
jbe 0x406d4d
add ebx, 0x1c
mov edx, dword [ebx]
test edx, edx
jne 0x406cec
xor eax, eax
jmp 0x406cfa
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406cf1
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x10]
call fcn.004014f0
mov eax, dword [ebp + 0x14]
cmp dword [eax - 0xc], 0
je 0x406d2c
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 0xc], 0
jl 0x406d3c
push eax
push ecx
call fcn.0051dbe5
add esp, 8
test eax, eax
je 0x406d3c
sub eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x406d3c
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 8]
lea edx, [ebp - 0x10]
push edx
push eax
call fcn.0042e069
mov eax, dword [ebp - 0x14]
inc edi
add ebx, 4
cmp edi, dword [eax + 0x18]
jb 0x406ce2
mov esi, dword [ebp + 0xc]
mov ebx, eax
mov edi, dword [ebp + 0x10]
mov eax, dword [ebx]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x406bf2
mov eax, dword [ebp - 0x18]
push 1
push eax
call sub.DNSAPI.dll_DnsFree
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d8b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
mov esi, dword [edi + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406db1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406dd7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp si, 2
jne 0x406d50
mov ecx, dword [ebx + 0x18]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00401640
mov ecx, dword [ebp + 0x14]
cmp dword [ecx - 0xc], 0
je 0x406e35
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], 0
jl 0x406d50
push ecx
push eax
call fcn.0051dbe5
add esp, 8
test eax, eax
je 0x406d50
sub eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x406d50
mov eax, dword [edi + 8]
lea edx, [ebp - 0x10]
push edx
push eax
mov ecx, edi
call fcn.0042e069
jmp 0x406d50