Function at 0x140027770
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov r13, rcx
mov r14, r8
movzx ecx, word [r8]
mov rsi, rdx
jmp 0x1400277a3
add r14, 2
movzx ecx, word [r14]
call fcn.14003f984
test eax, eax
jne 0x14002779b
jmp 0x1400277b2
add rsi, 2
movzx ecx, word [rsi]
call fcn.14003f984
test eax, eax
jne 0x1400277ae
mov rcx, rsi
call fcn.140032038
mov rcx, r14
mov r15, rax
call fcn.140032038
mov rbp, rax
test r15d, r15d
je 0x1400277f1
lea ebx, [r15 - 1]
movzx ecx, word [rsi + rbx*2]
call fcn.14003f984
test eax, eax
je 0x1400277f1
mov r15d, ebx
test ebx, ebx
jne 0x1400277d9
test ebp, ebp
je 0x14002780c
lea ebx, [rbp - 1]
movzx ecx, word [r14 + rbx*2]
call fcn.14003f984
test eax, eax
je 0x14002780c
mov ebp, ebx
test ebx, ebx
jne 0x1400277f5
mov rcx, qword [r13 + 0x40]
call fcn.140032038
mov ebx, dword [r13 + 0x18]
add ebx, 9
mov qword [rsp + 0x70], rax
lea edx, [rax + rbp]
add edx, r15d
lea ebx, [rbx + rdx*2]
and ebx, 0xfffffffc
mov ecx, ebx
add rcx, 0xa8
call fcn.14003941c
mov rdi, rax
test rax, rax
je 0x140027ab9
mov r8d, 0x30
lea r12, [rax + 0xa8]
mov rdx, r13
mov rcx, rax
call fcn.14002d5d0
mov rdx, qword [r13 + 0x40]
lea ecx, [rbx + 0xa8]
mov rbx, qword [rsp + 0x70]
mov dword [rdi], ecx
inc ebx
movzx ecx, r12w
add rbx, rbx
sub cx, di
mov r8, rbx
mov word [rdi + 0x38], cx
mov rcx, r12
call fcn.14002d5d0
add r12, rbx
mov rdx, rsi
movzx eax, r12w
mov rcx, r12
sub ax, di
mov word [rdi + 0x3a], ax
mov eax, r15d
mov qword [rsp + 0x70], rax
lea rbx, [rax + rax]
mov r8, rbx
call fcn.14002d5d0
mov r8, qword [rsp + 0x70]
lea r9, [0x14005f760]
mov rax, r8
and eax, 0x3f
movzx eax, word [r9 + rax*2]
mov word [rbx + r12], ax
test r15d, r15d
je 0x1400278f4
xor edx, edx
mov rcx, r12
mov rax, rdx
inc rdx
and eax, 0x3f
movzx eax, word [r9 + rax*2]
xor word [rcx], ax
lea rcx, [rcx + 2]
sub r8, 1
jne 0x1400278d9
lea eax, [r15 + 1]
mov rdx, r14
lea rsi, [r12 + rax*2]
mov qword [rsp + 0x70], rax
movzx eax, si
mov r15d, ebp
sub ax, di
mov rcx, rsi
mov word [rdi + 0x3c], ax
lea rbx, [r15 + r15]
mov r8, rbx
call fcn.14002d5d0
mov eax, ebp
lea rdx, [0x14005f760]
and eax, 0x3f
xor r14d, r14d
movzx eax, word [rdx + rax*2]
mov word [rbx + rsi], ax
test ebp, ebp
je 0x140027958
mov ecx, r14d
mov rax, rcx
inc rcx
and eax, 0x3f
movzx eax, word [rdx + rax*2]
xor word [rsi], ax
lea rsi, [rsi + 2]
sub r15, 1
jne 0x14002793e
mov r8d, dword [r13 + 0x18]
lea ecx, [rbp + 1]
add rcx, qword [rsp + 0x70]
mov rdx, qword [r13 + 0x30]
lea rcx, [r12 + rcx*2]
movzx eax, cx
sub ax, di
mov word [rdi + 0x3e], ax
call fcn.14002d5d0
mov rcx, qword [r13 + 0x38]
mov edx, 0x5c
mov word [rdi + 0x40], r14w
call fcn.14002de38
mov rcx, qword [r13 + 0x38]
mov edx, 0x2f
mov rbx, rax
call fcn.14002de38
cmp rbx, rax
cmova rax, rbx
test rax, rax
jne 0x1400279b1
mov rax, qword [r13 + 0x38]
jmp 0x1400279b5
add rax, 2
lea rcx, [rdi + 0x68]
mov r8d, 0x20
mov rdx, rax
call fcn.140042dac
mov rbx, qword [0x140073340]
mov word [rdi + 0xa6], r14w
test rbx, rbx
jne 0x1400279e7
call fcn.140027b10
mov rbx, qword [0x140073340]
mov eax, dword [rbx + 0x28]
mov dword [rdi + 0xc], eax
mov eax, dword [rbx + 0x2c]
mov dword [rdi + 0x30], eax
mov eax, dword [rbx + 0x30]
mov dword [rdi + 0x34], eax
mov rcx, qword [rbx + 0x240]
mov qword [rsp + 0x70], rdi
test rcx, rcx
je 0x140027a4f
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x140027a48
mov r8, qword [rbx + 0x248]
lea r9, [rsp + 0x20]
mov rcx, qword [rbx + 0x240]
mov edx, 0x4a
mov qword [rsp + 0x20], 1
mov eax, dword [rdi]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x30], rdi
call qword [sym.imp.USER32.dll_SendMessageW]
jmp 0x140027a4f
mov qword [rbx + 0x240], r14
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rsi, [rbx + 0x260]
mov rdx, qword [rsi + 8]
cmp rdx, qword [rsi + 0x10]
je 0x140027a73
mov qword [rdx], rdi
add qword [rsi + 8], 8
jmp 0x140027a80
lea r8, [rsp + 0x70]
mov rcx, rsi
call fcn.14000e624
cmp byte [rbx + 0x259], r14b
je 0x140027aa8
cmp byte [rbx + 0x25a], r14b
je 0x140027ab0
mov rdx, qword [rsi + 8]
sub rdx, qword [rsi]
mov eax, dword [rbx + 0x254]
sar rdx, 3
cmp rdx, rax
jb 0x140027ab0
mov rcx, rbx
call fcn.1400274b0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret