Function at 0x14002ecf0
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 - 0x3f8]
sub rsp, 0x4c0
xor r13d, r13d
mov esi, r8d
mov rbx, rcx
mov edi, r13d
test rcx, rcx
je 0x14002f117
lea eax, [r13 + 2]
lea r14d, [r13 + 0x17]
bt r8d, 0x1c
jae 0x14002ed44
mov r15d, r14d
btr esi, 0x1c
jmp 0x14002ed47
mov r15d, eax
mov eax, 1
test esi, esi
mov ecx, r15d
cmove esi, eax
xor r8d, r8d
mov edx, esi
call qword [sym.imp.WSOCK32.DLL_socket]
mov r12, rax
cmp eax, 0xffffffff
je 0x14002f117
mov rcx, rbx
call fcn.1400c8af0
mov rbx, rax
mov qword [rsp + 0x58], rax
cmp r15d, r14d
jne 0x14002eddd
cmp dword [0x14014736c], r13d
je 0x14002f0ff
lea r8, [rbp - 0x78]
mov rdx, rax
mov ecx, r14d
call fcn.14002ebdc
test eax, eax
jg 0x14002edd4
lea r9, [rsp + 0x60]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [0x140147378]
test rax, rax
jne 0x14002f0ff
mov rcx, qword [rsp + 0x60]
mov rax, qword [rcx + 0x20]
movups xmm0, xmmword [rax + 8]
movdqu xmmword [rbp - 0x78], xmm0
call qword [0x140147380]
mov r14d, dword [rbp + 0x400]
jmp 0x14002ee1b
mov rcx, rax
call qword [sym.imp.WSOCK32.DLL_inet_addr]
or ebx, 0xffffffff
mov r14d, eax
cmp eax, ebx
jne 0x14002ee0a
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WSOCK32.DLL_gethostbyname]
test rax, rax
je 0x14002ee0a
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov r14d, dword [rcx]
cmp r14d, ebx
mov eax, r13d
setne al
test eax, eax
je 0x14002f0ff
mov r13d, dword [rbp + 0x428]
mov rbx, qword [rbp + 0x420]
xor eax, eax
test r13d, r13d
jne 0x14002ee42
test rbx, rbx
je 0x14002eec3
cmp word [rbx], ax
je 0x14002eec3
xor edx, edx
lea rcx, [rsp + 0x48]
lea r8d, [rdx + 0x10]
call sub.msvcrt.dll_memset
mov eax, 2
mov word [rsp + 0x48], ax
test r13d, r13d
je 0x14002ee70
movzx ecx, r13w
call qword [sym.imp.WSOCK32.DLL_htons]
mov word [rsp + 0x4a], ax
xor r13d, r13d
test rbx, rbx
je 0x14002eea0
cmp word [rbx], r13w
je 0x14002eea0
mov rcx, rbx
call fcn.1400c8a00
mov rcx, rax
mov rbx, rax
call qword [sym.imp.WSOCK32.DLL_inet_addr]
mov rcx, rbx
mov dword [rsp + 0x4c], eax
call fcn.1400c89f0
jmp 0x14002eea5
mov dword [rsp + 0x4c], r13d
lea rdx, [rsp + 0x48]
movsxd rcx, r12d
mov r8d, 0x10
call qword [sym.imp.WSOCK32.DLL_bind]
test eax, eax
jne 0x14002f0ff
jmp 0x14002eec6
xor r13d, r13d
mov eax, 1
cmp esi, eax
jne 0x14002f0a6
lea ebx, [rax + 0x16]
xor edx, edx
cmp r15d, ebx
jne 0x14002ef0d
lea r8d, [rax + 0x1b]
lea rcx, [rsp + 0x68]
call sub.msvcrt.dll_memset
mov ecx, dword [rbp + 0x408]
mov word [rsp + 0x68], bx
call qword [sym.imp.WSOCK32.DLL_htons]
mov word [rsp + 0x6a], ax
movups xmm0, xmmword [rbp - 0x78]
movdqu xmmword [rsp + 0x70], xmm0
jmp 0x14002ef3d
lea rcx, [rsp + 0x30]
mov r8d, 0x10
call sub.msvcrt.dll_memset
mov ecx, dword [rbp + 0x408]
mov eax, 2
mov word [rsp + 0x30], ax
call qword [sym.imp.WSOCK32.DLL_htons]
mov dword [rsp + 0x34], r14d
mov word [rsp + 0x32], ax
mov esi, dword [rbp + 0x418]
test esi, esi
jle 0x14002f03a
movsxd rbx, r12d
lea r8, [rbp + 0x400]
mov r14d, 1
mov rcx, rbx
mov edx, 0x8004667e
mov dword [rbp + 0x400], r14d
call qword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x14002f0ff
mov rcx, rbx
cmp r15d, 0x17
jne 0x14002ef8c
lea r8d, [r14 + 0x1b]
lea rdx, [rsp + 0x68]
jmp 0x14002ef97
mov r8d, 0x10
lea rdx, [rsp + 0x30]
call qword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
jne 0x14002f0ff
mov eax, 0x10624dd3
lea ecx, [r12 + 1]
lea r9, [rbp + 0x1b0]
lea r8, [rbp - 0x60]
mov qword [rbp - 0x58], rbx
mov dword [rbp - 0x60], r14d
imul esi
sar edx, 6
mov qword [rbp + 0x1b8], rbx
mov dword [rbp + 0x1b0], r14d
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x40], edx
imul eax, edx, 0x3e8
sub esi, eax
xor edx, edx
imul eax, esi, 0x3e8
mov dword [rsp + 0x44], eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WSOCK32.DLL_select]
cmp eax, r14d
jne 0x14002f01c
lea rdx, [rbp - 0x60]
mov rcx, rbx
call sub.WSOCK32.DLL___WSAFDIsSet
test eax, eax
cmovne rdi, r14
lea r8, [rbp + 0x400]
mov edx, 0x8004667e
mov rcx, rbx
mov dword [rbp + 0x400], r13d
call qword [sym.imp.WSOCK32.DLL_ioctlsocket]
jmp 0x14002f075
cmp r15d, ebx
movsxd rbx, r12d
mov rcx, rbx
jne 0x14002f052
mov r8d, 0x1c
lea rdx, [rsp + 0x68]
jmp 0x14002f05d
mov r8d, 0x10
lea rdx, [rsp + 0x30]
call qword [sym.imp.WSOCK32.DLL_connect]
cmp eax, 0xffffffff
je 0x14002f0ff
mov r14d, 1
mov edi, r14d
test rdi, rdi
je 0x14002f0ff
mov rcx, qword [0x140145eac]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x14002f0ff
mov dword [rax], r14d
mov qword [rax + 8], rbx
mov qword [rax + 0x10], r13
jmp 0x14002f0ff
movsxd rbx, r12d
lea r8, [rbp + 0x400]
mov edx, 0x8004667e
mov rcx, rbx
mov dword [rbp + 0x400], eax
call qword [sym.imp.WSOCK32.DLL_ioctlsocket]
test eax, eax
jne 0x14002f0ff
mov rcx, qword [0x140145eac]
lea r8d, [rax + 0x38]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x14002f0ff
mov eax, 2
mov qword [rdi + 0x18], rbx
mov dword [rdi + 4], r14d
mov dword [rdi], eax
mov eax, dword [rbp + 0x408]
mov qword [rdi + 0x10], r13
mov dword [rdi + 8], eax
mov rcx, qword [rsp + 0x58]
call fcn.1400c8ae0
test rdi, rdi
jne 0x14002f117
movsxd rcx, r12d
call qword [sym.imp.WSOCK32.DLL_closesocket]
mov rax, rdi
mov rbx, qword [rsp + 0x510]
add rsp, 0x4c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret