Function at 0x617440
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
mov esi, dword [rsp + 0x110]
mov rdi, rcx
mov ebx, edx
mov r12, r8
mov ebp, r9d
test edx, edx
jle 0x6178a1
test r9d, r9d
jle 0x6178a1
cmp r9d, esi
jg 0x6178a8
cmp esi, 0xa
jle 0x6178a8
movsxd rax, esi
mov r8d, 0x4e
lea rdx, str.crypto_rsa_rsa_ssl.c
mov rcx, rax
mov qword [rsp + 0x30], rax
call sym.CRYPTO_malloc
test rax, rax
je 0x6178d3
mov rcx, qword [rsp + 0x30]
movsxd r8, ebp
add r8, r12
lea r9, [rax + rcx]
mov rcx, r9
mov edx, ebp
lea eax, [rbp - 1]
sub rcx, 1
not edx
and edx, eax
sar edx, 0x1f
mov eax, edx
add edx, 1
sub r8, rdx
sub ebp, edx
mov edx, r9d
not eax
sub edx, ecx
and al, byte [r8]
mov byte [rcx], al
cmp esi, edx
jg 0x6174c0
lea r12d, [rsi - 1]
test esi, esi
mov rdx, 0xffffffffffffffff
movzx eax, al
not r12
mov r10d, 2
mov ecx, 0xffffffff
cmovle r12, rdx
xor r8d, r8d
xor ebp, ebp
add r12, r9
movzx edx, byte [r12 + 1]
xor edx, 2
movzx edx, dl
mov r11d, edx
sub edx, 1
not r11d
and edx, r11d
mov r11d, eax
sub eax, 1
not r11d
and eax, r11d
and eax, edx
mov r11d, eax
sar r11d, 0x1f
mov dword [rsp + 0x58], r11d
mov eax, dword [rsp + 0x58]
mov eax, r11d
not eax
mov dword [rsp + 0x5c], eax
mov r9d, dword [rsp + 0x5c]
xor eax, eax
nop word [rax + rax]
movzx r14d, byte [r12 + r10]
mov r13d, r14d
mov edx, r14d
sub r14d, 1
not r13d
xor edx, 3
and r14d, r13d
movzx edx, dl
sar r14d, 0x1f
and ecx, r14d
mov r13d, r14d
mov dword [rsp + 0x60], ecx
not ecx
mov r14d, dword [rsp + 0x60]
or ebp, r13d
mov dword [rsp + 0x64], ecx
mov ecx, dword [rsp + 0x64]
and r14d, r10d
add r10, 1
and r8d, ecx
mov ecx, ebp
not ecx
or r8d, r14d
mov r13d, ecx
and r13d, 1
add r13d, eax
mov eax, edx
sub edx, 1
not eax
and eax, edx
sar eax, 0x1f
or eax, ebp
and eax, r13d
cmp esi, r10d
jg 0x617560
lea ecx, [r8 - 0xa]
lea r15d, [rsi - 0xb]
mov r14d, 1
mov edx, ecx
mov dword [rsp + 0x48], ecx
mov ecx, r8d
xor ecx, 0xa
xor edx, 0xa
or edx, ecx
lea ecx, [rax - 8]
xor edx, r8d
xor ecx, 8
add r8d, 1
sar edx, 0x1f
mov ebp, edx
not ebp
and ebp, r11d
and r11d, edx
mov edx, r11d
not edx
mov dword [rsp + 0x80], edx
mov r10d, dword [rsp + 0x80]
mov dword [rsp + 0x84], r11d
mov r11d, eax
mov edx, dword [rsp + 0x84]
xor r11d, 8
and r9d, r10d
or ecx, r11d
and r9d, 0x6b
and edx, 0x71
xor eax, ecx
mov ecx, ebp
not ebp
or edx, r9d
sar eax, 0x1f
and ecx, eax
or eax, ebp
mov ebp, esi
sub ebp, r8d
mov r8d, ebx
mov dword [rsp + 0x78], eax
not eax
sub r8d, ebp
mov r13d, ebp
mov r11d, dword [rsp + 0x78]
mov dword [rsp + 0x7c], eax
xor r13d, ebx
xor r8d, ebp
mov eax, dword [rsp + 0x7c]
or r8d, r13d
and r11d, edx
mov edx, ebx
xor r8d, ebx
and eax, 0x73
sar r8d, 0x1f
or eax, r11d
mov r13d, r8d
not r13d
and r13d, ecx
and ecx, r8d
mov r8d, ecx
mov dword [rsp + 0x3c], r13d
not r8d
mov dword [rsp + 0x70], r8d
mov r8d, dword [rsp + 0x70]
mov dword [rsp + 0x74], ecx
mov ecx, dword [rsp + 0x74]
and eax, r8d
and ecx, 0x6d
xor edx, r15d
or eax, ecx
mov dword [rsp + 0x44], eax
mov eax, r15d
sub eax, ebx
xor eax, ebx
or eax, edx
xor eax, r15d
sar eax, 0x1f
mov dword [rsp + 0x68], eax
not eax
mov edx, dword [rsp + 0x68]
mov dword [rsp + 0x6c], eax
mov ecx, dword [rsp + 0x6c]
mov eax, edx
and eax, r15d
and ebx, ecx
or eax, ebx
mov dword [rsp + 0x40], eax
lea rax, [r12 + 0xc]
cmp r15d, 1
jle 0x6177a4
mov qword [rsp + 0xf0], rdi
mov r13, rax
mov dword [rsp + 0x4c], ebp
mov ebp, dword [rsp + 0x48]
mov eax, r14d
mov edx, esi
and eax, ebp
sub edx, r14d
mov r10d, eax
sub eax, 1
not r10d
and r10d, eax
sar r10d, 0x1f
mov r11d, r10d
not r11d
cmp edx, 0xb
jle 0x61778c
lea ebx, [rdx - 0xc]
movzx r11d, r11b
lea rax, [r12 + 0xb]
movsxd rdi, r14d
or r10d, 0xffffff00
add rbx, r13
nop
mov dword [rsp + 0x88], r11d
movzx ecx, byte [rax]
add rax, 1
mov r9d, dword [rsp + 0x88]
movzx edx, byte [rax + rdi - 1]
mov dword [rsp + 0x8c], r10d
mov r8d, dword [rsp + 0x8c]
and edx, r9d
and ecx, r8d
or edx, ecx
mov byte [rax - 1], dl
cmp rbx, rax
jne 0x617750
add r14d, r14d
cmp r15d, r14d
jg 0x617710
mov ebp, dword [rsp + 0x4c]
mov rdi, qword [rsp + 0xf0]
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x61781e
mov eax, dword [rsp + 0x40]
mov ecx, ebp
mov r9d, dword [rsp + 0x3c]
xor edx, edx
neg ecx
lea r8d, [rax - 1]
nop
mov eax, ebp
mov r10d, ebp
movzx r11d, byte [rdi + rdx]
xor r10d, ecx
xor eax, edx
add ecx, 1
or eax, r10d
movzx r10d, byte [r12 + rdx + 0xb]
xor eax, edx
sar eax, 0x1f
and eax, r9d
movzx eax, al
mov dword [rsp + 0x90], eax
not eax
mov esi, dword [rsp + 0x90]
mov dword [rsp + 0x94], eax
mov ebx, dword [rsp + 0x94]
mov eax, r10d
and eax, esi
and r11d, ebx
or eax, r11d
mov byte [rdi + rdx], al
mov rax, rdx
add rdx, 1
cmp r8, rax
jne 0x6177c0
mov rdx, qword [rsp + 0x30]
mov r9d, 0xab
lea r8, str.crypto_rsa_rsa_ssl.c
mov rcx, r12
call sym.CRYPTO_clear_free
mov r8d, dword [rsp + 0x44]
mov dword [rsp + 0x20], 0xac
mov edx, 0x72
lea r9, str.crypto_rsa_rsa_ssl.c
mov ecx, 4
call sym.ERR_put_error
mov esi, dword [rsp + 0x3c]
mov ecx, esi
and ecx, 1
call sym.err_clear_last_constant_time
mov dword [rsp + 0x98], esi
not esi
mov eax, dword [rsp + 0x98]
mov dword [rsp + 0x9c], esi
mov edx, dword [rsp + 0x9c]
and ebp, eax
mov eax, ebp
or eax, edx
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 0xffffffff
jmp 0x61788d
mov r8d, 0x6f
mov edx, 0x72
mov ecx, 4
mov dword [rsp + 0x20], 0x4a
lea r9, str.crypto_rsa_rsa_ssl.c
call sym.ERR_put_error
mov eax, 0xffffffff
jmp 0x61788d
mov r8d, 0x41
mov edx, 0x72
mov ecx, 4
mov dword [rsp + 0x20], 0x50
lea r9, str.crypto_rsa_rsa_ssl.c
call sym.ERR_put_error
mov eax, 0xffffffff
jmp 0x61788d