Guest User

Untitled

a guest
Aug 10th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.63 KB | None | 0 0
  1. DWORD __cdecl sub_6BE14C()
  2. {
  3.   DWORD result; // eax@3
  4.   DWORD hash_01; // esi@4
  5.   DWORD hash_02; // esi@4
  6.   DWORD hash_03; // esi@4
  7.   DWORD hash_04; // esi@4
  8.   LARGE_INTEGER PerformanceCount; // [sp+8h] [bp-10h]@4
  9.   struct _FILETIME SystemTimeAsFileTime; // [sp+10h] [bp-8h]@1
  10.  
  11.   SystemTimeAsFileTime.dwLowDateTime = 0;
  12.   SystemTimeAsFileTime.dwHighDateTime = 0;
  13.   if ( some_mem_for_hash != 0xBB40E64E && some_mem_for_hash & 0xFFFF0000 )
  14.   {
  15.     result = ~some_mem_for_hash;
  16.     negative_of_some_hash = ~some_mem_for_hash;
  17.   }
  18.   else
  19.   {
  20.     GetSystemTimeAsFileTime(&SystemTimeAsFileTime);
  21.     hash_02 = GetCurrentProcessId() ^ SystemTimeAsFileTime.dwLowDateTime ^ SystemTimeAsFileTime.dwHighDateTime;
  22.     hash_03 = GetCurrentThreadId() ^ hash_02;
  23.     hash_04 = GetTickCount() ^ hash_03;
  24.     QueryPerformanceCounter(&PerformanceCount);
  25.     result = PerformanceCount.LowPart ^ PerformanceCount.HighPart;
  26.     hash_01 = PerformanceCount.LowPart ^ PerformanceCount.HighPart ^ hash_04;
  27.     if ( hash_01 == 0xBB40E64E )
  28.     {
  29.       hash_01 = 0xBB40E64Fu;                    // hash_01++; // 0xBB40E64E hat eine spezielle bedeutung, irgendwie
  30.     }
  31.     else
  32.     {
  33.       if ( !(hash_01 & 0xFFFF0000) )            // Wenn die upper 2 Bytes leer sind
  34.       {
  35.         result = hash_01 << 16;                 // Soll result der lower Teil sein
  36.         hash_01 |= hash_01 << 16;               // und der gespeicherte Hash soll dann an den High-Stellen die lower bytes haben. Somit ist dann die obere if für den nächsten aufruf true.
  37.       }
  38.     }
  39.     some_mem_for_hash = hash_01;
  40.     negative_of_some_hash = ~hash_01;
  41.   }
  42.   return result;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment