Function at 0x406db0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x536640
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x593e04]
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.0042ddb6
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 0x406feb
call fcn.0041eb0e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x406e2d
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 0x406fc0
jmp 0x406e55
mov ebx, dword [ebp - 0x14]
cmp word [ebx + 8], si
jne 0x406fb0
cmp si, 1
jne 0x406eb7
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.0042e0b6
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 0x406fb0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x406fb0
cmp si, 0xf
jne 0x406f2e
mov edx, dword [ebx + 0x18]
test edx, edx
jne 0x406ec8
xor eax, eax
jmp 0x406edc
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406ed0
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 0x406f1a
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 0xc], 0
jl 0x406fb0
push eax
push ecx
call fcn.0051dac5
add esp, 8
test eax, eax
je 0x406fb0
sub eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x406fb0
mov eax, dword [edi + 8]
lea ecx, [ebp - 0x10]
push ecx
push eax
mov ecx, edi
call fcn.0042e0b6
jmp 0x406fb0
cmp si, 0x10
jne 0x40704b
xor edi, edi
cmp dword [ebx + 0x18], edi
jbe 0x406fad
add ebx, 0x1c
mov edx, dword [ebx]
test edx, edx
jne 0x406f4c
xor eax, eax
jmp 0x406f5a
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406f51
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 0x406f8c
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 0xc], 0
jl 0x406f9c
push eax
push ecx
call fcn.0051dac5
add esp, 8
test eax, eax
je 0x406f9c
sub eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x406f9c
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 8]
lea edx, [ebp - 0x10]
push edx
push eax
call fcn.0042e0b6
mov eax, dword [ebp - 0x14]
inc edi
add ebx, 4
cmp edi, dword [eax + 0x18]
jb 0x406f42
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 0x406e52
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 0x406feb
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 0x407011
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 0x407037
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 0x406fb0
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 0x407095
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], 0
jl 0x406fb0
push ecx
push eax
call fcn.0051dac5
add esp, 8
test eax, eax
je 0x406fb0
sub eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x406fb0
mov eax, dword [edi + 8]
lea edx, [ebp - 0x10]
push edx
push eax
mov ecx, edi
call fcn.0042e0b6
jmp 0x406fb0