Function at 0x140041950
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x88], rbx
mov rbp, rdx
mov rsi, rcx
mov rcx, qword [rcx]
xor ebx, ebx
mov dword [rsp + 0x98], ebx
cmp dword [rsi + 0x14], ebx
jle 0x140041f64
mov r15, rcx
movsxd rax, dword [rsi + 0x1c]
lea rcx, [rcx + rax*4]
mov qword [rsp + 0x30], rcx
mov r8d, dword [r15]
dec r8d
test r8d, r8d
jle 0x140041f52
add r15, 4
mov edi, dword [r15]
xor r14d, r14d
mov ecx, dword [rsi + 0xc]
add ecx, ebx
mov dword [rbp + 0x68], ecx
mov rdx, qword [rbp + 0x48]
mov eax, dword [rdx + 0xc]
imul eax, ecx
movsxd rcx, eax
add rcx, qword [rdx]
mov qword [rbp + 0x70], rcx
sub r8d, 1
mov dword [rsp + 0x90], r8d
js 0x140041df8
nop word [rax + rax]
mov r12d, dword [r15 + 4]
lea r15, [r15 + 8]
mov r13d, dword [r15]
mov ebx, r13d
sar ebx, 8
mov esi, edi
sar esi, 8
cmp ebx, esi
jne 0x140041a1b
mov eax, r13d
sub eax, edi
imul eax, r12d
add r14d, eax
jmp 0x140041dd4
movzx eax, dil
mov edi, 0x100
sub edi, eax
imul edi, r12d
add edi, r14d
sar edi, 8
test edi, edi
jle 0x140041b7c
mov r9d, 1
mov r8d, esi
mov rcx, rbp
cmp edi, 0xff
jl 0x140041a83
lea rdx, [rsp + 0x20]
call fcn.140055cc0
nop
mov rax, qword [rbp + 0x48]
mov ecx, dword [rax + 0x10]
imul ecx, esi
mov eax, dword [rsp + 0x20]
mov r10d, eax
shr r10d, 8
and r10d, 0xff00ff
imul r10d, dword [rbp + 0x58]
and eax, 0xff00ff
imul eax, dword [rbp + 0x58]
jmp 0x140041ac3
lea rdx, [rsp + 0x24]
call fcn.140055cc0
nop
mov rax, qword [rbp + 0x48]
mov ecx, dword [rax + 0x10]
imul ecx, esi
mov r8d, dword [rbp + 0x58]
imul r8d, edi
shr r8d, 8
mov eax, dword [rsp + 0x24]
mov r10d, eax
shr r10d, 8
and r10d, 0xff00ff
imul r10d, r8d
and eax, 0xff00ff
imul eax, r8d
shr r10d, 8
movsxd r11, ecx
and r10d, 0xff00ff
mov ecx, r10d
shr ecx, 0x10
mov edx, 0x100
sub edx, ecx
add r11, qword [rbp + 0x70]
mov ecx, dword [r11]
mov r9d, ecx
and r9d, 0xff00ff
imul r9d, edx
shr eax, 8
shr r9d, 8
and eax, 0xff00ff
and r9d, 0xff00ff
shr ecx, 8
add r9d, eax
and ecx, 0xff00ff
imul ecx, edx
shr ecx, 8
and ecx, 0xff00ff
add r10d, ecx
mov eax, r10d
shr eax, 8
and eax, 0xff00ff
mov edx, 0x100
sub edx, eax
mov eax, r10d
shl eax, 8
shl edx, 8
or edx, eax
mov eax, r9d
shr eax, 8
and eax, 0xff00ff
mov ecx, 0x100
sub ecx, eax
mov eax, r10d
or ecx, r9d
shr eax, 8
xor edx, ecx
and eax, 0xff00ff
mov ecx, 0x100
sub ecx, eax
shl r10d, 8
shl ecx, 8
or ecx, r10d
and edx, 0xff00ff
xor edx, ecx
mov dword [r11], edx
test r12d, r12d
jle 0x140041dc4
inc esi
sub ebx, esi
test ebx, ebx
jle 0x140041dc4
cmp ebx, dword [rbp + 0x80]
jle 0x140041bc1
movsxd rdi, ebx
mov qword [rbp + 0x80], rdi
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea rcx, [rdi*4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
nop
mov qword [rbp + 0x78], rax
mov rdi, qword [rbp + 0x78]
mov r9d, ebx
mov r8d, esi
mov rdx, rdi
mov rcx, rbp
call fcn.140055cc0
nop
mov rax, qword [rbp + 0x48]
movsxd rcx, dword [rax + 0x10]
mov eax, ecx
imul eax, esi
movsxd r10, eax
add r10, qword [rbp + 0x70]
mov r11d, dword [rbp + 0x58]
imul r11d, r12d
sar r11d, 8
cmp r11d, 0xfe
jge 0x140041cf5
mov rsi, rcx
nop word [rax + rax]
mov edx, dword [rdi]
mov r9d, edx
shr r9d, 8
and r9d, 0xff00ff
imul r9d, r11d
shr r9d, 8
and r9d, 0xff00ff
mov eax, r9d
shr eax, 0x10
mov ecx, 0x100
sub ecx, eax
mov eax, dword [r10]
mov r8d, eax
and r8d, 0xff00ff
imul r8d, ecx
shr r8d, 8
and r8d, 0xff00ff
and edx, 0xff00ff
imul edx, r11d
shr edx, 8
and edx, 0xff00ff
add r8d, edx
shr eax, 8
and eax, 0xff00ff
imul eax, ecx
shr eax, 8
and eax, 0xff00ff
add r9d, eax
mov eax, r9d
shr eax, 8
and eax, 0xff00ff
mov edx, 0x100
sub edx, eax
shl edx, 8
mov eax, r9d
shl eax, 8
or edx, eax
mov eax, r8d
shr eax, 8
and eax, 0xff00ff
mov ecx, 0x100
sub ecx, eax
or ecx, r8d
xor edx, ecx
and edx, 0xff00ff
mov eax, r9d
shr eax, 8
and eax, 0xff00ff
mov ecx, 0x100
sub ecx, eax
shl ecx, 8
shl r9d, 8
or ecx, r9d
xor edx, ecx
mov dword [r10], edx
lea rdi, [rdi + 4]
add r10, rsi
dec ebx
test ebx, ebx
jg 0x140041c10
jmp 0x140041dc4
mov r11, rcx
nop dword [rax + rax]
mov edx, dword [rdi]
mov r9d, edx
shr r9d, 8
and r9d, 0xff00ff
mov eax, r9d
shr eax, 0x10
mov ecx, 0x100
sub ecx, eax
mov eax, dword [r10]
mov r8d, eax
and r8d, 0xff00ff
imul r8d, ecx
shr r8d, 8
and r8d, 0xff00ff
and edx, 0xff00ff
add r8d, edx
shr eax, 8
and eax, 0xff00ff
imul eax, ecx
shr eax, 8
and eax, 0xff00ff
add r9d, eax
mov eax, r9d
shr eax, 8
and eax, 0xff00ff
mov edx, 0x100
sub edx, eax
shl edx, 8
mov eax, r9d
shl eax, 8
or edx, eax
mov eax, r8d
shr eax, 8
and eax, 0xff00ff
mov ecx, 0x100
sub ecx, eax
or ecx, r8d
xor edx, ecx
and edx, 0xff00ff
mov eax, r9d
shr eax, 8
and eax, 0xff00ff
mov ecx, 0x100
sub ecx, eax
shl ecx, 8
shl r9d, 8
or ecx, r9d
xor edx, ecx
mov dword [r10], edx
lea rdi, [rdi + 4]
add r10, r11
dec ebx
test ebx, ebx
jg 0x140041d00
movzx r14d, r13b
imul r14d, r12d
mov r8d, dword [rsp + 0x90]
mov edi, r13d
sub r8d, 1
mov dword [rsp + 0x90], r8d
jns 0x1400419f0
mov ebx, dword [rsp + 0x98]
mov rsi, qword [rsp + 0x80]
sar r14d, 8
test r14d, r14d
jle 0x140041f4d
sar edi, 8
mov r9d, 1
mov r8d, edi
mov rcx, rbp
cmp r14d, 0xff
jl 0x140041e54
lea rdx, [rsp + 0x28]
call fcn.140055cc0
nop
mov rax, qword [rbp + 0x48]
mov ecx, dword [rax + 0x10]
imul ecx, edi
mov eax, dword [rsp + 0x28]
mov r10d, eax
shr r10d, 8
and r10d, 0xff00ff
imul r10d, dword [rbp + 0x58]
and eax, 0xff00ff
imul eax, dword [rbp + 0x58]
jmp 0x140041e94
lea rdx, [rsp + 0x2c]
call fcn.140055cc0
nop
mov rax, qword [rbp + 0x48]
mov ecx, dword [rax + 0x10]
imul ecx, edi
mov r8d, dword [rbp + 0x58]
imul r8d, r14d
shr r8d, 8
mov eax, dword [rsp + 0x2c]
mov r10d, eax
shr r10d, 8
and r10d, 0xff00ff
imul r10d, r8d
and eax, 0xff00ff
imul eax, r8d
shr r10d, 8
movsxd r11, ecx
and r10d, 0xff00ff
mov ecx, r10d
shr ecx, 0x10
mov edx, 0x100
sub edx, ecx
add r11, qword [rbp + 0x70]
mov ecx, dword [r11]
mov r9d, ecx
and r9d, 0xff00ff
imul r9d, edx
shr eax, 8
shr r9d, 8
and eax, 0xff00ff
and r9d, 0xff00ff
shr ecx, 8
add r9d, eax
and ecx, 0xff00ff
imul ecx, edx
shr ecx, 8
and ecx, 0xff00ff
add r10d, ecx
mov eax, r10d
shr eax, 8
and eax, 0xff00ff
mov edx, 0x100
sub edx, eax
mov eax, r10d
shl eax, 8
shl edx, 8
or edx, eax
mov eax, r9d
shr eax, 8
and eax, 0xff00ff
mov ecx, 0x100
sub ecx, eax
mov eax, r10d
or ecx, r9d
shr eax, 8
xor edx, ecx
and eax, 0xff00ff
mov ecx, 0x100
sub ecx, eax
shl r10d, 8
shl ecx, 8
or ecx, r10d
and edx, 0xff00ff
xor edx, ecx
mov dword [r11], edx
mov rcx, qword [rsp + 0x30]
inc ebx
mov dword [rsp + 0x98], ebx
cmp ebx, dword [rsi + 0x14]
jl 0x140041990
mov rbx, qword [rsp + 0x88]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret