Function at 0x140040a58
Capabilities:
Encode data using xor

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
push rdi
push r12
push r14
sub rsp, 0x50
mov rax, qword [0x140250040]
xor rax, rsp
mov qword [rsp + 0x40], rax
lea rax, [0x14020efe0]
mov r9d, 0x1f8e
lea r14, str.C:UsersdwordSourceReposPathOfExileBotFARMPathOfExileMenulibrary_ssl_tls.c
mov qword [r11 - 0x48], rax
mov r8, r14
mov edx, 2
mov rbx, rcx
call fcn.140020a14
mov rax, qword [rbx]
lea rdx, [rsp + 0x30]
mov rdi, qword [rbx + 0x70]
mov ebp, 1
mov rcx, rbx
movzx r8d, byte [rax + 8]
xor r8d, ebp
call qword [rdi + 0x28]
test eax, eax
je 0x140040aed
mov dword [rsp + 0x28], eax
mov r9d, 0x1f92
lea rax, str.calc_finished
mov r8, r14
mov edx, ebp
mov qword [rsp + 0x20], rax
mov rcx, rbx
call fcn.140020b04
mov edx, ebp
mov rcx, rbx
call fcn.14003acdc
mov esi, eax
mov r12d, 0xc
test eax, eax
je 0x140040b2b
mov dword [rsp + 0x28], eax
mov r9d, 0x1f96
lea rax, str.mbedtls_ssl_read_record
mov r8, r14
mov edx, ebp
mov qword [rsp + 0x20], rax
mov rcx, rbx
call fcn.140020b04
jmp 0x140040caa
cmp dword [rbx + 0xf0], 0x16
je 0x140040b6a
lea rax, str.bad_finished_message
mov r9d, 0x1f9b
mov r8, r14
mov qword [rsp + 0x20], rax
mov edx, ebp
mov rcx, rbx
call fcn.140020a14
mov r8b, 0xa
mov dl, 2
mov rcx, rbx
call fcn.14003c154
mov esi, 0xffff8900
jmp 0x140040caa
mov rcx, qword [rbx + 0xe0]
cmp byte [rcx], 0x14
jne 0x140040b53
mov rax, qword [rbx]
mov r8b, byte [rax + 9]
mov eax, 0x18
cmp r8b, bpl
lea edx, [rax - 8]
cmovne eax, edx
cmp qword [rbx + 0x128], rax
je 0x140040bca
lea rax, str.bad_finished_message
mov r9d, 0x1faa
mov r8, r14
mov qword [rsp + 0x20], rax
mov edx, ebp
mov rcx, rbx
call fcn.140020a14
mov r8b, 0x32
mov dl, 2
mov rcx, rbx
call fcn.14003c154
mov esi, 0xffff8d00
jmp 0x140040caa
xor edx, edx
mov rdi, r12
cmp r8b, bpl
lea eax, [rdx + 4]
cmovne rdi, rax
add rdi, rcx
xor r8d, r8d
movzx eax, byte [rdi + rdx]
movzx ecx, byte [rsp + rdx + 0x30]
add rdx, rbp
xor ecx, eax
or r8d, ecx
cmp rdx, r12
jb 0x140040bdf
test r8d, r8d
je 0x140040c2d
lea rax, str.bad_finished_message
mov r9d, 0x1fb3
mov r8, r14
mov qword [rsp + 0x20], rax
mov edx, ebp
mov rcx, rbx
call fcn.140020a14
mov r8b, 0x33
mov dl, 2
mov rcx, rbx
call fcn.14003c154
mov esi, 0xffff9200
jmp 0x140040caa
mov eax, dword [rsp + 0x38]
movsd xmm0, qword [rsp + 0x30]
mov qword [rbx + 0x1d0], r12
movsd qword [rbx + 0x1e4], xmm0
mov dword [rbx + 0x1ec], eax
mov rax, qword [rbx + 0x70]
cmp byte [rax], 0
je 0x140040c74
mov rax, qword [rbx]
cmp byte [rax + 8], 0
jne 0x140040c65
mov dword [rbx + 8], 0xa
cmp byte [rax + 8], bpl
jne 0x140040c77
mov dword [rbx + 8], 0xf
jmp 0x140040c77
add dword [rbx + 8], ebp
mov rax, qword [rbx]
cmp byte [rax + 9], bpl
jne 0x140040c88
mov rcx, rbx
call fcn.140039330
lea rax, str.__parse_finished
mov r9d, 0x1fd4
mov r8, r14
mov qword [rsp + 0x20], rax
mov edx, 2
mov rcx, rbx
call fcn.140020a14
xor eax, eax
lea rdi, [rsp + 0x30]
mov rcx, r12
rep stosb byte [rdi], al
mov eax, esi
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14014f050
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r12
pop rdi
ret