Function at 0x140007670
Capabilities:
Connect socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x260]
sub rsp, 0x360
xor r8d, r8d
mov r15, rdx
mov ebx, ecx
mov edi, 2
mov ecx, edi
lea edx, [r8 + 1]
call qword [sym.imp.ws2_32.dll_socket]
mov r13, 0xffffffffffffffff
mov r12, rax
cmp eax, r13d
je 0x140007927
movsxd r14, r12d
lea r8, [rbp + 0x2b8]
mov rcx, r14
mov dword [rbp + 0x2b8], 1
mov edx, 0x8004667e
call qword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, r13d
je 0x140007927
movzx ecx, bx
mov word [rsp + 0x40], di
call qword [sym.imp.ws2_32.dll_htons]
lea rcx, [0x14002f190]
mov word [rsp + 0x42], ax
call qword [sym.imp.ws2_32.dll_inet_addr]
lea r8d, [rdi + 0xe]
mov rcx, r14
lea rdx, [rsp + 0x40]
mov dword [rsp + 0x44], eax
call qword [sym.imp.ws2_32.dll_connect]
cmp eax, r13d
jne 0x140007732
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x140007927
lea rax, [rsp + 0x38]
mov qword [rbp + 0x58], r14
lea ecx, [r12 + 1]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov dword [rbp + 0x50], 1
lea r8, [rbp + 0x50]
mov qword [rsp + 0x38], 6
xor edx, edx
xor edi, edi
call qword [sym.imp.ws2_32.dll_select]
cmp eax, r13d
je 0x140007927
lea rdx, [rbp + 0x50]
mov rcx, r14
call qword [sym.imp.ws2_32.dll___WSAFDIsSet]
test eax, eax
je 0x140007927
lea rax, [rsp + 0x30]
mov dword [rbp + 0x2b0], edi
lea r9, [rbp + 0x2b0]
mov qword [rsp + 0x20], rax
mov edx, 0xffff
mov dword [rsp + 0x30], 4
mov r8d, 0x1007
mov rcx, r14
call qword [sym.imp.ws2_32.dll_getsockopt]
cmp eax, r13d
je 0x140007927
cmp dword [rbp + 0x2b0], edi
jne 0x140007927
mov word [rsp + 0x50], 0x105
mov esi, edi
mov byte [rsp + 0x52], dil
mov ebx, edi
nop dword [rax]
mov r8d, 3
movsxd rax, esi
lea rdx, [rsp + 0x50]
sub r8d, esi
add rdx, rax
xor r9d, r9d
mov rcx, r14
call qword [sym.imp.ws2_32.dll_send]
cmp eax, r13d
je 0x140007927
add esi, eax
cmp esi, 3
jl 0x1400077e0
mov r8d, 3
movsxd rax, ebx
lea rdx, [rsp + 0x50]
sub r8d, ebx
add rdx, rax
xor r9d, r9d
mov rcx, r14
call qword [sym.imp.ws2_32.dll_recv]
cmp eax, r13d
je 0x140007842
test eax, eax
je 0x140007848
add ebx, eax
cmp ebx, 3
jl 0x140007810
jmp 0x140007848
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp ebx, r13d
je 0x140007927
cmp byte [rsp + 0x50], 5
jne 0x140007927
cmp byte [rsp + 0x52], dil
jne 0x140007927
mov rsi, r13
nop word [rax + rax]
inc rsi
cmp byte [r15 + rsi], dil
jne 0x140007870
movsxd rbx, esi
lea rcx, [rsp + 0x55]
mov r8, rbx
mov dword [rsp + 0x50], 0x3000105
mov rdx, r15
mov byte [rsp + 0x54], sil
call fcn.14000fb70
add esi, 7
mov word [rsp + rbx + 0x55], 0x5000
mov ebx, edi
test esi, esi
jle 0x140007914
nop dword [rax]
mov r8d, esi
movsxd rax, edi
lea rdx, [rsp + 0x50]
sub r8d, edi
add rdx, rax
xor r9d, r9d
mov rcx, r14
call qword [sym.imp.ws2_32.dll_send]
cmp eax, r13d
je 0x140007927
add edi, eax
cmp edi, esi
jl 0x1400078b0
nop dword [rax + rax]
mov r8d, esi
movsxd rax, ebx
lea rdx, [rsp + 0x50]
sub r8d, ebx
add rdx, rax
xor r9d, r9d
mov rcx, r14
call qword [sym.imp.ws2_32.dll_recv]
cmp eax, r13d
je 0x14000790e
test eax, eax
je 0x140007914
add ebx, eax
cmp ebx, esi
jl 0x1400078e0
jmp 0x140007914
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp ebx, r13d
je 0x140007927
cmp byte [rsp + 0x50], 5
cmovne r12d, r13d
mov eax, r12d
jmp 0x14000792a
mov eax, r13d
mov rbx, qword [rsp + 0x3a0]
add rsp, 0x360
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret