Function at 0x566bef
Capabilities:
Encrypt data using aes via winapi

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push 0x402c56
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0xb0
call sub.MSVBVM60.DLL___vbaChkstk
push ebx
push esi
push edi
mov dword [ebp - 8], esp
mov dword [ebp - 4], 0x56b410
mov eax, dword [ebp + 8]
mov eax, dword [eax]
not eax
not eax
push eax
call fcn.00402bcd
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x5c], 8
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x28]
call sub.MSVBVM60.DLL___vbaVarCopy
call fcn.00567281
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x566c5d
jmp 0x56723f
push 0
push 4
push 1
push 0
lea eax, [ebp - 0x4c]
push eax
push 0x10
push 0x880
call sub.MSVBVM60.DLL___vbaRedim
add esp, 0x1c
lea eax, [ebp - 0x34]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x5c], 0x4003
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x4c]
xor ecx, ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarZero
mov dword [ebp - 0x64], 0x8003
mov dword [ebp - 0x6c], 3
lea edx, [ebp - 0x6c]
mov eax, dword [ebp - 0x4c]
push 1
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
and dword [ebp - 0x74], 0
mov dword [ebp - 0x7c], 2
lea edx, [ebp - 0x7c]
mov eax, dword [ebp - 0x4c]
push 2
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
and dword [ebp - 0x84], 0
mov dword [ebp - 0x8c], 2
lea edx, [ebp - 0x8c]
mov eax, dword [ebp - 0x4c]
push 3
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
lea eax, [ebp - 0x30]
push eax
call sub.MSVBVM60.DLL_VarPtr
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x9c], 3
lea edx, [ebp - 0x9c]
mov eax, dword [ebp - 0x4c]
push 4
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [0x56c1f8]
push 0x14
pop ecx
sub ecx, dword [eax + 0x14]
mov eax, dword [0x56c1f8]
mov eax, dword [eax + 0xc]
push dword [eax + ecx*4]
call fcn.00402908
mov dword [ebp - 0xb0], eax
lea eax, [ebp - 0x4c]
push eax
push 0
call sub.MSVBVM60.DLL___vbaErase
cmp dword [ebp - 0xb0], 0
jne 0x566d97
jmp 0x5670bb
push 0
push 3
push 1
push 0
lea eax, [ebp - 0x4c]
push eax
push 0x10
push 0x880
call sub.MSVBVM60.DLL___vbaRedim
add esp, 0x1c
lea eax, [ebp - 0x30]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x5c], 0x4003
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x4c]
xor ecx, ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarZero
mov eax, dword [ebp + 0xc]
push dword [eax]
call fcn.00402727
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x48], 8
lea eax, [ebp - 0x48]
push eax
call fcn.00566b77
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x6c], 3
lea edx, [ebp - 0x6c]
mov eax, dword [ebp - 0x4c]
push 1
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
mov eax, dword [ebp + 0xc]
push dword [eax]
call sub.MSVBVM60.DLL___vbaLenBstr
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x7c], 3
lea edx, [ebp - 0x7c]
mov eax, dword [ebp - 0x4c]
push 2
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
and dword [ebp - 0x84], 0
mov dword [ebp - 0x8c], 2
lea edx, [ebp - 0x8c]
mov eax, dword [ebp - 0x4c]
push 3
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [0x56c1f8]
push 0x15
pop ecx
sub ecx, dword [eax + 0x14]
mov eax, dword [0x56c1f8]
mov eax, dword [eax + 0xc]
push dword [eax + ecx*4]
call fcn.00402908
mov dword [ebp - 0xb0], eax
lea eax, [ebp - 0x4c]
push eax
push 0
call sub.MSVBVM60.DLL___vbaErase
xor eax, eax
cmp dword [ebp - 0xb0], 0
sete al
neg eax
mov word [ebp - 0xbc], ax
lea ecx, [ebp - 0x48]
call sub.MSVBVM60.DLL___vbaFreeVar
movsx eax, word [ebp - 0xbc]
test eax, eax
je 0x566eda
jmp 0x5670bb
lea eax, [ebp - 0x14]
push eax
push 0
push dword [ebp - 0x30]
push 0x6610
push dword [ebp - 0x34]
call sub.ADVAPI32.DLL_CryptDeriveKey
test eax, eax
jne 0x566ef9
jmp 0x5670bb
push 0
push 5
push 1
push 0
lea eax, [ebp - 0x4c]
push eax
push 0x10
push 0x880
call sub.MSVBVM60.DLL___vbaRedim
add esp, 0x1c
lea eax, [ebp - 0x14]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x5c], 0x4003
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x4c]
xor ecx, ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarZero
and dword [ebp - 0x64], 0
mov dword [ebp - 0x6c], 2
lea edx, [ebp - 0x6c]
mov eax, dword [ebp - 0x4c]
push 1
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
mov dword [ebp - 0x74], 1
mov dword [ebp - 0x7c], 2
lea edx, [ebp - 0x7c]
mov eax, dword [ebp - 0x4c]
push 2
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
and dword [ebp - 0x84], 0
mov dword [ebp - 0x8c], 2
lea edx, [ebp - 0x8c]
mov eax, dword [ebp - 0x4c]
push 3
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
mov eax, dword [ebp + 8]
push dword [eax]
lea eax, [ebp - 0x38]
push eax
call sub.MSVBVM60.DLL___vbaAryLock
mov eax, dword [ebp - 0x38]
xor ecx, ecx
sub ecx, dword [eax + 0x14]
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 0xc]
add eax, ecx
push eax
call sub.MSVBVM60.DLL_VarPtr
mov dword [ebp - 0xb0], eax
lea eax, [ebp - 0x38]
push eax
call sub.MSVBVM60.DLL___vbaAryUnlock
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x9c], 3
lea edx, [ebp - 0x9c]
mov eax, dword [ebp - 0x4c]
push 4
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0xb4]
push eax
call sub.MSVBVM60.DLL_VarPtr
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xac], 3
lea edx, [ebp - 0xac]
mov eax, dword [ebp - 0x4c]
push 5
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [0x56c1f8]
push 0x17
pop ecx
sub ecx, dword [eax + 0x14]
mov eax, dword [0x56c1f8]
mov eax, dword [eax + 0xc]
push dword [eax + ecx*4]
call fcn.00402908
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0x4c]
push eax
push 0
call sub.MSVBVM60.DLL___vbaErase
push 0
mov eax, dword [ebp - 0x18]
dec eax
push eax
push 1
push 0x11
push dword [ebp + 8]
push 1
push pe_nt_image_headers32
call sub.MSVBVM60.DLL___vbaRedimPreserve
add esp, 0x1c
or word [ebp - 0x2c], 0xffff
cmp dword [ebp - 0x14], 0
je 0x56712e
push 0
push 0
push 1
push 0
lea eax, [ebp - 0x4c]
push eax
push 0x10
push 0x880
call sub.MSVBVM60.DLL___vbaRedim
add esp, 0x1c
lea eax, [ebp - 0x14]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x5c], 0x4003
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x4c]
xor ecx, ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarZero
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [0x56c1f8]
push 0x19
pop ecx
sub ecx, dword [eax + 0x14]
mov eax, dword [0x56c1f8]
mov eax, dword [eax + 0xc]
push dword [eax + ecx*4]
call fcn.00402908
lea eax, [ebp - 0x4c]
push eax
push 0
call sub.MSVBVM60.DLL___vbaErase
cmp dword [ebp - 0x30], 0
je 0x5671a1
push 0
push 0
push 1
push 0
lea eax, [ebp - 0x4c]
push eax
push 0x10
push 0x880
call sub.MSVBVM60.DLL___vbaRedim
add esp, 0x1c
lea eax, [ebp - 0x30]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x5c], 0x4003
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x4c]
xor ecx, ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarZero
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [0x56c1f8]
push 0x1a
pop ecx
sub ecx, dword [eax + 0x14]
mov eax, dword [0x56c1f8]
mov eax, dword [eax + 0xc]
push dword [eax + ecx*4]
call fcn.00402908
lea eax, [ebp - 0x4c]
push eax
push 0
call sub.MSVBVM60.DLL___vbaErase
cmp dword [ebp - 0x34], 0
je 0x56723f
push 0
push 1
push 1
push 0
lea eax, [ebp - 0x4c]
push eax
push 0x10
push 0x880
call sub.MSVBVM60.DLL___vbaRedim
add esp, 0x1c
lea eax, [ebp - 0x34]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x5c], 0x4003
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x4c]
xor ecx, ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarZero
and dword [ebp - 0x64], 0
mov dword [ebp - 0x6c], 3
lea edx, [ebp - 0x6c]
mov eax, dword [ebp - 0x4c]
push 1
pop ecx
sub ecx, dword [eax + 0x14]
shl ecx, 4
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0xc]
add ecx, eax
call sub.MSVBVM60.DLL___vbaVarMove
lea eax, [ebp - 0x4c]
push eax
mov eax, dword [0x56c1f8]
push 0x1b
pop ecx
sub ecx, dword [eax + 0x14]
mov eax, dword [0x56c1f8]
mov eax, dword [eax + 0xc]
push dword [eax + ecx*4]
call fcn.00402908
lea eax, [ebp - 0x4c]
push eax
push 0
call sub.MSVBVM60.DLL___vbaErase
push 0x56726c
jmp 0x567263
lea ecx, [ebp - 0x28]
call sub.MSVBVM60.DLL___vbaFreeVar
ret