Your looking for the shd_handle_attachments() function in that file. SimpleDesk ties into SMF's attachment system (createAttachment in Subs-Post.php from SMF) and then uses its own table to maintain the relationship between the attachments table, its location and the ticket. It doesn't use it own storage folders, but rather what was setup for SMF for its attachment location(s).