Function at 0x5a5ff0
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
sub esp, 0x1c
cmp byte [edx + 4], 0
je 0x5a6347
movzx ecx, byte [eax]
push ebx
push edi
movzx edi, byte [eax + 1]
shl ecx, 0x18
shl edi, 0x10
or ecx, edi
movzx edi, byte [eax + 2]
shl edi, 8
or ecx, edi
movzx edi, byte [eax + 3]
or ecx, edi
xor ecx, dword [edx + 0x1e8]
movzx edi, byte [eax + 4]
movzx ebx, byte [eax + 9]
mov dword [ebp - 8], ecx
movzx ecx, byte [eax + 5]
shl ecx, 0x10
shl edi, 0x18
or edi, ecx
movzx ecx, byte [eax + 6]
shl ecx, 8
or edi, ecx
movzx ecx, byte [eax + 7]
or edi, ecx
movzx ecx, byte [eax + 8]
xor edi, dword [edx + 0x1ec]
shl ebx, 0x10
shl ecx, 0x18
or ecx, ebx
movzx ebx, byte [eax + 0xa]
shl ebx, 8
or ecx, ebx
movzx ebx, byte [eax + 0xb]
or ecx, ebx
xor ecx, dword [edx + 0x1f0]
movzx edx, byte [eax + 0xc]
movzx ebx, byte [eax + 0xd]
shl ebx, 0x10
shl edx, 0x18
or edx, ebx
movzx ebx, byte [eax + 0xe]
movzx eax, byte [eax + 0xf]
shl ebx, 8
or ebx, eax
or ebx, edx
mov edx, dword [ebp + 8]
xor ebx, dword [edx + 0x1f4]
mov eax, 0xff
mov dword [ebp - 4], ebx
mov ebx, dword [edx + 0x3d0]
mov dword [ebp - 0x1c], ebx
cmp ebx, 1
jle 0x5a61d9
add edx, 0x210
dec ebx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], ebx
mov edx, dword [ebp - 4]
sar edx, 8
and edx, eax
mov edx, dword [edx*4 + 0x614a38]
mov ebx, edi
sar ebx, 0x18
and ebx, eax
xor edx, dword [ebx*4 + 0x614238]
mov ebx, dword [ebp - 8]
sar ebx, 0x10
and ebx, eax
xor edx, dword [ebx*4 + 0x614638]
mov ebx, ecx
and ebx, eax
xor edx, dword [ebx*4 + 0x614e38]
mov ebx, dword [ebp - 0xc]
xor edx, dword [ebx - 4]
mov ebx, edi
sar ebx, 0x10
and ebx, eax
mov dword [ebp - 0x14], edx
mov edx, ecx
sar edx, 0x18
and edx, eax
mov edx, dword [edx*4 + 0x614238]
xor edx, dword [ebx*4 + 0x614638]
mov ebx, dword [ebp - 8]
sar ebx, 8
and ebx, eax
xor edx, dword [ebx*4 + 0x614a38]
mov ebx, dword [ebp - 4]
and ebx, eax
xor edx, dword [ebx*4 + 0x614e38]
mov ebx, dword [ebp - 0xc]
xor edx, dword [ebx]
mov ebx, ecx
sar ebx, 0x10
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 4]
and ebx, eax
sar edx, 0x18
and edx, eax
mov edx, dword [edx*4 + 0x614238]
xor edx, dword [ebx*4 + 0x614638]
mov ebx, edi
sar ebx, 8
and ebx, eax
xor edx, dword [ebx*4 + 0x614a38]
mov ebx, dword [ebp - 8]
and ebx, eax
xor edx, dword [ebx*4 + 0x614e38]
mov ebx, dword [ebp - 0xc]
xor edx, dword [ebx + 4]
mov ebx, dword [ebp - 4]
sar ebx, 0x10
sar ecx, 8
and ebx, eax
mov ebx, dword [ebx*4 + 0x614638]
and ecx, eax
xor ebx, dword [ecx*4 + 0x614a38]
mov ecx, dword [ebp - 8]
sar ecx, 0x18
and ecx, eax
xor ebx, dword [ecx*4 + 0x614238]
mov ecx, dword [ebp - 0xc]
add dword [ebp - 0xc], 0x20
and edi, eax
xor ebx, dword [edi*4 + 0x614e38]
mov edi, dword [ebp - 0x14]
xor ebx, dword [ecx - 8]
dec dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edx
jne 0x5a60c5
mov edx, dword [ebp + 8]
mov ebx, dword [ebp - 0x1c]
shl ebx, 5
lea ebx, [ebx + edx + 0x1e8]
mov edx, dword [ebp - 8]
sar edx, 0x18
and edx, eax
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebx]
mov dword [ebp + 8], ebx
sar ebx, 0x18
xor bl, byte [edx + 0x613138]
mov edx, dword [ebp - 4]
sar edx, 0x10
mov byte [esi], bl
mov ebx, dword [ebp + 8]
and edx, eax
sar ebx, 0x10
xor bl, byte [edx + 0x613138]
mov edx, ecx
sar edx, 8
mov byte [esi + 1], bl
mov ebx, dword [ebp + 8]
and edx, eax
sar ebx, 8
xor bl, byte [edx + 0x613138]
mov edx, edi
and edx, eax
mov byte [esi + 2], bl
mov dl, byte [edx + 0x613138]
xor dl, byte [ebp + 8]
mov ebx, edi
mov byte [esi + 3], dl
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 4]
mov dword [ebp + 8], edx
sar edx, 0x18
sar ebx, 0x18
and ebx, eax
xor dl, byte [ebx + 0x613138]
mov ebx, dword [ebp + 8]
mov byte [esi + 4], dl
mov edx, dword [ebp - 8]
sar edx, 0x10
and edx, eax
sar ebx, 0x10
xor bl, byte [edx + 0x613138]
mov edx, dword [ebp - 4]
mov byte [esi + 5], bl
mov ebx, dword [ebp + 8]
sar edx, 8
and edx, eax
sar ebx, 8
xor bl, byte [edx + 0x613138]
mov edx, ecx
and edx, eax
mov byte [esi + 6], bl
mov dl, byte [edx + 0x613138]
xor dl, byte [ebp + 8]
mov ebx, ecx
mov byte [esi + 7], dl
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 8]
mov dword [ebp + 8], edx
sar ebx, 0x18
sar edx, 0x18
and ebx, eax
xor dl, byte [ebx + 0x613138]
mov ebx, dword [ebp + 8]
mov byte [esi + 8], dl
mov edx, edi
sar edx, 0x10
and edx, eax
sar ebx, 0x10
xor bl, byte [edx + 0x613138]
mov edx, dword [ebp - 8]
mov byte [esi + 9], bl
mov ebx, dword [ebp + 8]
sar edx, 8
and edx, eax
sar ebx, 8
xor bl, byte [edx + 0x613138]
mov byte [esi + 0xa], bl
mov edx, dword [ebp - 4]
and edx, eax
mov dl, byte [edx + 0x613138]
xor dl, byte [ebp + 8]
sar ecx, 0x10
mov byte [esi + 0xb], dl
mov edx, dword [ebp - 0xc]
mov ebx, dword [edx + 0xc]
mov edx, dword [ebp - 4]
mov dword [ebp + 8], ebx
sar edx, 0x18
and edx, eax
sar ebx, 0x18
xor bl, byte [edx + 0x613138]
mov edx, dword [ebp + 8]
and ecx, eax
mov byte [esi + 0xc], bl
sar edx, 0x10
xor dl, byte [ecx + 0x613138]
mov ecx, dword [ebp + 8]
sar edi, 8
and edi, eax
sar ecx, 8
mov byte [esi + 0xd], dl
xor cl, byte [edi + 0x613138]
pop edi
mov byte [esi + 0xe], cl
mov ecx, dword [ebp - 8]
and ecx, eax
mov al, byte [ecx + 0x613138]
xor al, byte [ebp + 8]
pop ebx
mov byte [esi + 0xf], al
leave
ret 4