Function at 0x140124a00
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rdi
push r12
push r14
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
mov rax, qword [0x140212c80]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r12d, dword [rbp + 0x77]
mov eax, r12d
mov rbx, qword [rbp + 0x67]
neg eax
mov r14, qword [rbp + 0x6f]
sbb edi, edi
add edi, 2
test r12d, r12d
je 0x140124a5b
movzx eax, word [r14 + 0x1e]
test ax, ax
jne 0x140124a69
movzx eax, word [rbx + 0x26]
jmp 0x140124a69
movzx eax, word [r14 + 0x1c]
test ax, ax
jne 0x140124a69
movzx eax, word [rbx + 0x24]
mov ecx, dword [r14 + 8]
mov edx, 2
mov qword [rsp + 0x90], r15
lea r8d, [rdx + 0x15]
cmp ecx, edx
je 0x140124ab5
cmp ecx, r8d
je 0x140124a8f
lea eax, [rdx + 7]
jmp 0x140124ea2
movups xmm0, xmmword [r14 + 0xc]
xor r15d, r15d
mov dword [rbp - 0x39], 0x1c
mov dword [rbp - 0x1d], r15d
movups xmmword [rbp - 0x19], xmm0
mov dword [rbp - 9], r15d
mov word [rbp - 0x21], r8w
mov word [rbp - 0x1f], ax
jmp 0x140124ad2
xor r15d, r15d
mov word [rbp - 0x1f], ax
mov eax, dword [r14 + 0xc]
mov qword [rbp - 0x19], r15
mov dword [rbp - 0x1d], eax
mov dword [rbp - 0x39], reloc.WS2_32.dll_recv
mov word [rbp - 0x21], dx
mov rax, qword [rbx + 0x110]
mov qword [rsp + 0xe8], rsi
test rax, rax
je 0x140124b02
mov rax, qword [rax]
test rax, rax
je 0x140124b02
mov r9, qword [rbx + 0x118]
xor r8d, r8d
mov edx, edi
call qword [case.0x1400cc851.0]
jmp 0x140124b0d
xor r8d, r8d
mov edx, edi
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140124b1e
lea eax, [rsi + 0xc]
jmp 0x140124e9a
mov rax, qword [rbx + 0x110]
mov qword [rsp + 0x98], r13
mov r13d, dword [r14 + 8]
test rax, rax
je 0x140124b40
cmp qword [rax], 0
jne 0x140124c82
lea r8, [rbp - 0x35]
mov dword [rbp - 0x35], 1
mov edx, 0x8004667e
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [rbx + 0x28], 0
lea r9, [rbx + 0x28]
jle 0x140124b88
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0x1001
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x140124d60
cmp dword [rbx + 0x2c], 0
lea r9, [rbx + 0x2c]
jle 0x140124bb7
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0x1002
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x140124d60
cmp r13d, 2
jne 0x140124c00
mov ecx, dword [rbx + 0x84]
test ecx, ecx
je 0x140124c82
xorps xmm0, xmm0
mov eax, r13d
movups xmmword [rbp - 1], xmm0
mov word [rbp - 1], ax
call qword [sym.imp.WS2_32.dll_htonl]
lea r8d, [r13 + 0xe]
mov rcx, rsi
lea rdx, [rbp - 1]
mov dword [rbp + 3], eax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x140124c82
jmp 0x140124d60
cmp r13d, 0x17
jne 0x140124c82
mov rax, qword [rbx + 0x88]
cmp rax, qword [0x1401aa8c8]
jne 0x140124c26
mov rax, qword [rbx + 0x90]
cmp rax, qword [0x1401aa8d0]
je 0x140124c60
movups xmm0, xmmword [rbx + 0x88]
mov eax, reloc.WS2_32.dll_socket
mov dword [rbp + 1], r15d
lea rdx, [rbp - 1]
mov word [rbp + 5], r15w
mov rcx, rsi
mov dword [rbp + 0x17], r15d
mov word [rbp - 1], ax
lea r8d, [rax + 5]
movups xmmword [rbp + 7], xmm0
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x140124d60
mov edx, 0x29
mov dword [rbp - 0x31], r15d
lea r9, [rbp - 0x31]
mov dword [rsp + 0x20], 4
mov rcx, rsi
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
test r12d, r12d
je 0x140124cc7
mov rax, qword [rbx + 0x110]
mov dword [rbp - 0x29], 1
test rax, rax
je 0x140124ca0
cmp qword [rax], 0
jne 0x140124cc7
mov edx, 6
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x29]
mov rcx, rsi
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x140124d60
mov rax, qword [rbx + 0x100]
test rax, rax
je 0x140124ce9
mov r8, qword [rbx + 0x108]
mov edx, edi
mov rcx, rsi
call qword [case.0x1400cc851.0]
test eax, eax
js 0x140124d60
mov rax, qword [rbx + 0x110]
test rax, rax
je 0x140124d18
mov rax, qword [rax + 0x10]
test rax, rax
je 0x140124d18
mov r9, qword [rbx + 0x118]
lea rdx, [rbp - 0x21]
mov r8d, dword [rbp - 0x39]
mov rcx, rsi
call qword [case.0x1400cc851.0]
jmp 0x140124d29
mov r8d, dword [rbp - 0x39]
lea rdx, [rbp - 0x21]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x140124d3e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
add eax, 0xffffd8cd
cmp eax, 1
ja 0x140124d60
mov rax, qword [rbx + 0xf0]
test rax, rax
je 0x140124d75
mov r8, qword [rbx + 0xf8]
mov edx, edi
mov rcx, rsi
call qword [case.0x1400cc851.0]
test eax, eax
jns 0x140124d75
mov rdx, rsi
mov rcx, rbx
call fcn.1401241f0
mov eax, ntohs
jmp 0x140124e92
mov rax, qword [0x140212a78]
mov ecx, 0x28
call qword [case.0x1400cc851.0]
mov rdi, rax
test rax, rax
jne 0x140124da2
mov rdx, rsi
mov rcx, rbx
call fcn.1401241f0
lea eax, [rdi + 0xf]
jmp 0x140124e92
mov qword [rax + 0x10], r15
xor ecx, ecx
mov qword [rax + 0x18], r15
mov qword [rax + 0x20], r15
mov qword [rax + 8], rsi
mov qword [rax], r14
call fcn.140126d50
mov qword [rdi + 0x20], rax
mov dword [rdi + 0x10], r12d
test rax, rax
jne 0x140124dd6
mov rdx, rsi
mov rcx, rbx
call fcn.1401241f0
jmp 0x140124e3b
mov rcx, qword [r14 + 0x20]
mov rdx, rdi
test r12d, r12d
je 0x140124de9
call fcn.140126ef0
jmp 0x140124dee
call fcn.140126e60
mov r15, rax
mov rdx, rsi
test rax, rax
jne 0x140124e0c
mov rcx, rbx
call fcn.1401241f0
mov rcx, qword [rdi + 0x20]
call fcn.140126d90
jmp 0x140124e3b
mov rcx, qword [rbx + 0xd8]
mov r8, r15
call fcn.1401278f0
test eax, eax
jne 0x140124e52
mov rdx, rsi
mov rcx, rbx
call fcn.1401241f0
mov rcx, qword [rdi + 0x20]
call fcn.140126d90
mov rcx, r15
call fcn.140126fa0
mov rax, qword [0x140212a88]
mov rcx, rdi
call qword [case.0x1400cc851.0]
mov eax, reloc.WS2_32.dll_ntohs
jmp 0x140124e92
mov rax, qword [rbx + 0xe0]
test rax, rax
je 0x140124e75
mov rcx, qword [rbx + 0xe8]
xor r9d, r9d
mov rdx, rsi
lea r8d, [r9 + 1]
call qword [case.0x1400cc851.0]
test r12d, r12d
je 0x140124e90
inc qword [rbx + 0xb0]
mov rax, qword [rbx + 0xb0]
mov qword [r14 + 0x40], rax
mov qword [r14 + 0x28], rdi
xor eax, eax
mov r13, qword [rsp + 0x98]
mov rsi, qword [rsp + 0xe8]
mov r15, qword [rsp + 0x90]
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.140133600
add rsp, 0xa0
pop r14
pop r12
pop rdi
pop rbx
pop rbp
ret