Function at 0x140112e40
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
lea rbp, [rsp - 0x37]
sub rsp, 0x90
mov rax, qword [0x1402a83b0]
xor rax, rsp
mov qword [rbp + 0x2f], rax
movzx eax, word [rcx + 0x44f6]
mov esi, 1
mov ebx, 3
mov dword [rbp + 0x1b], eax
neg eax
mov edx, ebx
mov rdi, rcx
mov qword [rbp + 7], rcx
mov dword [rbp - 0x11], esi
mov dword [rbp + 0x23], eax
mov dword [rbp + 0x17], esi
mov dword [rbp + 0x1f], 0xffffffff
mov dword [rbp + 0x27], esi
mov dword [rbp - 0x35], ebx
call fcn.1400f2a60
cmp dword [rdi + 0x24668], 0
je 0x140112eb9
call fcn.1401be514
lea rdx, str.PPG_interpolation..._n
lea rcx, [rax + 0x60]
call fcn.1401be844
movzx eax, word [rdi + 0x44f4]
mov qword [rsp + 0xc8], r13
mov qword [rsp + 0xd0], r14
mov r14d, dword [rbp - 0x2d]
sub eax, ebx
mov qword [rsp + 0xd8], r15
cmp eax, ebx
mov rax, qword [rbp - 0x31]
jle 0x14011313b
movzx r8d, word [rdi + 0x44f6]
lea r10d, [r8 - 3]
nop word [rax + rax]
mov r11d, dword [rdi + 0x3d0]
mov edx, ebx
and edx, 7
mov r9d, r11d
lea ecx, [rdx*4 + 2]
shr r9d, cl
and r9d, 1
add r9d, 3
mov ecx, r9d
mov dword [rbp - 0x39], r9d
and ecx, 1
lea edx, [rcx + rdx*2]
lea ecx, [rdx + rdx]
shr r11d, cl
and r11d, 3
cmp r9d, r10d
jge 0x140113124
movsxd r11, r11d
movsxd rdx, r9d
mov qword [rbp - 9], r11
mov qword [rbp - 0x19], rdx
nop
mov rax, qword [rdi + 0x4510]
imul r8d, ebx
mov qword [rbp + 0xf], 0
movsxd rcx, r8d
add rcx, rdx
xor r10d, r10d
lea r13, [rax + rcx*8]
mov eax, esi
mov qword [rbp - 1], r10
movzx edx, word [r13 + r11*2]
mov dword [rbp - 0x29], edx
nop
movsxd r8, eax
lea rcx, [r8*8]
mov rax, rcx
movzx esi, word [rcx + r13 + 2]
neg rax
movzx r9d, word [rax + r13 + 2]
add rax, r11
movzx r12d, word [r13 + rax*2]
lea rax, [rcx + r11]
mov edi, r9d
movzx r15d, word [r13 + rax*2]
lea eax, [rdx + rsi]
sub edi, esi
add eax, r9d
mov r14d, edi
add eax, eax
sar r14d, 0x1f
sub eax, r12d
sub r12d, edx
sub eax, r15d
sub r15d, edx
mov r11d, r12d
mov dword [rbp + r10 - 0x21], eax
lea rax, [r8 + r8*2]
sar r11d, 0x1f
lea rcx, [rax*8]
mov rax, r13
mov edx, r15d
movzx r8d, word [rcx + r13 + 2]
sub rax, rcx
sar edx, 0x1f
movzx r10d, word [rax + 2]
mov ecx, edx
mov eax, r11d
xor ecx, r15d
xor eax, r12d
sub r10d, r9d
add ecx, eax
sub r8d, esi
mov eax, r14d
xor eax, edi
mov ebx, r10d
mov r9d, r8d
add ecx, eax
sar ebx, 0x1f
sar r9d, 0x1f
sub ecx, r11d
mov r11, qword [rbp - 9]
mov eax, ebx
sub ecx, r14d
xor eax, r10d
sub ecx, edx
lea edx, [rcx + rcx*2]
mov ecx, r9d
xor ecx, r8d
add ecx, eax
sub ecx, r9d
sub ecx, ebx
lea eax, [rdx + rcx*2]
mov rcx, qword [rbp - 1]
mov edx, dword [rbp - 0x29]
mov dword [rbp + rcx - 0x31], eax
mov rax, qword [rbp + 0xf]
inc rax
mov qword [rbp + 0xf], rax
lea r10, [rax*4]
mov qword [rbp - 1], r10
mov eax, dword [rbp + r10 + 0x17]
test eax, eax
jg 0x140112f80
mov rax, qword [rbp - 0x31]
mov r14d, dword [rbp - 0x2d]
xor ecx, ecx
cmp eax, r14d
setg cl
movsxd rcx, ecx
lea r8, [rcx*4]
movsxd rcx, dword [rbp + r8 + 0x17]
mov r8d, dword [rbp + r8 - 0x21]
lea rdx, [rcx*8]
mov rcx, r13
sar r8d, 2
movzx r10d, word [rdx + r13 + 2]
sub rcx, rdx
movzx edx, word [rcx + 2]
cmp r10w, dx
jae 0x1401130ca
movzx r9d, dx
movzx edx, r10w
jmp 0x1401130d1
movzx r9d, r10w
movzx edx, dx
cmp r8d, r9d
mov ecx, r9d
cmovl ecx, r8d
cmp edx, ecx
jg 0x1401130e9
mov edx, r9d
cmp r8d, r9d
cmovl edx, r8d
mov ecx, dword [rbp - 0x39]
mov rdi, qword [rbp + 7]
mov ebx, dword [rbp - 0x35]
mov word [r13 + 2], dx
mov rdx, qword [rbp - 0x19]
movzx r8d, word [rdi + 0x44f6]
add ecx, 2
add rdx, 2
lea r10d, [r8 - 3]
mov esi, 1
mov dword [rbp - 0x39], ecx
mov qword [rbp - 0x19], rdx
cmp ecx, r10d
jl 0x140112f50
movzx ecx, word [rdi + 0x44f4]
inc ebx
sub ecx, 3
mov dword [rbp - 0x35], ebx
cmp ebx, ecx
jl 0x140112f00
movzx ecx, word [rdi + 0x44f4]
mov r12d, esi
dec ecx
cmp ecx, 1
jle 0x140113279
mov r13d, 1
nop word [rax + rax]
mov r9d, dword [rdi + 0x3d0]
or edx, 0xffffffff
mov r8d, r12d
and r8d, 7
mov esi, r9d
lea ecx, [r8*4]
shr esi, cl
and esi, r13d
inc esi
lea ecx, [rsi + rsi]
sub edx, ecx
and edx, 2
lea ecx, [rdx + r8*4]
movzx edx, word [rdi + 0x44f6]
shr r9d, cl
lea ecx, [rdx - 1]
and r9d, 3
cmp esi, ecx
jge 0x140113261
movsxd r11, r9d
movsxd r15, esi
nop
mov rcx, qword [rdi + 0x4510]
imul edx, r12d
lea rbx, [rbp + 0x17]
movsxd rdx, edx
add rdx, r15
lea r10, [rcx + rdx*8]
mov ecx, r13d
nop dword [rax]
movsxd rcx, ecx
lea rdx, [rcx*4]
lea r8, [rcx*8]
mov rcx, r11
sub rcx, rdx
movzx r9d, word [r10 + rcx*2]
lea rcx, [rdx + r11]
movzx edx, word [r10 + rcx*2]
mov rcx, r10
sub rcx, r8
add r9d, edx
movzx edx, word [rcx + 2]
movzx ecx, word [r8 + r10 + 2]
sub r9d, edx
sub r9d, ecx
movzx ecx, word [r10 + 2]
lea ecx, [r9 + rcx*2]
sar ecx, 1
cmp ecx, 0xffffffff
jg 0x140113224
xor edx, edx
jmp 0x14011322e
mov edx, 0xffff
cmp ecx, edx
cmovl edx, ecx
add rbx, 4
mov ecx, 2
mov word [r10 + r11*2], dx
sub rcx, r11
mov r11, rcx
mov ecx, dword [rbx]
test ecx, ecx
jg 0x1401131d0
movzx edx, word [rdi + 0x44f6]
add esi, 2
add r15, 2
lea ecx, [rdx - 1]
cmp esi, ecx
jl 0x1401131b0
movzx ecx, word [rdi + 0x44f4]
inc r12d
dec ecx
cmp r12d, ecx
jl 0x140113160
mov esi, r13d
movzx ecx, word [rdi + 0x44f4]
dec ecx
cmp ecx, 1
jle 0x1401134a4
nop dword [rax + rax]
mov r8d, dword [rdi + 0x3d0]
mov edx, esi
mov r10d, 2
and edx, 7
mov r9d, r8d
lea ecx, [rdx*4 + 2]
shr r9d, cl
and r9d, 1
inc r9d
mov ecx, r9d
mov dword [rbp - 0x39], r9d
and ecx, 1
lea edx, [rcx + rdx*2]
lea ecx, [rdx + rdx]
movzx edx, word [rdi + 0x44f6]
shr r8d, cl
lea ecx, [rdx - 1]
and r8d, 3
sub r10d, r8d
cmp r9d, ecx
jge 0x14011348e
mov r8d, dword [rbp + 0x1b]
movsxd r11, r9d
movsxd r10, r10d
inc r8d
mov qword [rbp - 1], r11
mov qword [rbp - 0x19], r10
mov dword [rbp - 0x35], r8d
nop dword [rax]
mov rcx, qword [rdi + 0x4510]
imul edx, esi
mov qword [rbp - 9], 0
movsxd rdx, edx
add rdx, r11
lea r15, [rcx + rdx*8]
mov ecx, r8d
test r8d, r8d
jle 0x140113418
movzx r8d, word [r15 + 2]
xor r12d, r12d
lea r13, [rbp + 0x1b]
lea eax, [r8 + r8]
mov dword [rbp - 0x29], eax
nop dword [rax + rax]
movsxd rdx, ecx
mov rax, r10
lea r13, [r13 + 4]
lea rcx, [rdx*4]
sub rax, rcx
movzx esi, word [r15 + rax*2]
lea rax, [rcx + r10]
lea rcx, [rdx*8]
movzx r14d, word [r15 + rax*2]
movzx r10d, word [rcx + r15 + 2]
mov rax, r15
sub rax, rcx
mov r11d, esi
movzx ebx, word [rax + 2]
mov eax, r10d
sub r11d, r14d
sub eax, r8d
mov edx, ebx
mov edi, r11d
mov ecx, eax
sub edx, r8d
sar edi, 0x1f
sar ecx, 0x1f
mov r9d, edx
mov r8d, ecx
sar r9d, 0x1f
xor r8d, eax
mov eax, r9d
xor eax, edx
add r8d, eax
mov eax, edi
xor eax, r11d
add r8d, eax
mov eax, dword [rbp - 0x29]
sub eax, r10d
mov r10, qword [rbp - 0x19]
sub r8d, ecx
sub eax, ebx
sub r8d, r9d
add eax, esi
sub r8d, edi
add eax, r14d
mov dword [rbp + r12 - 0x31], r8d
movzx r8d, word [r15 + 2]
mov dword [rbp + r12 - 0x21], eax
mov rax, qword [rbp - 9]
inc rax
mov qword [rbp - 9], rax
lea r12, [rax*4]
mov ecx, dword [rbp + r12 + 0x17]
add ecx, dword [r13]
test ecx, ecx
jg 0x140113340
mov rax, qword [rbp - 0x31]
mov r14d, dword [rbp - 0x2d]
mov rdi, qword [rbp + 7]
mov r9d, dword [rbp - 0x39]
mov r11, qword [rbp - 1]
mov esi, dword [rbp - 0x11]
cmp eax, r14d
je 0x140113440
xor ecx, ecx
cmp eax, r14d
setg cl
mov edx, dword [rbp + rcx*4 - 0x21]
sar edx, 1
cmp edx, 0xffffffff
jg 0x140113434
xor ecx, ecx
jmp 0x140113462
mov ecx, 0xffff
cmp edx, ecx
cmovl ecx, edx
jmp 0x140113462
mov r8d, dword [rbp - 0x21]
add r8d, dword [rbp - 0x1d]
sar r8d, 2
cmp r8d, 0xffffffff
jg 0x140113456
xor ecx, ecx
jmp 0x140113462
mov ecx, 0xffff
cmp r8d, ecx
cmovl ecx, r8d
mov r8d, dword [rbp - 0x35]
mov word [r15 + r10*2], cx
movzx edx, word [rdi + 0x44f6]
add r9d, 2
add r11, 2
lea ecx, [rdx - 1]
mov dword [rbp - 0x39], r9d
mov qword [rbp - 1], r11
cmp r9d, ecx
jl 0x140113300
movzx ecx, word [rdi + 0x44f4]
inc esi
dec ecx
mov dword [rbp - 0x11], esi
cmp esi, ecx
jl 0x140113290
mov r15, qword [rsp + 0xd8]
mov r14, qword [rsp + 0xd0]
mov r13, qword [rsp + 0xc8]
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1401bd600
add rsp, 0x90
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret