Hi Will, I think it was this thread: https://moodle.org/mod/forum/discuss.php?d=244442#p1060015.
That was in 2013, you can also run various tools to count source lines of code (SLOC) against 3.4 to get an updated count. For example David Wheeler has a free tool here: https://www.dwheeler.com/sloccount/sloccount.html and there are other commercial ones. From these you can get an estimate of the time it would take to create the current codebase.
While it has its flaws (maybe you could build the same features with fewer lines of code), COCOMO is a reasonable standard method of finding a rough value for software. Another thing to check is whether you need all of Moodle or just some features.
For example if your courses are mostly quizzes and discussion forums, you might not need to recreate the entire codebase with all the plug-ins (you could exclude unneeded blocks and modules from your SLOC count).
An interesting example of a company that did something like this is 2Tor (now 2U). They started with Moodle, built their business, then decided to write their own LMS internally. There are various reasons for doing this from a business point of view, but it will be a very expensive and time-consuming process.