You still didn't answer my question:
Why do you want to define main() in your sketch?
What happens if you add this line to the top of your main():
Assuming you're using one of the Arduino AVR Boards, that's the most important thing you're missing.
Only certain boards use initVariant() and unfortunately I haven't found a way to call that function from the sketch.
Only boards with native USB need USBDevice.attach();.
The serialEventRun() call is for the idiotic serialEvent() "feature", which is the main reason I wanted to define main() in my own sketches in the past but I found that by adding an empty definition for serialEventRun() you can eliminate the overhead for that call and so there is no longer any benefit for me to define my own main(). I find the setup(), loop() convention quite reasonable. If you're using a recent version of the IDE/Arduino AVR Boards there is no overhead for those function calls because they're inlined.