Function at 0x140036650
Capabilities:
Encode data using xor

Disassembly:
sub rsp, 0xa8
test edx, edx
je 0x140036647
mov eax, dword [rcx + 0x7f60]
cmp eax, 2
jne 0x14003661e
add rsp, 0xa8
jmp 0x140036650
cmp eax, 3
jne 0x140036647
mov r8d, edx
mov rdx, rcx
lea rcx, [rsp + 0x20]
call fcn.140035ddc
lea rcx, [rsp + 0x20]
call fcn.140035f4c
lea rcx, [rsp + 0x20]
call fcn.1400359ac
add rsp, 0xa8
ret
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x11d0]
mov eax, 0x12d0
call fcn.14005a5a0
sub rsp, rax
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x1320], rbx
mov rax, qword [0x14008a6c0]
xor rax, rsp
mov qword [rbp + 0x11c0], rax
mov esi, edx
mov r14, rcx
mov ecx, 0x8a
call fcn.1400063e8
mov rax, qword [r14 + 0x22c0]
mov qword [rsp + 0x40], rax
mov byte [r14 + 0x7f6b], 1
mov rax, qword [r14]
mov ebx, dword [r14 + 0x3480]
add rbx, qword [r14 + 0x7f70]
mov rdi, qword [rax + 0x20]
mov rcx, rdi
call qword [fcn.140023ba0]
xor r8d, r8d
mov rdx, rbx
mov rcx, r14
call rdi
mov byte [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
mov rcx, r14
call fcn.14000b540
mov rax, qword [r14]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [fcn.140023ba0]
mov r12d, 2
mov r8d, r12d
xor edx, edx
mov rcx, r14
call rbx
mov rax, qword [r14]
mov rbx, qword [rax + 0x28]
mov rcx, rbx
call qword [fcn.140023ba0]
mov rcx, r14
call rbx
mov r15, rax
mov qword [rsp + 0x38], rax
mov rdx, rax
mov ecx, esi
call fcn.140036c0c
mov edi, eax
mov dword [rsp + 0x34], eax
xor r13d, r13d
lea rcx, [r14 + 0x5868]
lea edx, [r12 + 0x12]
call fcn.140026688
mov byte [r14 + 0x5878], 1
lea rcx, [r14 + 0x68e8]
mov edx, r12d
call fcn.1400263f8
and dword [rsp + 0x28], r13d
lea rax, [0x140075684]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r14
call fcn.1400079e4
mov rax, qword [r14]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [fcn.140023ba0]
xor r8d, r8d
xor edx, edx
mov rcx, r14
call rbx
xor r12d, r12d
xor esi, esi
mov eax, edi
shl eax, 9
cdqe
mov qword [rsp + 0x48], rax
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.14000726c
nop
mov r8, qword [rsp + 0x58]
xor edx, edx
mov rcx, qword [rsp + 0x50]
call fcn.14005c700
mov dword [rsp + 0x30], 0xfffffff
jmp 0x14003694d
call fcn.14004b6d0
cmp r15, 0x200
jae 0x140036816
mov ebx, r15d
movsxd rax, r15d
mov r8d, 0x200
sub r8, rax
lea rcx, [rbp - 0x40]
add rcx, rax
xor edx, edx
call fcn.14005c700
xor r15d, r15d
jmp 0x14003681e
mov ebx, 0x200
sub r15, rbx
mov rax, qword [r14]
movsxd rbx, ebx
mov rdi, qword [rax + 0x18]
mov rcx, rdi
call qword [fcn.140023ba0]
mov r8, rbx
lea rdx, [rbp - 0x40]
mov rcx, r14
call rdi
mov ecx, r12d
shl ecx, 9
add rcx, qword [rsp + 0x50]
lea rdx, [rbp - 0x40]
sub rdx, rcx
mov r8d, 0x200
mov al, byte [rdx + rcx]
xor byte [rcx], al
inc rcx
sub r8, 1
jne 0x140036855
mov r8d, 0x200
lea rdx, [rbp - 0x40]
or ecx, 0xffffffff
call fcn.140018598
mov byte [rbp + rsi + 0x1c0], al
inc esi
shr eax, 8
mov byte [rbp + rsi + 0x1c0], al
inc esi
cmp esi, 0x1000
jne 0x140036910
mov rax, qword [r14]
mov rbx, qword [rax + 0x28]
mov rcx, rbx
call qword [fcn.140023ba0]
mov rcx, r14
call rbx
mov rdi, rax
mov rcx, qword [r14]
mov rbx, qword [rcx + 0x20]
mov rcx, rbx
call qword [fcn.140023ba0]
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, r14
call rbx
mov esi, 0x1000
mov r8d, esi
lea rdx, [rbp + 0x1c0]
mov rcx, r14
call fcn.140022574
mov rcx, qword [r14]
mov rbx, qword [rcx + 0x20]
mov rcx, rbx
call qword [fcn.140023ba0]
xor r8d, r8d
mov rdx, rdi
mov rcx, r14
call rbx
mov r8d, esi
lea rdx, [rbp + 0x1c0]
mov ecx, dword [rsp + 0x30]
call fcn.140018598
mov dword [rsp + 0x30], eax
xor esi, esi
test r13b, r13b
jne 0x14003693b
mov rax, qword [rsp + 0x40]
cmp byte [rax + 0x6150], r13b
jne 0x14003693b
mov rdx, r13
shl rdx, 9
mov r8, qword [rsp + 0x38]
lea rcx, [0x14007568c]
call fcn.14004d344
inc r13
inc r12d
mov edi, dword [rsp + 0x34]
cmp r12d, edi
sbb eax, eax
and r12d, eax
test r15, r15
jg 0x1400367e6
mov rax, qword [r14]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [fcn.140023ba0]
mov r15d, 2
mov r8d, r15d
xor edx, edx
mov rcx, r14
call rbx
mov r8d, esi
lea rdx, [rbp + 0x1c0]
mov rcx, r14
call fcn.140022574
mov r8d, esi
lea rdx, [rbp + 0x1c0]
mov ecx, dword [rsp + 0x30]
call fcn.140018598
mov ebx, eax
mov rsi, qword [rsp + 0x48]
mov r8, rsi
mov rdx, qword [rsp + 0x50]
mov rcx, r14
call fcn.140022574
mov r8, rsi
mov rdx, qword [rsp + 0x50]
mov ecx, ebx
call fcn.140018598
mov dword [r14 + 0x68e8], r15d
not eax
mov dword [r14 + 0x68ec], eax
mov rax, qword [r14]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [fcn.140023ba0]
xor r8d, r8d
mov rdx, qword [rsp + 0x38]
mov rcx, r14
call rbx
lea rcx, [rbp - 0x80]
call fcn.140038c1c
nop
lea r8d, [r15 + 6]
lea rdx, [0x140075690]
lea rcx, [rbp - 0x80]
call fcn.140038e3c
movsxd rdx, edi
lea rcx, [rbp - 0x80]
call fcn.140038d88
mov rdx, r13
lea rcx, [rbp - 0x80]
call fcn.140038e0c
lea rdx, [r14 + 0x6890]
lea rcx, [rbp - 0x80]
call fcn.140038c58
lea r8, [rsi + r13*2]
and dword [rsp + 0x28], 0
lea rax, [0x14007569c]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor edx, edx
mov rcx, r14
call fcn.1400079e4
mov rax, qword [r14]
mov rbx, qword [rax + 0x20]
mov rcx, rbx
call qword [fcn.140023ba0]
mov r8d, r15d
xor edx, edx
mov rcx, r14
call rbx
mov rax, qword [rsp + 0x40]
cmp byte [rax + 0x6150], 0
jne 0x140036a8a
lea rcx, [0x1400756a8]
call fcn.140018444
mov ecx, 0x8b
call fcn.1400063e8
nop
lea rcx, [rbp - 0x80]
call fcn.140001400
nop
lea rcx, [rsp + 0x50]
call fcn.1400074d8
mov rcx, qword [rbp + 0x11c0]
xor rcx, rsp
call fcn.14005a610
mov rbx, qword [rsp + 0x1320]
add rsp, 0x12d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret