Function at 0x180001660
Capabilities:
Convert ip address from string
Resolve dns

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x180027008]
xor rax, rsp
mov qword [rsp + 0x60], rax
xor ebp, ebp
mov qword [rsp + 0x20], rdx
mov r15, r8
mov r12, rdx
mov r8d, ebp
mov edx, ebp
mov r10d, ebp
test r15, r15
je 0x1800018c3
test ecx, ecx
mov r13d, 4
mov esi, r13d
mov r11d, ebp
cmovne esi, ecx
movzx ecx, byte [r12]
test cl, cl
je 0x180001714
mov r9, r12
movabs rbx, 0x3f0000003f
cmp cl, 0x2e
jne 0x1800016d8
inc r8d
cmp r8d, 3
jg 0x180001714
jmp 0x180001705
cmp cl, 0x3a
jne 0x1800016e6
inc edx
cmp edx, 7
jg 0x180001714
jmp 0x180001705
cmp cl, 0x25
je 0x180001702
lea eax, [rcx - 0x41]
cmp al, 0x25
ja 0x1800016f8
bt rbx, rax
jb 0x180001702
sub cl, 0x30
cmp cl, 9
ja 0x180001714
jmp 0x180001705
inc r10d
movzx ecx, byte [r9 + 1]
inc r9
inc r11d
test cl, cl
jne 0x1800016c8
movsxd rax, r11d
cmp byte [rax + r12], bpl
jne 0x1800017a4
cmp r8d, 3
jne 0x18000176d
test edx, edx
jne 0x18000176d
test r10d, r10d
jne 0x1800017a4
cmp esi, 6
mov edi, 2
mov ebx, reloc.WS2_32.dll_socket
mov r8d, 8
cmove di, bx
cmovne r8, r13
movzx ecx, di
add r8, r15
mov rdx, r12
mov word [r15], cx
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
je 0x180001766
movzx ebp, word [r15]
mov eax, ebp
jmp 0x1800018c5
cmp edx, 2
jl 0x1800017a4
mov ebx, reloc.WS2_32.dll_socket
lea r8, [r15 + 8]
mov ecx, ebx
mov word [r15], bx
mov rdx, r12
call qword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
je 0x18000179b
cmp esi, r13d
cmove ebx, ebp
mov eax, ebx
jmp 0x1800018c5
mov ebx, ebp
mov eax, ebx
jmp 0x1800018c5
mov r14, qword [0x180029100]
mov ebx, reloc.WS2_32.dll_socket
lea edi, [rbx - 0x15]
test r14, r14
je 0x180001834
cmp esi, 6
je 0x1800017c4
mov ebp, edi
cmp esi, 0x40
jne 0x1800017c6
mov ebp, ebx
mov rdx, qword [rsp + 0x20]
lea r12, [r15 + 4]
mov eax, 4
mov word [r15], bp
cmp bp, bx
lea r13, [r15 + 8]
mov r8d, 8
mov ecx, ebp
cmovne r8d, eax
add r8, r15
call r14
test eax, eax
jne 0x180001766
lea eax, [rsi - 4]
test eax, 0xfffffffd
je 0x1800018c3
mov rdx, qword [rsp + 0x20]
cmp esi, 0x2e
cmove edi, ebx
cmp di, bx
mov word [r15], di
mov ecx, edi
cmove r12, r13
mov r8, r12
call r14
test eax, eax
je 0x1800018c3
mov eax, edi
jmp 0x1800018c5
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
movups xmmword [rsp + 0x40], xmm0
movups xmmword [rsp + 0x50], xmm0
cmp esi, 6
je 0x180001854
mov dword [rsp + 0x34], edi
cmp esi, 0x40
jne 0x180001858
mov dword [rsp + 0x34], ebx
lea r9, [rsp + 0x28]
xor edx, edx
lea r8, [rsp + 0x30]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x18000189e
cmp esi, 0x40
je 0x18000187e
cmp esi, 0x2e
jne 0x1800018c3
cmp esi, 0x40
cmove ebx, edi
lea r9, [rsp + 0x28]
xor edx, edx
mov dword [rsp + 0x34], ebx
lea r8, [rsp + 0x30]
mov rcx, r12
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x1800018c3
mov rbx, qword [rsp + 0x28]
test rbx, rbx
je 0x1800018c3
mov rax, qword [rbx + 0x20]
movzx ecx, word [rax]
cmp cx, di
je 0x1800018ea
cmp cx, 0x17
je 0x1800018ea
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
xor eax, eax
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.180004d50
mov rbx, qword [rsp + 0xc8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov word [r15], cx
mov edx, 8
mov rax, qword [rbx + 0x20]
movzx r8d, word [rax]
cmp r8w, 0x17
cmovne rdx, r13
add rdx, rax
cmp cx, 0x17
lea rcx, [r15 + 8]
je 0x180001915
lea rcx, [r15 + 4]
cmp r8w, 0x17
mov eax, reloc.WS2_32.dll_recv
cmove r13, rax
mov r8, r13
call fcn.180006a00
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
movzx eax, word [r15]
jmp 0x1800018c5