Function at 0x140020140
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x58
mov rsi, rcx
lea r13, [rcx + 0x1f8]
mov rdi, qword [rcx + 0x160]
xor r12d, r12d
mov r14, rdi
cmp qword [rcx + 0x58], r12
jne 0x140020194
mov rcx, rdi
shr rcx, 4
add rcx, 0x400
add rcx, rdi
mov rdi, rcx
cmp rcx, r14
jae 0x140020194
mov eax, 0x80004005
jmp 0x1400207c7
lea rbx, [rsi + 0x178]
lea r15, [rsi + 0x170]
mov rax, qword [rbx]
mov qword [r15], rax
test rax, rax
je 0x140020241
cmp byte [rsi + 0x4c], r12b
je 0x140020354
mov rax, qword [rsi + 0x180]
lea r12, [rsi + 0x188]
test rax, rax
je 0x1400201e2
cmp r14, qword [r12]
je 0x14002020f
lea rbx, [rsi + 0x178]
lea r15, [rsi + 0x170]
mov rcx, rax
call fcn.14005b210
and qword [r12], 0
and qword [rsi + 0x180], 0
mov rcx, r14
call fcn.14005b1f0
mov qword [rsi + 0x180], rax
test rax, rax
je 0x14002020f
mov qword [r12], r14
mov r8, qword [rsi + 0x160]
xor r12d, r12d
test r8, r8
je 0x140020227
test rax, rax
je 0x14002046b
mov rdx, qword [rbx]
mov rcx, rax
call fcn.14006b630
mov rax, qword [rsi + 0x180]
mov qword [r15], rax
jmp 0x140020354
lea rbx, [rsi + 0x180]
mov rdx, qword [rbx]
lea rax, [rbx + 8]
test rdx, rdx
je 0x140020262
cmp r14, qword [rax]
je 0x1400202a3
lea r15, [rsi + 0x180]
jmp 0x140020265
mov r15, rbx
mov r12, rax
mov r13, rax
mov rcx, rdx
call fcn.14005b210
and qword [r13], 0
and qword [rbx], 0
mov rcx, r14
call fcn.14005b1f0
mov rdx, rax
mov qword [rbx], rax
mov rax, r13
xor r12d, r12d
test rdx, rdx
je 0x14002029c
mov qword [r13], r14
mov rbx, r15
lea r13, [rsi + 0x1f8]
mov r8, qword [rsi + 0x160]
test r8, r8
je 0x1400202b8
test rdx, rdx
je 0x14002046b
mov ecx, dword [rsi + 0x1f0]
test ecx, ecx
jne 0x140020306
mov r11d, dword [rsi + 0x88]
mov r8d, 0x1f123bb5
mov r10, qword [rax]
mov r9, r12
test r10, r10
je 0x140020335
movzx eax, r8w
imul ecx, eax, 0x4650
shr r8d, 0x10
add r8d, ecx
mov al, r8b
xor al, r11b
mov byte [r9 + rdx], al
inc r9
cmp r9, r10
jb 0x1400202da
lea rbx, [rsi + 0x180]
jmp 0x140020335
cmp ecx, 0x40
jb 0x140020324
movabs rax, 0x8000000000000000
cmp r8, rax
jbe 0x140020324
mov eax, 0x80070057
jmp 0x1400207c7
mov r8d, dword [rsi + 0x88]
mov edx, ecx
mov rcx, rbx
call fcn.1400207d8
mov rdx, qword [rsi + 0x188]
mov rcx, qword [rbx]
call fcn.14005b630
mov dword [rsi + 0x158], eax
mov rax, qword [rbx]
mov qword [rsi + 0x170], rax
cmp qword [rsi + 0x140], r12
jne 0x1400203ad
mov ecx, 0x30
call fcn.14005bd10
mov rbx, rax
mov qword [rbp + 0x48], rax
mov dword [rax + 8], r12d
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], r12
lea rax, [0x140072450]
mov qword [rbx], rax
mov qword [rsi + 0x138], rbx
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + VariantCopy]
mov rcx, qword [rsi + 0x140]
test rcx, rcx
je 0x1400203a6
mov rax, qword [rcx]
call qword [rax + InitCommonControls]
mov qword [rsi + 0x140], rbx
mov rbx, qword [rsi + 0x138]
mov rcx, qword [rbx + 0x10]
lea r14, [rbx + 0x18]
test rcx, rcx
je 0x1400203c6
cmp rdi, qword [r14]
je 0x1400203e6
call fcn.14005b210
mov qword [r14], r12
mov qword [rbx + 0x10], r12
mov rcx, rdi
call fcn.14005b1f0
mov qword [rbx + 0x10], rax
test rax, rax
je 0x1400203e6
mov qword [r14], rdi
test rdi, rdi
je 0x1400203f8
mov rax, qword [rsi + 0x138]
cmp qword [rax + 0x10], r12
je 0x14002046b
cmp qword [rsi + 0x58], r12
je 0x1400204a2
mov r14, qword [rsi + 0x160]
lea rbx, [rsi + 0x190]
mov rax, qword [rbx]
lea rdi, [rbx + 8]
test rax, rax
je 0x14002042d
mov rcx, rbx
cmp r14, qword [rdi]
je 0x140020457
lea r15, [rsi + 0x190]
jmp 0x140020430
mov r15, rbx
mov rcx, rax
call fcn.14005b210
mov qword [rdi], r12
mov qword [rbx], r12
mov rcx, r14
call fcn.14005b1f0
mov qword [rbx], rax
mov rcx, rbx
test rax, rax
je 0x140020457
mov qword [rdi], r14
mov rcx, r15
mov r8, qword [rsi + 0x160]
test r8, r8
je 0x140020475
mov rbx, rcx
test rax, rax
jne 0x140020475
mov eax, 0x8007000e
jmp 0x1400207c7
mov rcx, qword [rsi + 0x138]
mov rdx, qword [rsi + 0x170]
mov rcx, qword [rcx + 0x10]
call fcn.14006b630
mov r8, qword [rsi + 0x160]
mov rdx, qword [rsi + 0x170]
mov rcx, qword [rbx]
call fcn.14006b630
mov r15d, 0x28
cmp qword [rsi + 0x1e8], r12
jne 0x1400204f7
mov ecx, r15d
call fcn.14005bd10
mov rbx, rax
mov qword [rbp + 0x48], rax
mov dword [rax + 8], r12d
lea rax, [0x140071b78]
mov qword [rbx], rax
mov qword [rsi + 0x1e0], rbx
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + VariantCopy]
mov rcx, qword [rsi + 0x1e8]
test rcx, rcx
je 0x1400204f0
mov rax, qword [rcx]
call qword [rax + InitCommonControls]
mov qword [rsi + 0x1e8], rbx
mov rcx, qword [rsi + 0x1e0]
lea rax, [rsi + 0x1a0]
mov qword [rcx + 0x10], rax
mov qword [rcx + 0x20], r12
mov qword [rcx + 0x18], 0x40
mov qword [rbp + 0x60], r12
mov rbx, qword [rsi + 0x58]
test rbx, rbx
jne 0x14002052b
mov rbx, qword [rsi + 0x50]
test rbx, rbx
je 0x140020534
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + VariantCopy]
mov qword [rbp + 0x60], rbx
mov qword [rbp + 0x50], r12
mov rax, qword [rbx]
lea r8, [rbp + 0x50]
lea rdx, [0x1400763b0]
mov rcx, rbx
call qword [rax]
mov rdi, qword [rbp + 0x50]
test rdi, rdi
je 0x140020651
mov rax, qword [rsi + 0x160]
mov qword [rbp - 0x28], rax
lea rcx, [rsi + 0x30]
lea r8, [rbp + 0x48]
mov edx, dword [rsi + 0x28]
call fcn.140020a14
mov qword [rbp + 0x48], rax
neg rax
sbb r9, r9
lea rax, [rbp + 0x48]
and r9, rax
lea r8, [rbp - 0x28]
mov rdx, rdi
mov rcx, r13
call fcn.140010d2c
mov r14d, eax
test eax, eax
jne 0x14002075e
mov qword [rbp + 0x58], r12
mov rax, qword [rbx]
lea r8, [rbp + 0x58]
lea rdx, [0x1400763d0]
mov rcx, rbx
call qword [rax]
mov rcx, qword [rbp + 0x58]
test rcx, rcx
je 0x1400205da
mov rax, qword [rcx]
mov rdx, qword [rsi + 0x1e8]
call qword [rax + 0x18]
mov r14d, eax
test eax, eax
jne 0x14002074e
mov qword [rbp + 0x48], r12
mov rax, qword [rbx]
lea r8, [rbp + 0x48]
lea rdx, [0x140076500]
mov rcx, rbx
call qword [rax]
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x14002078b
mov rax, qword [rcx]
lea rdx, [rsi + 0xcc]
mov r8d, InitCommonControls
call qword [rax + 0x18]
mov r14d, eax
test eax, eax
jne 0x14002073e
xor edx, edx
lea r8d, [rax + 0x10]
lea rcx, [rbp - 0x18]
call fcn.14006bcd0
mov rcx, qword [rsi + 0x58]
test rcx, rcx
je 0x140020686
mov rax, qword [rcx]
call qword [rax + 0x18]
mov rcx, qword [rsi + 0x58]
mov rax, qword [rcx]
lea r8d, [r14 + 0x10]
lea rdx, [rbp - 0x18]
call qword [rax + 0x20]
jmp 0x140020787
mov edx, r12d
cmp dword [r13 + 8], r12d
jbe 0x1400205a2
mov r8, qword [r13]
mov eax, edx
mov rcx, qword [r8 + rax*8]
cmp byte [rcx + 4], r12b
je 0x14002067b
inc edx
cmp edx, dword [r13 + 8]
jb 0x140020662
jmp 0x1400205a2
mov r14d, 0x80070057
jmp 0x140020762
mov rcx, r15
call fcn.14005bd10
mov rdi, rax
mov qword [rbp - 0x28], rax
mov dword [rax + 8], r12d
lea rax, [0x140072430]
mov qword [rdi], rax
mov qword [rbp - 0x28], rdi
mov rcx, rdi
mov rdx, qword [fcn.14000fb3c]
call rdx
nop
lea rax, [rbp - 0x18]
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x20], InitCommonControls
mov qword [rdi + 0x18], r12
mov ecx, 0x20
call fcn.14005bd10
mov r15, rax
mov qword [rbp - 0x20], rax
mov dword [rax + 8], r12d
lea rax, [0x140072470]
mov qword [r15], rax
mov byte [r15 + 0xc], 1
mov qword [rbp - 0x20], r15
mov rcx, r15
mov rdx, qword [fcn.14000fb3c]
call rdx
nop
or dword [r15 + 0x10], 0xffffffff
mov qword [r15 + 0x18], r12
mov rcx, qword [rsi + 0x50]
mov rax, qword [rcx]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov r8, r15
mov rdx, rdi
call qword [rax + 0x18]
mov r14d, eax
test eax, eax
je 0x140020773
mov rax, qword [r15]
mov rcx, r15
call qword [rax + InitCommonControls]
nop
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + InitCommonControls]
nop
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x14002074e
mov rax, qword [rcx]
call qword [rax + InitCommonControls]
nop
mov rcx, qword [rbp + 0x58]
test rcx, rcx
je 0x14002075e
mov rax, qword [rcx]
call qword [rax + InitCommonControls]
nop
mov rdi, qword [rbp + 0x50]
test rdi, rdi
je 0x140020771
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + InitCommonControls]
nop
jmp 0x1400207ba
mov rax, qword [r15]
mov rcx, r15
call qword [rax + InitCommonControls]
nop
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + InitCommonControls]
nop
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x140020797
mov rax, qword [rcx]
call qword [rax + InitCommonControls]
nop
mov rcx, qword [rbp + 0x58]
test rcx, rcx
je 0x1400207a7
mov rax, qword [rcx]
call qword [rax + InitCommonControls]
nop
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x1400207b7
mov rax, qword [rcx]
call qword [rax + InitCommonControls]
nop
mov r14d, r12d
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + InitCommonControls]
nop
mov eax, r14d
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret