@XtrmJosh I know this won't work for ASLR since i only set a static base address, this is just an example and the address offset from the baseaddress, maybe someone will find it useful. Maybe even DarkstaR would, i don't know how he would handle this.. But this is one way of doing it :3
Also, write to memory? O_o'
If you are so afraid that that shit will write anything, you could simply just:
Code:void Logout(){ __asm{ call LogoutAddress } }