There are probably thousands of lines of code. And you will have to check them all and rewrite them, if they use non-m&b operations. Your best bet is to compare the m&b module system with the warband module system (via winmerge or sth similar) and try to locate what you need. Still - it might be easier to just code what you want yourself.
Edit: You should also consider that taleworlds might not like a pure copy pasta. They have not allowed the use of assets from 1 of their games in another (as that would remove the need to buy the other) and while this is foggy, when it comes to code, you probably dont want to make your project public, if you should succeed.