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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
push esi
mov dword [ebp - 0x60], ecx
cmp dword [ebp + 8], 0
jne 0x1001047d
mov dword [ebp - 0x3c], str.Empty_key
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x38]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
push 0x1001cc10
lea eax, [ebp - 0x38]
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp + 0x10], 0x10
je 0x100104b1
cmp dword [ebp + 0x10], 0x18
je 0x100104b1
cmp dword [ebp + 0x10], 0x20
je 0x100104b1
mov dword [ebp - 0x4c], str.Incorrect_key_length
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
push 0x1001cc10
lea eax, [ebp - 0x48]
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp + 0x14], 0x10
je 0x100104e5
cmp dword [ebp + 0x14], 0x18
je 0x100104e5
cmp dword [ebp + 0x14], 0x20
je 0x100104e5
mov dword [ebp - 0x5c], str.Incorrect_block_length
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x58]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
push 0x1001cc10
lea eax, [ebp - 0x58]
push eax
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x3c8], ecx
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x3cc], ecx
mov eax, dword [ebp - 0x60]
push dword [eax + 0x3cc]
push dword [ebp + 0xc]
mov eax, dword [ebp - 0x60]
add eax, 0x3d4
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x60]
push dword [eax + 0x3cc]
push dword [ebp + 0xc]
mov eax, dword [ebp - 0x60]
add eax, 0x3f4
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 0x3c8]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0x10
je 0x10010551
cmp dword [ebp - 0x64], 0x18
je 0x1001058d
jmp 0x100105ae
mov eax, dword [ebp - 0x60]
cmp dword [eax + 0x3cc], 0x10
jne 0x10010566
mov dword [ebp - 0x68], 0xa
jmp 0x1001057f
mov eax, dword [ebp - 0x60]
xor ecx, ecx
cmp dword [eax + 0x3cc], 0x18
setne cl
dec ecx
and ecx, 0xfffffffe
add ecx, 0xe
mov dword [ebp - 0x68], ecx
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x68]
mov dword [eax + 0x3d0], ecx
jmp 0x100105bb
mov eax, dword [ebp - 0x60]
xor ecx, ecx
cmp dword [eax + 0x3cc], 0x20
sete cl
dec ecx
and ecx, 0xfffffffe
add ecx, 0xe
mov eax, dword [ebp - 0x60]
mov dword [eax + 0x3d0], ecx
jmp 0x100105bb
mov eax, dword [ebp - 0x60]
mov dword [eax + 0x3d0], 0xe
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 0x3cc]
cdq
push 4
pop ecx
idiv ecx
mov dword [ebp - 0x2c], eax
and dword [ebp - 0x14], 0
jmp 0x100105da
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax + 0x3d0]
jg 0x10010615
and dword [ebp - 0x1c], 0
jmp 0x100105f5
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x2c]
jge 0x10010613
mov eax, dword [ebp - 0x14]
shl eax, 5
mov ecx, dword [ebp - 0x60]
lea eax, [ecx + eax + 8]
mov ecx, dword [ebp - 0x1c]
and dword [eax + ecx*4], 0
jmp 0x100105ee
jmp 0x100105d3
and dword [ebp - 0x14], 0
jmp 0x10010622
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax + 0x3d0]
jg 0x10010660
and dword [ebp - 0x1c], 0
jmp 0x1001063d
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x2c]
jge 0x1001065e
mov eax, dword [ebp - 0x14]
shl eax, 5
mov ecx, dword [ebp - 0x60]
lea eax, [ecx + eax + 0x1e8]
mov ecx, dword [ebp - 0x1c]
and dword [eax + ecx*4], 0
jmp 0x10010636
jmp 0x1001061b
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 0x3d0]
inc eax
imul eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 0x3c8]
cdq
push 4
pop ecx
idiv ecx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x60]
add eax, 0x414
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
and dword [ebp - 0x14], 0
jmp 0x100106a1
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0xc]
jge 0x1001071a
mov eax, dword [ebp - 0x18]
movzx eax, byte [eax]
shl eax, 0x18
mov ecx, dword [ebp - 4]
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 - 4]
mov ecx, dword [ecx]
or ecx, eax
mov eax, dword [ebp - 4]
mov dword [eax], ecx
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 - 4]
mov ecx, dword [ecx]
or ecx, eax
mov eax, dword [ebp - 4]
mov dword [eax], ecx
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 - 4]
mov ecx, dword [ecx]
or ecx, eax
mov eax, dword [ebp - 4]
mov dword [eax], ecx
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
add eax, 4
mov dword [ebp - 4], eax
jmp 0x1001069a
and dword [ebp - 0x10], 0
and dword [ebp - 0x1c], 0
jmp 0x10010732
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0xc]
jge 0x100107a2
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x28]
jge 0x100107a2
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x2c]
shl eax, 5
mov ecx, dword [ebp - 0x60]
lea ecx, [ecx + eax + 8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x60]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x60]
mov ecx, dword [ecx + 0x3d0]
sub ecx, eax
shl ecx, 5
mov eax, dword [ebp - 0x60]
lea ecx, [eax + ecx + 0x1e8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x60]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
jmp 0x10010724
and dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x28]
jge 0x10010a89
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x60]
mov eax, dword [ecx + eax*4 + 0x410]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
sar eax, 0x10
and eax, 0xff
movsx eax, byte [eax + str.cw]
and eax, 0xff
shl eax, 0x18
mov ecx, dword [ebp - 0x20]
sar ecx, 8
and ecx, 0xff
movsx ecx, byte [ecx + str.cw]
and ecx, 0xff
shl ecx, 0x10
xor eax, ecx
mov ecx, dword [ebp - 0x20]
and ecx, 0xff
movsx ecx, byte [ecx + str.cw]
and ecx, 0xff
shl ecx, 8
xor eax, ecx
mov ecx, dword [ebp - 0x20]
sar ecx, 0x18
and ecx, 0xff
movsx ecx, byte [ecx + str.cw]
and ecx, 0xff
xor eax, ecx
mov ecx, dword [ebp - 0x24]
movsx ecx, byte [ecx + 0x10019c84]
and ecx, 0xff
shl ecx, 0x18
xor eax, ecx
mov ecx, dword [ebp - 0x60]
mov ecx, dword [ecx + 0x414]
xor ecx, eax
mov eax, dword [ebp - 0x60]
mov dword [eax + 0x414], ecx
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0xc], 8
je 0x100108b5
mov dword [ebp - 0x14], 1
and dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0xc]
jge 0x100108b0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x60]
mov eax, dword [ecx + eax*4 + 0x414]
xor eax, dword [esi + edx*4 + 0x414]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x60]
mov dword [edx + ecx*4 + 0x414], eax
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
jmp 0x10010871
jmp 0x10010a00
mov dword [ebp - 0x14], 1
and dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0xc]
cdq
sub eax, edx
sar eax, 1
cmp dword [ebp - 0x14], eax
jge 0x10010904
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x60]
mov eax, dword [ecx + eax*4 + 0x414]
xor eax, dword [esi + edx*4 + 0x414]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x60]
mov dword [edx + ecx*4 + 0x414], eax
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
jmp 0x100108c0
mov eax, dword [ebp - 0xc]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x60]
mov eax, dword [ecx + eax*4 + 0x410]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xc]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x20]
and ecx, 0xff
movsx ecx, byte [ecx + str.cw]
and ecx, 0xff
mov edx, dword [ebp - 0x20]
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 - 0x20]
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 - 0x20]
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 - 0x60]
mov esi, dword [edx + eax*4 + 0x414]
xor esi, ecx
mov eax, dword [ebp - 0xc]
cdq
sub eax, edx
sar eax, 1
mov ecx, dword [ebp - 0x60]
mov dword [ecx + eax*4 + 0x414], esi
mov eax, dword [ebp - 0xc]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0xc]
jge 0x10010a00
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x60]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x60]
mov eax, dword [ecx + eax*4 + 0x414]
xor eax, dword [esi + edx*4 + 0x414]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x60]
mov dword [edx + ecx*4 + 0x414], eax
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
jmp 0x100109c1
and dword [ebp - 0x1c], 0
jmp 0x10010a14
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0xc]
jge 0x10010a84
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x28]
jge 0x10010a84
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x2c]
shl eax, 5
mov ecx, dword [ebp - 0x60]
lea ecx, [ecx + eax + 8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x60]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x60]
mov ecx, dword [ecx + 0x3d0]
sub ecx, eax
shl ecx, 5
mov eax, dword [ebp - 0x60]
lea ecx, [eax + ecx + 0x1e8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x60]
mov eax, dword [esi + eax*4 + 0x414]
mov dword [ecx + edx*4], eax
jmp 0x10010a06
jmp 0x100107a6
mov dword [ebp - 8], 1
jmp 0x10010a99
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax + 0x3d0]
jge 0x10010b41
and dword [ebp - 0x1c], 0
jmp 0x10010ab8
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x2c]
jge 0x10010b3c
mov eax, dword [ebp - 8]
shl eax, 5
mov ecx, dword [ebp - 0x60]
lea eax, [ecx + eax + 0x1e8]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
sar eax, 0x18
and eax, 0xff
mov ecx, dword [ebp - 0x20]
sar ecx, 0x10
and ecx, 0xff
mov eax, dword [eax*4 + 0x10018c84]
xor eax, dword [ecx*4 + 0x10019084]
mov ecx, dword [ebp - 0x20]
sar ecx, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x10019484]
mov ecx, dword [ebp - 0x20]
and ecx, 0xff
xor eax, dword [ecx*4 + 0x10019884]
mov ecx, dword [ebp - 8]
shl ecx, 5
mov edx, dword [ebp - 0x60]
lea ecx, [edx + ecx + 0x1e8]
mov edx, dword [ebp - 0x1c]
mov dword [ecx + edx*4], eax
jmp 0x10010ab1
jmp 0x10010a92
mov eax, dword [ebp - 0x60]
mov byte [eax + 4], 1
pop esi
leave
ret 0x10