この辺のJavaScriptで書かれた内部コードはソースコード見たほうが楽ですよ。
tarballのlibディレクトリの中なんで配置を把握する手間も殆ど要りません。
インデントの深さが違うのは
// Invoke with makeRequireFunction.call(module) where |module| is the
// Module object to use as the context for the require() function.
function makeRequireFunction() {
const Module = this.constructor;
const self = this;
function require(path) {
・・・みたいなクロージャになってるからみたいです。