Function at 0x5a0e59
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 0x5a11a3
movzx ecx, byte [eax + 1]
push ebx
movzx ebx, byte [eax + 5]
push edi
movzx edi, byte [eax]
shl ecx, 0x10
shl edi, 0x18
or edi, ecx
movzx ecx, byte [eax + 2]
shl ecx, 8
or edi, ecx
movzx ecx, byte [eax + 3]
shl ebx, 0x10
or edi, ecx
movzx ecx, byte [eax + 4]
xor edi, dword [edx + 8]
shl ecx, 0x18
or ecx, ebx
movzx ebx, byte [eax + 6]
shl ebx, 8
or ecx, ebx
movzx ebx, byte [eax + 7]
or ecx, ebx
xor ecx, dword [edx + 0xc]
movzx edx, byte [eax + 8]
movzx ebx, byte [eax + 9]
shl ebx, 0x10
shl edx, 0x18
or edx, ebx
movzx ebx, byte [eax + 0xa]
shl ebx, 8
or edx, ebx
movzx ebx, byte [eax + 0xb]
or edx, ebx
mov ebx, dword [ebp + 8]
xor edx, dword [ebx + 0x10]
movzx ebx, byte [eax + 0xd]
mov dword [ebp - 8], edx
movzx edx, byte [eax + 0xc]
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 + 0x14]
mov eax, 0xff
mov dword [ebp - 4], ebx
mov ebx, dword [edx + 0x3d0]
mov dword [ebp - 0x1c], ebx
cmp ebx, 1
jle 0x5a1038
add edx, 0x30
dec ebx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], ebx
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 8]
sar ebx, 0x10
and ebx, eax
sar edx, 8
and edx, eax
mov edx, dword [edx*4 + 0x60dc20]
xor edx, dword [ebx*4 + 0x60d820]
mov ebx, ecx
sar ebx, 0x18
and ebx, eax
xor edx, dword [ebx*4 + 0x60d420]
mov ebx, edi
and ebx, eax
xor edx, dword [ebx*4 + 0x60e020]
mov ebx, dword [ebp - 0xc]
xor edx, dword [ebx - 4]
mov ebx, dword [ebp - 8]
sar ebx, 0x18
and ebx, eax
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 4]
sar edx, 0x10
and edx, eax
mov edx, dword [edx*4 + 0x60d820]
xor edx, dword [ebx*4 + 0x60d420]
mov ebx, edi
sar ebx, 8
and ebx, eax
xor edx, dword [ebx*4 + 0x60dc20]
mov ebx, ecx
and ebx, eax
xor edx, dword [ebx*4 + 0x60e020]
mov ebx, dword [ebp - 0xc]
xor edx, dword [ebx]
mov ebx, ecx
sar ebx, 8
and ebx, eax
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 4]
sar edx, 0x18
and edx, eax
mov edx, dword [edx*4 + 0x60d420]
xor edx, dword [ebx*4 + 0x60dc20]
mov ebx, edi
sar ebx, 0x10
and ebx, eax
xor edx, dword [ebx*4 + 0x60d820]
mov ebx, dword [ebp - 8]
and ebx, eax
xor edx, dword [ebx*4 + 0x60e020]
mov ebx, dword [ebp - 0xc]
xor edx, dword [ebx + 4]
mov ebx, dword [ebp - 8]
sar ebx, 8
and ebx, eax
mov ebx, dword [ebx*4 + 0x60dc20]
sar ecx, 0x10
and ecx, eax
xor ebx, dword [ecx*4 + 0x60d820]
mov ecx, dword [ebp - 4]
sar edi, 0x18
and edi, eax
xor ebx, dword [edi*4 + 0x60d420]
and ecx, eax
xor ebx, dword [ecx*4 + 0x60e020]
mov ecx, dword [ebp - 0xc]
xor ebx, dword [ecx - 8]
add dword [ebp - 0xc], 0x20
dec dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov edi, ebx
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edx
jne 0x5a0f22
mov edx, dword [ebp + 8]
mov ebx, dword [ebp - 0x1c]
shl ebx, 5
lea ebx, [ebx + edx + 8]
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebx]
mov dword [ebp + 8], ebx
sar ebx, 0x18
mov edx, edi
sar edx, 0x18
and edx, eax
xor bl, byte [edx + str.cw]
mov edx, ecx
sar edx, 0x10
mov byte [esi], bl
mov ebx, dword [ebp + 8]
and edx, eax
sar ebx, 0x10
xor bl, byte [edx + str.cw]
mov edx, dword [ebp - 8]
sar edx, 8
mov byte [esi + 1], bl
mov ebx, dword [ebp + 8]
and edx, eax
sar ebx, 8
xor bl, byte [edx + str.cw]
mov edx, dword [ebp - 4]
and edx, eax
mov byte [esi + 2], bl
mov dl, byte [edx + str.cw]
xor dl, byte [ebp + 8]
mov ebx, ecx
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 + str.cw]
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 + str.cw]
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 + str.cw]
mov edx, edi
and edx, eax
mov byte [esi + 6], bl
mov dl, byte [edx + str.cw]
xor dl, byte [ebp + 8]
mov ebx, dword [ebp - 8]
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 + str.cw]
mov ebx, dword [ebp + 8]
mov byte [esi + 8], dl
mov edx, dword [ebp - 4]
sar edx, 0x10
and edx, eax
sar ebx, 0x10
xor bl, byte [edx + str.cw]
mov edx, edi
mov byte [esi + 9], bl
mov ebx, dword [ebp + 8]
sar edx, 8
and edx, eax
sar ebx, 8
xor bl, byte [edx + str.cw]
mov byte [esi + 0xa], bl
mov edx, ecx
and edx, eax
mov dl, byte [edx + str.cw]
xor dl, byte [ebp + 8]
sar edi, 0x10
mov byte [esi + 0xb], dl
mov edx, dword [ebp - 0xc]
mov ebx, dword [edx + 0xc]
mov edx, dword [ebp - 4]
sar edx, 0x18
and edx, eax
mov dword [ebp + 8], ebx
sar ebx, 0x18
xor bl, byte [edx + str.cw]
mov edx, dword [ebp + 8]
sar edx, 0x10
and edi, eax
mov byte [esi + 0xc], bl
xor dl, byte [edi + str.cw]
sar ecx, 8
mov byte [esi + 0xd], dl
mov edx, dword [ebp + 8]
and ecx, eax
sar edx, 8
xor dl, byte [ecx + str.cw]
mov ecx, dword [ebp - 8]
and ecx, eax
mov byte [esi + 0xe], dl
mov al, byte [ecx + str.cw]
xor al, byte [ebp + 8]
pop edi
mov byte [esi + 0xf], al
pop ebx
leave
ret 4