Function at 0x412cb0
Capabilities:
Encode data using xor

Disassembly:
push rbp
mov eax, 0x1460
mov rbp, rsp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0xa0
and rsp, 0xfffffffffffffff0
call fcn.004328e0
sub rsp, rax
movaps xmmword [rsp + 0x1460], xmm6
movaps xmmword [rsp + 0x1470], xmm7
movaps xmmword [rsp + 0x1480], xmm8
movaps xmmword [rsp + 0x1490], xmm9
movaps xmmword [rsp + 0x14a0], xmm10
movaps xmmword [rsp + 0x14b0], xmm11
movaps xmmword [rsp + 0x14c0], xmm12
movaps xmmword [rsp + 0x14d0], xmm13
movaps xmmword [rsp + 0x14e0], xmm14
movaps xmmword [rsp + 0x14f0], xmm15
mov rbx, qword [rdx]
mov rsi, qword [rdx + 8]
test rcx, rcx
je 0x412eb2
mov rax, rbx
mov edx, dword [rcx + 0x2c]
mov dword [rsp + 0x58], ebx
mov r15, rcx
shr rax, 0x20
mov byte [rsp + 0x5f], sil
mov qword [rsp + 0x50], rax
mov rax, qword [rcx + 8]
mov qword [rsp + 0x48], rax
cmp edx, 2
je 0x4137ea
lea r12, [rsp + 0x60]
xor eax, eax
mov ecx, pe_nt_image_headers64
mov r8d, dword [r15 + 0x1c]
mov rdi, r12
lea r9, [rsp + 0x460]
lea r13, [rsp + 0xc60]
rep stosq qword [rdi], rax
mov ecx, pe_nt_image_headers64
mov rdi, r9
rep stosq qword [rdi], rax
mov eax, ebx
mov qword [rsp + 0x460], rax
mov eax, dword [rsp + 0x50]
mov qword [rsp + 0x468], rax
movzx eax, sil
mov qword [rsp + 0x470], rax
mov eax, dword [r15 + 0x18]
mov qword [rsp + 0x478], rax
mov eax, dword [r15 + 0x10]
mov qword [rsp + 0x480], rax
mov eax, edx
mov qword [rsp + 0x488], rax
test r8d, r8d
je 0x412f28
lea r13, [rsp + 0xc60]
mov qword [rsp + 0x30], rbx
xor r11d, r11d
xor eax, eax
lea rdi, [rsp + 0x1060]
mov qword [rsp + 0x28], rsi
mov rbx, qword [rsp + 0x48]
mov rsi, r13
mov qword [rsp + 0x40], rdi
lea r14, [rsp + 0x860]
mov r13, r12
jmp 0x412e43
mov r12d, r12d
mov edx, r11d
add r11d, 1
mov rcx, qword [rsp + r12*8 + 0x60]
mov qword [rbx + rdx*8], rcx
mov r8d, dword [r15 + 0x1c]
cmp r11d, r8d
jae 0x412f1b
mov r12d, r11d
and r12d, 0x7f
jne 0x412e23
mov ecx, pe_nt_image_headers64
mov rdi, rsi
mov rdx, r9
mov r8, r14
rep stosq qword [rdi], rax
mov rdi, qword [rsp + 0x40]
mov ecx, pe_nt_image_headers64
mov qword [rsp + 0x38], r9
add qword [rsp + 0x490], 1
rep stosq qword [rdi], rax
mov ecx, pe_nt_image_headers64
mov rdi, r13
rep stosq qword [rdi], rax
mov ecx, pe_nt_image_headers64
mov rdi, r14
rep stosq qword [rdi], rax
mov rcx, rsi
call sym.fill_block_with_xor_1
mov rcx, qword [rsp + 0x40]
mov r8, r13
mov rdx, r14
call sym.fill_block_with_xor_1
mov r9, qword [rsp + 0x38]
xor eax, eax
jmp 0x412e23
movaps xmm6, xmmword [rsp + 0x1460]
movaps xmm7, xmmword [rsp + 0x1470]
movaps xmm8, xmmword [rsp + 0x1480]
movaps xmm9, xmmword [rsp + 0x1490]
movaps xmm10, xmmword [rsp + 0x14a0]
movaps xmm11, xmmword [rsp + 0x14b0]
movaps xmm12, xmmword [rsp + 0x14c0]
movaps xmm13, xmmword [rsp + 0x14d0]
movaps xmm14, xmmword [rsp + 0x14e0]
movaps xmm15, xmmword [rsp + 0x14f0]
lea rsp, [rbp - 0x38]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov r13, rsi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x28]
mov dword [rsp + 0x40], 1
xor r11d, r11d
test ebx, ebx
je 0x4137d8
mov r14, qword [rsp + 0x50]
mov r9d, dword [r15 + 0x20]
movzx eax, sil
xor edx, edx
mov dword [rsp + 0x38], eax
imul eax, r8d
mov r10, qword [r15]
mov ecx, pe_nt_image_headers64
mov ebx, r14d
mov rdi, r13
imul ebx, r9d
add ebx, eax
add ebx, r11d
mov eax, ebx
lea r12d, [rbx - 1]
div r9d
lea eax, [rbx + r9 - 1]
test edx, edx
cmove r12d, eax
mov esi, r12d
shl rsi, 0xa
add rsi, qword [r10 + 8]
rep movsq qword [rdi], qword [rsi]
cmp r11d, r8d
jae 0x412eb2
movzx edi, byte [rsp + 0x5f]
mov eax, r14d
mov esi, dword [rsp + 0x40]
mov qword [rsp + 0x50], rax
movdqa xmm7, xmmword [0x0058c900]
mov dword [rsp + 0x40], edi
movdqa xmm6, xmmword [0x0058c910]
mov eax, ebx
xor edx, edx
div r9d
mov eax, r12d
add r12d, 1
cmp edx, 1
jne 0x412fd2
lea eax, [rbx - 1]
mov r12d, ebx
mov rdi, qword [r10 + 8]
test esi, esi
je 0x41378d
mov rcx, qword [rsp + 0x48]
mov eax, r11d
mov rcx, qword [rcx + rax*8]
mov r14d, dword [r15 + 0x24]
mov rax, rcx
xor edx, edx
shr rax, 0x20
div r14
mov eax, dword [rsp + 0x58]
mov r10, rdx
mov r14, rdx
test eax, eax
jne 0x413722
cmp byte [rsp + 0x5f], 0
jne 0x4137ac
mov r14, qword [rsp + 0x50]
lea r8d, [r11 - 1]
mov ecx, ecx
mov eax, r8d
xor edx, edx
imul rcx, rcx
shr rcx, 0x20
imul rcx, rax
lea eax, [r8 - 1]
shr rcx, 0x20
sub rax, rcx
lea rcx, [rsp + 0x1060]
div r9
imul r9, r14
mov eax, ebx
shl rax, 0xa
add rdx, r9
shl rdx, 0xa
lea r9, [rdi + rdx]
add rdi, rax
xor eax, eax
movdqu xmm0, xmmword [r9 + rax]
pxor xmm0, xmmword [r13 + rax]
movaps xmmword [r13 + rax], xmm0
movaps xmmword [rcx + rax], xmm0
add rax, 0x10
cmp rax, 0x400
jne 0x413063
mov rax, r13
mov rdx, r13
movdqa xmm0, xmmword [rdx + 0x20]
movdqa xmm1, xmmword [rdx]
sub rdx, 0xffffffffffffff80
movdqa xmm2, xmmword [rdx - 0x50]
movdqa xmm13, xmmword [rdx - 0x20]
paddq xmm1, xmm0
movdqa xmm11, xmm0
pmuludq xmm11, xmmword [rdx - 0x80]
paddq xmm11, xmm11
paddq xmm11, xmm1
movdqa xmm1, xmmword [rdx - 0x70]
movdqa xmm9, xmm2
pmuludq xmm9, xmmword [rdx - 0x70]
paddq xmm9, xmm9
pxor xmm13, xmm11
movdqa xmm5, xmm11
movdqa xmm12, xmmword [rdx - 0x10]
paddq xmm1, xmm2
pshufd xmm13, xmm13, 0xb1
movdqa xmm14, xmmword [rdx - 0x30]
paddq xmm9, xmm1
movdqa xmm1, xmmword [rdx - 0x40]
movdqa xmm15, xmm13
pmuludq xmm15, xmmword [rdx - 0x40]
pxor xmm12, xmm9
paddq xmm15, xmm15
movdqa xmm3, xmm9
paddq xmm1, xmm13
pshufd xmm12, xmm12, 0xb1
paddq xmm15, xmm1
paddq xmm14, xmm12
movdqa xmm1, xmm12
pmuludq xmm1, xmmword [rdx - 0x30]
pxor xmm0, xmm15
paddq xmm1, xmm1
movdqa xmm10, xmm15
paddq xmm14, xmm1
pshufb xmm0, xmm7
pmuludq xmm5, xmm0
pxor xmm2, xmm14
paddq xmm11, xmm0
pshufb xmm2, xmm7
movdqa xmm8, xmm14
pmuludq xmm3, xmm2
paddq xmm9, xmm2
paddq xmm5, xmm5
paddq xmm5, xmm11
pxor xmm13, xmm5
paddq xmm3, xmm3
paddq xmm3, xmm9
movdqa xmm9, xmm13
pshufb xmm9, xmm6
pxor xmm12, xmm3
pmuludq xmm10, xmm9
pshufb xmm12, xmm6
movdqa xmm4, xmm9
pmuludq xmm8, xmm12
paddq xmm9, xmm15
paddq xmm14, xmm12
paddq xmm10, xmm10
paddq xmm10, xmm9
paddq xmm8, xmm8
pxor xmm0, xmm10
paddq xmm8, xmm14
movdqa xmm1, xmm0
pxor xmm2, xmm8
paddq xmm0, xmm0
psrlq xmm1, 0x3f
pxor xmm0, xmm1
movdqa xmm1, xmm2
paddq xmm2, xmm2
psrlq xmm1, 0x3f
pxor xmm2, xmm1
movdqa xmm1, xmm12
movdqa xmm9, xmm2
palignr xmm1, xmm4, 8
palignr xmm4, xmm12, 8
palignr xmm9, xmm0, 8
movdqa xmm11, xmm4
palignr xmm0, xmm2, 8
movdqa xmm4, xmm5
pmuludq xmm4, xmm9
movdqa xmm2, xmm3
paddq xmm5, xmm9
pmuludq xmm2, xmm0
paddq xmm3, xmm0
paddq xmm4, xmm4
paddq xmm4, xmm5
paddq xmm2, xmm2
movdqa xmm5, xmm8
pxor xmm11, xmm4
paddq xmm2, xmm3
pshufd xmm3, xmm11, 0xb1
pxor xmm1, xmm2
pmuludq xmm5, xmm3
paddq xmm8, xmm3
pshufd xmm1, xmm1, 0xb1
paddq xmm5, xmm5
paddq xmm5, xmm8
movdqa xmm8, xmm10
paddq xmm10, xmm1
pmuludq xmm8, xmm1
pxor xmm9, xmm5
pshufb xmm9, xmm7
paddq xmm8, xmm8
paddq xmm8, xmm10
movdqa xmm10, xmm4
paddq xmm4, xmm9
pmuludq xmm10, xmm9
pxor xmm0, xmm8
pshufb xmm0, xmm7
paddq xmm10, xmm10
paddq xmm4, xmm10
movdqa xmm10, xmm2
paddq xmm2, xmm0
pmuludq xmm10, xmm0
movaps xmmword [rdx - 0x80], xmm4
pxor xmm4, xmm3
movdqa xmm3, xmm4
pshufb xmm3, xmm6
movdqa xmm4, xmm3
paddq xmm10, xmm10
paddq xmm2, xmm10
movdqa xmm10, xmm5
movaps xmmword [rdx - 0x70], xmm2
pxor xmm2, xmm1
pmuludq xmm10, xmm3
paddq xmm3, xmm5
movdqa xmm1, xmm2
movdqa xmm5, xmm8
pshufb xmm1, xmm6
pmuludq xmm5, xmm1
movdqa xmm2, xmm1
paddq xmm1, xmm8
paddq xmm10, xmm10
paddq xmm3, xmm10
pxor xmm9, xmm3
movaps xmmword [rdx - 0x30], xmm3
paddq xmm5, xmm5
paddq xmm1, xmm5
movdqa xmm5, xmm9
paddq xmm9, xmm9
pxor xmm0, xmm1
psrlq xmm5, 0x3f
movaps xmmword [rdx - 0x40], xmm1
pxor xmm9, xmm5
movdqa xmm5, xmm0
paddq xmm0, xmm0
psrlq xmm5, 0x3f
pxor xmm0, xmm5
movdqa xmm5, xmm9
palignr xmm5, xmm0, 8
palignr xmm0, xmm9, 8
movaps xmmword [rdx - 0x50], xmm0
movdqa xmm0, xmm4
palignr xmm0, xmm2, 8
palignr xmm2, xmm4, 8
movaps xmmword [rdx - 0x60], xmm5
movaps xmmword [rdx - 0x20], xmm2
movaps xmmword [rdx - 0x10], xmm0
cmp rcx, rdx
jne 0x41308c
lea rdx, [r13 + 0x80]
movdqa xmm0, xmmword [rax + 0x100]
movdqa xmm13, xmmword [rax]
add rax, 0x10
movdqa xmm2, xmmword [rax + 0x170]
movdqa xmm12, xmmword [rax + 0x70]
movdqa xmm14, xmmword [rax + 0x2f0]
movdqa xmm1, xmm0
paddq xmm13, xmm0
pmuludq xmm1, xmmword [rax - 0x10]
paddq xmm1, xmm1
paddq xmm12, xmm2
movdqa xmm11, xmmword [rax + 0x370]
movdqa xmm15, xmmword [rax + 0x270]
paddq xmm13, xmm1
movdqa xmm1, xmm2
pmuludq xmm1, xmmword [rax + 0x70]
paddq xmm1, xmm1
paddq xmm12, xmm1
pxor xmm14, xmm13
movdqa xmm8, xmm13
movdqa xmm1, xmmword [rax + 0x1f0]
pshufd xmm14, xmm14, 0xb1
pxor xmm11, xmm12
movdqa xmm5, xmm12
movdqa xmm3, xmm14
paddq xmm1, xmm14
pmuludq xmm3, xmmword [rax + 0x1f0]
paddq xmm3, xmm3
paddq xmm1, xmm3
pshufd xmm11, xmm11, 0xb1
pxor xmm0, xmm1
movdqa xmm4, xmm11
paddq xmm15, xmm11
pmuludq xmm4, xmmword [rax + 0x270]
pshufb xmm0, xmm7
paddq xmm4, xmm4
movdqa xmm10, xmm1
paddq xmm15, xmm4
pmuludq xmm8, xmm0
paddq xmm13, xmm0
pxor xmm2, xmm15
movdqa xmm9, xmm15
pshufb xmm2, xmm7
pmuludq xmm5, xmm2
paddq xmm12, xmm2
paddq xmm8, xmm8
paddq xmm8, xmm13
pxor xmm14, xmm8
paddq xmm5, xmm5
movdqa xmm13, xmm14
paddq xmm5, xmm12
pshufb xmm13, xmm6
pmuludq xmm10, xmm13
pxor xmm11, xmm5
movdqa xmm4, xmm13
pshufb xmm11, xmm6
paddq xmm13, xmm1
movdqa xmm3, xmm4
pmuludq xmm9, xmm11
paddq xmm15, xmm11
movdqa xmm12, xmm11
palignr xmm3, xmm12, 8
paddq xmm10, xmm10
paddq xmm10, xmm13
pxor xmm0, xmm10
paddq xmm9, xmm9
paddq xmm9, xmm15
movdqa xmm1, xmm0
paddq xmm0, xmm0
pxor xmm2, xmm9
psrlq xmm1, 0x3f
pxor xmm0, xmm1
movdqa xmm1, xmm2
paddq xmm2, xmm2
psrlq xmm1, 0x3f
pxor xmm2, xmm1
movdqa xmm1, xmm12
movdqa xmm11, xmm2
palignr xmm1, xmm4, 8
movdqa xmm4, xmm8
palignr xmm11, xmm0, 8
palignr xmm0, xmm2, 8
movdqa xmm2, xmm5
pmuludq xmm4, xmm11
pmuludq xmm2, xmm0
paddq xmm8, xmm11
paddq xmm5, xmm0
paddq xmm4, xmm4
paddq xmm2, xmm2
paddq xmm4, xmm8
paddq xmm2, xmm5
movdqa xmm5, xmm9
pxor xmm3, xmm4
pxor xmm1, xmm2
movdqa xmm8, xmm11
pshufd xmm3, xmm3, 0xb1
pshufd xmm1, xmm1, 0xb1
pmuludq xmm5, xmm3
paddq xmm9, xmm3
paddq xmm5, xmm5
paddq xmm5, xmm9
movdqa xmm9, xmm10
paddq xmm10, xmm1
pmuludq xmm9, xmm1
pxor xmm8, xmm5
pshufb xmm8, xmm7
paddq xmm9, xmm9
paddq xmm9, xmm10
movdqa xmm10, xmm4
paddq xmm4, xmm8
pmuludq xmm10, xmm8
pxor xmm0, xmm9
pshufb xmm0, xmm7
paddq xmm10, xmm10
paddq xmm4, xmm10
movdqa xmm10, xmm2
paddq xmm2, xmm0
pmuludq xmm10, xmm0
movaps xmmword [rax - 0x10], xmm4
pxor xmm4, xmm3
movdqa xmm3, xmm4
pshufb xmm3, xmm6
movdqa xmm4, xmm3
paddq xmm10, xmm10
paddq xmm2, xmm10
movdqa xmm10, xmm5
movaps xmmword [rax + 0x70], xmm2
pxor xmm2, xmm1
pmuludq xmm10, xmm3
paddq xmm3, xmm5
movdqa xmm1, xmm2
movdqa xmm5, xmm9
pshufb xmm1, xmm6
pmuludq xmm5, xmm1
movdqa xmm2, xmm1
paddq xmm1, xmm9
paddq xmm10, xmm10
paddq xmm3, xmm10
pxor xmm8, xmm3
movaps xmmword [rax + 0x270], xmm3
paddq xmm5, xmm5
paddq xmm1, xmm5
movdqa xmm5, xmm8
paddq xmm8, xmm8
pxor xmm0, xmm1
psrlq xmm5, 0x3f
movaps xmmword [rax + 0x1f0], xmm1
pxor xmm8, xmm5
movdqa xmm5, xmm0
paddq xmm0, xmm0
psrlq xmm5, 0x3f
pxor xmm0, xmm5
movdqa xmm5, xmm8
palignr xmm5, xmm0, 8
palignr xmm0, xmm8, 8
movaps xmmword [rax + 0x170], xmm0
movdqa xmm0, xmm4
palignr xmm0, xmm2, 8
palignr xmm2, xmm4, 8
movaps xmmword [rax + 0xf0], xmm5
movaps xmmword [rax + 0x2f0], xmm2
movaps xmmword [rax + 0x370], xmm0
cmp rdx, rax
jne 0x4133a1
xor eax, eax
movdqa xmm0, xmmword [r13 + rax]
pxor xmm0, xmmword [rcx + rax]
movaps xmmword [r13 + rax], xmm0
movups xmmword [rdi + rax], xmm0
add rax, 0x10
cmp rax, 0x400
jne 0x4136e0
mov r8d, dword [r15 + 0x1c]
add r11d, 1
add ebx, 1
cmp r8d, r11d
jbe 0x412eb2
mov r9d, dword [r15 + 0x20]
mov r10, qword [r15]
jmp 0x412fb9
cmp rdx, qword [rsp + 0x50]
jne 0x41379a
lea eax, [r11 + r9 - 1]
sub eax, r8d
mov ecx, ecx
mov edx, eax
imul rcx, rcx
shr rcx, 0x20
imul rcx, rdx
lea edx, [rax - 1]
mov rax, rdx
shr rcx, 0x20
sub rax, rcx
cmp byte [rsp + 0x5f], 3
je 0x413763
mov ecx, dword [rsp + 0x40]
lea edx, [rcx + 1]
imul r8d, edx
add rax, r8
xor edx, edx
mov ecx, ebx
div r9
imul r9, r10
shl rcx, 0xa
lea r8, [rdi + rcx]
mov rcx, r13
add rdx, r9
shl rdx, 0xa
add rdx, rdi
call sym.fill_block_with_xor_1
jmp 0x413702
shl rax, 0xa
mov rcx, qword [rdi + rax]
jmp 0x412fea
mov eax, r9d
xor edx, edx
sub eax, r8d
test r11d, r11d
sete dl
sub eax, edx
jmp 0x413731
imul r8d, dword [rsp + 0x38]
cmp rdx, qword [rsp + 0x50]
jne 0x4137c8
mov r14, qword [rsp + 0x50]
lea r8d, [r11 + r8 - 1]
jmp 0x413020
xor eax, eax
test r11d, r11d
sete al
sub r8d, eax
jmp 0x413020
xor r11d, r11d
test sil, sil
sete r11b
add r11d, r11d
jmp 0x412f3b
test ebx, ebx
je 0x413807
mov dword [rsp + 0x40], 0
mov r8d, dword [r15 + 0x1c]
lea r13, [rsp + 0xc60]
jmp 0x412f30
cmp sil, 1
ja 0x4137ee
jmp 0x412d6c