Function at 0x140049550
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x40
movsxd rbx, ecx
mov edi, r8d
lea rcx, [0x140272f60]
mov rsi, rdx
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140272fe0]
lea rcx, [0x140272f60]
mov rbx, qword [rax + rbx*8]
call fcn.14002ec90
mov eax, dword [rbx + 0x68]
test al, 4
je 0x140049488
lea rcx, [rsp + 0x48]
sub rcx, 8
lea r8, [0x140048470]
lea rdx, [rsp + 0x68]
call fcn.140025060
mov r8, qword [rbx + 0x118]
lea rdx, str..pipezon__s
mov rcx, rax
mov qword [rsp + 0x68], rax
call fcn.1400260b0
mov rcx, qword [rsp + 0x68]
xor edi, edi
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], 0x40000000
xor r8d, r8d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 3
mov rcx, qword [rcx]
call fcn.14003e7f0
test eax, eax
jne 0x140049473
or edi, 0xffffffff
mov eax, edi
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
mov dword [rbx + 0x70], eax
mov eax, edi
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
cmp qword [rbx + 0x40], 0
je 0x1400494fc
cmp dword [rbx + 0xc], 2
jne 0x1400494fc
cmp word [rbx + 0x6c], 0
je 0x1400494fc
cmp edi, 0x10
je 0x1400494d9
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x1400494c0
call fcn.140176664
mov dword [rax], reloc.WS2_32.dll_shutdown
or eax, 0xffffffff
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
movups xmm0, xmmword [rsi]
bts eax, 0x18
mov dword [rbx + 0x68], eax
xor eax, eax
movups xmmword [rbx + 0xb0], xmm0
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
test al, 1
je 0x14004951d
mov r8d, edi
mov rdx, rsi
mov rcx, rbx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
jmp 0x140049550
lea r9, str.unknown_type:__d
mov dword [rsp + 0x20], eax
mov r8d, 0x580
lea rdx, str.vsock_connect
mov ecx, 0x580202
call fcn.140028ed0
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
mov dword [rsp + 0x18], r8d
push rbx
push r12
push r15
sub rsp, 0x60
mov r15d, r8d
mov rbx, rcx
cmp r8d, 0x10
jae 0x14004959d
mov rax, qword gs:[0x58]
mov r12d, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [r12 + rcx]
test rax, rax
jne 0x14004958a
call fcn.140176664
mov dword [rax], reloc.WS2_32.dll_shutdown
or eax, 0xffffffff
add rsp, 0x60
pop r15
pop r12
pop rbx
ret
movups xmm0, xmmword [rdx]
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], rdi
movups xmm1, xmm0
movq rax, xmm1
shr rax, 0x20
bswap eax
movups xmmword [rsp + 0x20], xmm0
movups xmmword [rsp + 0x30], xmm0
cmp eax, 0x7f000001
jne 0x1400495f4
cmp dword [rcx + 0x14], 6
jne 0x1400495f4
test byte [rcx + 0x68], 0x80
je 0x1400495f4
cmp dword [0x14025b390], 3
jne 0x1400495f4
mov ecx, dword [rcx]
xor edx, edx
mov dword [rsp + 0x88], 1
call fcn.140047640
jmp 0x1400495ff
mov dword [rsp + 0x88], 0
mov eax, dword [rsp + 0x24]
bswap eax
mov qword [rsp + 0x40], r14
cmp eax, 0x7f000001
jne 0x140049623
cmp word [rbx + 0x94], 0
jne 0x140049623
mov r14d, 1
jmp 0x140049626
xor r14d, r14d
movsxd rcx, dword [rbx + 0x70]
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x80], rbp
mov r8d, r15d
mov qword [rsp + 0x48], r13
xor esi, esi
call qword [sym.imp.WS2_32.dll_connect]
movsxd rcx, eax
call fcn.140172320
mov r12d, 0x2fe0
mov rdi, rax
test eax, eax
je 0x1400497c0
mov rcx, qword gs:[0x58]
mov r13d, r12d
add r13, qword [rcx]
mov qword [rsp + 0x98], r13
mov rax, qword [r13]
test rax, rax
jne 0x140049685
call fcn.140176664
cmp dword [rax], 0x2740
jne 0x1400497bc
test r14, r14
je 0x1400497bc
cmp esi, 2
jge 0x1400497bc
mov edi, dword [rbx + 0x68]
mov r8d, dword [rbx + 0x14]
and edi, 0x80
mov edx, dword [rbx + 0x10]
mov ecx, dword [rbx + 0xc]
movsxd rbp, dword [rbx + 0x70]
call qword [sym.imp.WS2_32.dll_socket]
mov dword [rbx + 0x70], eax
test eax, eax
js 0x1400497b4
xor r8d, r8d
movsxd rcx, eax
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov ecx, dword [rbx]
xor edx, edx
test edi, edi
setne dl
call fcn.140047640
mov r15d, 2
mov r12d, 0x3e8
mov r13d, 0x100
nop dword [rax + rax]
xor eax, eax
mov qword [rsp + 0x20], rax
mov word [rsp + 0x20], r15w
mov qword [rsp + 0x28], rax
call fcn.140173860
mov r8d, eax
mov dword [rsp + 0x24], 0x100007f
mov eax, 0x10624dd3
imul r8d
movzx eax, r13w
sar edx, 0xc
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
imul ecx, edx, 0xfa00
sub r8d, ecx
mov ecx, dword [rbx]
add r8w, r12w
movzx edx, r8w
imul edx, eax
shr r8w, 8
add dx, r8w
mov r8d, reloc.WS2_32.dll_recv
mov word [rsp + 0x22], dx
lea rdx, [rsp + 0x20]
call fcn.140048e00
test eax, eax
jne 0x140049700
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
movsxd rcx, dword [rbx + 0x70]
lea rdx, [rsp + 0x30]
mov r8d, dword [rsp + 0x90]
inc esi
call qword [sym.imp.WS2_32.dll_connect]
movsxd rcx, eax
call fcn.140172320
mov r13, qword [rsp + 0x98]
mov edi, eax
mov r12d, 0x2fe0
test eax, eax
jne 0x140049677
jmp 0x1400497c0
or eax, 0xffffffff
jmp 0x1400498a9
test edi, edi
jne 0x1400497cd
inc dword [0x140272fc8]
mov dword [rbx + 8], 1
cmp dword [rsp + 0x88], 0
je 0x1400498a7
mov rax, qword gs:[0x58]
mov r14d, r12d
add r14, qword [rax]
mov rax, qword [r14]
test rax, rax
jne 0x1400497f7
call fcn.140176664
mov ebp, dword [rax]
lea rcx, [0x140272f60]
movsxd rbx, dword [rbx]
mov dword [rsp + 0x90], 1
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140272fe0]
lea rbx, [rbx*8]
lea rcx, [0x140272f60]
mov rsi, qword [rbx + rax]
call fcn.14002ec90
test byte [rsi + 0x68], 1
je 0x140049891
lea rcx, [0x140272f60]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140272fe0]
lea rcx, [0x140272f60]
mov rbx, qword [rbx + rax]
call fcn.14002ec90
movsxd rcx, dword [rbx + 0x70]
lea r8, [rsp + 0x90]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
movsxd rcx, eax
call fcn.140172320
test eax, eax
je 0x140049891
lea rdx, str.failed_ioctl_FIOBIO_:__m
mov ecx, 0x580003
call fcn.140028ca0
jmp 0x140049898
or dword [rsi + 0x68], 0x80
mov rax, qword [r14]
test rax, rax
jne 0x1400498a5
call fcn.140176664
mov dword [rax], ebp
mov eax, edi
mov r13, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x80]
mov r14, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x50]
add rsp, 0x60
pop r15
pop r12
pop rbx
ret