Function at 0x6f61a050
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x3d8
lea rbp, [rsp + 0x80]
mov eax, dword [rbp + 0x3c8]
mov qword [rbp + 0x3a0], rcx
mov qword [rbp + 0x3a8], rdx
mov edx, 1
mov r13, r8
mov ebx, r9d
mov byte [rbp - 0x21], r9b
lea ecx, [rax - 2]
shl edx, cl
movsxd rsi, edx
add rsi, 0xf
and rsi, 0xfffffffffffffff0
mov rax, rsi
call fcn.6f6380d0
sub rsp, rax
mov rax, rsi
lea rdi, [rsp + 0x30]
mov qword [rbp - 0x38], rdi
call fcn.6f6380d0
sub rsp, rax
mov rcx, r13
lea r8, [rsp + 0x30]
mov qword [rbp - 0x40], r8
call sym.bn_bits
mov r9, qword [rbp + 0x3a8]
cmp eax, dword [r9]
jge 0x6f61a49f
lea rdi, [rbp + 0x110]
lea r12, [rbp + 0x230]
lea rsi, [rbp - 0x10]
mov edx, 0x22
movsx r14d, bl
mov r15d, 1
mov rcx, rdi
xor ebx, ebx
call sym.bn_init
mov edx, 0x22
mov rcx, r12
call sym.bn_init
mov edx, 0x22
mov rcx, rsi
call sym.bn_init
mov r10d, dword [rbp + 0x3c8]
mov r8, qword [rbp - 0x40]
lea rcx, [rbp - 0x11]
mov rdx, qword [rbp - 0x38]
mov r9d, r14d
mov dword [rsp + 0x20], r10d
call sym.bn_rec_tnaf_get
mov rdx, r13
mov rcx, rsi
mov r13d, 1
call sym.bn_abs
mov r11d, dword [rbp + 0x3c0]
mov rdx, r12
mov rcx, rdi
mov r9d, r14d
mov r8, rsi
mov dword [rsp + 0x20], r11d
call sym.bn_rec_tnaf_mod
movzx ecx, byte [rbp + 0x3c8]
shl r13d, cl
shl r15, cl
mov edx, r13d
mov dword [rbp - 0x4c], r13d
shr r13d, 0x1f
add r13d, edx
sub r15, 1
movsxd rax, edx
sar r13d, 1
mov qword [rbp - 0x30], r15
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x28], r13d
mov rcx, rdi
call sym.bn_is_zero
test eax, eax
je 0x6f61a1be
mov rcx, r12
call sym.bn_is_zero
test eax, eax
jne 0x6f61a480
mov r15, qword [rbp + 0x120]
movsxd r13, ebx
test r15b, 1
jne 0x6f61a23c
add ebx, 1
cmp byte [rbp - 0x21], 0xff
movsxd r14, ebx
mov rbx, qword [rbp + 0x3a0]
lea rbx, [rbx - 1]
je 0x6f61a340
nop dword [rax]
mov byte [rbx + r14], 0
mov rdx, rdi
mov rcx, rsi
call sym.bn_hlv
mov r8, rsi
mov rdx, r12
mov rcx, rdi
call sym.bn_add
mov rdx, rsi
mov rcx, r12
movsxd r13, r14d
call sym.bn_copy
mov r9d, dword [rbp - 8]
mov r15, qword [rbp + 0x120]
add r14, 1
xor r9d, 1
test r15b, 1
mov dword [rbp + 0x238], r9d
je 0x6f61a1f0
cmp dword [rbp + 0x3c8], 2
mov rcx, rdi
je 0x6f61a391
call sym.bn_sign
mov r14, qword [rbp - 0x48]
mov rcx, r12
mov rbx, r14
sub rbx, r15
cmp eax, 1
cmovne rbx, r15
mov r15, qword [rbp + 0x240]
call sym.bn_sign
movzx r10d, byte [rbp - 0x11]
movsxd r11, r13d
sub r14, r15
cmp eax, 1
cmovne r14, r15
add r11, qword [rbp + 0x3a0]
imul r10d, r14d
add r10d, ebx
and r10d, dword [rbp - 0x30]
lea ebx, [r13 + 1]
cmp dword [rbp - 0x28], r10d
jg 0x6f61a410
sub r10b, byte [rbp - 0x4c]
mov r9, qword [rbp - 0x38]
mov r15, qword [rbp - 0x40]
movsx eax, r10b
mov byte [r11], r10b
neg eax
sar eax, 1
cdqe
movsx r8d, byte [r9 + rax]
movsx r13d, byte [r15 + rax]
neg r8d
neg r13d
test r8d, r8d
jle 0x6f61a435
movsxd r8, r8d
mov rdx, rdi
mov rcx, rdi
call sym.bn_sub_dig
test r13d, r13d
jle 0x6f61a44f
movsxd r8, r13d
mov rdx, r12
mov rcx, r12
call sym.bn_sub_dig
mov rdx, rdi
mov rcx, rsi
call sym.bn_hlv
cmp byte [rbp - 0x21], 0xff
mov r8, rsi
mov rdx, r12
mov rcx, rdi
je 0x6f61a400
call sym.bn_add
mov rdx, rsi
mov rcx, r12
call sym.bn_copy
mov r8d, dword [rbp - 8]
xor r8d, 1
mov dword [rbp + 0x238], r8d
jmp 0x6f61a1a2
mov byte [rbx + r14], 0
mov rdx, rdi
mov rcx, rsi
call sym.bn_hlv
mov r8, rsi
mov rdx, r12
mov rcx, rdi
call sym.bn_sub
mov rdx, rsi
mov rcx, r12
movsxd r13, r14d
call sym.bn_copy
mov r8d, dword [rbp - 8]
mov r15, qword [rbp + 0x120]
add r14, 1
xor r8d, 1
test r15b, 1
mov dword [rbp + 0x238], r8d
je 0x6f61a340
jmp 0x6f61a23c
call sym.bn_sign
mov r14d, 4
mov rbx, qword [rbp + 0x240]
mov rcx, r12
sub r14, r15
cmp eax, 1
cmovne r14, r15
call sym.bn_sign
mov r10d, 4
mov r11, rbx
mov edx, 2
sub r10, rbx
cmp eax, 1
mov rcx, qword [rbp + 0x3a0]
cmove r11, r10
lea ebx, [r13 + 1]
add r11d, r11d
sub r14d, r11d
and r14d, dword [rbp - 0x30]
sub edx, r14d
test edx, edx
mov byte [rcx + r13], dl
js 0x6f61a465
movsxd r8, edx
mov rcx, rdi
mov rdx, rdi
call sym.bn_sub_dig
jmp 0x6f61a2fa
call sym.bn_sub
jmp 0x6f61a31d
mov rcx, qword [rbp - 0x38]
mov byte [r11], r10b
sar r10d, 1
movsx rdx, r10b
mov rax, qword [rbp - 0x40]
movsx r8d, byte [rcx + rdx]
movsx r13d, byte [rax + rdx]
test r8d, r8d
jg 0x6f61a2d5
neg r8d
mov rdx, rdi
mov rcx, rdi
movsxd r8, r8d
call sym.bn_add_dig
test r13d, r13d
jg 0x6f61a2ec
neg r13d
mov rdx, r12
mov rcx, r12
movsxd r8, r13d
call sym.bn_add_dig
jmp 0x6f61a2fa
neg edx
mov rcx, rdi
movsxd r8, edx
mov rdx, rdi
call sym.bn_add_dig
jmp 0x6f61a2fa
mov r12, qword [rbp + 0x3a8]
mov dword [r12], ebx
lea rsp, [rbp + 0x358]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call sym.core_get
lea rdx, [0x6f74db36]
lea rcx, [0x6f74db45]
mov dword [rax], 1
mov r8d, 0x1a8
call sym.util_printf
jmp 0x6f61a0de