How to insert custom code into wp_nav_menu structure?

What you want is invalid markup. The only children an ul can have are li. Use CSS instead:

#nav ul
{
    padding-top:    40px; /* Your image size. */
    background:     url(/path/to/your/image/img.png) top center no-repeat transparent;
}