Function at 0x46a580
Capabilities:
Encrypt data using aes

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xc
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
test ebx, ebx
je 0x46a9a4
test eax, eax
je 0x46a9a4
cmp dword [esp + 0x24], 0xc0
je 0x46a737
cmp dword [esp + 0x24], 0x100
je 0x46a5d2
cmp dword [esp + 0x24], 0x80
je 0x46a728
mov eax, 0xfffffffe
add esp, 0xc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [eax + 0xf0], 0xe
movzx ecx, byte [ebx]
movzx edx, byte [ebx + 1]
mov dword [esp], ecx
shl dword [esp], 0x18
shl edx, 0x10
xor dword [esp], edx
movzx edx, byte [ebx + 3]
xor dword [esp], edx
movzx edx, byte [ebx + 2]
shl edx, 8
xor dword [esp], edx
mov ecx, dword [esp]
mov dword [eax], ecx
movzx edi, byte [ebx + 4]
movzx edx, byte [ebx + 5]
shl edi, 0x18
shl edx, 0x10
xor edi, edx
movzx edx, byte [ebx + 7]
xor edi, edx
movzx edx, byte [ebx + 6]
shl edx, 8
xor edi, edx
mov dword [eax + 4], edi
movzx ebp, byte [ebx + 8]
movzx edx, byte [ebx + 9]
shl ebp, 0x18
shl edx, 0x10
xor ebp, edx
movzx edx, byte [ebx + 0xb]
xor ebp, edx
movzx edx, byte [ebx + 0xa]
shl edx, 8
xor ebp, edx
mov dword [eax + 8], ebp
movzx ecx, byte [ebx + 0xc]
movzx edx, byte [ebx + 0xd]
shl ecx, 0x18
shl edx, 0x10
xor ecx, edx
movzx edx, byte [ebx + 0xf]
xor ecx, edx
movzx edx, byte [ebx + 0xe]
shl edx, 8
xor ecx, edx
cmp dword [esp + 0x24], 0x80
mov dword [eax + 0xc], ecx
je 0x46a746
movzx edx, byte [ebx + 0x10]
movzx esi, byte [ebx + 0x11]
shl edx, 0x18
shl esi, 0x10
xor edx, esi
movzx esi, byte [ebx + 0x13]
xor edx, esi
movzx esi, byte [ebx + 0x12]
shl esi, 8
xor edx, esi
mov dword [eax + 0x10], edx
movzx edx, byte [ebx + 0x14]
movzx esi, byte [ebx + 0x15]
shl edx, 0x18
shl esi, 0x10
xor edx, esi
movzx esi, byte [ebx + 0x17]
xor edx, esi
movzx esi, byte [ebx + 0x16]
shl esi, 8
xor edx, esi
cmp dword [esp + 0x24], 0xc0
mov dword [eax + 0x14], edx
je 0x46a8f2
movzx edx, byte [ebx + 0x18]
movzx esi, byte [ebx + 0x19]
shl edx, 0x18
shl esi, 0x10
xor edx, esi
movzx esi, byte [ebx + 0x1b]
xor edx, esi
movzx esi, byte [ebx + 0x1a]
shl esi, 8
xor edx, esi
mov dword [eax + 0x18], edx
movzx edx, byte [ebx + 0x1c]
movzx esi, byte [ebx + 0x1d]
shl edx, 0x18
shl esi, 0x10
xor edx, esi
movzx esi, byte [ebx + 0x1f]
movzx ebx, byte [ebx + 0x1e]
xor edx, esi
shl ebx, 8
xor edx, ebx
cmp dword [esp + 0x24], 0x100
mov dword [eax + 0x1c], edx
je 0x46a7e5
xor eax, eax
add esp, 0xc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [eax + 0xf0], 0xa
jmp 0x46a5dc
mov dword [eax + 0xf0], 0xc
jmp 0x46a5dc
mov ebx, dword [esp]
mov dword [esp + 4], ebx
xor ebx, ebx
mov dword [esp], ebx
jmp 0x46a766
add eax, 0x10
mov ebx, dword [eax]
mov ecx, dword [eax + 0xc]
mov edi, dword [eax + 4]
mov ebp, dword [eax + 8]
mov dword [esp + 4], ebx
movzx edx, cl
mov esi, ecx
mov ebx, dword [esp]
shr esi, 0x18
mov edx, dword [edx*4 + 0x4d35e0]
movzx esi, byte [esi*4 + 0x4d31e0]
add dword [esp], 1
and edx, 0xff00
xor edx, esi
mov esi, ecx
shr esi, 0x10
xor edx, dword [ebx*4 + 0x4d18a0]
mov ebx, esi
movzx esi, bl
mov esi, dword [esi*4 + 0x4d2de0]
and esi, 0xff000000
xor edx, esi
movzx esi, ch
mov esi, dword [esi*4 + 0x4d29e0]
and esi, 0xff0000
xor edx, esi
xor edx, dword [esp + 4]
mov dword [eax + 0x10], edx
xor edx, edi
xor ebp, edx
mov dword [eax + 0x18], ebp
xor ebp, ecx
cmp dword [esp], 0xa
mov dword [eax + 0x14], edx
mov dword [eax + 0x1c], ebp
jne 0x46a754
xor eax, eax
jmp 0x46a720
mov ebx, dword [esp]
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
xor ebx, ebx
mov dword [esp], ebx
jmp 0x46a871
mov esi, ecx
add eax, 0x20
shr esi, 0x18
mov edi, dword [esi*4 + 0x4d2de0]
movzx esi, cl
movzx esi, byte [esi*4 + 0x4d31e0]
and edi, 0xff000000
xor edi, esi
mov esi, ecx
shr esi, 0x10
movzx ecx, ch
mov ebx, esi
mov ecx, dword [ecx*4 + 0x4d35e0]
movzx esi, bl
mov esi, dword [esi*4 + 0x4d29e0]
xor edi, dword [eax - 0x10]
and ecx, 0xff00
and esi, 0xff0000
xor edi, esi
xor edi, ecx
mov dword [eax + 0x10], edi
xor edi, dword [eax - 0xc]
mov dword [eax + 0x14], edi
xor edi, dword [eax - 8]
xor edx, edi
mov dword [eax + 0x18], edi
mov dword [eax + 0x1c], edx
mov ecx, dword [eax]
mov edx, dword [eax + 0x1c]
mov ebp, dword [eax + 8]
mov dword [esp + 4], ecx
mov ecx, dword [eax + 4]
mov dword [esp + 8], ecx
mov ecx, dword [eax + 0xc]
movzx esi, dl
mov edi, edx
mov ebx, dword [esp]
shr edi, 0x18
mov esi, dword [esi*4 + 0x4d35e0]
movzx edi, byte [edi*4 + 0x4d31e0]
add dword [esp], 1
and esi, 0xff00
xor esi, edi
mov edi, edx
shr edi, 0x10
xor esi, dword [ebx*4 + 0x4d18a0]
mov ebx, edi
movzx edi, bl
mov edi, dword [edi*4 + 0x4d2de0]
and edi, 0xff000000
xor esi, edi
movzx edi, dh
mov edi, dword [edi*4 + 0x4d29e0]
and edi, 0xff0000
xor esi, edi
xor esi, dword [esp + 4]
mov dword [eax + 0x20], esi
xor esi, dword [esp + 8]
xor ebp, esi
xor ecx, ebp
cmp dword [esp], 7
mov dword [eax + 0x24], esi
mov dword [eax + 0x28], ebp
mov dword [eax + 0x2c], ecx
jne 0x46a7f7
xor eax, eax
jmp 0x46a720
mov dword [esp + 4], edi
xor ebx, ebx
mov dword [esp + 8], ecx
jmp 0x46a927
xor ebp, dword [eax + 0x10]
add eax, 0x18
mov dword [eax + 0x10], ebp
xor ebp, edx
mov dword [eax + 0x14], ebp
mov ecx, dword [eax]
mov edx, dword [eax + 0x14]
mov ebp, dword [eax + 8]
mov dword [esp], ecx
mov ecx, dword [eax + 4]
mov dword [esp + 4], ecx
mov ecx, dword [eax + 0xc]
mov dword [esp + 8], ecx
movzx esi, dl
mov edi, edx
shr edi, 0x18
mov esi, dword [esi*4 + 0x4d35e0]
movzx edi, byte [edi*4 + 0x4d31e0]
and esi, 0xff00
xor esi, edi
mov edi, edx
shr edi, 0x10
mov ecx, edi
movzx edi, cl
mov edi, dword [edi*4 + 0x4d2de0]
xor esi, dword [ebx*4 + 0x4d18a0]
add ebx, 1
and edi, 0xff000000
xor esi, edi
movzx edi, dh
mov edi, dword [edi*4 + 0x4d29e0]
and edi, 0xff0000
xor esi, edi
xor esi, dword [esp]
mov dword [eax + 0x18], esi
xor esi, dword [esp + 4]
xor ebp, esi
mov dword [eax + 0x20], ebp
xor ebp, dword [esp + 8]
cmp ebx, 8
mov dword [eax + 0x1c], esi
mov dword [eax + 0x24], ebp
jne 0x46a900
xor eax, eax
jmp 0x46a720
mov eax, 0xffffffff
jmp 0x46a5ca