Function at 0x4ecef0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push 0x401686
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xd0
push ebx
push esi
push edi
mov dword [ebp - 8], esp
mov dword [ebp - 4], 0x401368
mov eax, dword [0x503210]
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x74], edi
jne 0x4ecf57
push 0x503210
push 0x406a0c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503210]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x304]
lea edx, [ebp - 0x14]
push eax
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
mov esi, eax
lea ecx, [ebp - 0x40]
push ecx
push esi
mov eax, dword [esi]
call dword [eax + 0xe0]
cmp eax, edi
fnclex
jge 0x4ecf92
push 0xe0
push 0x40a024
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
xor edx, edx
cmp word [0x503104], 0x64
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaFreeObj]
lea ecx, [ebp - 0x14]
sete dl
neg edx
xor eax, eax
cmp word [ebp - 0x40], 1
sete al
neg eax
and edx, eax
mov si, dx
call ebx
cmp si, di
je 0x4ecfd8
mov ecx, dword [0x5031c0]
push ecx
call fcn.0040ada0
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
call edi
jmp 0x4ecfde
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
mov cx, word [0x503104]
test cx, cx
jne 0x4ed046
lea edx, [ebp - 0x2c]
mov word [0x5030fa], cx
push edx
mov dword [ebp - 0x24], 0x80020004
mov dword [ebp - 0x2c], 0xa
call dword [sym.imp.MSVBVM60.DLL_rtcRandomNext]
fmul dword [0x401328]
fnstsw ax
test al, 0xd
jne 0x4ed7bc
call dword [sym.imp.MSVBVM60.DLL___vbaFPInt]
fstp dword [0x503100]
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVar]
mov esi, dword [sym.imp.MSVBVM60.DLL___vbaUI1I2]
xor ecx, ecx
call esi
mov cx, word [0x503104]
mov byte [0x5030fc], al
jmp 0x4ed04c
mov esi, dword [sym.imp.MSVBVM60.DLL___vbaUI1I2]
test cx, cx
jle 0x4ed0ba
fld dword [0x503100]
mov ax, word [0x5030fa]
fadd dword [0x401230]
add ax, 2
jo 0x4ed7c1
mov word [0x5030fa], ax
fstp dword [0x503100]
fnstsw ax
test al, 0xd
jne 0x4ed7bc
sub cx, 1
jo 0x4ed7c1
mov word [0x503104], cx
movzx cx, byte [0x5030fc]
add cx, 1
jo 0x4ed7c1
call esi
cmp al, 2
mov byte [0x5030fc], al
jne 0x4ed0ba
xor ecx, ecx
call esi
mov byte [0x5030fc], al
mov eax, dword [0x503210]
test eax, eax
jne 0x4ed0d8
push 0x503210
push 0x406a0c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503210]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x304]
lea edx, [ebp - 0x14]
push eax
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
mov esi, eax
lea ecx, [ebp - 0x40]
push ecx
push esi
mov eax, dword [esi]
call dword [eax + 0xe0]
test eax, eax
fnclex
jge 0x4ed113
push 0xe0
push 0x40a024
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
mov esi, 1
xor edx, edx
cmp word [0x503104], si
lea ecx, [ebp - 0x14]
sete dl
neg edx
xor eax, eax
cmp word [ebp - 0x40], si
sete al
neg eax
and edx, eax
mov si, dx
call ebx
test si, si
je 0x4ed15c
mov ecx, dword [0x5031c0]
push ecx
call fcn.0040aecc
call edi
mov edx, dword [0x5031bc]
push edx
call fcn.0040ada0
call edi
cmp word [0x503104], 1
jne 0x4ed355
mov eax, dword [0x503010]
mov word [0x503106], 0x19
test eax, eax
jne 0x4ed191
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x384]
lea edx, [ebp - 0x14]
push eax
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
mov esi, eax
lea ecx, [ebp - 0x18]
push ecx
push 0
mov eax, dword [esi]
push esi
call dword [eax + 0x40]
test eax, eax
fnclex
jge 0x4ed1c8
push 0x40
push 0x40bf7c
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x44]
push ecx
push eax
mov edx, dword [eax]
mov esi, eax
call dword [edx + 0x80]
test eax, eax
fnclex
jge 0x4ed1f2
push 0x80
push 0x40bf8c
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
mov dx, word [0x5030f8]
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaFpI2]
sub dx, 0x3c
jo 0x4ed7c1
movsx eax, dx
mov dword [ebp - 0x8c], eax
fild dword [ebp - 0x8c]
fstp dword [ebp - 0x90]
fld dword [ebp - 0x44]
cmp dword [section..data], 0
jne 0x4ed232
fdiv dword [0x4012b8]
jmp 0x4ed23d
push dword [0x4012b8]
call sub.MSVBVM60.DLL__adj_fdiv_m32
fsubr dword [ebp - 0x90]
fnstsw ax
test al, 0xd
jne 0x4ed7bc
call edi
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaFreeObjList]
lea ecx, [ebp - 0x18]
lea edx, [ebp - 0x14]
push ecx
push edx
push 2
mov word [0x503108], ax
call ebx
mov eax, dword [0x503010]
add esp, 0xc
test eax, eax
jne 0x4ed288
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x384]
lea edx, [ebp - 0x14]
push eax
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
mov esi, eax
lea ecx, [ebp - 0x18]
push ecx
push 0
mov eax, dword [esi]
push esi
call dword [eax + 0x40]
test eax, eax
fnclex
jge 0x4ed2bf
push 0x40
push 0x40bf7c
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x44]
push ecx
push eax
mov edx, dword [eax]
mov esi, eax
call dword [edx + 0x88]
test eax, eax
fnclex
jge 0x4ed2e9
push 0x88
push 0x40bf8c
push esi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
mov dx, word [0x5030fa]
add dx, 0x3c
jo 0x4ed7c1
movsx eax, dx
mov dword [ebp - 0x94], eax
fild dword [ebp - 0x94]
fstp dword [ebp - 0x98]
fld dword [ebp - 0x44]
cmp dword [section..data], 0
jne 0x4ed323
fdiv dword [0x4012b8]
jmp 0x4ed32e
push dword [0x4012b8]
call sub.MSVBVM60.DLL__adj_fdiv_m32
fsubr dword [ebp - 0x98]
fnstsw ax
test al, 0xd
jne 0x4ed7bc
call edi
lea ecx, [ebp - 0x18]
lea edx, [ebp - 0x14]
push ecx
push edx
push 2
mov word [0x50310a], ax
call ebx
add esp, 0xc
cmp word [0x503106], 0x18
jne 0x4ed75f
mov eax, dword [0x503098]
push eax
push 1
call dword [sym.imp.MSVBVM60.DLL___vbaUbound]
mov dword [ebp - 0x84], eax
xor eax, eax
mov ecx, dword [ebp - 0x84]
mov dword [0x503128], eax
cmp eax, ecx
jg 0x4ed75f
mov ecx, dword [0x503098]
lea edx, [ebp - 0x74]
push ecx
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaAryLock]
mov ecx, dword [ebp - 0x74]
test ecx, ecx
je 0x4ed3d2
cmp word [ecx], 1
jne 0x4ed3d2
mov esi, dword [0x503128]
mov edx, dword [ecx + 0x14]
mov eax, dword [ecx + 0x10]
sub esi, edx
cmp esi, eax
jb 0x4ed3c5
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [ebp - 0x74]
lea eax, [esi + esi*2]
shl eax, 3
sub eax, esi
shl eax, 2
jmp 0x4ed3db
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [ebp - 0x74]
mov ebx, dword [ecx + 0xc]
add ebx, eax
mov eax, dword [0x503010]
test eax, eax
jne 0x4ed3fe
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x380]
lea edx, [ebp - 0x14]
push eax
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
mov esi, eax
lea ecx, [ebp - 0x44]
push ecx
push esi
mov eax, dword [esi]
call dword [eax + 0x80]
test eax, eax
fnclex
jge 0x4ed43d
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
push 0x80
push 0x40bf8c
push esi
push eax
call edi
jmp 0x4ed443
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
mov eax, dword [0x503010]
test eax, eax
jne 0x4ed461
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov edx, dword [eax]
push eax
call dword [edx + 0x380]
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
mov esi, eax
lea edx, [ebp - 0x48]
push edx
push esi
mov ecx, dword [esi]
call dword [ecx + 0x88]
test eax, eax
fnclex
jge 0x4ed498
push 0x88
push 0x40bf8c
push esi
push eax
call edi
mov eax, dword [0x503010]
test eax, eax
jne 0x4ed4b6
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x380]
lea edx, [ebp - 0x1c]
push eax
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
mov esi, eax
lea ecx, [ebp - 0x4c]
push ecx
push esi
mov eax, dword [esi]
call dword [eax + 0x80]
test eax, eax
fnclex
jge 0x4ed4ed
push 0x80
push 0x40bf8c
push esi
push eax
call edi
xor edx, edx
mov dl, byte [ebx + 0x52]
mov edi, edx
cmp edi, 2
jb 0x4ed4ff
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
xor eax, eax
mov al, byte [ebx + 0x52]
mov esi, eax
cmp esi, 2
jb 0x4ed511
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
fld dword [ebp - 0x48]
cmp dword [section..data], 0
jne 0x4ed525
fdiv dword [0x4012b8]
jmp 0x4ed530
push dword [0x4012b8]
call sub.MSVBVM60.DLL__adj_fdiv_m32
movsx ecx, word [0x50310a]
movsx edx, word [ebx + 0x26]
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0xa4], edx
push 0x40000000
push 0
sub esp, 8
fild dword [ebp - 0x9c]
fstp dword [ebp - 0xa0]
fadd dword [ebp - 0xa0]
fild dword [ebp - 0xa4]
fstp dword [ebp - 0xa8]
fsub dword [ebp - 0xa8]
fnstsw ax
test al, 0xd
jne 0x4ed7bc
mov eax, dword [0x503088]
movsx ecx, word [eax + esi*2]
mov dword [ebp - 0xac], ecx
fild dword [ebp - 0xac]
fstp qword [ebp - 0xb4]
fld qword [ebp - 0xb4]
cmp dword [section..data], 0
jne 0x4ed5b1
fdiv qword [0x4012d0]
jmp 0x4ed5c2
push dword [0x4012d4]
push dword [0x4012d0]
call sub.MSVBVM60.DLL__adj_fdiv_m64
fsubp st(1)
fnstsw ax
test al, 0xd
jne 0x4ed7bc
fstp qword [esp]
call dword [sym.imp.MSVBVM60.DLL___vbaPowerR8]
fstp qword [ebp - 0xbc]
fld dword [ebp - 0x44]
cmp dword [section..data], 0
jne 0x4ed5f1
fdiv dword [0x4012b8]
jmp 0x4ed5fc
push dword [0x4012b8]
call sub.MSVBVM60.DLL__adj_fdiv_m32
movsx edx, word [0x503108]
movsx eax, word [ebx + 0x24]
mov dword [ebp - 0xc0], edx
mov ecx, dword [0x50306c]
mov dword [ebp - 0xc8], eax
push 0x40000000
movsx edx, word [ecx + edi*2]
mov dword [ebp - 0xd0], edx
push 0
sub esp, 8
fild dword [ebp - 0xc0]
fstp dword [ebp - 0xc4]
fadd dword [ebp - 0xc4]
fild dword [ebp - 0xc8]
fstp dword [ebp - 0xcc]
fsub dword [ebp - 0xcc]
fnstsw ax
test al, 0xd
jne 0x4ed7bc
fild dword [ebp - 0xd0]
fstp qword [ebp - 0xd8]
fld qword [ebp - 0xd8]
cmp dword [section..data], 0
jne 0x4ed67e
fdiv qword [0x4012d0]
jmp 0x4ed68f
push dword [0x4012d4]
push dword [0x4012d0]
call sub.MSVBVM60.DLL__adj_fdiv_m64
fsubp st(1)
fnstsw ax
test al, 0xd
jne 0x4ed7bc
fstp qword [esp]
call dword [sym.imp.MSVBVM60.DLL___vbaPowerR8]
fadd qword [ebp - 0xbc]
fnstsw ax
test al, 0xd
jne 0x4ed7bc
call dword [0x401098]
fstp qword [ebp - 0xe0]
fld dword [ebp - 0x4c]
cmp dword [section..data], 0
jne 0x4ed6d4
fdiv dword [0x4012b8]
jmp 0x4ed6df
push dword [0x4012b8]
call sub.MSVBVM60.DLL__adj_fdiv_m32
push 0x40000000
push 0
sub esp, 8
fadd dword [0x401360]
fnstsw ax
test al, 0xd
jne 0x4ed7bc
fstp qword [esp]
call dword [sym.imp.MSVBVM60.DLL___vbaPowerR8]
call dword [0x401098]
fcomp qword [ebp - 0xe0]
fnstsw ax
test ah, 1
jne 0x4ed71c
mov esi, 1
jmp 0x4ed71e
xor esi, esi
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x18]
push eax
lea edx, [ebp - 0x14]
push ecx
push edx
push 3
call dword [sym.imp.MSVBVM60.DLL___vbaFreeObjList]
neg esi
add esp, 0x10
test si, si
je 0x4ed742
mov word [ebx + 0x2a], 0xffff
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
mov eax, dword [0x503128]
mov ecx, 1
add eax, ecx
jo 0x4ed7c1
jmp 0x4ed379
mov ecx, 0x5030f8
mov ax, word [ecx + 0xe]
test ax, ax
jle 0x4ed777
sub ax, 1
jo 0x4ed7c1
mov word [ecx + 0xe], ax
wait
push 0x4ed7ab
jmp 0x4ed7a0
lea ecx, [ebp - 0x74]
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
ret
jmp 0x40168c
call dword [sym.imp.MSVBVM60.DLL___vbaErrorOverflow]
nop
nop
nop
nop
nop
nop
nop
nop
nop