Function at 0x5f37a0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x178
mov rsi, qword [rsp + 0x1e0]
mov rbp, qword [rsp + 0x1e8]
mov r12, rcx
mov r13, rdx
mov rcx, r8
mov edx, 4
mov rbx, r8
mov rdi, r9
call fcn.004fb3a0
test eax, eax
jne 0x5f37f1
mov edx, 4
mov rcx, r13
call fcn.004fb3a0
test eax, eax
je 0x5f3825
mov r9, rdi
mov r8, rbx
mov rdx, r13
mov rcx, r12
mov qword [rsp + 0x1e8], rbp
mov qword [rsp + 0x1e0], rsi
add rsp, 0x178
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.005f2610
mov edx, 4
mov rcx, rdi
call fcn.004fb3a0
test eax, eax
jne 0x5f37f1
mov rcx, rdi
call fcn.004fb270
test eax, eax
je 0x5f3a62
mov rcx, rbx
call fcn.004f9ad0
mov r15d, eax
test eax, eax
je 0x5f3b10
mov rcx, rsi
call fcn.005f0f80
mov rcx, rsi
call fcn.005f1150
mov rcx, rsi
mov qword [rsp + 0x40], rax
call fcn.005f1150
mov rcx, rsi
mov qword [rsp + 0x48], rax
call fcn.005f1150
mov r14, rax
mov qword [rsp + 0x70], rax
test rax, rax
je 0x5f3b55
mov qword [rsp + 0x38], rbp
test rbp, rbp
je 0x5f3aba
mov eax, dword [r13 + 0x10]
test eax, eax
je 0x5f3aa2
mov rdx, r13
mov r9, rsi
mov r8, rdi
mov rcx, r14
call fcn.005f63f0
mov r13, r14
test eax, eax
je 0x5f3a54
mov r8, qword [rsp + 0x38]
mov r9, rsi
mov rdx, r13
mov rcx, r14
call fcn.004fbca0
test eax, eax
je 0x5f3a54
cmp r15d, 0x29f
jg 0x5f3b7a
cmp r15d, 0xef
jg 0x5f3b65
cmp r15d, 0x4f
jg 0x5f3b96
cmp r15d, 0x17
jle 0x5f3d47
mov dword [rsp + 0x50], 4
mov dword [rsp + 0x5c], 3
mov qword [rsp + 0x20], rsi
mov r9, qword [rsp + 0x38]
mov r8, r14
mov rdx, r14
mov rcx, qword [rsp + 0x40]
call fcn.004fba60
test eax, eax
je 0x5f3a54
mov dword [rsp + 0x60], r15d
mov r15d, dword [rsp + 0x50]
lea r13, [rsp + 0x70]
mov r14d, 1
mov qword [rsp + 0x50], r12
mov r12, qword [rsp + 0x38]
mov qword [rsp + 0x68], rbx
mov rbx, qword [rsp + 0x40]
nop
mov rcx, rsi
call fcn.005f1150
mov qword [r13 + 8], rax
test rax, rax
je 0x5f3b8f
mov qword [rsp + 0x20], rsi
mov rdx, qword [r13]
mov r9, r12
mov r8, rbx
mov rcx, rax
call fcn.004fba60
test eax, eax
je 0x5f3a54
add r14d, 1
add r13, 8
cmp r14d, r15d
jl 0x5f3970
mov r15d, dword [rsp + 0x60]
mov r12, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x68]
movsxd rdx, dword [rdi + 8]
mov rax, qword [rdi]
cmp qword [rax + rdx*8 - 8], 0
mov r13, rdx
js 0x5f3bb2
call fcn.004f99f0
mov r8, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
mov r9, rsi
mov rdx, rax
call fcn.004fbca0
test eax, eax
je 0x5f3a54
mov qword [rsp + 0x50], r12
sub r15d, 1
mov r13d, 1
mov qword [rsp + 0x40], rbp
mov edx, r15d
mov rcx, rbx
call fcn.004fad40
test eax, eax
jne 0x5f3c71
test r13d, r13d
je 0x5f3d12
test r15d, r15d
jne 0x5f3d3e
mov r12, qword [rsp + 0x50]
mov r8, qword [rsp + 0x38]
mov r9, rsi
mov rdx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x40]
mov rcx, r12
call fcn.004fbbc0
test eax, eax
setne al
movzx eax, al
test rbp, rbp
jne 0x5f3af5
jmp 0x5f3ae3
lea r9, str.crypto_bn_bn_exp.c
mov r8d, 0x66
mov edx, 0x6d
mov dword [rsp + 0x20], 0x13e
mov ecx, 3
mov dword [rsp + 0x38], eax
call fcn.005292e0
mov eax, dword [rsp + 0x38]
add rsp, 0x178
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, rdi
mov rcx, r13
call fcn.004fab00
test eax, eax
jns 0x5f38ae
jmp 0x5f38ca
call fcn.004fbdf0
mov qword [rsp + 0x38], rax
mov rcx, rax
test rax, rax
je 0x5f3bab
mov r8, rsi
mov rdx, rdi
call fcn.004fbf10
test eax, eax
jne 0x5f38a2
mov rcx, qword [rsp + 0x38]
mov dword [rsp + 0x40], eax
call fcn.004fbec0
mov eax, dword [rsp + 0x40]
mov rcx, rsi
mov dword [rsp + 0x38], eax
call fcn.005f10a0
mov eax, dword [rsp + 0x38]
jmp 0x5f3a8e
mov edx, 1
mov rcx, rdi
call fcn.004fb1c0
test eax, eax
je 0x5f3b35
xor edx, edx
mov rcx, r12
call fcn.004fa1d0
mov eax, 1
jmp 0x5f3a8e
mov edx, 1
mov rcx, r12
add rsp, 0x178
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.004fa1d0
mov qword [rsp + 0x38], 0
xor eax, eax
jmp 0x5f3a54
mov dword [rsp + 0x50], 0x10
mov dword [rsp + 0x5c], 5
jmp 0x5f3923
mov dword [rsp + 0x50], 0x20
mov dword [rsp + 0x5c], 6
jmp 0x5f3923
xor eax, eax
jmp 0x5f3a54
mov dword [rsp + 0x50], 8
mov dword [rsp + 0x5c], 4
jmp 0x5f3923
xor eax, eax
jmp 0x5f3ae3
mov r14, qword [rsp + 0x48]
mov rcx, r14
call fcn.004fb3e0
test rax, rax
je 0x5f3b8f
mov rdx, qword [rdi]
mov rcx, qword [r14]
mov rax, qword [rdx]
neg rax
mov qword [rcx], rax
cmp r13d, 1
jle 0x5f3c63
lea r9, [rdx + 8]
lea r8, [rcx + 0x18]
cmp r9, r8
lea r10, [rcx + 8]
lea r8, [rdx + 0x18]
setae r9b
cmp r10, r8
lea eax, [r13 - 2]
setae r8b
or r9b, r8b
je 0x5f3d9a
cmp eax, 3
jbe 0x5f3d9a
lea r9d, [r13 - 1]
mov eax, 8
pcmpeqd xmm1, xmm1
mov r8d, r9d
shr r8d, 1
shl r8, 4
add r8, 8
nop dword [rax]
movdqu xmm0, xmmword [rdx + rax]
pxor xmm0, xmm1
movups xmmword [rcx + rax], xmm0
add rax, 0x10
cmp rax, r8
jne 0x5f3c30
mov r8d, r9d
and r8d, 0xfffffffe
lea eax, [r8 + 1]
cmp r8d, r9d
je 0x5f3c63
cdqe
mov rdx, qword [rdx + rax*8]
not rdx
mov qword [rcx + rax*8], rdx
mov rax, qword [rsp + 0x48]
mov dword [rax + 8], r13d
jmp 0x5f39f4
mov eax, dword [rsp + 0x5c]
cmp eax, 1
je 0x5f3dc8
test r15d, r15d
jle 0x5f3dbc
mov qword [rsp + 0x60], rsi
lea r14d, [r15 + 1]
xor edi, edi
mov ebp, 1
mov r12d, 1
mov esi, r12d
mov r12d, eax
jmp 0x5f3caa
cmp esi, r14d
je 0x5f3cce
mov edx, r15d
mov rcx, rbx
sub edx, esi
call fcn.004fad40
test eax, eax
je 0x5f3cc6
mov ecx, esi
sub ecx, edi
mov edi, esi
shl ebp, cl
or ebp, 1
add esi, 1
cmp esi, r12d
jne 0x5f3ca5
mov rsi, qword [rsp + 0x60]
test r13d, r13d
je 0x5f3d54
mov eax, ebp
mov qword [rsp + 0x20], rsi
mov rcx, qword [rsp + 0x48]
sar eax, 1
mov r9, qword [rsp + 0x38]
cdqe
mov rdx, rcx
mov r8, qword [rsp + rax*8 + 0x70]
call fcn.004fba60
test eax, eax
je 0x5f3d34
add edi, 1
sub r15d, edi
js 0x5f3a2d
xor r13d, r13d
jmp 0x5f3a08
mov rcx, qword [rsp + 0x48]
mov r9, qword [rsp + 0x38]
mov qword [rsp + 0x20], rsi
mov r8, rcx
mov rdx, rcx
call fcn.004fba60
test eax, eax
jne 0x5f3a24
mov rbp, qword [rsp + 0x40]
jmp 0x5f3a54
sub r15d, 1
jmp 0x5f3a08
mov dword [rsp + 0x5c], 1
jmp 0x5f39c0
lea r14d, [rdi + 1]
mov dword [rsp + 0x60], edi
mov r12, qword [rsp + 0x48]
mov edi, r13d
mov r13, rbx
mov rbx, qword [rsp + 0x38]
mov qword [rsp + 0x20], rsi
mov r9, rbx
mov r8, r12
mov rdx, r12
mov rcx, r12
call fcn.004fba60
test eax, eax
je 0x5f3d34
add edi, 1
cmp r14d, edi
jne 0x5f3d6c
mov edi, dword [rsp + 0x60]
mov rbx, r13
jmp 0x5f3cd8
lea r9, [rax + 2]
mov eax, 1
mov r8, qword [rdx + rax*8]
not r8
mov qword [rcx + rax*8], r8
add rax, 1
cmp rax, r9
jne 0x5f3da3
jmp 0x5f3c63
xor edi, edi
mov ebp, 1
jmp 0x5f3cd3
mov ebp, 1
xor edi, edi
jmp 0x5f3cd3