Function at 0x140036910
Capabilities:
Encode data using xor

Disassembly:
sub rsp, 0xa8
test edx, edx
je 0x140036907
mov eax, dword [rcx + 0x7f78]
cmp eax, 2
jne 0x1400368de
add rsp, 0xa8
jmp 0x140036910
cmp eax, 3
jne 0x140036907
mov r8d, edx
mov rdx, rcx
lea rcx, [rsp + 0x20]
call fcn.1400360d8
lea rcx, [rsp + 0x20]
call fcn.140036238
lea rcx, [rsp + 0x20]
call fcn.140035cb4
add rsp, 0xa8
ret
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x11c0]
mov eax, 0x12c0
call fcn.140059cb0
sub rsp, rax
mov rax, qword [0x1400878f0]
xor rax, rsp
mov qword [rbp + 0x11b0], rax
mov ebx, edx
mov rdi, rcx
mov ecx, 0x90
call fcn.1400064e4
mov rax, qword [rdi + 0x22d8]
mov qword [rsp + 0x40], rax
mov byte [rdi + 0x7f83], 1
mov rax, qword [rdi]
mov edx, dword [rdi + 0x3498]
add rdx, qword [rdi + 0x7f88]
xor r8d, r8d
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140040ed3.0]
mov byte [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
mov rcx, rdi
call fcn.14000b4d8
mov rax, qword [rdi]
mov r14d, 2
mov r8d, r14d
xor edx, edx
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140040ed3.0]
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x28]
call qword [case.0x140040ed3.0]
mov rsi, rax
mov qword [rsp + 0x38], rax
mov rdx, rax
mov ecx, ebx
call fcn.140036ef4
movsxd r13, eax
xor r15d, r15d
lea rcx, [rdi + 0x5880]
lea edx, [r14 + 0x12]
call fcn.140026990
mov byte [rdi + 0x5890], 1
lea rcx, [rdi + 0x6900]
mov edx, r14d
call fcn.140026770
and dword [rsp + 0x28], r15d
lea rax, [0x14007474c]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140007ac4
mov rax, qword [rdi]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140040ed3.0]
xor r14d, r14d
xor ebx, ebx
mov eax, r13d
shl eax, 9
cdqe
mov qword [rsp + 0x48], rax
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140007370
nop
mov r8, qword [rsp + 0x58]
xor edx, edx
mov rcx, qword [rsp + 0x50]
call fcn.14005c1a0
mov r12d, 0xfffffff
mov dword [rsp + 0x30], r12d
jmp 0x140036bd0
call fcn.14004b008
mov ecx, 0x200
cmp rsi, rcx
jae 0x140036aa9
movsxd r12, esi
mov r8d, ecx
sub r8, r12
lea rcx, [rbp - 0x50]
add rcx, r12
xor edx, edx
call fcn.14005c1a0
xor esi, esi
jmp 0x140036aaf
mov r12d, ecx
sub rsi, rcx
mov rax, qword [rdi]
movsxd r8, r12d
lea rdx, [rbp - 0x50]
mov rcx, rdi
mov rax, qword [rax + 0x18]
call qword [case.0x140040ed3.0]
mov eax, r14d
shl eax, 9
mov rcx, qword [rsp + 0x50]
add rcx, rax
lea rdx, [rbp - 0x50]
sub rdx, rcx
mov r8d, 0x200
mov al, byte [rcx + rdx]
xor byte [rcx], al
inc rcx
sub r8, 1
jne 0x140036ae1
mov r8d, 0x200
lea rdx, [rbp - 0x50]
or ecx, 0xffffffff
call fcn.140018538
mov byte [rbp + rbx + 0x1b0], al
inc ebx
shr eax, 8
mov byte [rbp + rbx + 0x1b0], al
inc ebx
mov r12d, 0x1000
cmp ebx, r12d
jne 0x140036b90
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x28]
call qword [case.0x140040ed3.0]
mov rbx, rax
mov rcx, qword [rdi]
mov rax, qword [rcx + 0x20]
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, rdi
call qword [case.0x140040ed3.0]
mov r8d, r12d
lea rdx, [rbp + 0x1b0]
mov rcx, rdi
call fcn.1400229c4
mov rcx, qword [rdi]
mov rax, qword [rcx + 0x20]
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [case.0x140040ed3.0]
mov r8d, r12d
lea rdx, [rbp + 0x1b0]
mov ecx, dword [rsp + 0x30]
call fcn.140018538
mov r12d, eax
mov dword [rsp + 0x30], eax
xor ebx, ebx
jmp 0x140036b95
mov r12d, dword [rsp + 0x30]
test r15b, r15b
jne 0x140036bc0
mov rax, qword [rsp + 0x40]
cmp byte [rax + 0x7154], r15b
jne 0x140036bc0
mov rdx, r15
shl rdx, 9
mov r8, qword [rsp + 0x38]
lea rcx, [0x140074754]
call fcn.14004ce78
inc r15
lea eax, [r14 + 1]
cmp eax, r13d
sbb r14d, r14d
and r14d, eax
test rsi, rsi
jg 0x140036a7f
mov rax, qword [rdi]
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140040ed3.0]
mov r8, rbx
lea rdx, [rbp + 0x1b0]
mov rcx, rdi
call fcn.1400229c4
mov r8, rbx
lea rdx, [rbp + 0x1b0]
mov ecx, r12d
call fcn.140018538
mov ebx, eax
mov r14, qword [rsp + 0x48]
mov r8, r14
mov rdx, qword [rsp + 0x50]
mov rcx, rdi
call fcn.1400229c4
mov r8, r14
mov rdx, qword [rsp + 0x50]
mov ecx, ebx
call fcn.140018538
mov ebx, 2
mov dword [rdi + 0x6900], ebx
not eax
mov dword [rdi + 0x6904], eax
mov rax, qword [rdi]
xor r8d, r8d
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140040ed3.0]
lea rcx, [rsp + 0x78]
call fcn.140038e10
nop
lea r8d, [rbx + 6]
lea rdx, [0x140074758]
lea rcx, [rsp + 0x78]
call fcn.140039024
mov rdx, r13
lea rcx, [rsp + 0x78]
call fcn.140038f70
mov rdx, r15
lea rcx, [rsp + 0x78]
call fcn.140038ff4
lea rdx, [rdi + 0x68a8]
lea rcx, [rsp + 0x78]
call fcn.140038e40
lea r8, [r14 + r15*2]
and dword [rsp + 0x28], 0
lea rax, [0x140074764]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor edx, edx
mov rcx, rdi
call fcn.140007ac4
mov rax, qword [rdi]
mov r8d, ebx
xor edx, edx
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140040ed3.0]
mov rax, qword [rsp + 0x40]
cmp byte [rax + 0x7154], 0
jne 0x140036d00
lea rcx, [0x140074770]
call fcn.1400183f0
mov ecx, 0x91
call fcn.1400064e4
nop
lea rcx, [rsp + 0x78]
call fcn.140001534
nop
lea rcx, [rsp + 0x50]
call fcn.140001534
mov rcx, qword [rbp + 0x11b0]
xor rcx, rsp
call fcn.140059d10
mov rbx, qword [rsp + 0x1310]
add rsp, 0x12c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret