Function at 0x407570
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52c2f0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x586dc4]
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.0042366f
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 0x4077ab
call fcn.0041460c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4075ed
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 0x407780
jmp 0x407615
mov ebx, dword [ebp - 0x14]
cmp word [ebx + 8], si
jne 0x407770
cmp si, 1
jne 0x407677
mov eax, dword [ebx + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401650
mov eax, dword [edi + 8]
lea ecx, [ebp - 0x1c]
push ecx
push eax
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.0042396f
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 0x407770
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x407770
cmp si, 0xf
jne 0x4076ee
mov edx, dword [ebx + 0x18]
test edx, edx
jne 0x407688
xor eax, eax
jmp 0x40769c
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407690
sub eax, esi
mov esi, dword [ebp + 0xc]
push eax
push edx
lea ecx, [ebp - 0x10]
call fcn.004014c0
mov eax, dword [ebp + 0x14]
cmp dword [eax - 0xc], 0
je 0x4076da
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 0xc], 0
jl 0x407770
push eax
push ecx
call fcn.00513429
add esp, 8
test eax, eax
je 0x407770
sub eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x407770
mov eax, dword [edi + 8]
lea ecx, [ebp - 0x10]
push ecx
push eax
mov ecx, edi
call fcn.0042396f
jmp 0x407770
cmp si, 0x10
jne 0x40780b
xor edi, edi
cmp dword [ebx + 0x18], edi
jbe 0x40776d
add ebx, 0x1c
mov edx, dword [ebx]
test edx, edx
jne 0x40770c
xor eax, eax
jmp 0x40771a
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407711
sub eax, esi
push eax
push edx
lea ecx, [ebp - 0x10]
call fcn.004014c0
mov eax, dword [ebp + 0x14]
cmp dword [eax - 0xc], 0
je 0x40774c
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 0xc], 0
jl 0x40775c
push eax
push ecx
call fcn.00513429
add esp, 8
test eax, eax
je 0x40775c
sub eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x40775c
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + 8]
lea edx, [ebp - 0x10]
push edx
push eax
call fcn.0042396f
mov eax, dword [ebp - 0x14]
inc edi
add ebx, 4
cmp edi, dword [eax + 0x18]
jb 0x407702
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 0x407612
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 0x4077ab
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 0x4077d1
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 0x4077f7
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 0x407770
mov ecx, dword [ebx + 0x18]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00401610
mov ecx, dword [ebp + 0x14]
cmp dword [ecx - 0xc], 0
je 0x407855
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], 0
jl 0x407770
push ecx
push eax
call fcn.00513429
add esp, 8
test eax, eax
je 0x407770
sub eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x407770
mov eax, dword [edi + 8]
lea edx, [ebp - 0x10]
push edx
push eax
mov ecx, edi
call fcn.0042396f
jmp 0x407770