Function at 0x40fb58
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x134
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x1c], ecx
call fcn.004172de
xor ecx, ecx
cmp al, 2
sete cl
push 0
push 7
lea edx, [esp + 0x30]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x24]
call fcn.0040e1d6
test al, al
je 0x40fbab
xor ebx, ebx
inc ebx
jmp 0x40fb97
cmp byte [esp + 0x17], 0
je 0x40fbb8
mov ecx, dword [esp + 0x1c]
push 0
push ebx
lea edx, [esp + 0x1f]
call fcn.0040e1d6
test al, al
jne 0x40fb90
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x134
ret
mov ecx, dword [esp + 0x2b]
mov al, 0x5a
mov byte [esp + 0x18], al
mov edx, ecx
mov eax, ecx
shr eax, 0x10
and edx, 0xff0000
or edx, eax
mov eax, ecx
and eax, 0xff00
shl ecx, 0x10
or eax, ecx
shl eax, 8
shr edx, 8
or eax, edx
dec eax
push 2
pop ebp
cmp eax, 0xfe
ja 0x40fc83
xor esi, esi
mov ecx, dword [esp + 0x1c]
push 0
push ebx
lea edx, [esp + 0x1f]
call fcn.0040e1d6
test al, al
je 0x40fbab
mov al, byte [esp + 0x17]
mov byte [esp + esi + 0x40], al
test al, al
je 0x40fc21
inc esi
cmp esi, 0xff
jle 0x40fbf6
jmp 0x40fbab
xor ecx, ecx
lea eax, [esp + 0x20]
push eax
push ecx
push ecx
lea eax, [esp + 0x4c]
push eax
mov dword [esp + 0x30], ecx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x40fc45
mov al, 0x5b
mov byte [esp + 0x18], al
jmp 0x40fc87
mov eax, dword [esp + 0x20]
mov esi, eax
test eax, eax
je 0x40fc78
cmp dword [esi + 4], ebp
je 0x40fc5d
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x40fc4f
jmp 0x40fc78
mov eax, dword [esi + 0x18]
add eax, 4
push 4
push eax
lea eax, [esp + 0x33]
push eax
call dword [sym.imp.msvcrt.dll_memcpy]
mov eax, dword [esp + 0x2c]
add esp, 0xc
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x40fc3d
mov al, byte [esp + 0x18]
cmp al, 0x5a
jne 0x40fcb6
push 0x10
lea eax, [esp + 0x34]
push 0
push eax
call dword [sym.imp.msvcrt.dll_memset]
movzx eax, byte [esp + 0x34]
add esp, 0xc
mov word [esp + 0x30], bp
dec eax
je 0x40fd76
dec eax
je 0x40fcd7
mov byte [esp + 0x18], 0x5b
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
push ebp
push dword [esp + 0x1c]
or edx, 0xffffffff
call fcn.0040fad8
test eax, eax
setne bl
mov al, bl
jmp 0x40fbad
lea ecx, [esp + 0x30]
call fcn.0040e372
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
jne 0x40fcf4
mov byte [esp + 0x18], 0x5b
jmp 0x40fcba
mov ecx, dword [esp + 0x1c]
push ebp
push 0x5a
mov edx, eax
call fcn.0040fad8
mov esi, eax
cmp esi, ebx
jne 0x40fd59
push ecx
lea eax, [esp + 0x20]
push eax
sub esp, 0xc
lea ecx, [esp + 0x34]
call fcn.0040e525
mov ecx, dword [esp + 0x20]
mov edi, eax
call fcn.0040e550
cmp edi, 0xffffffff
je 0x40fced
mov ecx, edi
call fcn.004179bf
mov ecx, dword [esp + 0x1c]
mov eax, ebp
or eax, 2
push eax
push 0x5a
mov edx, edi
call fcn.0040fad8
mov esi, eax
cmp esi, ebx
jne 0x40fd55
mov ecx, dword [esp + 0x1c]
mov edx, edi
call fcn.0040e3d0
mov ecx, edi
jmp 0x40fd5d
mov ecx, dword [esp + 0x20]
call fcn.0040e550
cmp esi, 0xffffffff
je 0x40fced
cmp esi, ebx
je 0x40fcd0
xor bl, bl
jmp 0x40fcd0
mov ax, word [esp + 0x29]
mov word [esp + 0x32], ax
mov eax, dword [esp + 0x2b]
lea ecx, [esp + 0x30]
mov dword [esp + 0x34], eax
call fcn.0040e287
mov esi, eax
cmp esi, 0xffffffff
je 0x40fcb1
mov ecx, esi
call fcn.004179bf
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
push ebp
push 0x5a
mov edx, esi
call fcn.0040fad8
cmp eax, ebx
jne 0x40fdc6
mov ecx, dword [esp + 0x1c]
mov edx, esi
call fcn.0040e3d0
jmp 0x40fdd4
cmp eax, 0xffffffff
jne 0x40fdd2
mov byte [esp + 0x18], 0x5b
jmp 0x40fdd4
xor bl, bl
mov ecx, esi
call fcn.0040e550
cmp bl, 1
jne 0x40fcd0
cmp byte [esp + 0x18], 0x5a
jne 0x40fcba
jmp 0x40fcd0