RtlLargeIntegerToUnicode
INT64 __fastcall RtlLargeIntegerToUnicode(_LARGE_INTEGER *Value, UINT64 Base, INT64 OutputLength, WCHAR *String){
WCHAR *v4;
int v5;
UINT8 *v6;
unsigned __int64 QuadPart;
char v8;
__int64 v9;
bool v10;
__int64 v11;
WCHAR *v12;
__int64 i;
char v15[14];
v4 = String;
v5 = OutputLength;
v6 = (UINT8 *)v15;
QuadPart = Value->QuadPart;
do
{
v8 = QuadPart;
QuadPart >>= 4;
v6 -= 2;
*(_WORD *)v6 = RtlpIntegerWChars[v8 & 0xF];
}
while( QuadPart );
v9 = (v15 - (char *)v6) >> 1;
if( (int)OutputLength < 0 )
{
v5 = -(int)OutputLength;
v10 = (int)v9 <= -(int)OutputLength;
if( (int)v9 >= -(int)OutputLength )
goto LABEL_10;
v11 = (unsigned int)(v5 - v9);
v12 = String;
for( i = (unsigned int)v11; i; --i )
*v12++ = 48;
v5 = (v15 - (char *)v6) >> 1;
v4 = &String[v11];
}
v10 = (int)v9 <= v5;
LABEL_10:
if( !v10 )
return 2147483653i64;
memmove((UINT8 *)v4, v6, 2i64 * (unsigned int)v9);
if( (int)v9 < v5 )
v4[(unsigned int)v9] = 0;
return 0i64;
}Referenced by:
RtlConvertSidToUnicodeString