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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
push esi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], 0
je 0x4167bf
cmp dword [ebp + 0x10], 0x10
je 0x4167ad
cmp dword [ebp + 0x10], 0x18
je 0x4167ad
cmp dword [ebp + 0x10], 0x20
jne 0x4167bf
cmp dword [ebp + 0x14], 0x10
je 0x4167c4
cmp dword [ebp + 0x14], 0x18
je 0x4167c4
cmp dword [ebp + 0x14], 0x20
je 0x4167c4
jmp 0x416e45
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x3c8], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x3cc], ecx
mov eax, dword [ebp - 4]
push dword [eax + 0x3cc]
push dword [ebp + 0xc]
mov eax, dword [ebp - 4]
add eax, 0x3d4
push eax
call fcn.006871c0
add esp, 0xc
mov eax, dword [ebp - 4]
push dword [eax + 0x3cc]
push dword [ebp + 0xc]
mov eax, dword [ebp - 4]
add eax, 0x3f4
push eax
call fcn.006871c0
add esp, 0xc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c8]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0x10
je 0x416830
cmp dword [ebp - 0x34], 0x18
je 0x416875
jmp 0x41689f
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3cc], 0x10
jne 0x416845
mov dword [ebp - 0x3c], 0xa
jmp 0x416867
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3cc], 0x18
jne 0x41685a
mov dword [ebp - 0x38], 0xc
jmp 0x416861
mov dword [ebp - 0x38], 0xe
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x3c]
mov dword [eax + 0x3d0], ecx
jmp 0x4168ac
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3cc], 0x20
je 0x41688a
mov dword [ebp - 0x40], 0xc
jmp 0x416891
mov dword [ebp - 0x40], 0xe
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x40]
mov dword [eax + 0x3d0], ecx
jmp 0x4168ac
mov eax, dword [ebp - 4]
mov dword [eax + 0x3d0], 0xe
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3cc]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 0x20], eax
and dword [ebp - 0xc], 0
jmp 0x4168ce
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [eax + 0x3d0]
jg 0x416909
and dword [ebp - 8], 0
jmp 0x4168e9
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x20]
jge 0x416907
mov eax, dword [ebp - 0xc]
shl eax, 5
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 8]
mov ecx, dword [ebp - 8]
and dword [eax + ecx*4], 0
jmp 0x4168e2
jmp 0x4168c7
and dword [ebp - 0xc], 0
jmp 0x416916
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [eax + 0x3d0]
jg 0x416954
and dword [ebp - 8], 0
jmp 0x416931
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x20]
jge 0x416952
mov eax, dword [ebp - 0xc]
shl eax, 5
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 0x1e8]
mov ecx, dword [ebp - 8]
and dword [eax + ecx*4], 0
jmp 0x41692a
jmp 0x41690f
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3d0]
inc eax
imul eax, dword [ebp - 0x20]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c8]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
add eax, 0x414
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
and dword [ebp - 0xc], 0
jmp 0x416998
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jge 0x416a0b
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
shl eax, 0x18
mov ecx, dword [ebp - 0x24]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
shl eax, 0x10
mov ecx, dword [ebp - 0x24]
or eax, dword [ecx]
mov ecx, dword [ebp - 0x24]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
shl eax, 8
mov ecx, dword [ebp - 0x24]
or eax, dword [ecx]
mov ecx, dword [ebp - 0x24]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
mov ecx, dword [ebp - 0x24]
or eax, dword [ecx]
mov ecx, dword [ebp - 0x24]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x24]
add eax, 4
mov dword [ebp - 0x24], eax
jmp 0x416991
and dword [ebp - 0x10], 0
and dword [ebp - 8], 0
jmp 0x416a23
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x1c]
jge 0x416a93
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x30]
jge 0x416a93
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
shl eax, 5
mov ecx, dword [ebp - 4]
lea ecx, [ecx + eax + 8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x3d0]
sub ecx, eax
shl ecx, 5
mov eax, dword [ebp - 4]
lea ecx, [eax + ecx + 0x1e8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
jmp 0x416a15
and dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x30]
jge 0x416d86
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + eax*4 + 0x410]
mov dword [ebp - 0x14], eax
push 4
pop eax
imul eax, eax, 0
mov ecx, dword [ebp - 0x14]
sar ecx, 0x10
and ecx, 0xff
movsx ecx, byte [ecx + str.cw]
and ecx, 0xff
shl ecx, 0x18
mov edx, dword [ebp - 0x14]
sar edx, 8
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
shl edx, 0x10
xor ecx, edx
mov edx, dword [ebp - 0x14]
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
shl edx, 8
xor ecx, edx
mov edx, dword [ebp - 0x14]
sar edx, 0x18
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
xor ecx, edx
mov edx, dword [ebp - 0x2c]
movsx edx, byte [edx + 0x6db210]
and edx, 0xff
shl edx, 0x18
xor ecx, edx
mov edx, dword [ebp - 4]
xor ecx, dword [edx + eax + 0x414]
push 4
pop eax
imul eax, eax, 0
mov edx, dword [ebp - 4]
mov dword [edx + eax + 0x414], ecx
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x1c], 8
je 0x416bb4
mov dword [ebp - 0xc], 1
and dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jge 0x416baf
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [ecx + eax*4 + 0x414]
xor eax, dword [esi + edx*4 + 0x414]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + ecx*4 + 0x414], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
jmp 0x416b70
jmp 0x416cfd
mov dword [ebp - 0xc], 1
and dword [ebp - 8], 0
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
cmp dword [ebp - 0xc], eax
jge 0x416c03
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [ecx + eax*4 + 0x414]
xor eax, dword [esi + edx*4 + 0x414]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + ecx*4 + 0x414], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
jmp 0x416bbf
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + eax*4 + 0x410]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x14]
and ecx, 0xff
movsx ecx, byte [ecx + str.cw]
and ecx, 0xff
mov edx, dword [ebp - 0x14]
sar edx, 8
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
shl edx, 8
xor ecx, edx
mov edx, dword [ebp - 0x14]
sar edx, 0x10
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
shl edx, 0x10
xor ecx, edx
mov edx, dword [ebp - 0x14]
sar edx, 0x18
and edx, 0xff
movsx edx, byte [edx + str.cw]
and edx, 0xff
shl edx, 0x18
xor ecx, edx
mov edx, dword [ebp - 4]
xor ecx, dword [edx + eax*4 + 0x414]
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
mov edx, dword [ebp - 4]
mov dword [edx + eax*4 + 0x414], ecx
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jge 0x416cfd
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [ecx + eax*4 + 0x414]
xor eax, dword [esi + edx*4 + 0x414]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + ecx*4 + 0x414], eax
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
jmp 0x416cbe
and dword [ebp - 8], 0
jmp 0x416d11
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x1c]
jge 0x416d81
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x30]
jge 0x416d81
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
shl eax, 5
mov ecx, dword [ebp - 4]
lea ecx, [ecx + eax + 8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x3d0]
sub ecx, eax
shl ecx, 5
mov eax, dword [ebp - 4]
lea ecx, [eax + ecx + 0x1e8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
jmp 0x416d03
jmp 0x416a97
mov dword [ebp - 0x28], 1
jmp 0x416d96
mov eax, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x28]
cmp ecx, dword [eax + 0x3d0]
jge 0x416e3e
and dword [ebp - 8], 0
jmp 0x416db5
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x20]
jge 0x416e39
mov eax, dword [ebp - 0x28]
shl eax, 5
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 0x1e8]
mov ecx, dword [ebp - 8]
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
sar eax, 0x18
and eax, 0xff
mov ecx, dword [ebp - 0x14]
sar ecx, 0x10
and ecx, 0xff
mov eax, dword [eax*4 + 0x6da210]
xor eax, dword [ecx*4 + 0x6da610]
mov ecx, dword [ebp - 0x14]
sar ecx, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x6daa10]
mov ecx, dword [ebp - 0x14]
and ecx, 0xff
xor eax, dword [ecx*4 + 0x6dae10]
mov ecx, dword [ebp - 0x28]
shl ecx, 5
mov edx, dword [ebp - 4]
lea ecx, [edx + ecx + 0x1e8]
mov edx, dword [ebp - 8]
mov dword [ecx + edx*4], eax
jmp 0x416dae
jmp 0x416d8f
mov eax, dword [ebp - 4]
mov byte [eax + 4], 1
pop esi
mov esp, ebp
pop ebp
ret 0x10