Function at 0x140047850
Capabilities:
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, [0x14027dfa0]
mov rsi, rdx
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14027e020]
lea rcx, [0x14027dfa0]
mov rbx, qword [rax + rbx*8]
call sub.KERNEL32.dll_LeaveCriticalSection
mov eax, dword [rbx + 0x68]
test al, 4
je 0x140047928
lea rcx, [rsp + 0x48]
sub rcx, 8
lea r8, [0x140046910]
lea rdx, [rsp + 0x68]
call fcn.140029110
mov r8, qword [rbx + 0x118]
lea rdx, str..pipezon__s
mov rcx, rax
mov qword [rsp + 0x68], rax
call fcn.14002a330
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.140053920
test eax, eax
jne 0x140047913
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 0x14004799c
cmp dword [rbx + 0xc], 2
jne 0x14004799c
cmp word [rbx + 0x6c], 0
je 0x14004799c
cmp edi, 0x10
je 0x140047979
mov rax, qword gs:[0x58]
mov edx, 0x2f80
mov rcx, qword [rax]
mov rax, qword [rdx + rcx]
test rax, rax
jne 0x140047960
call fcn.1401762d4
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 0x1400479bd
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 0x1400479f0
lea r9, str.unknown_type:__d
mov dword [rsp + 0x20], eax
mov r8d, 0x580
lea rdx, str.vsock_connect
mov ecx, 0x4b0202
call fcn.14002d680
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 0x140047a3d
mov rax, qword gs:[0x58]
mov r12d, 0x2f80
mov rcx, qword [rax]
mov rax, qword [r12 + rcx]
test rax, rax
jne 0x140047a2a
call fcn.1401762d4
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 0x140047a94
cmp dword [rcx + 0x14], 6
jne 0x140047a94
test byte [rcx + 0x68], 0x80
je 0x140047a94
cmp dword [0x140263bb0], 3
jne 0x140047a94
mov ecx, dword [rcx]
xor edx, edx
mov dword [rsp + 0x88], 1
call fcn.140045ae0
jmp 0x140047a9f
mov dword [rsp + 0x88], 0
mov eax, dword [rsp + 0x24]
bswap eax
mov qword [rsp + 0x40], r14
cmp eax, 0x7f000001
jne 0x140047ac3
cmp word [rbx + 0x94], 0
jne 0x140047ac3
mov r14d, 1
jmp 0x140047ac6
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.140171260
mov r12d, 0x2f80
mov rdi, rax
test eax, eax
je 0x140047c60
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 0x140047b25
call fcn.1401762d4
cmp dword [rax], 0x2740
jne 0x140047c5c
test r14, r14
je 0x140047c5c
cmp esi, 2
jge 0x140047c5c
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 0x140047c54
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.140045ae0
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.140173450
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.1400472a0
test eax, eax
jne 0x140047ba0
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.140171260
mov r13, qword [rsp + 0x98]
mov edi, eax
mov r12d, 0x2f80
test eax, eax
jne 0x140047b17
jmp 0x140047c60
or eax, 0xffffffff
jmp 0x140047d49
test edi, edi
jne 0x140047c6d
inc dword [0x14027e008]
mov dword [rbx + 8], 1
cmp dword [rsp + 0x88], 0
je 0x140047d47
mov rax, qword gs:[0x58]
mov r14d, r12d
add r14, qword [rax]
mov rax, qword [r14]
test rax, rax
jne 0x140047c97
call fcn.1401762d4
mov ebp, dword [rax]
lea rcx, [0x14027dfa0]
movsxd rbx, dword [rbx]
mov dword [rsp + 0x90], 1
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14027e020]
lea rbx, [rbx*8]
lea rcx, [0x14027dfa0]
mov rsi, qword [rbx + rax]
call sub.KERNEL32.dll_LeaveCriticalSection
test byte [rsi + 0x68], 1
je 0x140047d31
lea rcx, [0x14027dfa0]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14027e020]
lea rcx, [0x14027dfa0]
mov rbx, qword [rbx + rax]
call sub.KERNEL32.dll_LeaveCriticalSection
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.140171260
test eax, eax
je 0x140047d31
lea rdx, str.failed_ioctl_FIOBIO_:__m
mov ecx, 0x4b0003
call fcn.14002d450
jmp 0x140047d38
or dword [rsi + 0x68], 0x80
mov rax, qword [r14]
test rax, rax
jne 0x140047d45
call fcn.1401762d4
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