Function at 0x140039be0
Capabilities:
Encode data using xor

Disassembly:
sub rsp, 0xa8
test edx, edx
je 0x140039bd7
mov eax, dword [rcx + 0x6fa0]
cmp eax, 2
jne 0x140039bae
add rsp, 0xa8
jmp 0x140039be0
cmp eax, 3
jne 0x140039bd7
mov r8d, edx
mov rdx, rcx
lea rcx, [rsp + 0x20]
call fcn.14003938c
lea rcx, [rsp + 0x20]
call fcn.1400394ec
lea rcx, [rsp + 0x20]
call fcn.140038f68
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 - 0x11b0]
mov eax, 0x12b0
call fcn.14005cd90
sub rsp, rax
mov rax, qword [0x14008c948]
xor rax, rsp
mov qword [rbp + 0x11a0], rax
mov ebx, edx
mov rdi, rcx
mov ecx, 0x91
call fcn.1400011dc
mov rax, qword [rdi + 0x1bf0]
mov qword [rsp + 0x40], rax
mov byte [rdi + 0x6fab], 1
mov rax, qword [rdi]
mov edx, dword [rdi + 0x26c0]
add rdx, qword [rdi + 0x6fb0]
xor r8d, r8d
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140044217.0]
xor r13d, r13d
mov byte [rsp + 0x20], r13b
xor r9d, r9d
xor r8d, r8d
lea edx, [r13 + 1]
mov rcx, rdi
call fcn.14000c190
mov rax, qword [rdi]
lea r14d, [r13 + 2]
mov r8d, r14d
xor edx, edx
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140044217.0]
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x28]
call qword [case.0x140044217.0]
mov rsi, rax
mov qword [rsp + 0x38], rax
mov rdx, rax
mov ecx, ebx
call fcn.14003a1c0
mov r12d, eax
mov dword [rsp + 0x34], eax
mov r15d, r13d
lea rcx, [rdi + 0x4ad0]
lea edx, [r13 + 0x14]
call fcn.1400291f8
mov byte [rdi + 0x4ae0], 1
lea rcx, [rdi + 0x5b48]
mov edx, r14d
call fcn.140028f14
mov dword [rsp + 0x28], r13d
lea rax, [0x140078b4c]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140008354
mov rax, qword [rdi]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140044217.0]
mov r14d, r13d
mov ebx, r13d
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x68], r13
mov eax, r12d
shl eax, 9
cdqe
mov qword [rsp + 0x48], rax
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140007fe4
nop
mov r8, qword [rsp + 0x58]
xor edx, edx
mov r13, qword [rsp + 0x50]
mov rcx, r13
call fcn.14005f480
mov dword [rsp + 0x30], 0xfffffff
jmp 0x140039eb0
call fcn.14004e500
mov ecx, 0x200
cmp rsi, rcx
jae 0x140039d93
movsxd r12, esi
mov r8d, ecx
sub r8, r12
lea rcx, [rbp - 0x60]
add rcx, r12
xor edx, edx
call fcn.14005f480
xor esi, esi
jmp 0x140039d99
mov r12d, ecx
sub rsi, rcx
mov rax, qword [rdi]
movsxd r8, r12d
lea rdx, [rbp - 0x60]
mov rcx, rdi
mov rax, qword [rax + 0x18]
call qword [case.0x140044217.0]
mov ecx, r14d
shl ecx, 9
add rcx, r13
lea rdx, [rbp - 0x60]
sub rdx, rcx
mov r8d, 0x200
mov al, byte [rcx + rdx]
xor byte [rcx], al
inc rcx
sub r8, 1
jne 0x140039dc6
mov r8d, 0x200
lea rdx, [rbp - 0x60]
or ecx, 0xffffffff
call fcn.140019ce0
mov byte [rbp + rbx + 0x1a0], al
inc ebx
shr eax, 8
mov byte [rbp + rbx + 0x1a0], al
inc ebx
mov r12d, 0x1000
cmp ebx, r12d
jne 0x140039e70
mov rax, qword [rdi]
mov rcx, rdi
mov rax, qword [rax + 0x28]
call qword [case.0x140044217.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.0x140044217.0]
mov r8d, r12d
lea rdx, [rbp + 0x1a0]
mov rcx, rdi
call fcn.140024f74
mov rcx, qword [rdi]
mov rax, qword [rcx + 0x20]
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [case.0x140044217.0]
mov r8d, r12d
lea rdx, [rbp + 0x1a0]
mov ecx, dword [rsp + 0x30]
call fcn.140019ce0
mov dword [rsp + 0x30], eax
xor ebx, ebx
test r15b, r15b
jne 0x140039e9b
mov rax, qword [rsp + 0x40]
cmp byte [rax + 0x7054], r15b
jne 0x140039e9b
mov rdx, r15
shl rdx, 9
mov r8, qword [rsp + 0x38]
lea rcx, [0x140078b54]
call fcn.1400503cc
inc r15
lea eax, [r14 + 1]
mov r12d, dword [rsp + 0x34]
cmp eax, r12d
sbb r14d, r14d
and r14d, eax
test rsi, rsi
jg 0x140039d69
mov rax, qword [rdi]
mov r14d, 2
mov r8d, r14d
xor edx, edx
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140044217.0]
mov r8, rbx
lea rdx, [rbp + 0x1a0]
mov rcx, rdi
call fcn.140024f74
mov r8, rbx
lea rdx, [rbp + 0x1a0]
mov ecx, dword [rsp + 0x30]
call fcn.140019ce0
mov ebx, eax
mov rsi, qword [rsp + 0x48]
mov r8, rsi
mov rdx, r13
mov rcx, rdi
call fcn.140024f74
mov r8, rsi
mov rdx, r13
mov ecx, ebx
call fcn.140019ce0
mov dword [rdi + 0x5b48], r14d
not eax
mov dword [rdi + 0x5b4c], eax
mov rax, qword [rdi]
xor r8d, r8d
mov rdx, qword [rsp + 0x38]
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140044217.0]
lea rcx, [rsp + 0x70]
call fcn.14003c11c
nop
lea r8d, [r14 + 6]
lea rdx, [0x140078b58]
lea rcx, [rsp + 0x70]
call fcn.14003c330
movsxd rdx, r12d
lea rcx, [rsp + 0x70]
call fcn.14003c27c
mov rdx, r15
lea rcx, [rsp + 0x70]
call fcn.14003c300
lea rdx, [rdi + 0x5af8]
lea rcx, [rsp + 0x70]
call fcn.14003c14c
lea r8, [rsi + r15*2]
and dword [rsp + 0x28], 0
lea rax, [0x140078b64]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor edx, edx
mov rcx, rdi
call fcn.140008354
mov rax, qword [rdi]
mov r8d, r14d
xor edx, edx
mov rcx, rdi
mov rax, qword [rax + 0x20]
call qword [case.0x140044217.0]
mov rax, qword [rsp + 0x40]
cmp byte [rax + 0x7054], 0
jne 0x140039fde
lea rcx, [0x140078b70]
call fcn.140019b98
mov ecx, 0x92
call fcn.1400011dc
nop
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140039ff9
call fcn.14006250c
nop
test r13, r13
je 0x14003a006
mov rcx, r13
call fcn.14006250c
mov rcx, qword [rbp + 0x11a0]
xor rcx, rsp
call fcn.14005cdf0
mov rbx, qword [rsp + 0x1300]
add rsp, 0x12b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret