Function at 0x4ba5a0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov r15d, r9d
mov rbp, r8
mov rdi, rdx
mov r12, rcx
mov rbx, qword [rcx]
mov rcx, rbx
mov edx, 0xac
mov r9d, 1
call fcn.004ba410
mov r13, rax
test rax, rax
je 0x4ba817
mov eax, dword [rbp]
sub eax, dword [r12 + 0x148]
mov dword [r13 + 0x34], eax
test rdi, rdi
je 0x4ba61a
mov eax, dword [rdi]
mov rcx, qword [r12]
cmp eax, dword [rcx + 0xa0]
jle 0x4ba61a
cmp byte [r12 + 0x1e], 0
jne 0x4ba61a
lea rdx, [0x00604c31]
mov rcx, r12
mov r8, rbp
call fcn.00419aa0
mov qword [r13 + 0x20], rdi
mov r11d, dword [r13 + 4]
mov edx, r11d
not edx
mov eax, edx
and eax, 0x806bfe3c
mov ecx, r11d
and ecx, 0x7f9401c3
or ecx, eax
xor ecx, 0x806bfe34
and r11d, 8
or r11d, ecx
mov dword [r13 + 4], r11d
cmp dword [r12 + 0x30], 0
jne 0x4bab29
mov rax, qword [r13 + 0x10]
test rax, rax
je 0x4ba830
mov eax, dword [rax + 0x28]
mov rbp, qword [r13 + 0x18]
test rbp, rbp
je 0x4ba677
mov ecx, dword [rbp + 0x28]
cmp ecx, eax
cmovge eax, ecx
or edx, 0xffffefff
cmp edx, 0xffffffff
jne 0x4ba6b4
test rdi, rdi
je 0x4bab03
mov r8d, dword [rdi]
test r8d, r8d
jle 0x4ba872
lea rbp, [rdi + 8]
xor ebx, ebx
mov esi, r8d
jmp 0x4ba800
mov rdi, qword [rdi + 0x50]
test rdi, rdi
je 0x4bab03
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x4ba6ce
mov ecx, dword [rcx + 0x28]
cmp ecx, eax
cmovge eax, ecx
mov rcx, qword [rdi + 0x40]
test rcx, rcx
je 0x4ba6df
mov ecx, dword [rcx + 0x28]
cmp ecx, eax
cmovge eax, ecx
mov rcx, qword [rdi + 0x60]
test rcx, rcx
je 0x4ba6f0
mov ecx, dword [rcx + 0x28]
cmp ecx, eax
cmovge eax, ecx
mov rcx, qword [rdi + 0x20]
test rcx, rcx
je 0x4ba740
mov ebx, dword [rcx]
test ebx, ebx
jle 0x4ba740
add rcx, 8
xor ebp, ebp
mov edx, ebx
jmp 0x4ba720
add rbp, 1
movsxd rsi, edx
add rcx, 0x20
cmp rbp, rsi
jge 0x4ba740
mov rsi, qword [rcx]
test rsi, rsi
je 0x4ba710
mov esi, dword [rsi + 0x28]
cmp esi, eax
cmovg eax, esi
cmovg edx, ebx
jmp 0x4ba710
mov rcx, qword [rdi + 0x38]
test rcx, rcx
je 0x4ba790
mov ebp, dword [rcx]
test ebp, ebp
jle 0x4ba790
add rcx, 8
mov edx, ebp
xor ebx, ebx
jmp 0x4ba770
add rbx, 1
movsxd rsi, edx
add rcx, 0x20
cmp rbx, rsi
jge 0x4ba790
mov rsi, qword [rcx]
test rsi, rsi
je 0x4ba760
mov esi, dword [rsi + 0x28]
cmp esi, eax
cmovg eax, esi
cmovg edx, ebp
jmp 0x4ba760
mov rcx, qword [rdi + 0x48]
test rcx, rcx
je 0x4ba6b0
mov ebx, dword [rcx]
test ebx, ebx
jle 0x4ba6b0
add rcx, 8
xor ebp, ebp
mov edx, ebx
jmp 0x4ba7d4
add rbp, 1
movsxd rsi, edx
add rcx, 0x20
cmp rbp, rsi
jge 0x4ba6b0
mov rsi, qword [rcx]
test rsi, rsi
je 0x4ba7c0
mov esi, dword [rsi + 0x28]
cmp esi, eax
cmovg eax, esi
cmovg edx, ebx
jmp 0x4ba7c0
add rbx, 1
movsxd rcx, esi
add rbp, 0x20
cmp rbx, rcx
jge 0x4ba844
mov rdx, qword [rbp]
test rdx, rdx
je 0x4ba7f0
mov ecx, dword [rdx + 0x28]
cmp ecx, eax
cmovg eax, ecx
cmovg esi, r8d
jmp 0x4ba7f0
test rdi, rdi
je 0x4bab56
mov rcx, rbx
mov rdx, rdi
call fcn.0047fbe0
jmp 0x4bab56
xor eax, eax
mov rbp, qword [r13 + 0x18]
test rbp, rbp
jne 0x4ba66f
jmp 0x4ba677
test r8d, r8d
jle 0x4ba872
lea rcx, [r8 - 1]
mov r14d, r8d
xor r14d, 0xfffffffc
and r14d, r8d
cmp rcx, 3
mov dword [rsp + 0x24], r15d
mov qword [rsp + 0x28], r12
jae 0x4ba879
xor r15d, r15d
xor r8d, r8d
jmp 0x4baa9c
xor edx, edx
jmp 0x4baaf5
movabs rcx, 0xd02da279a5a3915e
movabs rdx, 0xb5f25f31c910a07f
movabs rbp, 0x201a75f195cbe71b
mov r9d, r8d
xor r9d, 3
and r9d, r8d
xor r15d, r15d
mov rbx, rdx
not rbx
mov qword [rsp + 0x50], rbx
movabs rbx, 0x7fffffffffffffe
and rbx, rdx
mov qword [rsp + 0x48], rbx
mov rdx, rcx
not rdx
mov qword [rsp + 0x40], rdx
movabs rdx, 0x7fffffffffffffd
and rdx, rcx
mov qword [rsp + 0x38], rdx
movabs rcx, 0x7fffffffffffffc
and rcx, rbp
mov qword [rsp + 0x30], rcx
xor r8d, r8d
nop word cs:[rax + rax]
nop dword [rax]
mov rbp, r15
shl rbp, 5
mov rbp, qword [rdi + rbp + 8]
mov ebx, dword [rbp + 4]
mov r10d, ebx
not r10d
mov ebp, r8d
not ebp
mov ecx, r10d
and ecx, 0xf800d82a
and ebx, 0x7ff27d5
or ebx, ecx
or r10d, ebp
and ebp, 0xf800d82a
and r8d, 0x7ff27d5
or r8d, ebp
xor r8d, ebx
not r10d
or r10d, r8d
mov rbx, r15
not rbx
mov rcx, rbx
movabs rbp, 0xb5f25f31c910a07f
and rcx, rbp
mov rsi, r15
mov rdx, qword [rsp + 0x50]
and rsi, rdx
or rsi, rcx
mov ecx, edx
and ecx, 1
add rcx, qword [rsp + 0x48]
xor rcx, rsi
or ebp, edx
and ebp, r15d
and ebp, 1
or rbp, rcx
shl rbp, 5
mov rcx, qword [rdi + rbp + 8]
mov ecx, dword [rcx + 4]
mov r12d, ecx
not r12d
mov ebp, r12d
and ebp, 0x8d55ba48
and ecx, 0x72aa45b7
or ecx, ebp
mov ebp, r10d
not ebp
or r12d, ebp
and ebp, 0x8d55ba48
and r10d, 0x72aa45b7
or r10d, ebp
xor r10d, ecx
not r12d
or r12d, r10d
mov rcx, rbx
movabs rsi, 0xd02da279a5a3915e
and rcx, rsi
mov rbp, r15
mov rdx, qword [rsp + 0x40]
and rbp, rdx
or rbp, rcx
mov ecx, edx
and ecx, 2
add rcx, qword [rsp + 0x38]
xor rcx, rbp
mov ebp, esi
or ebp, edx
and ebp, r15d
and ebp, 2
or rbp, rcx
shl rbp, 5
mov rcx, qword [rdi + rbp + 8]
mov ebp, dword [rcx + 4]
mov ecx, ebp
and ecx, r12d
xor r12d, ebp
or r12d, ecx
movabs rsi, 0x201a75f195cbe71b
mov rcx, rsi
not rcx
and rbx, rsi
mov rbp, r15
and rbp, rcx
or rbp, rbx
mov ebx, ecx
and ebx, 3
add rbx, qword [rsp + 0x30]
xor rbx, rbp
or ecx, esi
and ecx, r15d
and ecx, 3
or rcx, rbx
shl rcx, 5
mov rcx, qword [rdi + rcx + 8]
mov ecx, dword [rcx + 4]
mov r8d, ecx
not r8d
mov ebp, r8d
and ebp, 0x27bf8cd
and ecx, 0xfd840732
or ecx, ebp
mov ebp, r12d
not ebp
or r8d, ebp
and ebp, 0x27bf8cd
and r12d, 0xfd840732
or r12d, ebp
xor r12d, ecx
not r8d
or r8d, r12d
add r15, 4
add r9, 0xfffffffffffffffc
jne 0x4ba900
mov ebx, r8d
test r14, r14
je 0x4baae1
mov rcx, r15
shl rcx, 5
lea rdx, [rcx + rdi]
add rdx, 8
nop word [rax + rax]
mov rcx, qword [rdx]
mov ebx, dword [rcx + 4]
mov ecx, ebx
and ecx, r8d
xor ebx, r8d
or ebx, ecx
add r15, 1
add rdx, 0x20
mov r8d, ebx
add r14, 0xffffffffffffffff
jne 0x4baac0
mov edx, ebx
xor edx, 0xffbffdf7
and edx, ebx
mov r15d, dword [rsp + 0x24]
mov r12, qword [rsp + 0x28]
mov ecx, edx
and ecx, r11d
xor edx, r11d
or edx, ecx
mov dword [r13 + 4], edx
lea ecx, [rax + 1]
mov dword [r13 + 0x28], ecx
mov rcx, qword [r12]
mov r8d, dword [rcx + 0x94]
cmp r8d, eax
jg 0x4bab29
lea rdx, [0x00603afc]
mov rcx, r12
call fcn.00419aa0
cmp r15d, 1
jne 0x4bab56
mov eax, dword [r13 + 4]
mov ecx, eax
not ecx
and ecx, 0x89f54da4
mov edx, eax
and edx, 0x760ab25b
or edx, ecx
xor edx, 0x89f54da0
and eax, 4
or eax, edx
mov dword [r13 + 4], eax
mov rax, r13
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret