Function at 0x405e90
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push 0x401b36
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x3a4
call sub.MSVBVM60.DLL___vbaChkstk
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x14], 0x4012e8
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 1
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x294]
call dword [sym.imp.MSVBVM60.DLL___vbaStrCopy]
mov dword [ebp - 4], 2
push 0xffffffffffffffff
call dword [sym.imp.MSVBVM60.DLL___vbaOnError]
mov dword [ebp - 4], 3
push 0x40309c
push 0x4030c0
call dword [sym.imp.MSVBVM60.DLL___vbaStrCmp]
test eax, eax
jne 0x405f49
mov dword [ebp - 4], 4
mov dword [ebp - 4], 5
lea eax, [ebp - 0x2ec]
push eax
call dword [sym.imp.MSVBVM60.DLL_rtcGetPresentDate]
lea ecx, [ebp - 0x2ec]
push ecx
call dword [sym.imp.MSVBVM60.DLL_rtcIsError]
mov word [ebp - 0x290], ax
lea ecx, [ebp - 0x2ec]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVar]
mov dword [ebp - 4], 7
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
push eax
lea ecx, [ebp - 0x2d8]
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaAryLock]
cmp dword [ebp - 0x2d8], 0
je 0x405fc0
mov edx, dword [ebp - 0x2d8]
cmp word [edx], 1
jne 0x405fc0
mov eax, dword [ebp - 0x2d8]
xor ecx, ecx
sub ecx, dword [eax + 0x14]
mov dword [ebp - 0x314], ecx
mov edx, dword [ebp - 0x2d8]
mov eax, dword [ebp - 0x314]
cmp eax, dword [edx + 0x10]
jae 0x405fa6
mov dword [ebp - 0x3a0], 0
jmp 0x405fb2
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x3a0], eax
mov ecx, dword [ebp - 0x314]
mov dword [ebp - 0x3a4], ecx
jmp 0x405fcc
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x3a4], eax
push 0x40
mov edx, dword [ebp - 0x2d8]
mov eax, dword [edx + 0xc]
add eax, dword [ebp - 0x3a4]
push eax
lea ecx, [ebp - 0x6c]
push ecx
call fcn.00402be4
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
lea edx, [ebp - 0x2d8]
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
mov dword [ebp - 4], 8
movsx eax, word [ebp - 0x6c]
cmp eax, 0x5a4d
je 0x406011
jmp 0x406867
mov dword [ebp - 4], 0xb
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
lea eax, [ebp - 0x2d8]
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaAryLock]
cmp dword [ebp - 0x2d8], 0
je 0x406089
mov ecx, dword [ebp - 0x2d8]
cmp word [ecx], 1
jne 0x406089
mov edx, dword [ebp - 0x2d8]
mov eax, dword [ebp - 0x30]
sub eax, dword [edx + 0x14]
mov dword [ebp - 0x314], eax
mov ecx, dword [ebp - 0x2d8]
mov edx, dword [ebp - 0x314]
cmp edx, dword [ecx + 0x10]
jae 0x40606f
mov dword [ebp - 0x3a8], 0
jmp 0x40607b
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x3a8], eax
mov eax, dword [ebp - 0x314]
mov dword [ebp - 0x3ac], eax
jmp 0x406095
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x3ac], eax
push 0xf8
mov ecx, dword [ebp - 0x2d8]
mov edx, dword [ecx + 0xc]
add edx, dword [ebp - 0x3ac]
push edx
lea eax, [ebp - 0x168]
push eax
call fcn.00402be4
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
lea ecx, [ebp - 0x2d8]
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
mov dword [ebp - 4], 0xc
cmp dword [ebp - 0x168], 0x4550
je 0x40613d
jmp 0x406867
mov dword [ebp - 4], 0x13
lea eax, [ebp - 0x2a4]
push eax
lea ecx, [ebp - 0x28c]
push ecx
lea edx, [ebp - 0x358]
push edx
push 0x402b88
call dword [sym.imp.MSVBVM60.DLL___vbaRecUniToAnsi]
push eax
push 0
push 0
push 4
push 0
push 0
push 0
mov eax, dword [ebp - 0x294]
push eax
lea ecx, [ebp - 0x2dc]
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaStrToAnsi]
push eax
push 0
call fcn.00402c2c
mov dword [ebp - 0x310], eax
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
lea edx, [ebp - 0x358]
push edx
lea eax, [ebp - 0x28c]
push eax
push 0x402b88
call dword [sym.imp.MSVBVM60.DLL___vbaRecAnsiToUni]
mov ecx, dword [ebp - 0x2dc]
push ecx
lea edx, [ebp - 0x294]
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaStrToUnicode]
xor eax, eax
cmp dword [ebp - 0x310], 0
sete al
neg eax
mov word [ebp - 0x314], ax
lea ecx, [ebp - 0x2dc]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
lea ecx, [ebp - 0x358]
push ecx
push 0x402b88
call dword [sym.imp.MSVBVM60.DLL___vbaRecDestructAnsi]
movsx edx, word [ebp - 0x314]
test edx, edx
je 0x406209
jmp 0x406867
mov dword [ebp - 4], 0x16
mov dword [ebp - 0x23c], 0x10002
mov dword [ebp - 4], 0x17
lea eax, [ebp - 0x23c]
push eax
mov ecx, dword [ebp - 0x2a0]
push ecx
call fcn.00402e04
mov dword [ebp - 0x310], eax
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
cmp dword [ebp - 0x310], 0
jne 0x40624e
jmp 0x406835
mov dword [ebp - 4], 0x1a
mov dword [ebp - 0x310], 0
lea edx, [ebp - 0x310]
push edx
push 4
lea eax, [ebp - 0x170]
push eax
mov ecx, dword [ebp - 0x198]
add ecx, 8
jo 0x4068f8
push ecx
mov edx, dword [ebp - 0x2a4]
push edx
call fcn.00402d24
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov dword [ebp - 4], 0x1b
cmp dword [ebp - 0x170], 0
jne 0x4062a6
jmp 0x406835
mov dword [ebp - 4], 0x1e
mov eax, dword [ebp - 0x170]
push eax
mov ecx, dword [ebp - 0x2a4]
push ecx
call fcn.00402c8c
mov dword [ebp - 0x310], eax
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
cmp dword [ebp - 0x310], 0
je 0x40634e
jmp 0x406835
mov dword [ebp - 4], 0x25
push 4
push 0x3000
mov edx, dword [ebp - 0x118]
push edx
mov eax, dword [ebp - 0x134]
push eax
mov ecx, dword [ebp - 0x2a4]
push ecx
call fcn.00402d6c
mov dword [ebp - 0x310], eax
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov edx, dword [ebp - 0x310]
mov dword [ebp - 0x248], edx
mov dword [ebp - 4], 0x26
cmp dword [ebp - 0x248], 0
jne 0x4063a3
jmp 0x406835
mov dword [ebp - 4], 0x29
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
lea edx, [ebp - 0x2d8]
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaAryLock]
cmp dword [ebp - 0x2d8], 0
je 0x40641a
mov eax, dword [ebp - 0x2d8]
cmp word [eax], 1
jne 0x40641a
mov ecx, dword [ebp - 0x2d8]
xor edx, edx
sub edx, dword [ecx + 0x14]
mov dword [ebp - 0x314], edx
mov eax, dword [ebp - 0x2d8]
mov ecx, dword [ebp - 0x314]
cmp ecx, dword [eax + 0x10]
jae 0x406400
mov dword [ebp - 0x3b0], 0
jmp 0x40640c
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x3b0], eax
mov edx, dword [ebp - 0x314]
mov dword [ebp - 0x3b4], edx
jmp 0x406426
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x3b4], eax
lea eax, [ebp - 0x70]
push eax
mov ecx, dword [ebp - 0x114]
push ecx
mov edx, dword [ebp - 0x2d8]
mov eax, dword [edx + 0xc]
add eax, dword [ebp - 0x3b4]
push eax
mov ecx, dword [ebp - 0x248]
push ecx
mov edx, dword [ebp - 0x2a4]
push edx
call fcn.00402cd8
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
lea eax, [ebp - 0x2d8]
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
mov dword [ebp - 4], 0x2a
mov ecx, dword [ebp - 0x30]
add ecx, 0xf8
jo 0x4068f8
mov dword [ebp - 0x24], ecx
mov dword [ebp - 4], 0x2b
mov dx, word [ebp - 0x162]
sub dx, 1
jo 0x4068f8
movsx eax, dx
mov dword [ebp - 0x388], eax
mov dword [ebp - 0x384], 1
mov dword [ebp - 0x28], 0
jmp 0x4064c6
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x384]
jo 0x4068f8
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x388]
jg 0x406794
mov dword [ebp - 4], 0x2c
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
lea edx, [ebp - 0x2d8]
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaAryLock]
cmp dword [ebp - 0x2d8], 0
je 0x406561
mov eax, dword [ebp - 0x2d8]
cmp word [eax], 1
jne 0x406561
mov ecx, dword [ebp - 0x28]
imul ecx, ecx, 0x28
jo 0x4068f8
mov edx, dword [ebp - 0x24]
add edx, ecx
jo 0x4068f8
mov eax, dword [ebp - 0x2d8]
sub edx, dword [eax + 0x14]
mov dword [ebp - 0x314], edx
mov ecx, dword [ebp - 0x2d8]
mov edx, dword [ebp - 0x314]
cmp edx, dword [ecx + 0x10]
jae 0x406547
mov dword [ebp - 0x3b8], 0
jmp 0x406553
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x3b8], eax
mov eax, dword [ebp - 0x314]
mov dword [ebp - 0x3bc], eax
jmp 0x40656d
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x3bc], eax
push 0x28
mov ecx, dword [ebp - 0x2d8]
mov edx, dword [ecx + 0xc]
add edx, dword [ebp - 0x3bc]
push edx
lea eax, [ebp - 0x2d4]
push eax
lea ecx, [ebp - 0x380]
push ecx
push 0x402b1c
call dword [sym.imp.MSVBVM60.DLL___vbaRecUniToAnsi]
push eax
call fcn.00402be4
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
lea edx, [ebp - 0x380]
push edx
lea eax, [ebp - 0x2d4]
push eax
push 0x402b1c
call dword [sym.imp.MSVBVM60.DLL___vbaRecAnsiToUni]
lea ecx, [ebp - 0x2d8]
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
mov dword [ebp - 4], 0x2d
push 0x40335c
push 0x403460
call dword [sym.imp.MSVBVM60.DLL___vbaStrCmp]
test eax, eax
jne 0x406661
mov dword [ebp - 4], 0x2e
mov dword [ebp - 4], 0x2f
mov dword [ebp - 0x304], 0x40351c
mov dword [ebp - 0x30c], 8
lea edx, [ebp - 0x30c]
lea ecx, [ebp - 0x2ec]
call dword [sym.imp.MSVBVM60.DLL___vbaVarDup]
lea edx, [ebp - 0x2ec]
push edx
lea eax, [ebp - 0x2fc]
push eax
call dword [sym.imp.MSVBVM60.DLL_rtcRightTrimVar]
lea ecx, [ebp - 0x2fc]
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaStrVarMove]
mov edx, eax
lea ecx, [ebp - 0x244]
call dword [sym.imp.MSVBVM60.DLL___vbaStrMove]
lea edx, [ebp - 0x2fc]
push edx
lea eax, [ebp - 0x2ec]
push eax
push 2
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVarList]
add esp, 0xc
mov dword [ebp - 4], 0x31
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
lea eax, [ebp - 0x2d8]
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaAryLock]
cmp dword [ebp - 0x2d8], 0
je 0x4066dc
mov ecx, dword [ebp - 0x2d8]
cmp word [ecx], 1
jne 0x4066dc
mov edx, dword [ebp - 0x2d8]
mov eax, dword [ebp - 0x2b8]
sub eax, dword [edx + 0x14]
mov dword [ebp - 0x314], eax
mov ecx, dword [ebp - 0x2d8]
mov edx, dword [ebp - 0x314]
cmp edx, dword [ecx + 0x10]
jae 0x4066c2
mov dword [ebp - 0x3c0], 0
jmp 0x4066ce
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x3c0], eax
mov eax, dword [ebp - 0x314]
mov dword [ebp - 0x3c4], eax
jmp 0x4066e8
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x3c4], eax
lea ecx, [ebp - 0x70]
push ecx
mov edx, dword [ebp - 0x2bc]
push edx
mov eax, dword [ebp - 0x2d8]
mov ecx, dword [eax + 0xc]
add ecx, dword [ebp - 0x3c4]
push ecx
mov edx, dword [ebp - 0x248]
add edx, dword [ebp - 0x2c0]
jo 0x4068f8
push edx
mov eax, dword [ebp - 0x2a4]
push eax
call fcn.00402cd8
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
lea ecx, [ebp - 0x2d8]
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
mov dword [ebp - 4], 0x32
mov edx, dword [ebp - 0x2a8]
push edx
call fcn.00406900
mov dword [ebp - 0x310], eax
lea eax, [ebp - 0x170]
push eax
mov ecx, dword [ebp - 0x310]
push ecx
mov edx, dword [ebp - 0x2c4]
push edx
mov eax, dword [ebp - 0x248]
add eax, dword [ebp - 0x2c0]
jo 0x4068f8
push eax
mov ecx, dword [ebp - 0x2a4]
push ecx
call fcn.00402db8
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov dword [ebp - 4], 0x33
jmp 0x4064b4
mov dword [ebp - 4], 0x34
lea edx, [ebp - 0x70]
push edx
push 4
lea eax, [ebp - 0x248]
push eax
mov ecx, dword [ebp - 0x198]
add ecx, 8
jo 0x4068f8
push ecx
mov edx, dword [ebp - 0x2a4]
push edx
call fcn.00402cd8
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov dword [ebp - 4], 0x35
mov eax, dword [ebp - 0x248]
add eax, dword [ebp - 0x140]
jo 0x4068f8
mov dword [ebp - 0x18c], eax
mov dword [ebp - 4], 0x36
lea ecx, [ebp - 0x23c]
push ecx
mov edx, dword [ebp - 0x2a0]
push edx
call fcn.00402e50
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov dword [ebp - 4], 0x37
mov eax, dword [ebp - 0x2a0]
push eax
call fcn.00402e98
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov dword [ebp - 4], 0x38
mov ecx, dword [ebp - 0x29c]
mov dword [ebp - 0x240], ecx
mov dword [ebp - 4], 0x3a
mov edx, dword [ebp - 0x2a0]
push edx
call fcn.004027bc
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov dword [ebp - 4], 0x3b
mov eax, dword [ebp - 0x2a4]
push eax
call fcn.004027bc
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
wait
push 0x4068df
jmp 0x4068a2
lea ecx, [ebp - 0x358]
push ecx
push 0x402b88
call dword [sym.imp.MSVBVM60.DLL___vbaRecDestructAnsi]
lea ecx, [ebp - 0x244]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
lea edx, [ebp - 0x28c]
push edx
push 0x402b88
call dword [sym.imp.MSVBVM60.DLL___vbaRecDestruct]
lea ecx, [ebp - 0x294]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
ret
call dword [sym.imp.MSVBVM60.DLL___vbaErrorOverflow]
int3