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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x408]
sub rsp, 0x508
mov rax, qword [0x14020b948]
xor rax, rsp
mov qword [rbp + 0x3f0], rax
mov r13, qword [rbp + 0x470]
mov r15d, r9d
xor r9d, r9d
mov dword [rsp + 0x34], edx
mov rdi, rcx
mov ebx, r9d
test rcx, rcx
je 0x140063109
mov edx, r8d
mov esi, r8d
btr edx, 0x1c
and esi, 0x10000000
mov eax, esi
cmove edx, r8d
neg eax
lea eax, [r9 + 1]
sbb ecx, ecx
and ecx, 0x15
add ecx, 2
test edx, edx
cmove edx, eax
xor r8d, r8d
mov dword [rsp + 0x40], edx
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsp + 0x38], rax
mov r14, rax
cmp eax, 0xffffffff
je 0x140063109
mov rcx, rdi
call fcn.140127000
xor edi, edi
mov r12, rax
lea eax, [rbx + 0x17]
test esi, esi
je 0x14006304a
cmp dword [0x140212034], edi
je 0x1400630f3
lea r8, [rbp - 0x78]
mov rdx, r12
mov ecx, eax
call fcn.140063944
test eax, eax
jg 0x14006303c
lea r9, [rsp + 0x50]
xor r8d, r8d
xor edx, edx
mov rcx, r12
call qword [0x140212010]
test rax, rax
jne 0x1400630f3
mov rcx, qword [rsp + 0x50]
lea r14d, [rbx + 1]
mov rax, qword [rcx + 0x20]
movups xmm0, xmmword [rax + 8]
movdqu xmmword [rbp - 0x78], xmm0
call qword [0x140212018]
jmp 0x140063042
mov r14d, 1
mov edi, dword [rsp + 0x34]
xor eax, eax
jmp 0x14006307d
mov rcx, r12
call qword [sym.imp.WS2_32.dll_inet_addr]
mov edi, eax
cmp eax, 0xffffffff
jne 0x140063071
mov rcx, r12
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x140063071
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov edi, dword [rcx]
xor eax, eax
cmp edi, 0xffffffff
mov r14d, eax
setne r14b
test r14d, r14d
je 0x1400630ee
mov r14d, dword [rbp + 0x478]
test r14d, r14d
jne 0x1400630a2
test r13, r13
je 0x14006312f
cmp word [r13], ax
je 0x14006312f
xor edx, edx
lea rcx, [rbp - 0x58]
lea r8d, [rdx + 0x1c]
call fcn.14002cdf0
xor edx, edx
lea rcx, [rbp - 0x68]
lea r8d, [rdx + 0x10]
call fcn.14002cdf0
movsxd rdx, dword [rsp + 0x38]
lea r9, [rbp - 0x58]
xor r8d, r8d
mov dword [rsp + 0x28], r14d
mov ecx, r8d
mov qword [rsp + 0x20], r13
test esi, esi
lea r8, [rbp - 0x68]
setne cl
call fcn.140063a04
xor r13d, r13d
test eax, eax
jne 0x140063132
mov r14, qword [rsp + 0x38]
mov rcx, r12
call fcn.140126ff0
test rbx, rbx
jne 0x140063109
movsxd rcx, r14d
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, rbx
mov rcx, qword [rbp + 0x3f0]
xor rcx, rsp
call fcn.1401276a0
add rsp, 0x508
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
xor r13d, r13d
xor edx, edx
test esi, esi
je 0x14006316c
lea r8d, [rdx + 0x1c]
lea rcx, [rsp + 0x68]
call fcn.14002cdf0
movzx ecx, word [rsp + 0x34]
mov eax, reloc.WS2_32.dll_socket
mov word [rsp + 0x68], ax
call qword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [rbp - 0x78]
mov word [rsp + 0x6a], ax
movdqu xmmword [rsp + 0x70], xmm0
jmp 0x14006319a
mov r8d, reloc.OLEAUT32.dll_SafeArrayGetDim
lea rcx, [rsp + 0x58]
call fcn.14002cdf0
movzx ecx, word [rsp + 0x34]
mov eax, 2
mov word [rsp + 0x58], ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x5a], ax
mov dword [rsp + 0x5c], edi
mov r14, qword [rsp + 0x38]
mov eax, 1
movsxd rdi, r14d
mov rcx, rdi
cmp dword [rsp + 0x40], eax
jne 0x1400632f7
test r15d, r15d
jle 0x140063299
lea r8, [rsp + 0x30]
mov dword [rsp + 0x30], eax
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x1400630f3
mov rcx, rdi
test esi, esi
je 0x1400631eb
lea r8d, [rax + 0x1c]
lea rdx, [rsp + 0x68]
jmp 0x1400631f6
mov r8d, reloc.OLEAUT32.dll_SafeArrayGetDim
lea rdx, [rsp + 0x58]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1400630f3
lea esi, [rax + 2]
mov qword [rbp - 0x28], rdi
mov eax, 0x10624dd3
mov dword [rbp - 0x30], esi
mul r15d
lea ecx, [r14 + 1]
mov qword [rbp + 0x1e8], rdi
shr edx, 6
lea r9, [rbp + 0x1e0]
imul eax, edx, 0x3e8
lea r8, [rbp - 0x30]
mov dword [rsp + 0x48], edx
xor edx, edx
mov dword [rbp + 0x1e0], esi
sub r15d, eax
imul eax, r15d, 0x3e8
mov dword [rsp + 0x4c], eax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
cmp eax, esi
jne 0x140063276
lea rdx, [rbp - 0x30]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
cmovne rbx, rsi
lea r8, [rsp + 0x30]
mov dword [rsp + 0x30], r13d
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test rbx, rbx
je 0x1400630f3
jmp 0x1400632c9
test esi, esi
je 0x1400632aa
mov r8d, 0x1c
lea rdx, [rsp + 0x68]
jmp 0x1400632b5
mov r8d, reloc.OLEAUT32.dll_SafeArrayGetDim
lea rdx, [rsp + 0x58]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1400630f3
mov esi, 1
mov rcx, qword [0x140210620]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x1400630f3
mov dword [rax], esi
mov qword [rax + 8], rdi
mov qword [rax + 0x10], r13
jmp 0x1400630f3
lea r8, [rsp + 0x30]
mov dword [rsp + 0x30], eax
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x1400630f3
mov rcx, qword [0x140210620]
lea r8d, [rax + 0x50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x1400630f3
mov eax, 2
mov dword [rbx], eax
test esi, esi
je 0x140063359
movups xmm0, xmmword [rsp + 0x68]
movups xmmword [rbx + 4], xmm0
movsd xmm1, qword [rsp + 0x78]
movsd qword [rbx + 0x14], xmm1
mov eax, dword [rbp - 0x80]
mov dword [rbx + 0x1c], eax
jmp 0x140063363
movups xmm0, xmmword [rsp + 0x58]
movdqu xmmword [rbx + 4], xmm0
test esi, esi
mov qword [rbx + 0x30], rdi
mov qword [rbx + 0x28], r13
setne al
mov byte [rbx + 0x20], al
jmp 0x1400630f3