Function at 0x491370
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x270
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
test eax, eax
mov dword [esp + 0x10], eax
je 0x49160a
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x491602
mov ebx, dword [ebp + 0x14]
xor edi, edi
jmp 0x4913bd
add ebx, dword [esp + 0xc]
inc edi
test esi, esi
je 0x491602
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], esi
cmp esi, eax
cmovb eax, esi
mov dword [esp + 0xc], eax
movzx eax, byte [0x574a24]
movzx eax, al
push eax
call fcn.00478240
add esp, 4
cmp al, 2
jne 0x4915db
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
lea ecx, [esp + 0xe0]
movaps xmmword [esp + 0xd0], xmm0
movaps xmmword [esp + 0xc0], xmm0
movaps xmmword [esp + 0xb0], xmm0
movaps xmmword [esp + 0xa0], xmm0
movaps xmmword [esp + 0x90], xmm0
movaps xmmword [esp + 0x80], xmm0
movaps xmmword [esp + 0x70], xmm0
movaps xmmword [esp + 0x60], xmm0
movsd xmm1, qword [eax + 0x30]
movsd xmm2, qword [eax + 0x28]
movsd xmm0, qword [eax + 0x38]
movsd qword [ecx + 0x30], xmm1
movsd xmm1, qword [eax + 0x20]
movsd qword [ecx + 0x28], xmm2
movsd xmm2, qword [eax + 0x18]
movsd qword [ecx + 0x38], xmm0
movsd qword [ecx + 0x20], xmm1
movsd xmm1, qword [eax + 0x10]
movsd qword [ecx + 0x18], xmm2
movsd xmm2, qword [eax]
movsd qword [ecx + 0x10], xmm1
movsd xmm1, qword [eax + 8]
movsd qword [ecx], xmm2
movsd qword [ecx + 8], xmm1
mov dword [esp + 0x124], 0
mov dword [esp + 0x120], 0
mov dword [esp + 0x128], eax
mov dword [esp + 0x130], 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
lea esi, [esp + 0x68]
push esi
call fcn.004806d0
add esp, 0xc
mov eax, edi
mov dword [esp + 0x14], edi
bswap eax
mov dword [esp + 0x140], eax
push 4
lea edi, [esp + 0x144]
push edi
push esi
call fcn.004806d0
add esp, 0xc
push 0xd8
push esi
push edi
call fcn.004f5b80
add esp, 0xc
mov eax, dword [esp + 0x208]
lea edx, [esp + 0x218]
mov ecx, 0x14
lea esi, [esp + 0x1c0]
mov edi, edx
mov eax, dword [eax + 0x48]
rep movsd dword es:[edi], dword [esi]
cmp eax, 0x81
jae 0x49160a
push dword [esp + 0x210]
push eax
lea eax, [esp + 0x148]
push eax
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.004803b0
add esp, 0x14
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x18]
mov eax, dword [eax + 0x40]
cmp eax, 0x41
jae 0x49160a
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 0x14]
sub esi, ecx
cmp ecx, eax
cmovb eax, ecx
test eax, eax
je 0x4913b0
xor ecx, ecx
cmp eax, 8
jb 0x4915f0
xor ecx, ecx
cmp eax, 0x20
jb 0x4915b5
mov ecx, eax
xor edx, edx
and ecx, 0xffffffe0
nop dword [eax + eax]
movups xmm0, xmmword [esp + edx + 0x1c]
movups xmm2, xmmword [ebx + edx]
movups xmm1, xmmword [esp + edx + 0x2c]
movups xmm3, xmmword [ebx + edx + 0x10]
xorps xmm2, xmm0
xorps xmm3, xmm1
movups xmmword [ebx + edx], xmm2
movups xmmword [ebx + edx + 0x10], xmm3
add edx, 0x20
cmp ecx, edx
jne 0x491580
cmp eax, ecx
je 0x4913b0
test al, 0x18
je 0x4915f0
mov edx, ecx
mov ecx, eax
and ecx, 0xfffffff8
nop dword [eax]
movsd xmm0, qword [esp + edx + 0x1c]
movsd xmm1, qword [ebx + edx]
xorps xmm1, xmm0
movlps qword [ebx + edx], xmm1
add edx, 8
cmp ecx, edx
jne 0x4915c0
jmp 0x4915f9
mov ecx, 0x574a24
call fcn.00504f00
jmp 0x4913e9
movzx edx, byte [esp + ecx + 0x1c]
xor byte [ebx + ecx], dl
inc ecx
cmp eax, ecx
jne 0x4915f0
jmp 0x4913b0
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
ud2