Function at 0x40a163
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
call fcn.0041a4bd
xor ecx, ecx
cmp ax, 0x17
sete cl
xor edi, edi
push edi
lea eax, [ebp - 0x1c]
push eax
push 7
pop eax
mov dword [ebp - 0x14], ecx
mov ecx, ebx
call fcn.00419eb8
test al, al
jne 0x40a1a6
xor al, al
jmp 0x40a344
cmp byte [ebp - 5], 0
je 0x40a1bb
push edi
lea eax, [ebp - 5]
push eax
xor eax, eax
inc eax
mov ecx, ebx
call fcn.00419eb8
test al, al
jne 0x40a1a0
jmp 0x40a199
mov ecx, dword [ebp - 0x19]
mov eax, ecx
and eax, 0xff0000
mov edx, ecx
shr edx, 0x10
or eax, edx
mov edx, ecx
and edx, 0xff00
shl ecx, 0x10
or edx, ecx
shr eax, 8
shl edx, 8
or eax, edx
dec eax
mov byte [ebp - 9], 0x5a
cmp eax, 0xfe
ja 0x40a275
xor esi, esi
push edi
lea eax, [ebp - 5]
push eax
xor eax, eax
inc eax
mov ecx, ebx
call fcn.00419eb8
test al, al
je 0x40a199
mov al, byte [ebp - 5]
mov byte [ebp + esi - 0x134], al
test al, al
je 0x40a222
inc esi
cmp esi, 0xff
jle 0x40a1f3
jmp 0x40a199
lea eax, [ebp - 0x10]
push eax
push edi
push edi
lea eax, [ebp - 0x134]
push eax
mov dword [ebp - 0x10], edi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x40a242
mov byte [ebp - 9], 0x5b
jmp 0x40a275
mov esi, dword [ebp - 0x10]
jmp 0x40a250
cmp dword [esi + 4], 2
je 0x40a256
mov esi, dword [esi + 0x1c]
cmp esi, edi
jne 0x40a247
jmp 0x40a268
mov eax, dword [esi + 0x18]
push 4
add eax, 4
push eax
lea eax, [ebp - 0x19]
push eax
call fcn.00416f41
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp esi, edi
je 0x40a23c
cmp byte [ebp - 9], 0x5a
mov byte [ebp - 5], 1
jne 0x40a3ab
push 0x10
push edi
lea eax, [ebp - 0x30]
push eax
call fcn.00416fb8
push 2
pop eax
mov word [ebp - 0x30], ax
movzx eax, byte [ebp - 0x1c]
dec eax
je 0x40a34b
dec eax
je 0x40a2ad
mov byte [ebp - 9], 0x5b
jmp 0x40a3ab
push 1
lea esi, [ebp - 0x30]
call fcn.0041a047
mov esi, eax
mov dword [ebp - 0x10], esi
cmp esi, 0xffffffff
je 0x40a2a4
push dword [ebp - 0x14]
push 0x5a
push esi
push ebx
call fcn.0040a0ed
mov edi, eax
cmp edi, 1
jne 0x40a32a
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0041a278
mov esi, dword [ebp - 0x10]
mov edi, eax
mov dword [ebp - 0x20], edi
call fcn.0041a2a8
cmp edi, 0xffffffff
jne 0x40a2ff
mov ebx, dword [ebp + 8]
mov byte [ebp - 9], 0x5b
jmp 0x40a3ab
push edi
call fcn.0041a300
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp + 8]
or eax, 2
push eax
push 0x5a
push edi
push ebx
call fcn.0040a0ed
mov edi, eax
cmp edi, 1
jne 0x40a327
push dword [ebp - 0x20]
call fcn.0041a101
mov esi, dword [ebp - 0x20]
call fcn.0041a2a8
cmp edi, 0xffffffff
je 0x40a2a4
cmp edi, 1
je 0x40a341
mov byte [ebp - 5], 0
mov al, byte [ebp - 5]
pop edi
pop esi
pop ebx
leave
ret 4
mov ax, word [ebp - 0x1b]
mov word [ebp - 0x2e], ax
mov eax, dword [ebp - 0x19]
lea edi, [ebp - 0x30]
mov dword [ebp - 0x2c], eax
call fcn.00419f4d
mov esi, eax
cmp esi, 0xffffffff
je 0x40a2a4
push esi
call fcn.0041a300
push dword [ebp - 0x14]
push 0x5a
push esi
push ebx
call fcn.0040a0ed
cmp eax, 1
jne 0x40a38b
push esi
call fcn.0041a101
jmp 0x40a39a
cmp eax, 0xffffffff
jne 0x40a396
mov byte [ebp - 9], 0x5b
jmp 0x40a39a
mov byte [ebp - 5], 0
call fcn.0041a2a8
cmp byte [ebp - 5], 1
jne 0x40a341
cmp byte [ebp - 9], 0x5a
je 0x40a341
push dword [ebp - 0x14]
push dword [ebp - 9]
push 0xffffffffffffffff
push ebx
call fcn.0040a0ed
test eax, eax
setne al
jmp 0x40a344