Function at 0x140104770
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x20
mov rbx, rdx
lea rsi, [rdx + 0x20]
mov edx, dword [rdx]
mov rdi, rcx
mov rcx, qword [rcx + 8]
add edx, 0x1c
xor r8d, r8d
mov r9, qword [rcx]
call qword [r9 + 0x18]
cmp dword [rsi + 0x20], 0
jne 0x1401047b0
lea rcx, [rsi + 0x18]
xor r9d, r9d
mov r8, rbx
mov rdx, rdi
call fcn.1401042f0
mov dword [rsi + 0x20], eax
mov ecx, dword [rsi]
mov qword [rsp + 0x50], r14
sub ecx, 2
je 0x140104886
sub ecx, 2
je 0x140104879
cmp ecx, 1
jne 0x140104945
mov rbx, qword [rsi + 0x18]
xor r14d, r14d
mov ecx, r14d
mov qword [rsp + 0x58], r15
mov r15d, r14d
cmp byte [rbx], cl
je 0x14010482d
mov qword [rsp + 0x48], rbp
mov edi, r14d
mov ebp, 1
movsxd rdx, ebp
add rdx, rdx
call fcn.1402dfc44
mov rcx, rax
movzx eax, byte [rbx]
lea rbx, [rbx + 2]
inc r15d
inc ebp
lea rdi, [rdi + 2]
mov byte [rdi + rcx - 2], al
movzx eax, byte [rbx - 1]
mov byte [rdi + rcx - 1], al
cmp byte [rbx], r14b
jne 0x1401047f5
mov rbx, qword [rsi + 0x18]
mov rbp, qword [rsp + 0x48]
mov qword [rsi + 0x30], rcx
mov edx, 0x2a000
mov dword [rsi + 0x28], r15d
mov ecx, 1
mov eax, dword [rbx + 0x1c]
add rbx, 0x20
mov qword [rsi + 0x48], rbx
mov dword [rsi + 0x50], eax
mov dword [rsi + 0x38], r14d
call fcn.1402deebc
lea rdx, [rsi + 0x28]
mov qword [rsi + 0x40], rax
lea rcx, [rsi + 0x38]
call fcn.140104200
mov rcx, rsi
call fcn.140102860
mov r15, qword [rsp + 0x58]
jmp 0x140104910
mov rcx, rsi
call fcn.140104960
jmp 0x140104910
mov ecx, dword [rsi + 0x20]
mov ebx, dword [rsi + 0x10]
mov dword [rsi + 0x60], ecx
call fcn.1402d83ac
xor r14d, r14d
mov qword [rsi + 0x58], rax
cmp dword [rsi + 0x20], r14d
jbe 0x140104910
mov r8d, r14d
nop dword [rax]
nop dword [rax + rax]
imul ebx, ebx, 0x63d
lea r8, [r8 + 1]
mov eax, 0x11f9f253
inc r14d
add ebx, 0xca25
mul ebx
mov eax, ebx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 0x11
imul eax, eax, 0x3bcd0
sub ebx, eax
mov eax, ebx
mov edx, ebx
shl edx, 8
imul rcx, rax, 0x11f9f253
mov rax, qword [rsi + 0x18]
sar rcx, 0x18
sub edx, ecx
shr edx, 1
add edx, ecx
shr edx, 0x11
xor dl, byte [rax + r8 - 1]
mov rax, qword [rsi + 0x58]
mov byte [r8 + rax - 1], dl
cmp r14d, dword [rsi + 0x20]
jb 0x1401048b0
cmp qword [rsi + 0x58], 0
je 0x14010492b
mov rcx, rsi
mov r14, qword [rsp + 0x50]
add rsp, 0x20
pop rdi
pop rsi
pop rbx
jmp 0x140105650
lea rdx, [0x1404ad790]
mov dword [rsp + 0x40], 5
lea rcx, [rsp + 0x40]
call fcn.1402d12e0
int3
lea rdx, [0x1404ad790]
mov dword [rsp + 0x40], 5
lea rcx, [rsp + 0x40]
call fcn.1402d12e0
int3
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov r14, qword [rcx + 0x58]
xor ebx, ebx
mov eax, dword [rcx + 0x60]
mov rdx, rcx
add rax, r14
mov dword [rsp + 0x88], ebx
mov qword [rsp + 0x28], rax
mov r11d, ebx
mov r13d, ebx
cmp r14, rax
jae 0x14010596d
mov ecx, 1
mov qword [rsp + 0x20], rbx
mov dword [rsp + 0x90], ecx
mov esi, ebx
mov eax, dword [r14]
cmp eax, 0x4d624d43
je 0x1401056be
cmp eax, 0x50624d43
je 0x1401056be
cmp eax, 0x54624d43
jne 0x140105965
movsxd rax, ecx
mov rcx, r11
lea rdx, [rax + rax*4]
shl rdx, 5
call fcn.1402dfc44
add rsi, rax
mov qword [rsp + 0x98], rax
mov r11, rax
mov qword [rsi], r14
mov r10d, dword [r14]
mov dword [rsi + 8], r10d
mov eax, dword [r14 + 4]
mov dword [rsi + 0xc], eax
mov r9d, dword [r14 + 8]
mov dword [rsi + 0x10], r9d
mov edx, dword [r14 + 0xc]
mov dword [rsi + 0x14], edx
mov r8d, dword [r14 + 0x10]
sub r9d, r8d
mov dword [rsi + 0x18], r8d
lea rax, [r14 + rdx]
mov dword [rsi + 0x34], r9d
mov qword [rsi + 0x20], rax
mov eax, r8d
sub eax, edx
mov dword [rsi + 0x38], ebx
mov dword [rsi + 0x30], eax
lea r15, [r14 + r8]
mov qword [rsi + 0x28], r15
mov qword [rsi + 0x40], rbx
mov dword [rsi + 0x48], ebx
mov qword [rsi + 0x50], rbx
mov qword [rsi + 0x58], rbx
mov qword [rsi + 0x70], 0
mov dword [rsi + 0x60], ebx
mov qword [rsi + 0x78], rbx
mov qword [rsi + 0x68], rbx
mov qword [rsi + 0x88], rbx
cmp r10d, 0x4d624d43
je 0x1401057fa
cmp r10d, 0x50624d43
je 0x140105788
cmp r10d, 0x54624d43
jne 0x140105928
mov eax, dword [r15]
mov dword [rsi + 0x38], eax
lea rax, [r15 + 4]
mov qword [rsi + 0x40], rax
jmp 0x140105928
mov edi, dword [r15]
mov dword [rsi + 0x48], edi
mov ebp, edi
mov r12d, dword [r15 + 4]
lea rbx, [rdi*8]
mov rcx, rbx
call fcn.1402d83ac
mov rcx, rbx
mov qword [rsi + 0x50], rax
call fcn.1402d83ac
xor ebx, ebx
mov qword [rsi + 0x58], rax
test edi, edi
je 0x140105920
mov r8d, ebx
mov ecx, dword [r8 + r15 + 8]
mov edx, dword [r8 + r15 + 0xc]
lea r8, [r8 + 8]
mov rax, qword [rsi + 0x50]
add ecx, r12d
add rcx, r14
add edx, r12d
mov qword [r8 + rax - 8], rcx
mov rax, qword [rsi + 0x58]
mov ecx, edx
add rcx, r14
mov qword [r8 + rax - 8], rcx
sub rbp, 1
jne 0x1401057c1
jmp 0x140105920
mov r12d, dword [r15]
mov ebp, 1
mov dword [rsi + 0x70], r12d
mov ebx, dword [r15 + 4]
mov dword [rsi + 0x60], ebx
mov edi, ebx
mov r13d, dword [r15 + 8]
mov dword [rsi + 0x74], r13d
lea rcx, [rbx + rbx*2]
shl rcx, 3
call fcn.1402d83ac
mov qword [rsi + 0x68], rax
test ebx, ebx
je 0x140105871
lea r8, [rax + 8]
lea r9, [r15 + 0x10]
nop dword [rax]
nop dword [rax + rax]
mov edx, dword [r9 - 4]
lea r9, [r9 + 0xc]
mov dword [r8 - 8], edx
lea r8, [r8 + 0x18]
mov ecx, dword [r9 - 0xc]
mov dword [r8 - 0x1c], ecx
mov eax, dword [r9 - 8]
mov dword [r8 - 0x18], eax
lea rax, [r14 + rcx]
imul ebp, edx
mov qword [r8 - 0x10], rax
sub rdi, 1
jne 0x140105840
cmp r12d, 6
ja case.0x14010588d.4
lea rdi, [0x140000000]
mov ecx, dword [rdi + r12*4 + 0x1059a8]
add rcx, rdi
jmp rcx
mov dword [rsi + 0x80], 2
mov dword [rsi + 0x84], 1
jmp 0x1401058de
mov dword [rsi + 0x80], 4
jmp 0x1401058d4
mov qword [rsi + 0x80], 4
jmp 0x1401058de
mov dword [rsi + 0x80], 1
jmp 0x1401058d4
mov dword [rsi + 0x80], 2
mov dword [rsi + 0x84], 2
lea rax, [r14 + r13]
mov dword [rsi + 0x90], ebp
mov qword [rsi + 0x78], rax
xor edx, edx
mov eax, dword [rsi + 0x10]
xorps xmm0, xmm0
sub eax, r13d
xor ebx, ebx
mov dword [rsi + 0x94], eax
div ebp
mov ecx, eax
cvtsi2sd xmm0, rcx
mov rcx, rsi
movsd qword [rsi + 0x98], xmm0
call fcn.140103490
mov r13d, dword [rsp + 0x88]
mov r11, qword [rsp + 0x98]
mov eax, dword [rsi + 0x10]
inc r13d
mov rsi, qword [rsp + 0x20]
add r14, rax
mov ecx, dword [rsp + 0x90]
add rsi, 0xa0
inc ecx
mov dword [rsp + 0x88], r13d
mov dword [rsp + 0x90], ecx
mov qword [rsp + 0x20], rsi
cmp r14, qword [rsp + 0x28]
jb 0x1401056a2
mov rdx, qword [rsp + 0x80]
mov dword [rdx + 0x68], r13d
mov qword [rdx + 0x70], r11
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea rdx, [0x1404ad790]
mov dword [rsp + 0x80], 5
lea rcx, [rsp + 0x80]
call fcn.1402d12e0
int3