Last active
December 15, 2015 15:29
-
-
Save vanhoefm/5281979 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int __cdecl handle_plant_creation(int a1) | |
{ | |
puts("Creating new plant.."); | |
plantid = *(_DWORD *)(a1 + 5600); | |
plant_info = (char *)(a1 + 112 * plantid); | |
memset(plant_info, 0, 112); | |
ask_for_string((int)"Insert name: ", &entered_plant_name, 0x70u); | |
*((_WORD *)plant_info + 55) = plantid; | |
[..] | |
strcpy(plant_info, &entered_plant_name); | |
if ( check_secondary_elems_level(plant_info) ) { | |
puts("Error. One of the secondary element level is too high!"); | |
} else if ( check_uranium_level(plant_info) ) { | |
puts("Error. Uranium level is too high!"); | |
} else { | |
++*(_DWORD *)(plants_array + 5600); | |
printf("Plant %s created successfully!\n", plant_info); | |
} | |
return sprintf(&s, "DEBUG: %s is going down..", "shit"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment