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

Disassembly:
push ebx
push esi
push edi
lea esp, [esp - 0xc]
mov esi, eax
mov di, dx
mov dword [esp + 8], ecx
mov dword [esp], 0
cmp byte [0x614000], 0
je 0x5f06c8
mov eax, dword [esp + 8]
mov word [eax + 0x110], 0
mov eax, dword [esp + 8]
mov byte [eax + 0x117], 0
mov eax, dword [esp + 8]
mov dword [eax + 0x118], 0
jmp 0x5f06d8
mov eax, dword [esp + 8]
xor cl, cl
mov edx, 0x11c
call fcn.004037d0
cmp di, 0x80
je 0x5f06fc
cmp di, 0xc0
je 0x5f06fc
cmp di, 0x100
je 0x5f06fc
mov dword [esp], 0xffffffff
jmp 0x5f09fc
movzx eax, di
mov edx, eax
sar edx, 0x1f
and edx, 0x1f
add eax, edx
sar eax, 5
mov bx, ax
and eax, 0xffff
shl eax, 2
mov ecx, eax
mov edx, dword [esp + 8]
mov eax, esi
call fcn.00403790
mov ax, di
mov edx, dword [esp + 8]
mov word [edx + 0x114], ax
movzx edx, bx
add edx, 6
mov ecx, dword [esp + 8]
mov word [ecx + 0x112], dx
mov edx, dword [esp + 8]
mov byte [edx + 0x116], 0
mov edx, dword [esp + 8]
cmp ax, 0x80
jne 0x5f0801
mov dword [esp + 4], 0xffffffff
lea esi, [esi]
add dword [esp + 4], 1
mov ecx, dword [edx + 0xc]
mov esi, str.cw
mov ebx, ecx
shr ebx, 0x10
and ebx, 0xff
movzx ebx, byte [esi + ebx]
shl ebx, 8
mov edi, ecx
shr edi, 8
and edi, 0xff
movzx edi, byte [esi + edi]
xor ebx, edi
mov edi, ecx
shr edi, 0x18
movzx edi, byte [esi + edi]
shl edi, 0x10
xor ebx, edi
mov edi, ecx
and edi, 0xff
movzx esi, byte [esi + edi]
shl esi, 0x18
xor ebx, esi
xor ebx, dword [edx]
mov esi, dword [esp + 4]
xor ebx, dword [esi*4 + 0x614010]
mov dword [edx + 0x10], ebx
mov ebx, edx
mov esi, dword [ebx + 4]
mov ebx, dword [ebx + 0x10]
xor ebx, esi
mov dword [edx + 0x14], ebx
mov ebx, edx
mov esi, dword [ebx + 8]
mov ebx, dword [ebx + 0x14]
xor ebx, esi
mov dword [edx + 0x18], ebx
mov ebx, edx
mov esi, dword [ebx + 0xc]
mov ebx, dword [ebx + 0x18]
xor ebx, esi
mov dword [edx + 0x1c], ebx
add edx, 0x10
cmp dword [esp + 4], 9
jl 0x5f0768
jmp 0x5f09fc
cmp ax, 0xc0
jne 0x5f08d9
mov dword [esp + 4], 0xffffffff
lea esi, [esi]
nop
add dword [esp + 4], 1
mov ecx, dword [edx + 0x14]
mov eax, str.cw
mov ebx, ecx
shr ebx, 0x10
and ebx, 0xff
movzx ebx, byte [eax + ebx]
shl ebx, 8
mov esi, ecx
shr esi, 8
and esi, 0xff
movzx esi, byte [eax + esi]
xor ebx, esi
mov esi, ecx
shr esi, 0x18
movzx esi, byte [eax + esi]
shl esi, 0x10
xor ebx, esi
mov esi, ecx
and esi, 0xff
movzx eax, byte [eax + esi]
shl eax, 0x18
xor ebx, eax
xor ebx, dword [edx]
mov eax, dword [esp + 4]
xor ebx, dword [eax*4 + 0x614010]
mov dword [edx + 0x18], ebx
mov eax, edx
mov ebx, dword [eax + 4]
mov eax, dword [eax + 0x18]
xor eax, ebx
mov dword [edx + 0x1c], eax
mov eax, edx
mov ebx, dword [eax + 8]
mov eax, dword [eax + 0x1c]
xor eax, ebx
mov dword [edx + 0x20], eax
mov ebx, edx
mov eax, dword [ebx + 0xc]
mov ebx, dword [ebx + 0x20]
xor ebx, eax
mov dword [edx + 0x24], ebx
cmp dword [esp + 4], 7
je 0x5f09fc
lea esi, [esi]
mov eax, edx
mov ebx, dword [eax + 0x10]
mov eax, dword [eax + 0x24]
xor eax, ebx
mov dword [edx + 0x28], eax
mov eax, edx
mov ebx, dword [eax + 0x14]
mov eax, dword [eax + 0x28]
xor eax, ebx
mov dword [edx + 0x2c], eax
add edx, 0x18
cmp dword [esp + 4], 7
jl 0x5f0818
jmp 0x5f09fc
mov dword [esp + 4], 0xffffffff
lea esi, [esi]
add dword [esp + 4], 1
mov ecx, dword [edx + 0x1c]
mov ebx, str.cw
mov eax, ecx
shr eax, 0x10
and eax, 0xff
movzx eax, byte [ebx + eax]
shl eax, 8
mov esi, ecx
shr esi, 8
and esi, 0xff
movzx esi, byte [ebx + esi]
xor eax, esi
mov esi, ecx
shr esi, 0x18
movzx esi, byte [ebx + esi]
shl esi, 0x10
xor eax, esi
mov esi, ecx
and esi, 0xff
movzx ebx, byte [ebx + esi]
shl ebx, 0x18
xor eax, ebx
xor eax, dword [edx]
mov ebx, dword [esp + 4]
xor eax, dword [ebx*4 + 0x614010]
mov dword [edx + 0x20], eax
mov eax, edx
mov ebx, dword [eax + 4]
mov eax, dword [eax + 0x20]
xor eax, ebx
mov dword [edx + 0x24], eax
mov eax, edx
mov ebx, dword [eax + 8]
mov eax, dword [eax + 0x24]
xor eax, ebx
mov dword [edx + 0x28], eax
mov eax, edx
mov ebx, dword [eax + 0xc]
mov eax, dword [eax + 0x28]
xor eax, ebx
mov dword [edx + 0x2c], eax
cmp dword [esp + 4], 6
je 0x5f09fc
mov ecx, dword [edx + 0x2c]
mov ebx, str.cw
mov eax, ecx
shr eax, 8
and eax, 0xff
movzx eax, byte [ebx + eax]
shl eax, 8
mov esi, ecx
and esi, 0xff
movzx esi, byte [ebx + esi]
xor eax, esi
mov esi, ecx
shr esi, 0x10
and esi, 0xff
movzx esi, byte [ebx + esi]
shl esi, 0x10
xor eax, esi
mov esi, ecx
shr esi, 0x18
movzx ebx, byte [ebx + esi]
shl ebx, 0x18
xor eax, ebx
xor eax, dword [edx + 0x10]
mov dword [edx + 0x30], eax
mov ebx, edx
mov eax, dword [ebx + 0x14]
mov ebx, dword [ebx + 0x30]
xor ebx, eax
mov dword [edx + 0x34], ebx
mov eax, edx
mov ebx, dword [eax + 0x18]
mov eax, dword [eax + 0x34]
xor eax, ebx
mov dword [edx + 0x38], eax
mov eax, edx
mov ebx, dword [eax + 0x1c]
mov eax, dword [eax + 0x38]
xor eax, ebx
mov dword [edx + 0x3c], eax
add edx, 0x20
cmp dword [esp + 4], 6
jl 0x5f08e8
mov eax, dword [esp]
lea esp, [esp + 0xc]
pop edi
pop esi
pop ebx
ret