Function at 0x5808c0
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b75d0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x398
mov eax, dword [0x5fa040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x374], esi
cmp byte [esi + 0x41], 0
je 0x580bf9
mov edi, dword [esi + 0x48]
mov dword [ebp - 0x370], edi
test edi, edi
je 0x580933
push edi
push dword [esi + 0x44]
lea eax, [ebp - 0x120]
push eax
call fcn.0058aed0
add esp, 0xc
cmp byte [esi + 0x40], 0
je 0x580956
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x3c]
mov dword [ebp + edi - 0x120], eax
mov dword [ebp + edi - 0x11c], ecx
add edi, 8
mov dword [ebp - 0x370], edi
mov eax, dword [0x5faba0]
xorps xmm0, xmm0
mov dword [ebp - 0x2e0], eax
xor esi, esi
movlpd qword [ebp - 0x2d8], xmm0
xor eax, eax
movaps xmm0, xmmword [0x5d3030]
movaps xmmword [ebp - 0x2c0], xmm0
mov dword [ebp - 0x2b0], 0xc3d2e1f0
mov dword [ebp - 0x364], eax
nop
push edi
lea edx, [ebp - 0x120]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x2e0]
call fcn.00464180
lea eax, [esi + edi]
add esp, 4
mov ecx, eax
mov dword [ebp - 0x36c], eax
and ecx, 0xffffffc0
lea eax, [esi + 0x40]
mov dword [ebp - 0x378], ecx
cmp ecx, eax
jbe 0x580ad9
mov edi, esi
lea edx, [ebp - 0x120]
and edi, 0xffffffc0
add edi, 0x40
mov eax, edi
sub eax, esi
add edx, eax
nop
xor ecx, ecx
lea esi, [edx + 0x3c]
cmp dword [0x5fe854], 2
jl 0x580a50
lea eax, [ebp - 0x260]
cmp eax, esi
ja 0x580a02
lea eax, [ebp - 0x224]
cmp eax, edx
jae 0x580a50
movaps xmm1, xmmword [0x5d3020]
movups xmm0, xmmword [edx]
pshufb xmm0, xmm1
movups xmmword [ebp - 0x260], xmm0
movups xmm0, xmmword [esi - 0x2c]
pshufb xmm0, xmm1
movups xmmword [ebp - 0x250], xmm0
movups xmm0, xmmword [esi - 0x1c]
pshufb xmm0, xmm1
movups xmmword [ebp - 0x240], xmm0
movups xmm0, xmmword [esi - 0xc]
pshufb xmm0, xmm1
movups xmmword [ebp - 0x230], xmm0
jmp 0x580a63
mov eax, dword [esi + ecx*4 - 0x3c]
bswap eax
mov dword [ebp + ecx*4 - 0x260], eax
inc ecx
cmp ecx, 0x10
jb 0x580a50
lea eax, [ebp - 0x258]
mov esi, 0x40
nop
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 0x580a70
lea ecx, [ebp - 0x124]
lea eax, [edx + 0x3c]
cmp edx, ecx
ja 0x580a9c
lea ecx, [ebp - 0x160]
movups xmm0, xmmword [ebp - 0x160]
add edi, 0x40
movups xmmword [edx], xmm0
movups xmm0, xmmword [ebp - 0x150]
movups xmmword [edx + 0x10], xmm0
movups xmm0, xmmword [ebp - 0x140]
movups xmmword [edx + 0x20], xmm0
movups xmm0, xmmword [ebp - 0x130]
movups xmmword [edx + 0x30], xmm0
add edx, 0x40
cmp edi, dword [ebp - 0x378]
jne 0x5809e0
mov ecx, dword [ebp - 0x364]
mov eax, ecx
mov esi, dword [ebp - 0x36c]
shr eax, 8
mov byte [ebp - 0x367], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp - 0x368], cl
mov byte [ebp - 0x366], al
push 3
lea edx, [ebp - 0x368]
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x2e0]
call fcn.00464180
mov eax, dword [ebp - 0x364]
add esi, 3
add esp, 4
mov dword [ebp - 0x36c], esi
test eax, 0x3fff
jne 0x580b84
mov ecx, 0x20
lea esi, [ebp - 0x2e0]
lea edi, [ebp - 0x360]
rep movsd dword es:[edi], dword [esi]
lea edx, [ebp - 0x3a0]
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x360]
call fcn.00464230
mov ecx, dword [ebp - 0x364]
mov edx, dword [ebp - 0x374]
mov al, byte [ebp - 0x38d]
mov esi, dword [ebp - 0x36c]
shr ecx, 0xe
mov byte [ecx + edx + 0x5c], al
mov eax, dword [ebp - 0x364]
mov edi, dword [ebp - 0x370]
inc eax
mov dword [ebp - 0x364], eax
cmp eax, 0x40000
jb 0x580990
lea edx, [ebp - 0x3a0]
mov dword [ebp - 4], 3
lea ecx, [ebp - 0x2e0]
call fcn.00464230
mov esi, dword [ebp - 0x374]
xor edx, edx
lea ecx, [esi + 0x4d]
nop
movzx eax, byte [ebp + edx*4 - 0x39d]
lea ecx, [ecx + 4]
mov byte [ecx - 5], al
movzx eax, byte [ebp + edx*4 - 0x39e]
mov byte [ecx - 4], al
movzx eax, byte [ebp + edx*4 - 0x39f]
mov byte [ecx - 3], al
movzx eax, byte [ebp + edx*4 - 0x3a0]
inc edx
mov byte [ecx - 2], al
cmp edx, 4
jb 0x580bc0
mov byte [esi + 0x41], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00587d99
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret