Function at 0x1004b19d8
Capabilities:
Encode data using xor

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rdi, rdx
mov rsi, r8
mov r8, rdx
mov rdx, rcx
xor ecx, ecx
call qword [rbx + 8]
mov r12, rax
test rax, rax
je 0x1004b198c
mov r9d, dword [rbx + 0x18]
mov qword [rax + 8], rdi
xor edx, edx
mov qword [rax + 0x10], rsi
mov rax, rsi
div r9
mov rax, qword [rbx]
lea rax, [rax + rdx*8]
mov rdx, qword [rax]
mov qword [r12], rdx
mov qword [rax], r12
mov eax, dword [rbx + 0x1c]
add eax, 1
mov dword [rbx + 0x1c], eax
test byte [rbx + 0x24], 1
jne 0x1004b198c
lea edx, [r9 + r9*2]
shr edx, 2
cmp eax, edx
jbe 0x1004b198c
lea rcx, [0x10058e8d8]
lea rdx, [rcx - 0xe0]
jmp 0x1004b18a7
mov rax, rcx
sub rax, rdx
mov r8, rax
shr rax, 0x3f
sar r8, 3
add rax, r8
sar rax, 1
lea rax, [rdx + rax*8]
cmp r9, qword [rax]
jae 0x1004b199a
mov rcx, rax
cmp rcx, rdx
jne 0x1004b1880
mov rsi, qword [rcx]
cmp r9, rsi
jae 0x1004b19a3
movabs rax, 0x1fffffffffffffff
and rax, rsi
cmp rax, rsi
jne 0x1004b19a3
mov rcx, qword [rbx + 0x10]
lea rdi, [rsi*8]
mov rdx, rdi
mov r8d, dword [rcx + 8]
mov rax, r8
cmp r8, rdi
jae 0x1004b19b5
call 0x10056e2b8
mov r11, rax
test r11, r11
je 0x1004b19a3
mov rcx, r11
mov r8, rdi
xor edx, edx
call 0x100583b58
mov r11, rax
mov eax, dword [rbx + 0x18]
test eax, eax
je 0x1004b1986
mov r10, qword [rbx]
sub eax, 1
lea rdi, [r10 + 8]
lea rbp, [rdi + rax*8]
nop dword [rax + rax]
mov r9, qword [r10]
test r9, r9
je 0x1004b1978
nop dword [rax + rax]
mov rax, qword [r9 + 0x10]
mov rcx, r9
jmp 0x1004b194e
cmp qword [rcx + 0x10], rax
jne 0x1004b1959
mov r8, rcx
mov rcx, qword [rcx]
test rcx, rcx
jne 0x1004b1948
xor edx, edx
mov qword [r10], rcx
div rsi
mov eax, edx
lea rax, [r11 + rax*8]
mov rdx, qword [rax]
mov qword [r8], rdx
mov qword [rax], r9
mov r9, qword [r10]
test r9, r9
jne 0x1004b1938
mov r10, rdi
cmp rbp, rdi
je 0x1004b1986
add rdi, 8
jmp 0x1004b1928
mov qword [rbx], r11
mov dword [rbx + 0x18], esi
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea rdx, [rax + 8]
jmp 0x1004b18a7
or byte [rbx + 0x24], 1
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov r11, qword [rcx]
sub eax, edi
mov dword [rcx + 8], eax
lea r8, [r11 + rdi]
mov qword [rcx], r8
jmp 0x1004b18f5
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r13, rcx
mov r14, rdx
mov ebx, r8d
mov esi, r9d
test rdx, rdx
je 0x1004b1b38
movzx eax, byte [r14]
lea r8, [r14 + 1]
test eax, eax
je 0x1004b1b59
xor ecx, ecx
nop word cs:[rax + rax]
mov edx, eax
add r8, 1
shl edx, 0x11
add eax, edx
add rax, rcx
mov rcx, rax
shr rcx, 2
xor rcx, rax
movzx eax, byte [r8 - 1]
test eax, eax
jne 0x1004b1a18
mov rdi, r8
sub rdi, r14
lea eax, [rdi - 1]
mov edx, eax
shl edx, 0x11
add eax, edx
add rax, rcx
mov r15, rax
shr r15, 2
xor r15, rax
mov ecx, dword [r13 + 0x18]
mov rax, r15
xor edx, edx
div rcx
mov rax, qword [r13]
mov r12, qword [rax + rdx*8]
test r12, r12
jne 0x1004b1a81
jmp 0x1004b1ab0
mov r12, qword [r12]
test r12, r12
je 0x1004b1ab0
cmp qword [r12 + 0x10], r15
jne 0x1004b1a78
mov rcx, qword [r12 + 8]
mov rdx, r14
call 0x100583d68
test eax, eax
jne 0x1004b1a78
mov rax, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
ret
test ebx, ebx
je 0x1004b1b66
test esi, esi
je 0x1004b1b05
and edi, 0xffffffff
mov edx, 1
mov rcx, qword [r13 + 0x10]
cmovne rdx, rdi
mov r8d, dword [rcx + 8]
add rdx, 7
and rdx, 0xfffffffffffffff8
mov rax, r8
cmp r8, rdx
jb 0x1004b1b28
mov r12, qword [rcx]
sub eax, edx
mov dword [rcx + 8], eax
lea r8, [r12 + rdx]
mov qword [rcx], r8
test r12, r12
je 0x1004b1b6e
mov rdx, r14
mov r8, rdi
mov rcx, r12
mov r14, r12
call 0x100583b28
mov r8, r15
mov rdx, r14
mov rcx, r13
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
jmp 0x1004b17f8
call 0x10056e2b8
mov r12, rax
jmp 0x1004b1aef
mov edx, 0x1b6
lea rcx, [0x10058e738]
call fcn.1004ae148
movzx eax, byte [r14]
lea r8, [r14 + 1]
test eax, eax
jne 0x1004b1a0c
xor r15d, r15d
mov edi, 1
jmp 0x1004b1a56
xor r12d, r12d
jmp 0x1004b1a99
mov ecx, 6
call fcn.1004ae228
jmp 0x1004b1a99