What are interesting parts of the Bitcoin Core codebase?

Yes, the function would be BlockAssembler::addPackageTxs, which is the transaction selection algorithm for the next block in the chain, taking the presumed best transactions from the mempool.