Function at 0x36298
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x88
mov rax, qword [0x00047100]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov r15, qword [rsp + 0x100]
xor ebx, ebx
mov rbp, r9
mov rsi, r8
mov rdi, rdx
mov qword [rsp + 0x20], rdx
mov r14, rcx
cmp rdx, rbx
je 0x36633
cmp dword [rcx + 0x10], 1
jne 0x36633
lea r12d, [rbx + 0x10]
cmp qword [rcx + 0x18], r12
jne 0x36633
cmp r9, 1
jb 0x36633
mov r13, qword [rsp + 0x118]
lea rax, [r13 - 4]
cmp rax, 0xc
ja 0x36633
lea rcx, [rsp + 0x58]
mov r8, r12
xor edx, edx
call fcn.0003bc80
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x58]
mov rcx, rdi
call qword [r14 + 0x38]
cmp rbp, 0xc
jne 0x36368
mov eax, dword [rsi]
lea rcx, [rsp + 0x38]
mov dword [rcx], eax
mov eax, dword [rsi + 4]
mov dword [rcx + 4], eax
mov eax, dword [rsi + 8]
mov dword [rcx + 8], eax
mov byte [rsp + 0x44], bl
mov byte [rsp + 0x45], bl
mov byte [rsp + 0x46], bl
mov byte [rsp + 0x47], 1
jmp 0x36431
lea rcx, [rsp + 0x38]
mov r8, r12
xor edx, edx
call fcn.0003bc80
mov r12, rbp
cmp rbp, rbx
jbe 0x363cd
mov edi, 0x10
mov rdx, rbx
cmp r12, rdi
cmovb rdi, r12
cmp rdi, rbx
jbe 0x363b1
lea rax, [rsp + 0x38]
mov r8, rsi
sub r8, rax
lea rcx, [rsp + rdx + 0x38]
inc rdx
mov al, byte [r8 + rcx]
xor byte [rcx], al
cmp rdx, rdi
jb 0x3639e
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x38]
call fcn.00036660
add rsi, rdi
sub r12, rdi
jne 0x3637f
mov rdi, qword [rsp + 0x20]
mov r12d, 0x10
lea rcx, [rsp + 0x28]
xor edx, edx
mov r8, r12
call fcn.0003bc80
mov r11d, ebp
mov rcx, rbx
shl r11d, 3
mov eax, r11d
shr eax, 0x18
mov byte [rsp + 0x34], al
mov eax, r11d
shr r11d, 8
shr eax, 0x10
shl bpl, 3
mov byte [rsp + 0x36], r11b
mov byte [rsp + 0x37], bpl
mov byte [rsp + 0x35], al
mov al, byte [rsp + rcx + 0x28]
inc rcx
xor byte [rsp + rcx + 0x37], al
cmp rcx, r12
jb 0x36412
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x38]
call fcn.00036660
lea r8, [rsp + 0x28]
lea rdx, [rsp + 0x38]
mov rcx, rdi
call qword [r14 + 0x38]
lea rdx, [rsp + 0x28]
lea rcx, [rsp + 0x68]
mov r8, r13
call fcn.0003a6f0
lea rcx, [rsp + 0x48]
mov r8, r12
xor edx, edx
call fcn.0003bc80
mov rbp, qword [rsp + 0xf0]
mov esi, 0xd
cmp rsi, r12
mov rdi, r12
mov rdx, rbx
cmovb rdi, rsi
cmp rdi, rbx
jbe 0x364a0
lea rax, [rsp + 0x48]
mov r8, rbp
sub r8, rax
lea rcx, [rsp + rdx + 0x48]
inc rdx
mov al, byte [r8 + rcx]
xor byte [rcx], al
cmp rdx, rdi
jb 0x3648d
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x48]
call fcn.00036660
add rbp, rdi
sub rsi, rdi
jne 0x36470
mov rsi, qword [rsp + 0x108]
mov rbp, rsi
cmp rsi, rbx
jbe 0x36592
mov r12, qword [rsp + 0xf8]
mov r13, qword [rsp + 0x20]
mov edi, 0x10
mov rdx, rbx
cmp rbp, rdi
cmovb rdi, rbp
cmp rdi, rbx
jbe 0x3650a
lea rax, [rsp + 0x48]
mov r8, r12
sub r8, rax
lea rcx, [rsp + rdx + 0x48]
inc rdx
mov al, byte [r8 + rcx]
xor byte [rcx], al
cmp rdx, rdi
jb 0x364f7
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x48]
call fcn.00036660
mov r11, rbx
lea rax, [rsp + 0x47]
add byte [rax], 1
jne 0x36532
inc r11
dec rax
cmp r11, 4
jb 0x36521
lea r8, [rsp + 0x28]
lea rdx, [rsp + 0x38]
mov rcx, r13
call qword [r14 + 0x38]
mov r11, rbx
cmp rdi, rbx
jbe 0x36577
lea rax, [rsp + 0x28]
mov rdx, r12
mov r8, r15
sub rdx, rax
lea rax, [rsp + 0x28]
sub r8, rax
lea rcx, [rsp + r11 + 0x28]
inc r11
mov al, byte [rdx + rcx]
xor al, byte [rcx]
mov byte [r8 + rcx], al
cmp r11, rdi
jb 0x36561
add r12, rdi
add r15, rdi
sub rbp, rdi
jne 0x364d8
mov r13, qword [rsp + 0x118]
lea r12d, [rbp + 0x10]
lea rcx, [rsp + 0x28]
mov r8, r12
xor edx, edx
call fcn.0003bc80
mov ecx, esi
mov byte [rsp + 0x2c], bl
shl ecx, 3
mov byte [rsp + 0x2d], bl
mov byte [rsp + 0x2e], bl
mov eax, ecx
mov byte [rsp + 0x2f], 0x68
shr eax, 0x18
mov byte [rsp + 0x34], al
mov eax, ecx
shr ecx, 8
shr eax, 0x10
shl sil, 3
mov byte [rsp + 0x36], cl
mov byte [rsp + 0x37], sil
mov byte [rsp + 0x35], al
mov rcx, rbx
mov al, byte [rsp + rcx + 0x28]
inc rcx
xor byte [rsp + rcx + 0x47], al
cmp rcx, r12
jb 0x365dc
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x48]
call fcn.00036660
mov r11, rbx
cmp r13, rbx
jbe 0x36615
mov al, byte [rsp + r11 + 0x48]
inc r11
xor byte [rsp + r11 + 0x67], al
cmp r11, r13
jb 0x36603
mov rdx, qword [rsp + 0x110]
lea rcx, [rsp + 0x68]
mov r8, r13
call fcn.0003bde0
cmp eax, ebx
setne bl
mov eax, ebx
jmp 0x36638
mov eax, 2
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.0003a660
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret