Function at 0x401310
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x38
mov ebx, ecx
mov ecx, dword [edx + 8]
mov esi, dword [ebx + 0x30]
movzx eax, byte [ebx + 0x80]
test eax, eax
not esi
je 0x4013d3
mov edi, eax
mov ebp, 0x40
mov dword [esp], ecx
sub ebp, edi
mov dword [esp + 0xc], edi
sub ecx, ebp
mov dword [esp + 0x1c], ebp
jbe 0x401360
mov eax, ecx
shr ecx, 6
and eax, 0x3f
cmp eax, 1
mov al, 1
sbb ecx, 0xffffffff
cmp ecx, esi
ja 0x401954
mov ecx, dword [esp]
mov eax, dword [esp + 0xc]
mov esi, dword [esp + 0x1c]
mov dword [esp + 8], ebx
mov edi, ecx
lea eax, [ebx + eax + 0x40]
sub edi, esi
jae 0x4013f9
test ecx, ecx
je 0x401942
mov ebp, dword [edx]
mov edx, dword [edx + 4]
xor esi, esi
cmp ecx, 8
jb 0x40149b
mov ecx, dword [esp]
mov edi, edx
sub edi, ebp
cmp edi, 8
jb 0x401932
mov esi, ecx
xor edi, edi
and esi, 0xfffffff8
nop dword [eax]
movq xmm0, qword [ebp + edi]
movq xmm1, qword [eax + edi]
pxor xmm1, xmm0
movq qword [edx + edi], xmm1
add edi, 8
cmp esi, edi
jne 0x4013b0
mov ecx, dword [esp]
jmp 0x40193e
mov eax, ecx
mov edi, ecx
shr ecx, 6
and eax, 0x3f
cmp eax, 1
mov al, 1
sbb ecx, 0xffffffff
cmp ecx, esi
ja 0x401954
mov ebp, dword [edx]
mov esi, dword [edx + 4]
mov ecx, edi
jmp 0x4014ca
mov ecx, edi
mov edi, dword [edx]
mov ebx, dword [edx + 4]
mov dword [esp], ecx
lea ebp, [edi + esi]
add esi, ebx
mov dword [edx], ebp
mov dword [edx + 4], esi
mov dword [edx + 8], ecx
xor ecx, ecx
cmp byte [esp + 0xc], 0x38
ja 0x4014a8
mov edx, ebx
sub edx, edi
cmp edx, 0x10
jb 0x4014a8
xor ecx, ecx
cmp byte [esp + 0xc], 0x30
jbe 0x401462
mov edx, ecx
mov ecx, dword [esp + 0x1c]
and ecx, 0x78
nop dword [eax]
movq xmm0, qword [edi + edx]
movq xmm1, qword [eax + edx]
pxor xmm1, xmm0
movq qword [ebx + edx], xmm1
add edx, 8
cmp ecx, edx
jne 0x401440
cmp dword [esp + 0x1c], ecx
je 0x401492
jmp 0x4014a8
mov ecx, dword [esp + 0x1c]
xor edx, edx
and ecx, 0x70
nop dword [eax + eax]
movdqu xmm0, xmmword [edi + edx]
movdqu xmm1, xmmword [eax + edx]
pxor xmm1, xmm0
movdqu xmmword [ebx + edx], xmm1
add edx, 0x10
cmp ecx, edx
jne 0x401470
mov edx, dword [esp + 0x1c]
cmp edx, ecx
jne 0x4014a3
mov ecx, dword [esp]
mov ebx, dword [esp + 8]
jmp 0x4014ca
mov ecx, dword [esp]
jmp 0x401932
test dl, 8
jne 0x401433
mov dword [esp + 0xc], ebp
mov ebp, dword [esp + 0x1c]
movzx edx, byte [eax + ecx]
xor dl, byte [edi + ecx]
mov byte [ebx + ecx], dl
inc ecx
cmp ebp, ecx
jne 0x4014b0
mov ecx, dword [esp]
mov ebx, dword [esp + 8]
mov ebp, dword [esp + 0xc]
mov eax, ecx
mov edx, ecx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], esi
shr eax, 6
and edx, 0x3f
mov dword [esp + 4], edx
mov dword [esp + 0x34], eax
mov edx, ecx
movzx ecx, byte [section..data]
mov dword [esp], edx
cmp cl, 1
jne 0x401511
lea edx, [esp + 0x2c]
mov ecx, ebx
call fcn.004203f0
mov edx, dword [esp + 4]
test edx, edx
jne 0x4016f8
jmp 0x40194c
movdqu xmm0, xmmword [ebx + 0x30]
cmp edx, 0x40
jb 0x4016e7
movdqu xmm7, xmmword [ebx]
movdqu xmm5, xmmword [ebx + 0x10]
movdqu xmm3, xmmword [ebx + 0x20]
mov ecx, 1
mov edx, esi
mov edi, ebp
mov dword [esp + 8], ebx
movdqu xmmword [esp + 0x1c], xmm7
mov ebx, 0xa
movdqa xmm4, xmm5
movdqa xmm6, xmm0
movdqa xmm2, xmm3
nop word cs:[eax + eax]
nop dword [eax + eax]
paddd xmm7, xmm5
dec ebx
pxor xmm6, xmm7
movdqa xmm1, xmm6
pslld xmm6, 0x10
psrld xmm1, 0x10
por xmm6, xmm1
paddd xmm3, xmm6
pxor xmm5, xmm3
movdqa xmm1, xmm5
pslld xmm5, 0xc
psrld xmm1, 0x14
por xmm5, xmm1
paddd xmm7, xmm5
pxor xmm6, xmm7
pshufd xmm7, xmm7, 0x93
movdqa xmm1, xmm6
pslld xmm6, 8
psrld xmm1, 0x18
por xmm6, xmm1
paddd xmm3, xmm6
pshufd xmm6, xmm6, 0x4e
pxor xmm5, xmm3
pshufd xmm3, xmm3, 0x39
movdqa xmm1, xmm5
pslld xmm5, 7
psrld xmm1, 0x19
por xmm5, xmm1
paddd xmm7, xmm5
pxor xmm6, xmm7
movdqa xmm1, xmm6
pslld xmm6, 0x10
psrld xmm1, 0x10
por xmm6, xmm1
paddd xmm3, xmm6
pxor xmm5, xmm3
movdqa xmm1, xmm5
pslld xmm5, 0xc
psrld xmm1, 0x14
por xmm5, xmm1
paddd xmm7, xmm5
pxor xmm6, xmm7
pshufd xmm7, xmm7, 0x39
movdqa xmm1, xmm6
pslld xmm6, 8
psrld xmm1, 0x18
por xmm6, xmm1
paddd xmm3, xmm6
pshufd xmm6, xmm6, 0x4e
pxor xmm5, xmm3
pshufd xmm3, xmm3, 0x93
movdqa xmm1, xmm5
pslld xmm5, 7
psrld xmm1, 0x19
por xmm5, xmm1
jne 0x401560
movdqu xmm1, xmmword [edi + 0x30]
paddd xmm6, xmm0
paddd xmm3, xmm2
movdqu xmmword [esp + 0xc], xmm0
movdqa xmm0, xmm2
movdqu xmm2, xmmword [esp + 0x1c]
paddd xmm5, xmm4
xor ebx, ebx
cmp eax, ecx
setne bl
add ebx, ecx
pxor xmm6, xmm1
movdqu xmm1, xmmword [edi + 0x20]
paddd xmm7, xmm2
pxor xmm3, xmm1
movdqu xmm1, xmmword [edi + 0x10]
pxor xmm5, xmm1
movdqu xmm1, xmmword [edi]
pxor xmm7, xmm1
movdqu xmmword [edx], xmm7
movdqu xmmword [edx + 0x10], xmm5
movdqu xmmword [edx + 0x20], xmm3
movdqa xmm3, xmm0
movdqu xmm0, xmmword [esp + 0xc]
movdqu xmmword [edx + 0x30], xmm6
mov edx, ecx
movdqa xmm7, xmm2
movdqa xmm5, xmm4
shl edx, 6
lea edi, [ebp + edx]
add edx, esi
cmp eax, ecx
mov ecx, ebx
paddd xmm0, xmmword [section..rdata]
jne 0x401540
mov ebx, dword [esp + 8]
mov edx, dword [esp + 4]
movd dword [ebx + 0x30], xmm0
test edx, edx
je 0x40194c
mov ecx, dword [esp]
movzx eax, byte [section..data]
lea edi, [ebx + 0x40]
and ecx, 0xffffffc0
cmp al, 1
jne 0x401726
mov dword [esp + 0xc], ecx
mov ecx, ebx
mov edx, edi
call fcn.00420ac0
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 4]
jmp 0x401877
movdqu xmm4, xmmword [ebx]
movdqu xmm2, xmmword [ebx + 0x10]
movdqu xmm0, xmmword [ebx + 0x30]
movdqu xmm7, xmmword [ebx + 0x20]
mov eax, 0xa
movdqa xmm6, xmm4
movdqa xmm3, xmm2
movdqa xmm5, xmm0
movdqu xmmword [esp + 0xc], xmm7
paddd xmm6, xmm3
dec eax
pxor xmm5, xmm6
movdqa xmm1, xmm5
pslld xmm5, 0x10
psrld xmm1, 0x10
por xmm5, xmm1
paddd xmm7, xmm5
pxor xmm3, xmm7
movdqa xmm1, xmm3
pslld xmm3, 0xc
psrld xmm1, 0x14
por xmm3, xmm1
paddd xmm6, xmm3
pxor xmm5, xmm6
pshufd xmm6, xmm6, 0x93
movdqa xmm1, xmm5
pslld xmm5, 8
psrld xmm1, 0x18
por xmm5, xmm1
paddd xmm7, xmm5
pshufd xmm5, xmm5, 0x4e
pxor xmm3, xmm7
pshufd xmm7, xmm7, 0x39
movdqa xmm1, xmm3
pslld xmm3, 7
psrld xmm1, 0x19
por xmm3, xmm1
paddd xmm6, xmm3
pxor xmm5, xmm6
movdqa xmm1, xmm5
pslld xmm5, 0x10
psrld xmm1, 0x10
por xmm5, xmm1
paddd xmm7, xmm5
pxor xmm3, xmm7
movdqa xmm1, xmm3
pslld xmm3, 0xc
psrld xmm1, 0x14
por xmm3, xmm1
paddd xmm6, xmm3
pxor xmm5, xmm6
pshufd xmm6, xmm6, 0x39
movdqa xmm1, xmm5
pslld xmm5, 8
psrld xmm1, 0x18
por xmm5, xmm1
paddd xmm7, xmm5
pshufd xmm5, xmm5, 0x4e
pxor xmm3, xmm7
pshufd xmm7, xmm7, 0x93
movdqa xmm1, xmm3
pslld xmm3, 7
psrld xmm1, 0x19
por xmm3, xmm1
jne 0x401750
movdqu xmm1, xmmword [esp + 0xc]
movd eax, xmm0
paddd xmm6, xmm4
paddd xmm3, xmm2
paddd xmm5, xmm0
inc eax
movdqu xmmword [ebx + 0x40], xmm6
movdqu xmmword [ebx + 0x50], xmm3
paddd xmm7, xmm1
movdqu xmmword [ebx + 0x60], xmm7
movdqu xmmword [ebx + 0x70], xmm5
mov dword [ebx + 0x30], eax
add ebp, ecx
add esi, ecx
xor eax, eax
cmp edx, 8
jb 0x401920
mov ecx, esi
sub ecx, ebp
cmp ecx, 0x10
jb 0x401920
xor eax, eax
cmp edx, 0x10
jb 0x4018d8
mov ecx, dword [esp]
mov eax, edx
xor edx, edx
and ecx, 0xf
sub eax, ecx
nop word cs:[eax + eax]
movdqu xmm0, xmmword [ebp + edx]
movdqu xmm1, xmmword [edi + edx]
pxor xmm1, xmm0
movdqu xmmword [esi + edx], xmm1
add edx, 0x10
cmp eax, edx
jne 0x4018b0
mov edx, dword [esp + 4]
test ecx, ecx
je 0x40194c
cmp ecx, 8
jb 0x401920
mov ecx, eax
mov eax, edx
mov edx, dword [esp]
and edx, 7
sub eax, edx
mov dword [esp], edx
nop word [eax + eax]
movq xmm0, qword [ebp + ecx]
movq xmm1, qword [edi + ecx]
pxor xmm1, xmm0
movq qword [esi + ecx], xmm1
add ecx, 8
cmp eax, ecx
jne 0x4018f0
cmp dword [esp], 0
mov edx, dword [esp + 4]
je 0x40194c
nop word cs:[eax + eax]
nop
movzx ecx, byte [edi + eax]
xor cl, byte [ebp + eax]
mov byte [esi + eax], cl
inc eax
cmp edx, eax
jne 0x401920
jmp 0x40194c
movzx ebx, byte [eax + esi]
xor bl, byte [ebp + esi]
mov byte [edx + esi], bl
inc esi
cmp ecx, esi
jne 0x401932
add cl, byte [esp + 0xc]
mov ebx, dword [esp + 8]
mov edx, ecx
xor eax, eax
mov byte [ebx + 0x80], dl
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret