示例#1
1
extern "C" SAMETIME_API int Load(PLUGINLINK *link)
{

	pluginLink=link;

	if(!IsUnicodeOS()) {
		MessageBox(0, TranslateT("This plugin requires a Unicode capable Windows installation."), TranslateT("Sametime Error"), MB_OK | MB_ICONERROR);
		return 1;
	}

	if ( !ServiceExists( MS_DB_CONTACT_GETSETTING_STR )) {
		MessageBox( 0, TranslateT( "This plugin requires db3x plugin version 0.5.1.0 or later." ), TranslateT("Sametime Error"), MB_OK );
		return 1;
	}

	DuplicateHandle( GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &mainThread, THREAD_SET_CONTEXT, FALSE, 0 );
	mainThreadId = GetCurrentThreadId();

	previous_status = current_status = ID_STATUS_OFFLINE;

	if(ServiceExists(MS_LANGPACK_GETCODEPAGE))
		code_page = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);

	mir_getMMI(&mmi);
	mir_getUTFI(&utfi);


	if(ServiceExists(MS_DB_SETSETTINGRESIDENT)) { // 0.6+
		char buff[256];
		mir_snprintf(buff, 256, "%s/%s", PROTO, "Status");
		CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)buff);
		mir_snprintf(buff, 256, "%s/%s", PROTO, "IdleTS");
		CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)buff);
	}

	InitAwayMsg();
	InitCritSection();

	// Get module name from DLL file name
	{
		char* str1;
		char str2[MAX_PATH];

		GetModuleFileNameA(hInst, str2, MAX_PATH);
		str1 = strrchr(str2, '\\');
		if (str1 != NULL && strlen(str1+1) > 4) {
			strncpy(PROTO, str1+1, strlen(str1+1)-4);
			PROTO[strlen(str1+1)-3] = 0;
		}
		CharUpperA(PROTO);

		strcpy(PROTO_GROUPS, PROTO);
		strcat(PROTO_GROUPS, "_GROUPS");
	}

	PROTOCOLDESCRIPTOR pd = {0};
	pd.cbSize = sizeof(pd);
	pd.szName = PROTO;
	pd.type = PROTOTYPE_PROTOCOL;
	CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);

	InitUtils();

	CreatePluginServices();

	LoadOptions();

	//DeleteAllContacts();	//!!!
	
	SetAllOffline();

	HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);	
	HookEvent(ME_OPT_INITIALISE, OptInit );
	HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
	HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);

	return 0;
}
示例#2
0
// address: 0x4012f8
void _start(int param1, int param2, int param3, int param4, RECT param5, int param6) {
    int eax; 		// r24
    union { __size32 * x7; unsigned int x8; } eax_1; 		// r24{257}
    int ecx; 		// r25
    int edx; 		// r26
    unsigned int edx_1; 		// r26{338}
    int esp; 		// r28

    eax = GetCurrentProcessId();
    if (eax != 1019) {
    }
    CharUpperA();
    OpenEventW();
    GetDC();
    eax = GetCurrentThreadId(); /* Warning: also results in ecx */
    if (eax == 621) {
        ecx = ecx ^ param6;
    }
    if (ecx != 0) {
    }
    __set_app_type();
    GetFileAttributesA();
    CharUpperA();
    GetProcessHeap();
    CharUpperA();
    OpenMutexA();
    IsWindow();
    eax = GetCurrentThreadId(); /* Warning: also results in ecx */
    if ((eax & 0xae4) != ecx) {
    }
    eax = GetClientRect(0, &param5); /* Warning: also results in edx */
    eax = eax | param4;
    if (eax != edx) {
        eax = (esp - 552);
        edx = edx ^ param2;
        edx = edx ^ param3;
        edx = edx & param1;
    }
    eax_1 = eax;
    edx_1 = edx;
    edx = edx_1 ^ 0x21cd;
    flags = SUBFLAGS32(eax_1, edx_1 ^ 0x21cd, eax_1 - (edx_1 ^ 0x21cd));
    if (eax_1 != (edx_1 ^ 0x21cd)) {
        edx = (edx_1 ^ 0x21cd) + (edx_1 ^ 0x21cd) + (eax_1 < (unsigned int)(edx_1 ^ 0x21cd));
        eax_1 = eax_1 - 0x3421;
        flags = SUBFLAGS32(eax_1, 0x3421, eax_1 - 0x3421);
    }
    if (eax_1 + edx + CF == 816) {
    }
    eax = CreateItemMoniker(); /* Warning: also results in edx */
    if ((eax ^ 0x80070057) == 0) {
        if ((eax ^ 0x80070057) + edx == 0) {
        }
    }
    return;
}
示例#3
0
文件: main.c 项目: mingpen/OpenNT
int ReadYesOrNo()
{
    if ( ArgsLeft == 0 )
        return INVALID;

    if ( (char)CharUpperA((LPSTR)**Args) == 'Y' )
        return YES;
    if ( (char)CharUpperA((LPSTR)**Args) == 'N' )
        return NO;

    return INVALID;
}
示例#4
0
文件: ntlm.c 项目: Auto-Droid/FreeRDP
int ntlm_SetContextTargetName(NTLM_CONTEXT* context, char* TargetName)
{
	int status;
	DWORD nSize = 0;
	char* name = TargetName;

	if (!TargetName)
	{
		if (!GetComputerNameExA(ComputerNameDnsHostname, NULL, &nSize))
			return -1;

		name = (char*) malloc(nSize);

		if (!name)
			return -1;

		if (!GetComputerNameExA(ComputerNameDnsHostname, name, &nSize))
			return -1;

		CharUpperA(TargetName);
	}

	context->TargetName.pvBuffer = NULL;
	status = ConvertToUnicode(CP_UTF8, 0, name, -1, (LPWSTR*) &context->TargetName.pvBuffer, 0);

	if (status <= 0)
		return -1;

	context->TargetName.cbBuffer = (USHORT) ((status - 1) * 2);

	if (!TargetName)
		free(name);

	return 1;
}
示例#5
0
unsigned char loctoupper(unsigned char ch)
{
#ifdef _WIN_ALL
  // Convert to LPARAM first to avoid a warning in 64 bit mode.
  return((int)(LPARAM)CharUpperA((LPSTR)ch));
#else
  return(toupper(ch));
#endif
}
示例#6
0
文件: strfn.cpp 项目: sina-ht/enfle
unsigned char loctoupper(unsigned char ch)
{
#if defined(_WIN_ALL)
  // Convert to LPARAM first to avoid a warning in 64 bit mode.
  // Convert to uintptr_t to avoid Clang/win error: cast to 'char *' from smaller integer type 'unsigned char' [-Werror,-Wint-to-pointer-cast]
  return (int)(LPARAM)CharUpperA((LPSTR)(uintptr_t)ch);
#else
  return toupper(ch);
#endif
}
示例#7
0
char* strupper(char *Str)
{
#ifdef _WIN_ALL
  CharUpperA((LPSTR)Str);
#else
  for (char *ChPtr=Str;*ChPtr;ChPtr++)
    *ChPtr=(char)loctoupper(*ChPtr);
#endif
  return(Str);
}
示例#8
0
int ntlm_SetContextTargetName(NTLM_CONTEXT* context, char* TargetName)
{
	int status;
	char* name = TargetName;
	DWORD nSize = 0;
	CHAR* computerName = NULL;

	if (!name)
	{
		if (GetComputerNameExA(ComputerNameNetBIOS, NULL, &nSize) || (GetLastError() != ERROR_MORE_DATA) ||
		    (nSize < 2))
			return -1;

		computerName = calloc(nSize, sizeof(CHAR));

		if (!computerName)
			return -1;

		if (!GetComputerNameExA(ComputerNameNetBIOS, computerName, &nSize))
		{
			free(computerName);
			return -1;
		}

		if (nSize > MAX_COMPUTERNAME_LENGTH)
			computerName[MAX_COMPUTERNAME_LENGTH] = '\0';

		name = computerName;

		if (!name)
			return -1;

		CharUpperA(name);
	}

	context->TargetName.pvBuffer = NULL;
	status = ConvertToUnicode(CP_UTF8, 0, name, -1, (LPWSTR*) &context->TargetName.pvBuffer, 0);

	if (status <= 0)
	{
		if (!TargetName)
			free(name);

		return -1;
	}

	context->TargetName.cbBuffer = (USHORT)((status - 1) * 2);

	if (!TargetName)
		free(name);

	return 1;
}
示例#9
0
文件: ntlm.c 项目: d0rian/FreeRDP
void ntlm_SetContextTargetName(NTLM_CONTEXT* context, char* TargetName)
{
	DWORD nSize = 0;

	if (!TargetName)
	{
		GetComputerNameExA(ComputerNameDnsHostname, NULL, &nSize);
		TargetName = malloc(nSize);
		GetComputerNameExA(ComputerNameDnsHostname, TargetName, &nSize);
		CharUpperA(TargetName);
	}

	context->TargetName.cbBuffer = strlen(TargetName) * 2;
	context->TargetName.pvBuffer = (void*) malloc(context->TargetName.cbBuffer);
	MultiByteToWideChar(CP_ACP, 0, TargetName, strlen(TargetName),
			(LPWSTR) context->TargetName.pvBuffer, context->TargetName.cbBuffer / 2);

	if (nSize > 0)
		free(TargetName);
}
示例#10
0
PARSE_RESULT STDAPICALLTYPE SvcParseCommandLine(char *pszCmdParam)
{
    char szCmdParam[MAX_PATH];
    lstrcpyA(szCmdParam, pszCmdParam);
    CharUpperA(szCmdParam);
    PARSE_RESULT result = PARSE_NORMAL;
    if (strstr(szCmdParam, "/REGSERVER") 
        || strstr(szCmdParam, "-REGSERVER"))
        result = PARSE_REGISTER_SERVER;
    else if (strstr(szCmdParam, "/UNREGSERVER") 
        || strstr(szCmdParam, "-UNREGSERVER"))
        result = PARSE_UNREGISTER_SERVER;
    else if (strstr(szCmdParam, "/AUTOMATION") 
        || strstr(szCmdParam, "-AUTOMATION"))
        result = PARSE_AUTOMATION;
    else if (strstr(szCmdParam, "/EMBEDDING") 
        || strstr(szCmdParam, "-EMBEDDING"))
        result = PARSE_EMBEDDING;
    return result;
}
示例#11
0
void ntlm_get_target_computer_name(PUNICODE_STRING pName, COMPUTER_NAME_FORMAT type)
{
	char* name;
	DWORD nSize = 0;

	GetComputerNameExA(type, NULL, &nSize);
	name = malloc(nSize);
	GetComputerNameExA(type, name, &nSize);

	if (type == ComputerNameNetBIOS)
		CharUpperA(name);

	pName->Length = strlen(name) * 2;
	pName->Buffer = (PWSTR) malloc(pName->Length);
	MultiByteToWideChar(CP_ACP, 0, name, strlen(name),
			(LPWSTR) pName->Buffer, pName->Length / 2);

	pName->MaximumLength = pName->Length;

	free(name);
}
示例#12
0
文件: psdocurd.c 项目: mingpen/OpenNT
INT
SheFullPathA(
   CHAR *fname,
   DWORD sizpath,
   CHAR *buf)
{
   DWORD rc = SUCCESS;         /* prime with good rc */
   DWORD buflen;               /* buffer length      */
   CHAR *filepart;

   if (*fname == CHAR_NULL) {
      SheGetDirA(GD_DEFAULT, buf);
      buf += 2;                           /* Inc past drivespec      */
      buflen = strlen(buf);             /* Is curdir root only?    */
      if (buflen >= MAX_PATH-3) {  /* If too big then stop    */
         dwDosErr = ERROR_PATH_NOT_FOUND;
         rc = FAILURE;
       } else if (buflen != 1) {              /* if not root then append */
         *(buf+buflen++) = CHAR_BSLASH;      /* ...a pathchar and...    */
         *(buf+buflen) = CHAR_NULL ;              /* ...a null CHAR...       */
       }                                 /*                         */
   } else {
      if ((strlen(fname) == 2) &&
          (*(fname + 1) == CHAR_COLON)
          // && (!is_dbcsleadchar(*fname))
         ) {
         SheGetDirA((CHAR)(DWORD)CharUpperA((LPSTR)(DWORD)*fname) - CHAR_CAP_A, buf);                 /* Get curdrvdir           */
         if ((buflen = strlen(buf)) > 3) {
            *(buf+buflen++) = CHAR_BSLASH;      /* ...a pathchar and...    */
            *(buf+buflen) = CHAR_NULL ;          /* ...a null CHAR...           */
         }
      } else {
         if (!GetFullPathNameA( fname, sizpath, buf, &filepart )) {
            dwDosErr = GetLastError();
            rc = FAILURE;
         }
      }
   }
   return(rc);
}
示例#13
0
void LocalUpperInit()
{
	for (unsigned int I=0; I<ARRAYSIZE(LowerToUpper); I++)
	{
		char CvtStr[]={I,L'\0'},ReverseCvtStr[2];
		LowerToUpper[I]=UpperToLower[I]=I;
		OemToCharA(CvtStr,CvtStr);
		CharToOemA(CvtStr,ReverseCvtStr);
		IsUpperOrLower[I]=0;

		if (IsCharAlphaA(CvtStr[0]) && ReverseCvtStr[0]==static_cast<char>(I))
		{
			IsUpperOrLower[I]=IsCharLowerA(CvtStr[0])?1:(IsCharUpperA(CvtStr[0])?2:0);
			CharUpperA(CvtStr);
			CharToOemA(CvtStr,CvtStr);
			LowerToUpper[I]=CvtStr[0];
			CvtStr[0]=I;
			OemToCharA(CvtStr,CvtStr);
			CharLowerA(CvtStr);
			CharToOemA(CvtStr,CvtStr);
			UpperToLower[I]=CvtStr[0];
		}
	}
}
示例#14
0
MBChar String::ToUpperCaseMB( MBChar ch ) const
{
    return (MBChar)CharUpperA( (LPSTR)ch );
}
示例#15
0
char * MyStringUpper(char *s) { return CharUpperA(s); }
示例#16
0
static int _glfwTranslateKey( DWORD wParam, DWORD lParam )
{
    MSG next_msg;
    DWORD msg_time;
    DWORD scan_code;

    // Check which key was pressed or released
    switch( wParam )
    {
        // The SHIFT keys require special handling
        case VK_SHIFT:
            // Compare scan code for this key with that of VK_RSHIFT in
            // order to determine which shift key was pressed (left or
            // right)
            scan_code = MapVirtualKey( VK_RSHIFT, 0 );
            if( ((lParam & 0x01ff0000) >> 16) == scan_code )
            {
                return GLFW_KEY_RSHIFT;
            }
            return GLFW_KEY_LSHIFT;

        // The CTRL keys require special handling
        case VK_CONTROL:
            // Is this an extended key (i.e. right key)?
            if( lParam & 0x01000000 )
            {
                return GLFW_KEY_RCTRL;
            }
            // Here is a trick: "Alt Gr" sends LCTRL, then RALT. We only
            // want the RALT message, so we try to see if the next message
            // is a RALT message. In that case, this is a false LCTRL!
            msg_time = GetMessageTime();
            if( PeekMessage( &next_msg, NULL, 0, 0, PM_NOREMOVE ) )
            {
                if( next_msg.message == WM_KEYDOWN ||
                    next_msg.message == WM_SYSKEYDOWN )
                {
                    if( next_msg.wParam == VK_MENU &&
                        (next_msg.lParam & 0x01000000) &&
                        next_msg.time == msg_time )
                    {
                        // Next message is a RALT down message, which
                        // means that this is NOT a proper LCTRL message!
                        return GLFW_KEY_UNKNOWN;
                    }
                }
            }
            return GLFW_KEY_LCTRL;

        // The ALT keys require special handling
        case VK_MENU:
            // Is this an extended key (i.e. right key)?
            if( lParam & 0x01000000 )
            {
                return GLFW_KEY_RALT;
            }
            return GLFW_KEY_LALT;

        // The ENTER keys require special handling
        case VK_RETURN:
            // Is this an extended key (i.e. right key)?
            if( lParam & 0x01000000 )
            {
                return GLFW_KEY_KP_ENTER;
            }
            return GLFW_KEY_ENTER;

        // Special keys (non character keys)
        case VK_ESCAPE:        return GLFW_KEY_ESC;
        case VK_TAB:           return GLFW_KEY_TAB;
        case VK_BACK:          return GLFW_KEY_BACKSPACE;
        case VK_HOME:          return GLFW_KEY_HOME;
        case VK_END:           return GLFW_KEY_END;
        case VK_PRIOR:         return GLFW_KEY_PAGEUP;
        case VK_NEXT:          return GLFW_KEY_PAGEDOWN;
        case VK_INSERT:        return GLFW_KEY_INSERT;
        case VK_DELETE:        return GLFW_KEY_DEL;
        case VK_LEFT:          return GLFW_KEY_LEFT;
        case VK_UP:            return GLFW_KEY_UP;
        case VK_RIGHT:         return GLFW_KEY_RIGHT;
        case VK_DOWN:          return GLFW_KEY_DOWN;
        case VK_F1:            return GLFW_KEY_F1;
        case VK_F2:            return GLFW_KEY_F2;
        case VK_F3:            return GLFW_KEY_F3;
        case VK_F4:            return GLFW_KEY_F4;
        case VK_F5:            return GLFW_KEY_F5;
        case VK_F6:            return GLFW_KEY_F6;
        case VK_F7:            return GLFW_KEY_F7;
        case VK_F8:            return GLFW_KEY_F8;
        case VK_F9:            return GLFW_KEY_F9;
        case VK_F10:           return GLFW_KEY_F10;
        case VK_F11:           return GLFW_KEY_F11;
        case VK_F12:           return GLFW_KEY_F12;
        case VK_F13:           return GLFW_KEY_F13;
        case VK_F14:           return GLFW_KEY_F14;
        case VK_F15:           return GLFW_KEY_F15;
        case VK_F16:           return GLFW_KEY_F16;
        case VK_F17:           return GLFW_KEY_F17;
        case VK_F18:           return GLFW_KEY_F18;
        case VK_F19:           return GLFW_KEY_F19;
        case VK_F20:           return GLFW_KEY_F20;
        case VK_F21:           return GLFW_KEY_F21;
        case VK_F22:           return GLFW_KEY_F22;
        case VK_F23:           return GLFW_KEY_F23;
        case VK_F24:           return GLFW_KEY_F24;
        case VK_SPACE:         return GLFW_KEY_SPACE;

        // Numeric keypad
        case VK_NUMPAD0:       return GLFW_KEY_KP_0;
        case VK_NUMPAD1:       return GLFW_KEY_KP_1;
        case VK_NUMPAD2:       return GLFW_KEY_KP_2;
        case VK_NUMPAD3:       return GLFW_KEY_KP_3;
        case VK_NUMPAD4:       return GLFW_KEY_KP_4;
        case VK_NUMPAD5:       return GLFW_KEY_KP_5;
        case VK_NUMPAD6:       return GLFW_KEY_KP_6;
        case VK_NUMPAD7:       return GLFW_KEY_KP_7;
        case VK_NUMPAD8:       return GLFW_KEY_KP_8;
        case VK_NUMPAD9:       return GLFW_KEY_KP_9;
        case VK_DIVIDE:        return GLFW_KEY_KP_DIVIDE;
        case VK_MULTIPLY:      return GLFW_KEY_KP_MULTIPLY;
        case VK_SUBTRACT:      return GLFW_KEY_KP_SUBTRACT;
        case VK_ADD:           return GLFW_KEY_KP_ADD;
        case VK_DECIMAL:       return GLFW_KEY_KP_DECIMAL;

        // The rest (should be printable keys)
        default:
            // Convert to printable character (ISO-8859-1 or Unicode)
            wParam = MapVirtualKey( wParam, 2 ) & 0x0000FFFF;

            // Make sure that the character is uppercase
            if( _glfwSys.HasUnicode )
            {
                wParam = (DWORD) CharUpperW( (LPWSTR) wParam );
            }
            else
            {
                wParam = (DWORD) CharUpperA( (LPSTR) wParam );
            }

            // Valid ISO-8859-1 character?
            if( (wParam >=  32 && wParam <= 126) ||
                (wParam >= 160 && wParam <= 255) )
            {
                return (int) wParam;
            }
            return GLFW_KEY_UNKNOWN;
    }
}
示例#17
0
void fn004012F8(word32 edx, word32 ebp, word32 dwArg00, word32 dwArg01, word32 dwArg05, word32 dwArg0B)
{
// def fp
// def dwArg00
// def dwArg01
// def dwLoc0120
// def dwLocB8
// def dwLoc0180
// def dwLoc03
// def dwLoc0154
// def dwLoc01B4
// def dwArg0B
// def dwLoc010E
// def dwLoc0118
// def dwLoc4C
// def dwLoc8C
// def dwLoc0234
// def dwLocBD
// def dwLocC3
// def dwLoc0225
// def dwLoc021C
// def dwLoc0227
// def dwLoc0140
// def dwArg05
	eax_7 = GetCurrentProcessId();
	if (eax_7 != 0x000003FB)
		;
	dwLoc0268_28 = fp - 0x00000004;
	v15_29 = fp - 0x00000098;
	dwLoc0268_30 = fp - 0x00000098;
	CharUpperA(fp - 0x00000098);
	ecx_36 = &fp->dwFFFFFD98;
	dwLoc0268_38 = &fp->dwFFFFFD98;
	dwLoc026C_41 = 0x00000000;
	dwLoc0270_43.u0 = 0x00000000;
	OpenEventW(0x00000000, 0x00000000, &fp->dwFFFFFD98);
	dwLoc0268_52 = 0x00000000;
	GetDC(0x00000000);
	eax_55 = GetCurrentThreadId();
	if (eax_55 == 0x0000026D)
		ecx_595 = &fp->dwFFFFFD98 ^ dwArg05;
// ecx_64 = PHI(ecx_36, ecx_595)
	esp_68 = fp - 0x00000268;
	fp->dwFFFFFD98 = 0x00000002;
	if (ecx_64 != 0x00000000)
		;
	__set_app_type();
	dwLoc026C_85 = fp - 0x00000004;
	v20_86 = fp - 0x000000B4;
	dwLoc026C_87 = fp - 0x000000B4;
	GetFileAttributesA(fp - 0x000000B4);
	dwLoc026C_92 = &fp->dwFFFFFD98;
	CharUpperA(&fp->dwFFFFFD98);
	GetProcessHeap();
	dwLoc026C_98 = &fp->dwFFFFFD98;
	eax_99 = CharUpperA(&fp->dwFFFFFD98);
	dwLoc026C_107 = &fp->dwFFFFFD98;
	esp_108 = &fp->tFFFFFD90;
	fp->tFFFFFD90.u0 = 0x00000000;
	eax_110 = eax_99 & 0x00000008;
	dwLoc0274_112 = eax_99 & 0x00000008;
	eax_113 = OpenMutexA(eax_99 & 0x00000008, 0x00000000, &fp->dwFFFFFD98);
	ecx_115 = &fp->dwFFFFFD98 & 0x0000011C;
	eax_118 = eax_113 - dwArg00;
	ecx_120 = ecx_115 - dwArg01;
	dwLoc026C_122 = eax_118;
	IsWindow(eax_118);
	v22_126 = dwLoc0120 - (fp - 0x00000004);
	dwLoc0120_127 = v22_126;
	edx_128 = fp - 0x00000004 ^ 0x00000611;
	eax_129 = GetCurrentThreadId();
	eax_130 = eax_129 & 0x00000AE4;
	if ((eax_129 & 0x00000AE4) != ecx_120)
	{
		edx_564 = edx_128 | ecx_120;
		ecx_566 = ecx_120 | dwLoc0140;
		v25_570 = dwLocB8 + ecx_566;
		dwLocB8_571 = v25_570;
		ecx_572 = fp - 0x00000004;
	}
// dwLocB8_142 = PHI(dwLocB8, dwLocB8_571)
// ecx_143 = PHI(ecx_120, ecx_572)
// edx_144 = PHI(edx_128, edx_564)
	dwLoc026C_148 = fp - 0x00000004;
	v26_149 = fp - 0x00000060;
	dwLoc026C_150 = fp - 0x00000060;
	esp_151 = &fp->tFFFFFD90;
	fp->tFFFFFD90.u0 = 0x00000000;
	eax_153 = GetClientRect(0x00000000, fp - 0x00000060);
	eax_156 = eax_153 | dwLoc0180;
	if (eax_156 != edx_144)
	{
		eax_552 = &fp->dwFFFFFD98;
		edx_556 = edx_144 ^ dwLoc0225;
		edx_558 = edx_556 ^ dwLoc021C;
		edx_560 = edx_558 & dwLoc0227;
	}
// edx_165 = PHI(edx_144, edx_560)
// eax_166 = PHI(eax_156, eax_552)
	edx_169 = edx_165 ^ 0x000021CD;
	SCZO_170 = cond(eax_166 - edx_169);
	C_173 = SCZO_170;
	if (eax_166 != edx_169)
	{
		edx_534 = edx_169 * 0x00000002 + (eax_166 <u edx_169);
		ecx_535 = ecx_143 + v22_126;
		eax_542 = eax_166 - 0x00003421;
		SCZO_545 = cond(eax_542);
		C_548 = SCZO_545;
	}
// ecx_179 = PHI(ecx_143, ecx_535)
// edx_180 = PHI(edx_169, edx_534)
// eax_181 = PHI(eax_166, eax_542)
// C_182 = PHI(C_173, C_548)
	esp_183 = &fp->tFFFFFD90;
	fp->tFFFFFD90.u0 = 0x00000000;
	eax_185 = eax_181 + edx_180 + C_182;
	if (eax_185 == 0x00000330)
	{
		edx_530 = edx_180 ^ 0x00001DF0;
		ecx_531 = ecx_179 - 0x0000292F;
	}
// ecx_193 = PHI(ecx_179, ecx_531)
// edx_194 = PHI(edx_180, edx_530)
	dwLoc0274_197 = 0x00000000;
	eax_198 = CreateItemMoniker(0x00000000, 0x00000000, null);
	eax_200 = eax_198 ^ 0x80070057;
	if ((eax_198 ^ 0x80070057) == 0x00000000)
	{
		eax_271 = (eax_198 ^ 0x80070057) + edx_194;
		if (eax_271 == 0x00000000)
		{
			edx_521 = &fp->dwFFFFFD98;
			eax_522 = eax_271 - dwLocB8_142;
			ecx_525 = ecx_193 & dwLocBD;
			ecx_527 = ecx_525 - dwLocC3;
		}
// ecx_278 = PHI(ecx_193, ecx_527)
// edx_279 = PHI(edx_194, edx_521)
// eax_280 = PHI(eax_271, eax_522)
		esp_281 = &fp->dwFFFFFD94;
		fp->dwFFFFFD94 = eax_280;
		esp_283 = &fp->tFFFFFD90;
		fp->tFFFFFD90 = ecx_278;
		esp_285 = &fp->dwFFFFFD8C;
		fp->dwFFFFFD8C = edx_279;
		ecx_299 = ecx_278 & 0x00002F37;
		ecx_305 = ecx_299 + dwLoc03;
		if (fp - 0x00000004 != ecx_305)
			ecx_508 = &fp->dwFFFFFD98;
// ecx_316 = PHI(ecx_305, ecx_508)
		if (ecx_316 != 0x00000000)
			;
		dwLoc0294_329 = 0x00002000;
		dwLoc0298_334 = 0x00000000;
		eax_337 = VirtualAlloc(0x00000000, 0x00002000, 0x00001000, 0x00000040);
		dwLoc0218_340 = eax_337;
		if (dwLoc0154 == ecx_316)
		{
			ecx_487 = ecx_316 + 0x00001D56;
			ecx_491 = ecx_487 ^ 0x00002863;
		}
// ecx_350 = PHI(ecx_316, ecx_491)
		ecx_354 = ecx_350 - dwLoc01B4;
		ecx_358 = ecx_354 | dwArg0B;
		eax_361 = fp - 0x00000004 ^ dwLoc010E;
		eax_363 = eax_361 + dwLoc0118;
		edi_365 = &globals->dw412E33;
		ecx_366 = ecx_358 + eax_363;
		esi_367 = eax_337;
		edx_370 = fp + 0xFFFFDB3F;
		dwLoc68_371 = 0xA37A6ED7;
		ecx_372 = ecx_366 - 0x000028C3;
		if (ecx_366 != 0x000028C3)
		{
			ecx_475 = ecx_366 - 0x000028C3 | 0x000028C3;
			goto l00401606;
		}
l00401606:
		do
		{
// dwLoc68_378 = PHI(dwLoc68_371, dwLoc68_371, dwLoc68_393)
// edi_382 = PHI(edi_365, edi_365, edi_413)
// esi_383 = PHI(esi_367, esi_367, esi_415)
// ecx_384 = PHI(ecx_372, ecx_475, ecx_402)
// edx_385 = PHI(edx_370, edx_370, edx_414)
// eax_386 = PHI(eax_363, eax_363, eax_424)
			ebx_388 = *edi_382;
			ecx_390 = ecx_384 ^ dwLoc4C;
			ebx_391 = ebx_388 + dwLoc68_378;
			v44_392 = dwLoc68_378 + 0x623ED7F6;
			dwLoc68_393 = v44_392;
			ecx_394 = ecx_390 & edx_385;
			C_395 = false;
			edx_396 = edx_385 - eax_386;
			Mem397[esi_383 + 0x00000000:word32] = ebx_391;
			eax_398 = eax_386 | 0x00002279;
			edi_400 = edi_382 + 20138706;
			ecx_402 = ecx_394 - dwLoc8C;
			esi_404 = esi_383 + 0xA596E2A8;
			if (eax_398 == 0x000003EF)
			{
				eax_466 = eax_398 | 0x000038A7;
				edx_468 = &fp->dwFFFFFD98 - ecx_402;
				eax_469 = (eax_398 | 0x000038A7) & 0x00003565;
			}
// edx_410 = PHI(edx_396, edx_468)
// eax_412 = PHI(eax_398, eax_469)
			edi_413 = edi_400 + 0x04CD2B4C;
			edx_414 = edx_410 + 0x00003BBE;
			esi_415 = esi_404 + 0x5A691D5C;
			if ((dwLoc0234 & ecx_402) != 0x00000000)
				eax_461 = eax_412 ^ 0x000034ED;
// eax_424 = PHI(eax_412, eax_461)
		} while (edi_413 != &globals->dw413EBF);
		dwLoc0218_340();
		if (eax_424 == edx_414)
			;
	}