Function at 0x1400022d4
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov rbx, qword [rsp + 0xe0]
mov r13, rdx
mov r12, qword [rsp + 0xe8]
xor edx, edx
mov r11d, dword [0x140058fb8]
mov rdi, r8
movsxd r8, dword [0x140058f84]
movsxd r15, dword [0x140058fc4]
movzx r14d, cx
lea eax, [r11 + r11]
movsxd rcx, dword [r9 + r8*4]
movsxd r10, eax
movsxd rax, dword [rbx + r10*4]
mov qword [rsp + 0x60], rax
mov rax, qword [0x140058f78]
movzx ebp, word [r12 + rax*2]
mov rax, qword [0x140059000]
div rcx
mov rax, qword [0x140058f88]
mov qword [rsp + 0xe8], rdx
movzx edx, byte [0x140058f42]
mov qword [rsp + 0x68], rdx
mov rsi, qword [rax + r14*8]
or rsi, rdx
mov word [rsp + 0xc0], bp
mov edx, 0xffff
add r14w, dx
movzx eax, r14w
lea rcx, [rax + rax*2]
movsxd rax, dword [rbx + rcx*4]
mov qword [rsp + 0x70], rax
movsxd rax, dword [0x140058ff0]
movzx ecx, word [r12 + rax*2]
movzx eax, r14w
add r14w, dx
sub eax, ecx
movsxd r9, eax
movzx eax, r14w
add r14w, dx
add eax, eax
mov qword [rsp + 0xe0], r9
movzx r10d, word [rdi + rax*2]
cmp r10d, dword [0x140058f9c]
jg 0x140002464
movzx r11d, r14w
mov r9d, r10d
shl r9, 4
add r9, 0x755
lea rbp, [r11 + r11*2]
xor qword [r9], r11
inc r10d
movsxd r8, dword [0x140058fb8]
lea r9, [r9 + 0x10]
mov rax, qword [0x140059020]
movzx edx, word [rax + r8*2]
inc r8d
mov rax, qword [0x140059008]
add edx, dword [rax + rbp*8]
mov eax, 0x766
mov dword [0x140058ff0], edx
xor edx, edx
mov dword [0x140058fb8], r8d
div qword [r15*8 + 0x755]
mov qword [r15*8 + 0x755], rdx
cmp r10d, dword [0x140058f9c]
jle 0x1400023e7
mov r11d, dword [0x140058fb8]
mov r8d, dword [0x140058f84]
mov rdi, qword [rsp + 0xd0]
mov r9, qword [rsp + 0xe0]
movzx ebp, word [rsp + 0xc0]
cmp r11d, 0xe45
jne 0x14000268a
mov eax, dword [0x140058ff4]
lea eax, [rax*2 + 0x11]
movsxd rcx, eax
movzx eax, word [r12 + rcx*2]
cmp word [0x140058fa8], ax
jb 0x14000268a
lea eax, [r15 + r15*2]
movsxd r11, eax
lea eax, [r8*2 + 5]
movsxd rcx, eax
dec r8d
mov rax, qword [0x140059008]
mov rdx, qword [rax + rcx*8]
movsxd rax, dword [r9 + r11*4]
mov dword [0x140058f84], r8d
cmp rdx, rax
jbe 0x14000268a
mov rcx, qword [rsp + 0xd8]
dec r15d
movsxd r8, dword [rbx + r11*4]
movzx r9d, r14w
or r8, 0xe1e
movzx ebp, bp
movsxd rbx, r15d
lea rax, [r9 + r9*2]
mov eax, dword [rcx + rax*4]
mov rcx, qword [0x140058fe0]
cdq
idiv ebp
xor edx, edx
mov r10d, eax
mov rax, qword [r9*8 + 0x755]
div qword [rcx + 0xf658]
mov rcx, qword [rsp + 0xe8]
movzx ecx, word [rcx + 0x3840]
sub ecx, dword [rsi + r9*4]
movsxd r9, ecx
lea ecx, [r15 + r15]
movsxd rdx, ecx
movzx ecx, word [rdi + rdx*2]
mov rdx, rax
mov dword [rsp + 0x20], ecx
mov ecx, r10d
call fcn.140012808
mov rcx, qword [rsp + 0x60]
mov dword [rcx + rbx*4], eax
mov ecx, 0x897
mov rax, qword [rsp + 0xe0]
movsxd rdx, dword [rax + 0x3b34]
call fcn.1400147e4
movsxd rax, dword [0x140058fdc]
mov r8, qword [rsp + 0x68]
mov dl, byte [r8 + rax*4]
lea eax, [r15 + 5]
movsxd rcx, eax
inc r15d
add dl, r14b
mov byte [rcx + r13], dl
xor edx, edx
movzx eax, byte [0x140058f42]
mov rcx, qword [rsp + 0xe8]
mov esi, eax
mov r11, qword [0x140058f58]
inc al
movsxd rdi, dword [0x140058ff4]
mov byte [0x140058f42], al
mov eax, dword [0x140058fdc]
lea eax, [rax + rax*2]
cdqe
movzx r9d, word [rcx + rax*2]
lea eax, [r15 + r15]
movsxd rcx, eax
movzx eax, byte [rcx + r13]
xor r9, rax
mov rax, qword [0x140058f78]
movzx ebx, byte [rax + r13]
mov eax, r15d
shl eax, 2
dec r15d
movsxd rcx, eax
lea eax, [r15 + r15*2]
mov r15d, 0x1d27
movsxd r10, dword [r8 + rcx*4]
movsxd rcx, eax
mov eax, 0x9c3
movsxd r8, dword [r8 + rcx*4]
mov qword [rsp + 0x58], r8
mov r8d, 0xa7c
mov qword [rsp + 0x50], r10
mov qword [rsp + 0x48], 0x17d
movzx ecx, r14w
div ecx
movsxd rax, edx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r11
mov qword [rsp + 0x30], 0xc45
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rbx
mov rdx, rdi
mov ecx, esi
call fcn.1400018d0
mov dword [0x140058f84], eax
mov rax, qword [0x140058f78]
mov word [r12 + rax*4 + 0xa], r15w
mov eax, 0xffff
mov rcx, qword [0x140058fa0]
add r14w, ax
movzx eax, r14w
lea r8d, [rax*2 + 0x24]
or eax, 0x9bc
cdq
idiv ebp
movsxd rax, edx
xor edx, edx
div qword [rcx + r8*8]
mov qword [rcx + r8*8], rax
jmp 0x140002770
mov ecx, dword [rbx + r15*4]
xor ecx, 0x17d
movzx eax, r14w
add eax, ecx
movzx edx, r14w
mov rcx, qword [0x140058f30]
shl rdx, 5
cdqe
sub rax, qword [rdx + rcx]
xor edx, edx
div qword [0x140059010]
mov edx, dword [0x140058f80]
mov qword [0x140059010], rax
dec edx
mov dword [0x140058f80], edx
mov eax, 0xffff
add r14w, ax
movzx eax, bp
mov cl, byte [r13 + rax*2 + 0x26]
add cl, 0x20
movzx eax, dl
movzx edx, cl
movzx ecx, byte [r15 + r13]
imul edx, eax
movzx eax, dl
xor edx, edx
imul ecx, eax
lea eax, [r15 + r15*2]
mov byte [r15 + r13], cl
mov r9, qword [0x140058f50]
movsxd rcx, eax
shl r9, 4
movzx eax, byte [rcx + r13]
movzx ecx, word [rdi + r15*2]
add rax, rcx
mov ecx, dword [0x140058f84]
add ecx, 8
movsxd r8, ecx
mov rcx, qword [0x140058f90]
div qword [rcx + r8*8]
xor edx, edx
movzx r8d, r14w
imul rcx, rax, 0x10a8
mov eax, r8d
sub rcx, qword [r9 + 0x755]
mov qword [r9 + 0x755], rcx
mov rcx, qword [0x140059008]
div qword [rcx + r15*8]
mov rcx, qword [rsp + 0x70]
mov rax, rdx
xor edx, edx
div qword [rcx + r8*8]
sub edx, dword [rbx + r15*4]
mov dword [rbx + r15*4], edx
mov eax, 0xfb4
mov rbx, qword [rsp + 0xc8]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret