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

Disassembly:
mov eax, 0x14
call fcn.004249a0
mov ecx, dword [esp + 0x18]
push ebx
mov eax, dword [ecx]
mov edx, eax
rol eax, 8
and eax, 0xff00ff
push ebp
ror edx, 8
and edx, 0xff00ff00
or edx, eax
mov eax, dword [ecx + 4]
push esi
mov esi, dword [esp + 0x2c]
push edi
xor edx, dword [esi]
mov dword [esp + 0x18], edx
mov edx, eax
mov edi, dword [esp + 0x18]
rol eax, 8
and eax, 0xff00ff
ror edx, 8
and edx, 0xff00ff00
or edx, eax
mov eax, dword [ecx + 8]
xor edx, dword [esi + 4]
mov ebx, eax
mov dword [esp + 0x10], edx
rol eax, 8
and eax, 0xff00ff
ror ebx, 8
and ebx, 0xff00ff00
or ebx, eax
mov eax, dword [ecx + 0xc]
xor ebx, dword [esi + 8]
mov edx, eax
rol eax, 8
and eax, 0xff00ff
ror edx, 8
and edx, 0xff00ff00
or edx, eax
xor edx, dword [esi + 0xc]
mov eax, ebx
shr eax, 8
and eax, 0xff
mov ecx, edx
shr ecx, 0x10
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x442cd0]
xor ecx, dword [eax*4 + 0x4430d0]
mov eax, edi
shr eax, 0x18
xor ecx, dword [eax*4 + 0x4428d0]
mov eax, dword [esp + 0x10]
movzx eax, al
xor ecx, dword [eax*4 + 0x4434d0]
mov eax, edi
xor ecx, dword [esi + 0x10]
shr eax, 0x10
mov dword [esp + 0x14], ecx
mov ecx, edx
shr ecx, 8
and ecx, 0xff
and eax, 0xff
mov ebp, dword [ecx*4 + 0x4430d0]
xor ebp, dword [eax*4 + 0x442cd0]
mov ecx, dword [esp + 0x10]
mov eax, ecx
shr eax, 0x18
shr ecx, 0x10
xor ebp, dword [eax*4 + 0x4428d0]
movzx eax, bl
and ecx, 0xff
xor ebp, dword [eax*4 + 0x4434d0]
mov ecx, dword [ecx*4 + 0x442cd0]
xor ebp, dword [esi + 0x14]
mov eax, edi
shr eax, 8
mov dword [esp + 0x28], ebp
and eax, 0xff
xor ecx, dword [eax*4 + 0x4430d0]
mov eax, ebx
shr eax, 0x18
shr ebx, 0x10
xor ecx, dword [eax*4 + 0x4428d0]
movzx eax, dl
and ebx, 0xff
xor ecx, dword [eax*4 + 0x4434d0]
mov eax, dword [esp + 0x10]
xor ecx, dword [esi + 0x18]
shr eax, 8
and eax, 0xff
mov dword [esp + 0x30], ecx
mov ecx, dword [ebx*4 + 0x442cd0]
xor ecx, dword [eax*4 + 0x4430d0]
mov eax, edi
movzx eax, al
shr edx, 0x18
lea edi, [esi + 0x20]
xor ecx, dword [edx*4 + 0x4428d0]
xor ecx, dword [eax*4 + 0x4434d0]
mov eax, dword [esi + 0xf0]
xor ecx, dword [esi + 0x1c]
sar eax, 1
dec eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x20], eax
je 0x40f803
jmp 0x40f5d0
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x14]
shr ecx, 0x10
and ecx, 0xff
mov edx, dword [esp + 0x28]
mov ecx, dword [ecx*4 + 0x442cd0]
mov eax, ebx
shr eax, 8
and eax, 0xff
xor ecx, dword [eax*4 + 0x4430d0]
mov eax, esi
shr eax, 0x18
xor ecx, dword [eax*4 + 0x4428d0]
movzx eax, dl
xor ecx, dword [eax*4 + 0x4434d0]
mov eax, esi
xor ecx, dword [edi]
shr eax, 0x10
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x10]
shr ecx, 8
and eax, 0xff
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x4430d0]
xor ecx, dword [eax*4 + 0x442cd0]
mov eax, edx
shr eax, 0x18
xor ecx, dword [eax*4 + 0x4428d0]
movzx eax, bl
xor ecx, dword [eax*4 + 0x4434d0]
mov eax, esi
xor ecx, dword [edi + 4]
shr eax, 8
mov dword [esp + 0x18], ecx
and eax, 0xff
mov ecx, edx
shr ecx, 0x10
and ecx, 0xff
shr edx, 8
mov ebx, dword [ecx*4 + 0x442cd0]
xor ebx, dword [eax*4 + 0x4430d0]
mov ecx, dword [esp + 0x30]
mov eax, ecx
shr eax, 0x18
shr ecx, 0x10
xor ebx, dword [eax*4 + 0x4428d0]
mov eax, dword [esp + 0x10]
movzx eax, al
and ecx, 0xff
xor ebx, dword [eax*4 + 0x4434d0]
mov eax, dword [esp + 0x10]
xor ebx, dword [edi + 8]
and edx, 0xff
mov dword [esp + 0x28], edx
mov edx, dword [ecx*4 + 0x442cd0]
mov ebp, dword [esp + 0x28]
shr eax, 0x18
xor edx, dword [ebp*4 + 0x4430d0]
xor edx, dword [eax*4 + 0x4428d0]
mov eax, esi
mov esi, dword [esp + 0x1c]
movzx eax, al
xor edx, dword [eax*4 + 0x4434d0]
mov eax, ebx
xor edx, dword [edi + 0xc]
shr eax, 8
mov ecx, edx
shr ecx, 0x10
and ecx, 0xff
and eax, 0xff
mov ecx, dword [ecx*4 + 0x442cd0]
xor ecx, dword [eax*4 + 0x4430d0]
mov eax, esi
shr eax, 0x18
xor ecx, dword [eax*4 + 0x4428d0]
mov eax, dword [esp + 0x18]
movzx eax, al
xor ecx, dword [eax*4 + 0x4434d0]
xor ecx, dword [edi + 0x10]
mov dword [esp + 0x14], ecx
mov ecx, edx
shr ecx, 8
and ecx, 0xff
mov eax, esi
mov ecx, dword [ecx*4 + 0x4430d0]
shr eax, 0x10
and eax, 0xff
add edi, 0x20
xor ecx, dword [eax*4 + 0x442cd0]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x18]
mov ebp, dword [esp + 0x28]
mov eax, ecx
shr eax, 0x18
shr ecx, 0x10
xor ebp, dword [eax*4 + 0x4428d0]
movzx eax, bl
and ecx, 0xff
xor ebp, dword [eax*4 + 0x4434d0]
mov ecx, dword [ecx*4 + 0x442cd0]
mov eax, esi
shr eax, 8
and eax, 0xff
xor ebp, dword [edi - 0xc]
xor ecx, dword [eax*4 + 0x4430d0]
mov eax, ebx
shr eax, 0x18
shr ebx, 0x10
xor ecx, dword [eax*4 + 0x4428d0]
movzx eax, dl
and ebx, 0xff
xor ecx, dword [eax*4 + 0x4434d0]
mov eax, dword [esp + 0x18]
xor ecx, dword [edi - 8]
shr eax, 8
mov dword [esp + 0x30], ecx
mov ecx, dword [ebx*4 + 0x442cd0]
and eax, 0xff
shr edx, 0x18
xor ecx, dword [eax*4 + 0x4430d0]
mov eax, esi
xor ecx, dword [edx*4 + 0x4428d0]
movzx eax, al
mov dword [esp + 0x28], ebp
xor ecx, dword [eax*4 + 0x4434d0]
xor ecx, dword [edi - 4]
dec dword [esp + 0x20]
mov dword [esp + 0x10], ecx
jne 0x40f5d0
mov eax, ecx
shr eax, 0x10
and eax, 0xff
mov ebx, dword [esp + 0x28]
movzx ecx, byte [eax + 0x4438d0]
mov eax, dword [esp + 0x14]
shr eax, 0x18
mov edx, dword [esp + 0x2c]
movzx eax, byte [eax + 0x4438d0]
shl eax, 8
xor ecx, eax
mov eax, dword [esp + 0x30]
shr eax, 8
and eax, 0xff
shl ecx, 8
movzx eax, byte [eax + 0x4438d0]
xor ecx, eax
shl ecx, 8
movzx eax, bl
movzx eax, byte [eax + 0x4438d0]
xor ecx, eax
xor ecx, dword [edi]
mov eax, ecx
ror eax, 8
and eax, 0xff00ff00
rol ecx, 8
and ecx, 0xff00ff
or eax, ecx
mov dword [edx], eax
mov eax, dword [esp + 0x14]
shr eax, 0x10
and eax, 0xff
movzx ecx, byte [eax + 0x4438d0]
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax + 0x4438d0]
shl eax, 8
xor ecx, eax
mov eax, dword [esp + 0x10]
shr eax, 8
and eax, 0xff
shl ecx, 8
movzx eax, byte [eax + 0x4438d0]
xor ecx, eax
mov eax, dword [esp + 0x30]
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x4438d0]
xor ecx, eax
xor ecx, dword [edi + 4]
mov eax, ecx
ror eax, 8
and eax, 0xff00ff00
rol ecx, 8
and ecx, 0xff00ff
or eax, ecx
mov dword [edx + 4], eax
mov eax, ebx
shr eax, 0x10
and eax, 0xff
movzx ecx, byte [eax + 0x4438d0]
mov eax, dword [esp + 0x30]
shr eax, 0x18
movzx eax, byte [eax + 0x4438d0]
shl eax, 8
xor ecx, eax
mov eax, dword [esp + 0x14]
shr eax, 8
and eax, 0xff
shl ecx, 8
movzx eax, byte [eax + 0x4438d0]
xor ecx, eax
mov eax, dword [esp + 0x10]
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x4438d0]
xor ecx, eax
xor ecx, dword [edi + 8]
mov eax, ecx
ror eax, 8
and eax, 0xff00ff00
rol ecx, 8
and ecx, 0xff00ff
or eax, ecx
mov dword [edx + 8], eax
mov eax, dword [esp + 0x30]
shr eax, 0x10
and eax, 0xff
shr ebx, 8
movzx ecx, byte [eax + 0x4438d0]
mov eax, dword [esp + 0x10]
shr eax, 0x18
and ebx, 0xff
movzx eax, byte [eax + 0x4438d0]
shl eax, 8
xor ecx, eax
movzx eax, byte [ebx + 0x4438d0]
shl ecx, 8
xor ecx, eax
mov eax, dword [esp + 0x14]
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x4438d0]
xor ecx, eax
xor ecx, dword [edi + 0xc]
pop edi
mov eax, ecx
ror eax, 8
pop esi
and eax, 0xff00ff00
rol ecx, 8
and ecx, 0xff00ff
or eax, ecx
pop ebp
mov dword [edx + 0xc], eax
pop ebx
add esp, 0x14
ret