RtlIntegerToChar
NTSTATUS __stdcall RtlIntegerToChar(UINT64 Value, UINT64 Base, ULONG OutputLength, PCHAR String){
unsigned int v6;
unsigned int v7;
int v8;
int v9;
char *v10;
unsigned int v11;
__int64 v12;
__int64 *v13;
int v14;
__int64 v15;
bool v16;
size_t v18;
__int64 v19;
char v20;
v6 = Base;
v7 = Value;
switch( (_DWORD)Base )
{
case 0:
v6 = 10;
goto LABEL_3;
case 0xA:
LABEL_3:
v8 = 0;
v9 = 0;
goto LABEL_4;
case 0x10:
v8 = 4;
break;
case 2:
v8 = 1;
break;
case 8:
v8 = 3;
break;
default:
return -1073741811;
}
v9 = (1 << v8) - 1;
LABEL_4:
v10 = &v20;
do
{
if( v8 )
{
v11 = v7 & v9;
v7 >>= v8;
}
else
{
v11 = v7 % v6;
v7 /= v6;
}
--v10;
v12 = v11;
v13 = RtlpIntegerChars;
*v10 = *((_BYTE *)RtlpIntegerChars + v12);
}
while( v7 );
v15 = (unsigned int)(v14 + 65 - (_DWORD)v10);
if( (OutputLength & 0x80000000) == 0 )
goto LABEL_9;
OutputLength = -OutputLength;
v16 = (int)v15 <= (int)OutputLength;
if( (int)v15 < (int)OutputLength )
{
v18 = OutputLength - v15;
v19 = v18;
LOBYTE(v13) = 48;
memset(String, (INT64)v13, v18);
OutputLength = v15;
String += v19;
LABEL_9:
v16 = (int)v15 <= (int)OutputLength;
}
if( !v16 )
return -2147483643;
memmove(String, v10, v15);
if( (int)v15 < (int)OutputLength )
String[v15] = 0;
return 0;
}Referenced by:
CmLogMcUpdateStatus
CmpInitializeRegistryNode
RtlIntegerToUnicodeString