Function at 0x5418c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x394
push ebx
mov ebx, ecx
push esi
push edi
mov dword [esp + 0x24], ebx
cmp byte [ebx + 0x41], 0
je 0x541b6e
mov edi, dword [ebx + 0x48]
mov dword [esp + 0x20], edi
test edi, edi
je 0x5418fe
push edi
push dword [ebx + 0x44]
lea eax, [esp + 0x220]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp byte [ebx + 0x40], 0
je 0x54191f
mov eax, dword [ebx + 0x38]
mov ecx, dword [ebx + 0x3c]
mov dword [esp + edi + 0x218], eax
mov dword [esp + edi + 0x21c], ecx
add edi, 8
mov dword [esp + 0x20], edi
lea ecx, [esp + 0x190]
call fcn.00565c10
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x14], eax
xor esi, esi
nop word [eax + eax]
push edi
lea edx, [esp + 0x21c]
lea ecx, [esp + 0x194]
call fcn.00565d20
mov eax, esi
lea ecx, [ebx + edi]
sub eax, edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x1c], eax
and ecx, 0xffffffc0
lea eax, [ebx + 0x40]
mov dword [esp + 0x28], ecx
cmp ecx, eax
jbe 0x541a8b
mov edi, ebx
lea ecx, [esp + 0x50]
and edi, 0xffffffc0
lea esi, [esp + esi + 0x228]
add edi, 0x40
mov eax, edi
sub eax, ebx
lea ebx, [esp + 0x218]
sub eax, ecx
add ebx, eax
add esi, edi
nop dword [eax]
cmp dword [0x5c1160], 2
jl 0x541a05
lea eax, [esi + 0x2c]
lea ecx, [esp + 0x50]
cmp ecx, eax
ja 0x5419c2
lea eax, [esi - 0x10]
lea ecx, [esp + 0x8c]
cmp ecx, eax
jae 0x541a05
movaps xmm1, xmmword [0x58db50]
movups xmm0, xmmword [esi - 0x10]
pshufb xmm0, xmm1
movups xmmword [esp + 0x50], xmm0
movups xmm0, xmmword [esi]
pshufb xmm0, xmm1
movups xmmword [esp + 0x60], xmm0
movups xmm0, xmmword [esi + 0x10]
pshufb xmm0, xmm1
movups xmmword [esp + 0x70], xmm0
movups xmm0, xmmword [esi + 0x20]
pshufb xmm0, xmm1
movups xmmword [esp + 0x80], xmm0
jmp 0x541a1f
lea edx, [esp + 0x50]
add edx, ebx
xor ecx, ecx
nop dword [eax]
mov eax, dword [edx + ecx*4]
bswap eax
mov dword [esp + ecx*4 + 0x50], eax
inc ecx
cmp ecx, 0x10
jb 0x541a10
lea eax, [esp + 0x58]
mov edx, 0x40
nop dword [eax + 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 edx, 1
jne 0x541a30
movups xmm0, xmmword [esp + 0x150]
add edi, 0x40
add ebx, 0x40
movups xmmword [esi - 0x10], xmm0
movups xmm0, xmmword [esp + 0x160]
movups xmmword [esi], xmm0
movups xmm0, xmmword [esp + 0x170]
movups xmmword [esi + 0x10], xmm0
movups xmm0, xmmword [esp + 0x180]
movups xmmword [esi + 0x20], xmm0
add esi, 0x40
cmp edi, dword [esp + 0x28]
jne 0x5419a0
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
mov eax, ecx
mov byte [esp + 0x18], cl
shr eax, 8
mov byte [esp + 0x19], al
mov eax, ecx
shr eax, 0x10
lea ecx, [esp + 0x190]
push 3
mov byte [esp + 0x1e], al
call fcn.00565d20
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x2c]
add esi, 0xfffffffd
mov eax, dword [esp + 0x14]
add ebx, 3
mov dword [esp + 0x1c], esi
test eax, 0x3fff
jne 0x541b14
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.00565ab0
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
mov al, byte [esp + 0x43]
mov esi, dword [esp + 0x1c]
shr ecx, 0xe
mov byte [ecx + edx + 0x5c], al
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
inc eax
mov dword [esp + 0x14], eax
cmp eax, 0x40000
jb 0x541940
lea edx, [esp + 0x30]
lea ecx, [esp + 0x190]
call fcn.00565ab0
mov ebx, dword [esp + 0x24]
xor edx, edx
lea ecx, [ebx + 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 0x541b41
mov byte [ebx + 0x41], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret