Function at 0x5412a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x394
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], edi
cmp byte [edi + 0x41], 0
je 0x54153f
mov esi, dword [edi + 0x48]
mov dword [esp + 0x24], esi
test esi, esi
je 0x5412de
push esi
push dword [edi + 0x44]
lea eax, [esp + 0x220]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp byte [edi + 0x40], 0
je 0x5412ff
mov eax, dword [edi + 0x38]
mov ecx, dword [edi + 0x3c]
mov dword [esp + esi + 0x218], eax
mov dword [esp + esi + 0x21c], ecx
add esi, 8
mov dword [esp + 0x24], esi
lea ecx, [esp + 0x190]
call fcn.00565320
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x18], eax
nop dword [eax]
nop word [eax + eax]
push esi
lea edx, [esp + 0x21c]
lea ecx, [esp + 0x194]
call fcn.00565430
lea eax, [ebx + esi]
mov ecx, eax
mov dword [esp + 0x2c], eax
and ecx, 0xffffffc0
lea eax, [ebx + 0x40]
mov dword [esp + 0x28], ecx
cmp ecx, eax
jbe 0x54146f
mov edi, ebx
lea edx, [esp + 0x218]
and edi, 0xffffffc0
add edi, 0x40
mov eax, edi
sub eax, ebx
mov ebx, ecx
add edx, eax
nop word [eax + eax]
xor ecx, ecx
lea esi, [edx + 0x3c]
cmp dword [0x5c015c], 2
jl 0x5413e0
lea eax, [esp + 0x50]
cmp eax, esi
ja 0x541391
lea eax, [esp + 0x8c]
cmp eax, edx
jae 0x5413e0
movups xmm0, xmmword [edx]
pshufb xmm0, xmmword [0x58cab0]
movups xmmword [esp + 0x50], xmm0
movups xmm0, xmmword [esi - 0x2c]
pshufb xmm0, xmmword [0x58cab0]
movups xmmword [esp + 0x60], xmm0
movups xmm0, xmmword [esi - 0x1c]
pshufb xmm0, xmmword [0x58cab0]
movups xmmword [esp + 0x70], xmm0
movups xmm0, xmmword [esi - 0xc]
pshufb xmm0, xmmword [0x58cab0]
movups xmmword [esp + 0x80], xmm0
jmp 0x5413f0
mov eax, dword [esi + ecx*4 - 0x3c]
bswap eax
mov dword [esp + ecx*4 + 0x50], eax
inc ecx
cmp ecx, 0x10
jb 0x5413e0
lea eax, [esp + 0x58]
mov esi, 0x40
nop dword [eax]
mov ecx, dword [eax + 0x2c]
lea eax, [eax + 4]
xor ecx, dword [eax + 0x14]
xor ecx, dword [eax - 0xc]
xor ecx, dword [eax - 4]
rol ecx, 1
mov dword [eax + 0x34], ecx
sub esi, 1
jne 0x541400
lea ecx, [esp + 0x18c]
lea eax, [edx + 0x3c]
cmp edx, ecx
ja 0x54142e
lea ecx, [esp + 0x150]
movups xmm0, xmmword [esp + 0x150]
add edi, 0x40
movups xmmword [edx], xmm0
movups xmm0, xmmword [esp + 0x160]
movups xmmword [edx + 0x10], xmm0
movups xmm0, xmmword [esp + 0x170]
movups xmmword [edx + 0x20], xmm0
movups xmm0, xmmword [esp + 0x180]
movups xmmword [edx + 0x30], xmm0
add edx, 0x40
cmp edi, ebx
jne 0x541370
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
mov eax, ecx
mov byte [esp + 0x1c], cl
shr eax, 8
mov byte [esp + 0x1d], al
mov eax, ecx
shr eax, 0x10
lea ecx, [esp + 0x190]
push 3
mov byte [esp + 0x22], al
call fcn.00565430
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
add ebx, 3
test eax, 0x3fff
jne 0x5414e9
mov ecx, 0x20
lea esi, [esp + 0x190]
lea edi, [esp + 0x320]
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x30]
lea ecx, [esp + 0x320]
call fcn.005651c0
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
mov al, byte [esp + 0x43]
shr ecx, 0xe
mov byte [ecx + edi + 0x5c], al
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
inc eax
mov dword [esp + 0x18], eax
cmp eax, 0x40000
jb 0x541320
lea edx, [esp + 0x30]
lea ecx, [esp + 0x190]
call fcn.005651c0
xor edx, edx
lea ecx, [edi + 0x4d]
movzx eax, byte [esp + edx*4 + 0x33]
lea ecx, [ecx + 4]
mov byte [ecx - 5], al
movzx eax, byte [esp + edx*4 + 0x32]
mov byte [ecx - 4], al
movzx eax, byte [esp + edx*4 + 0x31]
mov byte [ecx - 3], al
movzx eax, byte [esp + edx*4 + 0x30]
inc edx
mov byte [ecx - 2], al
cmp edx, 4
jb 0x541512
mov byte [edi + 0x41], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret