Function at 0x50b9c0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x148
mov r12d, 1
mov esi, r12d
mov ebp, dword [rsp + 0x1b0]
mov qword [rsp + 0x190], rcx
mov ecx, ebp
mov rbx, r8
mov edi, r9d
shl esi, cl
mov rcx, qword [rsp + 0x190]
mov dword [rsp + 0x198], edx
call sym.bn_wexpand
test rax, rax
je 0x50c072
cmp ebp, 3
jle 0x50bff0
lea r15d, [rbp - 2]
mov edx, r12d
mov ecx, r15d
mov dword [rsp + 0x2c], r15d
shl edx, cl
lea eax, [rdx - 1]
and eax, edi
sar edi, cl
mov r11d, edi
lea ecx, [rdi - 1]
mov r8d, edi
mov r10d, edi
not r11d
xor r8d, 1
mov r9d, edi
xor r10d, 3
and r11d, ecx
mov ecx, edi
sub r8d, 1
sub r10d, 1
xor ecx, 0xfffffffe
xor r9d, 2
shr r11d, 0x1f
and r8d, ecx
mov ecx, edi
xor edi, 0xfffffffc
sub r9d, 1
xor ecx, 0xfffffffd
and edi, r10d
shr r8d, 0x1f
neg r11
and r9d, ecx
shr edi, 0x1f
mov ecx, dword [rsp + 0x198]
neg r8
shr r9d, 0x1f
mov r10d, edi
neg r9
neg r10
test ecx, ecx
jle 0x50bfc3
movsxd rsi, esi
mov ecx, r15d
mov edi, 2
mov ebp, 3
shl rsi, 3
shl edi, cl
mov qword [rsp + 0x30], rsi
mov rsi, qword [rsp + 0x190]
shl ebp, cl
mov ecx, ebp
mov r15, qword [rsi]
mov esi, dword [rsp + 0x198]
lea r14, [r15 + 8]
sub esi, 1
lea rsi, [r14 + rsi*8]
mov qword [rsp + 0xb8], rsi
movsxd rsi, edx
shl rsi, 3
mov qword [rsp + 0x78], rsi
movsxd rsi, edi
shl rsi, 3
mov qword [rsp + 0x70], rsi
movsxd rsi, ebp
mov ebp, eax
shl rsi, 3
not ebp
mov qword [rsp + 0x60], rsi
lea esi, [rax - 1]
and esi, ebp
mov ebp, eax
shr esi, 0x1f
xor ebp, 0xfffffffe
neg rsi
mov qword [rsp + 0x58], rsi
lea esi, [rdx + 1]
shl rsi, 3
mov qword [rsp + 0x50], rsi
lea esi, [rdi + 1]
shl rsi, 3
mov qword [rsp + 0x48], rsi
lea esi, [rcx + 1]
shl rsi, 3
mov qword [rsp + 0x38], rsi
mov esi, eax
xor esi, 1
sub esi, 1
and esi, ebp
mov ebp, eax
shr esi, 0x1f
xor ebp, 0xfffffffd
neg rsi
mov qword [rsp + 0x80], rsi
lea esi, [rdx + 2]
shl rsi, 3
mov qword [rsp + 0x68], rsi
lea esi, [rdi + 2]
shl rsi, 3
mov qword [rsp + 0x40], rsi
lea esi, [rcx + 2]
shl rsi, 3
mov qword [rsp + 0x88], rsi
mov esi, eax
xor esi, 2
sub esi, 1
and esi, ebp
mov ebp, eax
shr esi, 0x1f
neg rsi
mov qword [rsp + 0x90], rsi
lea esi, [rdx + 3]
shl rsi, 3
mov qword [rsp + 0x98], rsi
lea esi, [rdi + 3]
shl rsi, 3
mov qword [rsp + 0xa0], rsi
lea esi, [rcx + 3]
shl rsi, 3
mov qword [rsp + 0xa8], rsi
mov esi, eax
xor esi, 3
sub esi, 1
xor ebp, 0xfffffffc
and esi, ebp
mov ebp, eax
shr esi, 0x1f
xor ebp, 0xfffffffb
neg rsi
mov qword [rsp + 0xb0], rsi
lea esi, [rdx + 4]
shl rsi, 3
mov qword [rsp + 0xc0], rsi
lea esi, [rdi + 4]
shl rsi, 3
mov qword [rsp + 0xc8], rsi
lea esi, [rcx + 4]
shl rsi, 3
mov qword [rsp + 0xd0], rsi
mov esi, eax
xor esi, 4
sub esi, 1
and esi, ebp
mov ebp, eax
shr esi, 0x1f
xor ebp, 0xfffffffa
neg rsi
mov qword [rsp + 0xd8], rsi
lea esi, [rdx + 5]
shl rsi, 3
mov qword [rsp + 0xe0], rsi
lea esi, [rdi + 5]
shl rsi, 3
mov qword [rsp + 0xe8], rsi
lea esi, [rcx + 5]
shl rsi, 3
mov qword [rsp + 0xf0], rsi
mov esi, eax
xor esi, 5
sub esi, 1
and esi, ebp
mov ebp, eax
shr esi, 0x1f
xor ebp, 0xfffffff9
neg rsi
mov qword [rsp + 0xf8], rsi
lea esi, [rdx + 6]
shl rsi, 3
mov qword [rsp + 0x100], rsi
lea esi, [rdi + 6]
shl rsi, 3
mov qword [rsp + 0x108], rsi
lea esi, [rcx + 6]
shl rsi, 3
mov qword [rsp + 0x110], rsi
mov esi, eax
xor esi, 6
sub esi, 1
and esi, ebp
shr esi, 0x1f
neg rsi
add edx, 7
shl rdx, 3
mov qword [rsp + 0x118], rsi
mov qword [rsp + 0x120], rdx
lea edx, [rdi + 7]
lea rdi, [rdx*8]
lea edx, [rcx + 7]
lea rcx, [rdx*8]
mov edx, eax
xor eax, 0xfffffff8
mov qword [rsp + 0x128], rdi
xor edx, 7
mov qword [rsp + 0x130], rcx
sub edx, 1
and eax, edx
shr eax, 0x1f
neg rax
mov qword [rsp + 0x138], rax
jmp 0x50bd24
add r14, 8
mov rdi, qword [rsp + 0x78]
mov rax, qword [rbx]
lea rdx, [rdi + rbx]
mov rdi, qword [rsp + 0x70]
and rax, r11
mov rsi, qword [rdx]
lea rdx, [rdi + rbx]
mov rdi, qword [rsp + 0x60]
mov r13, qword [rdx]
and rsi, r8
lea rdx, [rdi + rbx]
mov rdi, qword [rsp + 0x50]
mov r12, qword [rdx]
mov rcx, qword [rbx + 8]
and r13, r9
lea rdx, [rdi + rbx]
mov rdi, qword [rsp + 0x48]
or rsi, r13
mov rbp, qword [rdx]
and rcx, r11
or rsi, rax
mov rax, qword [rsp + 0x68]
lea rdx, [rdi + rbx]
mov rdi, qword [rsp + 0x38]
and r12, r10
mov rdx, qword [rdx]
and rbp, r8
add rax, rbx
or rsi, r12
add rdi, rbx
or rbp, rcx
and rsi, qword [rsp + 0x58]
mov rdi, qword [rdi]
and rdx, r9
mov rcx, qword [rbx + 0x10]
or rbp, rdx
mov rax, qword [rax]
and rdi, r10
and rcx, r11
or rbp, rdi
mov rdi, qword [rsp + 0x40]
and rbp, qword [rsp + 0x80]
and rax, r8
mov r12, rbp
or rcx, rax
mov rax, qword [rsp + 0x90]
lea rdx, [rdi + rbx]
mov rdi, qword [rsp + 0x88]
or r12, rsi
mov rdx, qword [rdx]
lea rsi, [rdi + rbx]
mov rdi, qword [rsi]
and rdx, r9
or rcx, rdx
and rdi, r10
or rcx, rdi
mov rdi, qword [rsp + 0x98]
and rax, rcx
lea rdx, [rbx + rdi]
mov rdi, qword [rsp + 0xa0]
or rax, r12
mov rsi, rax
mov rax, qword [rbx + 0x18]
mov rcx, qword [rdx]
lea rdx, [rbx + rdi]
mov rdi, qword [rsp + 0xa8]
mov rdx, qword [rdx]
and rax, r11
and rcx, r8
add rdi, rbx
or rcx, rax
mov rax, qword [rsp + 0xb0]
mov rdi, qword [rdi]
and rdx, r9
mov ebp, dword [rsp + 0x2c]
or rcx, rdx
and rdi, r10
or rcx, rdi
and rax, rcx
or rax, rsi
cmp ebp, 2
je 0x50bfaa
mov rsi, qword [rsp + 0xc0]
mov rdi, qword [rsp + 0xc8]
mov rcx, qword [rbx + 0x20]
lea rdx, [rbx + rsi]
mov rsi, qword [rdx]
lea rdx, [rbx + rdi]
mov rdi, qword [rsp + 0xd0]
and rcx, r11
mov rdx, qword [rdx]
add rdi, rbx
and rsi, r8
mov rdi, qword [rdi]
or rsi, rcx
and rdx, r9
mov rcx, qword [rbx + 0x28]
or rsi, rdx
and rdi, r10
and rcx, r11
or rsi, rdi
and rsi, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0xe8]
or rax, rsi
mov rsi, qword [rsp + 0xe0]
lea rdx, [rbx + rsi]
mov rsi, qword [rdx]
lea rdx, [rbx + rdi]
mov rdi, qword [rsp + 0xf0]
mov rdx, qword [rdx]
add rdi, rbx
and rsi, r8
mov rdi, qword [rdi]
or rsi, rcx
and rdx, r9
or rsi, rdx
and rdi, r10
or rsi, rdi
and rsi, qword [rsp + 0xf8]
mov rdi, qword [rsp + 0x108]
mov rcx, rsi
mov rsi, qword [rsp + 0x100]
or rcx, rax
mov rax, qword [rbx + 0x30]
lea rdx, [rbx + rsi]
mov rsi, qword [rdx]
lea rdx, [rbx + rdi]
mov rdi, qword [rsp + 0x110]
and rax, r11
mov rdx, qword [rdx]
add rdi, rbx
and rsi, r8
mov rdi, qword [rdi]
or rsi, rax
and rdx, r9
mov rax, qword [rsp + 0x118]
or rsi, rdx
and rdi, r10
or rsi, rdi
and rax, rsi
or rax, rcx
cmp ebp, 3
jne 0x50bfaa
mov rcx, qword [rsp + 0x120]
mov rsi, qword [rsp + 0x128]
mov rdi, qword [rbx + 0x38]
lea rdx, [rcx + rbx]
mov rcx, qword [rdx]
lea rdx, [rsi + rbx]
mov rsi, qword [rsp + 0x130]
and rdi, r11
mov rdx, qword [rdx]
add rsi, rbx
and rcx, r8
mov rsi, qword [rsi]
or rcx, rdi
and rdx, r9
or rcx, rdx
and rsi, r10
or rcx, rsi
and rcx, qword [rsp + 0x138]
or rax, rcx
mov qword [r15], rax
add rbx, qword [rsp + 0x30]
mov r15, r14
cmp r14, qword [rsp + 0xb8]
jne 0x50bd20
mov rax, qword [rsp + 0x190]
mov ebx, dword [rsp + 0x198]
mov dword [rax + 8], ebx
mov eax, 1
add rsp, 0x148
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, dword [rsp + 0x198]
test r8d, r8d
jle 0x50bfc3
mov rax, qword [rsp + 0x190]
movsxd r11, esi
shl r11, 3
mov r10, qword [rax]
mov eax, dword [rsp + 0x198]
lea r9, [r10 + 8]
sub eax, 1
lea rbp, [r9 + rax*8]
nop dword [rax]
mov rcx, rbx
xor r8d, r8d
xor edx, edx
mov r13d, edx
mov r12, qword [rcx]
add edx, 1
add rcx, 8
xor r13d, edi
lea eax, [r13 - 1]
not r13d
and eax, r13d
shr eax, 0x1f
neg rax
and rax, r12
or r8, rax
cmp esi, edx
jne 0x50c030
mov qword [r10], r8
add rbx, r11
mov r10, r9
cmp r9, rbp
je 0x50bfc3
add r9, 8
jmp 0x50c028
xor eax, eax
jmp 0x50bfda