added decompiled code for main functions