Function at 0x140058e90
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov dword [rsp + 0x24], edx
mov rax, qword [0x1406c4a98]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov r15d, dword [0x1406ce228]
mov r13d, dword [0x1406ce22c]
mov qword [rsp + 0x38], 0
xor eax, eax
test r8d, r8d
cmovle r8d, eax
mov dword [rsp + 0x28], r8d
jle 0x140059460
mov r14, rcx
mov eax, dword [rsp + 0xb0]
mov ecx, dword [rsp + 0x24]
sub ecx, eax
mov dword [rsp + 0x20], ecx
movsxd rax, r9d
mov qword [rsp + 0x30], rax
xor esi, esi
jmp 0x140058f24
mov r15d, dword [0x1406ce228]
mov r13d, dword [0x1406ce22c]
add r14, qword [rsp + 0x30]
mov esi, dword [rsp + 0x2c]
add esi, 1
cmp esi, dword [rsp + 0x28]
je 0x140059460
lea rcx, [rsp + 0x38]
xor edx, edx
mov r8d, dword [rsp + 0xb0]
call sub.VCRUNTIME140.dll_memset
mov edi, dword [rsp + 0xb0]
cmp edi, 4
mov dword [rsp + 0x2c], esi
jge 0x140059020
cmp edi, 3
je 0x140059172
cmp edi, 2
jne 0x1400590f0
cmp dword [rsp + 0x20], 0
js 0x1400593c0
xor r12d, r12d
mov edx, 5
xor eax, eax
mov ecx, dword [rsp + 0x20]
nop word [rax + rax]
cdqe
movzx r8d, byte [r14 + rax]
mov ebx, eax
and ebx, 0x479dc608
mov edi, eax
or edi, 7
mov esi, eax
xor esi, 0xfffffff8
or esi, edi
and edi, 0xb86239f5
or edi, ebx
xor edi, eax
xor edi, 5
and edi, esi
movsxd rbx, edi
movzx ebx, byte [rsp + rbx + 0x38]
add r12d, r8d
sub r12d, ebx
lea ebx, [rdx - 8]
lea edi, [rax + 2]
mov esi, edi
and esi, 0xfffffff8
mov ebp, edx
and ebp, 7
or ebp, esi
and edi, 0x6b9de230
and ebx, 0x94621dc8
add ebx, edi
add ebx, 6
xor ebx, ebp
mov ebp, ebx
xor ebp, 0x6b9de236
mov edi, ebx
xor edi, 0x94621dc9
and edi, ebp
xor ebx, edi
xor ebx, 0x94621dc9
or ebx, edi
mov byte [rsp + rbx + 0x38], r8b
mov ebp, r12d
shr ebp, 1
mov byte [r14 + rax], bpl
add eax, 1
add edx, 0xffffffff
cmp eax, ecx
jle 0x140058f80
jmp 0x14005915f
je 0x1400592ce
cmp edi, 5
jne 0x1400590f0
cmp dword [rsp + 0x20], 0
js 0x1400593c0
xor r12d, r12d
mov edx, 0x3ffffffa
xor eax, eax
mov r8d, dword [rsp + 0x20]
mov r9d, 0xcccccccd
nop
cdqe
movzx ebp, byte [r14 + rax]
mov ebx, eax
and ebx, 0x925c0063
mov edi, eax
and edi, 0x6da3ff9c
or edi, 0x12400063
xor edi, ebx
mov ebx, eax
and ebx, 0xfffffff8
xor ebx, edi
xor edi, 0xedbfff98
or edi, eax
or edi, 7
xor ebx, 0x12400063
and ebx, edi
movsxd rbx, ebx
movzx ebx, byte [rsp + rbx + 0x38]
add r12d, ebp
sub r12d, ebx
lea ebx, [rax + 5]
mov edi, edx
and edi, 0x28c04080
mov esi, ebx
and esi, 0x902e310a
or esi, edi
and ebx, 0x47118e75
or ebx, esi
xor ebx, 0x28c04087
lea edi, [rdx - 0x40000000]
or edi, ebx
not edi
mov byte [rsp + rdi + 0x38], bpl
mov rcx, r12
imul rcx, r9
shr rcx, 0x22
mov byte [r14 + rax], cl
add eax, 1
add edx, 0xffffffff
cmp eax, r8d
jle 0x140059050
jmp 0x14005915f
cmp dword [rsp + 0x20], 0
js 0x1400593c0
xor eax, eax
xor r12d, r12d
mov esi, dword [rsp + 0x20]
nop word cs:[rax + rax]
nop
movsxd rbp, eax
movzx eax, byte [r14 + rbp]
mov ecx, ebp
or ecx, 0xfffffff8
mov edx, ecx
xor edx, 7
mov ebx, ebp
and ebx, 1
xor ecx, 0xbcd3fb26
and ecx, edx
or ecx, ebx
xor rcx, 0x432c04de
movzx ecx, byte [rsp + rcx + 0x38]
add r12d, eax
sub r12d, ecx
lea ecx, [rdi + rbp]
and ecx, 7
mov byte [rsp + rcx + 0x38], al
mov eax, r12d
xor edx, edx
div edi
mov byte [r14 + rbp], al
lea eax, [rbp + 1]
cmp eax, esi
jle 0x140059110
mov r15d, dword [0x1406ce228]
mov r13d, dword [0x1406ce22c]
jmp 0x1400593c5
cmp dword [rsp + 0x20], 0
js 0x1400593c0
xor r12d, r12d
mov r11d, 0xfffffffc
xor eax, eax
jmp 0x140059260
lea r15d, [rax + 3]
mov edx, 0xfffffffc
sub edx, eax
mov ebp, eax
and ebp, 0xc72281c1
mov ebx, eax
and ebx, 0x38dd7e3e
or ebx, 0x5200041
xor ebx, ebp
mov ebp, ebx
xor ebp, 0xfadfffb8
mov edi, eax
or edi, 7
or ebp, edi
and edi, 0xfffffff9
xor edi, ebx
xor edi, 0x5200040
and edi, ebp
movsxd rdi, edi
movzx edi, byte [rsp + rdi + 0x38]
add r12d, r8d
sub r12d, edi
lea ebp, [r11 + 0x40000000]
mov ebx, r15d
and ebx, 0xdcfd5ef0
and ebp, 0x2302a108
mov edi, eax
and edi, 1
mov esi, r15d
and esi, 6
add ebp, ebx
add ebp, 1
lea ebx, [rdi + rsi]
add ebx, 0xdcfd5ef0
xor ebx, ebp
and r15d, 0x3a4e9d1c
and edx, 0xc5b162e3
or edx, r15d
xor edx, ebx
xor edx, 0x3a4e9d1c
and edx, ebx
mov byte [rsp + rdx + 0x38], r10b
mov rdx, r12
mov ecx, 0xaaaaaaab
imul rdx, rcx
shr rdx, 0x21
mov byte [r14 + r9], dl
add eax, 1
mov r15d, dword [0x1406ce228]
mov r13d, dword [0x1406ce22c]
add r11d, 0xffffffff
cmp eax, dword [rsp + 0x20]
jg 0x1400593c5
movsxd r9, eax
movzx r10d, byte [r14 + r9]
movzx r8d, r10b
cmp r13d, 0xa
jl 0x140059190
lea edx, [r15 - 1]
imul edx, r15d
and edx, 1
je 0x140059190
mov ecx, r11d
and ecx, 0xfffffff8
lea r15d, [rax + 3]
mov edx, r15d
and edx, 7
or edx, ecx
lea ecx, [r11 + 0x4000000]
mov esi, r15d
and esi, 0xfc50fa4d
and ecx, 0x3af05b2
or ecx, esi
xor ecx, edx
mov edx, r15d
or edx, 0xfffffff8
xor ecx, 0xfc50fa4d
and ecx, edx
mov byte [rsp + rcx + 0x38], r10b
mov edx, r11d
jmp 0x14005919b
cmp dword [rsp + 0x20], 0
js 0x1400593c0
xor r12d, r12d
mov r9d, 0xffffffb
xor eax, eax
mov ecx, dword [rsp + 0x20]
nop dword [rax + rax]
movsxd r10, eax
movzx r8d, byte [r14 + r10]
mov ebx, r10d
and ebx, 0x9a076461
or ebx, 0x45709086
mov edi, r10d
and edi, 0x65f89b9e
xor edi, ebx
xor edi, 0xba8f6f7e
and edi, r10d
movsxd rbx, edi
movzx ebx, byte [rsp + rbx + 0x38]
add r12d, r8d
sub r12d, ebx
lea edi, [r10 + 4]
mov edx, r9d
and edx, 0xcb01c61
and edi, 0xf34fe39e
or edi, edx
mov edx, edi
xor edx, 0xcb01c61
mov eax, edi
xor eax, 0x51237aa5
and eax, edx
mov ebp, edi
or ebp, 0xa26c993b
mov esi, ebp
and esi, 0x9b5202cf
mov ebx, edi
and ebx, 0x44816400
or ebx, esi
xor ebx, eax
xor ebx, 0xd343628f
xor ebp, 0xf36ffbbf
and ebp, eax
or ebp, ebx
and edx, 7
xor edi, 0xcb01c66
or edi, edx
xor ebp, 0xa26c993c
and ebp, edi
mov byte [rsp + rbp + 0x38], r8b
mov eax, r12d
shr eax, 2
mov byte [r14 + r10], al
lea eax, [r10 + 1]
add r9d, 0xffffffff
cmp eax, ecx
jle 0x1400592f0
mov r13d, dword [0x1406ce22c]
mov r15d, dword [0x1406ce228]
jmp 0x1400593c5
xor eax, eax
xor r12d, r12d
mov ecx, dword [rsp + 0x24]
mov ebx, ecx
cmp eax, ecx
cmovg ebx, eax
mov esi, dword [rsp + 0xb0]
jge 0x140058f0e
movsxd rdi, eax
mov ecx, ebx
sub ecx, eax
test cl, 1
jne 0x1400593f0
mov rbp, rdi
jmp 0x14005940a
and eax, 7
movzx eax, byte [rsp + rax + 0x38]
sub r12d, eax
mov eax, r12d
xor edx, edx
div esi
mov byte [r14 + rdi], al
lea rbp, [rdi + 1]
movsxd rbx, ebx
not rdi
add rdi, rbx
je 0x140058f00
nop dword [rax]
mov eax, ebp
and eax, 7
movzx eax, byte [rsp + rax + 0x38]
sub r12d, eax
mov eax, r12d
xor edx, edx
div esi
mov byte [r14 + rbp], al
lea eax, [rbp + 1]
and eax, 7
movzx eax, byte [rsp + rax + 0x38]
sub r12d, eax
mov eax, r12d
xor edx, edx
div esi
mov byte [r14 + rbp + 1], al
add rbp, 2
cmp rbx, rbp
jne 0x140059420
jmp 0x140058f00
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1401f88b0
nop
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret