Fun code snippet
This small snippet is copied from a much popular application.
.text:1000EBE0 push ecx ; some_string
.text:1000EBE1 push '%'
.text:1000EBE3 push '%'
.text:1000EBE5 push offset aCsystemdriveCS ; "%cSystemDrive%c%s"
.text:1000EBEA push edx ; buffer
.text:1000EBEB call ds:swprintf
Translated to C:
swprintf(buffer, "%cSystemDrive%c%s", '%', '%', some_string);
Of course you’d be scratching your head to explain why the writer wrote it this way, instead of simply swprintf(buffer, "%%SystemDrive%%%s", some_string);. To show off great C-kungfu? Or the lack thereof? Anyway, I just thought it was funny enough to post.



LOLz