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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffe8
mov dword [esp + 4], ecx
mov ecx, eax
movzx eax, byte [eax + 0x112]
dec eax
mov dword [esp + 0x14], eax
mov ebx, dword [edx]
xor ebx, dword [ecx]
mov esi, dword [edx + 4]
xor esi, dword [ecx + 4]
mov eax, dword [edx + 8]
xor eax, dword [ecx + 8]
mov edx, dword [edx + 0xc]
xor edx, dword [ecx + 0xc]
lea ecx, [ecx + 0x10]
movzx edi, bl
mov edi, dword [edi*4 + 0x61a1ec]
movzx ebp, si
shr ebp, 8
xor edi, dword [ebp*4 + 0x61a5ec]
mov ebp, eax
shr ebp, 0x10
and ebp, 0xff
xor edi, dword [ebp*4 + 0x61a9ec]
mov ebp, edx
shr ebp, 0x18
xor edi, dword [ebp*4 + 0x61adec]
mov dword [esp + 8], edi
mov edi, esi
and edi, 0xff
mov edi, dword [edi*4 + 0x61a1ec]
movzx ebp, ax
shr ebp, 8
xor edi, dword [ebp*4 + 0x61a5ec]
mov ebp, edx
shr ebp, 0x10
and ebp, 0xff
xor edi, dword [ebp*4 + 0x61a9ec]
mov ebp, ebx
shr ebp, 0x18
xor edi, dword [ebp*4 + 0x61adec]
mov dword [esp + 0xc], edi
movzx edi, al
mov edi, dword [edi*4 + 0x61a1ec]
movzx ebp, dh
xor edi, dword [ebp*4 + 0x61a5ec]
mov ebp, ebx
shr ebp, 0x10
and ebp, 0xff
xor edi, dword [ebp*4 + 0x61a9ec]
mov ebp, esi
shr ebp, 0x18
xor edi, dword [ebp*4 + 0x61adec]
mov dword [esp + 0x10], edi
and edx, 0xff
mov edx, dword [edx*4 + 0x61a1ec]
shr ebx, 8
and ebx, 0xff
xor edx, dword [ebx*4 + 0x61a5ec]
shr esi, 0x10
and esi, 0xff
xor edx, dword [esi*4 + 0x61a9ec]
shr eax, 0x18
xor edx, dword [eax*4 + 0x61adec]
mov ebx, dword [ecx]
xor ebx, dword [esp + 8]
mov esi, dword [ecx + 4]
xor esi, dword [esp + 0xc]
mov eax, dword [ecx + 8]
xor eax, dword [esp + 0x10]
xor edx, dword [ecx + 0xc]
lea ecx, [ecx + 0x10]
dec byte [esp + 0x14]
jne 0x5f662a
mov ebp, ecx
movzx ecx, bl
mov edi, esi
movzx ecx, byte [ecx + str.cw]
shr edi, 8
and edi, 0xff
movzx edi, byte [edi + str.cw]
shl edi, 8
xor ecx, edi
mov edi, eax
shr edi, 0x10
and edi, 0xff
movzx edi, byte [edi + str.cw]
shl edi, 0x10
xor ecx, edi
mov edi, edx
shr edi, 0x18
movzx edi, byte [edi + str.cw]
shl edi, 0x18
xor ecx, edi
xor ecx, dword [ebp]
mov edi, dword [esp + 4]
mov dword [edi], ecx
mov ecx, esi
and ecx, 0xff
movzx ecx, byte [ecx + str.cw]
movzx edi, ah
movzx edi, byte [edi + str.cw]
shl edi, 8
xor ecx, edi
mov edi, edx
shr edi, 0x10
and edi, 0xff
movzx edi, byte [edi + str.cw]
shl edi, 0x10
xor ecx, edi
mov edi, ebx
shr edi, 0x18
movzx edi, byte [edi + str.cw]
shl edi, 0x18
xor ecx, edi
xor ecx, dword [ebp + 4]
mov edi, dword [esp + 4]
mov dword [edi + 4], ecx
mov ecx, eax
and ecx, 0xff
movzx ecx, byte [ecx + str.cw]
movzx edi, dh
movzx edi, byte [edi + str.cw]
shl edi, 8
xor ecx, edi
mov edi, ebx
shr edi, 0x10
and edi, 0xff
movzx edi, byte [edi + str.cw]
shl edi, 0x10
xor ecx, edi
mov edi, esi
shr edi, 0x18
movzx edi, byte [edi + str.cw]
shl edi, 0x18
xor ecx, edi
xor ecx, dword [ebp + 8]
mov edi, dword [esp + 4]
mov dword [edi + 8], ecx
and edx, 0xff
movzx edx, byte [edx + str.cw]
shr ebx, 8
and ebx, 0xff
xor ecx, ecx
mov cl, byte [ebx + str.cw]
shl ecx, 8
xor edx, ecx
shr esi, 0x10
and esi, 0xff
xor ecx, ecx
mov cl, byte [esi + str.cw]
shl ecx, 0x10
xor edx, ecx
shr eax, 0x18
movzx eax, byte [eax + str.cw]
shl eax, 0x18
xor edx, eax
xor edx, dword [ebp + 0xc]
mov eax, dword [esp + 4]
mov dword [eax + 0xc], edx
add esp, 0x18
pop ebp
pop edi
pop esi
pop ebx
ret