Function at 0x40cd5d
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push 0x4040d6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0xe4
call sub.MSVBVM60.DLL___vbaChkstk
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x14], 0x401da0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 1
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x54]
call sub.MSVBVM60.DLL___vbaStrCopy
push 2
push 0x405418
lea eax, [ebp - 0x3c]
push eax
call sub.MSVBVM60.DLL___vbaAryConstruct2
mov dword [ebp - 4], 2
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 3
push 0xffffffffffffffff
call sub.MSVBVM60.DLL___vbaOnError
mov dword [ebp - 4], 4
push 0
call sub.MSVBVM60.DLL___vbaStrI2
mov edx, eax
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaStrMove
push eax
call sub.MSVBVM60.DLL_rtcCharValueBstr
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaFreeStr
mov dword [ebp - 4], 5
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 6
lea eax, [ebp - 0x54]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x88], 0x4008
push 0
push 0x80
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x74]
push eax
call sub.MSVBVM60.DLL_rtcStrConvVar2
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x78]
push eax
call sub.MSVBVM60.DLL___vbaVar2Vec
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x48]
push eax
call sub.MSVBVM60.DLL___vbaAryMove
lea ecx, [ebp - 0x74]
call sub.MSVBVM60.DLL___vbaFreeVar
mov dword [ebp - 4], 7
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 8
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 9
mov dword [ebp - 0xa8], 0xff
mov dword [ebp - 0xa4], 1
and dword [ebp - 0x60], 0
jmp 0x40ced4
mov eax, dword [ebp - 0x60]
add eax, dword [ebp - 0xa4]
jo 0x40d7f6
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp - 0xa8]
jg 0x40cf84
mov dword [ebp - 4], 0xa
push 0
call sub.MSVBVM60.DLL___vbaStrI2
mov edx, eax
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaStrMove
push eax
call sub.MSVBVM60.DLL_rtcCharValueBstr
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaFreeStr
mov dword [ebp - 4], 0xb
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0xc
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0x100
jae 0x40cf43
and dword [ebp - 0xd0], 0
jmp 0x40cf4e
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xd0], eax
mov ecx, dword [ebp - 0x60]
call sub.MSVBVM60.DLL___vbaI2I4
mov ecx, dword [ebp - 0x98]
mov edx, dword [ebp - 0x30]
mov word [edx + ecx*2], ax
mov dword [ebp - 4], 0xd
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0xe
jmp 0x40cec2
mov dword [ebp - 4], 0xf
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 0x10
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0x11
and dword [ebp - 0x60], 0
mov dword [ebp - 4], 0x12
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 0x13
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0x14
and dword [ebp - 0x5c], 0
mov dword [ebp - 4], 0x15
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 0x16
and dword [ebp - 0x24], 0
mov dword [ebp - 4], 0x17
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0x18
mov dword [ebp - 0xb0], 0xff
mov dword [ebp - 0xac], 1
and dword [ebp - 0x60], 0
jmp 0x40d062
mov eax, dword [ebp - 0x60]
add eax, dword [ebp - 0xac]
jo 0x40d7f6
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp - 0xb0]
jg 0x40d244
mov dword [ebp - 4], 0x19
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0x100
jae 0x40d096
and dword [ebp - 0xd4], 0
jmp 0x40d0a1
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0x30]
movsx eax, word [ecx + eax*2]
mov esi, dword [ebp - 0x5c]
add esi, eax
jo 0x40d7f6
push dword [ebp - 0x54]
call sub.MSVBVM60.DLL___vbaLenBstr
mov ecx, eax
mov eax, dword [ebp - 0x60]
cdq
idiv ecx
push edx
push dword [ebp - 0x48]
call sub.MSVBVM60.DLL___vbaDerefAry1
movzx eax, byte [eax]
add esi, eax
jo 0x40d7f6
mov eax, esi
cdq
mov ecx, 0x100
idiv ecx
mov dword [ebp - 0x5c], edx
mov dword [ebp - 4], 0x1a
push 0
call sub.MSVBVM60.DLL___vbaStrI2
mov edx, eax
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaStrMove
push eax
call sub.MSVBVM60.DLL_rtcCharValueBstr
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaFreeStr
mov dword [ebp - 4], 0x1b
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0x100
jae 0x40d135
and dword [ebp - 0xd8], 0
jmp 0x40d140
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xd8], eax
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0x30]
mov cx, word [ecx + eax*2]
call sub.MSVBVM60.DLL___vbaUI1I2
mov byte [ebp - 0x44], al
mov dword [ebp - 4], 0x1c
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x9c], 0x100
jae 0x40d17a
and dword [ebp - 0xdc], 0
jmp 0x40d185
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0x100
jae 0x40d1a3
and dword [ebp - 0xe0], 0
jmp 0x40d1ae
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xe0], eax
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x9c]
mov esi, dword [ebp - 0x30]
mov dx, word [esi + edx*2]
mov word [ecx + eax*2], dx
mov dword [ebp - 4], 0x1d
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0x1e
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0x100
jae 0x40d202
and dword [ebp - 0xe4], 0
jmp 0x40d20d
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xe4], eax
movzx ax, byte [ebp - 0x44]
mov ecx, dword [ebp - 0x98]
mov edx, dword [ebp - 0x30]
mov word [edx + ecx*2], ax
mov dword [ebp - 4], 0x1f
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 0x20
jmp 0x40d050
mov dword [ebp - 4], 0x21
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0x22
and dword [ebp - 0x60], 0
mov dword [ebp - 4], 0x23
push 0
call sub.MSVBVM60.DLL___vbaStrI2
mov edx, eax
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaStrMove
push eax
call sub.MSVBVM60.DLL_rtcCharValueBstr
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaFreeStr
mov dword [ebp - 4], 0x24
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0x25
and dword [ebp - 0x5c], 0
mov dword [ebp - 4], 0x26
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 0x27
push 0
call sub.MSVBVM60.DLL___vbaStrI2
mov edx, eax
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaStrMove
push eax
call sub.MSVBVM60.DLL_rtcCharValueBstr
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaFreeStr
mov dword [ebp - 4], 0x28
and dword [ebp - 0x24], 0
mov dword [ebp - 4], 0x29
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 0x2a
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 0x2b
mov eax, dword [ebp + 8]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x88], 0x6011
push 0
push 0x40
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x74]
push eax
call sub.MSVBVM60.DLL_rtcStrConvVar2
lea eax, [ebp - 0x74]
push eax
call sub.MSVBVM60.DLL___vbaStrVarMove
mov edx, eax
lea ecx, [ebp - 0x4c]
call sub.MSVBVM60.DLL___vbaStrMove
lea ecx, [ebp - 0x74]
call sub.MSVBVM60.DLL___vbaFreeVar
mov dword [ebp - 4], 0x2c
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 0x2d
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0x2e
push dword [ebp - 0x4c]
call sub.MSVBVM60.DLL___vbaLenBstr
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xb4], 1
and dword [ebp - 0x60], 0
jmp 0x40d3d1
mov eax, dword [ebp - 0x60]
add eax, dword [ebp - 0xb4]
jo 0x40d7f6
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp - 0xb8]
jg 0x40d760
mov dword [ebp - 4], 0x2f
mov eax, dword [ebp - 0x5c]
add eax, 1
jo 0x40d7f6
cdq
mov ecx, 0x100
idiv ecx
mov dword [ebp - 0x5c], edx
mov dword [ebp - 4], 0x30
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0x31
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0x32
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x50], eax
mov dword [ebp - 4], 0x33
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0x34
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0x100
jae 0x40d46f
and dword [ebp - 0xe8], 0
jmp 0x40d47a
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xe8], eax
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0x30]
movsx eax, word [ecx + eax*2]
mov ecx, dword [ebp - 0x50]
add ecx, eax
jo 0x40d7f6
mov eax, ecx
cdq
mov ecx, 0x100
idiv ecx
mov dword [ebp - 0x24], edx
mov dword [ebp - 4], 0x35
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
mov dword [ebp - 4], 0x36
push 0
call sub.MSVBVM60.DLL___vbaStrI2
mov edx, eax
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaStrMove
push eax
call sub.MSVBVM60.DLL_rtcCharValueBstr
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaFreeStr
mov dword [ebp - 4], 0x37
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0x100
jae 0x40d4ff
and dword [ebp - 0xec], 0
jmp 0x40d50a
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xec], eax
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0x30]
mov cx, word [ecx + eax*2]
call sub.MSVBVM60.DLL___vbaUI1I2
mov byte [ebp - 0x44], al
mov dword [ebp - 4], 0x38
push 0
call sub.MSVBVM60.DLL___vbaStrI2
mov edx, eax
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaStrMove
push eax
call sub.MSVBVM60.DLL_rtcCharValueBstr
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaFreeStr
mov dword [ebp - 4], 0x39
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x9c], 0x100
jae 0x40d56a
and dword [ebp - 0xf0], 0
jmp 0x40d575
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0x100
jae 0x40d593
and dword [ebp - 0xf4], 0
jmp 0x40d59e
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xf4], eax
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x9c]
mov esi, dword [ebp - 0x30]
mov dx, word [esi + edx*2]
mov word [ecx + eax*2], dx
mov dword [ebp - 4], 0x3a
push 0
call sub.MSVBVM60.DLL___vbaStrI2
mov edx, eax
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaStrMove
push eax
call sub.MSVBVM60.DLL_rtcCharValueBstr
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaFreeStr
mov dword [ebp - 4], 0x3b
push 0
call sub.MSVBVM60.DLL___vbaStrI2
mov edx, eax
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaStrMove
push eax
call sub.MSVBVM60.DLL_rtcCharValueBstr
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaFreeStr
mov dword [ebp - 4], 0x3c
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0x100
jae 0x40d629
and dword [ebp - 0xf8], 0
jmp 0x40d634
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xf8], eax
movzx ax, byte [ebp - 0x44]
mov ecx, dword [ebp - 0x98]
mov edx, dword [ebp - 0x30]
mov word [edx + ecx*2], ax
mov dword [ebp - 4], 0x3d
mov dword [ebp - 0x58], 0x100
mov dword [ebp - 4], 0x3e
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0x100
jae 0x40d679
and dword [ebp - 0xfc], 0
jmp 0x40d684
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0xfc], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x9c], 0x100
jae 0x40d6a2
and dword [ebp - 0x100], 0
jmp 0x40d6ad
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0x100], eax
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x9c]
mov esi, dword [ebp - 0x30]
mov ax, word [ecx + eax*2]
add ax, word [esi + edx*2]
jo 0x40d7f6
movsx eax, ax
cdq
idiv dword [ebp - 0x58]
mov dword [ebp - 0xa0], edx
cmp dword [ebp - 0xa0], 0x100
jae 0x40d6ef
and dword [ebp - 0x104], 0
jmp 0x40d6fa
call sub.MSVBVM60.DLL___vbaGenerateBoundsError
mov dword [ebp - 0x104], eax
push dword [ebp - 0x60]
mov eax, dword [ebp + 8]
push dword [eax]
call sub.MSVBVM60.DLL___vbaDerefAry1
movzx cx, byte [eax]
mov eax, dword [ebp - 0xa0]
mov edx, dword [ebp - 0x30]
xor cx, word [edx + eax*2]
call sub.MSVBVM60.DLL___vbaUI1I2
mov bl, al
push dword [ebp - 0x60]
mov eax, dword [ebp + 8]
push dword [eax]
call sub.MSVBVM60.DLL___vbaDerefAry1
mov byte [eax], bl
mov dword [ebp - 4], 0x3f
push 0
call sub.MSVBVM60.DLL___vbaStrI2
mov edx, eax
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaStrMove
push eax
call sub.MSVBVM60.DLL_rtcCharValueBstr
lea ecx, [ebp - 0x64]
call sub.MSVBVM60.DLL___vbaFreeStr
mov dword [ebp - 4], 0x40
jmp 0x40d3bf
mov dword [ebp - 4], 0x41
fldz
push ecx
push ecx
fstp qword [esp]
call sub.MSVBVM60.DLL_rtcSqr
fstp qword [ebp - 0x94]
mov dword [ebp - 4], 0x42
push 0
push 0
call fcn.004052e0
call sub.MSVBVM60.DLL___vbaSetSystemError
wait
push 0x40d7e5
jmp 0x40d7b2
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x8c]
push eax
push 0
call sub.MSVBVM60.DLL___vbaAryDestruct
lea eax, [ebp - 0x48]
push eax
push 0
call sub.MSVBVM60.DLL___vbaAryDestruct
lea ecx, [ebp - 0x4c]
call sub.MSVBVM60.DLL___vbaFreeStr
lea ecx, [ebp - 0x54]
call sub.MSVBVM60.DLL___vbaFreeStr
ret
call sub.MSVBVM60.DLL___vbaErrorOverflow