Function at 0x409dfb
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
sub esp, 0x24
mov edx, dword [eax + 0x10]
push ebx
push ebp
mov ebp, dword [eax + 0x18]
push esi
mov esi, ecx
xor edx, dword [esi]
xor ebp, dword [esi + 8]
mov ecx, dword [eax]
push edi
mov edi, dword [eax + 0x14]
xor edi, dword [esi + 4]
mov dword [esp + 0x10], ecx
mov ecx, dword [eax + 0x1c]
xor ecx, dword [esi + 0xc]
add eax, 0x10
mov dword [esp + 0x28], edi
movzx esi, ch
mov esi, dword [esi*4 + 0x41cf28]
mov ebx, edx
shr ebx, 0x10
and ebx, 0xff
xor esi, dword [ebx*4 + 0x41d328]
movzx ebx, byte [esp + 0x29]
shr edi, 0x18
xor esi, dword [edi*4 + 0x41d728]
mov edi, ebp
and edi, 0xff
xor esi, dword [edi*4 + 0x41cb28]
mov edi, ebp
shr edi, 0x10
and edi, 0xff
mov edi, dword [edi*4 + 0x41d328]
xor edi, dword [ebx*4 + 0x41cf28]
mov ebx, ecx
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x41d728]
mov ebx, edx
and ebx, 0xff
xor edi, dword [ebx*4 + 0x41cb28]
mov ebx, dword [esp + 0x28]
shr ebx, 0x10
xor esi, dword [eax + 0x18]
xor edi, dword [eax + 0x10]
mov dword [esp + 0x24], edx
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x41d328]
mov dword [esp + 0x2c], ebp
movzx edx, dh
xor ebx, dword [edx*4 + 0x41cf28]
shr ebp, 0x18
xor ebx, dword [ebp*4 + 0x41d728]
mov ebp, dword [esp + 0x24]
mov edx, ecx
shr ecx, 0x10
and edx, 0xff
xor ebx, dword [edx*4 + 0x41cb28]
movzx edx, byte [esp + 0x2d]
xor ebx, dword [eax + 0x1c]
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x41d328]
xor ecx, dword [edx*4 + 0x41cf28]
shr ebp, 0x18
xor ecx, dword [ebp*4 + 0x41d728]
mov ebp, dword [esp + 0x28]
and ebp, 0xff
xor ecx, dword [ebp*4 + 0x41cb28]
mov ebp, dword [esp + 0x10]
xor ecx, dword [eax + 0x14]
add eax, 0x10
sub ebp, 1
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ecx
je 0x40a150
jmp 0x409f37
mov edi, dword [esp + 0x14]
shr edi, 0x10
and edi, 0xff
movzx edx, bh
mov edx, dword [edx*4 + 0x41cf28]
xor edx, dword [edi*4 + 0x41d328]
mov edi, ecx
shr edi, 0x18
xor edx, dword [edi*4 + 0x41d728]
mov edi, esi
shr esi, 0x10
and esi, 0xff
and edi, 0xff
xor edx, dword [edi*4 + 0x41cb28]
movzx edi, byte [esp + 0x1d]
xor edx, dword [eax + 0x18]
shr ebx, 0x18
mov dword [esp + 0x2c], edx
movzx edx, ch
mov edx, dword [edx*4 + 0x41cf28]
xor edx, dword [esi*4 + 0x41d328]
mov esi, dword [esp + 0x14]
xor edx, dword [ebx*4 + 0x41d728]
and esi, 0xff
xor edx, dword [esi*4 + 0x41cb28]
movzx esi, byte [esp + 0x15]
shr ecx, 0x10
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x41d328]
xor ecx, dword [esi*4 + 0x41cf28]
mov esi, dword [esp + 0x1c]
shr esi, 0x18
xor ecx, dword [esi*4 + 0x41d728]
mov esi, dword [esp + 0x20]
and esi, 0xff
xor ecx, dword [esi*4 + 0x41cb28]
mov esi, dword [esp + 0x20]
shr esi, 0x10
xor edx, dword [eax + 0x10]
xor ecx, dword [eax + 0x1c]
and esi, 0xff
mov esi, dword [esi*4 + 0x41d328]
xor esi, dword [edi*4 + 0x41cf28]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x14]
shr esi, 0x18
mov esi, dword [esi*4 + 0x41d728]
xor dword [esp + 0x10], esi
mov esi, dword [esp + 0x10]
and edi, 0xff
xor esi, dword [edi*4 + 0x41cb28]
movzx edi, ch
xor esi, dword [eax + 0x14]
mov edi, dword [edi*4 + 0x41cf28]
mov dword [esp + 0x28], esi
shr esi, 0x18
mov ebx, edx
shr ebx, 0x10
and ebx, 0xff
xor edi, dword [ebx*4 + 0x41d328]
add eax, 0x20
xor edi, dword [esi*4 + 0x41d728]
mov esi, dword [esp + 0x2c]
and esi, 0xff
xor edi, dword [esi*4 + 0x41cb28]
mov esi, dword [esp + 0x2c]
xor edi, dword [eax + 8]
shr esi, 0x10
mov dword [esp + 0x1c], edi
movzx edi, byte [esp + 0x29]
and esi, 0xff
mov esi, dword [esi*4 + 0x41d328]
xor esi, dword [edi*4 + 0x41cf28]
mov edi, ecx
shr edi, 0x18
xor esi, dword [edi*4 + 0x41d728]
mov edi, edx
and edi, 0xff
xor esi, dword [edi*4 + 0x41cb28]
xor esi, dword [eax]
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x28]
shr esi, 0x10
and esi, 0xff
mov esi, dword [esi*4 + 0x41d328]
movzx edi, dh
xor esi, dword [edi*4 + 0x41cf28]
mov edi, dword [esp + 0x2c]
shr edi, 0x18
xor esi, dword [edi*4 + 0x41d728]
mov edi, ecx
and edi, 0xff
xor esi, dword [edi*4 + 0x41cb28]
shr ecx, 0x10
xor esi, dword [eax + 0xc]
and ecx, 0xff
mov edi, dword [ecx*4 + 0x41d328]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x20], esi
movzx esi, byte [esp + 0x2d]
xor edi, dword [esi*4 + 0x41cf28]
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
shr edx, 0x18
xor edi, dword [edx*4 + 0x41d728]
and ecx, 0xff
xor edi, dword [ecx*4 + 0x41cb28]
xor edi, dword [eax + 4]
sub ebp, 1
mov ecx, edi
mov dword [esp + 0x18], ecx
jne 0x409f33
shr esi, 0x10
and esi, 0xff
movzx edx, byte [esi + str.cw]
movzx esi, ch
movzx esi, byte [esi + str.cw]
shr ebx, 0x18
mov dh, byte [ebx + str.cw]
mov edi, dword [esp + 0x14]
add eax, 0x10
shr edi, 0x18
shl edx, 8
or edx, esi
mov esi, dword [esp + 0x14]
shl edx, 8
and esi, 0xff
movzx esi, byte [esi + str.cw]
or edx, esi
xor edx, dword [eax]
mov esi, dword [esp + 0x38]
mov dword [esi], edx
mov edx, dword [esp + 0x20]
shr edx, 0x10
and edx, 0xff
movzx edx, byte [edx + str.cw]
mov dh, byte [edi + str.cw]
movzx edi, byte [esp + 0x1d]
movzx edi, byte [edi + str.cw]
shl edx, 8
or edx, edi
shl edx, 8
mov edi, ecx
and edi, 0xff
movzx edi, byte [edi + str.cw]
or edx, edi
xor edx, dword [eax + 4]
mov edi, ecx
mov dword [esi + 4], edx
mov edx, dword [esp + 0x14]
shr edx, 0x10
and edx, 0xff
movzx edx, byte [edx + str.cw]
shr edi, 0x18
mov dh, byte [edi + str.cw]
movzx edi, byte [esp + 0x21]
movzx edi, byte [edi + str.cw]
shl edx, 8
or edx, edi
mov edi, dword [esp + 0x1c]
shl edx, 8
and edi, 0xff
movzx edi, byte [edi + str.cw]
or edx, edi
xor edx, dword [eax + 8]
shr ecx, 0x10
mov dword [esi + 8], edx
and ecx, 0xff
movzx edx, byte [ecx + str.cw]
mov ecx, dword [esp + 0x1c]
shr ecx, 0x18
mov dh, byte [ecx + str.cw]
movzx ecx, byte [esp + 0x15]
movzx ecx, byte [ecx + str.cw]
shl edx, 8
or edx, ecx
mov ecx, dword [esp + 0x20]
and ecx, 0xff
movzx ecx, byte [ecx + str.cw]
shl edx, 8
or edx, ecx
xor edx, dword [eax + 0xc]
pop edi
mov dword [esi + 0xc], edx
pop esi
pop ebp
pop ebx
add esp, 0x24
ret