Function at 0x140037120
Capabilities:
Set socket configuration

Disassembly:
push rbx
push rsi
push r14
push r15
sub rsp, 0x278
mov rax, qword [0x1400c0688]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov r15, rcx
mov rsi, r9
mov rcx, r8
mov r14, r8
mov rbx, rdx
call fcn.1400689e4
test eax, eax
jne 0x1400373dd
mov qword [rsp + 0x270], rbp
mov rcx, rbx
mov qword [rsp + 0x268], rdi
mov qword [rsp + 0x260], r12
call sub.libssl_3_x64.dll_SSL_new
mov rcx, r14
mov rbx, rax
call fcn.140068a08
test rbx, rbx
je 0x14003739c
lea r8, [rsp + 0x44]
mov dword [rsp + 0x44], 1
mov edx, 0x8004667e
mov rcx, r15
call qword [sym.imp.WS2_32.dll_ioctlsocket]
xor edx, edx
mov ecx, r15d
call sub.libcrypto_3_x64.dll_BIO_new_socket
xor r9d, r9d
mov rcx, rax
mov r12, rax
lea edx, [r9 + 0x66]
lea r8d, [r9 + 1]
call sub.libcrypto_3_x64.dll_BIO_ctrl
mov r8, r12
mov rdx, r12
mov rcx, rbx
call sub.libssl_3_x64.dll_SSL_set_bio
mov r9, qword [rsp + 0x2c0]
add r9, 8
cmp qword [r9 + 0x18], 0x10
jb 0x1400371ef
mov r9, qword [r9]
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 0x37]
call sub.libssl_3_x64.dll_SSL_ctrl
mov rdi, qword [rsi]
cmp byte [rdi + 0x3c8], 0
je 0x140037252
lea rax, [rsp + 0x40]
mov byte [rsp + 0x40], 1
lea rcx, [rdi + 0x468]
mov qword [rsp + 0x38], rax
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x30], rdi
call fcn.140034340
cmp byte [rsp + 0x40], 0
jne 0x140037245
mov rax, qword [rsi + 8]
mov dword [rax], 9
jmp 0x140037320
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call sub.libssl_3_x64.dll_SSL_set_verify
mov rax, qword [rdi + 0x178]
lea r8, [0x1400671fc]
mov rcx, qword [rsi + 0x10]
mov rdx, rbx
mov r9, qword [rdi + 0x170]
mov qword [rsp + 0x20], rax
mov rcx, qword [rcx]
call fcn.140037080
test al, al
jne 0x14003728e
mov rax, qword [rsi + 8]
mov dword [rax], 8
jmp 0x140037320
cmp byte [rdi + 0x3c8], 0
je 0x14003736f
mov rcx, rbx
call sub.libssl_3_x64.dll_SSL_get_verify_result
mov dword [rdi + 0x488], eax
test eax, eax
jne 0x140037316
mov rcx, rbx
call sub.libssl_3_x64.dll_SSL_get1_peer_certificate
mov rbp, rax
test rax, rax
je 0x140037316
mov rdx, rax
mov rcx, rdi
call fcn.1400615c0
test al, al
jne 0x140037367
mov rcx, rbp
call sub.libcrypto_3_x64.dll_X509_get_subject_name
test rax, rax
je 0x14003730e
mov r9d, 0x200
lea r8, [rsp + 0x50]
mov edx, reloc.WS2_32.dll_listen
mov rcx, rax
call sub.libcrypto_3_x64.dll_X509_NAME_get_text_by_NID
cmp eax, 0xffffffff
je 0x14003730e
movsxd r8, eax
lea rdx, [rsp + 0x50]
mov rcx, rdi
call fcn.14004b4e0
test al, al
jne 0x140037367
mov rcx, rbp
call sub.libcrypto_3_x64.dll_X509_free
mov rax, qword [rsi + 8]
mov dword [rax], 0xa
mov rcx, rbx
call sub.libssl_3_x64.dll_SSL_shutdown
mov rcx, r14
call fcn.1400689e4
test eax, eax
jne 0x1400373d5
mov rcx, rbx
call sub.libssl_3_x64.dll_SSL_free
mov rcx, r14
call fcn.140068a08
lea r8, [rsp + 0x44]
mov dword [rsp + 0x44], 0
mov edx, 0x8004667e
mov rcx, r15
call qword [sym.imp.WS2_32.dll_ioctlsocket]
xor eax, eax
jmp 0x14003739f
mov rcx, rbp
call sub.libcrypto_3_x64.dll_X509_free
xor r9d, r9d
xor r8d, r8d
mov rcx, r12
lea edx, [r9 + 0x66]
call sub.libcrypto_3_x64.dll_BIO_ctrl
lea r8, [rsp + 0x44]
mov dword [rsp + 0x44], 0
mov edx, 0x8004667e
mov rcx, r15
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rax, rbx
mov rdi, qword [rsp + 0x268]
mov rbp, qword [rsp + 0x270]
mov r12, qword [rsp + 0x260]
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.140069ba0
add rsp, 0x278
pop r15
pop r14
pop rsi
pop rbx
ret
mov ecx, eax
call fcn.140067c08
int3
mov ecx, eax
call fcn.140067c08
int3