Function at 0x18040ea40
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], rsi
mov dword [rsp + 0x10], edx
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x40
call fcn.180469830
sub rsp, rax
mov r13d, dword [rsp + 0x90]
xor r14d, r14d
movsxd rdi, r9d
mov r15, r8
mov rsi, rcx
mov r12d, r14d
test edx, edx
jle 0x18040ee29
test r9d, r9d
jle 0x18040ee29
cmp edi, r13d
jg 0x18040ee09
cmp r13d, 0xb
jl 0x18040ee09
mov qword [rsp + 0x70], rbx
lea r8d, [rax + 0xe]
mov qword [rsp + 0x80], rbp
lea rdx, str.crypto_rsa_rsa_ssl.c
movsxd rbp, r13d
mov rcx, rbp
mov qword [rsp + 0x38], rbp
call fcn.18039e110
mov rbx, rax
test rax, rax
jne 0x18040eb0e
lea r9, str.crypto_rsa_rsa_ssl.c
mov dword [rsp + 0x20], 0x50
lea edx, [rax + 0x72]
lea ecx, [rax + 4]
lea r8d, [r14 + 0x41]
call fcn.18039f230
lea eax, [rbx - 1]
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x88]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
add r15, rdi
add rbx, rbp
test r13d, r13d
jle 0x18040eb51
mov rdx, r13
nop dword [rax]
mov eax, edi
lea ecx, [rdi - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
dec rbx
and ecx, eax
dec ecx
mov eax, ecx
and eax, 1
sub edi, eax
mov eax, ecx
and eax, 1
sub r15, rax
movzx eax, byte [r15]
and al, cl
mov byte [rbx], al
sub rdx, 1
jne 0x18040eb20
movzx eax, byte [rbx + 1]
mov r10d, 2
xor eax, 2
mov r9d, r14d
mov r11d, r14d
lea ebp, [rax - 1]
not eax
shr eax, 0x1f
shr ebp, 0x1f
and ebp, eax
movzx eax, byte [rbx]
dec eax
neg ebp
shr eax, 0x1f
neg eax
and ebp, eax
mov edi, ebp
not edi
mov dword [rsp + 0x30], edi
cmp r13d, r10d
jle 0x18040ebf9
mov r8d, 0xffffffff
lea rdi, [rbx + 2]
nop word [rax + rax]
movzx edx, byte [rdi]
lea rdi, [rdi + 1]
lea ecx, [rdx - 1]
xor edx, 3
shr ecx, 0x1f
neg ecx
and r8d, ecx
or r9d, ecx
mov eax, r8d
lea ecx, [rdx - 1]
and r8d, r10d
shr ecx, 0x1f
not eax
not edx
and r12d, eax
shr edx, 0x1f
or r12d, r8d
and ecx, edx
neg ecx
mov r8d, r9d
or ecx, r9d
not r8d
mov eax, r8d
inc r10d
and eax, 1
add eax, r11d
mov r11d, ecx
and r11d, eax
cmp r10d, r13d
jl 0x18040eba0
mov edi, dword [rsp + 0x30]
mov r10d, dword [rsp + 0x78]
lea eax, [r12 - 0xa]
or eax, r12d
mov r15d, r13d
xor eax, r12d
sub r15d, r12d
shr eax, 0x1f
dec r15d
dec eax
and ebp, eax
lea eax, [r11 - 8]
or eax, r11d
mov r9d, ebp
xor eax, r11d
or r9d, edi
shr eax, 0x1f
mov ecx, ebp
dec eax
not ecx
and ebp, eax
and edi, r9d
mov r8d, ebp
and edi, 0x6b
or r8d, ecx
mov edx, ebp
not edx
mov ecx, r10d
sub ecx, r15d
mov eax, r15d
xor eax, r10d
xor ecx, r15d
or ecx, eax
mov r12d, r9d
not r12d
xor ecx, r10d
and r12d, 0x71
shr ecx, 0x1f
or r12d, edi
dec ecx
and r12d, r8d
and ebp, ecx
not r8d
lea ecx, [r13 - 0xb]
and r8d, 0x73
mov eax, ebp
or eax, edx
or r12d, r8d
and r12d, eax
mov edx, ecx
sub edx, r10d
not eax
and eax, 0x6d
xor edx, r10d
or r12d, eax
mov r11d, 1
mov eax, ecx
mov dword [rsp + 0x78], r12d
xor eax, r10d
or edx, eax
xor edx, ecx
lea ecx, [r13 - 0xb]
shr edx, 0x1f
mov eax, ecx
neg edx
and eax, edx
mov r8d, edx
not r8d
and r8d, r10d
or r8d, eax
mov dword [rsp + 0x30], r8d
cmp ecx, r11d
jle 0x18040ed53
mov r12d, r13d
sub r12d, r15d
add r12d, 0xfffffff5
nop dword [rax]
mov eax, r12d
and eax, r11d
lea r8d, [rax - 1]
not eax
shr eax, 0x1f
shr r8d, 0x1f
and r8d, eax
mov eax, r13d
sub eax, r11d
dec r8d
movsxd r9, eax
cmp r9, 0xb
jle 0x18040ed41
movzx r10d, r8b
movsxd rdi, r11d
not r10b
lea rax, [rbx + 0xb]
add r9, 0xfffffffffffffff5
nop word [rax + rax]
movzx edx, byte [rax + rdi]
lea rax, [rax + 1]
and dl, r8b
movzx ecx, r10b
and cl, byte [rax - 1]
or dl, cl
mov byte [rax - 1], dl
sub r9, 1
jne 0x18040ed20
lea ecx, [r13 - 0xb]
add r11d, r11d
cmp r11d, ecx
jl 0x18040ece0
mov r12d, dword [rsp + 0x78]
mov r8d, dword [rsp + 0x30]
movsxd r10, r8d
test r8d, r8d
jle 0x18040edb8
mov r9d, r15d
mov r11, rbx
shr r9d, 0x1f
sub r11, rsi
nop dword [rax + rax]
mov r8d, r14d
lea rsi, [rsi + 1]
sub r8d, r15d
mov ecx, r14d
shr r8d, 0x1f
movzx eax, r9b
xor r8b, r9b
shr ecx, 0x1f
xor al, cl
inc r14d
or r8b, al
movzx eax, byte [r11 + rsi + 0xa]
xor r8b, cl
neg r8b
and r8b, bpl
and al, r8b
not r8b
and r8b, byte [rsi - 1]
or al, r8b
mov byte [rsi - 1], al
sub r10, 1
jne 0x18040ed70
mov rdx, qword [rsp + 0x38]
lea r8, str.crypto_rsa_rsa_ssl.c
mov r9d, 0xa5
mov rcx, rbx
call fcn.18039e270
mov edx, WSACleanup
mov dword [rsp + 0x20], 0xa6
lea r9, str.crypto_rsa_rsa_ssl.c
mov r8d, r12d
lea ecx, [rdx - 0x6e]
call fcn.18039f230
mov ecx, ebp
and ecx, 1
call fcn.18039f520
mov eax, ebp
not ebp
and eax, r15d
or eax, ebp
jmp 0x18040eaeb
mov edx, WSACleanup
mov dword [rsp + 0x20], 0x4a
lea r9, str.crypto_rsa_rsa_ssl.c
lea ecx, [rdx - 0x6e]
lea r8d, [rdx - 3]
call fcn.18039f230
mov eax, 0xffffffff
jmp 0x18040eaf8