// I got this to make the loop work only once Address pModule = view_as<Address>(LoadFromAddress(InInitilizationOrderModuleList + view_as<Address>(0x8), NumberType_Int32)); // ImagePrefered ADDRESS (entry point address);
char[] szName = new char[lenght];
bool bFound;
while (LoadFromAddress(InInitilizationOrderModuleList + view_as<Address>(0x8), NumberType_Int32)) // ImagePrefered ADDRESS (entry point address) { Address pAddr = view_as<Address>(LoadFromAddress(InInitilizationOrderModuleList + view_as<Address>(32), NumberType_Int32)); // getting module name (UNICODE)
InInitilizationOrderModuleList = view_as<Address>(LoadFromAddress(view_as<Address>(LoadFromAddress(InInitilizationOrderModuleList, NumberType_Int32)), NumberType_Int32)); // getting next module
if (view_as<Address>(LoadFromAddress(InInitilizationOrderModuleList + view_as<Address>(0x8), NumberType_Int32)) == pModule) // if (entry point address) == (first address we have got) then stop cycle break; }