Function at 0x140014568
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rbx
mov dword [rax + 0x20], r9d
mov dword [rax + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x3e8]
sub rsp, 0x4b0
xor edi, edi
mov esi, r8d
mov rbx, rcx
test rcx, rcx
je 0x140014954
lea eax, [rdi + 2]
lea r12d, [rdi + 0x17]
bt r8d, 0x1c
jae 0x1400145b7
mov r13d, r12d
btr esi, 0x1c
jmp 0x1400145ba
mov r13d, eax
mov eax, 1
test esi, esi
mov ecx, r13d
cmove esi, eax
xor r8d, r8d
mov edx, esi
call qword [sym.imp.WSOCK32.DLL_socket]
mov r15, rax
cmp eax, 0xffffffff
je 0x140014954
cmp r13d, r12d
jne 0x14001463f
cmp dword [0x1402d0f00], edi
je 0x14001494b
lea r8, [rbp - 0x80]
mov rdx, rbx
mov ecx, r12d
call fcn.140014248
test eax, eax
jg 0x140014636
lea r9, [rsp + 0x58]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [0x1402d0f08]
test rax, rax
jne 0x14001494b
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx + 0x20]
movups xmm0, xmmword [rax + 8]
movdqu xmmword [rbp - 0x80], xmm0
call qword [0x1402d0f10]
mov r12d, dword [rbp + 0x3f0]
jmp 0x14001467c
mov rcx, rbx
call qword [sym.imp.WSOCK32.DLL_inet_addr]
or r14d, 0xffffffff
mov r12d, eax
cmp eax, r14d
jne 0x14001466c
mov rcx, rbx
call qword [sym.imp.WSOCK32.DLL_gethostbyname]
test rax, rax
je 0x14001466c
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov r12d, dword [rcx]
xor eax, eax
cmp r12d, r14d
setne al
test eax, eax
je 0x14001494b
mov r14d, dword [rbp + 0x418]
mov rbx, qword [rbp + 0x410]
test r14d, r14d
jne 0x140014699
test rbx, rbx
je 0x140014713
cmp byte [rbx], dil
je 0x140014713
xor edx, edx
lea rcx, [rsp + 0x40]
lea r8d, [rdx + 0x10]
call sub.msvcrt.dll_memset
mov eax, 2
mov word [rsp + 0x40], ax
test r14d, r14d
je 0x1400146c7
movzx ecx, r14w
call qword [sym.imp.WSOCK32.DLL_htons]
mov word [rsp + 0x42], ax
test rbx, rbx
je 0x1400146f3
cmp byte [rbx], dil
je 0x1400146f3
mov rcx, rbx
call fcn.140018f50
mov rcx, rax
mov rbx, rax
call qword [sym.imp.WSOCK32.DLL_inet_addr]
mov rcx, rbx
mov dword [rsp + 0x44], eax
call fcn.140018fa0
jmp 0x1400146f7
and dword [rsp + 0x44], edi
lea rdx, [rsp + 0x40]
movsxd rcx, r15d
mov r8d, 0x10
call qword [sym.imp.WSOCK32.DLL_bind]
test eax, eax
jne 0x14001494b
mov eax, 1
cmp esi, eax
jne 0x1400148ef
lea r14d, [rax + 0x16]
xor edx, edx
cmp r13d, r14d
jne 0x14001475c
lea r8d, [rax + 0x1b]
lea rcx, [rsp + 0x60]
call sub.msvcrt.dll_memset
mov ecx, dword [rbp + 0x3f8]
mov word [rsp + 0x60], r14w
call qword [sym.imp.WSOCK32.DLL_htons]
mov word [rsp + 0x62], ax
movups xmm0, xmmword [rbp - 0x80]
movdqu xmmword [rsp + 0x68], xmm0
jmp 0x14001478c
lea rcx, [rsp + 0x30]
mov r8d, 0x10
call sub.msvcrt.dll_memset
mov ecx, dword [rbp + 0x3f8]
mov eax, 2
mov word [rsp + 0x30], ax
call qword [sym.imp.WSOCK32.DLL_htons]
mov dword [rsp + 0x34], r12d
mov word [rsp + 0x32], ax
mov esi, dword [rbp + 0x408]
movsxd rbx, r15d
mov rcx, rbx
test esi, esi
jle 0x140014888
lea r8, [rbp + 0x3f0]
mov r12d, 1
mov edx, 0x8004667e
mov dword [rbp + 0x3f0], r12d
call qword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x14001494b
mov rcx, rbx
cmp r13d, r14d
jne 0x1400147db
lea r8d, [r12 + 0x1b]
lea rdx, [rsp + 0x60]
jmp 0x1400147e6
mov r8d, 0x10
lea rdx, [rsp + 0x30]
call qword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
jne 0x14001494b
mov eax, 0x10624dd3
lea ecx, [r15 + 1]
lea r9, [rbp + 0x1a0]
lea r8, [rbp - 0x70]
mov qword [rbp - 0x68], rbx
mov dword [rbp - 0x70], r12d
imul esi
sar edx, 6
mov qword [rbp + 0x1a8], rbx
mov dword [rbp + 0x1a0], r12d
mov eax, edx
shr eax, 0x1f
add edx, eax
lea rax, [rsp + 0x50]
mov dword [rsp + 0x50], edx
mov qword [rsp + 0x20], rax
imul edx, edx, 0x3e8
sub esi, edx
xor edx, edx
imul esi, esi, 0x3e8
mov dword [rsp + 0x54], esi
call qword [sym.imp.WSOCK32.DLL_select]
cmp eax, r12d
jne 0x14001486a
lea rdx, [rbp - 0x70]
mov rcx, rbx
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
cmovne rdi, r12
and dword [rbp + 0x3f0], 0
lea r8, [rbp + 0x3f0]
mov edx, 0x8004667e
mov rcx, rbx
call qword [sym.imp.WSOCK32.DLL_ioctlsocket]
jmp 0x1400148bd
cmp r13d, r14d
jne 0x14001489a
mov r8d, 0x1c
lea rdx, [rsp + 0x60]
jmp 0x1400148a5
mov r8d, 0x10
lea rdx, [rsp + 0x30]
call qword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
je 0x14001494b
mov r12d, 1
mov edi, r12d
test rdi, rdi
je 0x14001494b
mov rcx, qword [0x1402d0d88]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x14001494b
and qword [rax + 0x10], 0
mov dword [rax], r12d
mov qword [rax + 8], rbx
jmp 0x140014954
movsxd rbx, r15d
lea r8, [rbp + 0x3f0]
mov edx, 0x8004667e
mov rcx, rbx
mov dword [rbp + 0x3f0], eax
call qword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x14001494b
mov rcx, qword [0x1402d0d88]
lea r8d, [rax + 0x38]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x14001494b
and qword [rdi + 0x10], 0
mov eax, 2
mov qword [rdi + 0x18], rbx
mov dword [rdi], eax
mov eax, dword [rbp + 0x3f8]
mov dword [rdi + 4], r12d
mov dword [rdi + 8], eax
jmp 0x140014954
movsxd rcx, r15d
call qword [sym.imp.WSOCK32.DLL_closesocket]
mov rax, rdi
mov rbx, qword [rsp + 0x500]
add rsp, 0x4b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret