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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
push esi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], 0
jne 0x10024e51
mov dword [ebp - 0x44], str.Empty_key
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x58]
call fcn.1005c403
push 0x100941b4
lea ecx, [ebp - 0x58]
push ecx
call fcn.1005c9b5
cmp dword [ebp + 0x10], 0x10
je 0x10024e84
cmp dword [ebp + 0x10], 0x18
je 0x10024e84
cmp dword [ebp + 0x10], 0x20
je 0x10024e84
mov dword [ebp - 0x48], str.Incorrect_key_length
lea edx, [ebp - 0x48]
push edx
lea ecx, [ebp - 0x64]
call fcn.1005c403
push 0x100941b4
lea eax, [ebp - 0x64]
push eax
call fcn.1005c9b5
cmp dword [ebp + 0x14], 0x10
je 0x10024eb7
cmp dword [ebp + 0x14], 0x18
je 0x10024eb7
cmp dword [ebp + 0x14], 0x20
je 0x10024eb7
mov dword [ebp - 0x4c], str.Incorrect_block_length
lea ecx, [ebp - 0x4c]
push ecx
lea ecx, [ebp - 0x70]
call fcn.1005c403
push 0x100941b4
lea edx, [ebp - 0x70]
push edx
call fcn.1005c9b5
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x3c8], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0x14]
mov dword [edx + 0x3cc], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x3cc]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 4]
add ecx, 0x3d4
push ecx
call fcn.1005e620
add esp, 0xc
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x3cc]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 4]
add edx, 0x3f4
push edx
call fcn.1005e620
add esp, 0xc
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x3c8]
mov dword [ebp - 0x34], ecx
cmp dword [ebp - 0x34], 0x10
je 0x10024f29
cmp dword [ebp - 0x34], 0x18
je 0x10024f6e
jmp 0x10024f98
mov edx, dword [ebp - 4]
cmp dword [edx + 0x3cc], 0x10
jne 0x10024f3e
mov dword [ebp - 0x3c], 0xa
jmp 0x10024f60
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3cc], 0x18
jne 0x10024f53
mov dword [ebp - 0x38], 0xc
jmp 0x10024f5a
mov dword [ebp - 0x38], 0xe
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x3c]
mov dword [edx + 0x3d0], eax
jmp 0x10024fa5
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x3cc], 0x20
je 0x10024f83
mov dword [ebp - 0x40], 0xc
jmp 0x10024f8a
mov dword [ebp - 0x40], 0xe
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x40]
mov dword [edx + 0x3d0], eax
jmp 0x10024fa5
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x3d0], 0xe
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x3cc]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], 0
jmp 0x10024fcc
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
cmp edx, dword [ecx + 0x3d0]
jg 0x1002500f
mov dword [ebp - 8], 0
jmp 0x10024fec
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x20]
jge 0x1002500d
mov edx, dword [ebp - 0xc]
shl edx, 5
mov eax, dword [ebp - 4]
lea ecx, [eax + edx + 8]
mov edx, dword [ebp - 8]
mov dword [ecx + edx*4], 0
jmp 0x10024fe3
jmp 0x10024fc3
mov dword [ebp - 0xc], 0
jmp 0x10025021
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
cmp edx, dword [ecx + 0x3d0]
jg 0x10025067
mov dword [ebp - 8], 0
jmp 0x10025041
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x20]
jge 0x10025065
mov edx, dword [ebp - 0xc]
shl edx, 5
mov eax, dword [ebp - 4]
lea ecx, [eax + edx + 0x1e8]
mov edx, dword [ebp - 8]
mov dword [ecx + edx*4], 0
jmp 0x10025038
jmp 0x10025018
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x3d0]
add ecx, 1
imul ecx, dword [ebp - 0x20]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 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 ecx, dword [ebp + 8]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0xc], 0
jmp 0x100250b2
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jge 0x10025130
mov ecx, dword [ebp - 0x18]
movzx edx, byte [ecx]
shl edx, 0x18
mov eax, dword [ebp - 0x24]
mov dword [eax], edx
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
movzx eax, byte [edx]
shl eax, 0x10
mov ecx, dword [ebp - 0x24]
or eax, dword [ecx]
mov edx, dword [ebp - 0x24]
mov dword [edx], eax
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
movzx edx, byte [ecx]
shl edx, 8
mov eax, dword [ebp - 0x24]
or edx, dword [eax]
mov ecx, dword [ebp - 0x24]
mov dword [ecx], edx
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
movzx ecx, byte [eax]
mov edx, dword [ebp - 0x24]
or ecx, dword [edx]
mov eax, dword [ebp - 0x24]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x24]
add edx, 4
mov dword [ebp - 0x24], edx
jmp 0x100250a9
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], 0
jmp 0x10025152
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 8]
cmp edx, dword [ebp - 0x1c]
jge 0x100251c5
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x30]
jge 0x100251c5
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 edx, dword [ecx + 0x3d0]
sub edx, eax
shl edx, 5
mov eax, dword [ebp - 4]
lea ecx, [eax + edx + 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 0x10025140
mov dword [ebp - 0x2c], 0
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x30]
jge 0x100254d7
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + edx*4 + 0x410]
mov dword [ebp - 0x14], ecx
mov edx, 4
imul edx, edx, 0
mov eax, dword [ebp - 0x14]
sar eax, 0x10
and eax, 0xff
movsx ecx, byte [eax + str.cw]
and ecx, 0xff
shl ecx, 0x18
mov eax, dword [ebp - 0x14]
sar eax, 8
and eax, 0xff
movsx eax, byte [eax + str.cw]
and eax, 0xff
shl eax, 0x10
xor ecx, eax
mov eax, dword [ebp - 0x14]
and eax, 0xff
movsx eax, byte [eax + str.cw]
and eax, 0xff
shl eax, 8
xor ecx, eax
mov eax, dword [ebp - 0x14]
sar eax, 0x18
and eax, 0xff
movsx eax, byte [eax + str.cw]
and eax, 0xff
xor ecx, eax
mov eax, dword [ebp - 0x2c]
movsx eax, byte [eax + 0x100814a0]
and eax, 0xff
shl eax, 0x18
xor ecx, eax
mov eax, dword [ebp - 4]
xor ecx, dword [eax + edx + 0x414]
mov edx, 4
imul edx, edx, 0
mov eax, dword [ebp - 4]
mov dword [eax + edx + 0x414], ecx
mov ecx, dword [ebp - 0x2c]
add ecx, 1
mov dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x1c], 8
je 0x100252ee
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], 0
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x1c]
jge 0x100252e9
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]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
jmp 0x100252a6
jmp 0x10025444
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
cmp dword [ebp - 0xc], eax
jge 0x10025344
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov edx, dword [eax + edx*4 + 0x414]
xor edx, dword [esi + ecx*4 + 0x414]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov dword [ecx + eax*4 + 0x414], edx
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
jmp 0x100252fc
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + eax*4 + 0x410]
mov dword [ebp - 0x14], edx
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]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x1c]
jge 0x10025444
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 4]
mov edx, dword [eax + edx*4 + 0x414]
xor edx, dword [esi + ecx*4 + 0x414]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov dword [ecx + eax*4 + 0x414], edx
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
jmp 0x10025401
mov dword [ebp - 8], 0
jmp 0x1002545f
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x1c]
jge 0x100254d2
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x30]
jge 0x100254d2
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x20]
shl eax, 5
mov edx, dword [ebp - 4]
lea ecx, [edx + 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 edx, dword [ecx + 0x3d0]
sub edx, eax
shl edx, 5
mov eax, dword [ebp - 4]
lea ecx, [eax + edx + 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 0x1002544d
jmp 0x100251cc
mov dword [ebp - 0x28], 1
jmp 0x100254e9
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x28]
cmp eax, dword [edx + 0x3d0]
jge 0x10025595
mov dword [ebp - 8], 0
jmp 0x1002550d
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
cmp edx, dword [ebp - 0x20]
jge 0x10025590
mov eax, dword [ebp - 0x28]
shl eax, 5
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax + 0x1e8]
mov eax, dword [ebp - 8]
mov ecx, dword [edx + eax*4]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
sar edx, 0x18
and edx, 0xff
mov eax, dword [ebp - 0x14]
sar eax, 0x10
and eax, 0xff
mov ecx, dword [edx*4 + 0x100804a0]
xor ecx, dword [eax*4 + 0x100808a0]
mov edx, dword [ebp - 0x14]
sar edx, 8
and edx, 0xff
xor ecx, dword [edx*4 + 0x10080ca0]
mov eax, dword [ebp - 0x14]
and eax, 0xff
xor ecx, dword [eax*4 + 0x100810a0]
mov edx, dword [ebp - 0x28]
shl edx, 5
mov eax, dword [ebp - 4]
lea edx, [eax + edx + 0x1e8]
mov eax, dword [ebp - 8]
mov dword [edx + eax*4], ecx
jmp 0x10025504
jmp 0x100254e0
mov ecx, dword [ebp - 4]
mov byte [ecx + 4], 1
pop esi
mov esp, ebp
pop ebp
ret 0x10