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

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0xc
cmp eax, 0x10
push ebp
jne 0x1004e539
mov eax, 0xa
mov ebp, 4
jmp 0x1004e55d
cmp eax, 0x18
jne 0x1004e54a
mov eax, 0xc
mov ebp, 6
jmp 0x1004e55d
cmp eax, 0x20
jne 0x1004e72c
mov eax, 0xe
mov ebp, 8
cmp ebp, 6
push edi
mov edi, dword [esp + 0x18]
mov dword [edi], eax
mov eax, dword [esp + 0x1c]
mov dword [edi + 4], ebp
mov edx, dword [eax]
lea ecx, [edi + 0x10]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov edx, dword [eax + 0xc]
mov dword [ecx + 0xc], edx
jl 0x1004e5a6
cmp ebp, 8
mov edx, dword [eax + 0x10]
mov dword [ecx + 0x10], edx
mov edx, dword [eax + 0x14]
mov dword [ecx + 0x14], edx
jne 0x1004e5a6
mov edx, dword [eax + 0x18]
mov dword [ecx + 0x18], edx
mov eax, dword [eax + 0x1c]
mov dword [ecx + 0x1c], eax
push ebx
mov ebx, dword [edi]
push esi
lea esi, [ebp*4]
mov eax, dword [esi + ecx - 4]
lea ebx, [ebx*4 + 4]
mov edx, ecx
sub edx, esi
cmp ebp, ebx
mov dword [esp + 0x10], 0x1005e240
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], ebp
jge 0x1004e6ed
lea edi, [edx + ebp*4 + 8]
sub edx, ecx
lea esi, [esi + ecx + 4]
mov dword [esp + 0x14], edx
jmp 0x1004e5f0
movzx edx, al
xor ebx, ebx
mov bh, byte [edx + 0x1006d580]
mov edx, eax
shr edx, 0x18
mov bl, byte [edx + 0x1006d580]
mov edx, eax
shr edx, 0x10
movzx edx, dl
movzx edx, byte [edx + 0x1006d580]
shr eax, 8
movzx eax, al
shl ebx, 8
or ebx, edx
movzx edx, byte [eax + 0x1006d580]
shl ebx, 8
or ebx, edx
mov edx, dword [esp + 0x10]
movzx eax, byte [edx]
xor eax, ebx
xor eax, dword [edi - 8]
add edx, 1
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x14]
mov dword [esi - 4], eax
xor eax, dword [edx + esi]
mov dword [esi], eax
xor eax, dword [edi]
mov dword [esi + 4], eax
xor eax, dword [edi + 4]
cmp ebp, 6
mov dword [esi + 8], eax
jl 0x1004e6ca
jne 0x1004e66b
xor eax, dword [edi + 8]
mov dword [esi + 0xc], eax
xor eax, dword [edi + 0xc]
mov dword [esi + 0x10], eax
jmp 0x1004e6ca
cmp dword [esp + 0x28], 0x38
je 0x1004e6e9
mov edx, eax
shr edx, 0x18
xor ebx, ebx
mov bh, byte [edx + 0x1006d580]
mov edx, eax
shr edx, 0x10
movzx edx, dl
mov bl, byte [edx + 0x1006d580]
mov edx, eax
shr edx, 8
movzx edx, dl
movzx edx, byte [edx + 0x1006d580]
movzx eax, al
shl ebx, 8
or ebx, edx
movzx edx, byte [eax + 0x1006d580]
shl ebx, 8
or ebx, edx
xor ebx, dword [edi + 8]
mov eax, ebx
mov dword [esi + 0xc], eax
xor eax, dword [edi + 0xc]
mov dword [esi + 0x10], eax
xor eax, dword [edi + 0x10]
mov dword [esi + 0x14], eax
xor eax, dword [edi + 0x14]
mov dword [esi + 0x18], eax
mov ebx, dword [esp + 0x28]
lea edx, [ebp*4]
add ebx, ebp
add esi, edx
add edi, edx
cmp ebx, dword [esp + 0x18]
mov dword [esp + 0x28], ebx
jl 0x1004e5f0
mov edi, dword [esp + 0x20]
mov edi, dword [edi]
cmp edi, 0xe
pop esi
pop ebx
je 0x1004e724
lea eax, [edi*4]
mov edx, dword [ecx + eax*4]
mov dword [ecx + 0xe0], edx
mov edx, dword [ecx + eax*4 + 4]
mov dword [ecx + 0xe4], edx
mov edx, dword [ecx + eax*4 + 8]
mov dword [ecx + 0xe8], edx
mov eax, dword [ecx + eax*4 + 0xc]
mov dword [ecx + 0xec], eax
pop edi
xor eax, eax
pop ebp
add esp, 0xc
ret
mov eax, 0x271d
pop ebp
add esp, 0xc
ret