Function at 0x405950
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov rax, qword [0x0048f040]
mov rdx, qword [0x0048f048]
test rax, rax
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
jne 0x405a53
test rdx, rdx
jne 0x405a53
lea rax, [rsp + 0x70]
mov ebx, 8
mov qword [rsp + 0x60], 0
mov rsi, qword [0x0048bbc0]
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x20], rax
jmp 0x4059ea
sub rbx, 1
je 0x406079
xor ecx, ecx
mov r9d, 2
mov r8d, 0x10
mov rdx, qword [rsp + 0x20]
call qword [rsi]
test eax, eax
jne 0x4059e0
mov rax, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
test rax, rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rdx
jne 0x405a30
test rdx, rdx
je 0x4059e0
nop dword [rax + rax]
nop word cs:[rax + rax]
mov rsi, rdx
or rsi, rax
je 0x406088
movq xmm0, rax
movq xmm4, rdx
punpcklqdq xmm0, xmm4
movaps xmmword [0x0048f040], xmm0
jmp 0x405a5d
lea rsi, [rsp + 0x70]
mov qword [rsp + 0x20], rsi
movdqa xmm2, xmmword [0x0048f040]
xor r8d, r8d
xor r9d, r9d
xor ecx, ecx
movabs r11, 0xbeac0467eba5facb
movaps xmmword [rsp + 0x50], xmm2
nop dword [rax]
bt r11, rcx
jae 0x405a8c
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 0x405a80
movabs r11, 0xd86b048b86aa9922
xor ecx, ecx
nop word [rax + rax]
bt r11, rcx
jae 0x405acc
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 0x405ac0
lea rax, [rsp + 0x48]
movdqa xmm3, xmmword [rsp + 0x50]
xor ecx, ecx
mov esi, 1
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x60]
mov ebx, 5
movabs r14, 0xaaaaaaaaaaaaaaab
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x50]
mov r13d, 0x68c8c4ad
mov qword [0x0048f040], r9
lea r12, [rsp + 0x40]
mov qword [0x0048f048], r8
movaps xmmword [0x0048f060], xmm3
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x28], rax
nop dword [rax + rax]
nop word cs:[rax + rax]
mov rax, rsi
imul ebx, ebx, 0x39
mov r8, rsi
mul r14
lea r9d, [rbx + 0x2b]
shr rdx, 1
lea rax, [rdx + rdx*2]
sub r8, rax
mov eax, r9d
imul r13d
mov eax, r9d
sar eax, 0x1f
sar edx, 0xc
mov ebx, edx
sub ebx, eax
imul ebx, ebx, 0x2717
sub r9d, ebx
cmp r8, 1
lea ebp, [r9 + 1]
mov ebx, r9d
je 0x405d80
cmp r8, 2
je 0x405e90
test rcx, rcx
mov r15, qword [rsp + 0x20]
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], 0
mov rdi, qword [rsp + 0x38]
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x70], 0
je 0x405c13
nop
nop word cs:[rax + rax]
cmp ebx, dword [rcx]
jle 0x405d50
mov rdx, rcx
mov rcx, rdi
call fcn.00405860
mov rax, qword [rdi]
mov rcx, qword [rax + 0x10]
lea rdi, [rax + 0x10]
test rcx, rcx
jne 0x405bf0
xor edx, edx
mov rcx, rdi
call fcn.00405860
xor edx, edx
mov rcx, r15
call fcn.00405860
mov r8, qword [rsp + 0x30]
mov r9d, ebp
mov rdx, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x70]
call fcn.004058d0
mov rbp, qword [rsp + 0x50]
test rbp, rbp
je 0x406010
mov rdi, qword [rsp + 0x48]
mov rcx, r12
test rdi, rdi
je 0x405c81
nop dword [rax]
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jge 0x405d20
mov rdx, rdi
call fcn.00405860
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
jne 0x405c60
mov rdx, rbp
call fcn.00405860
mov rdi, qword [rsp + 0x40]
mov rcx, r12
mov rbp, qword [rsp + 0x60]
test rdi, rdi
je 0x405cbd
test rbp, rbp
je 0x405cf5
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jge 0x405ce0
mov rdx, rdi
call fcn.00405860
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
jne 0x405ca0
mov rdx, rbp
add rsi, 1
call fcn.00405860
cmp rsi, 0x7a120
je 0x405d0a
mov rcx, qword [rsp + 0x40]
jmp 0x405b60
mov rdx, rbp
call fcn.00405860
lea rcx, [rbp + 8]
mov rbp, qword [rbp + 8]
test rbp, rbp
jne 0x405ca0
mov rdx, rdi
add rsi, 1
call fcn.00405860
cmp rsi, 0x7a120
jne 0x405cd2
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, rbp
call fcn.00405860
lea rcx, [rbp + 8]
mov rbp, qword [rbp + 8]
test rbp, rbp
jne 0x405c60
mov rdx, rdi
call fcn.00405860
jmp 0x405c89
mov rdx, rcx
mov rcx, r15
call fcn.00405860
mov rax, qword [r15]
mov rcx, qword [rax + 8]
lea r15, [rax + 8]
test rcx, rcx
jne 0x405bf0
jmp 0x405c13
mov qword [rsp + 0x70], 0
mov rdx, qword [rsp + 0x20]
mov qword [rsp + 0x60], 0
mov r8, qword [rsp + 0x38]
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
call fcn.004058d0
mov rdx, qword [rsp + 0x48]
mov r15, qword [rsp + 0x28]
mov rdi, qword [rsp + 0x30]
test rdx, rdx
je 0x405df0
nop word [rax + rax]
cmp dword [rdx], ebp
jge 0x405e60
mov rcx, rdi
call fcn.00405860
mov rax, qword [rdi]
mov rdx, qword [rax + 0x10]
lea rdi, [rax + 0x10]
test rdx, rdx
jne 0x405dd0
xor edx, edx
mov rcx, rdi
call fcn.00405860
xor edx, edx
mov rcx, r15
call fcn.00405860
mov rdi, qword [rsp + 0x70]
mov rcx, r12
mov rbp, qword [rsp + 0x50]
test rdi, rdi
je 0x405cbd
test rbp, rbp
je 0x405cf5
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jge 0x405e4c
mov rdx, rdi
call fcn.00405860
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
je 0x405cbd
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jl 0x405e2b
mov rdx, rbp
call fcn.00405860
lea rcx, [rbp + 8]
mov rbp, qword [rbp + 8]
jmp 0x405e1a
mov rcx, r15
call fcn.00405860
mov rax, qword [r15]
mov rdx, qword [rax + 8]
lea r15, [rax + 8]
test rdx, rdx
jne 0x405dd0
jmp 0x405df0
mov qword [rsp + 0x70], 0
mov rdx, qword [rsp + 0x20]
mov qword [rsp + 0x60], 0
mov r8, qword [rsp + 0x38]
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
call fcn.004058d0
mov rdx, qword [rsp + 0x48]
mov r15, qword [rsp + 0x28]
mov rdi, qword [rsp + 0x30]
test rdx, rdx
je 0x405f00
nop word [rax + rax]
cmp dword [rdx], ebp
jge 0x405fe0
mov rcx, rdi
call fcn.00405860
mov rax, qword [rdi]
mov rdx, qword [rax + 0x10]
lea rdi, [rax + 0x10]
test rdx, rdx
jne 0x405ee0
xor edx, edx
mov rcx, rdi
call fcn.00405860
xor edx, edx
mov rcx, r15
call fcn.00405860
mov rdi, qword [rsp + 0x70]
mov rcx, r12
mov rbp, qword [rsp + 0x60]
test rdi, rdi
je 0x405f4d
test rbp, rbp
je 0x405fc9
nop
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jge 0x405fb0
mov rdx, rdi
call fcn.00405860
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
jne 0x405f30
mov rdx, rbp
call fcn.00405860
mov rdi, qword [rsp + 0x40]
mov rcx, r12
mov rbp, qword [rsp + 0x50]
test rdi, rdi
je 0x405cbd
test rbp, rbp
je 0x405cf5
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jge 0x405f9d
mov rdx, rdi
call fcn.00405860
lea rcx, [rdi + 0x10]
mov rdi, qword [rdi + 0x10]
test rdi, rdi
je 0x405cbd
mov eax, dword [rbp + 4]
cmp dword [rdi + 4], eax
jl 0x405f7c
mov rdx, rbp
call fcn.00405860
lea rcx, [rbp + 8]
mov rbp, qword [rbp + 8]
jmp 0x405f6b
mov rdx, rbp
call fcn.00405860
lea rcx, [rbp + 8]
mov rbp, qword [rbp + 8]
test rbp, rbp
jne 0x405f30
mov rdx, rdi
call fcn.00405860
jmp 0x405f55
mov rcx, r15
call fcn.00405860
mov rax, qword [r15]
mov rdx, qword [rax + 8]
lea r15, [rax + 8]
test rdx, rdx
jne 0x405ee0
jmp 0x405f00
mov rcx, qword [0x0048bd90]
call fcn.0040fc50
mov dword [rax], ebx
mov rbp, rax
mov rdx, qword [0x0048f068]
mov rax, qword [0x0048f060]
lea rcx, [rdx + rax]
xor rdx, rax
ror rax, 9
mov r8, rdx
xor rax, rdx
ror rdx, 0x1c
shl r8, 0xe
xor rax, r8
cmp rcx, 0xfffffffffffffffc
ja 0x40602f
movq xmm0, rax
movq xmm1, rdx
and ecx, 0x7fffffff
punpcklqdq xmm0, xmm1
movaps xmmword [0x0048f060], xmm0
mov dword [rbp + 4], ecx
mov qword [rsp + 0x50], rbp
jmp 0x405c4c
mov rdx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x60]
jmp 0x405a30
mov ecx, 2
mov rbx, qword [fcn.00415180]
call rbx
lea rdx, [0x0041c050]
mov rcx, rax
call fcn.00401f30
mov ecx, 2
call rbx
lea rdx, [0x0041b09f]
mov rcx, rax
call fcn.00401f30
mov ecx, 1
call sub.msvcrt.dll_exit_20
nop
nop word cs:[rax + rax]