He could write exactly the same code the API used, but it would just be using more APIs. Eventually you would get to APIs you can't even use without the OS' help because the OS has your program in a slightly sandboxed environment.
To close\terminate a program you can either use kernel level calls such as ZwTeminateProcess or you can go all rogue and mov a value into eax then call KiFastSystemCall or X86SwitchTo64BitMode that way you invoke a direct contact directly into borders of Ring2.
Or you can try to process injection, then call a exit() from that process memory therefore terminating the process as a whole. This can be effective but if the process blocks process injection, you can load a DLL via registry, in which can it would bypass the proactives of the process.