Function at 0x140039840
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov rdi, qword [r9 + 0x10]
mov rbp, r9
mov r14, r8
mov r12, rdx
mov r15, rcx
cmp rdi, 0x20
ja 0x140039a65
xor r13d, r13d
lea rsi, [0x140117250]
lea rbx, [sym.phoenix_rainbow_loader.exe_struct_asmjit::x86::InstDB::InstInfo_const__const_const_asmjit::x86::InstDB::_instInfoTable]
nop word [rax + rax]
mov r10, qword [rbp + 8]
mov r9, r13
test rdi, rdi
je 0x1400398d8
lea rax, [rsp + 0x20]
sub r10, rax
nop dword [rax]
nop dword [rax + rax]
lea r8, [rsp + 0x20]
mov ecx, 0x20
add r8, r9
movzx edx, byte [r10 + r8]
lea eax, [rdx - 0x41]
cmp al, 0x19
cmova ecx, r13d
inc r9
xor cl, dl
mov byte [r8], cl
cmp r9, rdi
jb 0x1400398b0
mov rdx, rdi
lea rcx, [rsp + 0x20]
call fcn.140039370
mov dword [r12], eax
mov r11d, eax
test eax, eax
jne 0x140039a1d
mov rax, qword [r15]
movzx ecx, byte [rax + 0x30]
dec cl
cmp cl, 1
ja 0x140039a16
mov r8, rdi
cmp rdi, 0xffffffffffffffff
jne 0x14003991d
lea rax, [rsp + 0x20]
inc r8
cmp byte [rax + r8], r13b
jne 0x140039914
lea rax, [r8 - 1]
cmp rax, 0x10
ja 0x140039a16
movsx eax, byte [rsp + 0x20]
sub eax, 0x61
cmp eax, 0x19
ja 0x140039a16
lea rcx, [rax*4]
movzx eax, word [rcx + rsi]
test ax, ax
je 0x140039a16
lea rsi, [rbx + rax*8]
lea rax, [0x140117250]
movzx ebx, word [rcx + rax + 2]
lea rax, [sym.phoenix_rainbow_loader.exe_struct_asmjit::x86::InstDB::InstInfo_const__const_const_asmjit::x86::InstDB::_instInfoTable]
shl rbx, 3
sub rbx, rsi
add rbx, rax
sar rbx, 3
test rbx, rbx
je 0x140039a08
nop
mov rax, rbx
shr rax, 1
mov r10d, dword [rsi + rax*8]
lea r11, [rsi + rax*8]
and r10d, 0x3fff
lea rax, [0x140114310]
add r10, rax
mov rax, r13
test r8, r8
je 0x1400399dc
lea rcx, [rsp + 0x20]
mov r9, r10
sub r9, rcx
nop dword [rax]
nop word [rax + rax]
lea rcx, [rsp + 0x20]
add rcx, rax
movzx edx, byte [r9 + rcx]
movzx ecx, byte [rcx]
sub edx, ecx
jne 0x1400399e1
inc rax
cmp rax, r8
jb 0x1400399c0
movzx edx, byte [r10 + r8]
test edx, edx
je 0x140039a8a
lea rax, [rbx - 1]
cmovns rax, rbx
mov rbx, rax
lea rax, [r11 + 8]
cmovns rax, rsi
shr rbx, 1
mov rsi, rax
jne 0x140039980
lea rbx, [sym.phoenix_rainbow_loader.exe_struct_asmjit::x86::InstDB::InstInfo_const__const_const_asmjit::x86::InstDB::_instInfoTable]
lea rsi, [0x140117250]
mov r11d, r13d
mov dword [r12], r11d
test r11d, r11d
jne 0x140039aab
mov rdx, rdi
lea rcx, [rsp + 0x20]
call fcn.140038fc0
test eax, eax
je 0x140039a65
mov ecx, dword [r14]
test eax, ecx
jne 0x140039aa4
or ecx, eax
xor r8d, r8d
mov dword [r14], ecx
mov rdx, rbp
lea rcx, [r15 + 8]
call sym.phoenix_rainbow_loader.exe_public:_unsigned_int___cdecl_asmtk::AsmTokenizer::next_struct_asmtk::AsmToken____ptr64__unsigned_int____ptr64
cmp eax, 2
jne 0x140039a65
mov rdi, qword [rbp + 0x10]
cmp rdi, 0x20
jbe 0x140039890
mov eax, 0x1b
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
lea rbx, [sym.phoenix_rainbow_loader.exe_struct_asmjit::x86::InstDB::InstInfo_const__const_const_asmjit::x86::InstDB::_instInfoTable]
sub r11, rbx
lea rsi, [0x140117250]
sar r11, 3
jmp 0x140039a19
mov eax, 0x38
jmp 0x140039a6a
lea rcx, [r15 + 8]
xor r8d, r8d
mov rdx, rbp
call sym.phoenix_rainbow_loader.exe_public:_unsigned_int___cdecl_asmtk::AsmTokenizer::next_struct_asmtk::AsmToken____ptr64__unsigned_int____ptr64
cmp eax, 2
jne 0x140039b23
mov rdx, qword [rbp + 0x10]
cmp rdx, 0x20
ja 0x140039b23
mov r11, qword [rbp + 8]
mov r10, r13
test rdx, rdx
je 0x140039b0a
lea rax, [rsp + 0x20]
sub r11, rax
nop dword [rax]
lea r9, [rsp + 0x20]
mov ecx, 0x20
add r9, r10
movzx r8d, byte [r11 + r9]
lea eax, [r8 - 0x41]
cmp al, 0x19
cmova ecx, r13d
inc r10
xor cl, r8b
mov byte [r9], cl
cmp r10, rdx
jb 0x140039ae0
lea rcx, [rsp + 0x20]
call fcn.140038fc0
cmp eax, 0x40
jne 0x140039b23
or dword [r14], eax
xor eax, eax
jmp 0x140039a6a
mov rax, qword [rbp + 8]
mov qword [r15 + 0x18], rax
xor eax, eax
jmp 0x140039a6a