Function at 0x140006540
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x21f8
call fcn.140019520
sub rsp, rax
mov r13, qword [rcx + 0xa8]
mov rsi, rcx
mov rbp, r8
mov ebx, 0xfff
lea rcx, [rsp + 0x11f1]
xor edi, edi
mov r8, rbx
xor edx, edx
mov byte [rsp + 0x11f0], dil
call sub.msvcrt.dll_memset
lea rcx, [rsp + 0x1f1]
mov r8, rbx
xor edx, edx
mov byte [rsp + 0x1f0], dil
call sub.msvcrt.dll_memset
cmp dword [r13 + 0x68], 0xbb8
jae 0x140006911
mov r8d, dword [r13 + 0x68]
lea rdx, [r13 + 0xa0]
lea rcx, [rsp + 0x11f0]
call sub.msvcrt.dll_memcpy
mov r8d, dword [r13 + 0x68]
lea rdx, [r13 + 0xa0]
lea rcx, [rsp + 0x1f0]
call sub.msvcrt.dll_memcpy
xor eax, eax
lea r8d, [rdi + 0x3f]
lea rcx, [rsp + 0x61]
xor edx, edx
mov byte [rsp + 0x40], dil
mov qword [rsp + 0x41], rax
mov qword [rsp + 0x49], rax
mov word [rsp + 0x51], ax
mov byte [rsp + 0x53], al
mov byte [rsp + 0x60], dil
call sub.msvcrt.dll_memset
lea rdx, [r13 + 0x84]
lea r8d, [rdi + 0x10]
lea rcx, [rsp + 0x40]
call sub.msvcrt.dll_memcpy
lea rax, [rsp + 0x60]
mov byte [rsp + 0x53], 1
mov qword [rsp + 0x30], rax
mov eax, dword [r13 + 0x94]
mov ebx, 0x8004
mov dword [rsp + 0x28], eax
lea r9, [rsp + 0x40]
mov r8, rbp
mov edx, ebx
mov rcx, rsi
mov dword [rsp + 0x20], 0x14
call fcn.140005cac
lea rax, [rsp + 0x74]
mov byte [rsp + 0x53], 2
mov qword [rsp + 0x30], rax
mov eax, dword [r13 + 0x94]
lea r9, [rsp + 0x40]
mov dword [rsp + 0x28], eax
mov r8, rbp
mov edx, ebx
mov rcx, rsi
mov dword [rsp + 0x20], 0x14
call fcn.140005cac
lea r8d, [rdi + 0x18]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0xac]
mov dword [rsp + 0xa8], r8d
mov byte [rsp + 0xa0], 8
mov dword [rsp + 0xa4], 0x6603
mov byte [rsp + 0xa1], 2
call sub.msvcrt.dll_memcpy
mov rdx, qword [rsi]
mov rcx, qword [rsi + 0xc0]
lea rax, [rsp + 0x2258]
mov qword [rsp + 0x30], rax
lea r9d, [rdi + 0x24]
lea r8, [rsp + 0xa0]
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x2258], rdi
mov qword [rsp + 0x20], rdi
call fcn.140004ffc
cmp qword [rsp + 0x2258], rdi
je 0x14000690d
mov ebp, edi
lea r12, [rsp + 0x1f0]
mov eax, ebp
mov r8d, 8
mov dword [rsp + 0x2240], 8
lea r14, [rsp + rax + 0x1f0]
lea rdx, [rsp + rax + 0x11f0]
mov rcx, r14
call sub.msvcrt.dll_memcpy
mov rbx, qword [rsi + 0xc0]
mov r15, qword [rsp + 0x2258]
mov rcx, rbx
mov qword [rsp + 0x58], rdi
call fcn.140004c90
mov r11, qword [rbx + 0x48]
cmp r11, rdi
je 0x140006784
lea r9, [rsp + 0x58]
xor r8d, r8d
xor edx, edx
mov rcx, r15
call r11
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsi + 0xc0]
lea rax, [rsp + 0x2240]
mov qword [rsp + 0x30], rax
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], edi
call fcn.140004f48
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsi + 0xc0]
call fcn.140005064
cmp ebp, edi
lea r11, [rsp + 0x78]
jbe 0x1400067d6
lea eax, [rbp - 8]
lea r11, [rsp + rax + 0x11f0]
mov ecx, 8
mov al, byte [r11]
add r11, 1
xor byte [r12], al
add r12, 1
sub rcx, 1
jne 0x1400067db
add ebp, 8
cmp ebp, dword [r13 + 0x68]
jb 0x140006724
mov rdx, qword [rsp + 0x2258]
mov rcx, qword [rsi + 0xc0]
call fcn.140005064
mov ebx, 0x7f
lea rcx, [rsp + 0x171]
mov r8, rbx
xor edx, edx
mov byte [rsp + 0x170], dil
call sub.msvcrt.dll_memset
lea rcx, [rsp + 0xf1]
mov r8, rbx
xor edx, edx
mov byte [rsp + 0xf0], dil
call sub.msvcrt.dll_memset
mov r9, qword [rsp + 0x2250]
lea r12d, [rbx - 0x6b]
lea r11, [rsp + 0x170]
lea rax, [rsp + 0x1f0]
lea ebx, [r12 + 0x2c]
mov qword [rsp + 0x38], r11
mov dword [rsp + 0x30], InitCommonControls
mov qword [rsp + 0x28], rax
mov ebp, 0x8004
mov r8d, ebx
mov rcx, rsi
mov edx, ebp
mov dword [rsp + 0x20], r12d
call fcn.1400055f0
lea r11, [rsp + 0xf0]
lea rax, [rsp + 0x218]
mov qword [rsp + 0x38], r11
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x170]
mov r8d, ebx
mov edx, ebp
mov rcx, rsi
mov dword [rsp + 0x20], r12d
call fcn.1400055f0
lea rdx, [rsp + 0x200]
lea rcx, [rsp + 0xf0]
mov r8, r12
call sub.msvcrt.dll_memcmp
cmp eax, edi
jne 0x14000690d
mov rax, qword [rsp + 0x2248]
lea r8, [rsp + 0x218]
mov r9d, ebx
mov edx, ebp
mov rcx, rsi
lea edi, [rbx - 0x3f]
mov qword [rsp + 0x20], rax
call fcn.140005424
mov eax, edi
jmp 0x14000691d
mov dword [rsi + 0x340], 0xfffffffe
xor eax, eax
add rsp, 0x21f8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret