Function at 0x4f89b0
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, 0xc4
push ebx
push esi
push edi
mov dword [ebp - 8], esp
mov dword [ebp - 4], 0x401410
mov eax, dword [0x503098]
lea ecx, [ebp - 0x64]
xor edi, edi
push eax
push ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x64], edi
call dword [sym.imp.MSVBVM60.DLL___vbaAryLock]
mov ecx, dword [ebp - 0x64]
cmp ecx, edi
je 0x4f8a3a
cmp word [ecx], 1
jne 0x4f8a3a
mov edx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
mov esi, dword [edx]
mov edx, dword [ecx + 0x14]
sub esi, edx
cmp esi, eax
jb 0x4f8a2d
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [ebp - 0x64]
lea eax, [esi + esi*2]
shl eax, 3
sub eax, esi
shl eax, 2
jmp 0x4f8a43
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [ebp - 0x64]
mov esi, dword [ecx + 0xc]
mov ebx, dword [sym.imp.MSVBVM60.DLL___vbaStrCmp]
add esi, eax
mov eax, dword [0x5030d0]
push eax
push 0x40d064
call ebx
test eax, eax
jne 0x4f8ef9
mov ecx, dword [esi + 0xc]
push ecx
push 0x40cb8c
call ebx
test eax, eax
je 0x4f8ef9
cmp word [esi + 0x2a], 0xffff
je 0x4f8ef9
movsx edx, word [esi + 0x24]
mov dword [ebp - 0x70], edx
fild dword [ebp - 0x70]
fstp dword [ebp - 0x74]
fld dword [0x5030c4]
fcomp dword [ebp - 0x74]
fnstsw ax
test ah, 0x41
je 0x4f8aa3
mov edi, 1
xor ebx, ebx
mov bl, byte [esi + 0x52]
cmp ebx, 2
jb 0x4f8ab3
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov eax, dword [0x50306c]
mov dword [ebp - 0x80], 1
mov cx, word [eax + ebx*2]
add cx, word [esi + 0x24]
jo 0x4f8f44
movsx edx, cx
mov dword [ebp - 0x78], edx
fild dword [ebp - 0x78]
fstp dword [ebp - 0x7c]
fld dword [0x5030c4]
fcomp dword [ebp - 0x7c]
fnstsw ax
test ah, 1
je 0x4f8af0
mov dword [ebp - 0x80], 0
movsx eax, word [esi + 0x26]
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x8c], 1
fild dword [ebp - 0x84]
fstp dword [ebp - 0x88]
fld dword [0x5030c8]
fcomp dword [ebp - 0x88]
fnstsw ax
test ah, 0x41
jne 0x4f8b2d
mov dword [ebp - 0x8c], 0
xor ebx, ebx
mov bl, byte [esi + 0x52]
cmp ebx, 2
jb 0x4f8b3d
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov ecx, dword [0x503088]
mov dx, word [ecx + ebx*2]
add dx, word [esi + 0x26]
jo 0x4f8f44
movsx eax, dx
mov dword [ebp - 0x90], eax
fild dword [ebp - 0x90]
fstp dword [ebp - 0x94]
fld dword [0x5030c8]
fcomp dword [ebp - 0x94]
fnstsw ax
test ah, 1
jne 0x4f8b80
mov eax, 1
jmp 0x4f8b82
xor eax, eax
mov ecx, dword [ebp - 0x80]
or edi, ecx
mov ecx, dword [ebp - 0x8c]
neg edi
sbb edi, edi
neg edi
or edi, ecx
neg edi
sbb edi, edi
neg edi
or edi, eax
jne 0x4f8eef
mov eax, dword [0x503010]
test eax, eax
jne 0x4f8bc1
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x334]
lea edx, [ebp - 0x18]
push eax
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
movzx dx, byte [esi + 0x52]
imul dx, dx, 2
jo 0x4f8f44
add dx, word [esi + 0x2e]
mov edi, eax
lea ecx, [ebp - 0x1c]
mov eax, dword [edi]
push ecx
jo 0x4f8f44
push edx
push edi
call dword [eax + 0x40]
test eax, eax
fnclex
jge 0x4f8c10
push 0x40
push 0x40bf7c
push edi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
mov edi, dword [ebp - 0x1c]
xor ebx, ebx
mov bl, byte [esi + 0x52]
cmp ebx, 2
jb 0x4f8c23
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
xor eax, eax
mov al, byte [esi + 0x52]
cmp eax, 2
mov dword [ebp - 0x30], eax
jb 0x4f8c36
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
movzx ax, byte [esi + 0x17]
lea edx, [ebp - 0x28]
mov ecx, dword [edi]
push edx
mov edx, dword [0x503088]
push ecx
mov dx, word [edx + ebx*2]
mov ebx, dword [ebp - 0x30]
imul dx, ax
jo 0x4f8f44
movsx eax, dx
movsx edx, word [esi + 0x26]
mov dword [ebp - 0x98], eax
mov dword [ebp - 0xa0], edx
fild dword [ebp - 0x98]
mov edx, dword [0x50306c]
fstp dword [ebp - 0x9c]
fild dword [ebp - 0xa0]
mov dx, word [edx + ebx*2]
fstp dword [ebp - 0xa4]
fld dword [0x5030c8]
fsub dword [ebp - 0xa4]
fadd dword [ebp - 0x9c]
fnstsw ax
test al, 0xd
jne 0x4f8f3f
movzx ax, byte [esi + 0x16]
fstp dword [esp]
imul dx, ax
jo 0x4f8f44
movsx eax, dx
movsx edx, word [esi + 0x24]
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xb0], edx
fild dword [ebp - 0xa8]
push ecx
fstp dword [ebp - 0xac]
fild dword [ebp - 0xb0]
fstp dword [ebp - 0xb4]
fld dword [0x5030c4]
fsub dword [ebp - 0xb4]
fadd dword [ebp - 0xac]
fnstsw ax
test al, 0xd
jne 0x4f8f3f
fstp dword [esp]
push edi
call dword [ecx + 0x284]
test eax, eax
fnclex
jge 0x4f8d26
push 0x284
push 0x40bf8c
push edi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
mov eax, dword [0x503010]
test eax, eax
jne 0x4f8d44
push 0x503010
push 0x406f1c
call dword [sym.imp.MSVBVM60.DLL___vbaNew2]
mov eax, dword [0x503010]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x334]
lea edx, [ebp - 0x20]
push eax
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaObjSet]
movzx dx, byte [esi + 0x52]
imul dx, dx, 2
jo 0x4f8f44
add dx, word [esi + 0x2e]
mov edi, eax
lea ecx, [ebp - 0x24]
mov eax, dword [edi]
push ecx
jo 0x4f8f44
push edx
push edi
call dword [eax + 0x40]
test eax, eax
fnclex
jge 0x4f8d93
push 0x40
push 0x40bf7c
push edi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
mov edi, dword [ebp - 0x24]
xor ebx, ebx
mov bl, byte [esi + 0x52]
cmp ebx, 2
jb 0x4f8da6
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
xor eax, eax
mov al, byte [esi + 0x52]
cmp eax, 2
mov dword [ebp - 0x48], eax
jb 0x4f8db9
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
movzx ax, byte [esi + 0x17]
lea edx, [ebp - 0x2c]
mov ecx, dword [edi]
push edx
mov edx, dword [0x503088]
push ecx
mov dx, word [edx + ebx*2]
mov ebx, dword [ebp - 0x48]
imul dx, ax
jo 0x4f8f44
movsx eax, dx
movsx edx, word [esi + 0x26]
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0xc0], edx
fild dword [ebp - 0xb8]
mov edx, dword [0x50306c]
fstp dword [ebp - 0xbc]
fild dword [ebp - 0xc0]
mov dx, word [edx + ebx*2]
fstp dword [ebp - 0xc4]
fld dword [0x5030c8]
fsub dword [ebp - 0xc4]
fadd dword [ebp - 0xbc]
fnstsw ax
test al, 0xd
jne 0x4f8f3f
movzx ax, byte [esi + 0x16]
fstp dword [esp]
imul dx, ax
jo 0x4f8f44
movsx eax, dx
movsx edx, word [esi + 0x24]
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0xd0], edx
fild dword [ebp - 0xc8]
push ecx
fstp dword [ebp - 0xcc]
fild dword [ebp - 0xd0]
fstp dword [ebp - 0xd4]
fld dword [0x5030c4]
fsub dword [ebp - 0xd4]
fadd dword [ebp - 0xcc]
fnstsw ax
test al, 0xd
jne 0x4f8f3f
fstp dword [esp]
push edi
call dword [ecx + 0x284]
test eax, eax
fnclex
jge 0x4f8ea9
push 0x284
push 0x40bf8c
push edi
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaHresultCheckObj]
mov edx, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x28]
or edi, 0xffffffff
xor eax, eax
cmp edx, edi
lea edx, [ebp - 0x24]
setne al
neg eax
xor ecx, ecx
cmp ebx, 0xff00ff
setne cl
neg ecx
and eax, ecx
push edx
mov esi, eax
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x1c]
push eax
lea edx, [ebp - 0x18]
push ecx
push edx
push 4
call dword [sym.imp.MSVBVM60.DLL___vbaFreeObjList]
add esp, 0x14
test si, si
je 0x4f8eef
mov dword [ebp - 0x14], edi
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
wait
push 0x4f8f28
jmp 0x4f8f1d
lea edx, [ebp - 0x64]
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaAryUnlock]
ret
jmp 0x40168c
call dword [sym.imp.MSVBVM60.DLL___vbaErrorOverflow]
nop
nop
nop
nop
nop
nop