Function at 0x140040390
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x1400b80c0]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rbx, rdx
mov rsi, rcx
mov qword [rbp - 0x18], rdx
xor edi, edi
mov dword [rbp - 0x58], 0x9ba0b9a5
mov dword [rbp - 0x54], 0xa1a3b5bc
mov word [rbp - 0x50], 0x100
mov ecx, edi
nop dword [rax]
nop word [rax + rax]
lea eax, [rcx - 0x35]
xor byte [rbp + rcx - 0x58], al
inc rcx
cmp rcx, 8
jb 0x1400403e0
mov byte [rbp - 0x4f], 0
lea r9, [rbp - 0x60]
lea r8, [rbp - 0x50]
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x40]
call fcn.140022360
nop
cmp byte [rbx], 0
jne 0x14004041b
mov byte [rbx], 1
call fcn.140034d20
mov qword [rbx + 8], rax
cmp byte [rbx], 1
jne 0x14004042f
lea rdx, [rbp - 0x40]
mov rcx, qword [rbx + 8]
call fcn.140039c60
jmp 0x140040433
mov rax, qword [rbp - 0x18]
cmp byte [rax], 3
jne 0x14004043e
mov r8, qword [rax + 8]
jmp 0x140040441
mov r8, rdi
mov rdx, r8
cmp qword [r8 + 0x18], 0x10
jb 0x14004044e
mov rdx, qword [r8]
lea rcx, [rsi + 0xa0]
mov r8, qword [r8 + 0x10]
call fcn.14001f7b0
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 0x10
jb 0x14004049d
inc rdx
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140040498
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140040498
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140094568
mov dword [rbp - 0x58], 0x81a0b9a5
mov dword [rbp - 0x54], 0xbcb8bca1
mov dword [rbp - 0x50], 0xb3a681b6
mov dword [rbp - 0x4c], 0x100aba5
mov rcx, rdi
nop dword [rax]
lea eax, [rcx - 0x35]
xor byte [rbp + rcx - 0x58], al
inc rcx
cmp rcx, 0xe
jb 0x1400404c0
mov byte [rbp - 0x49], 0
lea r9, [rbp - 0x60]
lea r8, [rbp - 0x4a]
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x40]
call fcn.140022360
nop
cmp byte [rbx], 0
jne 0x1400404fb
mov byte [rbx], 1
call fcn.140034d20
mov qword [rbx + 8], rax
cmp byte [rbx], 1
jne 0x14004050f
lea rdx, [rbp - 0x40]
mov rcx, qword [rbx + 8]
call fcn.140039c60
jmp 0x140040513
mov rax, qword [rbp - 0x18]
cmp byte [rax], 3
jne 0x14004051e
mov r8, qword [rax + 8]
jmp 0x140040521
mov r8, rdi
mov rdx, r8
cmp qword [r8 + 0x18], 0x10
jb 0x14004052e
mov rdx, qword [r8]
lea rcx, [rsi + 0xc0]
mov r8, qword [r8 + 0x10]
call fcn.14001f7b0
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 0x10
jb 0x14004057d
inc rdx
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140040578
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140040578
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140094568
mov dword [rbp - 0x58], 0x85a0b9a5
mov dword [rbp - 0x54], 0xa2a9aa
mov byte [rbp - 0x50], 1
mov rcx, rdi
nop dword [rax]
nop word [rax + rax]
lea eax, [rcx - 0x35]
xor byte [rbp + rcx - 0x58], al
inc rcx
cmp rcx, 7
jb 0x1400405a0
mov byte [rbp - 0x50], 0
lea r9, [rbp - 0x60]
lea r8, [rbp - 0x51]
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x40]
call fcn.140022360
nop
cmp byte [rbx], 0
jne 0x1400405db
mov byte [rbx], 1
call fcn.140034d20
mov qword [rbx + 8], rax
cmp byte [rbx], 1
jne 0x1400405ef
lea rdx, [rbp - 0x40]
mov rcx, qword [rbx + 8]
call fcn.140039c60
jmp 0x1400405f3
mov rax, qword [rbp - 0x18]
cmp byte [rax], 3
jne 0x1400405fe
mov r8, qword [rax + 8]
jmp 0x140040601
mov r8, rdi
mov rdx, r8
cmp qword [r8 + 0x18], 0x10
jb 0x14004060e
mov rdx, qword [r8]
lea rcx, [rsi + 0xe0]
mov r8, qword [r8 + 0x10]
call fcn.14001f7b0
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 0x10
jb 0x14004065d
inc rdx
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140040658
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140040658
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140094568
mov dword [rbp - 0x58], 0xbdbfa9bd
mov dword [rbp - 0x54], 0xbfbfa6
mov byte [rbp - 0x50], 1
mov rcx, rdi
nop dword [rax]
nop word [rax + rax]
lea eax, [rcx - 0x35]
xor byte [rbp + rcx - 0x58], al
inc rcx
cmp rcx, 7
jb 0x140040680
mov byte [rbp - 0x50], 0
lea r9, [rbp - 0x60]
lea r8, [rbp - 0x51]
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x40]
call fcn.140022360
nop
cmp byte [rbx], 0
jne 0x1400406bb
mov byte [rbx], 1
call fcn.140034d20
mov qword [rbx + 8], rax
cmp byte [rbx], 1
jne 0x1400406cf
lea rdx, [rbp - 0x40]
mov rcx, qword [rbx + 8]
call fcn.140039c60
jmp 0x1400406d3
mov rax, qword [rbp - 0x18]
cmp byte [rax], 3
jne 0x1400406de
mov r8, qword [rax + 8]
jmp 0x1400406e1
mov r8, rdi
mov rdx, r8
cmp qword [r8 + 0x18], 0x10
jb 0x1400406ee
mov rdx, qword [r8]
lea rcx, [rsi + 0x100]
mov r8, qword [r8 + 0x10]
call fcn.14001f7b0
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 0x10
jb 0x14004073d
inc rdx
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140040738
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140040738
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140094568
movdqa xmm0, xmmword [0x14009b500]
movdqu xmmword [rbp - 0x58], xmm0
mov word [rbp - 0x48], 0xb0
mov byte [rbp - 0x46], 1
mov rcx, rdi
nop word [rax + rax]
lea eax, [rcx - 0x35]
xor byte [rbp + rcx - 0x58], al
inc rcx
cmp rcx, 0x11
jb 0x140040760
mov byte [rbp - 0x46], 0
lea r9, [rbp - 0x60]
lea r8, [rbp - 0x47]
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x40]
call fcn.140022360
nop
cmp byte [rbx], 0
jne 0x14004079b
mov byte [rbx], 1
call fcn.140034d20
mov qword [rbx + 8], rax
cmp byte [rbx], 1
jne 0x1400407af
lea rdx, [rbp - 0x40]
mov rcx, qword [rbx + 8]
call fcn.140039c60
jmp 0x1400407b3
mov rax, qword [rbp - 0x18]
cmp byte [rax], 3
jne 0x1400407bc
mov rdi, qword [rax + 8]
mov rdx, rdi
cmp qword [rdi + 0x18], 0x10
jb 0x1400407c9
mov rdx, qword [rdi]
lea rcx, [rsi + 0x120]
mov r8, qword [rdi + 0x10]
call fcn.14001f7b0
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 0x10
jb 0x140040819
inc rdx
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140040813
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140040813
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140094568
nop
lea rcx, [rbx + 8]
movzx edx, byte [rbx]
call fcn.14003bf50
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140094680
mov rbx, qword [rsp + 0xb0]
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret