Function at 0x4023d0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov rax, qword [0x0053a7a0]
mov rdx, qword [0x0053a7a8]
test rax, rax
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
jne 0x4024d2
test rdx, rdx
jne 0x4024d2
mov qword [rsp + 0x50], 0
mov ebx, 8
mov rsi, qword [0x00534fc0]
mov qword [rsp + 0x58], 0
lea r13, [rsp + 0x60]
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
jmp 0x40244f
sub rbx, 1
je 0x402493
xor ecx, ecx
mov r9d, 2
mov r8d, 0x10
mov rdx, r13
call qword [rsi]
test eax, eax
jne 0x402449
movdqa xmm0, xmmword [rsp + 0x60]
movq rax, xmm0
movaps xmmword [rsp + 0x50], xmm0
mov rcx, qword [rsp + 0x58]
test rax, rax
sete r8b
jne 0x402b24
test rcx, rcx
jne 0x4024a6
sub rbx, 1
jne 0x40244f
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x58]
test rax, rax
jne 0x402b1c
test rcx, rcx
mov rdx, rcx
sete r8b
xor eax, eax
test r8b, r8b
jne 0x402b2c
movq xmm0, rax
movq xmm4, rcx
punpcklqdq xmm0, xmm4
movaps xmmword [0x0053a7a0], xmm0
jmp 0x4024d7
lea r13, [rsp + 0x60]
movdqa xmm2, xmmword [0x0053a7a0]
xor r8d, r8d
xor r9d, r9d
xor ecx, ecx
movabs r11, 0xbeac0467eba5facb
movaps xmmword [rsp + 0x40], xmm2
nop word cs:[rax + rax]
bt r11, rcx
jae 0x40250c
xor r9, rax
xor r8, rdx
xor rdx, rax
ror rax, 9
add rcx, 1
mov r10, rdx
xor rax, rdx
ror rdx, 0x1c
shl r10, 0xe
xor rax, r10
cmp rcx, 0x40
jne 0x402500
movabs r11, 0xd86b048b86aa9922
xor ecx, ecx
nop word [rax + rax]
bt r11, rcx
jae 0x40254c
xor r9, rax
xor r8, rdx
xor rdx, rax
ror rax, 9
add rcx, 1
mov r10, rdx
xor rax, rdx
ror rdx, 0x1c
shl r10, 0xe
xor rax, r10
cmp rcx, 0x40
jne 0x402540
mov rax, qword [0x00535470]
mov rcx, r13
mov esi, 1
mov ebx, 5
movdqa xmm3, xmmword [rsp + 0x40]
mov qword [0x0053a7a8], r8
lea r8, [rsp + 0x38]
movabs r12, 0xaaaaaaaaaaaaaaab
mov qword [0x0053a7a0], r9
lea r15, [rsp + 0x40]
mov ebp, 0x68c8c4ad
mov r13, r8
mov qword [rsp + 0x30], 0
lea r14, [rsp + 0x50]
movups xmmword [rax], xmm3
lea rdi, [rsp + 0x30]
nop dword [rax + rax]
mov rax, rsi
imul ebx, ebx, 0x39
mov r8, rsi
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x50], 0
mul r12
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
lea r9d, [rbx + 0x2b]
shr rdx, 1
lea rax, [rdx + rdx*2]
sub r8, rax
mov eax, r9d
imul ebp
mov eax, r9d
sar eax, 0x1f
sar edx, 0xc
mov ebx, edx
sub ebx, eax
mov rax, qword [rsp + 0x30]
imul ebx, ebx, 0x2717
sub r9d, ebx
cmp r8, 1
mov ebx, r9d
je 0x402960
cmp r8, 2
mov rdx, rcx
mov r8, r13
je 0x4027e0
test rax, rax
je 0x402668
cmp ebx, dword [rax]
jle 0x4027a0
mov qword [rdx], rax
lea rdx, [rax + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x402650
mov qword [rdx], 0
mov r9, r15
mov rdx, r14
mov qword [r8], 0
mov rax, qword [rsp + 0x38]
lea r8d, [rbx + 1]
test rax, rax
je 0x4026a9
nop word [rax + rax]
cmp r8d, dword [rax]
jle 0x4027c0
mov qword [rdx], rax
lea rdx, [rax + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x402690
mov qword [rdx], 0
mov rdx, qword [rsp + 0x50]
mov qword [r9], 0
test rdx, rdx
je 0x402a80
mov rax, qword [rsp + 0x60]
mov r8, rdi
test rax, rax
je 0x4026fa
nop dword [rax]
nop word cs:[rax + rax]
mov r11d, dword [rdx + 4]
cmp dword [rax + 4], r11d
jge 0x402760
mov qword [r8], rax
lea r8, [rax + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x4026e0
mov qword [r8], rdx
mov rax, qword [rsp + 0x30]
mov r8, rdi
mov rdx, qword [rsp + 0x40]
test rax, rax
je 0x40273a
test rdx, rdx
je 0x402790
nop
nop word cs:[rax + rax]
mov r10d, dword [rdx + 4]
cmp dword [rax + 4], r10d
jge 0x402780
mov qword [r8], rax
lea r8, [rax + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x402720
mov qword [r8], rdx
add rsi, 1
cmp rsi, 0x7a120
jne 0x4025d0
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov qword [r8], rdx
mov r9, qword [rdx + 8]
lea r8, [rdx + 8]
test r9, r9
je 0x402a70
mov rdx, r9
jmp 0x4026e0
mov qword [r8], rdx
lea r8, [rdx + 8]
mov rdx, qword [rdx + 8]
test rdx, rdx
jne 0x402720
mov qword [r8], rax
jmp 0x40273d
mov qword [r8], rax
lea r8, [rax + 8]
mov rax, qword [rax + 8]
test rax, rax
jne 0x402650
jmp 0x402668
mov qword [r9], rax
lea r9, [rax + 8]
mov rax, qword [rax + 8]
test rax, rax
jne 0x402690
jmp 0x4026a9
test rax, rax
je 0x402808
nop
nop word cs:[rax + rax]
cmp ebx, dword [rax]
jle 0x402940
mov qword [rdx], rax
lea rdx, [rax + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x4027f0
mov qword [rdx], 0
mov r9, r15
mov rdx, r14
mov qword [r8], 0
mov rax, qword [rsp + 0x38]
lea r8d, [rbx + 1]
test rax, rax
je 0x402849
nop word [rax + rax]
cmp r8d, dword [rax]
jle 0x402920
mov qword [rdx], rax
lea rdx, [rax + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x402830
mov qword [rdx], 0
mov r8, rdi
mov rdx, qword [rsp + 0x50]
mov qword [r9], 0
mov rax, qword [rsp + 0x60]
test rax, rax
je 0x40289a
test rdx, rdx
je 0x402914
nop dword [rax]
nop word cs:[rax + rax]
mov r10d, dword [rdx + 4]
cmp dword [rax + 4], r10d
jge 0x402900
mov qword [r8], rax
lea r8, [rax + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x402880
mov qword [r8], rdx
mov rax, qword [rsp + 0x30]
mov r8, rdi
mov rdx, qword [rsp + 0x40]
test rax, rax
je 0x40273a
test rdx, rdx
je 0x402790
mov r11d, dword [rdx + 4]
cmp dword [rax + 4], r11d
jge 0x4028e4
mov qword [r8], rax
lea r8, [rax + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x40273a
mov r11d, dword [rdx + 4]
cmp dword [rax + 4], r11d
jl 0x4028c6
mov qword [r8], rdx
lea r8, [rdx + 8]
mov rdx, qword [rdx + 8]
jmp 0x4028b3
mov qword [r8], rdx
lea r8, [rdx + 8]
mov rdx, qword [rdx + 8]
test rdx, rdx
jne 0x402880
mov qword [r8], rax
jmp 0x40289d
mov qword [r9], rax
lea r9, [rax + 8]
mov rax, qword [rax + 8]
test rax, rax
jne 0x402830
jmp 0x402849
mov qword [r8], rax
lea r8, [rax + 8]
mov rax, qword [rax + 8]
test rax, rax
jne 0x4027f0
jmp 0x402808
test rax, rax
mov r8, r13
mov rdx, rcx
je 0x402988
nop dword [rax + rax]
cmp ebx, dword [rax]
jle 0x402a50
mov qword [rdx], rax
lea rdx, [rax + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x402970
mov qword [rdx], 0
mov r9, r15
mov rdx, r14
mov qword [r8], 0
mov rax, qword [rsp + 0x38]
lea r8d, [rbx + 1]
test rax, rax
je 0x4029c5
nop word [rax + rax]
cmp r8d, dword [rax]
jle 0x402a30
mov qword [rdx], rax
lea rdx, [rax + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x4029b0
mov qword [rdx], 0
mov r8, rdi
mov qword [r9], 0
mov rax, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x40]
test rax, rax
je 0x40273a
test rdx, rdx
je 0x402790
mov r11d, dword [rdx + 4]
cmp dword [rax + 4], r11d
jge 0x402a1a
mov qword [r8], rax
lea r8, [rax + 0x10]
mov rax, qword [rax + 0x10]
test rax, rax
je 0x40273a
mov r11d, dword [rdx + 4]
cmp dword [rax + 4], r11d
jl 0x4029fc
mov qword [r8], rdx
lea r8, [rdx + 8]
mov rdx, qword [rdx + 8]
jmp 0x4029e9
mov qword [r9], rax
lea r9, [rax + 8]
mov rax, qword [rax + 8]
test rax, rax
jne 0x4029b0
jmp 0x4029c5
mov qword [r8], rax
lea r8, [rax + 8]
mov rax, qword [rax + 8]
test rax, rax
jne 0x402970
jmp 0x402988
mov qword [rdx + 8], rax
jmp 0x4026fd
mov qword [rsp + 0x28], rcx
call fcn.004152a0
mov rcx, qword [0x00535470]
mov qword [rax + 8], 1
lea r10, [rax + 0x10]
mov qword [rax + 0x14], 0
mov rdx, r10
mov qword [rax + 0x1c], 0
mov dword [rax + 0x10], ebx
mov r8, qword [rcx + 8]
mov dword [rax + 0x24], 0
mov rax, qword [0x00535470]
mov rcx, qword [rsp + 0x28]
mov rax, qword [rax]
lea r9, [rax + r8]
xor r8, rax
ror rax, 9
mov r11, r8
xor rax, r8
ror r8, 0x1c
shl r11, 0xe
xor rax, r11
cmp r9, 0xfffffffffffffffc
ja 0x402acd
movq xmm0, rax
movq xmm1, r8
mov qword [rsp + 0x50], r10
mov rax, qword [0x00535470]
and r9d, 0x7fffffff
punpcklqdq xmm0, xmm1
movups xmmword [rax], xmm0
mov dword [r10 + 4], r9d
jmp 0x4026c5
mov rdx, rcx
jmp 0x4024bb
mov rdx, rcx
jmp 0x4024b2
mov ecx, 2
mov rbx, qword [fcn.00419de0]
call rbx
lea rdx, [0x0041fa10]
mov rcx, rax
call fcn.00402100
mov ecx, 2
call rbx
lea rdx, [0x0041e016]
mov rcx, rax
call fcn.00402100
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop word [rax + rax]