I am self taught (obviously) and have written several programs, one of them rather large and complicated. That was the first program I ever wrote and it has gone through one entire rewrite already and it's time for version 3, but to do what I want to do for that version I need a little advice.

This program performs many different tasks. It checks if registry keys or registry names exist, compares registry values to variables or other registry values, sets registry values to variable or registry values, iterates through all the subkeys of a registry key looking for a particular registry name and, if found, compares the value there with A and B. If it's A the entire subkey is deleted, if it's B the entire subkey is ignored. It lists processes, compares file names and locations of processes with given variables, kills processes based on comparisons, checks if files exist and possibly renames them if they do, and on and on.

Currently as each detection is made it will prompt what to do about it. What I want to do is make it keep track of each detection and give me a list at the end of the scan. Not too tough, normally. However, the problem comes with the fact that I am doing so many different thing. I may need to delete a registry key, delete a registry value in a key, set a registry value to a specific value, set a registry value to the same as another registry value, remove lines from a file, add lines to a file, kill a process, rename a file, etc. So for each detection I have an unknown number of variables with unknown types and I need a way to keep track of what each group of variables means (i.e., am I deleting a registry key or creating it? Or are we talking about a file? Or a line in a file?). I also need to group similar items together.

So what I need is a way to keep track of all of this information so that, at the end, the user can simply check boxes, hit "Fix" and the program can go through each line and figure out what needs to be done with the variables, preferably independent of the display.

I realize I am being rather vague here. The program is simply too large to explain quickly in much detail. Suffice it to say it is a (currently very functional) malware removal tool. I do not want to share code publicly (don't want the bad guys to know what I'm doing), but have no problem sharing it privately (warning, I'm an amateur, it's a mess) with anyone willing to help me sort out version 3. I also realize I am asking a lot. It's not quite "teach me to code", but it's up there with requests, especially when I start asking follow-up questions. Thank you in advance for any help you can give.