Function at 0x5f34a0
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.004fafe0
test eax, eax
jne 0x5f34f1
mov edx, 4
mov rcx, r13
call fcn.004fafe0
test eax, eax
je 0x5f3525
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.005f2310
mov edx, 4
mov rcx, rdi
call fcn.004fafe0
test eax, eax
jne 0x5f34f1
mov rcx, rdi
call fcn.004faeb0
test eax, eax
je 0x5f3762
mov rcx, rbx
call fcn.004f9710
mov r15d, eax
test eax, eax
je 0x5f3810
mov rcx, rsi
call fcn.005f0c80
mov rcx, rsi
call fcn.005f0e50
mov rcx, rsi
mov qword [rsp + 0x40], rax
call fcn.005f0e50
mov rcx, rsi
mov qword [rsp + 0x48], rax
call fcn.005f0e50
mov r14, rax
mov qword [rsp + 0x70], rax
test rax, rax
je 0x5f3855
mov qword [rsp + 0x38], rbp
test rbp, rbp
je 0x5f37ba
mov eax, dword [r13 + 0x10]
test eax, eax
je 0x5f37a2
mov rdx, r13
mov r9, rsi
mov r8, rdi
mov rcx, r14
call fcn.005f60f0
mov r13, r14
test eax, eax
je 0x5f3754
mov r8, qword [rsp + 0x38]
mov r9, rsi
mov rdx, r13
mov rcx, r14
call fcn.004fb8e0
test eax, eax
je 0x5f3754
cmp r15d, 0x29f
jg 0x5f387a
cmp r15d, 0xef
jg 0x5f3865
cmp r15d, 0x4f
jg 0x5f3896
cmp r15d, 0x17
jle 0x5f3a47
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.004fb6a0
test eax, eax
je 0x5f3754
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.005f0e50
mov qword [r13 + 8], rax
test rax, rax
je 0x5f388f
mov qword [rsp + 0x20], rsi
mov rdx, qword [r13]
mov r9, r12
mov r8, rbx
mov rcx, rax
call fcn.004fb6a0
test eax, eax
je 0x5f3754
add r14d, 1
add r13, 8
cmp r14d, r15d
jl 0x5f3670
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 0x5f38b2
call fcn.004f9630
mov r8, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
mov r9, rsi
mov rdx, rax
call fcn.004fb8e0
test eax, eax
je 0x5f3754
mov qword [rsp + 0x50], r12
sub r15d, 1
mov r13d, 1
mov qword [rsp + 0x40], rbp
mov edx, r15d
mov rcx, rbx
call fcn.004fa980
test eax, eax
jne 0x5f3971
test r13d, r13d
je 0x5f3a12
test r15d, r15d
jne 0x5f3a3e
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.004fb800
test eax, eax
setne al
movzx eax, al
test rbp, rbp
jne 0x5f37f5
jmp 0x5f37e3
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.00528f20
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.004fa740
test eax, eax
jns 0x5f35ae
jmp 0x5f35ca
call fcn.004fba30
mov qword [rsp + 0x38], rax
mov rcx, rax
test rax, rax
je 0x5f38ab
mov r8, rsi
mov rdx, rdi
call fcn.004fbb50
test eax, eax
jne 0x5f35a2
mov rcx, qword [rsp + 0x38]
mov dword [rsp + 0x40], eax
call fcn.004fbb00
mov eax, dword [rsp + 0x40]
mov rcx, rsi
mov dword [rsp + 0x38], eax
call fcn.005f0da0
mov eax, dword [rsp + 0x38]
jmp 0x5f378e
mov edx, 1
mov rcx, rdi
call fcn.004fae00
test eax, eax
je 0x5f3835
xor edx, edx
mov rcx, r12
call fcn.004f9e10
mov eax, 1
jmp 0x5f378e
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.004f9e10
mov qword [rsp + 0x38], 0
xor eax, eax
jmp 0x5f3754
mov dword [rsp + 0x50], 0x10
mov dword [rsp + 0x5c], 5
jmp 0x5f3623
mov dword [rsp + 0x50], 0x20
mov dword [rsp + 0x5c], 6
jmp 0x5f3623
xor eax, eax
jmp 0x5f3754
mov dword [rsp + 0x50], 8
mov dword [rsp + 0x5c], 4
jmp 0x5f3623
xor eax, eax
jmp 0x5f37e3
mov r14, qword [rsp + 0x48]
mov rcx, r14
call fcn.004fb020
test rax, rax
je 0x5f388f
mov rdx, qword [rdi]
mov rcx, qword [r14]
mov rax, qword [rdx]
neg rax
mov qword [rcx], rax
cmp r13d, 1
jle 0x5f3963
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 0x5f3a9a
cmp eax, 3
jbe 0x5f3a9a
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 0x5f3930
mov r8d, r9d
and r8d, 0xfffffffe
lea eax, [r8 + 1]
cmp r8d, r9d
je 0x5f3963
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 0x5f36f4
mov eax, dword [rsp + 0x5c]
cmp eax, 1
je 0x5f3ac8
test r15d, r15d
jle 0x5f3abc
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 0x5f39aa
cmp esi, r14d
je 0x5f39ce
mov edx, r15d
mov rcx, rbx
sub edx, esi
call fcn.004fa980
test eax, eax
je 0x5f39c6
mov ecx, esi
sub ecx, edi
mov edi, esi
shl ebp, cl
or ebp, 1
add esi, 1
cmp esi, r12d
jne 0x5f39a5
mov rsi, qword [rsp + 0x60]
test r13d, r13d
je 0x5f3a54
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.004fb6a0
test eax, eax
je 0x5f3a34
add edi, 1
sub r15d, edi
js 0x5f372d
xor r13d, r13d
jmp 0x5f3708
mov rcx, qword [rsp + 0x48]
mov r9, qword [rsp + 0x38]
mov qword [rsp + 0x20], rsi
mov r8, rcx
mov rdx, rcx
call fcn.004fb6a0
test eax, eax
jne 0x5f3724
mov rbp, qword [rsp + 0x40]
jmp 0x5f3754
sub r15d, 1
jmp 0x5f3708
mov dword [rsp + 0x5c], 1
jmp 0x5f36c0
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.004fb6a0
test eax, eax
je 0x5f3a34
add edi, 1
cmp r14d, edi
jne 0x5f3a6c
mov edi, dword [rsp + 0x60]
mov rbx, r13
jmp 0x5f39d8
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 0x5f3aa3
jmp 0x5f3963
xor edi, edi
mov ebp, 1
jmp 0x5f39d3
mov ebp, 1
xor edi, edi
jmp 0x5f39d3