Function at 0x1402f5980
Capabilities:
Connect socket
Send data
Send data on socket

Disassembly:
push rbx
push rbp
push rdi
sub rsp, 0x2a0
mov rax, qword [0x140367bb8]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov rdi, rcx
movsxd rbp, r8d
mov rcx, qword [0x14038aae8]
mov qword [rsp + 0x38], rdx
test rcx, rcx
jne 0x1402f59f2
movzx edx, word [0x14038ac24]
test dx, dx
je 0x1402f59f2
lea rcx, [0x14038ab20]
call fcn.1402f6da0
test al, al
jne 0x1402f59eb
xor ebp, ebp
mov rbx, 0xffffffffffffffff
mov qword [0x14038aae8], rbp
mov dword [0x14038ab00], ebx
jmp 0x1402f5d53
mov rcx, qword [0x14038aae8]
mov qword [rsp + 0x288], r14
lea rdx, [0x14038aaf0]
mov r14d, reloc.WS2_32.dll_recv
mov r8d, r14d
call qword [sym.imp.WS2_32.dll_connect]
mov dword [0x14038ab00], eax
cmp eax, 0xffffffff
jne 0x1402f5a8d
cmp qword [0x14038aae8], 0
jne 0x1402f5a8d
movzx edx, word [0x14038ac24]
test dx, dx
je 0x1402f5a8d
lea rcx, [0x14038ab20]
call fcn.1402f6da0
mov rcx, qword [0x14038aae8]
test al, al
je 0x1402f5a6a
mov r8d, r14d
lea rdx, [0x14038aaf0]
call qword [sym.imp.WS2_32.dll_connect]
mov dword [0x14038ab00], eax
cmp eax, 0xffffffff
jne 0x1402f5a8d
mov rcx, qword [0x14038aae8]
call qword [sym.imp.WS2_32.dll_closesocket]
xor ebp, ebp
mov rbx, 0xffffffffffffffff
mov qword [0x14038aae8], rbp
xor al, al
mov dword [0x14038ab00], ebx
jmp 0x1402f5d4b
mov qword [rsp + 0x2d8], rsi
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x298], r12
xor edx, edx
mov qword [rsp + 0x290], r13
mov r8d, 0x104
mov qword [rsp + 0x280], r15
call sub.VCRUNTIME140.dll_memset
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1402f5380
mov rbx, 0xffffffffffffffff
lea rax, [rsp + 0x50]
mov rsi, rbx
nop dword [rax]
inc rsi
cmp byte [rax + rsi], 0
jne 0x1402f5ae0
mov r13, rbp
mov rdx, rbx
nop
inc rdx
cmp byte [rdi + rdx], 0
jne 0x1402f5af0
lea rcx, [0x14038afa0]
mov rax, rbx
inc rax
cmp byte [rcx + rax], 0
jne 0x1402f5b03
add rax, r13
lea r8, [0x14038ae80]
mov rcx, rbx
nop dword [rax]
inc rcx
cmp byte [r8 + rcx], 0
jne 0x1402f5b20
add rax, rdx
lea rbp, [rsi + 0x20]
add rcx, rax
add rbp, rcx
mov rax, rbp
and eax, 0xf
je 0x1402f5b45
sub r14, rax
add rbp, r14
lea rcx, [rbp + 0x12c]
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
lea r8, [rbp + 0x12c]
xor edx, edx
mov rcx, rax
mov r14, rax
call sub.VCRUNTIME140.dll_memset
movabs rax, 0x6addaf8cef1b7c1
lea r12, [r14 + 0x30]
xor ebp, ebp
mov qword [r14], rax
mov qword [r14 + 8], rbp
mov r8, rbx
nop
inc r8
cmp byte [rdi + r8], bpl
jne 0x1402f5b80
mov rdx, rdi
lea rcx, [r12 + 8]
call sub.VCRUNTIME140.dll_memcpy
mov rax, rbx
nop dword [rax]
inc rax
cmp byte [rdi + rax], bpl
jne 0x1402f5ba0
lea rdi, [r12 + 0xa]
mov r8, rbx
add rdi, rax
lea r15, [0x14038ae80]
nop dword [rax + rax]
inc r8
cmp byte [r15 + r8], bpl
jne 0x1402f5bc0
mov rdx, r15
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov rax, rbx
inc rax
cmp byte [r15 + rax], bpl
jne 0x1402f5bd7
add rdi, rax
lea rdx, [rsp + 0x50]
mov r8, rsi
lea rcx, [rdi + 2]
call sub.VCRUNTIME140.dll_memcpy
add rsi, 4
mov r8, rbx
add rdi, rsi
lea rsi, [0x14038afa0]
inc r8
cmp byte [rsi + r8], bpl
jne 0x1402f5c05
mov rdx, rsi
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
nop dword [rax]
inc rbx
cmp byte [rsi + rbx], bpl
jne 0x1402f5c20
mov rdx, qword [rsp + 0x38]
add rbx, 2
add rbx, rdi
mov r8, r13
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
lea eax, [r13 + 2]
xor edx, edx
cdqe
lea rcx, [rsp + 0x160]
sub rax, r12
mov r8d, 0x104
add rax, rbx
mov qword [r14 + 0x10], rax
add rax, 0xfffffffffffffff8
mov qword [r12], rax
mov qword [rsp + 0x40], rbp
call sub.VCRUNTIME140.dll_memset
mov r9d, dword [0x14038ae64]
lea r8, [rsp + 0x160]
lea rdx, [0x14038ad60]
mov rcx, r15
call fcn.1402f9a50
movsxd rax, dword [0x14038ae64]
lea r8, [r14 + 0x20]
mov rdx, qword [r14 + 0x10]
lea r9, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov rcx, r12
lea rax, [rsp + 0x160]
mov qword [rsp + 0x20], rax
call fcn.1402f8980
xor edx, edx
lea rcx, [rsp + 0x160]
mov r8d, 0x104
call sub.VCRUNTIME140.dll_memset
mov rdi, qword [rsp + 0x40]
lea rcx, [0x14038aac0]
mov qword [r14 + 0x10], rbp
add rdi, 0x20
mov qword [r14 + 0x18], rdi
mov rbx, qword [0x14038aae8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor r9d, r9d
mov r8d, edi
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_send]
mov rcx, r14
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
cmp byte [0x140367b4c], 5
mov r15, qword [rsp + 0x280]
mov r13, qword [rsp + 0x290]
mov r12, qword [rsp + 0x298]
mov rsi, qword [rsp + 0x2d8]
jne 0x1402f5d49
shl byte [0x140367b4d], 4
mov byte [0x140367b4c], 6
mov al, 1
mov r14, qword [rsp + 0x288]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.1402fa650
add rsp, 0x2a0
pop rdi
pop rbp
pop rbx
ret