Function at 0x402b30
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x410
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push edi
xor edi, edi
push 0x18
push 8
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], edi
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, edi
jne 0x402b6e
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x410
ret
mov ecx, dword [esp + 0x428]
lea eax, [esp + 0x18]
push eax
push ecx
call fcn.004028d0
mov eax, dword [esp + 0x434]
add esp, 8
cmp eax, edi
jle 0x402bfe
mov eax, dword [esp + 0x430]
neg eax
sbb eax, eax
and eax, 0xfe
inc eax
mov dword [esp + 0x10], eax
jmp 0x402ba9
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push 0
push edx
mov edx, dword [esp + 0x42c]
push ecx
push 8
push eax
push edx
call sub.DNSAPI.dll_DnsQuery_A
mov ebx, eax
test ebx, ebx
je 0x402c0a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x24]
push str._d_error_code
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x42c]
inc edi
cmp edi, eax
jl 0x402ba5
jmp 0x402c02
mov ebx, dword [esp + 0x10]
test ebx, ebx
jne 0x402dcc
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x402dc2
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x424]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x402db4
cmp word [edi + 8], 0x10
jne 0x402cc5
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x18]
test eax, eax
jbe 0x402cc5
lea eax, [edi + 0x1c]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
push edx
call dword [sym.imp.SHLWAPI.dll_StrDupA]
mov ebx, eax
test ebx, ebx
je 0x402b61
mov eax, dword [esi + 8]
test eax, eax
jne 0x402c83
mov eax, dword [esi + 0x14]
lea ecx, [eax*4 + 5]
push ecx
push 8
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x402c9a
mov edx, dword [esi + 0xc]
lea ecx, [edx*4 + 5]
push ecx
push eax
push 8
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, dword [esi + 0x14]
mov dword [esi + 8], eax
mov dword [eax + edx*4], ebx
mov eax, dword [esi + 0x14]
mov edx, dword [esp + 0x14]
inc eax
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [edi + 0x18]
inc eax
add edx, 4
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
jb 0x402c4d
cmp word [edi + 8], 1
jne 0x402db4
push 0x11
push 8
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 5
push 8
mov ebx, eax
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test ebx, ebx
mov dword [esp + 0x10], eax
je 0x402b61
test eax, eax
je 0x402b61
mov ecx, dword [esi + 0xc]
mov eax, dword [esi]
test eax, eax
lea edx, [ecx*4 + 5]
push edx
jne 0x402d1e
push 8
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x402d2a
push eax
push 8
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [esi], eax
xor eax, eax
mov al, byte [edi + 0x1b]
xor ecx, ecx
mov cl, byte [edi + 0x1a]
push eax
xor edx, edx
xor eax, eax
mov dl, byte [edi + 0x19]
mov al, byte [edi + 0x18]
push ecx
push edx
push eax
push str._d._d._d._d
push ebx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi]
add esp, 0x18
mov dword [edx + ecx*4], ebx
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 4]
inc edx
test eax, eax
mov dword [esi + 0xc], edx
jne 0x402d81
mov eax, dword [esi + 0x10]
lea ecx, [eax*4 + 5]
push ecx
push 8
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x402d98
mov edx, dword [esi + 0x10]
lea ecx, [edx*4 + 5]
push ecx
push eax
push 8
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x10]
mov edx, dword [edi + 0x18]
mov dword [eax], edx
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 4]
mov dword [edx + ecx*4], eax
mov eax, dword [esi + 0x10]
inc eax
mov dword [esi + 0x10], eax
mov edi, dword [edi]
test edi, edi
jne 0x402c16
mov edi, dword [esp + 0x1c]
push 1
push edi
call sub.DNSAPI.dll_DnsRecordListFree
jmp 0x402ddc
push esi
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x402df0
push eax
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x410
ret