Function at 0x140121ed0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov rax, qword [0x140178028]
xor rax, rsp
mov qword [rsp + 0x50], rax
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x48], 0xaaaaaaaa
mov ebp, 0xffffff9a
test rcx, rcx
je 0x140121f70
mov r12, rcx
cmp qword [rcx + 0x90], 0
je 0x140121f70
mov r15d, r9d
mov rsi, r8
mov rdi, rdx
cmp qword [r12 + 0x110], 0
jne 0x140121f90
mov eax, 0xaaaaaaaa
mov dword [rsp + 0x3c], eax
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x2c], eax
mov rdx, qword [r12 + 0x60]
mov r8, qword [r12 + 0x78]
add r8, qword [r12 + 0x108]
mov rcx, r12
xor r9d, r9d
call fcn.140132d20
test eax, eax
je 0x140121f9a
mov ebp, 0xffffff99
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400a8490
mov eax, ebp
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, r12
call fcn.1401215a0
jmp 0x140121f31
mov rdx, qword [r12 + 0x60]
lea rbp, [rsp + 0x3c]
mov rcx, r12
mov r8, rbp
call fcn.1401228c0
mov dword [rsp + 0x24], eax
mov eax, dword [rbp]
mov dword [rsp + 0x28], eax
mov rdx, qword [r12 + 0x60]
lea r13, [rsp + 0x38]
mov rcx, r12
mov r8, r13
call fcn.140122e70
mov r14d, eax
mov rdx, qword [r12 + 0x60]
lea r8, [rsp + 0x34]
mov rcx, r12
call fcn.140122e70
mov ebp, eax
mov rdx, qword [r12 + 0x60]
mov rcx, r12
mov r8, r13
call fcn.140122e70
mov r13d, 0xffffffff
mov ebx, 0xffffffff
test eax, eax
jne 0x140122062
or ebp, r14d
or ebp, dword [rsp + 0x24]
sete al
mov edx, dword [rsp + 0x28]
jne 0x140122048
cmp edx, 0x4034b50
jne 0x140122048
mov eax, dword [rsp + 0x38]
mov ebx, 0xffffff99
cmp eax, dword [r12 + 0xbc]
jne 0x140122062
cmp eax, 0xc
ja 0x140122041
xor ebx, ebx
mov ecx, 0x1101
bt ecx, eax
jb 0x140122062
mov ebx, 0xffffff99
jmp 0x140122062
xor ecx, ecx
cmp edx, 0x4034b50
mov edx, 0xffffff99
cmove edx, ecx
test al, al
mov ebx, 0xffffffff
cmovne ebx, edx
mov rdx, qword [r12 + 0x60]
lea r14, [rsp + 0x38]
mov rcx, r12
mov r8, r14
call fcn.1401228c0
mov ebp, eax
mov rdx, qword [r12 + 0x60]
mov rcx, r12
mov r8, r14
call fcn.1401228c0
test eax, eax
jne 0x1401220bf
xor r13d, r13d
neg ebp
sbb r13d, r13d
or r13d, ebx
jne 0x1401220bf
mov eax, dword [rsp + 0x38]
mov r13d, 0
cmp eax, dword [r12 + 0xc4]
je 0x1401220bf
xor eax, eax
test byte [rsp + 0x34], 8
mov r13d, 0xffffff99
cmovne r13d, eax
mov rdx, qword [r12 + 0x60]
lea r8, [rsp + 0x38]
mov rcx, r12
call fcn.1401228c0
mov r14d, 0xffffffff
mov ebp, 0xffffffff
test eax, eax
jne 0x140122116
mov eax, dword [rsp + 0x38]
mov ecx, 0xffffffff
cmp rax, rcx
je 0x140122113
mov ebp, r13d
test r13d, r13d
jne 0x140122116
xor ebp, ebp
cmp qword [r12 + 0xc8], rax
je 0x140122116
xor eax, eax
test byte [rsp + 0x34], 8
mov ebp, 0xffffff99
cmovne ebp, eax
jmp 0x140122116
mov ebp, r13d
mov rdx, qword [r12 + 0x60]
lea r8, [rsp + 0x38]
mov rcx, r12
call fcn.1401228c0
test eax, eax
jne 0x140122164
mov eax, dword [rsp + 0x38]
mov ecx, 0xffffffff
cmp rax, rcx
je 0x140122161
mov r14d, ebp
test ebp, ebp
jne 0x140122164
xor r14d, r14d
cmp qword [r12 + 0xd0], rax
je 0x140122164
xor eax, eax
test byte [rsp + 0x34], 8
mov r14d, 0xffffff99
cmovne r14d, eax
jmp 0x140122164
mov r14d, ebp
mov rdx, qword [r12 + 0x60]
lea r8, [rsp + 0x30]
mov rcx, r12
call fcn.140122e70
mov r13d, 0xffffffff
test eax, eax
jne 0x1401221a0
mov r13d, r14d
test r14d, r14d
jne 0x1401221a0
mov eax, dword [rsp + 0x30]
xor ecx, ecx
cmp eax, dword [r12 + 0xd8]
mov r13d, 0xffffff99
cmove r13d, ecx
mov ebx, dword [rsp + 0x30]
mov rdx, qword [r12 + 0x60]
lea r8, [rsp + 0x2c]
mov rcx, r12
call fcn.140122e70
mov ebp, 0xffffff99
or eax, r13d
jne 0x140121f70
mov rbp, qword [r12 + 0x108]
mov r13d, dword [rsp + 0x2c]
mov ecx, 0x120
call fcn.140075a40
test rax, rax
je 0x140122265
mov r14, rax
add rbp, rbx
add rbp, 0x1e
mov ecx, 0x4000
call fcn.140075a40
mov qword [r14], rax
mov qword [r14 + 0x70], rbp
mov dword [r14 + 0x78], r13d
mov qword [r14 + 0x80], 0
mov dword [r14 + 0x118], r15d
test rax, rax
je 0x14012225d
mov dword [r14 + 0x68], 0
test rdi, rdi
je 0x140122231
mov eax, dword [r12 + 0xbc]
mov dword [rdi], eax
test rsi, rsi
je 0x14012227d
mov dword [rsi], 6
mov eax, dword [r12 + 0xb8]
and eax, 6
cmp eax, 2
je 0x14012226f
cmp eax, 6
je 0x140122276
cmp eax, 4
jne 0x14012227d
mov eax, 2
jmp 0x14012227b
mov rcx, r14
call fcn.140075aa0
mov ebp, 0xffffff98
jmp 0x140121f70
mov eax, 9
jmp 0x14012227b
mov eax, 1
mov dword [rsi], eax
mov eax, dword [r12 + 0xc4]
mov dword [r14 + 0x94], eax
xor edx, edx
mov dword [r14 + 0x90], edx
mov qword [r14 + 0x88], 0
mov eax, dword [r12 + 0xbc]
mov dword [r14 + 0x108], eax
mov rcx, qword [r12 + 0x60]
mov qword [r14 + 0x100], rcx
lea rdi, [r14 + 0xa8]
mov ecx, 0xb
mov rsi, r12
rep movsq qword [rdi], qword [rsi]
mov rcx, qword [r12 + 0x78]
mov qword [r14 + 0x110], rcx
mov dword [r14 + 0x24], edx
test r15d, r15d
jne 0x140122512
cmp eax, 0xc
jne 0x140122512
mov dword [r14 + 0x118], 1
add r13d, ebx
mov rsi, qword [rsp + 0xc0]
mov rax, qword [r12 + 0xc8]
mov qword [r14 + 0x98], rax
mov rax, qword [r12 + 0xd0]
mov qword [r14 + 0xa0], rax
mov rax, qword [r12 + 0x108]
add rax, r13
add rax, 0x1e
mov qword [r14 + 0x60], rax
xor ebp, ebp
mov dword [r14 + 0x10], ebp
mov qword [r12 + 0x110], r14
mov dword [r12 + 0x118], ebp
test rsi, rsi
je 0x140121f70
call fcn.1400f5d40
mov qword [r12 + 0x130], rax
movabs rcx, 0x2345678912345678
mov qword [r12 + 0x120], rcx
mov dword [r12 + 0x128], 0x34567890
mov r8b, byte [rsi]
test r8b, r8b
je 0x1401223f2
inc rsi
mov edi, 0x12345678
mov ebp, 0x23456789
mov edx, 0x34567890
mov r9d, 0xff
mov ebx, edi
xor bl, r8b
movzx ebx, bl
shr edi, 8
xor edi, dword [rax + rbx*4]
mov dword [r12 + 0x120], edi
mov ecx, edi
and ecx, r9d
add ecx, ebp
imul ebp, ecx, 0x8088405
inc ebp
mov dword [r12 + 0x124], ebp
mov ecx, ebp
shr ecx, 0x18
mov ebx, edx
and ebx, r9d
xor ebx, ecx
shr edx, 8
xor edx, dword [rax + rbx*4]
mov dword [r12 + 0x128], edx
mov r8b, byte [rsi]
inc rsi
test r8b, r8b
jne 0x1401223a0
mov rdx, qword [r12 + 0x60]
mov rax, qword [r12 + 0x110]
mov r8, qword [rax + 0x110]
add r8, qword [rax + 0x60]
mov rcx, r12
xor r9d, r9d
call fcn.140132d20
test eax, eax
jne 0x140122265
mov rdx, qword [r12 + 0x60]
mov rax, qword [r12 + 8]
mov rcx, qword [r12 + 0x38]
lea r8, [rsp + 0x40]
mov r9d, 0xc
call qword [0x14019d008]
mov ebp, 0xffffff98
cmp eax, 0xc
jb 0x140121f70
mov r9, qword [r12 + 0x130]
mov ebx, dword [r12 + 0x128]
mov edx, dword [r12 + 0x120]
mov ebp, dword [r12 + 0x124]
xor edi, edi
mov r8d, 0xff
mov ecx, ebx
and ecx, 0xfffd
mov esi, ebx
or esi, 2
xor ecx, 3
imul ecx, esi
shr ecx, 8
xor cl, byte [rsp + rdi + 0x40]
mov byte [rsp + rdi + 0x40], cl
mov eax, edx
xor al, cl
movzx eax, al
shr edx, 8
xor edx, dword [r9 + rax*4]
mov dword [r12 + 0x120], edx
mov eax, edx
and eax, r8d
add eax, ebp
imul ebp, eax, 0x8088405
inc ebp
mov dword [r12 + 0x124], ebp
mov eax, ebp
shr eax, 0x18
mov ecx, ebx
and ecx, r8d
xor ecx, eax
shr ebx, 8
xor ebx, dword [r9 + rcx*4]
mov dword [r12 + 0x128], ebx
inc rdi
cmp rdi, 0xc
jne 0x140122473
mov rax, qword [r12 + 0x110]
add qword [rax + 0x60], 0xc
mov rax, qword [r12 + 0x110]
add qword [rax + 0x98], 0xfffffffffffffff4
mov dword [r12 + 0x118], 1
xor ebp, ebp
jmp 0x140121f70
test r15d, r15d
jne 0x1401222fa
cmp eax, 8
jne 0x1401222fa
mov rcx, r14
add rcx, 8
xor eax, eax
mov qword [r14 + 8], rax
mov dword [r14 + 0x10], 0
xorps xmm0, xmm0
movups xmmword [r14 + 0x38], xmm0
mov qword [r14 + 0x48], rax
lea r8, str.1.2.12.1_motley
mov edx, 0xfffffff1
mov r9d, 0x58
call fcn.1400219e0
test eax, eax
je 0x14012256f
mov ebp, eax
mov rcx, r14
call fcn.140075aa0
jmp 0x140121f70
mov dword [r14 + 0x68], 8
jmp 0x1401222fa