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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
mov dword [ebp - 0x10], eax
push edi
mov edi, eax
mov eax, dword [ebp + 0xc]
movzx ebx, byte [eax]
movzx ecx, byte [eax + 1]
movzx edx, byte [eax + 5]
shl ebx, 8
or ebx, ecx
movzx ecx, byte [eax + 2]
shl ebx, 8
or ebx, ecx
movzx ecx, byte [eax + 3]
shl ebx, 8
or ebx, ecx
movzx ecx, byte [eax + 4]
shl ecx, 8
or ecx, edx
movzx edx, byte [eax + 6]
shl ecx, 8
or ecx, edx
movzx edx, byte [eax + 7]
shl ecx, 8
or ecx, edx
movzx edx, byte [eax + 8]
shl edi, 2
xor ecx, dword [esi + edi*4 + 8]
xor ebx, dword [esi + edi*4 + 4]
mov dword [ebp - 4], ecx
movzx ecx, byte [eax + 9]
shl edx, 8
or edx, ecx
movzx ecx, byte [eax + 0xa]
shl edx, 8
or edx, ecx
movzx ecx, byte [eax + 0xb]
shl edx, 8
or edx, ecx
xor edx, dword [esi + edi*4 + 0xc]
movzx ecx, byte [eax + 0xc]
movzx esi, byte [eax + 0xd]
shl ecx, 8
or ecx, esi
movzx esi, byte [eax + 0xe]
movzx eax, byte [eax + 0xf]
shl ecx, 8
or ecx, esi
shl ecx, 8
or ecx, eax
mov eax, dword [ebp + 8]
xor ecx, dword [eax + edi*4 + 0x10]
mov eax, dword [ebp - 0x10]
dec eax
mov dword [ebp + 0xc], edx
mov dword [ebp - 8], eax
mov esi, 0xff
test eax, eax
jle 0x403678
sar edx, 0x10
and edx, esi
movzx edx, byte [edx + 0x5417b8]
mov eax, ecx
sar eax, 0x18
and eax, esi
movzx eax, byte [eax + 0x5417b8]
shl eax, 8
or eax, edx
mov edx, dword [ebp - 4]
sar edx, 8
and edx, esi
movzx edx, byte [edx + 0x5417b8]
shl eax, 8
or eax, edx
shl eax, 8
mov edx, ebx
and edx, esi
movzx edx, byte [edx + 0x5417b8]
or eax, edx
mov edx, dword [ebp + 8]
xor eax, dword [edx + edi*4]
mov edx, dword [ebp - 4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
sar eax, 0x18
sar edx, 0x10
and eax, esi
movzx eax, byte [eax + 0x5417b8]
and edx, esi
movzx edx, byte [edx + 0x5417b8]
shl eax, 8
or eax, edx
dec edi
shl eax, 8
mov edx, ebx
sar edx, 8
and edx, esi
movzx edx, byte [edx + 0x5417b8]
or eax, edx
shl eax, 8
mov edx, ecx
and edx, esi
movzx edx, byte [edx + 0x5417b8]
or eax, edx
mov edx, dword [ebp + 8]
xor eax, dword [edx + edi*4]
dec edi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
sar eax, 0x18
and eax, esi
movzx eax, byte [eax + 0x5417b8]
mov edx, ebx
sar edx, 0x10
and edx, esi
movzx edx, byte [edx + 0x5417b8]
shl eax, 8
or eax, edx
mov edx, ecx
sar edx, 8
and edx, esi
movzx edx, byte [edx + 0x5417b8]
shl eax, 8
or eax, edx
mov edx, dword [ebp + 0xc]
and edx, esi
movzx edx, byte [edx + 0x5417b8]
shl eax, 8
or eax, edx
mov edx, dword [ebp + 8]
xor eax, dword [edx + edi*4]
dec edi
sar ebx, 0x18
and ebx, esi
mov dword [ebp - 0xc], eax
movzx eax, byte [ebx + 0x5417b8]
sar ecx, 0x10
dec edi
shl eax, 8
and ecx, esi
movzx ecx, byte [ecx + 0x5417b8]
or eax, ecx
mov ecx, dword [ebp + 0xc]
sar ecx, 8
and ecx, esi
movzx ecx, byte [ecx + 0x5417b8]
shl eax, 8
or eax, ecx
mov ecx, dword [ebp - 4]
and ecx, esi
movzx ecx, byte [ecx + 0x5417b8]
shl eax, 8
or eax, ecx
xor eax, dword [edx + edi*4 + 4]
call fcn.00402db1
mov ebx, eax
mov eax, dword [ebp - 0xc]
call fcn.00402db1
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x14]
call fcn.00402db1
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x10]
call fcn.00402db1
dec dword [ebp - 8]
cmp dword [ebp - 8], 0
mov edx, dword [ebp + 0xc]
mov ecx, eax
jg 0x40350d
sar edx, 0x10
and edx, esi
movzx edx, byte [edx + 0x5417b8]
mov eax, ecx
sar eax, 0x18
and eax, esi
movzx eax, byte [eax + 0x5417b8]
shl eax, 8
or eax, edx
mov edx, dword [ebp - 4]
shl eax, 8
sar edx, 8
and edx, esi
movzx edx, byte [edx + 0x5417b8]
or eax, edx
shl eax, 8
mov edx, ebx
and edx, esi
movzx edx, byte [edx + 0x5417b8]
or eax, edx
mov edx, dword [ebp + 8]
xor eax, dword [edx + edi*4]
dec edi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
sar eax, 0x18
and eax, esi
movzx edx, byte [eax + 0x5417b8]
mov eax, dword [ebp - 4]
sar eax, 0x10
and eax, esi
movzx eax, byte [eax + 0x5417b8]
shl edx, 8
or edx, eax
mov eax, ebx
sar eax, 8
and eax, esi
movzx eax, byte [eax + 0x5417b8]
shl edx, 8
or edx, eax
mov eax, ecx
and eax, esi
movzx eax, byte [eax + 0x5417b8]
dec edi
shl edx, 8
or edx, eax
mov eax, dword [ebp + 8]
xor edx, dword [eax + edi*4 + 4]
lea eax, [eax + edi*4]
mov dword [ebp + 8], eax
mov eax, dword [ebp - 4]
sar eax, 0x18
and eax, esi
movzx edi, byte [eax + 0x5417b8]
mov eax, ebx
sar eax, 0x10
and eax, esi
movzx eax, byte [eax + 0x5417b8]
shl edi, 8
or edi, eax
mov eax, ecx
sar eax, 8
and eax, esi
movzx eax, byte [eax + 0x5417b8]
shl edi, 8
or edi, eax
mov eax, dword [ebp + 0xc]
and eax, esi
movzx eax, byte [eax + 0x5417b8]
sar ebx, 0x18
and ebx, esi
movzx ebx, byte [ebx + 0x5417b8]
shl edi, 8
or edi, eax
mov eax, dword [ebp + 8]
xor edi, dword [eax]
sar ecx, 0x10
shl ebx, 8
and ecx, esi
movzx eax, byte [ecx + 0x5417b8]
mov dword [ebp - 0xc], edi
or ebx, eax
mov eax, dword [ebp + 0xc]
sar eax, 8
shl ebx, 8
and eax, esi
movzx eax, byte [eax + 0x5417b8]
or ebx, eax
mov eax, dword [ebp - 4]
shl ebx, 8
and eax, esi
movzx eax, byte [eax + 0x5417b8]
or ebx, eax
mov eax, dword [ebp + 8]
xor ebx, dword [eax - 4]
mov eax, dword [ebp + 0x10]
mov ecx, ebx
sar ecx, 0x18
mov byte [eax], cl
mov ecx, ebx
sar ecx, 0x10
mov byte [eax + 1], cl
mov ecx, ebx
sar ecx, 8
mov byte [eax + 2], cl
mov byte [eax + 3], bl
mov ecx, edi
mov ebx, ecx
sar ebx, 0x18
mov byte [eax + 4], bl
mov ebx, ecx
sar ebx, 0x10
mov byte [eax + 7], cl
mov byte [eax + 5], bl
mov ebx, ecx
mov ecx, edx
sar ecx, 0x18
mov byte [eax + 8], cl
mov ecx, edx
sar ecx, 0x10
mov byte [eax + 9], cl
mov ecx, edx
sar ecx, 8
mov byte [eax + 0xb], dl
mov byte [eax + 0xa], cl
mov ecx, dword [ebp - 0x10]
mov edx, ecx
sar edx, 0x18
mov byte [eax + 0xc], dl
mov edx, ecx
sar edx, 0x10
mov byte [eax + 0xd], dl
sar ebx, 8
pop edi
mov edx, ecx
sar edx, 8
pop esi
mov byte [eax + 6], bl
mov byte [eax + 0xe], dl
mov byte [eax + 0xf], cl
pop ebx
leave
ret