Function at 0x402a32
Capabilities:
Resolve dns

Disassembly:
push 0x54
mov eax, 0x43e3c1
call fcn.0042b376
xor esi, esi
cmp dword [ebx + 0x4c], esi
jne 0x402a4f
mov eax, 0x80004005
jmp 0x402c99
push esi
call fcn.0042a13f
pop ecx
mov ecx, dword [ebx + 0x44]
cmp ecx, edx
jl 0x402a6d
jg 0x402a66
mov ecx, dword [ebx + 0x40]
cmp ecx, eax
jbe 0x402a6d
xor eax, eax
jmp 0x402c99
push esi
call fcn.0042a13f
add eax, 0xe10
mov dword [ebx + 0x40], eax
mov eax, dword [ebx + 0x10]
adc edx, esi
sub eax, dword [ebx + 0xc]
pop ecx
mov dword [ebx + 0x44], edx
push 0x38
cdq
pop ecx
idiv ecx
test eax, eax
jbe 0x402ab2
push esi
mov eax, ebx
call fcn.00402fef
add eax, 0x1c
call fcn.00402ec4
mov eax, dword [ebx + 0x10]
sub eax, dword [ebx + 0xc]
push 0x38
cdq
pop ecx
idiv ecx
inc esi
cmp esi, eax
jb 0x402a91
lea esi, [ebx + 0x38]
xor eax, eax
mov edi, esi
stosd dword es:[edi], eax
cmp dword [ebx + 0x34], 0x10
jb 0x402ac5
mov eax, dword [ebx + 0x20]
jmp 0x402ac8
lea eax, [ebx + 0x20]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x402a45
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esi], eax
mov dword [ebp - 0x3c], eax
mov eax, dword [ebx + 0x10]
sub eax, dword [ebx + 0xc]
push 0x38
cdq
pop ecx
idiv ecx
and dword [ebp - 0x20], 0
and dword [ebp - 0x18], 0
xor edi, edi
inc edi
mov dword [ebp - 0x40], edi
test eax, eax
jbe 0x402c84
and dword [ebp - 0x1c], 0
lea eax, [ebp - 0x38]
push eax
call fcn.00417a22
and dword [ebp - 4], 0
call fcn.00428e21
cdq
push 0x14
pop ecx
idiv ecx
mov esi, edx
inc esi
call fcn.00428e21
cdq
idiv esi
cmp edx, esi
jle 0x402b33
mov edx, edi
jmp 0x402b38
mov eax, esi
cdq
idiv esi
mov eax, edx
dec eax
jne 0x402b47
call fcn.00401fa1
call fcn.00402027
push dword [ebp - 0x18]
mov eax, ebx
call fcn.00402fef
cmp dword [eax + 0x18], 0x10
jb 0x402b5c
mov eax, dword [eax + 4]
jmp 0x402b5f
add eax, 4
push 0
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x40]
push ecx
push 0
push 0xf
push eax
call sub.DNSAPI.dll_DnsQuery_A
test eax, eax
jne 0x402c4d
mov esi, dword [ebp - 0x1c]
jmp 0x402be2
cmp word [esi + 8], 0xf
jne 0x402be0
push dword [ebp - 0x18]
mov eax, ebx
call fcn.00402fef
cmp dword [eax + 0x18], 0x10
jb 0x402b9c
mov eax, dword [eax + 4]
jmp 0x402b9f
add eax, 4
push dword [esi + 4]
push eax
call fcn.00428726
pop ecx
pop ecx
test eax, eax
jne 0x402be0
movzx ecx, word [esi + 0x1c]
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x60], ecx
push eax
lea ecx, [ebp - 0x5c]
call fcn.00402e72
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.00403168
push 0
push edi
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 0
call fcn.0040329c
mov esi, dword [esi]
test esi, esi
jne 0x402b80
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x2c]
sar eax, 5
test eax, eax
jbe 0x402c4d
push esi
lea eax, [ebp - 0x38]
call fcn.004030f8
cmp dword [eax], 0xd
jne 0x402c13
push esi
lea eax, [ebp - 0x38]
call fcn.004030f8
add eax, 4
cmp dword [eax + 0x14], 0
jne 0x402c23
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x2c]
inc esi
sar eax, 5
cmp esi, eax
jb 0x402bf3
jmp 0x402c4d
push esi
lea eax, [ebp - 0x38]
call fcn.004030f8
push dword [ebp - 0x18]
mov esi, eax
mov eax, ebx
add esi, 4
call fcn.00402fef
push 0xffffffffffffffff
add eax, 0x1c
push 0
push esi
mov ecx, eax
call fcn.004031c2
mov dword [ebp - 0x20], edi
cmp dword [ebp - 0x1c], 0
je 0x402c60
push edi
push dword [ebp - 0x1c]
call sub.DNSAPI.dll_DnsFree
and dword [ebp - 0x1c], 0
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x38]
call fcn.004030cb
mov eax, dword [ebx + 0x10]
sub eax, dword [ebx + 0xc]
push 0x38
cdq
pop ecx
idiv ecx
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], eax
jb 0x402b04
and dword [ebx + 0x48], 0
mov eax, dword [ebp - 0x20]
neg eax
sbb eax, eax
and eax, 0x7fffbffb
add eax, 0x80004005
call fcn.0042b3f9
ret