Ok, I've looked at it, and the very first thing you should do is to fix the other bugs in your code first - it's those bugs that are causing the crashes, not the assembly.
This function does NOT initialise the arrays correctly - it doesn't initialise the array at all:
CPGUISYNTAX::CPGUISYNTAX()
{
//Initialize Syntax Information
for( int ID = 0 ; ID > 255 ; ID++ )
{
//Initialize Syntax Type To None Type
SyntaxWordInfo[ ID ].Type = PGUI_SYNTAX_NOTYPE;
SyntaxPhraseInfo[ ID ].Type = PGUI_SYNTAX_NOTYPE;
}
}
As this is an MFC DLL (which I know almost nothing about), make sure that the function calls you have in DllMain are correct for this kind of DLL - if they are not correct, this too could cause the crash (or a deadlock too if they cause other DLL's to be loaded, such as the MFC DLL). Move them to an exported 'void Constructor(void)' or 'void ReceiveCoreDataPtr(LPVOID)' so that DBPro will initialise then at the correct point.
Finally, there's no checking to ensure that you don't overflow your arrays.
Why is the assembly there anyway? You are using assembly code to increment a variable, which is no faster than letting the compiler do it with ++, but in addition, removes any chance that the compiler might have for optimising access to that variable. In summary, your assembly will at best be as fast as the C++ compiler produces, and at worst, slower.
Also, I have to comment on the style of things like this:
int Syntax_LastWordID = NULL;
Pointers are set to NULL, integers should be set to 0. My personal preference is to get run of NULL from my programs entirely, but you may not want to go that far.