Function at 0x401e7d
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x18
push 8
push dword [0x4076f0]
xor ebx, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
call edi
mov esi, eax
cmp esi, ebx
je 0x4020b7
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
call fcn.00401d1b
cmp dword [ebp + 0x10], ebx
pop ecx
pop ecx
mov dword [ebp + 0xc], ebx
jle 0x401ef7
lea eax, [ebp - 8]
push ebx
push eax
push dword [ebp - 4]
push 8
push 0xff
push dword [ebp + 8]
call sub.DNSAPI.dll_DnsQuery_A
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x401f00
push 0x2710
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jl 0x401ec3
cmp dword [ebp - 0x10], ebx
jne 0x4020cc
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x4020bb
push dword [ebx + 4]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4020b0
cmp word [ebx + 8], 0x10
jne 0x401fa3
and dword [ebp + 0xc], eax
cmp dword [ebx + 0x18], eax
jbe 0x401fa3
lea eax, [ebx + 0x1c]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x10]
push dword [eax]
call dword [sym.imp.SHLWAPI.dll_StrDupA]
test eax, eax
mov dword [ebp - 0x10], eax
je 0x4020b7
mov eax, dword [esi + 8]
test eax, eax
jne 0x401f68
mov eax, dword [esi + 0x14]
lea eax, [eax*4 + 5]
push eax
push 8
push dword [0x4076f0]
call edi
jmp 0x401f82
mov ecx, dword [esi + 0xc]
lea ecx, [ecx*4 + 5]
push ecx
push eax
push 8
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, dword [ebp - 0x10]
mov dword [esi + 8], eax
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
add dword [ebp + 0x10], 4
mov dword [ecx + eax*4], edx
inc dword [esi + 0x14]
inc dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebx + 0x18]
jb 0x401f34
cmp word [ebx + 8], 1
jne 0x4020b0
push 0x11
push 8
push dword [0x4076f0]
call edi
push 5
push 8
push dword [0x4076f0]
mov dword [ebp + 0x10], eax
call edi
cmp dword [ebp + 0x10], 0
mov dword [ebp + 0xc], eax
je 0x4020b7
test eax, eax
je 0x4020b7
mov eax, dword [esi]
lea edi, [ebx + 0x18]
test eax, eax
jne 0x402002
mov eax, dword [esi + 0xc]
lea eax, [eax*4 + 5]
push eax
push 8
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x40201c
mov ecx, dword [esi + 0xc]
lea ecx, [ecx*4 + 5]
push ecx
push eax
push 8
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [esi], eax
movzx eax, byte [edi + 3]
push eax
movzx eax, byte [edi + 2]
push eax
movzx eax, byte [edi + 1]
push eax
movzx eax, byte [edi]
push eax
push str._d._d._d._d
push dword [ebp + 0x10]
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi]
mov edx, dword [ebp + 0x10]
add esp, 0x18
mov dword [ecx + eax*4], edx
mov eax, dword [esi + 4]
inc dword [esi + 0xc]
test eax, eax
jne 0x402072
mov eax, dword [esi + 0x10]
lea eax, [eax*4 + 5]
push eax
push 8
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x40208c
mov ecx, dword [esi + 0x10]
lea ecx, [ecx*4 + 5]
push ecx
push eax
push 8
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
push 4
push edi
mov edi, dword [ebp + 0xc]
mov dword [esi + 4], eax
push edi
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 4]
add esp, 0xc
mov dword [ecx + eax*4], edi
inc dword [esi + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, dword [ebx]
jmp 0x401f03
xor eax, eax
jmp 0x4020f2
push 1
push dword [ebp - 8]
call sub.DNSAPI.dll_DnsRecordListFree
mov dword [ebp - 0xc], esi
xor ebx, ebx
jmp 0x4020da
push esi
push ebx
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 4], ebx
je 0x4020ef
push dword [ebp - 4]
push ebx
push dword [0x4076f0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret