// UncoreInitPeim - Part: Indices 1001-1500
// Generated from original UncoreInitPeim.c
// Total functions in this part: 27789
#include "UncoreInitPeim.h"
// Index: 1000/2560
int __cdecl DdrTrainFuncF23D(unsigned __int8 *n6, unsigned __int8 n2, int a3, unsigned __int8 a4)
{
int v4; // eax
v4 = MiscConfigCheck(n6, n2, a3, 184567108); /*0xffc7f255*/
return MiscIoCheck(n6, n2, a3, 0xB004544u, (a4 << 15) | a4 | v4 & 0xFF807F00); /*0xffc7f27e*/
}
// Function: DdrTrainFuncF282 @ 0xffc7f282 (0x74 bytes)
// Index: 1001/2560
int __cdecl DdrTrainFuncF282(unsigned __int8 *__return_address, unsigned __int8 n6, int n4, char a4)
{
unsigned int v4; // esi
int v5; // edi
int v6; // esi
unsigned __int8 n0x12; // bl
unsigned int v8; // eax
char n2; // [esp+20h] [ebp+14h]
v4 = *(_DWORD *)(7688 * (unsigned __int8)n4 + GetSocketInfo((int)__return_address, n6) + 11); /*0xffc7f2a1*/
v5 = (v4 >> 5) & 1; /*0xffc7f2b5*/
v6 = ((unsigned __int8)v4 ^ (unsigned __int8)(32 * a4)) & 0x20 ^ v4; /*0xffc7f2b8*/
n0x12 = 0; /*0xffc7f2ba*/
n2 = 0; /*0xffc7f2bc*/
do /*0xffc7f2ed*/
{
v8 = MailBoxFunc4CB2((int)__return_address, n2, 0x80042E8u); /*0xffc7f2cb*/
MiscIoCheck(__return_address, n6, n4, v8, v6); /*0xffc7f2dd*/
n2 = ++n0x12; /*0xffc7f2e7*/
}
while ( n0x12 < 0x12u ); /*0xffc7f2ed*/
return v5; /*0xffc7f2f1*/
}
// Function: WriteLevelingPushPull @ 0xffc7f2f6 (0x3e3 bytes)
// Index: 1002/2560
int __cdecl WriteLevelingPushPull(unsigned __int8 *__return_address, int n6, char a3, unsigned __int8 n0x40)
{
int v4; // eax
__int16 *buf_1; // ebp
_BYTE *SocketInfo_2; // edx
unsigned __int8 n6a_1; // cl
int v8; // eax
unsigned __int8 n0x12_1; // al
__int16 n6_1; // dx
__int16 v11; // ax
int n256; // ecx
int v13; // eax
unsigned __int8 n0x12_2; // al
_BYTE *n6a; // [esp+10h] [ebp-40h]
int v17; // [esp+14h] [ebp-3Ch]
int n4; // [esp+18h] [ebp-38h]
int n2; // [esp+1Ch] [ebp-34h]
unsigned __int16 p_n60[2]; // [esp+20h] [ebp-30h] BYREF
int n0x12; // [esp+24h] [ebp-2Ch]
_BYTE *SocketInfo_1; // [esp+28h] [ebp-28h]
int v23; // [esp+2Ch] [ebp-24h] BYREF
int n511; // [esp+30h] [ebp-20h] BYREF
_BYTE *SocketInfo; // [esp+34h] [ebp-1Ch]
_WORD buf[6]; // [esp+38h] [ebp-18h] BYREF
_BYTE v27[12]; // [esp+44h] [ebp-Ch] BYREF
if ( a3 == -1 ) /*0xffc7f311*/
{
v4 = 6 * (unsigned __int8)n6; /*0xffc7f316*/
*(_DWORD *)&__return_address[v4 + 244433] = 0; /*0xffc7f31e*/
*(_WORD *)&__return_address[v4 + 244437] = 0; /*0xffc7f325*/
DebugPrint( /*0xffc7f32d*/
(int)__return_address,
2,
n6,
255,
255,
255,
255,
255,
"WriteLeveling Pushout\n BEFORE WL pushout values\n");
}
else
{
DebugPrint( /*0xffc7f33d*/
(int)__return_address,
2,
n6,
255,
255,
255,
255,
255,
"WriteLeveling Pullin\n BEFORE WL pullin values\n");
}
RmtFunc5B54(__return_address, n6, 0x15u); /*0xffc7f349*/
RmtFunc5B54(__return_address, n6, 0x16u); /*0xffc7f352*/
SocketInfo_1 = (_BYTE *)GetSocketInfo((int)__return_address, n6); /*0xffc7f361*/
v17 = 0; /*0xffc7f365*/
buf_1 = buf; /*0xffc7f36a*/
SocketInfo_2 = SocketInfo_1; /*0xffc7f36e*/
LOBYTE(n6a) = 0; /*0xffc7f372*/
n6a_1 = 0; /*0xffc7f377*/
SocketInfo = SocketInfo_1; /*0xffc7f37b*/
v8 = 0; /*0xffc7f37f*/
do /*0xffc7f6c0*/
{
if ( !*SocketInfo_2 ) /*0xffc7f386*/
goto LABEL_46; /*0xffc7f386*/
v23 = 0; /*0xffc7f38c*/
n511 = 511; /*0xffc7f39a*/
ProcCommonFunc1A0C(__return_address, n6, (unsigned __int8)n6a, v27); /*0xffc7f3a4*/
memset_save_flags(buf, 0, 0xCu); /*0xffc7f3b2*/
ProcCommonFunc2D6F(__return_address, n6, (char)n6a, buf, v27); /*0xffc7f3c7*/
LOBYTE(n2) = 0; /*0xffc7f3cf*/
do /*0xffc7f4b2*/
{
LOBYTE(n4) = 0; /*0xffc7f3d4*/
do /*0xffc7f4a0*/
{
n0x12_1 = KtiFunc89E9((int)__return_address, n6, (char)n6a, n2, n4, 0); /*0xffc7f3e9*/
if ( !n0x12_1 ) /*0xffc7f3f3*/
{
LOBYTE(n0x12) = 0; /*0xffc7f3f9*/
do /*0xffc7f48e*/
{
if ( __return_address[257312] || n0x12_1 != 8 && n0x12_1 != 17 ) /*0xffc7f40c*/
{
MrcMarginGroupTrain(__return_address, n6, n6a, n2, n4, n0x12, 0, 0, 21, 2, p_n60); /*0xffc7f42d*/
KtiFunc99A7(p_n60[0], (__int16 *)&n511, (__int16 *)&v23); /*0xffc7f440*/
MrcMarginGroupTrain(__return_address, n6, n6a, n2, n4, n0x12, 0, 0, 22, 2, p_n60); /*0xffc7f464*/
KtiFunc99A7(p_n60[0], (__int16 *)&n511, (__int16 *)&v23); /*0xffc7f47a*/
n0x12_1 = n0x12; /*0xffc7f47f*/
}
LOBYTE(n0x12) = ++n0x12_1; /*0xffc7f488*/
}
while ( n0x12_1 < 0x12u ); /*0xffc7f48e*/
}
LOBYTE(n4) = n4 + 1; /*0xffc7f49a*/
}
while ( (unsigned __int8)n4 < 4u ); /*0xffc7f4a0*/
LOBYTE(n2) = n2 + 1; /*0xffc7f4ac*/
}
while ( (unsigned __int8)n2 < 2u ); /*0xffc7f4b2*/
*(_DWORD *)p_n60 = 0; /*0xffc7f4b8*/
n6_1 = *buf_1; /*0xffc7f4c2*/
if ( a3 != -1 ) /*0xffc7f4c6*/
{
if ( n6_1 > 5 || (unsigned __int16)n511 < (unsigned int)n0x40 + 272 ) /*0xffc7f573*/
{
if ( n6_1 > 6 || (unsigned __int16)n511 < (unsigned int)n0x40 + 144 ) /*0xffc7f5a1*/
goto LABEL_45; /*0xffc7f5a1*/
*buf_1 = n6_1 + 1; /*0xffc7f5ac*/
v13 = -128; /*0xffc7f5b0*/
}
else
{
*buf_1 = n6_1 + 2; /*0xffc7f578*/
v13 = -256; /*0xffc7f57c*/
}
*(_DWORD *)p_n60 = v13; /*0xffc7f5b1*/
DebugPrint( /*0xffc7f5cd*/
(int)__return_address,
2,
n6,
(int)n6a,
255,
255,
255,
255,
"Pullin to CWL_ADJ=%d and TxDq/Dqs by %d\n",
*buf_1,
(__int16)v13);
LABEL_33:
if ( __return_address[6 * (unsigned __int8)n6 + 244433 + v17] ) /*0xffc7f5df*/
{
ProcCommonFunc5684(__return_address, n6, (int)n6a, SocketInfo, buf, v27); /*0xffc7f601*/
LOBYTE(n2) = 0; /*0xffc7f609*/
do /*0xffc7f693*/
{
LOBYTE(n4) = 0; /*0xffc7f60e*/
do /*0xffc7f685*/
{
n0x12_2 = KtiFunc89E9((int)__return_address, n6, (char)n6a, n2, n4, 0); /*0xffc7f623*/
if ( !n0x12_2 ) /*0xffc7f62d*/
{
LOBYTE(n0x12) = 0; /*0xffc7f62f*/
do /*0xffc7f677*/
{
if ( __return_address[257312] || n0x12_2 != 8 && n0x12_2 != 17 ) /*0xffc7f642*/
{
MrcMarginGroupTrain(__return_address, n6, n6a, n2, n4, n0x12, 0, 0, 20, 28, p_n60); /*0xffc7f663*/
n0x12_2 = n0x12; /*0xffc7f668*/
}
LOBYTE(n0x12) = ++n0x12_2; /*0xffc7f671*/
}
while ( n0x12_2 < 0x12u ); /*0xffc7f677*/
}
LOBYTE(n4) = n4 + 1; /*0xffc7f67f*/
}
while ( (unsigned __int8)n4 < 4u ); /*0xffc7f685*/
LOBYTE(n2) = n2 + 1; /*0xffc7f68d*/
}
while ( (unsigned __int8)n2 < 2u ); /*0xffc7f693*/
}
goto LABEL_45; /*0xffc7f693*/
}
if ( n6_1 > -2 && (unsigned __int16)v23 <= 239 - n0x40 ) /*0xffc7f4e7*/
{
v11 = n6_1 - 2; /*0xffc7f4e9*/
n256 = 256; /*0xffc7f4ec*/
LABEL_24:
*buf_1 = v11; /*0xffc7f518*/
*(_DWORD *)p_n60 = n256; /*0xffc7f522*/
__return_address[6 * (unsigned __int8)n6 + 244433 + v17] = 1; /*0xffc7f52a*/
DebugPrint( /*0xffc7f540*/
(int)__return_address,
2,
n6,
(int)n6a,
255,
255,
255,
255,
"Pushout to CWL_ADJ=%d and TxDq/Dqs by +%d\n",
*buf_1,
(__int16)n256);
goto LABEL_33; /*0xffc7f540*/
}
if ( n6_1 > -3 && (unsigned __int16)v23 <= 367 - n0x40 ) /*0xffc7f50e*/
{
v11 = n6_1 - 1; /*0xffc7f510*/
n256 = 128; /*0xffc7f513*/
goto LABEL_24; /*0xffc7f513*/
}
__return_address[6 * (unsigned __int8)n6 + 244433 + v17] = 0; /*0xffc7f54c*/
LABEL_45:
v8 = v17; /*0xffc7f699*/
n6a_1 = (unsigned __int8)n6a; /*0xffc7f69d*/
SocketInfo_2 = SocketInfo_1; /*0xffc7f6a1*/
LABEL_46:
++n6a_1; /*0xffc7f6a5*/
SocketInfo_2 += 7688; /*0xffc7f6a7*/
++v8; /*0xffc7f6ad*/
LOBYTE(n6a) = n6a_1; /*0xffc7f6ae*/
++buf_1; /*0xffc7f6b2*/
v17 = v8; /*0xffc7f6b5*/
SocketInfo_1 = SocketInfo_2; /*0xffc7f6b9*/
}
while ( n6a_1 < 6u ); /*0xffc7f6c0*/
MailBoxFunc2B5B((int)__return_address, n6); /*0xffc7f6c8*/
return 0; /*0xffc7f6cf*/
}
// Function: DdrTrainFuncF6D9 @ 0xffc7f6d9 (0x12f bytes)
// Index: 1003/2560
int __usercall DdrTrainFuncF6D9@<eax>(
__m64 a1@<mm3>,
unsigned __int8 a2,
unsigned __int8 a3,
char i,
_DWORD *a5,
_BYTE *a6,
int *a7,
char *p_i,
_BYTE *a9,
_BYTE *a10,
int a11)
{
int v11; // edi
char v12; // cl
unsigned __int8 v14; // al
char n2; // cl
int v16; // ecx
int v17; // edx
int v18; // ecx
v11 = DdrTrainFunc56A7(a1); /*0xffc7f6e7*/
v12 = byte_FFD543AC[6 * a2 + a3]; /*0xffc7f6f0*/
if ( v12 == -1 ) /*0xffc7f6fa*/
return 1; /*0xffc7f6ff*/
v14 = v12 + i; /*0xffc7f70a*/
n2 = byte_FFD54291[12 * a2]; /*0xffc7f70c*/
if ( n2 == 1 ) /*0xffc7f715*/
{
*p_i = *(_BYTE *)(6 * (*(unsigned __int8 *)(v11 + 9402) + 42602) /*0xffc7f742*/
+ v11
+ HIBYTE(word_FFD542FC[2 * v14 + 2 * (unsigned __int8)byte_FFD5428E[12 * a2]]));
*a9 = LOBYTE(word_FFD542FC[2 * v14 + 2 * (unsigned __int8)byte_FFD5428E[12 * a2]]) >> 3; /*0xffc7f75d*/
*a10 = word_FFD542FC[2 * v14 + 2 * (unsigned __int8)byte_FFD5428E[12 * a2]] & 7; /*0xffc7f775*/
*a7 = 0; /*0xffc7f77a*/
goto LABEL_10; /*0xffc7f77d*/
}
if ( n2 ) /*0xffc7f781*/
{
if ( n2 != 2 ) /*0xffc7f7b1*/
goto LABEL_10; /*0xffc7f7b1*/
v17 = v14 + (unsigned __int8)byte_FFD5428E[12 * a2]; /*0xffc7f7bd*/
v16 = (unsigned __int16)word_FFD542FE[2 * v17] + ((unsigned __int16)word_FFD542FC[2 * v17] << 16); /*0xffc7f7d2*/
}
else
{
*a6 = word_FFD542FC[2 * v14 + 2 * (unsigned __int8)byte_FFD5428E[12 * a2]]; /*0xffc7f799*/
v16 = (unsigned __int16)word_FFD542FE[2 * v14 + 2 * (unsigned __int8)byte_FFD5428E[12 * a2]]; /*0xffc7f7a4*/
}
*a7 = v16; /*0xffc7f7d7*/
LABEL_10:
if ( a11 ) /*0xffc7f7e0*/
{
if ( a11 != 1 ) /*0xffc7f7ef*/
{
*a5 <<= 24; /*0xffc7f7ff*/
return 0; /*0xffc7f7ff*/
}
v18 = (unsigned __int8)byte_FFD54290[12 * a2]; /*0xffc7f7f1*/
}
else
{
v18 = (unsigned __int8)byte_FFD5428F[12 * a2]; /*0xffc7f7e2*/
}
*a5 = v18 << 24; /*0xffc7f7fb*/
return 0; /*0xffc7f804*/
}
// Function: DdrTrainFuncF808 @ 0xffc7f808 (0x2e bytes)
// Index: 1004/2560
int __usercall DdrTrainFuncF808@<eax>(__m64 a1@<mm3>, int a2, int a3, int i, int ia, unsigned __int64 a6, char n0x40)
{
unsigned __int64 v7; // rax
LODWORD(v7) = DdrTrainFuncF836(a1, a2, a3, i, ia, a6); /*0xffc7f822*/
return DdrTrainFunc6117(v7, n0x40); /*0xffc7f82e*/
}
// Function: DdrTrainFuncF836 @ 0xffc7f836 (0x22e bytes)
// Index: 1005/2560
unsigned int __usercall DdrTrainFuncF836@<eax>(__m64 a1@<mm3>, int a2, int a3, int i, int a5, unsigned __int64 a6)
{
int v6; // esi
char n2; // al
int v8; // ebx
unsigned int v9; // edi
char v10; // cl
unsigned __int8 n0x20; // dl
unsigned __int64 v12; // rax
unsigned int v13; // eax
int v14; // edx
char n2_1; // al
int v16; // eax
unsigned __int8 n0x20_1; // [esp+12h] [ebp-2Ah]
unsigned __int8 n0x20_2; // [esp+13h] [ebp-29h]
char p_i; // [esp+14h] [ebp-28h] BYREF
_BYTE v21[15]; // [esp+15h] [ebp-27h] BYREF
int v22; // [esp+24h] [ebp-18h]
int v23; // [esp+28h] [ebp-14h] BYREF
int v24; // [esp+2Ch] [ebp-10h]
unsigned __int64 v25; // [esp+30h] [ebp-Ch]
*(_DWORD *)&v21[7] = 0; /*0xffc7f83f*/
n0x20_1 = 0; /*0xffc7f843*/
n0x20_2 = 0; /*0xffc7f847*/
*(_DWORD *)&v21[11] = 0; /*0xffc7f84b*/
v6 = DdrTrainFunc56A7(a1); /*0xffc7f855*/
v22 = v6; /*0xffc7f85f*/
if ( DdrTrainFuncF6D9(a1, a2, a3, i, &v23, &v21[2], (int *)&v21[3], &p_i, v21, &v21[1], 0) ) /*0xffc7f886*/
return -1; /*0xffc7fa5a*/
n2 = byte_FFD54291[12 * (unsigned __int8)a2]; /*0xffc7f89c*/
if ( n2 == 1 || n2 == 2 ) /*0xffc7f8a8*/
{
v9 = a6; /*0xffc7f8b9*/
v10 = a5 & 3; /*0xffc7f8bf*/
n0x20 = 32 - 8 * (a5 & 3); /*0xffc7f8c7*/
n0x20_1 = 8 * (a5 & 3); /*0xffc7f8c9*/
v8 = a5 - (a5 & 3); /*0xffc7f8d0*/
n0x20_2 = n0x20; /*0xffc7f8d2*/
LOBYTE(a5) = v8; /*0xffc7f8d6*/
if ( v10 || HIDWORD(a6) ) /*0xffc7f8e3*/
{
LODWORD(v12) = DdrTrainFunc6117(a6, n0x20); /*0xffc7f8f3*/
v25 = v12; /*0xffc7f8fe*/
v24 = v8 + 4; /*0xffc7f907*/
if ( v12 ) /*0xffc7f90b*/
{
v13 = DdrTrainFuncF836(a1, a2, a3, i, v24, v25); /*0xffc7f926*/
v9 = a6; /*0xffc7f92b*/
v6 = v22; /*0xffc7f936*/
*(_DWORD *)&v21[7] = v13; /*0xffc7f93a*/
*(_DWORD *)&v21[11] = v14; /*0xffc7f93e*/
}
}
LODWORD(a6) = DdrTrainFunc6101(__SPAIR64__(HIDWORD(a6), v9), n0x20_1); /*0xffc7f952*/
}
else
{
v8 = a5; /*0xffc7f8aa*/
}
n2_1 = byte_FFD54291[12 * (unsigned __int8)a2]; /*0xffc7f95a*/
if ( n2_1 == 1 ) /*0xffc7f962*/
{
v16 = *(_DWORD *)(*(_DWORD *)&v21[3] /*0xffc7f992*/
+ v8
+ *(_DWORD *)(v6 + 4 * *(unsigned __int8 *)(v6 + 9402) + 255560)
+ ((v21[1] + 8 * (v21[0] + 32 * (unsigned __int8)p_i)) << 12));
}
else if ( n2_1 == 2 ) /*0xffc7f99b*/
{
v16 = *(_DWORD *)(v8 /*0xffc7f9cc*/
+ *(_DWORD *)(v6
+ 8
* (51 * (unsigned __int8)a3
+ (unsigned __int8)byte_FFD54292[12 * (unsigned __int8)a2]
+ 6088 * *(unsigned __int8 *)(v6 + 9402))
+ 304942)
+ *(_DWORD *)&v21[3]);
}
else
{
if ( byte_FFD5428F[12 * (unsigned __int8)a2] == byte_FFD54290[12 * (unsigned __int8)a2] ) /*0xffc7f9dd*/
return 0; /*0xffc7f9e3*/
*(_DWORD *)(*(_DWORD *)(v6 + 246764) + 216) = (v8 + *(_DWORD *)&v21[3]) & 0xFFFFFF00; /*0xffc7f9f7*/
*(_DWORD *)(*(_DWORD *)(v6 + 246764) + 208) = v23 | (v21[2] << 16) | (((unsigned __int8)a5 << 8) + 240); /*0xffc7fa1f*/
v16 = *(_DWORD *)(*(_DWORD *)(v6 + 246764) + 212); /*0xffc7fa2b*/
}
return ((v16 & (unsigned int)a6) >> n0x20_1) | DdrTrainFunc6101(*(__int64 *)&v21[7], n0x20_2); /*0xffc7fa5c*/
}
// Function: DdrTrainFuncFA64 @ 0xffc7fa64 (0x2fe bytes)
// Index: 1006/2560
int __usercall DdrTrainFuncFA64@<eax>(
__m64 a1@<mm3>,
int a2,
int a3,
int i,
int ia,
unsigned __int64 a6,
char n0x40,
unsigned __int64 a8,
unsigned __int8 n0xF)
{
unsigned int v9; // esi
int v10; // ebp
int result; // eax
int v12; // edx
char n2; // al
int v14; // esi
int ia_1; // ebx
unsigned int v16; // edi
char v17; // cl
unsigned __int8 n0x20_1; // dl
unsigned __int64 v19; // rax
unsigned __int64 v20; // rax
unsigned __int64 v21; // rax
unsigned int v22; // edx
int v23; // eax
int v24; // edx
__int64 v25; // rax
int v26; // eax
unsigned int v27; // edx
char n2_1; // al
int v29; // ecx
__int64 v30; // rax
unsigned int v31; // esi
int v32; // ebx
unsigned __int8 n0x20_2; // [esp+11h] [ebp-2Fh]
char v34; // [esp+12h] [ebp-2Eh]
char p_i; // [esp+13h] [ebp-2Dh] BYREF
unsigned __int8 v36; // [esp+14h] [ebp-2Ch] BYREF
unsigned __int8 v37; // [esp+15h] [ebp-2Bh] BYREF
_WORD v38[5]; // [esp+16h] [ebp-2Ah] BYREF
unsigned int v39; // [esp+20h] [ebp-20h]
unsigned __int8 n0x20[4]; // [esp+24h] [ebp-1Ch]
int v41; // [esp+28h] [ebp-18h]
int v42; // [esp+2Ch] [ebp-14h] BYREF
int i_1; // [esp+30h] [ebp-10h]
unsigned __int64 v44; // [esp+34h] [ebp-Ch]
char n0x40_1; // [esp+3Ch] [ebp-4h]
v9 = 0; /*0xffc7fa6a*/
v39 = 0; /*0xffc7fa6c*/
*(_DWORD *)&v38[1] = 0; /*0xffc7fa71*/
v10 = DdrTrainFunc56A7(a1); /*0xffc7fa80*/
result = DdrTrainFuncF6D9(a1, a2, a3, i, &v42, v38, (int *)&v38[3], &p_i, &v36, &v37, 1); /*0xffc7faa9*/
if ( !result ) /*0xffc7fab3*/
{
v12 = 12 * (unsigned __int8)a2; /*0xffc7fabc*/
v41 = v12; /*0xffc7fabf*/
n2 = byte_FFD54291[v12]; /*0xffc7fac3*/
if ( n2 == 1 || n2 == 2 ) /*0xffc7facf*/
{
v16 = a6; /*0xffc7faf0*/
v17 = ia & 3; /*0xffc7faf6*/
v34 = ia & 3; /*0xffc7fafb*/
n0x20_1 = 32 - 8 * (ia & 3); /*0xffc7fb02*/
n0x20_2 = 8 * (ia & 3); /*0xffc7fb04*/
ia_1 = ia - (ia & 3); /*0xffc7fb0b*/
ia = ia_1; /*0xffc7fb0d*/
if ( v17 || HIDWORD(a6) ) /*0xffc7fb19*/
{
*(_DWORD *)n0x20 = n0x20_1; /*0xffc7fb29*/
LODWORD(v19) = DdrTrainFunc6117(a6, n0x20_1); /*0xffc7fb2d*/
v44 = v19; /*0xffc7fb3b*/
i_1 = ia_1 + 4; /*0xffc7fb41*/
n0x40_1 = n0x40; /*0xffc7fb49*/
if ( v19 ) /*0xffc7fb4d*/
{
LODWORD(v20) = DdrTrainFunc6117(a8, n0x20[0]); /*0xffc7fb5d*/
DdrTrainFuncFA64(a1, a2, a3, i, i_1, v44, n0x40_1, v20, 0xFu); /*0xffc7fb7d*/
v16 = a6; /*0xffc7fb82*/
}
v9 = *(_DWORD *)&v38[1]; /*0xffc7fb8d*/
}
*(_DWORD *)n0x20 = n0x20_2; /*0xffc7fb9c*/
LODWORD(v21) = DdrTrainFunc6101(__SPAIR64__(HIDWORD(a6), v16), n0x20_2); /*0xffc7fba0*/
a6 = v21; /*0xffc7fbaa*/
if ( v34 || (_DWORD)v21 != -1 ) /*0xffc7fbb7*/
{
i_1 = ia_1; /*0xffc7fbc5*/
v44 = (unsigned int)~(_DWORD)v21; /*0xffc7fbcd*/
v9 = DdrTrainFuncF836(a1, a2, a3, i, ia_1, v44); /*0xffc7fbed*/
v39 = v22; /*0xffc7fbef*/
}
v23 = DdrTrainFunc6101(a8, n0x40); /*0xffc7fc00*/
HIDWORD(v25) = v39 | v24; /*0xffc7fc05*/
LODWORD(v25) = v9 | v23; /*0xffc7fc09*/
v26 = DdrTrainFunc6101(v25, n0x20[0]); /*0xffc7fc0f*/
v39 = v27; /*0xffc7fc14*/
v14 = v26; /*0xffc7fc18*/
v12 = v41; /*0xffc7fc1a*/
*(_DWORD *)&v38[1] = v26; /*0xffc7fc1e*/
}
else
{
v14 = a8; /*0xffc7fad5*/
ia_1 = ia; /*0xffc7fad9*/
v39 = HIDWORD(a8); /*0xffc7fadd*/
*(_DWORD *)&v38[1] = a8; /*0xffc7fae1*/
}
n2_1 = byte_FFD54291[v12]; /*0xffc7fc22*/
if ( n2_1 == 1 ) /*0xffc7fc2a*/
{
v29 = *(_DWORD *)(v10 + 4 * *(unsigned __int8 *)(v10 + 9402) + 255560) /*0xffc7fc4d*/
+ ((v37 + 8 * (v36 + 32 * (unsigned __int8)p_i)) << 12);
LABEL_18:
result = *(_DWORD *)&v38[3]; /*0xffc7fc83*/
*(_DWORD *)(ia_1 + v29 + *(_DWORD *)&v38[3]) = v14; /*0xffc7fc89*/
return result; /*0xffc7fc8c*/
}
if ( n2_1 == 2 ) /*0xffc7fc58*/
{
v29 = *(_DWORD *)(v10 /*0xffc7fc7c*/
+ 8
* (51 * (unsigned __int8)a3
+ (unsigned __int8)byte_FFD54292[v12]
+ 6088 * *(unsigned __int8 *)(v10 + 9402))
+ 304942);
goto LABEL_18; /*0xffc7fc7c*/
}
LODWORD(v30) = DdrTrainFunc54E9(n0xF, 0xFFFFFFFFFFFFFFFFuLL, (_BYTE *)v38 + 1); /*0xffc7fc9e*/
if ( v30 == a6 ) /*0xffc7fcac*/
{
v32 = *(_DWORD *)&v38[1]; /*0xffc7fd02*/
}
else
{
i_1 = ia; /*0xffc7fcc6*/
v44 = (unsigned int)~(_DWORD)a6; /*0xffc7fccc*/
v31 = DdrTrainFuncF836(a1, a2, a3, i, ia, v44); /*0xffc7fcf1*/
v32 = v31 | DdrTrainFunc6101(__SPAIR64__(v39, *(unsigned int *)&v38[1]), n0x40); /*0xffc7fcfe*/
}
*(_DWORD *)(*(_DWORD *)(v10 + 246764) + 216) = (ia + *(_DWORD *)&v38[3]) & 0xFFFFFF00; /*0xffc7fd1a*/
*(_DWORD *)(*(_DWORD *)(v10 + 246764) + 212) = v32; /*0xffc7fd26*/
result = *(_DWORD *)(v10 + 246764); /*0xffc7fd4a*/
*(_DWORD *)(result + 208) = v42 | (LOBYTE(v38[0]) << 16) | (16 * (n0xF + 16 * (unsigned __int8)ia)); /*0xffc7fd54*/
}
return result; /*0xffc7fd5a*/
}
// Function: DdrTrainFuncFD62 @ 0xffc7fd62 (0x93 bytes)
// Index: 1007/2560
int __cdecl DdrTrainFuncFD62(int a1, unsigned __int8 a2, char a3, _DWORD *a4)
{
int v4; // esi
int v5; // eax
int v6; // ecx
int v7; // ecx
if ( a3 ) /*0xffc7fd69*/
{
*a4 = -1; /*0xffc7fd6e*/
a4[1] = 0; /*0xffc7fd71*/
}
else
{
v4 = 408 * a2; /*0xffc7fd80*/
v5 = *a4 ^ *(_DWORD *)(v4 + a1 + 8); /*0xffc7fd90*/
a4[1] = a4[1]; /*0xffc7fd92*/
*a4 ^= v5 & 0x7F; /*0xffc7fd98*/
v6 = *(_DWORD *)(v4 + a1 + 8); /*0xffc7fd9a*/
a4[1] = a4[1]; /*0xffc7fda2*/
*a4 ^= (*a4 ^ (v6 << 8)) & 0x7F00; /*0xffc7fdb4*/
v7 = *(_DWORD *)(v4 + a1 + 8); /*0xffc7fdb6*/
a4[1] = a4[1]; /*0xffc7fdbe*/
*a4 ^= (*a4 ^ (v7 << 16)) & 0x7F0000; /*0xffc7fdd0*/
*a4 ^= (*a4 ^ (*(_DWORD *)(v4 + a1 + 8) << 24)) & 0x7F000000; /*0xffc7fde9*/
a4[1] = a4[1]; /*0xffc7fdeb*/
}
return 0; /*0xffc7fdf3*/
}
// Function: Ddr4SkuCheck @ 0xffc7fdf5 (0xa20 bytes)
// Index: 1008/2560
int __cdecl Ddr4SkuCheck(_BYTE *__return_address, unsigned __int8 n4, unsigned __int8 n2)
{
char *_EV_3.1; // ebx
int v4; // ebp
unsigned int n13536; // esi
unsigned int v6; // eax
int v7; // esi
char v8; // bh
int v9; // ebx
unsigned int n3; // edx
_WORD *n7; // ecx
int v12; // edx
int v13; // edx
int n16; // eax
int v15; // ebx
bool v16; // bl
char v17; // al
int v18; // edx
unsigned __int8 *v19; // ebx
int v20; // ecx
char n2_1; // al
unsigned __int8 v23; // bl
int v24; // eax
int v25; // ebp
char n0x14_1; // bh
int v27; // ecx
int v28; // eax
int n64; // ebx
int v30; // edx
int n64_1; // eax
int n64_2; // eax
int v33; // edx
int v34; // ebx
int n64_3; // eax
int n64_4; // eax
int n64_5; // eax
char n2_2; // al
char v39; // [esp+12h] [ebp-8Eh]
char v40; // [esp+13h] [ebp-8Dh]
_WORD *n7_1; // [esp+14h] [ebp-8Ch]
bool v42; // [esp+18h] [ebp-88h]
unsigned __int8 v43; // [esp+19h] [ebp-87h]
bool v44; // [e... [19023 chars total]
// Function: MemChipFunc815 @ 0xffc80815 (0x63c bytes)
// Index: 1009/2560
int __cdecl MemChipFunc815(_BYTE *__return_address, char a2)
{
_BYTE *__return_address_1; // edi
char v3; // dl
char n16_12; // si
int v5; // ecx
_BYTE *v6; // eax
int n2; // ebx
int v8; // ebx
int n16_7; // eax
int n16_8; // eax
char n16_9; // al
_BYTE *v13; // ebp
int n2_9; // esi
unsigned __int8 n6_1; // al
int CpuCount_3; // ecx
int n16_11; // edx
bool v18; // zf
char n3; // cl
_BYTE *v20; // edx
int v21; // eax
int n16_10; // edi
_BYTE *v23; // ecx
char v24; // dl
int n2_2; // eax
int v26; // eax
int v27; // eax
int n16; // ecx
int n2_4; // eax
unsigned __int8 n2_5; // dl
int n16_2; // ecx
int n16_3; // ecx
int n16_4; // ecx
int n16_5; // ecx
unsigned __int8 v35; // al
int CpuCount_4; // edx
int n16_6; // ecx
unsigned __int8 n6; // al
_BYTE *v39; // esi
_BYTE *CpuCount_2; // ecx
char n2_1; // al
char v42; // al
int n530; // eax
unsigned __int8 n6_3; // [esp+10h] [ebp-44h]
char v45; // [esp+11h] [... [14270 chars total]
// Function: MemChipFuncE51 @ 0xffc80e51 (0x232 bytes)
// Index: 1010/2560
int __cdecl MemChipFuncE51(_BYTE *__return_address, int n4, int a3)
{
int SocketInfo; // eax
int n4_1; // edx
_BYTE *SocketInfo_1; // esi
unsigned __int8 n0xC; // cl
unsigned __int8 v8; // al
int v9; // edi
int v10; // esi
_BYTE *CpuCount; // ecx
unsigned __int8 n2; // al
int v13; // edi
int v14; // esi
int v15; // edi
int v16; // eax
int v17; // eax
unsigned __int8 n0xC_1; // [esp+13h] [ebp-19h]
unsigned __int8 v20; // [esp+14h] [ebp-18h]
int v21; // [esp+18h] [ebp-14h]
unsigned __int16 *v22; // [esp+1Ch] [ebp-10h]
_BYTE *CpuCount_1; // [esp+20h] [ebp-Ch]
_BYTE *SocketInfo_2; // [esp+24h] [ebp-8h]
unsigned __int8 n2_1; // [esp+30h] [ebp+4h]
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffc80e61*/
n4_1 = n4; /*0xffc80e66*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffc80e6a*/
n0xC = 0; /*0xffc80e7e*/
v22 = (unsigned __int16 *)(a3 + 81); /*0xffc80e80*/
SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffc80e88*/
n0xC_1 = 0; /*0xffc80e8c*/
v8 = 0; /*0xffc80e94*/
v9 = 0; /*0xffc80e96*/
v20 = 0; /*0xffc80e98*/
v21 = 0; /*0xffc80e9c*/
do /*0xffc80fea*/
{
if ( *SocketInfo_1 ) /*0xffc80ea0*/
{
if ( !(unsigned __int8)DimmConfigPerSocket(__return_address, n4_1, 150, *(_BYTE *)(a3 + 73) & 3) ) /*0xffc80eb8*/
CpuIoRead((int)__return_address, n4, 0, 67190924); /*0xffc80ed1*/
v10 = v21 & 7; /*0xffc80ee1*/
DimmConfigPerSocket(__return_address, n4, 138, v10 | (*v22 << 16)); /*0xffc80ef4*/
DimmConfigPerSocket(__return_address, n4, 138, v10 | (*(unsigned __int16 *)(a3 + 111) << 16) | 0x8000); /*0xffc80f0f*/
DimmConfigPerSocket(__return_address, n4, 139, v10 | (16 * *(unsigned __int8 *)(a3 + 74))); /*0xffc80f25*/
CpuCount = (_BYTE *)GetCpuCount((int)__return_address, n4, v20); /*0xffc80f35*/
n2 = 0; /*0xffc80f3a*/
CpuCount_1 = CpuCount; /*0xffc80f3c*/
n2_1 = 0; /*0xffc80f40*/
do /*0xffc80fb0*/
{
if ( *CpuCount ) /*0xffc80f44*/
{
v13 = (unsigned __int8)(n2 + n0xC_1); /*0xffc80f4f*/
v14 = 2 * v13; /*0xffc80f52*/
v15 = v13 & 0xF; /*0xffc80f55*/
DimmConfigPerSocket(__return_address, n4, 134, (2 * (v15 | (*(unsigned __int16 *)(v14 + a3 + 13) << 15))) | 1); /*0xffc80f72*/
DimmConfigPerSocket(__return_address, n4, 134, 2 * (v15 | (*(unsigned __int16 *)(v14 + a3 + 43) << 15))); /*0xffc80f8e*/
n2 = n2_1; /*0xffc80f93*/
CpuCount = CpuCount_1; /*0xffc80f9a*/
}
++n2; /*0xffc80f9e*/
CpuCount += 1379; /*0xffc80fa0*/
n2_1 = n2; /*0xffc80fa6*/
CpuCount_1 = CpuCount; /*0xffc80faa*/
}
while ( n2 < 2u ); /*0xffc80fb0*/
n4_1 = n4; /*0xffc80fb2*/
v8 = v20; /*0xffc80fb6*/
n0xC = n0xC_1; /*0xffc80fba*/
SocketInfo_1 = SocketInfo_2; /*0xffc80fbe*/
v9 = v21; /*0xffc80fc2*/
}
++v22; /*0xffc80fc6*/
++v8; /*0xffc80fcb*/
n0xC += 2; /*0xffc80fcd*/
v20 = v8; /*0xffc80fd0*/
++v9; /*0xffc80fd4*/
n0xC_1 = n0xC; /*0xffc80fd5*/
SocketInfo_1 += 7688; /*0xffc80fd9*/
v21 = v9; /*0xffc80fdf*/
SocketInfo_2 = SocketInfo_1; /*0xffc80fe3*/
}
while ( n0xC < 0xCu ); /*0xffc80fea*/
if ( __return_address[48704 * (unsigned __int8)n4 + 258689] ) /*0xffc80ff4*/
{
if ( __return_address[1012] ) /*0xffc80ffe*/
*(_WORD *)(a3 + 79) >>= 1; /*0xffc81007*/
v16 = CpuIoRead((int)__return_address, n4_1, 0, 67256488); /*0xffc81015*/
CpuIoCfgWrite( /*0xffc8104b*/
(int)__return_address,
n4,
0,
67256488,
v16 & 0x80008000 | *(_WORD *)(a3 + 77) & 0x7FFF | (((*(unsigned __int16 *)(a3 + 79) / 0xAu) & 0x7FFF) << 16));
v17 = CpuIoRead((int)__return_address, n4, 0, 67256492); /*0xffc81058*/
CpuIoCfgWrite((int)__return_address, n4, 0, 67256492, v17 ^ ((unsigned __int16)v17 ^ *(_WORD *)(a3 + 75)) & 0x7FFF); /*0xffc81071*/
}
return 0; /*0xffc81079*/
}
// Function: MemChipFunc1083 @ 0xffc81083 (0x223 bytes)
// Index: 1011/2560
int __cdecl MemChipFunc1083(
unsigned __int8 *__return_address,
char n4,
unsigned __int8 n6,
char n2,
_BYTE *a5,
int *p_n6094961)
{
int CpuCount; // edi
__int16 v7; // si
char v8; // cl
__int16 v9; // ax
char v10; // al
int v11; // eax
bool v12; // zf
int v13; // eax
__int16 v14; // ax
int v15; // eax
__int16 v16; // ax
int v17; // eax
int result; // eax
int v19; // [esp-8h] [ebp-28h]
unsigned __int8 v20; // [esp+13h] [ebp-Dh]
int v21; // [esp+18h] [ebp-8h]
char n2a; // [esp+30h] [ebp+10h]
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffc810a4*/
v7 = MiscConfigCheck(__return_address, n4, n6, 184566024); /*0xffc810b5*/
v20 = n2 + 2 * n6; /*0xffc810c4*/
if ( n2 ) /*0xffc810ca*/
v8 = 1 << (n2 + 1); /*0xffc810d8*/
else
v8 = 0; /*0xffc810cc*/
v21 = 1379 * (unsigned __int8)n2; /*0xffc810e3*/
if ( *(_BYTE *)(v21 + CpuCount + 20) ) /*0xffc810e7*/
v9 = 4 * *(unsigned __int8 *)(v21 + CpuCount + 20) * *(unsigned __int8 *)(v21 + CpuCount + 20) - 1; /*0xffc810fa*/
else
v9 = 1; /*0xffc81101*/
*(_WORD *)&a5[2 * n6 + 1] |= v9 << v8; /*0xffc8111c*/
if ( (MiscConfigCheck(__return_address, n4, n6, 184566316) & 0x1000) != 0 ) /*0xffc8112e*/
*a5 &= ~1u; /*0xffc81130*/
else
*a5 |= 1u; /*0xffc81135*/
v10 = DdrTrainFunc45AB((int)__return_address, n4, n6); /*0xffc81143*/
if ( (MailBoxFunc8E0B((int)__return_address, (int)__return_address, n4, v10, 117459068) & 1) != 0 ) /*0xffc8115b*/
*a5 |= 2u; /*0xffc8115d*/
else
*a5 &= ~2u; /*0xffc81162*/
a5[74] = 0x80; /*0xffc8116c*/
*(_WORD *)(a5 + 111) = 1; /*0xffc81170*/
n2a = *a5 & 2; /*0xffc81178*/
if ( n2a ) /*0xffc8117c*/
{
*(_WORD *)(a5 + 75) += MemChipFunc2BA2( /*0xffc81190*/
(int)__return_address,
n4,
*(int *)((char *)p_n6094961 + 18),
*((unsigned __int16 *)p_n6094961 + 1));
v11 = *((unsigned __int16 *)p_n6094961 + 2); /*0xffc81194*/
}
else
{
*(_WORD *)(a5 + 75) += MemChipFunc2BA2( /*0xffc811ac*/
(int)__return_address,
n4,
*(int *)((char *)p_n6094961 + 18),
*((unsigned __int16 *)p_n6094961 + 5));
v11 = *((unsigned __int16 *)p_n6094961 + 6); /*0xffc811b0*/
}
*(_WORD *)(a5 + 77) += MemChipFunc2BA2((int)__return_address, n4, *(int *)((char *)p_n6094961 + 18), v11); /*0xffc811c2*/
if ( n2a ) /*0xffc811ce*/
{
if ( v7 < 0 ) /*0xffc811d6*/
{
v12 = *(_BYTE *)(v21 + CpuCount + 105) == 12; /*0xffc811e0*/
v13 = *((unsigned __int16 *)p_n6094961 + 3); /*0xffc811e5*/
goto LABEL_19; /*0xffc811e5*/
}
v15 = *((unsigned __int16 *)p_n6094961 + 3); /*0xffc81212*/
}
else
{
if ( v7 < 0 ) /*0xffc8121e*/
{
v12 = *(_BYTE *)(v21 + CpuCount + 105) == 12; /*0xffc81228*/
v13 = *((unsigned __int16 *)p_n6094961 + 7); /*0xffc8122d*/
LABEL_19:
v19 = *(int *)((char *)p_n6094961 + 18); /*0xffc811e9*/
if ( v12 ) /*0xffc811f2*/
v14 = 13 * MemChipFunc2BA2((int)__return_address, n4, v19, v13); /*0xffc811fc*/
else
v14 = 12 * (MemChipFunc2BA2((int)__return_address, n4, v19, v13) + 2); /*0xffc8120d*/
goto LABEL_27; /*0xffc811ff*/
}
v15 = *((unsigned __int16 *)p_n6094961 + 7); /*0xffc81233*/
}
v14 = 10 * MemChipFunc2BA2((int)__return_address, n4, *(int *)((char *)p_n6094961 + 18), v15); /*0xffc81248*/
LABEL_27:
*(_WORD *)(a5 + 79) += v14; /*0xffc8124b*/
if ( n2a ) /*0xffc8125b*/
v16 = *((_WORD *)p_n6094961 + 4); /*0xffc8125d*/
else
v16 = *((_WORD *)p_n6094961 + 8); /*0xffc81263*/
*(_WORD *)&a5[2 * n6 + 81] = v16; /*0xffc8126c*/
*(_WORD *)&a5[2 * v20 + 13] = *(_WORD *)p_n6094961; /*0xffc81274*/
if ( (*a5 & 2) != 0 ) /*0xffc8127c*/
v17 = *((unsigned __int16 *)p_n6094961 + 3); /*0xffc8127e*/
else
v17 = *((unsigned __int16 *)p_n6094961 + 7); /*0xffc81284*/
result = MemChipFunc2BA2((int)__return_address, n4, *(int *)((char *)p_n6094961 + 18), v17); /*0xffc81291*/
*(_WORD *)&a5[2 * v20 + 43] = result; /*0xffc81299*/
return result; /*0xffc8129e*/
}
// Function: MemChipFunc12A6 @ 0xffc812a6 (0x74 bytes)
// Index: 1012/2560
int __cdecl MemChipFunc12A6(unsigned __int8 *__return_address, unsigned __int8 n2)
{
unsigned __int8 n2_1; // cl
unsigned __int8 *__return_address_1; // edi
int result; // eax
unsigned __int8 *v5; // esi
unsigned __int8 n6; // bl
int v7; // eax
n2_1 = n2; /*0xffc812a6*/
__return_address_1 = __return_address; /*0xffc812ae*/
result = 48704 * n2; /*0xffc812ba*/
v5 = &__return_address[result + 258722]; /*0xffc812c6*/
n6 = 0; /*0xffc812c8*/
LOBYTE(__return_address) = 0; /*0xffc812ca*/
do /*0xffc81313*/
{
if ( *v5 ) /*0xffc812ce*/
{
if ( v5[6716] ) /*0xffc812d3*/
{
v7 = MiscConfigCheck(__return_address_1, n2_1, (unsigned __int8)__return_address, 184567328); /*0xffc812e3*/
result = MiscIoCheck(__return_address_1, n2, (int)__return_address, 0xB004620u, v7 | 0x200); /*0xffc812f8*/
n2_1 = n2; /*0xffc812fd*/
}
}
++n6; /*0xffc81304*/
v5 += 7688; /*0xffc81306*/
LOBYTE(__return_address) = n6; /*0xffc8130c*/
}
while ( n6 < 6u ); /*0xffc81313*/
return result; /*0xffc81315*/
}
// Function: MemChipFunc131A @ 0xffc8131a (0x188 bytes)
// Index: 1013/2560
char __cdecl MemChipFunc131A(unsigned __int8 *__return_address, unsigned __int8 n2)
{
unsigned int v3; // esi
unsigned int v4; // esi
unsigned __int8 n2a_1; // al
int v6; // ecx
int v7; // eax
unsigned int v8; // esi
char result; // al
unsigned int v10; // [esp+10h] [ebp-8h]
int v11; // [esp+14h] [ebp-4h]
char n2a; // [esp+20h] [ebp+8h]
v3 = MiscConfigCheck(__return_address, n2, 0, 67453060) & 0xFFFC0000 | 0x3F7A0; /*0xffc8133f*/
MiscIoCheck(__return_address, n2, 0, 0x4054084u, v3); /*0xffc8134b*/
v11 = 48704 * n2; /*0xffc8135c*/
if ( __return_address[v11 + 307392] == 1 ) /*0xffc81368*/
MiscIoCheck(__return_address, n2, 0, 0x4054088u, v3); /*0xffc81374*/
v4 = 0; /*0xffc81383*/
v10 = CpuIoRead((int)__return_address, __return_address[453660], 0, 318914724) & 0xFFFFFF20; /*0xffc8139a*/
n2a_1 = 0; /*0xffc8139e*/
n2a = 0; /*0xffc813a0*/
if ( __return_address[244317] ) /*0xffc813a4*/
{
v6 = 50813 * n2; /*0xffc813b0*/
do /*0xffc81464*/
{
if ( __return_address[v6 + 10189 + n2a_1] ) /*0xffc813bf*/
{
if ( n2a ) /*0xffc813d2*/
v7 = CpuIoRead((int)__return_address, n2, 0, 67453088); /*0xffc813e4*/
else
v7 = CpuIoRead((int)__return_address, n2, 0, 67453084); /*0xffc813d9*/
v4 = v7; /*0xffc813ec*/
if ( (__return_address[157] & 8) != 0 ) /*0xffc813f5*/
{
if ( __return_address[n2 + 257244] != 1 || (_BYTE)v10 ) /*0xffc81406*/
v8 = v7 | 0x100000; /*0xffc81410*/
else
v8 = v7 & 0xFFEFFFFF; /*0xffc81408*/
v4 = v8 & 0xFFFF87FF | 0x1800; /*0xffc8141c*/
}
MemChipFunc2BE4(__return_address, n2, n2a); /*0xffc81428*/
if ( n2a ) /*0xffc81436*/
CpuIoCfgWrite((int)__return_address, n2, 0, 67453088, v4); /*0xffc81448*/
else
CpuIoCfgWrite((int)__return_address, n2, 0, 67453084, v4); /*0xffc8143d*/
v6 = 50813 * n2; /*0xffc8144d*/
}
n2a_1 = n2a + 1; /*0xffc81458*/
n2a = n2a_1; /*0xffc8145a*/
}
while ( n2a_1 < __return_address[244317] ); /*0xffc81464*/
}
result = v11; /*0xffc8146a*/
if ( __return_address[v11 + 307392] == 1 ) /*0xffc81476*/
{
result = KtiFuncE78((int)__return_address, 0, 3u); /*0xffc8147d*/
if ( result ) /*0xffc81487*/
return CpuIoCfgWrite((int)__return_address, n2, 0, 67453092, v4); /*0xffc81493*/
}
return result; /*0xffc8149b*/
}
// Function: MemInitChipMain @ 0xffc814a2 (0x1538 bytes)
// Index: 1014/2560
int __usercall MemInitChipMain@<eax>(int a1@<eax>, unsigned __int8 *__return_address)
{
int n4_1; // ebp
int v3; // esi
int v4; // edi
unsigned __int8 n6_1; // dl
char *v6; // ecx
int n4_2; // esi
unsigned __int8 v8; // cl
unsigned __int8 v9; // al
unsigned __int8 *v10; // edi
int n2_1; // eax
int v12; // eax
int v13; // eax
_BYTE *SocketInfo_1; // ecx
unsigned int v15; // esi
unsigned __int8 n6_2; // al
_BYTE *CpuCount; // eax
unsigned int n184566080; // edi
int n2_3; // ecx
int v20; // eax
unsigned __int8 v21; // cl
int v22; // eax
int v23; // esi
unsigned int v24; // eax
int v25; // esi
unsigned int v26; // esi
int v27; // eax
char v28; // dl
unsigned __int16 v29; // cx
char *v30; // eax
char v31; // al
unsigned __int8 v32; // cl
unsigned int n16; // eax
unsigned int v34; // eax
unsigned int v35; // eax
unsigned int v36; // eax
unsigned int n2_11; // eax
unsigned __int16 v38; // ax
unsigned int v39; // eax
... [41851 chars total]
// Function: MemChipFunc29DA @ 0xffc829da (0x1c8 bytes)
// Index: 1015/2560
int __cdecl MemChipFunc29DA(unsigned __int8 *a1)
{
unsigned __int8 *v1; // edi
unsigned __int8 v2; // bp
int v3; // eax
unsigned __int8 n2; // cl
unsigned __int8 n6; // bl
int v6; // eax
int n184566064; // eax
unsigned int v8; // esi
int v9; // eax
int v10; // eax
__int16 v11; // ax
int v12; // eax
bool v13; // zf
unsigned int v15; // [esp-14h] [ebp-30h]
unsigned int v16; // [esp-14h] [ebp-30h]
unsigned int n184566064_1; // [esp+10h] [ebp-Ch]
unsigned int n184557968; // [esp+14h] [ebp-8h]
int n2_1; // [esp+18h] [ebp-4h]
char n2_2; // [esp+20h] [ebp+4h]
v1 = a1; /*0xffc829e1*/
v2 = a1[9402]; /*0xffc829f7*/
v3 = MiscConfigCheck(a1, v2, 0, 67453060); /*0xffc829fd*/
MiscIoCheck(a1, v2, 0, 0x4054084u, v3 & 0xFFFC0000 | 0x3E800); /*0xffc82a12*/
n2 = 0; /*0xffc82a17*/
n2_2 = 0; /*0xffc82a1f*/
do /*0xffc82a71*/
{
n6 = 0; /*0xffc82a2c*/
if ( v1[50813 * v2 + 10189 + n2] ) /*0xffc82a30*/
{
if ( n2 ) /*0xffc82a3b*/
{
v16 = CpuIoRead((int)v1, v2, 0, 67453088) & 0xFFEFFFFF; /*0xffc82b97*/
CpuIoCfgWrite((int)v1, v2, 0, 67453088, v16); /*0xffc82b9d*/
}
else
{
v15 = CpuIoRead((int)v1, v2, 0, 67453084) & 0xFFEFFFFF; /*0xffc82a53*/
CpuIoCfgWrite((int)v1, v2, 0, 67453084, v15); /*0xffc82a5c*/
}
n2 = n2_2; /*0xffc82a61*/
}
n2_2 = ++n2; /*0xffc82a6a*/
}
while ( n2 < 2u ); /*0xffc82a71*/
LOBYTE(a1) = 0; /*0xffc82a73*/
do /*0xffc82b75*/
{
v6 = MiscConfigCheck(v1, v2, (unsigned __int8)a1, 184566024); /*0xffc82a82*/
MiscIoCheck(v1, v2, (int)a1, 0xB004108u, v6 & 0x77FF7FFF | 0x8000); /*0xffc82a9d*/
n184566064 = 184566064; /*0xffc82aa2*/
n184557968 = 184557968; /*0xffc82aa7*/
n184566064_1 = 184566064; /*0xffc82ab2*/
n2_1 = 2; /*0xffc82ab6*/
do /*0xffc82b66*/
{
v8 = n184566064 - 16; /*0xffc82abe*/
v9 = MiscConfigCheck(v1, v2, (unsigned __int8)a1, n184566064 - 16); /*0xffc82ac8*/
MiscIoCheck(v1, v2, (int)a1, v8, v9 & 0xFF000000 | 0x5F5A55); /*0xffc82ae0*/
v10 = MiscConfigCheck(v1, v2, (unsigned __int8)a1, n184566064_1); /*0xffc82aec*/
MiscIoCheck(v1, v2, (int)a1, n184566064_1, v10 & 0xFF000000 | 0xFFF); /*0xffc82b03*/
v11 = MiscConfigCheck(v1, v2, (unsigned __int8)a1, n184557968); /*0xffc82b12*/
MiscIoCheck(v1, v2, (int)a1, n184557968, v11 & 0x7FFF); /*0xffc82b24*/
v12 = MiscConfigCheck(v1, v2, (unsigned __int8)a1, n184566064_1 + 16); /*0xffc82b37*/
MiscIoCheck(v1, v2, (int)a1, n184566064_1 + 16, v12 & 0xFFFFDFF0); /*0xffc82b49*/
n184557968 += 2; /*0xffc82b55*/
n184566064 = n184566064_1 + 4; /*0xffc82b5a*/
v13 = n2_1-- == 1; /*0xffc82b5d*/
n184566064_1 += 4; /*0xffc82b62*/
}
while ( !v13 ); /*0xffc82b66*/
LOBYTE(a1) = ++n6; /*0xffc82b6e*/
}
while ( n6 < 6u ); /*0xffc82b75*/
return 0; /*0xffc82b7b*/
}
// Function: MemChipFunc2BA2 @ 0xffc82ba2 (0x42 bytes)
// Index: 1016/2560
int __cdecl MemChipFunc2BA2(int a1, unsigned __int8 a2, int a3, int a4)
{
unsigned int v4; // edx
unsigned int n0xA_1; // eax
unsigned __int8 n0xA; // cl
v4 = 0; /*0xffc82ba7*/
n0xA_1 = *(unsigned __int8 *)(48704 * a2 + a1 + 304925); /*0xffc82bb3*/
n0xA = *(_BYTE *)(a1 + 162); /*0xffc82bbb*/
if ( n0xA >= 0xAu && n0xA_1 > n0xA ) /*0xffc82bcb*/
v4 = a3 * (n0xA_1 - n0xA) / 0x2710; /*0xffc82bdb*/
return v4 + a4; /*0xffc82be3*/
}
// Function: MemChipFunc2BE4 @ 0xffc82be4 (0x1b1 bytes)
// Index: 1017/2560
int __cdecl MemChipFunc2BE4(unsigned __int8 *__return_address, unsigned __int8 n2, unsigned __int8 n2a)
{
unsigned __int8 n2_1; // di
int v4; // eax
unsigned __int8 n2a_1; // dh
int v6; // esi
unsigned __int8 n3; // dl
_BYTE *v8; // ecx
_BYTE *v9; // eax
bool v10; // zf
int CpuCount; // eax
unsigned __int8 v12; // dl
unsigned __int8 n3_1; // cl
unsigned int v14; // eax
unsigned __int8 *__return_address_1; // ebp
_BYTE *v16; // eax
char v17; // bp
int n2_2; // ecx
unsigned __int8 n3_2; // [esp+Fh] [ebp-19h]
unsigned __int8 n3_3; // [esp+Fh] [ebp-19h]
_BYTE *v22; // [esp+10h] [ebp-18h]
_BYTE *v23; // [esp+10h] [ebp-18h]
_BYTE *v24; // [esp+14h] [ebp-14h]
unsigned int v25; // [esp+14h] [ebp-14h]
_BYTE *v26; // [esp+18h] [ebp-10h]
int SocketInfo; // [esp+1Ch] [ebp-Ch]
int n2_3; // [esp+1Ch] [ebp-Ch]
_BYTE v29[8]; // [esp+20h] [ebp-8h] BYREF
n2_1 = n2; /*0xffc82bee*/
SocketInfo = GetSocketInfo((int)__return_address, n2); /*0xffc82c00*/
if ( n2a ) /*0xffc82c04*/
v4 = CpuIoRead((int)__return_address, n2, 0, 67453080); /*0xffc82c16*/
else
v4 = CpuIoRead((int)__return_address, n2, 0, 67453076); /*0xffc82c0b*/
n2a_1 = n2a; /*0xffc82c1b*/
v6 = v4; /*0xffc82c1f*/
n3 = 0; /*0xffc82c24*/
n3_2 = 0; /*0xffc82c32*/
v8 = (_BYTE *)(SocketInfo + 23064 * n2a); /*0xffc82c36*/
v22 = v8; /*0xffc82c3a*/
v9 = &v29[3 * n2a]; /*0xffc82c3e*/
v26 = v9; /*0xffc82c42*/
v24 = v9; /*0xffc82c46*/
do /*0xffc82cbe*/
{
v10 = *v8 == 1; /*0xffc82c4a*/
*v9 = 0; /*0xffc82c4d*/
if ( !v10 ) /*0xffc82c50*/
{
CpuCount = GetCpuCount((int)__return_address, n2, n3 + 3 * n2a_1); /*0xffc82c60*/
v12 = 0; /*0xffc82c68*/
while ( !*(_BYTE *)(1379 * v12 + CpuCount + 107) ) /*0xffc82c78*/
{
if ( ++v12 >= 2u ) /*0xffc82c7f*/
{
v9 = v24; /*0xffc82c81*/
v8 = v22; /*0xffc82c85*/
n3 = n3_2; /*0xffc82c89*/
n2a_1 = n2a; /*0xffc82c8d*/
goto LABEL_12; /*0xffc82c91*/
}
}
v9 = v24; /*0xffc82c93*/
v8 = v22; /*0xffc82c97*/
n3 = n3_2; /*0xffc82c9b*/
n2a_1 = n2a; /*0xffc82c9f*/
}
*v9 = 1; /*0xffc82ca3*/
LABEL_12:
++n3; /*0xffc82ca6*/
v8 += 7688; /*0xffc82ca8*/
++v9; /*0xffc82cae*/
n3_2 = n3; /*0xffc82caf*/
v22 = v8; /*0xffc82cb3*/
v24 = v9; /*0xffc82cb7*/
}
while ( n3 < 3u ); /*0xffc82cbe*/
n3_1 = 0; /*0xffc82cc0*/
v14 = 0; /*0xffc82cc2*/
n3_3 = 0; /*0xffc82cc4*/
v25 = 0; /*0xffc82cc8*/
do /*0xffc82d6b*/
{
__return_address_1 = __return_address; /*0xffc82cd4*/
if ( *v26 ) /*0xffc82cd0*/
{
v16 = (_BYTE *)GetCpuCount((int)__return_address, n2_1, n3_1 + 3 * n2a_1); /*0xffc82ce8*/
v23 = v16; /*0xffc82cf4*/
v17 = 0; /*0xffc82cf8*/
n2_2 = 2; /*0xffc82cfc*/
n2_3 = 2; /*0xffc82cfd*/
do /*0xffc82d43*/
{
if ( *v16 || v16[107] ) /*0xffc82d06*/
{
n2_2 = n2_3; /*0xffc82d28*/
v6 ^= (unsigned __int8)(v6 ^ (v6 | (1 << (v17 + 2 * (v25 % 3))))); /*0xffc82d2c*/
v16 = v23; /*0xffc82d2e*/
}
v16 += 1379; /*0xffc82d32*/
++v17; /*0xffc82d37*/
--n2_2; /*0xffc82d38*/
v23 = v16; /*0xffc82d3b*/
n2_3 = n2_2; /*0xffc82d3f*/
}
while ( n2_2 ); /*0xffc82d43*/
n2_1 = n2; /*0xffc82d45*/
__return_address_1 = __return_address; /*0xffc82d49*/
n3_1 = n3_3; /*0xffc82d4d*/
v14 = v25; /*0xffc82d51*/
}
n2a_1 = n2a; /*0xffc82d55*/
++n3_1; /*0xffc82d59*/
++v14; /*0xffc82d5b*/
n3_3 = n3_1; /*0xffc82d5c*/
++v26; /*0xffc82d60*/
v25 = v14; /*0xffc82d64*/
}
while ( n3_1 < 3u ); /*0xffc82d6b*/
if ( n2a ) /*0xffc82d74*/
return CpuIoCfgWrite((int)__return_address_1, n2_1, 0, 67453080, v6); /*0xffc82d86*/
else
return CpuIoCfgWrite((int)__return_address_1, n2_1, 0, 67453076, v6); /*0xffc82d7b*/
}
// Function: MemChipFunc2D95 @ 0xffc82d95 (0xf1 bytes)
// Index: 1018/2560
unsigned __int8 __cdecl MemChipFunc2D95(unsigned __int8 *n4, int a2)
{
unsigned __int8 n4_2; // al
_BYTE *v4; // ebx
unsigned __int8 *n4a_1; // ecx
unsigned __int8 *v6; // edi
int v7; // eax
unsigned __int8 result; // al
int v9; // [esp-8h] [ebp-1Ch]
int v10; // [esp-4h] [ebp-18h]
int n4_1; // [esp+10h] [ebp-4h]
unsigned __int8 *n4a; // [esp+18h] [ebp+4h]
n4_2 = 0; /*0xffc82d9b*/
v4 = (_BYTE *)(a2 + 8); /*0xffc82da3*/
LOBYTE(n4_1) = 0; /*0xffc82da7*/
n4a_1 = n4 + 258689; /*0xffc82db0*/
v6 = n4 + 60991; /*0xffc82db6*/
n4a = n4 + 258689; /*0xffc82dbc*/
do /*0xffc82e6d*/
{
if ( *n4a_1 ) /*0xffc82dc0*/
{
if ( *v4 == 1 ) /*0xffc82dd0*/
{
*((_DWORD *)v6 - 1) = *((_DWORD *)v4 - 2) << 10; /*0xffc82dd8*/
*(_DWORD *)v6 = *((_DWORD *)v4 - 1); /*0xffc82dde*/
if ( n4[244313] == 1 ) /*0xffc82de7*/
{
v7 = MemChipFn_FFC8E778((int)n4, n4_1); /*0xffc82deb*/
*((_DWORD *)v6 + 1) = v7; /*0xffc82df6*/
DebugPrint((int)n4, 3, n4_1, 255, 255, 255, 255, 255, "Total NM size:0x%x\n", v7); /*0xffc82e07*/
}
v10 = *(_DWORD *)v6; /*0xffc82e14*/
v9 = *((_DWORD *)v6 - 1); /*0xffc82e18*/
*(v6 - 5) = *v4; /*0xffc82e1b*/
DebugPrint((int)n4, 3, n4_1, 255, 255, 255, 255, 255, "SktSkuLimit:0x%x; SktTotMemMapSPA:0x%x\n", v9, v10); /*0xffc82e2c*/
}
MemChipFuncB6AB(n4, n4_1); /*0xffc82e36*/
MemChipFunc9D76(n4, n4_1); /*0xffc82e3d*/
n4_2 = n4_1; /*0xffc82e42*/
n4a_1 = n4a; /*0xffc82e49*/
}
++n4_2; /*0xffc82e52*/
n4a_1 += 48704; /*0xffc82e54*/
v4 += 24; /*0xffc82e5a*/
LOBYTE(n4_1) = n4_2; /*0xffc82e5d*/
v6 += 50813; /*0xffc82e61*/
n4a = n4a_1; /*0xffc82e67*/
}
while ( n4_2 < 4u ); /*0xffc82e6d*/
result = *(_BYTE *)(a2 + 96); /*0xffc82e78*/
n4[244430] = result; /*0xffc82e7b*/
return result; /*0xffc82e77*/
}
// Function: MemChipFunc2E86 @ 0xffc82e86 (0x28a bytes)
// Index: 1019/2560
int __cdecl MemChipFunc2E86(int a1, int a2, int a3, unsigned __int16 n16)
{
unsigned __int8 n4; // bh
int v5; // esi
int v6; // eax
unsigned __int8 n0x18; // bl
unsigned int v8; // ebp
unsigned __int8 v9; // cl
int v10; // edx
int v11; // eax
_BOOL2 v12; // cx
_BOOL2 v13; // ax
char v14; // dl
bool v15; // cl
int v16; // eax
int n0x18_1; // ebp
int v18; // edx
unsigned __int8 v19; // bl
int v20; // ebp
int v21; // ecx
unsigned __int8 v22; // dl
int v23; // ecx
unsigned __int8 v25; // [esp+10h] [ebp-Ch]
unsigned __int8 v26; // [esp+11h] [ebp-Bh]
char v27; // [esp+12h] [ebp-Ah]
unsigned __int8 v28; // [esp+13h] [ebp-9h]
char v29; // [esp+13h] [ebp-9h]
int v30; // [esp+14h] [ebp-8h]
int n0x18_2; // [esp+18h] [ebp-4h]
n4 = 0; /*0xffc82e8c*/
LOBYTE(v30) = 0; /*0xffc82e93*/
while ( 1 ) /*0xffc82ea0*/
{
v25 = 0; /*0xffc82ea0*/
if ( !*(_BYTE *)(48704 * n4 + a1 + 258689) ) /*0xffc82ea5*/
goto LABEL_40; /*0xffc82ea5*/
v5 = 50813 * n4 + a1 + 10189; /*0xffc82ebf*/
v28 = *(_BYTE *)(a1 + 244317); /*0xffc82eca*/
v6 = n4 * v28; /*0xffc82ed0*/
if ( *(_DWORD *)(a2 + 4 * v6) || *(_DWORD *)(a2 + 4 * v6 + 4) ) /*0xffc82ee1*/
goto LABEL_40; /*0xffc82ee6*/
n0x18 = MemChipFunc978E(a1, v30); /*0xffc82ef6*/
if ( n0x18 >= 0x18u ) /*0xffc82efd*/
break; /*0xffc82efd*/
v8 = 4 * v28; /*0xffc82f05*/
v9 = 0; /*0xffc82f09*/
v27 = 1; /*0xffc82f0b*/
v26 = 0; /*0xffc82f0f*/
if ( v8 ) /*0xffc82f15*/
{
while ( n0x18 ) /*0xffc82f19*/
{
v10 = v9; /*0xffc82f1b*/
v11 = v9 + 8 * n0x18; /*0xffc82f21*/
v12 = *(_BYTE *)(v11 + v5 + 49058) || *(_BYTE *)(v11 + v5 + 49059); /*0xffc82f3e*/
v13 = *(_DWORD *)(a2 + 4 * v10) || *(_DWORD *)(a2 + 4 * v10 + 4); /*0xffc82f5c*/
if ( v12 ) /*0xffc82f61*/
{
if ( !v13 ) /*0xffc82fd7*/
{
LABEL_18:
v27 = 0; /*0xffc82f68*/
break; /*0xffc82f6a*/
}
++v25; /*0xffc82fde*/
}
else if ( v13 ) /*0xffc82f66*/
{
goto LABEL_18; /*0xffc82f66*/
}
v9 = v28 + v26; /*0xffc82fe6*/
v26 += v28; /*0xffc82fed*/
if ( v26 >= v8 ) /*0xffc82ff3*/
break; /*0xffc82ff3*/
}
}
v14 = MemChipFunc9D15(a1, n16); /*0xffc82f6e*/
v15 = v27; /*0xffc82f7e*/
v29 = v14; /*0xffc82f83*/
if ( v27 == 1 && v25 > 1u ) /*0xffc82f8f*/
{
if ( !n0x18 ) /*0xffc82f93*/
goto LABEL_31; /*0xffc82f93*/
v15 = v14 == *(_BYTE *)(19 * n0x18 + v5 + 48609); /*0xffc82fa7*/
}
if ( !n0x18 || !v15 || (v16 = 19 * n0x18, *(_BYTE *)(v16 + v5 + 48605)) ) /*0xffc82fba*/
{
LABEL_31:
n0x18_1 = n0x18; /*0xffc82ffe*/
v18 = 19 * n0x18; /*0xffc83003*/
v19 = 0; /*0xffc83007*/
n0x18_2 = n0x18_1; /*0xffc83009*/
*(_BYTE *)(v18 + v5 + 48610) = 1; /*0xffc8300d*/
*(_DWORD *)(v18 + v5 + 48614) = a3; /*0xffc83018*/
*(_BYTE *)(v18 + v5 + 48618) = 0; /*0xffc8301f*/
if ( *(_BYTE *)(a1 + 244317) ) /*0xffc83027*/
{
v20 = 19 * (n0x18_1 + 2559); /*0xffc83035*/
do /*0xffc83055*/
{
v21 = v19++; /*0xffc83038*/
*(_BYTE *)(v21 + v20 + v5) = 0; /*0xffc83040*/
*(_BYTE *)(v21 + v18 + v5 + 48619) = 0; /*0xffc83047*/
}
while ( v19 < *(_BYTE *)(a1 + 244317) ); /*0xffc83055*/
n0x18_1 = n0x18_2; /*0xffc83057*/
}
*(_WORD *)(v18 + v5 + 48623) = 0; /*0xffc8305d*/
*(_WORD *)(v18 + v5 + 48611) = 0; /*0xffc83067*/
*(_BYTE *)(v18 + v5 + 48613) = 0; /*0xffc8306f*/
*(_BYTE *)(v18 + v5 + 48626) = 0; /*0xffc83076*/
*(_BYTE *)(v18 + v5 + 48628) = v29; /*0xffc83081*/
v22 = 0; /*0xffc83088*/
if ( 4 * *(unsigned __int8 *)(a1 + 244317) ) /*0xffc83091*/
{
v23 = 0; /*0xffc83098*/
do /*0xffc830c0*/
{
if ( *(_DWORD *)(a2 + 4 * v23) ) /*0xffc8309e*/
*(_BYTE *)(v23 + 8 * n0x18_1 + v5 + 49066) = 1; /*0xffc830a7*/
v23 = ++v22; /*0xffc830b8*/
}
while ( v22 < 4 * (unsigned int)*(unsigned __int8 *)(a1 + 244317) ); /*0xffc830c0*/
}
goto LABEL_40; /*0xffc830c0*/
}
*(_DWORD *)(v16 + v5 + 48595) = a3; /*0xffc82fc8*/
LABEL_40:
LOBYTE(v30) = ++n4; /*0xffc830c4*/
if ( n4 >= 4u ) /*0xffc830cb*/
return 0; /*0xffc830da*/
}
DebugPrint(a1, 3, 255, 255, 255, 255, 255, 255, "SAD rules exceeds %d\n", 24); /*0xffc830f0*/
KtiFunc211E(a1, 14, 1, v30, 255, 255, 255); /*0xffc83103*/
return 33; /*0xffc830d3*/
}
// Function: MemChipFunc3110 @ 0xffc83110 (0x8e bytes)
// Index: 1020/2560
int __cdecl MemChipFunc3110(int a1, int a2, int a3, int a4, int a5)
{
if ( !(unsigned __int8)MemChipFunc43CC(a1, a2, a3, a4, a5) ) /*0xffc83124*/
return 0; /*0xffc8312e*/
KtiFunc77BE(a1); /*0xffc83135*/
if ( *(_BYTE *)(a1 + 244313) ) /*0xffc8313a*/
{
DebugPrint(a1, 3, 255, 255, 255, 255, 255, 255, "2LM Mode - SKU Limit violation - switching to 1LM mode\n"); /*0xffc83180*/
*(_BYTE *)(a1 + 244313) = 0; /*0xffc83188*/
MemChipFuncCCB3(a1, a2); /*0xffc83190*/
}
else
{
DebugPrint(a1, 3, 255, 255, 255, 255, 255, 255, "1LM Mode - SKU Limit violation - mapping out DIMMs \n"); /*0xffc83157*/
if ( *(_BYTE *)(a1 + 246424) >= 9u && *(_QWORD *)(a1 + 112) ) /*0xffc83168*/
return 0; /*0xffc83132*/
}
return 1; /*0xffc8319b*/
}
// Function: MemChipFunc319E @ 0xffc8319e (0x158 bytes)
// Index: 1021/2560
unsigned __int8 __cdecl MemChipFunc319E(int __return_address, int buf, unsigned __int8 n8)
{
unsigned __int8 n8_1; // bl
char v4; // bh
int __return_address_1; // edi
unsigned __int8 v6; // dl
unsigned int v7; // ecx
unsigned __int8 v8; // al
unsigned __int8 v9; // bl
_BYTE *v10; // edx
unsigned __int8 n4_2; // bh
char n4; // cl
_BYTE *v13; // ebp
int n4_1; // eax
unsigned __int8 v15; // ch
unsigned __int8 v16; // dl
unsigned int n0xFFFF_1; // edi
unsigned int *v18; // eax
char v20; // [esp+Dh] [ebp-Bh]
unsigned __int8 n4_4; // [esp+Eh] [ebp-Ah]
int n0xFFFF; // [esp+10h] [ebp-8h]
int n4_3; // [esp+14h] [ebp-4h]
n8_1 = n8; /*0xffc831a2*/
v4 = 0; /*0xffc831a6*/
n4_4 = 0; /*0xffc831ad*/
v20 = 0; /*0xffc831b2*/
if ( n8 ) /*0xffc831ba*/
{
do /*0xffc831d5*/
{
if ( RmtFunc6E93(n8_1) && n8_1 <= 8u ) /*0xffc831cd*/
break; /*0xffc831cd*/
--n8_1; /*0xffc831cf*/
++v4; /*0xffc831d1*/
}
while ( n8_1 ); /*0xffc831d5*/
v20 = v4; /*0xffc831d7*/
n8 = n8_1; /*0xffc831db*/
}
__return_address_1 = __return_address; /*0xffc831df*/
v6 = 0; /*0xffc831e3*/
if ( 4 * *(unsigned __int8 *)(__return_address + 244317) ) /*0xffc831f0*/
{
while ( v4 ) /*0xffc831f9*/
{
if ( *(_DWORD *)(buf + 4 * v6) ) /*0xffc83202*/
{
v7 = *(_DWORD *)(buf + 4 * v6 + 4); /*0xffc83208*/
if ( v7 ) /*0xffc8320e*/
{
if ( *(_DWORD *)(buf + 4 * v6) >= v7 ) /*0xffc83213*/
*(_DWORD *)(buf + 4 * v6 + 4) = 0; /*0xffc8321b*/
else
*(_DWORD *)(buf + 4 * v6) = 0; /*0xffc83215*/
v20 = --v4; /*0xffc83222*/
}
}
v8 = *(_BYTE *)(__return_address + 244317); /*0xffc83226*/
v6 += v8; /*0xffc8322c*/
if ( v6 >= 4 * (unsigned int)v8 ) /*0xffc83239*/
goto LABEL_15; /*0xffc83239*/
}
}
else
{
LABEL_15:
if ( v4 ) /*0xffc8323d*/
{
v9 = 0; /*0xffc83243*/
v10 = (_BYTE *)(__return_address + 453505); /*0xffc83247*/
do /*0xffc832e2*/
{
n4_2 = n4_4; /*0xffc8324e*/
n4 = 4; /*0xffc83252*/
n0xFFFF = 0xFFFF; /*0xffc83256*/
v13 = v10; /*0xffc8325e*/
n4_1 = 4; /*0xffc83260*/
do /*0xffc832b9*/
{
--n4; /*0xffc83261*/
v13 -= 48704; /*0xffc83263*/
n4_3 = --n4_1; /*0xffc8326e*/
if ( *v13 ) /*0xffc8326a*/
{
v15 = *(_BYTE *)(__return_address_1 + 244317); /*0xffc83274*/
v16 = 0; /*0xffc8327a*/
if ( v15 ) /*0xffc8327e*/
{
n0xFFFF_1 = n0xFFFF; /*0xffc83280*/
v18 = (unsigned int *)(buf + 4 * n4_1 * v15); /*0xffc8328c*/
do /*0xffc832a5*/
{
if ( *v18 && n0xFFFF_1 > *v18 ) /*0xffc83296*/
{
n0xFFFF_1 = *v18; /*0xffc83298*/
v9 = v16; /*0xffc8329a*/
n4_2 = n4; /*0xffc8329c*/
}
++v16; /*0xffc8329e*/
++v18; /*0xffc832a0*/
}
while ( v16 < v15 ); /*0xffc832a5*/
n4_1 = n4_3; /*0xffc832a7*/
n0xFFFF = n0xFFFF_1; /*0xffc832ab*/
__return_address_1 = __return_address; /*0xffc832af*/
n4_4 = n4_2; /*0xffc832b3*/
}
}
}
while ( n4 ); /*0xffc832b9*/
*(_DWORD *)(buf + 4 * (v9 + n4_2 * *(unsigned __int8 *)(__return_address_1 + 244317))) = 0; /*0xffc832d1*/
--v20; /*0xffc832d8*/
v10 = (_BYTE *)(__return_address_1 + 453505); /*0xffc832dc*/
}
while ( v20 ); /*0xffc832e2*/
return n8; /*0xffc832e8*/
}
}
return n8_1; /*0xffc832ed*/
}
// Function: MemChipFunc32F6 @ 0xffc832f6 (0x157 bytes)
// Index: 1022/2560
char __cdecl MemChipFunc32F6(_BYTE *n4)
{
unsigned __int8 n4_1; // bl
int v3; // eax
unsigned __int8 n4a_2; // bh
char n4a_1; // al
char v6; // dl
unsigned __int8 v7; // dh
int v8; // edi
int v9; // ecx
bool v10; // zf
char v12; // [esp+13h] [ebp-5h]
int v13; // [esp+14h] [ebp-4h]
char n4a; // [esp+1Ch] [ebp+4h]
n4_1 = 0; /*0xffc83306*/
v12 = 0; /*0xffc83309*/
LOBYTE(v13) = 0; /*0xffc8330d*/
while ( 2 ) /*0xffc83311*/
{
v3 = 48704 * n4_1; /*0xffc83311*/
if ( !n4[v3 + 258689] ) /*0xffc83322*/
goto LABEL_20; /*0xffc83322*/
n4a_2 = n4[244317]; /*0xffc83328*/
n4a_1 = 0; /*0xffc8332e*/
v6 = 0; /*0xffc83330*/
n4a = 0; /*0xffc83332*/
v7 = 0; /*0xffc83336*/
if ( !n4a_2 ) /*0xffc8333a*/
goto LABEL_18; /*0xffc8333a*/
v8 = 50813 * n4_1; /*0xffc8333c*/
while ( 1 ) /*0xffc8334b*/
{
v3 = v8 + v7; /*0xffc8334b*/
v9 = v8 + 768 * v7; /*0xffc8334d*/
if ( n4[v3 + 10189] ) /*0xffc8334f*/
break; /*0xffc8334f*/
++n4a; /*0xffc83359*/
LABEL_13:
if ( ++v7 >= n4a_2 ) /*0xffc83390*/
goto LABEL_16; /*0xffc83390*/
}
LOBYTE(v3) = 0; /*0xffc8335f*/
if ( *(_DWORD *)&n4[v9 + 59462] && !*(_DWORD *)&n4[v9 + 59458] ) /*0xffc8336a*/
v12 = 1; /*0xffc83373*/
if ( *(_DWORD *)&n4[v9 + 59450] && *(_DWORD *)&n4[v9 + 59458] ) /*0xffc83381*/
{
v6 = 1; /*0xffc8338a*/
goto LABEL_13; /*0xffc8338a*/
}
v6 = 0; /*0xffc83394*/
LABEL_16:
if ( v6 ) /*0xffc83398*/
{
LABEL_20:
LOBYTE(v13) = ++n4_1; /*0xffc833bd*/
if ( n4_1 >= 4u ) /*0xffc833c4*/
return v3; /*0xffc833c4*/
continue; /*0xffc833c4*/
}
break;
}
n4a_1 = n4a; /*0xffc8339a*/
LABEL_18:
if ( n4a_2 == n4a_1 ) /*0xffc833a0*/
{
LOBYTE(v3) = DebugPrint((int)n4, 3, v13, 255, 255, 255, 255, 255, "There is NO memory populated in this socket\n"); /*0xffc833b3*/
goto LABEL_20; /*0xffc833b3*/
}
if ( n4[257314] == 1 && !v12 ) /*0xffc833db*/
{
DebugPrint( /*0xffc833ee*/
(int)n4,
3,
v13,
255,
255,
255,
255,
255,
"For 2LM need at least 1 DDR4 and 1 DDRT with volatile size > 0 per populated iMC\n");
KtiFunc1162(n4, 23, 12, v13, 255, 255, 255); /*0xffc833ff*/
}
v10 = n4[1401] == 2; /*0xffc83407*/
n4[244313] = 0; /*0xffc8340e*/
if ( !v10 || n4[257314] )
DebugPrint(
(int)n4,
3,
255,
255,
255,
255,
255,
255,
"***ERROR: 2LM could not be supported in this memory configuration. So Initializing VolMemMode to 1LM.***\n");
LOBYTE(v3) = n4[1394] == 1; /*0xffc8343d*/
n4[244371] = v3; /*0xffc83440*/
return v3; /*0xffc83446*/
}
// Function: MemChipFunc344D @ 0xffc8344d (0x104 bytes)
// Index: 1023/2560
void __cdecl MemChipFunc344D(_BYTE *n4)
{
unsigned __int8 n4_1; // bl
_BYTE *v3; // ebp
unsigned __int8 n4a_1; // bh
unsigned __int8 *v5; // esi
int CpuCount; // eax
unsigned __int8 i; // bl
int v8; // ecx
__int16 v9; // dx
__int16 v10; // dx
__int16 v11; // dx
unsigned __int8 n4_2; // [esp+10h] [ebp-4h]
unsigned __int8 n4a; // [esp+18h] [ebp+4h]
n4_1 = 0; /*0xffc83456*/
n4_2 = 0; /*0xffc83458*/
v3 = n4 + 258689; /*0xffc8345c*/
do /*0xffc83545*/
{
if ( *v3 ) /*0xffc83462*/
{
n4a_1 = 0; /*0xffc83477*/
n4a = 0; /*0xffc8347a*/
v5 = (unsigned __int8 *)(GetSocketInfo((int)n4, n4_2) + 3); /*0xffc8347e*/
do /*0xffc8352c*/
{
if ( *(v5 - 3) ) /*0xffc83481*/
{
CpuCount = GetCpuCount((int)n4, n4_2, n4a); /*0xffc83494*/
for ( i = 0; i < *v5; ++i ) /*0xffc8349e*/
{
v8 = 1379 * i; /*0xffc834a5*/
if ( *(_BYTE *)(v8 + CpuCount + 107) ) /*0xffc834ab*/
{
v9 = *(_WORD *)(v8 + CpuCount + 1329); /*0xffc834b2*/
if ( v9 ) /*0xffc834bd*/
*(_WORD *)(v8 + CpuCount + 1329) = v9 & 0xFFF0; /*0xffc834c5*/
if ( n4[244358] == 1 ) /*0xffc834d4*/
{
v11 = *(_WORD *)(v8 + CpuCount + 1331); /*0xffc834fc*/
if ( v11 ) /*0xffc83507*/
*(_WORD *)(v8 + CpuCount + 1331) = v11 & 0xFFF0; /*0xffc8350f*/
}
else
{
v10 = *(_WORD *)(v8 + CpuCount + 1333); /*0xffc834d6*/
if ( v10 ) /*0xffc834e1*/
{
if ( (n4[1388] & 0x30) == 0 ) /*0xffc834ea*/
*(_WORD *)(v8 + CpuCount + 1333) = v10 & 0xFFF0; /*0xffc834f2*/
}
}
}
}
}
++n4a_1; /*0xffc8351d*/
v5 += 7688; /*0xffc8351f*/
n4a = n4a_1; /*0xffc83525*/
}
while ( n4a_1 < 6u ); /*0xffc8352c*/
n4_1 = n4_2; /*0xffc83532*/
}
++n4_1; /*0xffc83536*/
v3 += 48704; /*0xffc83538*/
n4_2 = n4_1; /*0xffc8353e*/
}
while ( n4_1 < 4u ); /*0xffc83545*/
}
// Function: MemChipFunc3551 @ 0xffc83551 (0x24 bytes)
// Index: 1024/2560
char __cdecl MemChipFunc3551(unsigned __int8 a1)
{
char v1; // dl
char v2; // cl
int n3; // esi
v1 = 0; /*0xffc83558*/
v2 = 0; /*0xffc8355c*/
n3 = 3; /*0xffc8355e*/
do /*0xffc8356e*/
{
if ( ((1 << v2) & a1) != 0 ) /*0xffc83566*/
++v1; /*0xffc83568*/
++v2; /*0xffc8356a*/
--n3; /*0xffc8356b*/
}
while ( n3 ); /*0xffc8356e*/
return v1; /*0xffc83570*/
}
// Function: MemChipFunc3575 @ 0xffc83575 (0x13d bytes)
// Index: 1025/2560
unsigned __int8 __cdecl MemChipFunc3575(int __return_address, unsigned __int8 a2, unsigned __int8 a3, int a4)
{
unsigned __int8 v4; // dh
int __return_address_1; // ebp
char v6; // bl
unsigned __int8 v7; // dl
char v8; // bl
unsigned __int8 v9; // bl
int v10; // eax
unsigned __int8 v11; // cl
int v12; // edi
unsigned __int8 v13; // al
unsigned int v14; // edi
unsigned __int8 v15; // cl
int v16; // edi
int v17; // ebp
int v18; // eax
unsigned __int8 v20; // [esp+13h] [ebp-9h]
unsigned int v21; // [esp+14h] [ebp-8h]
unsigned int v22; // [esp+18h] [ebp-4h]
unsigned __int8 v23; // [esp+28h] [ebp+Ch]
v4 = a3; /*0xffc83575*/
__return_address_1 = __return_address; /*0xffc8357e*/
v6 = 0; /*0xffc83582*/
v7 = 0; /*0xffc83589*/
if ( *(_BYTE *)(__return_address + 9413) != 1 ) /*0xffc83593*/
goto LABEL_7; /*0xffc83593*/
v8 = *(_BYTE *)(__return_address + 1393); /*0xffc83595*/
if ( !v8 ) /*0xffc8359d*/
{
v6 = 0; /*0xffc835d6*/
LABEL_7:
v11 = a2; /*0xffc835d8*/
goto LABEL_8; /*0xffc835d8*/
}
v9 = v8 - 1; /*0xffc835a4*/
v10 = *(_DWORD *)(8077 * v9 + __return_address + 50813 * a2 + 10297); /*0xffc835b7*/
v11 = a2; /*0xffc835be*/
if ( v10 ) /*0xffc835c4*/
{
*(_BYTE *)(a4 + 1) = a2; /*0xffc835c8*/
*(_BYTE *)a4 = v9 - a3; /*0xffc835cb*/
v7 = 1; /*0xffc835cd*/
*(_DWORD *)(a4 + 2) = v10; /*0xffc835cf*/
}
v6 = 0; /*0xffc835d2*/
LABEL_8:
v12 = a3; /*0xffc835dc*/
v13 = v7; /*0xffc835df*/
v23 = v7; /*0xffc835e1*/
v20 = v7; /*0xffc835e5*/
v22 = v4 + 3; /*0xffc835ec*/
do /*0xffc836a2*/
{
if ( v13 != 1 || v12 != *(unsigned __int8 *)(__return_address_1 + 1393) - 1 ) /*0xffc83602*/
{
v14 = *(_DWORD *)(8077 * v12 + __return_address_1 + 50813 * v11 + 10297); /*0xffc83619*/
v21 = v14; /*0xffc83620*/
if ( v14 ) /*0xffc83626*/
{
v15 = v23; /*0xffc83628*/
if ( v23 < v7 ) /*0xffc8362e*/
{
do /*0xffc83640*/
{
if ( *(_DWORD *)(6 * v15 + a4 + 2) < v14 ) /*0xffc8363a*/
break; /*0xffc8363a*/
++v15; /*0xffc8363c*/
}
while ( v15 < v7 ); /*0xffc83640*/
if ( v15 < v7 ) /*0xffc83644*/
{
v16 = a4 + 6 * v7; /*0xffc83652*/
v17 = (unsigned __int8)(v7 - v15); /*0xffc83656*/
do /*0xffc8366c*/
{
*(_DWORD *)v16 = *(_DWORD *)(v16 - 6); /*0xffc8365c*/
v16 -= 6; /*0xffc8365e*/
*(_WORD *)(v16 + 10) = *(_WORD *)(v16 + 4); /*0xffc83665*/
--v17; /*0xffc83669*/
}
while ( v17 ); /*0xffc8366c*/
__return_address_1 = __return_address; /*0xffc8366e*/
v14 = v21; /*0xffc83672*/
}
}
v18 = v15; /*0xffc83676*/
v11 = a2; /*0xffc83679*/
v18 *= 6; /*0xffc8367d*/
++v7; /*0xffc83680*/
*(_BYTE *)(v18 + a4) = v6; /*0xffc83682*/
*(_BYTE *)(v18 + a4 + 1) = a2; /*0xffc83685*/
*(_DWORD *)(v18 + a4 + 2) = v14; /*0xffc83689*/
}
else
{
v11 = a2; /*0xffc8368f*/
}
}
v13 = v20; /*0xffc83693*/
v12 = ++v4; /*0xffc83699*/
++v6; /*0xffc8369c*/
}
while ( v4 < v22 ); /*0xffc836a2*/
return v7; /*0xffc836a8*/
}
// Function: MemChipFunc36B2 @ 0xffc836b2 (0x52f bytes)
// Index: 1026/2560
int __cdecl MemChipFunc36B2(_BYTE *n4)
{
char v1; // bh
_DWORD *v2; // ecx
unsigned __int8 v3; // al
int v4; // edi
int v5; // ebp
int n2_1; // edx
bool v7; // al
bool v8; // zf
_BYTE *n4_1; // edi
unsigned __int8 n4_3; // al
char n2_2; // al
int n3_1; // ebx
char v13; // ah
int v14; // edi
char *v15; // ecx
char v16; // bl
int n3_2; // esi
int n2_3; // edx
char v19; // ah
unsigned int v20; // edx
int n2_4; // esi
int n4_2; // ecx
unsigned int v23; // ecx
unsigned int v24; // esi
int v25; // edx
unsigned int n0x10; // esi
char v28; // [esp+11h] [ebp-87h]
char v29; // [esp+12h] [ebp-86h]
char v30; // [esp+13h] [ebp-85h]
char v31; // [esp+14h] [ebp-84h]
char n2_5; // [esp+15h] [ebp-83h]
unsigned __int8 v33; // [esp+16h] [ebp-82h]
char v34; // [esp+17h] [ebp-81h]
int n3; // [esp+18h] [ebp-80h]
int v36; // [esp+1Ch] [ebp-7Ch]
int v37; // [esp+20h] [ebp-78h]
int n3_3; // [esp+24h] [ebp-74h]
unsigned __int8 n2; // [e... [9949 chars total]
// Function: MemChipFunc3BE1 @ 0xffc83be1 (0x1c9 bytes)
// Index: 1027/2560
int __cdecl MemChipFunc3BE1(_BYTE *n4)
{
char v2; // bh
__int16 v3; // bp
unsigned __int8 n4_1; // bl
unsigned __int8 n2_2; // bh
char v6; // ah
char *v7; // ecx
int n3_1; // edi
int n2_1; // edx
char v11; // [esp+13h] [ebp-41h]
char n4a_1; // [esp+14h] [ebp-40h]
char v13; // [esp+15h] [ebp-3Fh]
char v14; // [esp+16h] [ebp-3Eh]
char v15; // [esp+17h] [ebp-3Dh]
unsigned __int8 n2; // [esp+18h] [ebp-3Ch]
int n3; // [esp+1Ch] [ebp-38h]
char v18; // [esp+20h] [ebp-34h] BYREF
char v19; // [esp+21h] [ebp-33h]
char v20; // [esp+28h] [ebp-2Ch] BYREF
char n4a; // [esp+58h] [ebp+4h]
v14 = 0; /*0xffc83bf3*/
n4a_1 = 0; /*0xffc83bfe*/
v2 = 1; /*0xffc83c0b*/
v13 = 1; /*0xffc83c0d*/
v3 = 0; /*0xffc83c13*/
v11 = 1; /*0xffc83c15*/
v15 = 0; /*0xffc83c19*/
DebugPrint((int)n4, 3, 255, 255, 255, 255, 255, 255, "CheckDdrtPorComplianceAcrossSockets Start\n"); /*0xffc83c1d*/
n4_1 = 0; /*0xffc83c25*/
LOBYTE(n3) = 0; /*0xffc83c27*/
while ( 1 )
{
if ( n4[48704 * n4_1 + 258689] == 1 )
{
n2_2 = 0; /*0xffc83c44*/
n4a = 0; /*0xffc83c46*/
n2 = 0; /*0xffc83c4a*/
do
{
MemChipFunc995A((int)n4, n3, n2, &v18); /*0xffc83c5c*/
if ( n4_1 ) /*0xffc83c66*/
{
n4a |= v18; /*0xffc83c8e*/
if ( v19 ) /*0xffc83c92*/
v15 = 1; /*0xffc83c94*/
}
else
{
n4a_1 |= v18; /*0xffc83c70*/
if ( v19 ) /*0xffc83c78*/
v14 = 1; /*0xffc83c7a*/
}
v6 = v13; /*0xffc83c99*/
v7 = &v20; /*0xffc83c9d*/
n3_1 = 3; /*0xffc83ca3*/
do
{
n2_1 = 2; /*0xffc83ca6*/
do
{
if ( *((_DWORD *)v7 - 1) == 5 )
{
if ( v3 )
v6 = v3 != *(_WORD *)v7 ? 0 : v6;
else
v3 = *(_WORD *)v7; /*0xffc83cb2*/
}
v7 += 8; /*0xffc83cc1*/
--n2_1; /*0xffc83cc4*/
}
while ( n2_1 );
v13 = v6; /*0xffc83cc9*/
--n3_1; /*0xffc83ccd*/
}
while ( n3_1 );
n2 = ++n2_2; /*0xffc83cd8*/
}
while ( n2_2 < 2u );
if ( n4_1 && v14 == v15 && (n4a_1 & 2) == 0 )
{
v2 = n4a_1 != n4a ? 0 : v11;
v11 = v2; /*0xffc83d09*/
}
else
{
v2 = v11; /*0xffc83d0f*/
}
}
if ( !v13 && !v2 ) /*0xffc83d1d*/
break; /*0xffc83d1d*/
LOBYTE(n3) = ++n4_1; /*0xffc83d21*/
if ( n4_1 >= 4u ) /*0xffc83d28*/
{
if ( v13 ) /*0xffc83d30*/
goto LABEL_28; /*0xffc83d30*/
break; /*0xffc83d30*/
}
}
DebugPrint((int)n4, 3, 255, 255, 255, 255, 255, 255, "DDRT capacity mismatch across the sockets\n"); /*0xffc83d32*/
KtiFunc1162(n4, 23, 13, 255, 255, 255, 255); /*0xffc83d53*/
LABEL_28:
if ( !v2 ) /*0xffc83d64*/
{
DebugPrint((int)n4, 3, 255, 255, 255, 255, 255, 255, "DDRT Mixed Memory Modes across sockets not supported\n"); /*0xffc83d74*/
KtiFunc1162(n4, 23, 16, 255, 255, 255, 255); /*0xffc83d82*/
}
DebugPrint((int)n4, 3, 255, 255, 255, 255, 255, 255, "CheckDdrtPorComplianceAcrossSockets End\n"); /*0xffc83d98*/
return 0; /*0xffc83da2*/
}
// Function: MemChipFunc3DAA @ 0xffc83daa (0x85 bytes)
// Index: 1028/2560
char __cdecl MemChipFunc3DAA(int n4, unsigned __int8 a2, unsigned __int8 a3)
{
unsigned __int8 v3; // cl
char v5; // bh
int v6; // edi
unsigned __int8 n0x18; // bl
int v8; // eax
int n2; // eax
char v10; // al
unsigned __int8 n4a; // [esp+14h] [ebp+8h]
v3 = a2; /*0xffc83dad*/
v5 = -1; /*0xffc83db5*/
v6 = n4 + 50813 * a2; /*0xffc83dc2*/
n0x18 = 0; /*0xffc83dc4*/
n4a = 0; /*0xffc83dc6*/
while ( 1 ) /*0xffc83dcc*/
{
v8 = 19 * n0x18; /*0xffc83dcc*/
if ( !*(_BYTE *)(v8 + v6 + 58799) ) /*0xffc83dd7*/
return 0; /*0xffc83e2a*/
if ( *(_BYTE *)(v8 + v6 + 58813) ) /*0xffc83dd9*/
{
n2 = *(unsigned __int16 *)(v8 + v6 + 58800); /*0xffc83de3*/
if ( n2 == 2 || n2 == 8 || n2 == 6 ) /*0xffc83df8*/
break; /*0xffc83df8*/
}
LABEL_11:
n4a = ++n0x18; /*0xffc83e1c*/
if ( n0x18 >= 0x18u ) /*0xffc83e22*/
return 0; /*0xffc83e22*/
}
v10 = MemChipFunc9885(n4, v3, a3, n4a); /*0xffc83e02*/
if ( v5 == -1 ) /*0xffc83e0d*/
{
v5 = v10; /*0xffc83e0f*/
LABEL_10:
v3 = a2; /*0xffc83e17*/
goto LABEL_11; /*0xffc83e17*/
}
if ( v5 == v10 ) /*0xffc83e15*/
goto LABEL_10; /*0xffc83e15*/
return 1; /*0xffc83e26*/
}
// Function: DimmInterleaveConfig @ 0xffc83e2f (0x46b bytes)
// Index: 1029/2560
unsigned __int8 __cdecl DimmInterleaveConfig(int n4)
{
int n4_1; // esi
char n2; // al
char n2_1; // al
char n2_2; // al
char n2_3; // al
unsigned __int8 n0x21; // al
unsigned __int8 n2_4; // al
unsigned __int8 n2_5; // al
unsigned __int8 n4_2; // bl
int v10; // ecx
char *v11; // edi
unsigned __int8 n6; // bh
int v13; // ebp
char v14; // al
char n2_6; // al
bool v16; // zf
unsigned __int8 n2_7; // al
char n2_8; // al
int v19; // edx
_BYTE *v20; // ebx
int n8; // ecx
char *v22; // edi
int v23; // ebp
char n2_9; // al
char n2_10; // al
unsigned __int8 n2_11; // al
unsigned __int8 n2_12; // al
int v28; // [esp+8h] [ebp-8h]
int v29; // [esp+Ch] [ebp-4h]
int n4a; // [esp+14h] [ebp+4h]
n4_1 = n4; /*0xffc83e33*/
n2 = *(_BYTE *)(n4 + 148); /*0xffc83e3c*/
if ( n2 == 1 || n2 == 2 || n2 == 3 ) /*0xffc83e4c*/
{
*(_BYTE *)(n4 + 9413) = n2; /*0xffc83e6d*/
}
else
{
DebugPrint(n4, 3, 255, 255, 255, 255, 255, 255, "\nInv... [8982 chars total]
// Function: MemChipFunc429A @ 0xffc8429a (0x81 bytes)
// Index: 1030/2560
__int16 __cdecl MemChipFunc429A(int a1, unsigned __int8 a2, unsigned __int8 a3)
{
int v3; // ecx
unsigned __int8 n0x18; // dl
__int16 v5; // si
int v6; // edi
int v7; // ebx
int v8; // eax
v3 = a2; /*0xffc8429b*/
n0x18 = 0; /*0xffc842a0*/
v5 = 0; /*0xffc842be*/
v6 = 50813 * a2 + a1 + 10189; /*0xffc842c1*/
do /*0xffc84310*/
{
v7 = 19 * n0x18; /*0xffc842c6*/
if ( !*(_BYTE *)(v7 + v6 + 48610) ) /*0xffc842c9*/
break; /*0xffc842d1*/
if ( *(_BYTE *)(v7 + v6 + 48624) ) /*0xffc842d3*/
{
v8 = v6 + v3 * *(unsigned __int8 *)(a1 + 244317) + 8 * n0x18; /*0xffc842f2*/
v3 = a2; /*0xffc842fd*/
if ( *(_BYTE *)(a3 + v8 + 49066) ) /*0xffc842f5*/
v5 |= *(_WORD *)(v7 + v6 + 48611); /*0xffc84303*/
}
++n0x18; /*0xffc8430b*/
}
while ( n0x18 < 0x18u ); /*0xffc84310*/
return v5; /*0xffc84312*/
}
// Function: MemChipFunc431B @ 0xffc8431b (0xb1 bytes)
// Index: 1031/2560
char __cdecl MemChipFunc431B(int n4)
{
char v1; // cl
unsigned __int8 i; // dl
int v3; // ebp
unsigned __int8 j_1; // dh
unsigned __int8 j; // bl
unsigned __int8 v6; // ch
int v7; // edi
int v8; // eax
v1 = 1; /*0xffc8431e*/
for ( i = 0; i < 4u; ++i ) /*0xffc84320*/
{
v3 = 48704 * i; /*0xffc8432d*/
if ( *(_BYTE *)(n4 + v3 + 258689) ) /*0xffc84337*/
{
j_1 = *(_BYTE *)(n4 + 244317); /*0xffc84341*/
for ( j = 0; j < j_1; ++j ) /*0xffc8434b*/
{
if ( *(_BYTE *)(v3 + 29 * j + n4 + 304850) ) /*0xffc84355*/
{
v6 = 0; /*0xffc84367*/
v7 = n4 + 50813 * i + 10239; /*0xffc84377*/
while ( 1 ) /*0xffc84386*/
{
v8 = 8077 * (3 * j + v6); /*0xffc84386*/
if ( !*(_DWORD *)(v8 + v7 + 2) ) /*0xffc84391*/
return 0; /*0xffc843c0*/
if ( !*(_DWORD *)(v8 + v7 + 10) ) /*0xffc84393*/
break; /*0xffc84393*/
if ( ++v6 >= 3u ) /*0xffc8439f*/
goto LABEL_11; /*0xffc8439f*/
}
v1 = 0; /*0xffc843a3*/
LABEL_11:
if ( !v1 ) /*0xffc843a7*/
return v1; /*0xffc843a7*/
}
}
}
}
return v1; /*0xffc843c2*/
}
// Function: MemChipFunc43CC @ 0xffc843cc (0x234 bytes)
// Index: 1032/2560
char __cdecl MemChipFunc43CC(int a1, int a2, unsigned int a3, int n8, _DWORD *a5)
{
unsigned __int8 v5; // al
int n8_1; // edx
_DWORD *v7; // ecx
int v8; // esi
unsigned __int8 n8_2; // cl
int v10; // eax
_BYTE *v11; // eax
int v12; // esi
bool v13; // zf
int v14; // edx
unsigned int v15; // edx
unsigned __int8 n8_3; // al
_DWORD *v17; // edi
_DWORD *v18; // ebx
_BYTE *v19; // ebp
unsigned __int8 n4; // bl
_BYTE *v22; // [esp+10h] [ebp-24h]
unsigned int v23; // [esp+14h] [ebp-20h]
int n2; // [esp+18h] [ebp-1Ch]
int v25; // [esp+20h] [ebp-14h]
_DWORD v26[4]; // [esp+24h] [ebp-10h] BYREF
v5 = 0; /*0xffc843d9*/
memset(v26, 0, sizeof(v26)); /*0xffc843db*/
n8_1 = 8; /*0xffc843e2*/
v23 = 0; /*0xffc843e3*/
if ( (_WORD)n8 != 8 && (_WORD)n8 != 16 && (_WORD)n8 != 32 )
{
v7 = a5; /*0xffc8440e*/
do /*0xffc8441e*/
{
if ( *v7 ) /*0xffc84412*/
++v5; /*0xffc84416*/
++v7; /*0xffc84418*/
--n8_1; /*0xffc8441b*/
}
while ( n8_1 ); /*0xffc8441e*/
if ( v5 ) /*0xffc84422*/
v23 = a3 / v5; /*0xffc8442d*/
v8 = a1; /*0xffc84431*/
n8_2 = 0; /*0xffc84435*/
LOBYTE(n8) = 0; /*0xffc84437*/
do
{
v10 = 48704 * n8_2; /*0xffc84442*/
if ( *(_BYTE *)(v10 + v8 + 258689) )
{
v25 = 24 * n8_2; /*0xffc84458*/
if ( *(_BYTE *)(v25 + a2 + 8) )
{
v11 = (_BYTE *)(v8 + 304850 + v10); /*0xffc84470*/
n2 = 2; /*0xffc84472*/
v22 = v11; /*0xffc8447a*/
v12 = 0; /*0xffc8447e*/
do /*0xffc844a5*/
{
if ( *v11 ) /*0xffc84480*/
{
if ( a5[2 * n8_2 + v12] ) /*0xffc84487*/
v26[n8_2] += v23; /*0xffc84490*/
v11 = v22; /*0xffc84494*/
}
v11 += 29; /*0xffc84498*/
++v12; /*0xffc8449b*/
v13 = n2-- == 1; /*0xffc8449c*/
v22 = v11; /*0xffc844a1*/
}
while ( !v13 ); /*0xffc844a5*/
v14 = v26[n8_2]; /*0xffc844a7*/
v8 = a1; /*0xffc844ab*/
if ( v14 )
{
v15 = *(_DWORD *)(v25 + a2 + 4) + v14; /*0xffc844ba*/
if ( v15 > *(_DWORD *)(v25 + a2) << 10 )
{
DebugPrint(a1, 2, n8, 255, 255, 255, 255, 255, "Memory Allocation Violation occurred: 0x%x \n", v15);
*(_BYTE *)(v25 + a2 + 9) = 1; /*0xffc844e4*/
if ( (*(_DWORD *)(a1 + 130) & 0x4000) == 0 ) /*0xffc844f3*/
{
KtiFunc211E(a1, 250, 1, n8, 255, 255, 255); /*0xffc845c0*/
return 1; /*0xffc845ca*/
}
n8_2 = n8; /*0xffc844f9*/
}
}
}
}
LOBYTE(n8) = ++n8_2; /*0xffc844ff*/
}
while ( n8_2 < 4u );
n8_3 = 0; /*0xffc8450c*/
v17 = (_DWORD *)(a2 + 4); /*0xffc8450e*/
LOBYTE(n8) = 0; /*0xffc84511*/
v18 = v26; /*0xffc84515*/
v19 = (_BYTE *)(v8 + 258689); /*0xffc84519*/
do
{
if ( *v19 )
{
*v17 += *v18; /*0xffc84527*/
DebugPrint(v8, 2, n8, 255, 255, 255, 255, 255, "MemoryAllocated: 0x%x \n", *v17);
n8_3 = n8; /*0xffc84546*/
}
++n8_3; /*0xffc8454d*/
v19 += 48704; /*0xffc8454f*/
++v18; /*0xffc84555*/
LOBYTE(n8) = n8_3; /*0xffc84558*/
v17 += 6; /*0xffc8455c*/
}
while ( n8_3 < 4u );
n4 = 0; /*0xffc8456f*/
if ( (*(_DWORD *)(v8 + 130) & 0x4000) != 0 ) /*0xffc84570*/
{
LOBYTE(n8) = 0; /*0xffc84576*/
while ( !*(_BYTE *)(48704 * n4 + v8 + 258689) || *(_BYTE *)(24 * n4 + a2 + 9) != 1 ) /*0xffc84595*/
{
LOBYTE(n8) = ++n4; /*0xffc84599*/
if ( n4 >= 4u ) /*0xffc845a0*/
return 0; /*0xffc845a0*/
}
DebugPrint(v8, 2, n8, 255, 255, 255, 255, 255, "NUMA enabled, SKU violation skipping DRAM rule allocation \n"); /*0xffc845e2*/
KtiFunc211E(v8, 250, 1, n8, 255, 255, 255); /*0xffc845f6*/
return 1; /*0xffc845fe*/
}
}
return 0; /*0xffc845a4*/
}
// Function: MemChipFunc4600 @ 0xffc84600 (0x20d bytes)
// Index: 1033/2560
int __cdecl MemChipFunc4600(int n4)
{
int n4_1; // edi
unsigned __int8 n4_2; // cl
int result; // eax
_BYTE *v4; // edx
int v5; // ebp
_DWORD *v6; // edx
int v7; // ecx
int n24; // ebx
_BYTE *v9; // eax
int n2; // esi
unsigned __int8 i; // dl
int v12; // eax
_DWORD *v13; // esi
_BYTE *v14; // ecx
int n20; // ebp
int n3; // ebx
unsigned __int8 n6; // bl
unsigned __int8 *v18; // esi
int v19; // ebp
unsigned __int8 v20; // dl
int v21; // edi
int n2_1; // ecx
unsigned __int8 n4_3; // [esp+10h] [ebp-18h]
int v24; // [esp+14h] [ebp-14h]
unsigned __int8 n6_1; // [esp+18h] [ebp-10h]
_BYTE *v26; // [esp+1Ch] [ebp-Ch]
int SocketInfo; // [esp+24h] [ebp-4h]
n4_1 = n4; /*0xffc84607*/
n4_2 = 0; /*0xffc8460b*/
n4_3 = 0; /*0xffc84612*/
result = n4 + 9400; /*0xffc84616*/
v4 = (_BYTE *)(n4 + 258689); /*0xffc8461c*/
v5 = n4 + 58807; /*0xffc84624*/
v26 = (_BYTE *)(n4 + 258689); /*0xffc8462a*/
v24 = n4 + 58807; /*0xffc8462e*/
do /*0xffc847ff*/
{
if ( *v4 ) /*0xffc84636*/
{
SocketInfo = GetSocketInfo(n4_1, n4_3); /*0xffc8464d*/
v6 = (_DWORD *)(v5 + 448); /*0xffc84651*/
v7 = v5; /*0xffc84657*/
n24 = 24; /*0xffc8465b*/
do /*0xffc8469a*/
{
*(_BYTE *)(v7 - 8) = 0; /*0xffc8465c*/
*(_BYTE *)v7 = 0; /*0xffc8465f*/
*(_WORD *)(v7 - 7) = 0; /*0xffc84665*/
*(_WORD *)(v7 + 5) = 0; /*0xffc84669*/
*(_DWORD *)(v7 - 4) = 0; /*0xffc8466d*/
*(_BYTE *)(v7 + 8) = 0; /*0xffc84670*/
*(_BYTE *)(v7 - 5) = 0; /*0xffc84673*/
v9 = (_BYTE *)(v7 + 3); /*0xffc84676*/
n2 = 2; /*0xffc84679*/
do /*0xffc84685*/
{
*v9 = 0; /*0xffc8467a*/
*(v9 - 2) = 0; /*0xffc8467d*/
++v9; /*0xffc84681*/
--n2; /*0xffc84682*/
}
while ( n2 ); /*0xffc84685*/
result = 0; /*0xffc84687*/
*(_BYTE *)(v7 + 10) = 0; /*0xffc84689*/
v7 += 19; /*0xffc8468c*/
*v6 = 0; /*0xffc8468f*/
v6[1] = 0; /*0xffc84691*/
v6 += 2; /*0xffc84694*/
--n24; /*0xffc84697*/
}
while ( n24 ); /*0xffc8469a*/
for ( i = 0; i < *(_BYTE *)(n4_1 + 244317); ++i ) /*0xffc8469e*/
{
v12 = v5 + -49407 - (n4 + 9400) + 768 * i; /*0xffc846c1*/
v13 = (_DWORD *)(v12 + n4_1 + 59594); /*0xffc846c3*/
v14 = (_BYTE *)(v12 + n4_1 + 59474); /*0xffc846c5*/
result = n4_1 + v12 + 59835; /*0xffc846cc*/
n20 = 20; /*0xffc846ce*/
do /*0xffc84702*/
{
*(_DWORD *)(result + 6) = 0; /*0xffc846cf*/
*(_DWORD *)(result + 10) = 0; /*0xffc846d3*/
*(_DWORD *)(result + 14) = 0; /*0xffc846d7*/
*(_DWORD *)(result - 1) = 0; /*0xffc846dd*/
*(_BYTE *)(result + 3) = 0; /*0xffc846e4*/
n3 = 3; /*0xffc846e8*/
do /*0xffc846fa*/
{
*v13++ = 0; /*0xffc846e9*/
v14[60] = 0; /*0xffc846ef*/
*v14++ = 0; /*0xffc846f3*/
--n3; /*0xffc846f7*/
}
while ( n3 ); /*0xffc846fa*/
result += 19; /*0xffc846fc*/
--n20; /*0xffc846ff*/
}
while ( n20 ); /*0xffc84702*/
v5 = v24; /*0xffc84704*/
}
n6 = 0; /*0xffc84716*/
v18 = (unsigned __int8 *)(SocketInfo + 3); /*0xffc84718*/
n6_1 = 0; /*0xffc8471b*/
v19 = v5 - 46250; /*0xffc8471f*/
do /*0xffc847d0*/
{
if ( *(v18 - 3) ) /*0xffc84725*/
{
result = GetCpuCount(n4_1, n4_3, n6_1); /*0xffc84738*/
v20 = 0; /*0xffc8473d*/
if ( *v18 ) /*0xffc84746*/
{
v21 = result; /*0xffc8474a*/
do /*0xffc847b5*/
{
result = v20; /*0xffc8474c*/
if ( *(_BYTE *)(1379 * v20 + v21 + 107) ) /*0xffc84755*/
{
result = 2688 * v20; /*0xffc8475c*/
if ( *(_BYTE *)(result + v19 + 2659) != 1 ) /*0xffc8476a*/
{
result += v19 + 1904; /*0xffc84773*/
n2_1 = 2; /*0xffc84775*/
do /*0xffc847af*/
{
if ( *(_BYTE *)(result - 1) && *(_BYTE *)result ) /*0xffc8477c*/
{
*(_DWORD *)(result + 2) = 0; /*0xffc84781*/
*(_BYTE *)(result + 1) = 0; /*0xffc84785*/
}
if ( *(_BYTE *)(result - 385) ) /*0xffc84789*/
{
if ( *(_BYTE *)(result - 384) ) /*0xffc84792*/
{
*(_DWORD *)(result - 382) = 0; /*0xffc8479b*/
*(_BYTE *)(result - 383) = 0; /*0xffc847a2*/
}
}
result += 18; /*0xffc847a9*/
--n2_1; /*0xffc847ac*/
}
while ( n2_1 ); /*0xffc847af*/
}
}
++v20; /*0xffc847b1*/
}
while ( v20 < *v18 ); /*0xffc847b5*/
n4_1 = n4; /*0xffc847b7*/
}
}
++n6; /*0xffc847bb*/
v19 += 8077; /*0xffc847bd*/
v18 += 7688; /*0xffc847c3*/
n6_1 = n6; /*0xffc847c9*/
}
while ( n6 < 6u ); /*0xffc847d0*/
n4_2 = n4_3; /*0xffc847d6*/
v5 = v24; /*0xffc847da*/
v4 = v26; /*0xffc847de*/
}
++n4_2; /*0xffc847e2*/
v4 += 48704; /*0xffc847e4*/
v5 += 50813; /*0xffc847ea*/
n4_3 = n4_2; /*0xffc847f0*/
v26 = v4; /*0xffc847f4*/
v24 = v5; /*0xffc847f8*/
}
while ( n4_2 < 4u ); /*0xffc847ff*/
return result; /*0xffc84805*/
}
// Function: MemChipFunc480D @ 0xffc8480d (0x5a bytes)
// Index: 1034/2560
int __cdecl MemChipFunc480D(int n4, int a2, int a3)
{
int result; // eax
if ( !MemChipFuncAB3F(n4, 255) || (result = MemChipFunc493D(n4, a2, a3, 16)) == 0 ) /*0xffc8483a*/
{
if ( !MemChipFuncAB3F(n4, 255) ) /*0xffc84840*/
return 0; /*0xffc84840*/
result = MemChipFunc493D(n4, a2, a3, 32); /*0xffc84856*/
if ( !result ) /*0xffc84860*/
return 0; /*0xffc84862*/
}
return result; /*0xffc84864*/
}
// Function: MemChipFunc4867 @ 0xffc84867 (0xd6 bytes)
// Index: 1035/2560
int __cdecl MemChipFunc4867(int __return_address, int a2, unsigned __int16 a3)
{
_BYTE *__return_address_1; // esi
unsigned __int8 n4_1; // bl
unsigned __int8 v5; // al
_DWORD *v6; // ecx
_BYTE *v7; // edx
int n4; // edi
int result; // eax
__return_address_1 = (_BYTE *)__return_address; /*0xffc8486c*/
n4_1 = 0; /*0xffc8486f*/
v5 = 0; /*0xffc84874*/
v6 = (_DWORD *)(__return_address + 10195); /*0xffc84876*/
v7 = (_BYTE *)(__return_address + 258689); /*0xffc8487c*/
n4 = 4; /*0xffc84882*/
do /*0xffc8489c*/
{
if ( *v7 && *v6 ) /*0xffc84887*/
++v5; /*0xffc8488b*/
v7 += 48704; /*0xffc8488d*/
v6 = (_DWORD *)((char *)v6 + 50813); /*0xffc84893*/
--n4; /*0xffc84899*/
}
while ( n4 ); /*0xffc8489c*/
if ( (*(_DWORD *)(__return_address + 130) & 0x4000) != 0 || *(_BYTE *)(__return_address + 243579) <= 1u || v5 <= 1u ) /*0xffc848b5*/
{
result = MemChipFuncD8C0(__return_address, a2, a3); /*0xffc8492a*/
if ( result ) /*0xffc84934*/
return result; /*0xffc84934*/
return 0; /*0xffc84934*/
}
result = MemChipFuncD673((_BYTE *)__return_address, a2, a3); /*0xffc848be*/
if ( result ) /*0xffc848c8*/
return result; /*0xffc848c8*/
if ( *(_BYTE *)(__return_address + 244358) != 1 ) /*0xffc848d1*/
return 0; /*0xffc84936*/
LOBYTE(__return_address) = 0; /*0xffc848d3*/
while ( 1 ) /*0xffc848d9*/
{
if ( __return_address_1[48704 * n4_1 + 258689] ) /*0xffc848df*/
{
result = KtiFn_FFC9F35E(__return_address_1, a2, __return_address); /*0xffc848f0*/
if ( result ) /*0xffc848fa*/
break; /*0xffc848fa*/
if ( !__return_address_1[10186] ) /*0xffc848fc*/
{
result = MemChipFuncF6AE(__return_address_1, a2, __return_address); /*0xffc8490b*/
if ( result ) /*0xffc84915*/
break; /*0xffc84915*/
}
}
LOBYTE(__return_address) = ++n4_1; /*0xffc84919*/
if ( n4_1 >= 4u ) /*0xffc8491f*/
return 0; /*0xffc8491f*/
}
return result; /*0xffc84938*/
}
// Function: MemChipFunc493D @ 0xffc8493d (0x56 bytes)
// Index: 1036/2560
int __cdecl MemChipFunc493D(int __return_address, int a2, unsigned __int16 a3, int n32)
{
int result; // eax
_DWORD *v5; // ecx
int n4; // esi
_DWORD *v7; // edx
int n6; // edi
MemChipFuncA8D4(__return_address, n32); /*0xffc84948*/
result = MemChipFuncD163(__return_address, a2, a3, n32); /*0xffc84957*/
if ( !result ) /*0xffc84961*/
{
v5 = (_DWORD *)(__return_address + 10297); /*0xffc84965*/
n4 = 4; /*0xffc8496b*/
do /*0xffc8498b*/
{
v7 = v5; /*0xffc8496f*/
n6 = 6; /*0xffc84971*/
do /*0xffc84980*/
{
*v7 = *(v7 - 14); /*0xffc84975*/
v7 = (_DWORD *)((char *)v7 + 8077); /*0xffc84977*/
--n6; /*0xffc8497d*/
}
while ( n6 ); /*0xffc84980*/
v5 = (_DWORD *)((char *)v5 + 50813); /*0xffc84982*/
--n4; /*0xffc84988*/
}
while ( n4 ); /*0xffc8498b*/
return 0; /*0xffc8498d*/
}
return result; /*0xffc84990*/
}
// Function: MemChipFunc4993 @ 0xffc84993 (0x46 bytes)
// Index: 1037/2560
int __cdecl MemChipFunc4993(int n4, int a2)
{
int v2; // edi
int n34; // eax
v2 = (64 - *(unsigned __int8 *)(n4 + 1557)) & 0xFFFC; /*0xffc849ae*/
n34 = MemChipFunc4867(n4, a2, (64 - *(unsigned __int8 *)(n4 + 1557)) & 0xFFFC); /*0xffc849b7*/
if ( !n34 || n34 == 34 ) /*0xffc849c6*/
return MemChipFunc480D(n4, a2, v2); /*0xffc849ce*/
return n34; /*0xffc849d6*/
}
// Function: MemChipFunc49D9 @ 0xffc849d9 (0x26 bytes)
// Index: 1038/2560
int __cdecl MemChipFunc49D9(unsigned __int8 *n4)
{
return MemCmdControlSetup(n4, (64 - n4[1557]) & 0xFFFC); /*0xffc849fe*/
}
// Function: MemChipFunc49FF @ 0xffc849ff (0x1c2 bytes)
// Index: 1039/2560
int __cdecl MemChipFunc49FF(_BYTE *n4, int a2)
{
_BYTE *n4_1; // esi
_BYTE *v3; // eax
unsigned __int8 n4_2; // bl
int v5; // ecx
_BYTE *v6; // ebp
char v7; // bl
int SocketInfo; // eax
unsigned __int8 n6; // cl
unsigned __int8 *v10; // edi
int v11; // eax
unsigned __int8 v12; // bh
int CpuCount; // edx
int v14; // ecx
int n6_1; // [esp+10h] [ebp-20h]
int v17; // [esp+14h] [ebp-1Ch]
int v18; // [esp+18h] [ebp-18h]
int v19; // [esp+1Ch] [ebp-14h]
_BYTE *v20; // [esp+20h] [ebp-10h]
_BYTE *v21; // [esp+24h] [ebp-Ch]
int i; // [esp+2Ch] [ebp-4h]
n4_1 = n4; /*0xffc84a05*/
if ( n4[244358] != 1 ) /*0xffc84a16*/
{
DebugPrint( /*0xffc84a26*/
(int)n4,
3,
255,
255,
255,
255,
255,
255,
"NVMDIMM Management not controlling NVMDIMMs which prevents us going into any degraded memory mapping mode. So Halt"
"ing the system due to this failure.\n");
ProcMemInitCheck((int)n4, 248, 1); /*0xffc84a33*/
}
++n4[10186]; /*0xffc84a3b*/
MemChipFunc4600((int)n4); /*0xffc84a42*/
v3 = n4 + 258689; /*0xffc84a4b*/
n4_2 = 0; /*0xffc84a52*/
n4[10187] = 1; /*0xffc84a54*/
v5 = 0; /*0xffc84a5b*/
LOBYTE(n4) = 0; /*0xffc84a5d*/
v6 = (_BYTE *)(a2 + 9); /*0xffc84a61*/
v18 = 0; /*0xffc84a64*/
v21 = (_BYTE *)(a2 + 9); /*0xffc84a68*/
v20 = n4_1 + 258689; /*0xffc84a6c*/
do /*0xffc84bb0*/
{
if ( *v3 && *v6 == 1 ) /*0xffc84a7d*/
{
DebugPrint((int)n4_1, 3, (int)n4, 255, 255, 255, 255, 255, "Mapping out DIMMs due to SKU Limit violation\n"); /*0xffc84a94*/
n4_1[10187] = 0; /*0xffc84a9d*/
v7 = 0; /*0xffc84aa4*/
SocketInfo = GetSocketInfo((int)n4_1, (unsigned __int8)n4); /*0xffc84aa7*/
n6 = 0; /*0xffc84ab0*/
LOBYTE(n6_1) = 0; /*0xffc84ab5*/
v17 = 0; /*0xffc84ab9*/
v10 = (unsigned __int8 *)(SocketInfo + 3); /*0xffc84abe*/
v11 = 0; /*0xffc84ac1*/
do /*0xffc84b75*/
{
if ( *(v10 - 3) ) /*0xffc84ac5*/
{
v12 = 0; /*0xffc84add*/
CpuCount = GetCpuCount((int)n4_1, (unsigned __int8)n4, n6_1); /*0xffc84ae2*/
LOBYTE(v19) = 0; /*0xffc84ae4*/
for ( i = CpuCount; v12 < *v10; LOBYTE(v19) = v12 ) /*0xffc84aec*/
{
v14 = 1379 * v12; /*0xffc84af3*/
if ( *(_BYTE *)(v14 + CpuCount) ) /*0xffc84afd*/
{
if ( v7 || *(_BYTE *)(v14 + CpuCount + 107) ) /*0xffc84b07*/
{
DebugPrint((int)n4_1, 3, (int)n4, n6_1, v19, 255, 255, 255, "Mapping out DIMM\n"); /*0xffc84b2d*/
CpuCount = i; /*0xffc84b3f*/
*(_BYTE *)(v12 + 2 * (v18 + v17) + a2 + 10) = 1; /*0xffc84b4a*/
}
else
{
v7 = 1; /*0xffc84b0d*/
}
}
++v12; /*0xffc84b4f*/
}
v11 = v17; /*0xffc84b59*/
n6 = n6_1; /*0xffc84b5d*/
}
++n6; /*0xffc84b61*/
v10 += 7688; /*0xffc84b63*/
++v11; /*0xffc84b69*/
LOBYTE(n6_1) = n6; /*0xffc84b6a*/
v17 = v11; /*0xffc84b6e*/
}
while ( n6 < 6u ); /*0xffc84b75*/
n4_2 = (unsigned __int8)n4; /*0xffc84b7b*/
v6 = v21; /*0xffc84b84*/
v3 = v20; /*0xffc84b88*/
v5 = v18; /*0xffc84b8c*/
}
++n4_2; /*0xffc84b90*/
v3 += 48704; /*0xffc84b92*/
v6 += 24; /*0xffc84b97*/
LOBYTE(n4) = n4_2; /*0xffc84b9a*/
v5 += 12; /*0xffc84b9e*/
v20 = v3; /*0xffc84ba1*/
v21 = v6; /*0xffc84ba5*/
v18 = v5; /*0xffc84ba9*/
}
while ( n4_2 < 4u ); /*0xffc84bb0*/
return 33; /*0xffc84bb9*/
}
// Function: MemChipFunc4BC1 @ 0xffc84bc1 (0xf bytes)
// Index: 1040/2560
int __cdecl MemChipFunc4BC1(int n4)
{
int v1; // ebp
int v2; // ecx
int n4_1; // eax
unsigned __int8 v4; // bl
int v5; // edi
unsigned __int8 i; // bh
int v7; // ecx
unsigned __int8 v8; // dl
int v9; // [esp+0h] [ebp-8h]
int n4_2; // [esp+4h] [ebp-4h]
MemChipFunc4BD0(n4); /*0xffc84bc5*/
v1 = 0; /*0xffc84d97*/
v2 = 0; /*0xffc84d9c*/
n4_1 = 4; /*0xffc84d9e*/
v9 = 0; /*0xffc84d9f*/
n4_2 = 4; /*0xffc84da3*/
do /*0xffc84eb1*/
{
v4 = 0; /*0xffc84da7*/
if ( *(_BYTE *)(n4 + 244317) ) /*0xffc84da9*/
{
do /*0xffc84e95*/
{
v5 = v2 + 768 * v4 + n4 + 59447; /*0xffc84dc6*/
if ( *(_BYTE *)(v5 + 387) ) /*0xffc84dc8*/
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "\n\n*******TAD Table for socket %d Mc %d*******\n", v1, v4); /*0xffc84dea*/
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "Enable Limit SktWays ChWays Mode SadID\n"); /*0xffc84e02*/
for ( i = 0; i < 0x14u; ++i ) /*0xffc84e0a*/
{
v7 = 19 * i; /*0xffc84e0f*/
v8 = *(_BYTE *)(v7 + v5 + 387); /*0xffc84e12*/
if ( !v8 ) /*0xffc84e1b*/
break; /*0xffc84e1b*/
DebugPrint( /*0xffc84e5f*/
n4,
2,
255,
255,
255,
255,
255,
255,
"%6d 0x%05x %7d %6d %4d %5d\n",
v8,
*(_DWORD *)(v7 + v5 + 394),
*(unsigned __int8 *)(v7 + v5 + 390),
*(unsigned __int8 *)(v7 + v5 + 391),
*(unsigned __int8 *)(v7 + v5 + 389),
*(unsigned __int8 *)(v7 + v5 + 388));
}
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "\n</TADTable>\n"); /*0xffc84e81*/
v2 = v9; /*0xffc84e86*/
}
++v4; /*0xffc84e8d*/
}
while ( v4 < *(_BYTE *)(n4 + 244317) ); /*0xffc84e95*/
n4_1 = n4_2; /*0xffc84e9b*/
}
v2 += 50813; /*0xffc84e9f*/
++v1; /*0xffc84ea5*/
--n4_1; /*0xffc84ea6*/
v9 = v2; /*0xffc84ea9*/
n4_2 = n4_1; /*0xffc84ead*/
}
while ( n4_1 ); /*0xffc84eb1*/
return n4_1; /*0xffc84ebd*/
}
// Function: MemChipFunc4BD0 @ 0xffc84bd0 (0x1be bytes)
// Index: 1041/2560
int __cdecl MemChipFunc4BD0(int n4)
{
int v1; // eax
int n4_1; // ecx
_BYTE *v3; // ebx
_BYTE *v4; // esi
int n24; // ebp
const char *v6; // eax
_BYTE *v7; // esi
unsigned __int8 *v8; // ebx
int n24_1; // eax
unsigned __int8 *v10; // ebp
int n8; // ebx
int v13; // [esp-1Ch] [ebp-40h]
int v14; // [esp-18h] [ebp-3Ch]
int v15; // [esp-14h] [ebp-38h]
int v16; // [esp-10h] [ebp-34h]
int v17; // [esp-Ch] [ebp-30h]
int v18; // [esp-8h] [ebp-2Ch]
int v19; // [esp-4h] [ebp-28h]
unsigned __int8 *v20; // [esp+10h] [ebp-14h]
int n24_2; // [esp+14h] [ebp-10h]
int v22; // [esp+18h] [ebp-Ch]
_BYTE *v23; // [esp+1Ch] [ebp-8h]
int n4_2; // [esp+20h] [ebp-4h]
v1 = 0; /*0xffc84bdb*/
n4_1 = 4; /*0xffc84bdf*/
v22 = 0; /*0xffc84be0*/
v3 = (_BYTE *)(n4 + 58799); /*0xffc84be9*/
n4_2 = 4; /*0xffc84bef*/
v23 = (_BYTE *)(n4 + 58799); /*0xffc84bf3*/
do /*0xffc84d6a*/
{
if ( *v3 ) /*0xffc84bf7*/
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "\n\n********SAD table for socket %d*******\n", v1); /*0xffc84c0f*/
DebugPrint( /*0xffc84c22*/
n4,
2,
255,
255,
255,
255,
255,
255,
"Type Limit Ways MC0_ChIntBitmap MC1_ChIntBitmap MC0_FMchIntBitmap MC1_FMchIntBitmap MC_IntBitmap\n");
v20 = v3 + 456; /*0xffc84c30*/
v4 = v3 + 14; /*0xffc84c34*/
n24 = 24; /*0xffc84c3c*/
do /*0xffc84cb8*/
{
if ( *(v4 - 14) ) /*0xffc84c3d*/
{
if ( *v4 ) /*0xffc84c43*/
{
v19 = (unsigned __int8)*(v4 - 1); /*0xffc84c4c*/
v18 = (unsigned __int8)*(v4 - 2); /*0xffc84c51*/
v17 = (unsigned __int8)*(v4 - 3); /*0xffc84c56*/
v16 = (unsigned __int8)*(v4 - 4); /*0xffc84c5b*/
v15 = (unsigned __int8)*(v4 - 5); /*0xffc84c60*/
v14 = (unsigned __int8)*(v4 - 6); /*0xffc84c65*/
v13 = *(_DWORD *)(v4 - 10); /*0xffc84c66*/
v6 = MemChipFunc9C74(*(_WORD *)(v4 - 13)); /*0xffc84c6e*/
DebugPrint( /*0xffc84c8a*/
n4,
2,
255,
255,
255,
255,
255,
255,
"%10s 0x%05x %4d %15d %15x %17x %17x %12x\n",
v6,
v13,
v14,
v15,
v16,
v17,
v18,
v19);
}
else
{
DebugPrint( /*0xffc84caa*/
n4,
2,
255,
255,
255,
255,
255,
255,
"REMOTE 0x%05x N/A N/A N/A N/A N/A N/A\n",
*(_DWORD *)(v4 - 10));
}
}
v4 += 19; /*0xffc84cb2*/
--n24; /*0xffc84cb5*/
}
while ( n24 ); /*0xffc84cb8*/
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "<<SAD Interleave List>>"); /*0xffc84ccd*/
v7 = v3; /*0xffc84cd5*/
v8 = v3 + 456; /*0xffc84cd7*/
n24_1 = 24; /*0xffc84cdd*/
n24_2 = 24; /*0xffc84cde*/
do /*0xffc84d46*/
{
if ( *v7 ) /*0xffc84ce2*/
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc84cf5*/
v10 = v8; /*0xffc84cfd*/
n8 = 8; /*0xffc84d01*/
do /*0xffc84d26*/
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "%d\t", *v10++); /*0xffc84d1a*/
--n8; /*0xffc84d23*/
}
while ( n8 ); /*0xffc84d26*/
v8 = v20; /*0xffc84d28*/
n24_1 = n24_2; /*0xffc84d31*/
}
v8 += 8; /*0xffc84d35*/
v7 += 19; /*0xffc84d38*/
--n24_1; /*0xffc84d3b*/
v20 = v8; /*0xffc84d3e*/
n24_2 = n24_1; /*0xffc84d42*/
}
while ( n24_1 ); /*0xffc84d46*/
v3 = v23; /*0xffc84d48*/
v1 = v22; /*0xffc84d4c*/
n4_1 = n4_2; /*0xffc84d50*/
}
++v1; /*0xffc84d54*/
v3 += 50813; /*0xffc84d55*/
--n4_1; /*0xffc84d5b*/
v22 = v1; /*0xffc84d5e*/
v23 = v3; /*0xffc84d62*/
n4_2 = n4_1; /*0xffc84d66*/
}
while ( n4_1 ); /*0xffc84d6a*/
return DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "\n</SADTable>\n"); /*0xffc84d86*/
}
// Function: MemChipFunc4EBE @ 0xffc84ebe (0x97c bytes)
// Index: 1042/2560
int __cdecl MemChipFunc4EBE(int __return_address, int a2, int a3, unsigned __int16 a4, int n16, int *p_n64, char a7)
{
unsigned __int8 v7; // dl
int __return_address_1; // esi
unsigned __int16 n16_1; // bp
int v10; // eax
int v11; // edi
int result; // eax
int v13; // eax
unsigned __int8 v14; // cl
int *p_n64_1; // ebx
unsigned __int8 n6; // bh
int v17; // eax
unsigned __int8 n6_4; // al
int v19; // eax
unsigned int n0x18_4; // eax
unsigned int v21; // edx
unsigned int n6_5; // ebx
int v23; // eax
unsigned __int8 n0x18; // al
unsigned __int8 n0x18_1; // bl
unsigned __int8 *v26; // ecx
unsigned int n0x18_5; // esi
int v28; // edi
bool v29; // zf
char v30; // al
int v31; // edx
int *p_n64_2; // ecx
int v33; // ebp
int v34; // eax
char v35; // al
unsigned int n0x18_3; // edx
int v37; // edx
char v38; // cl
unsigned int v39; // ebp
unsigned int v40; // edx
int v41; // ebp
int n64_1; // ecx
int v43; // ebp
char v44;... [17540 chars total]
// Function: MemChipFunc583A @ 0xffc8583a (0x76b bytes)
// Index: 1043/2560
int __cdecl MemChipFunc583A(int __return_address, int a2, int a3, unsigned __int16 a4, int n16)
{
int n16_1; // ebp
_BYTE *__return_address_1; // edi
int v7; // esi
unsigned __int8 v8; // cl
int v9; // eax
_BYTE *v10; // ebx
int v11; // eax
unsigned int v12; // esi
unsigned __int8 n0x18; // al
unsigned __int8 n0x18_4; // dl
int v16; // ecx
unsigned int v17; // eax
int v18; // eax
unsigned __int8 v19; // al
unsigned __int8 n16a_1; // al
unsigned int v21; // ecx
int v22; // ecx
int v23; // esi
int n0x18_3; // ebp
unsigned __int8 v25; // cl
int v26; // eax
unsigned __int8 v27; // dl
unsigned __int8 v28; // dl
unsigned __int8 v29; // cl
int v30; // eax
unsigned __int8 n0x18_2; // [esp+10h] [ebp-50h]
char v33; // [esp+11h] [ebp-4Fh]
unsigned __int8 v34; // [esp+12h] [ebp-4Eh]
unsigned __int8 v35; // [esp+12h] [ebp-4Eh]
unsigned int v36; // [esp+14h] [ebp-4Ch]
int v37; // [esp+18h] [ebp-48h]
unsigned __int8 v38; // [esp+1Ch] [eb... [11901 chars total]
// Function: MemChipFunc5FA5 @ 0xffc85fa5 (0x965 bytes)
// Index: 1044/2560
int __cdecl MemChipFunc5FA5(
int __return_address,
int a2,
unsigned __int16 a3,
int n16,
int buf,
unsigned __int8 *n3,
_DWORD *a7,
int a8,
unsigned __int8 *p_n64,
unsigned int *p_n64a)
{
int __return_address_1; // edi
unsigned int v12; // ebp
_DWORD *v13; // esi
unsigned __int8 n3_2; // al
unsigned __int8 *n3_1; // edx
bool v16; // zf
int v17; // edx
_BYTE *v18; // ebp
int n4_1; // eax
int v20; // ebx
char v21; // si
_DWORD *v22; // ecx
int v23; // ecx
int n4_2; // esi
char v25; // dl
__int16 n16_1; // si
unsigned __int8 n4_3; // bl
int n4_4; // ecx
int v29; // eax
unsigned __int8 v30; // bh
int v31; // ebp
unsigned __int8 v32; // al
unsigned __int8 v33; // bl
int n64; // edx
int v35; // edx
char n4_6; // cl
int v37; // eax
unsigned __int8 n0x18_4; // al
unsigned __int8 n0x18; // bl
int v40; // esi
unsigned __int8 v41; // dl
unsigned __int8 v42... [19606 chars total]
// Function: MemChipFunc690A @ 0xffc8690a (0x7b7 bytes)
// Index: 1045/2560
int __cdecl MemChipFunc690A(int __return_address, int a2, int a3, unsigned __int16 a4, int n2)
{
__int16 n2_1; // cx
_BYTE *__return_address_1; // esi
int v7; // ebp
unsigned __int8 v8; // dl
int v9; // eax
_BYTE *v10; // edi
unsigned int v11; // ebp
int v12; // eax
unsigned __int8 i; // dl
int v14; // eax
char v15; // al
unsigned __int8 n0x18; // al
unsigned __int8 n0x18_2; // dl
int v19; // eax
int v20; // eax
unsigned int v21; // ecx
int v22; // eax
unsigned int v23; // ebp
unsigned int v24; // edx
int n2_2; // ebp
unsigned __int8 v26; // bl
int v27; // ecx
unsigned __int8 v28; // cl
int v29; // eax
unsigned int v30; // edx
unsigned int v31; // eax
unsigned int j; // ebp
int v33; // ebx
unsigned __int8 v34; // cl
int n0x18_4; // ebp
int v36; // eax
unsigned __int8 v37; // dl
int v38; // ecx
unsigned __int8 v39; // dl
int v40; // ecx
unsigned __int8 v41; // cl
int v42; // eax
unsigned __int8 v43; // cl
int ... [13124 chars total]
// Function: MemChipFn_FFC870C1 @ 0xffc870c1 (0xa17 bytes)
// Index: 1046/2560
int __cdecl MemChipFn_FFC870C1(
int __return_address,
int a2,
unsigned __int16 a3,
int n32,
int buf,
unsigned __int8 a6,
unsigned __int8 a7,
int *p_n64)
{
int result; // eax
int __return_address_1; // esi
int n0x18_6; // ecx
int v11; // edi
int n4; // ebx
_BYTE *v13; // eax
bool v14; // zf
unsigned __int8 v15; // dl
unsigned __int8 n4_14; // bl
_DWORD *v17; // ebp
int n4_8; // eax
int v19; // ecx
int n0x18_5; // edx
unsigned int n0xFFFF_1; // edi
int n4_16; // eax
unsigned int n4_12; // ecx
unsigned int n0xFFFF_2; // eax
unsigned int v25; // ecx
int n4_7; // ecx
int v27; // ecx
int n4_2; // edi
int v29; // ebx
char v30; // dl
unsigned __int8 v31; // dh
unsigned __int8 n4_6; // bl
unsigned int n4_9; // ebp
int v34; // eax
unsigned __int8 v35; // bl
int v36; // edi
unsigned __int8 v37; // al
int v38; // edi
unsigned __int8 v39; // dl
int n0xFFFF_3; // esi
un... [22003 chars total]
// Function: MemChipFunc7AD8 @ 0xffc87ad8 (0x79c bytes)
// Index: 1047/2560
int __cdecl MemChipFunc7AD8(int __return_address, int a2, int a3, unsigned __int16 a4, int n16)
{
__int16 n16_1; // bp
_BYTE *__return_address_1; // esi
unsigned __int8 n3_5; // ch
unsigned __int8 n3_2; // cl
int v9; // eax
_BYTE *v10; // edi
_BYTE *v11; // edx
int v12; // eax
unsigned __int8 n3_3; // dl
unsigned int n3_4; // eax
int v15; // ecx
unsigned int v16; // edi
unsigned __int8 n0x18; // al
unsigned __int8 n0x18_1; // dl
unsigned __int8 n3; // dh
int v21; // ecx
char v22; // al
int v23; // eax
unsigned int v24; // ecx
int v25; // eax
int v27; // edx
unsigned __int8 v28; // bl
int v29; // eax
int v30; // eax
unsigned __int8 i; // cl
int v32; // eax
int v33; // ecx
unsigned __int8 v34; // bl
int v35; // ecx
unsigned __int8 v36; // dl
int v37; // eax
int v38; // eax
int v39; // eax
int v40; // eax
unsigned __int8 n0x18_2; // [esp+12h] [ebp-4Ah]
unsigned __int8 n3_1; // [esp+13h] [ebp-49h]
unsigned int v44; /... [12947 chars total]
// Function: MemChipFn_FFC88274 @ 0xffc88274 (0xa6b bytes)
// Index: 1048/2560
int __cdecl MemChipFn_FFC88274(
int __return_address,
int a2,
unsigned __int16 a3,
int n32,
int buf,
unsigned __int8 *n3,
_DWORD *a7,
int a8,
unsigned __int8 *p_n64,
int *p_n64a)
{
int result; // eax
unsigned int v11; // ebx
unsigned __int8 n3_2; // cl
_DWORD *v13; // esi
unsigned __int8 *n3_1; // edx
int __return_address_1; // edi
_BYTE *v16; // ebp
int n4; // ecx
int v18; // edx
bool v19; // zf
int v20; // eax
char v21; // si
_DWORD *v22; // ecx
unsigned __int16 n32_1; // bx
int v24; // ecx
int n4_2; // esi
char v26; // dl
unsigned __int8 n4_14; // al
int v28; // eax
int v29; // ebp
int v30; // esi
unsigned __int8 v31; // al
int n4_16; // ebp
int n64; // edx
int v34; // edx
unsigned __int8 *p_n64_1; // edx
int v36; // ecx
int v37; // ecx
int v38; // ecx
int v39; // eax
unsigned __int8 n0x18; // al
unsigned __int8 n0x18_1; // dl
int v42; // ... [20319 chars total]
// Function: MemChipFunc8CDF @ 0xffc88cdf (0x88 bytes)
// Index: 1049/2560
void __cdecl MemChipFunc8CDF(_BYTE *n4, int a2)
{
if ( n4[244358] == 1 ) /*0xffc88cf0*/
{
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "CR mgmt Driver is available..\n"); /*0xffc88d00*/
KtiFn_FFCA1AED(n4, a2); /*0xffc88d0a*/
if ( n4[10187] != 2 ) /*0xffc88d19*/
{
KtiFunc7A3C((int)n4); /*0xffc88d1c*/
KtiFn_FFCA4DE0(n4); /*0xffc88d22*/
KtiFunc7D42((int)n4); /*0xffc88d28*/
}
KtiFunc14C4(n4); /*0xffc88d35*/
}
else
{
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "CR mgmt Driver is NOT available. Using setup options!!\n"); /*0xffc88d4c*/
MemChipFn_FFC8E7BA(n4, a2); /*0xffc88d56*/
}
MemChipFunc344D((int)n4); /*0xffc88d5f*/
}
// Function: MemChipFn_FFC88D67 @ 0xffc88d67 (0x224 bytes)
// Index: 1050/2560
unsigned __int8 __cdecl MemChipFn_FFC88D67(int __return_address, int buf, unsigned __int8 *p_n8, unsigned __int8 n2)
{
char *v4; // edx
unsigned __int8 i; // cl
char v6; // al
unsigned __int8 n4; // bl
int v8; // edi
unsigned __int8 n6; // bh
unsigned int n6_3; // ebp
char v11; // dl
int v12; // ecx
int n3; // esi
unsigned __int8 v14; // dh
unsigned int n6_1; // ecx
unsigned __int8 n6_2; // dl
unsigned int n0xFFFF_1; // eax
unsigned __int8 *p_n8_1; // eax
int buf_1; // edi
unsigned __int8 *p_n8_2; // esi
int n7; // ebx
unsigned __int8 *p_n8_3; // ebx
unsigned int *v23; // edi
unsigned __int8 n7_2; // cl
unsigned __int8 n7_1; // dl
int v26; // esi
unsigned __int8 n8; // ch
unsigned __int8 v28; // dh
unsigned int n0xFFFF_2; // ebp
int v30; // eax
unsigned int n0xFFFF_3; // eax
unsigned int v32; // esi
bool v33; // zf
char v35; // [esp+10h] [ebp-34h] BYREF
__int16 v36; // [esp+11h] [ebp-33h]
int v37; // [esp+14h] [ebp-30h]
unsigned int n0xFFFF; // [esp+18h] [ebp-2Ch]
unsigned int v39; // [esp+1Ch] [ebp-28h]
unsigned __int8 *p_n8_4; // [esp+20h] [ebp-24h]
unsigned int *v41; // [esp+24h] [ebp-20h]
_DWORD v42[7]; // [esp+28h] [ebp-1Ch] BYREF
v4 = &v35; /*0xffc88d6f*/
v35 = 0; /*0xffc88d76*/
v36 = 0; /*0xffc88d7d*/
for ( i = 0; i < 3u; ++i ) /*0xffc88d82*/
{
v6 = (n2 >> i) & 1; /*0xffc88d88*/
*v4++ = v6; /*0xffc88d8c*/
}
n4 = 0; /*0xffc88d98*/
v37 = 0; /*0xffc88d9a*/
v8 = __return_address + 10239; /*0xffc88d9f*/
LOBYTE(v41) = 0; /*0xffc88da5*/
do /*0xffc88ea5*/
{
p_n8_4 = 0; /*0xffc88da9*/
n6 = 0; /*0xffc88dae*/
LOBYTE(v39) = 0; /*0xffc88db0*/
n6_3 = 0; /*0xffc88db5*/
do /*0xffc88e8b*/
{
v11 = 0; /*0xffc88db9*/
n0xFFFF = 0xFFFF; /*0xffc88dbb*/
v12 = 0; /*0xffc88dc3*/
n3 = 3; /*0xffc88dc5*/
do /*0xffc88de5*/
{
if ( *(&v35 + v12) && !*(_DWORD *)(8077 * (v12 + n6) + v8 + 58) ) /*0xffc88dd8*/
v11 = 1; /*0xffc88ddf*/
++v12; /*0xffc88de1*/
--n3; /*0xffc88de2*/
}
while ( n3 ); /*0xffc88de5*/
if ( v11 == 1 || (v14 = MemChipFunc9700(__return_address, (unsigned __int8)v41, v39)) == 0 ) /*0xffc88e08*/
{
p_n8_1 = p_n8; /*0xffc88e72*/
}
else
{
n6_1 = n6; /*0xffc88e0a*/
n6_2 = n6; /*0xffc88e0d*/
do /*0xffc88e40*/
{
if ( n6_1 >= n6_3 ) /*0xffc88e14*/
{
if ( *(&v35 + n6_1 - n6_3) ) /*0xffc88e1a*/
{
n0xFFFF_1 = *(_DWORD *)(8077 * n6_1 + v8 + 58); /*0xffc88e27*/
if ( n0xFFFF_1 ) /*0xffc88e2d*/
{
if ( n0xFFFF_1 < n0xFFFF ) /*0xffc88e33*/
n0xFFFF = *(_DWORD *)(8077 * n6_1 + v8 + 58); /*0xffc88e35*/
}
}
}
n6_1 = ++n6_2; /*0xffc88e3b*/
}
while ( n6_2 < (unsigned int)n6 + 3 ); /*0xffc88e40*/
*(_DWORD *)(buf + 4 * (_DWORD)&p_n8_4[8 * v14 + v37 * *(unsigned __int8 *)(__return_address + 244317)] - 32) = n0xFFFF; /*0xffc88e64*/
p_n8_1 = p_n8; /*0xffc88e68*/
++p_n8[v14 - 1]; /*0xffc88e6c*/
}
LOBYTE(v39) = v39 + 1; /*0xffc88e76*/
n6 += 3; /*0xffc88e7a*/
++p_n8_4; /*0xffc88e7d*/
n6_3 += 3; /*0xffc88e81*/
}
while ( n6 < 6u ); /*0xffc88e8b*/
++n4; /*0xffc88e91*/
v8 += 50813; /*0xffc88e93*/
LOBYTE(v41) = n4; /*0xffc88e9a*/
++v37; /*0xffc88e9e*/
}
while ( n4 < 4u ); /*0xffc88ea5*/
buf_1 = buf; /*0xffc88eab*/
p_n8_2 = p_n8_1; /*0xffc88eaf*/
n7 = 7; /*0xffc88eb3*/
do /*0xffc88ece*/
{
*p_n8_2 = MemChipFunc319E(__return_address, buf_1, *p_n8_2); /*0xffc88ec5*/
buf_1 += 32; /*0xffc88ec7*/
++p_n8_2; /*0xffc88eca*/
--n7; /*0xffc88ecb*/
}
while ( n7 ); /*0xffc88ece*/
p_n8_3 = p_n8; /*0xffc88ed0*/
v23 = v42; /*0xffc88ed4*/
n7_2 = 0; /*0xffc88ed8*/
p_n8_4 = p_n8; /*0xffc88eda*/
n7_1 = 0; /*0xffc88ede*/
v41 = v42; /*0xffc88ee0*/
v26 = 0; /*0xffc88ee4*/
v37 = 0; /*0xffc88ee6*/
do /*0xffc88f7b*/
{
n8 = *p_n8_3; /*0xffc88eea*/
*v23 = 0; /*0xffc88eec*/
if ( n8 ) /*0xffc88ef1*/
{
v28 = 0; /*0xffc88ef7*/
n0xFFFF_2 = 0xFFFF; /*0xffc88ef9*/
v39 = 4 * *(unsigned __int8 *)(__return_address + 244317); /*0xffc88f08*/
if ( v39 ) /*0xffc88f0e*/
{
v30 = 0; /*0xffc88f14*/
do /*0xffc88f2e*/
{
n0xFFFF_3 = *(_DWORD *)(buf + 4 * (v26 + v30)); /*0xffc88f18*/
if ( n0xFFFF_3 && n0xFFFF_3 < n0xFFFF_2 ) /*0xffc88f21*/
n0xFFFF_2 = n0xFFFF_3; /*0xffc88f23*/
v30 = ++v28; /*0xffc88f27*/
}
while ( v28 < v39 ); /*0xffc88f2e*/
v23 = v41; /*0xffc88f30*/
p_n8_3 = p_n8_4; /*0xffc88f34*/
}
v32 = n0xFFFF_2 * n8; /*0xffc88f3b*/
*v23 = v32; /*0xffc88f41*/
if ( v32 > v42[n7_2] ) /*0xffc88f47*/
n7_2 = n7_1; /*0xffc88f49*/
v33 = v32 == v42[n7_2]; /*0xffc88f4e*/
v26 = v37; /*0xffc88f52*/
if ( v33 && n8 > p_n8[n7_2] ) /*0xffc88f5f*/
n7_2 = n7_1; /*0xffc88f61*/
}
v26 += 8; /*0xffc88f63*/
++v23; /*0xffc88f66*/
++n7_1; /*0xffc88f69*/
v37 = v26; /*0xffc88f6b*/
++p_n8_3; /*0xffc88f6f*/
v41 = v23; /*0xffc88f70*/
p_n8_4 = p_n8_3; /*0xffc88f74*/
}
while ( n7_1 < 7u ); /*0xffc88f7b*/
return n7_2; /*0xffc88f81*/
}
// Function: MemChipFunc8F8B @ 0xffc88f8b (0x1c5 bytes)
// Index: 1051/2560
_BYTE *__cdecl MemChipFunc8F8B(int __return_address, int buf, _BYTE *n3, unsigned int *a4, unsigned __int8 n2)
{
int __return_address_1; // edx
_BYTE *result; // eax
int v7; // esi
int n4; // ecx
int v9; // edi
unsigned __int8 v10; // bl
unsigned __int8 v11; // bh
int n2_1; // eax
unsigned __int8 v13; // cl
int v14; // eax
unsigned int v15; // eax
unsigned int v16; // eax
unsigned int v17; // eax
unsigned __int8 v18; // [esp+13h] [ebp-11h]
_BYTE *v19; // [esp+14h] [ebp-10h]
int n4_1; // [esp+18h] [ebp-Ch]
int v21; // [esp+1Ch] [ebp-8h]
int v22; // [esp+1Ch] [ebp-8h]
int v23; // [esp+1Ch] [ebp-8h]
__return_address_1 = __return_address; /*0xffc88f8e*/
result = (_BYTE *)(__return_address + 258689); /*0xffc88f98*/
v7 = 0; /*0xffc88f9e*/
n4 = 4; /*0xffc88fa0*/
v9 = __return_address + 10239; /*0xffc88fa1*/
v19 = (_BYTE *)(__return_address + 258689); /*0xffc88fa7*/
n4_1 = 4; /*0xffc88fab*/
do /*0xffc89142*/
{
if ( *result ) /*0xffc88faf*/
{
v10 = *(_BYTE *)(__return_address_1 + 244317); /*0xffc88fb8*/
v11 = 0; /*0xffc88fbe*/
if ( v10 ) /*0xffc88fc2*/
{
n2_1 = n2; /*0xffc88fc8*/
v13 = 0; /*0xffc88fcd*/
v18 = 0; /*0xffc88fd3*/
do /*0xffc8911d*/
{
if ( n2_1 ) /*0xffc88fda*/
{
v14 = n2_1 - 1; /*0xffc88fe0*/
if ( v14 ) /*0xffc88fe3*/
{
if ( v14 == 1 ) /*0xffc88fe8*/
{
v21 = *(_DWORD *)(8077 * v13 + v9 + 16212); /*0xffc88ffe*/
if ( v21 ) /*0xffc89004*/
{
*(_DWORD *)(buf + 4 * (v11 + v7 * v10) + 64) = v21; /*0xffc8901d*/
__return_address_1 = __return_address; /*0xffc89025*/
++n3[2]; /*0xffc8902d*/
v15 = *(_DWORD *)(buf + 4 * (v11 + v7 * *(unsigned __int8 *)(__return_address + 244317)) + 64); /*0xffc89040*/
if ( a4[2] > v15 ) /*0xffc89047*/
a4[2] = v15; /*0xffc8904d*/
}
}
}
else
{
v22 = *(_DWORD *)(8077 * v13 + v9 + 8135); /*0xffc89065*/
if ( v22 ) /*0xffc8906b*/
{
*(_DWORD *)(buf + 4 * (v11 + v7 * v10) + 32) = v22; /*0xffc89084*/
__return_address_1 = __return_address; /*0xffc8908c*/
++n3[1]; /*0xffc89090*/
v16 = *(_DWORD *)(buf + 4 * (v11 + v7 * *(unsigned __int8 *)(__return_address + 244317)) + 32); /*0xffc890a5*/
if ( a4[1] > v16 ) /*0xffc890ac*/
a4[1] = v16; /*0xffc890ae*/
}
}
}
else
{
v23 = *(_DWORD *)(8077 * v13 + v9 + 58); /*0xffc890c0*/
if ( v23 ) /*0xffc890c6*/
{
*(_DWORD *)(buf + 4 * (v11 + v7 * v10)) = v23; /*0xffc890db*/
__return_address_1 = __return_address; /*0xffc890e3*/
++*n3; /*0xffc890e7*/
v17 = *(_DWORD *)(buf + 4 * (v11 + v7 * *(unsigned __int8 *)(__return_address + 244317))); /*0xffc890fb*/
if ( *a4 > v17 ) /*0xffc89101*/
*a4 = v17; /*0xffc89103*/
}
}
v18 += 3; /*0xffc89106*/
++v11; /*0xffc8910b*/
v10 = *(_BYTE *)(__return_address_1 + 244317); /*0xffc8910d*/
v13 = v18; /*0xffc89113*/
n2_1 = n2; /*0xffc89117*/
}
while ( v11 < v10 ); /*0xffc8911d*/
result = v19; /*0xffc89123*/
n4 = n4_1; /*0xffc89127*/
}
}
result += 48704; /*0xffc8912b*/
++v7; /*0xffc89130*/
v9 += 50813; /*0xffc89131*/
v19 = result; /*0xffc89137*/
n4_1 = --n4; /*0xffc8913e*/
}
while ( n4 ); /*0xffc89142*/
return result; /*0xffc89148*/
}
// Function: MemChipFunc9150 @ 0xffc89150 (0xf3 bytes)
// Index: 1052/2560
unsigned int __cdecl MemChipFunc9150(int __return_address, int buf, int n3, int a4, int a5, unsigned __int8 n2)
{
unsigned __int8 v6; // bl
unsigned __int8 v7; // al
unsigned int result; // eax
int v9; // ecx
unsigned int v10; // edx
unsigned __int8 n2_1; // [esp+Ch] [ebp-ECh]
char v12[4]; // [esp+Ch] [ebp-ECh]
unsigned __int8 p_n8[5]; // [esp+10h] [ebp-E8h] BYREF
__int16 v14; // [esp+15h] [ebp-E3h]
_DWORD bufa[56]; // [esp+18h] [ebp-E0h] BYREF
v6 = 0; /*0xffc8915e*/
KtiFunc7D83(bufa, 0, 0xE0u); /*0xffc89166*/
memset(p_n8, 0, sizeof(p_n8)); /*0xffc89178*/
v14 = 0; /*0xffc89180*/
n2_1 = 0; /*0xffc89185*/
if ( n2 ) /*0xffc8918b*/
{
if ( n2 == 1 ) /*0xffc89190*/
{
n2_1 = 2; /*0xffc8919e*/
}
else if ( n2 == 2 ) /*0xffc89195*/
{
n2_1 = 4; /*0xffc89197*/
}
}
else
{
n2_1 = 1; /*0xffc891a5*/
}
v7 = MemChipFn_FFC88D67(__return_address, (int)bufa, p_n8, n2_1); /*0xffc891c0*/
*(_DWORD *)v12 = v7; /*0xffc891cb*/
*(_BYTE *)(n2 + n3) = p_n8[v7]; /*0xffc891dc*/
*(_BYTE *)(n2 + a5) = v7 + 1; /*0xffc891e6*/
result = 4 * *(unsigned __int8 *)(__return_address + 244317); /*0xffc891f0*/
if ( result ) /*0xffc891f5*/
{
v9 = 0; /*0xffc891ff*/
do /*0xffc89236*/
{
v10 = bufa[8 * *(_DWORD *)v12 + v9]; /*0xffc89208*/
*(_DWORD *)(buf + 4 * (v9 + 8 * n2)) = v10; /*0xffc89216*/
if ( v10 ) /*0xffc8921b*/
{
if ( *(_DWORD *)(a4 + 4 * n2) > v10 ) /*0xffc89220*/
*(_DWORD *)(a4 + 4 * n2) = v10; /*0xffc89222*/
}
v9 = ++v6; /*0xffc8922e*/
result = 4 * *(unsigned __int8 *)(__return_address + 244317); /*0xffc89231*/
}
while ( v6 < result ); /*0xffc89236*/
}
return result; /*0xffc89239*/
}
// Function: MemChipFunc9243 @ 0xffc89243 (0x1e6 bytes)
// Index: 1053/2560
_BYTE *__cdecl MemChipFunc9243(int __return_address, int buf, _BYTE *n3, unsigned int *a4, unsigned __int8 a5)
{
int __return_address_1; // edi
int v6; // ebp
int n4; // ecx
_BYTE *result; // eax
int v9; // edx
unsigned __int8 v10; // bl
unsigned __int8 v11; // bh
int v12; // eax
unsigned __int8 v13; // cl
int v14; // eax
int v15; // eax
unsigned int v16; // esi
unsigned int v17; // eax
unsigned int v18; // eax
int v19; // eax
unsigned int v20; // esi
unsigned int v21; // eax
unsigned int v22; // eax
int v23; // eax
unsigned int v24; // esi
unsigned int v25; // eax
unsigned int v26; // eax
unsigned __int8 v27; // [esp+13h] [ebp-Dh]
_BYTE *v28; // [esp+14h] [ebp-Ch]
int n4_1; // [esp+18h] [ebp-8h]
__return_address_1 = __return_address; /*0xffc8924a*/
v6 = 0; /*0xffc8924e*/
n4 = 4; /*0xffc89252*/
n4_1 = 4; /*0xffc89253*/
result = (_BYTE *)(__return_address + 258689); /*0xffc89257*/
v9 = __return_address + 10239; /*0xffc8925d*/
v28 = (_BYTE *)(__return_address + 258689); /*0xffc89263*/
do /*0xffc8941b*/
{
if ( *result ) /*0xffc89267*/
{
v10 = *(_BYTE *)(__return_address_1 + 244317); /*0xffc89270*/
v11 = 0; /*0xffc89276*/
if ( v10 ) /*0xffc8927a*/
{
v12 = a5; /*0xffc89280*/
v13 = 0; /*0xffc89285*/
v27 = 0; /*0xffc8928b*/
do /*0xffc893f6*/
{
if ( v12 ) /*0xffc89292*/
{
v14 = v12 - 1; /*0xffc89298*/
if ( v14 ) /*0xffc8929b*/
{
if ( v14 == 1 ) /*0xffc892a0*/
{
v15 = 8077 * v13; /*0xffc892a9*/
v16 = *(_DWORD *)(v15 + v9 + 8135); /*0xffc892af*/
if ( v16 ) /*0xffc892b8*/
{
v17 = *(_DWORD *)(v15 + v9 + 16212); /*0xffc892be*/
if ( v17 ) /*0xffc892c7*/
{
if ( v16 >= v17 ) /*0xffc892cf*/
v16 = v17; /*0xffc892d1*/
*(_DWORD *)(buf + 4 * (v11 + v6 * v10) + 64) = v16; /*0xffc892e2*/
__return_address_1 = __return_address; /*0xffc892ea*/
++n3[2]; /*0xffc892ee*/
v18 = *(_DWORD *)(buf + 4 * (v11 + v6 * *(unsigned __int8 *)(__return_address + 244317)) + 64); /*0xffc89301*/
if ( a4[2] > v18 ) /*0xffc8930c*/
a4[2] = v18; /*0xffc89312*/
}
}
}
}
else
{
v19 = 8077 * v13; /*0xffc8931d*/
v20 = *(_DWORD *)(v19 + v9 + 58); /*0xffc89323*/
if ( v20 ) /*0xffc89329*/
{
v21 = *(_DWORD *)(v19 + v9 + 16212); /*0xffc8932f*/
if ( v21 ) /*0xffc89338*/
{
if ( v20 >= v21 ) /*0xffc89340*/
v20 = v21; /*0xffc89342*/
*(_DWORD *)(buf + 4 * (v11 + v6 * v10) + 32) = v20; /*0xffc89353*/
__return_address_1 = __return_address; /*0xffc8935b*/
++n3[1]; /*0xffc8935f*/
v22 = *(_DWORD *)(buf + 4 * (v11 + v6 * *(unsigned __int8 *)(__return_address + 244317)) + 32); /*0xffc89372*/
if ( a4[1] > v22 ) /*0xffc8937d*/
a4[1] = v22; /*0xffc8937f*/
}
}
}
}
else
{
v23 = 8077 * v13; /*0xffc89387*/
v24 = *(_DWORD *)(v23 + v9 + 58); /*0xffc8938d*/
if ( v24 ) /*0xffc89393*/
{
v25 = *(_DWORD *)(v23 + v9 + 8135); /*0xffc89395*/
if ( v25 ) /*0xffc8939e*/
{
if ( v24 >= v25 ) /*0xffc893a2*/
v24 = v25; /*0xffc893a4*/
*(_DWORD *)(buf + 4 * (v11 + v6 * v10)) = v24; /*0xffc893b5*/
__return_address_1 = __return_address; /*0xffc893bc*/
++*n3; /*0xffc893c0*/
v26 = *(_DWORD *)(buf + 4 * (v11 + v6 * *(unsigned __int8 *)(__return_address + 244317))); /*0xffc893d2*/
if ( *a4 > v26 ) /*0xffc893db*/
*a4 = v26; /*0xffc893dd*/
}
}
}
v27 += 3; /*0xffc893df*/
++v11; /*0xffc893e4*/
v10 = *(_BYTE *)(__return_address_1 + 244317); /*0xffc893e6*/
v13 = v27; /*0xffc893ec*/
v12 = a5; /*0xffc893f0*/
}
while ( v11 < v10 ); /*0xffc893f6*/
result = v28; /*0xffc893fc*/
n4 = n4_1; /*0xffc89400*/
}
}
result += 48704; /*0xffc89404*/
++v6; /*0xffc89409*/
v9 += 50813; /*0xffc8940a*/
v28 = result; /*0xffc89410*/
n4_1 = --n4; /*0xffc89417*/
}
while ( n4 ); /*0xffc8941b*/
return result; /*0xffc89421*/
}
// Function: MemChipFunc9429 @ 0xffc89429 (0xf3 bytes)
// Index: 1054/2560
unsigned int __cdecl MemChipFunc9429(int __return_address, int buf, int n3, int a4, int a5, unsigned __int8 n2)
{
unsigned __int8 v6; // bl
unsigned __int8 v7; // al
unsigned int result; // eax
int v9; // ecx
unsigned int v10; // edx
unsigned __int8 n5; // [esp+Ch] [ebp-ECh]
char v12[4]; // [esp+Ch] [ebp-ECh]
unsigned __int8 p_n8[5]; // [esp+10h] [ebp-E8h] BYREF
__int16 v14; // [esp+15h] [ebp-E3h]
_DWORD bufa[56]; // [esp+18h] [ebp-E0h] BYREF
v6 = 0; /*0xffc89437*/
KtiFunc7D83(bufa, 0, 0xE0u); /*0xffc8943f*/
memset(p_n8, 0, sizeof(p_n8)); /*0xffc89451*/
v14 = 0; /*0xffc89459*/
n5 = 0; /*0xffc8945e*/
if ( n2 ) /*0xffc89464*/
{
if ( n2 == 1 ) /*0xffc89469*/
{
n5 = 5; /*0xffc89477*/
}
else if ( n2 == 2 ) /*0xffc8946e*/
{
n5 = 6; /*0xffc89470*/
}
}
else
{
n5 = 3; /*0xffc8947e*/
}
v7 = MemChipFn_FFC88D67(__return_address, (int)bufa, p_n8, n5); /*0xffc89499*/
*(_DWORD *)v12 = v7; /*0xffc894a4*/
*(_BYTE *)(n2 + n3) = p_n8[v7]; /*0xffc894b5*/
*(_BYTE *)(n2 + a4) = v7 + 1; /*0xffc894bf*/
result = 4 * *(unsigned __int8 *)(__return_address + 244317); /*0xffc894c9*/
if ( result ) /*0xffc894ce*/
{
v9 = 0; /*0xffc894d8*/
do /*0xffc8950f*/
{
v10 = bufa[8 * *(_DWORD *)v12 + v9]; /*0xffc894e1*/
*(_DWORD *)(buf + 4 * (v9 + 8 * n2)) = v10; /*0xffc894ef*/
if ( v10 ) /*0xffc894f4*/
{
if ( *(_DWORD *)(a5 + 4 * n2) > v10 ) /*0xffc894f9*/
*(_DWORD *)(a5 + 4 * n2) = v10; /*0xffc894fb*/
}
v9 = ++v6; /*0xffc89507*/
result = 4 * *(unsigned __int8 *)(__return_address + 244317); /*0xffc8950a*/
}
while ( v6 < result ); /*0xffc8950f*/
}
return result; /*0xffc89512*/
}
// Function: MemChipFunc951C @ 0xffc8951c (0x41 bytes)
// Index: 1055/2560
int __cdecl MemChipFunc951C(int n4, int a2)
{
int result; // eax
MemChipFuncD639(n4); /*0xffc89522*/
result = MemChipFuncEE5B(n4); /*0xffc89528*/
if ( !result && (!*(_BYTE *)(n4 + 10186) || (result = KtiFunc4112(n4, a2)) == 0) ) /*0xffc89549*/
{
KtiFn_FFCA33A7(n4); /*0xffc8954c*/
KtiFn_FFCA3B2A(n4); /*0xffc89552*/
return 0; /*0xffc89559*/
}
return result; /*0xffc8955b*/
}
// Function: MemChipFunc955D @ 0xffc8955d (0x103 bytes)
// Index: 1056/2560
char __cdecl MemChipFunc955D(int n4, unsigned __int8 a2, char a3, _DWORD *a4, _DWORD *a5)
{
unsigned __int8 v5; // cl
int v6; // edx
int v7; // edi
__int16 n2; // ax
int n24; // edi
int v10; // ecx
__int16 n8; // ax
unsigned __int8 v13; // [esp+1Ch] [ebp+Ch]
*a4 = 0; /*0xffc89567*/
*a5 = 0; /*0xffc89574*/
v13 = a2 * *(_BYTE *)(n4 + 244317) + a3; /*0xffc89588*/
v5 = 0; /*0xffc8958c*/
v6 = 50813 * a2; /*0xffc89592*/
while ( 1 ) /*0xffc8959e*/
{
v7 = v6 + 19 * v5; /*0xffc8959e*/
if ( *(_BYTE *)(v7 + n4 + 58813) ) /*0xffc895a0*/
{
if ( *(_BYTE *)(v6 + v13 + 8 * v5 + n4 + 59255) == 1 ) /*0xffc895ba*/
{
n2 = *(_WORD *)(v7 + n4 + 58800); /*0xffc895bc*/
if ( n2 == 2 || n2 == 8 || n2 == 6 ) /*0xffc895da*/
break; /*0xffc895da*/
}
}
if ( ++v5 >= 0x18u ) /*0xffc895e1*/
goto LABEL_12; /*0xffc895e1*/
}
if ( v5 ) /*0xffc895e7*/
*a5 = *(_DWORD *)(v6 + 19 * v5 + n4 + 58784) - 1; /*0xffc895ff*/
else
*a5 = 0; /*0xffc895e9*/
LABEL_12:
n24 = 24; /*0xffc89602*/
v10 = v6 + n4 + 58800; /*0xffc89611*/
do /*0xffc89657*/
{
if ( *(_BYTE *)(v10 + 13) ) /*0xffc89614*/
{
if ( *(_BYTE *)(v6 + v13 + n4 + 59255) == 1 ) /*0xffc89629*/
{
n8 = *(_WORD *)v10; /*0xffc8962b*/
if ( *(_WORD *)v10 == 2 || n8 == 8 || n8 == 6 ) /*0xffc89644*/
*a4 = *(_DWORD *)(v10 + 3) - 1; /*0xffc8964a*/
}
}
v10 += 19; /*0xffc8964f*/
v6 += 8; /*0xffc89652*/
--n24; /*0xffc89654*/
}
while ( n24 ); /*0xffc89657*/
return 0; /*0xffc89659*/
}
// Function: MemChipFunc9660 @ 0xffc89660 (0xa0 bytes)
// Index: 1057/2560
int __cdecl MemChipFunc9660(int n4, unsigned __int8 a2, unsigned __int8 a3)
{
unsigned int v3; // edi
int SocketInfo; // ebp
int i_1; // edx
unsigned int i_2; // esi
int i; // ecx
unsigned int v8; // eax
int v10; // [esp+18h] [ebp+8h]
v3 = -1; /*0xffc8966e*/
SocketInfo = GetSocketInfo(n4, a2); /*0xffc8967c*/
v10 = 50813 * a2 + n4 + 10239; /*0xffc8969c*/
i_1 = a3 * *(unsigned __int8 *)(n4 + 9475); /*0xffc896a8*/
i_2 = i_1 + 3; /*0xffc896ab*/
for ( i = (unsigned __int8)i_1; (unsigned __int8)i_1 < i_2; i = (unsigned __int8)i_1 ) /*0xffc896b3*/
{
if ( *(_BYTE *)(7688 * i + SocketInfo) ) /*0xffc896bf*/
{
v8 = *(_DWORD *)(8077 * i + v10 + 2); /*0xffc896cb*/
if ( v8 ) /*0xffc896d1*/
{
if ( v8 < v3 ) /*0xffc896d5*/
v3 = *(_DWORD *)(8077 * i + v10 + 2); /*0xffc896d7*/
}
}
LOBYTE(i_1) = i_1 + 1; /*0xffc896d9*/
}
return 16 * (unsigned __int16)RmtFunc6E78((v3 != -1 ? v3 : 0) >> 4);
}
// Function: MemChipFunc9700 @ 0xffc89700 (0x54 bytes)
// Index: 1058/2560
char __cdecl MemChipFunc9700(int a1, unsigned __int8 a2, unsigned __int8 a3)
{
int v3; // ecx
unsigned __int8 v4; // bl
char v5; // dl
_DWORD *v6; // eax
int v7; // esi
LOBYTE(v3) = 0; /*0xffc89705*/
v4 = *(_BYTE *)(a1 + 9475); /*0xffc89714*/
if ( v4 ) /*0xffc8971c*/
{
v5 = 0; /*0xffc8972f*/
v6 = (_DWORD *)(a1 + 10241 + 50813 * a2 + 24231 * a3); /*0xffc89733*/
v7 = v4; /*0xffc89735*/
do /*0xffc8974c*/
{
if ( *v6 ) /*0xffc89738*/
v3 = (unsigned __int8)v3 | (1 << v5); /*0xffc89740*/
++v5; /*0xffc89743*/
v6 = (_DWORD *)((char *)v6 + 8077); /*0xffc89744*/
--v7; /*0xffc89749*/
}
while ( v7 ); /*0xffc8974c*/
}
return v3; /*0xffc8974e*/
}
// Function: MemChipFunc9754 @ 0xffc89754 (0x3a bytes)
// Index: 1059/2560
char __cdecl MemChipFunc9754(int n4, unsigned __int8 a2, unsigned __int8 a3)
{
char v3; // dl
_DWORD *v4; // eax
int n3; // ecx
v3 = 0; /*0xffc89759*/
v4 = (_DWORD *)(n4 + 24231 * a3 + 50813 * a2 + 10241); /*0xffc89777*/
n3 = 3; /*0xffc89779*/
do /*0xffc89789*/
{
if ( *v4 ) /*0xffc8977a*/
++v3; /*0xffc8977f*/
v4 = (_DWORD *)((char *)v4 + 8077); /*0xffc89781*/
--n3; /*0xffc89786*/
}
while ( n3 ); /*0xffc89789*/
return v3; /*0xffc8978d*/
}
// Function: MemChipFunc978E @ 0xffc8978e (0x30 bytes)
// Index: 1060/2560
char __cdecl MemChipFunc978E(int a1, unsigned __int8 a2)
{
unsigned __int8 v2; // cl
v2 = 0; /*0xffc8979f*/
while ( *(_BYTE *)(19 * v2 + 50813 * a2 + a1 + 58799) ) /*0xffc897af*/
{
if ( ++v2 >= 0x18u ) /*0xffc897b6*/
return -1; /*0xffc897ba*/
}
return v2; /*0xffc897ba*/
}
// Function: MemChipFunc97BE @ 0xffc897be (0xc7 bytes)
// Index: 1061/2560
char __cdecl MemChipFunc97BE(unsigned __int8 *n4, unsigned __int8 a2, char a3, char *a4, char *p_n12)
{
unsigned __int8 n0x14; // dl
char v6; // bh
char *p_n12_1; // esi
unsigned __int8 *v8; // ebp
unsigned __int8 v9; // cl
char n12; // bl
int v11; // eax
unsigned int n16; // eax
unsigned int v13; // eax
unsigned int v14; // eax
unsigned int n2; // eax
unsigned __int8 *v17; // [esp+18h] [ebp+8h]
n0x14 = 0; /*0xffc897c3*/
v6 = -1; /*0xffc897d6*/
p_n12_1 = p_n12; /*0xffc897e1*/
v17 = &n4[50813 * a2 + 10189]; /*0xffc897f0*/
*a4 = 0; /*0xffc897f4*/
*p_n12 = 0; /*0xffc897f6*/
v8 = &v17[768 * (unsigned __int8)a3]; /*0xffc897f8*/
do /*0xffc897fa*/
{
v9 = *a4; /*0xffc897fa*/
if ( (unsigned __int8)*a4 >= 8u ) /*0xffc897ff*/
break; /*0xffc897ff*/
n12 = *p_n12_1; /*0xffc89801*/
if ( (unsigned __int8)*p_n12_1 >= 0xCu ) /*0xffc89806*/
break; /*0xffc89806*/
v11 = 19 * n0x14; /*0xffc8980b*/
if ( !v8[v11 + 49645] ) /*0xffc89816*/
return n0x14; /*0xffc8987c*/
n16 = *(unsigned __int16 *)&v17[19 * v8[v11 + 49646] + 48611]; /*0xffc89827*/
p_n12_1 = p_n12; /*0xffc8982f*/
if ( n16 > 8 ) /*0xffc89836*/
{
if ( n16 != 16 && n16 != 32 && n16 != 260 ) /*0xffc8986d*/
goto LABEL_17; /*0xffc8986d*/
LABEL_16:
*p_n12 = n12 + 1; /*0xffc8986f*/
goto LABEL_17; /*0xffc89871*/
}
if ( n16 == 8 ) /*0xffc89838*/
goto LABEL_11; /*0xffc89838*/
v13 = n16 - 1; /*0xffc8983a*/
if ( !v13 ) /*0xffc8983d*/
{
*a4 = v9 + 1; /*0xffc8985a*/
goto LABEL_17; /*0xffc8985c*/
}
v14 = v13 - 1; /*0xffc8983f*/
if ( !v14 ) /*0xffc89842*/
goto LABEL_11; /*0xffc89842*/
n2 = v14 - 2; /*0xffc89845*/
if ( !n2 ) /*0xffc89848*/
goto LABEL_16; /*0xffc89848*/
if ( n2 == 2 ) /*0xffc8984e*/
{
LABEL_11:
*a4 = v9 + 1; /*0xffc89852*/
++*p_n12; /*0xffc89854*/
}
LABEL_17:
++n0x14; /*0xffc89873*/
}
while ( n0x14 < 0x14u ); /*0xffc897fa*/
return v6; /*0xffc8987e*/
}
// Function: MemChipFunc9885 @ 0xffc89885 (0x45 bytes)
// Index: 1062/2560
int __cdecl MemChipFunc9885(int n4, unsigned __int8 a2, unsigned __int8 a3, unsigned __int8 i)
{
int v4; // ebx
unsigned __int8 v5; // cl
int v6; // eax
v4 = 0; /*0xffc8989e*/
v5 = 0; /*0xffc898a8*/
v6 = 0; /*0xffc898aa*/
do /*0xffc898c1*/
{
if ( *(_BYTE *)(50813 * a2 + n4 + v6 + 8 * i + 59255) == 1 ) /*0xffc898b6*/
LOBYTE(v4) = v4 + 1; /*0xffc898b8*/
v6 = ++v5; /*0xffc898bc*/
}
while ( v5 <= a3 + 2 * (unsigned int)a2 ); /*0xffc898c1*/
return v4 - 1; /*0xffc898c3*/
}
// Function: MemChipFunc98CA @ 0xffc898ca (0x90 bytes)
// Index: 1063/2560
int __cdecl MemChipFunc98CA(int __return_address)
{
int n4; // eax
int v4; // esi
int v5; // edi
_BYTE *v6; // edx
int n6; // eax
int v8; // ebx
_BYTE *v9; // ebp
int n4_1; // [esp+0h] [ebp-4h]
int n6_1; // [esp+8h] [ebp+4h]
if ( !__return_address ) /*0xffc898d1*/
return 0; /*0xffc898d3*/
n4 = 4; /*0xffc898dd*/
v4 = 0; /*0xffc898de*/
n4_1 = 4; /*0xffc898e0*/
v5 = 0; /*0xffc898e4*/
v6 = (_BYTE *)(__return_address + 258722); /*0xffc898e6*/
do /*0xffc89950*/
{
if ( *(v6 - 33) ) /*0xffc898ec*/
{
n6 = 6; /*0xffc898f4*/
v8 = 0; /*0xffc898f5*/
n6_1 = 6; /*0xffc898f7*/
v9 = v6; /*0xffc898fb*/
do /*0xffc89937*/
{
if ( *v9 ) /*0xffc898fd*/
{
if ( *(_BYTE *)(__return_address + 244425) == 1 ) /*0xffc8990a*/
v4 += *(_DWORD *)(v5 + v8 + __return_address + 10273); /*0xffc8990f*/
v4 += *(_DWORD *)(v5 + v8 + __return_address + 10281); /*0xffc89919*/
n6 = n6_1; /*0xffc89920*/
}
v9 += 7688; /*0xffc89924*/
v8 += 8077; /*0xffc8992a*/
n6_1 = --n6; /*0xffc89933*/
}
while ( n6 ); /*0xffc89937*/
n4 = n4_1; /*0xffc89939*/
}
v6 += 48704; /*0xffc8993d*/
v5 += 50813; /*0xffc89943*/
n4_1 = --n4; /*0xffc8994c*/
}
while ( n4 ); /*0xffc89950*/
return v4; /*0xffc898d6*/
}
// Function: MemChipFunc995A @ 0xffc8995a (0x21e bytes)
// Index: 1064/2560
int __cdecl MemChipFunc995A(int n4, int n3, unsigned __int8 n2, char *a4)
{
int SocketInfo; // edx
int n3_1; // eax
int n4_1; // ebp
int v8; // ebx
unsigned int v9; // ecx
_BYTE *v10; // edi
unsigned __int8 n2a_1; // al
char *v12; // eax
int n2_2; // ecx
int CpuCount; // eax
_WORD *v15; // ebp
_WORD *v16; // edx
char *v17; // ecx
int n2_1; // eax
int v19; // eax
int v20; // eax
_DWORD *v22; // [esp+10h] [ebp-10h]
int v23; // [esp+14h] [ebp-Ch]
unsigned __int8 v24; // [esp+18h] [ebp-8h]
int v25; // [esp+1Ch] [ebp-4h]
unsigned __int8 n2a; // [esp+2Ch] [ebp+Ch]
int n2b; // [esp+2Ch] [ebp+Ch]
unsigned __int8 v28; // [esp+30h] [ebp+10h]
DebugPrint(n4, 3, n3, 255, 255, 255, 255, 255, "GetImcDdrtTopology Start IMC %x\n", n2); /*0xffc89984*/
*a4 = *(_BYTE *)(n4 + 244313) != 1 ? 0 : 2;
a4[1] = 0; /*0xffc8999f*/
SocketInfo = GetSocketInfo(n4, n3); /*0xffc899a8*/
n3_1 = n3; /*0xffc899ac*/
*((_WORD *)a4 + 1) = 0; /*0xffc899ae*/
n4_1 = n4; /*0xffc899b2*/
v8 = 3 * n2; /*0xffc899c7*/
v23 = v8; /*0xffc899ca*/
v24 = 3 * n2; /*0xffc899ce*/
v28 = v8 + 3; /*0xffc899d5*/
if ( (unsigned __int8)v8 < (unsigned __int8)(v8 + 3) ) /*0xffc899db*/
{
v9 = (unsigned __int8)v8; /*0xffc899e1*/
v25 = (unsigned __int8)v8; /*0xffc899f0*/
v22 = (_DWORD *)(n4 + 50813 * (unsigned __int8)n3 + 10253 + 8077 * (unsigned __int8)v8); /*0xffc899fe*/
v10 = (_BYTE *)(SocketInfo + 7688 * (unsigned __int8)v8 + 6262); /*0xffc89a08*/
do /*0xffc89b49*/
{
n2a_1 = v9 % 3; /*0xffc89a13*/
n2a = n2a_1; /*0xffc89a15*/
if ( n2a_1 ) /*0xffc89a1b*/
*((_WORD *)a4 + 1) *= 16; /*0xffc89a1d*/
if ( *(v10 - 6262) ) /*0xffc89a22*/
{
if ( *v22 ) /*0xffc89a52*/
*a4 |= 1u; /*0xffc89a57*/
CpuCount = GetCpuCount(n4_1, n3, v24); /*0xffc89a63*/
v15 = (_WORD *)((char *)v22 + 2325); /*0xffc89a72*/
v16 = (_WORD *)(CpuCount + 1297); /*0xffc89a78*/
v17 = &a4[16 * n2a + 4]; /*0xffc89a88*/
n2_1 = 2; /*0xffc89a8a*/
n2b = 2; /*0xffc89a8b*/
do /*0xffc89b16*/
{
if ( *((_BYTE *)v16 - 1297) ) /*0xffc89a8f*/
{
++*((_WORD *)a4 + 1); /*0xffc89aa2*/
if ( *((_BYTE *)v16 - 1190) ) /*0xffc89aa6*/
{
*(_DWORD *)v17 = 5; /*0xffc89aaf*/
++a4[1]; /*0xffc89ab5*/
*((_WORD *)v17 + 2) = *v16 >> 4; /*0xffc89abf*/
*((_WORD *)v17 + 3) = v16[17] >> 4; /*0xffc89acb*/
}
else
{
*((_WORD *)v17 + 2) = *v15 >> 4; /*0xffc89ad9*/
v19 = 0; /*0xffc89add*/
*((_WORD *)v17 + 3) = 0; /*0xffc89adf*/
if ( *((_BYTE *)v16 - 48) ) /*0xffc89ae3*/
{
LOBYTE(v19) = *v10 != 0; /*0xffc89aea*/
v20 = v19 + 3; /*0xffc89aed*/
}
else
{
v20 = (*v10 != 0) + 1; /*0xffc89af9*/
}
*(_DWORD *)v17 = v20; /*0xffc89afa*/
}
n2_1 = n2b; /*0xffc89afc*/
}
else
{
*(_DWORD *)v17 = 0; /*0xffc89a98*/
*((_DWORD *)v17 + 1) = 0; /*0xffc89a9d*/
}
v17 += 8; /*0xffc89b00*/
v15 += 1344; /*0xffc89b03*/
v16 = (_WORD *)((char *)v16 + 1379); /*0xffc89b09*/
n2b = --n2_1; /*0xffc89b12*/
}
while ( n2_1 ); /*0xffc89b16*/
v8 = v23; /*0xffc89b1c*/
n4_1 = n4; /*0xffc89b20*/
}
else
{
v12 = &a4[16 * n2a_1 + 8]; /*0xffc89a36*/
n2_2 = 2; /*0xffc89a38*/
do /*0xffc89a47*/
{
*((_DWORD *)v12 - 1) = 0; /*0xffc89a39*/
*(_DWORD *)v12 = 0; /*0xffc89a3f*/
v12 += 8; /*0xffc89a41*/
--n2_2; /*0xffc89a44*/
}
while ( n2_2 ); /*0xffc89a47*/
}
LOBYTE(v8) = v8 + 1; /*0xffc89b28*/
v22 = (_DWORD *)((char *)v22 + 8077); /*0xffc89b2a*/
v9 = v25 + 1; /*0xffc89b32*/
v10 += 7688; /*0xffc89b33*/
v23 = v8; /*0xffc89b39*/
v24 = v8; /*0xffc89b3d*/
++v25; /*0xffc89b41*/
}
while ( (unsigned __int8)v8 < v28 ); /*0xffc89b49*/
n3_1 = n3; /*0xffc89b4f*/
}
return DebugPrint(n4_1, 3, n3_1, 255, 255, 255, 255, 255, "GetImcDdrtTopology End\n"); /*0xffc89b70*/
}
// Function: MemChipFunc9B78 @ 0xffc89b78 (0xe4 bytes)
// Index: 1065/2560
int __cdecl MemChipFunc9B78(unsigned __int8 *n4, unsigned __int8 a2, char a3, char a4, unsigned __int8 i, int a6)
{
unsigned __int8 v6; // bl
unsigned __int8 *n4a_1; // ecx
int v8; // edx
int v9; // eax
unsigned __int8 v10; // dh
unsigned __int8 v11; // dl
unsigned __int8 *v12; // eax
unsigned __int8 *n4a; // [esp+14h] [ebp+4h]
int v15; // [esp+1Ch] [ebp+Ch]
unsigned __int8 v16; // [esp+20h] [ebp+10h]
v6 = 0; /*0xffc89b90*/
v16 = a4 + 3 * a3; /*0xffc89bb3*/
n4a_1 = &n4[50813 * a2 + 12557 + 8077 * v16]; /*0xffc89bb7*/
v8 = 2688 * i; /*0xffc89bb9*/
n4a = n4a_1; /*0xffc89bbf*/
v15 = v8; /*0xffc89bc3*/
while ( 1 ) /*0xffc89bcd*/
{
v9 = v8 + 18 * v6; /*0xffc89bcd*/
if ( !n4a_1[v9 + 1903] || !n4a_1[v9 + 1904] || !n4a_1[v9 + 1905] || *(_DWORD *)&n4a_1[v9 + 1906] != a6 ) /*0xffc89bf4*/
goto LABEL_12; /*0xffc89bf4*/
v10 = n4a_1[v9 + 1912]; /*0xffc89bf6*/
v11 = 0; /*0xffc89bfd*/
if ( v10 ) /*0xffc89c01*/
break; /*0xffc89c01*/
LABEL_11:
v8 = v15; /*0xffc89c40*/
LABEL_12:
if ( ++v6 >= 2u ) /*0xffc89c49*/
return 0; /*0xffc89c55*/
}
while ( 1 ) /*0xffc89c1e*/
{
v12 = &n4a_1[2688 * i + 1939 + 168 * v6 + 7 * v11]; /*0xffc89c1e*/
if ( a2 == *v12 ) /*0xffc89c26*/
{
n4a_1 = n4a; /*0xffc89c2f*/
if ( v16 == v12[1] && i == v12[2] ) /*0xffc89c38*/
return *(unsigned __int16 *)(v12 + 3); /*0xffc89c51*/
}
if ( ++v11 >= v10 ) /*0xffc89c3e*/
goto LABEL_11; /*0xffc89c3e*/
}
}
// Function: MemChipFunc9C5C @ 0xffc89c5c (0x18 bytes)
// Index: 1066/2560
bool __cdecl MemChipFunc9C5C(char a1)
{
return (a1 & 3) != 3 && (a1 & 2) != 0; /*0xffc89c73*/
}
// Function: MemChipFunc9C74 @ 0xffc89c74 (0x69 bytes)
// Index: 1067/2560
const char *__cdecl MemChipFunc9C74(unsigned __int16 n8)
{
if ( n8 <= 8u ) /*0xffc89c7c*/
{
switch ( n8 ) /*0xffc89c7e*/
{
case 8u: /*0xffc89c7e*/
return "WT PMEM "; /*0xffc89cb3*/
case 1u: /*0xffc89c7e*/
return "1LM "; /*0xffc89cad*/
case 2u: /*0xffc89c7e*/
return "2LM "; /*0xffc89ca7*/
case 4u: /*0xffc89c7e*/
return "PMEM "; /*0xffc89ca1*/
case 6u: /*0xffc89c7e*/
return "WB PMEM "; /*0xffc89c9b*/
}
return "??????????"; /*0xffc89c94*/
}
if ( n8 == 16 ) /*0xffc89cb7*/
return "BLK_WINDOW"; /*0xffc89cd7*/
if ( n8 == 32 ) /*0xffc89cbc*/
return "NVDIM_CTRL"; /*0xffc89cd1*/
if ( n8 != 260 ) /*0xffc89cc3*/
return "??????????"; /*0xffc89cca*/
return "PMEM RSVD "; /*0xffc89c9b*/
}
// Function: MemChipFunc9CDD @ 0xffc89cdd (0x38 bytes)
// Index: 1068/2560
int __cdecl MemChipFunc9CDD(int a1, unsigned __int8 a2)
{
int v2; // edx
int v3; // esi
unsigned __int8 i; // cl
int v5; // eax
v2 = 0; /*0xffc89ce2*/
v3 = 50813 * a2 + a1; /*0xffc89cef*/
for ( i = 0; i < 0x18u; ++i ) /*0xffc89cf1*/
{
v5 = 19 * i; /*0xffc89cf6*/
if ( !*(_BYTE *)(v5 + v3 + 58799) ) /*0xffc89cf9*/
break; /*0xffc89d01*/
v2 = *(_DWORD *)(v5 + v3 + 58803); /*0xffc89d03*/
}
return v2; /*0xffc89d13*/
}
// Function: MemChipFunc9D15 @ 0xffc89d15 (0x61 bytes)
// Index: 1069/2560
char __cdecl MemChipFunc9D15(int a1, unsigned __int16 n16)
{
char v2; // cl
v2 = 0; /*0xffc89d1a*/
if ( n16 > 8u ) /*0xffc89d1f*/
{
if ( n16 == 16 || n16 == 32 ) /*0xffc89d56*/
return 2; /*0xffc89d56*/
if ( n16 != 260 ) /*0xffc89d5d*/
return v2; /*0xffc89d5d*/
return ((*(_DWORD *)(a1 + 130) & 0x4000) == 0) | 2; /*0xffc89d74*/
}
switch ( n16 ) /*0xffc89d21*/
{
case 8u: /*0xffc89d21*/
return 2; /*0xffc89d21*/
case 1u: /*0xffc89d21*/
return *(_BYTE *)(a1 + 244356) != 2; /*0xffc89d4c*/
case 2u: /*0xffc89d21*/
return 2; /*0xffc89d2b*/
case 4u: /*0xffc89d21*/
return ((*(_DWORD *)(a1 + 130) & 0x4000) == 0) | 2; /*0xffc89d31*/
case 6u: /*0xffc89d21*/
return 2; /*0xffc89d39*/
}
return v2; /*0xffc89d3d*/
}
// Function: MemChipFunc9D76 @ 0xffc89d76 (0x3c0 bytes)
// Index: 1070/2560
unsigned __int8 __cdecl MemChipFunc9D76(unsigned __int8 *n4, int n4a)
{
unsigned __int8 n4a_1; // bl
int SocketInfo; // ebp
unsigned __int8 result; // al
int v6; // edx
char v7; // cl
int v8; // edi
char n3; // cl
int v10; // edx
_BYTE *n6a_1; // eax
int CpuCount; // eax
int n6a_2; // ebp
unsigned __int8 n2_2; // dl
int v15; // edi
_WORD *v16; // ecx
bool v17; // cf
__int16 n15; // ax
int n2_1; // edi
unsigned __int8 n6_2; // dl
bool v21; // al
unsigned __int8 *v22; // edx
__int16 n6_1; // [esp-4h] [ebp-58h]
char v24; // [esp+10h] [ebp-44h]
char p_n20[7]; // [esp+11h] [ebp-43h] BYREF
int v26; // [esp+18h] [ebp-3Ch]
int n2; // [esp+1Ch] [ebp-38h]
int v28; // [esp+20h] [ebp-34h]
int v29; // [esp+24h] [ebp-30h]
int v30; // [esp+28h] [ebp-2Ch]
int n6a; // [esp+2Ch] [ebp-28h]
int n6_3; // [esp+30h] [ebp-24h]
int v33; // [esp+34h] [ebp-20h]
_BYTE *n6a_3; // [esp+38h] [ebp-1Ch]
int v35; // [esp+3Ch] [ebp-18h]
int SocketInfo_1; // [esp+40h] [ebp-14h]
unsigned __int8 v37[2]; // [esp+44h] [ebp-10h] BYREF
int v38; // [esp+46h] [ebp-Eh]
int v39; // [esp+4Ah] [ebp-Ah]
int v40; // [esp+4Eh] [ebp-6h]
__int16 n2047; // [esp+52h] [ebp-2h]
unsigned __int8 n6; // [esp+58h] [ebp+4h]
n4a_1 = n4a; /*0xffc89d7a*/
v37[0] = 0; /*0xffc89d87*/
v38 = 0; /*0xffc89d8f*/
v39 = 0; /*0xffc89d92*/
v40 = 0; /*0xffc89d93*/
n2047 = 0; /*0xffc89d94*/
SocketInfo = GetSocketInfo((int)n4, n4a); /*0xffc89d9b*/
result = 0; /*0xffc89d9d*/
SocketInfo_1 = SocketInfo; /*0xffc89da1*/
LOBYTE(v30) = 0; /*0xffc89da5*/
if ( !n4[244317] ) /*0xffc89daf*/
return result; /*0xffc89daf*/
v6 = 50813 * (unsigned __int8)n4a; /*0xffc89db8*/
v7 = 0; /*0xffc89dbe*/
v24 = 0; /*0xffc89dc0*/
v35 = v6; /*0xffc89dc4*/
do /*0xffc8a128*/
{
v8 = result; /*0xffc89dc8*/
if ( !n4[result + 10189 + v6] ) /*0xffc89dd6*/
goto LABEL_40; /*0xffc89dd6*/
v26 = (unsigned __int16)MemChipFunc429A((int)n4, n4a_1, v30); /*0xffc89ded*/
n3 = 0; /*0xffc89df3*/
v10 = 6 * v8; /*0xffc89df5*/
p_n20[1] = 0; /*0xffc89e00*/
v29 = 6 * v8; /*0xffc89e04*/
n6a_1 = (_BYTE *)(SocketInfo + 23064 * v8); /*0xffc89e08*/
n6a_3 = n6a_1; /*0xffc89e0a*/
do /*0xffc8a0ff*/
{
if ( !*n6a_1 ) /*0xffc89e12*/
goto LABEL_38; /*0xffc89e12*/
LOBYTE(n6a_1) = n3 + v24; /*0xffc89e1c*/
n6a = (int)n6a_1; /*0xffc89e21*/
CpuCount = GetCpuCount((int)n4, n4a_1, n3 + v24); /*0xffc89e25*/
n6a_2 = n6a; /*0xffc89e2a*/
n2_2 = 0; /*0xffc89e33*/
v15 = 0; /*0xffc89e35*/
v16 = (_WORD *)(CpuCount + 1348); /*0xffc89e37*/
LOBYTE(n2) = 0; /*0xffc89e3d*/
v28 = 0; /*0xffc89e41*/
*(_DWORD *)&p_n20[3] = CpuCount + 1348; /*0xffc89e45*/
do /*0xffc8a0d2*/
{
if ( !*((_BYTE *)v16 - 1241) ) /*0xffc89e49*/
goto LABEL_36; /*0xffc89e49*/
v17 = *(_WORD *)&n4[2 * v15 + 58741 + 2 * v29 + v35] < 0x113u; /*0xffc89e68*/
n4a_1 = n4a; /*0xffc89e70*/
v33 = v35 + 2 * (v15 + v29); /*0xffc89e74*/
if ( v17 ) /*0xffc89e78*/
goto LABEL_36; /*0xffc89e78*/
if ( n4[244313] != 1 ) /*0xffc89e85*/
{
if ( (v26 & 6) == 4 ) /*0xffc89f3b*/
{
v37[0] = 0; /*0xffc89f45*/
n15 = 15; /*0xffc89f49*/
n6_1 = 6; /*0xffc89f4a*/
}
else
{
LABEL_12:
v37[0] = 0; /*0xffc89ea1*/
n15 = 5; /*0xffc89ea9*/
n6_1 = 3; /*0xffc89eaa*/
}
LOWORD(v38) = n15; /*0xffc89eac*/
LOWORD(v39) = n6_1; /*0xffc89eb2*/
BYTE2(v38) = 1; /*0xffc89eb7*/
goto LABEL_14; /*0xffc89eb7*/
}
if ( (v26 & 6) == 6 || (v26 & 6) == 2 ) /*0xffc89e9f*/
goto LABEL_12; /*0xffc89e9f*/
LABEL_14:
n2_1 = n2; /*0xffc89ebc*/
LOWORD(v40) = 10; /*0xffc89ec3*/
BYTE2(v40) = 5; /*0xffc89ecb*/
n2047 = 2047; /*0xffc89ed4*/
n6_2 = 0; /*0xffc89edb*/
BYTE2(v39) = 4; /*0xffc89edd*/
n6 = 0; /*0xffc89ee2*/
while ( 1 ) /*0xffc89ee9*/
{
n6_3 = n6_2; /*0xffc89ee9*/
p_n20[0] = 0; /*0xffc89eed*/
v21 = 1; /*0xffc89ef1*/
v22 = &v37[4 * n6_2]; /*0xffc89ef3*/
p_n20[2] = *v22; /*0xffc89ef9*/
if ( p_n20[2] >= 4u ) /*0xffc89f00*/
{
n6a_2 = n6a; /*0xffc89f13*/
v21 = *(_WORD *)&n4[v33 + 58741] >= 0x114u /*0xffc89f2f*/
&& *((_BYTE *)v16 - 3)
&& *((_BYTE *)v16 - 2) >= 2u
&& *v16 >= 0x5298u;
}
n4a_1 = n4a; /*0xffc89f5e*/
if ( *((_WORD *)&v38 + 2 * n6_3) ) /*0xffc89f59*/
{
if ( v21 ) /*0xffc89f90*/
{
if ( !ProcCommonFuncEDB9(n4, n4a, n6a_2, n2_1, v22, p_n20) ) /*0xffc89f9c*/
DebugPrint( /*0xffc89fd3*/
(int)n4,
3,
n4a,
n6a_2,
n2_1,
255,
255,
255,
"setting performance knob %d was successful, for memmode:%d\n",
v37[4 * n6_3],
(unsigned __int16)v26);
}
else
{
DebugPrint( /*0xffc8a005*/
(int)n4,
3,
n4a,
n6a_2,
n2_1,
255,
255,
255,
"setting this performance knob %d not supported in FIS:%x\n",
(unsigned __int8)p_n20[2],
*(unsigned __int16 *)&n4[v33 + 58741]);
DebugPrint( /*0xffc8a036*/
(int)n4,
2,
n4a,
n6a_2,
n2_1,
255,
255,
255,
"%02X %02X %02X %04X\n",
*(unsigned __int8 *)(*(_DWORD *)&p_n20[3] - 3),
*(unsigned __int8 *)(*(_DWORD *)&p_n20[3] - 2),
*(unsigned __int8 *)(*(_DWORD *)&p_n20[3] - 1),
(unsigned __int16)**(_WORD **)&p_n20[3]);
}
}
else
{
DebugPrint( /*0xffc89f81*/
(int)n4,
3,
n4a,
n6a_2,
n2_1,
255,
255,
255,
"Skip setting performance knobs for memory mode 0x%04X\n",
(unsigned __int16)v26);
}
if ( p_n20[0] && p_n20[0] != 20 ) /*0xffc8a048*/
break; /*0xffc8a048*/
v16 = *(_WORD **)&p_n20[3]; /*0xffc8a04e*/
n6_2 = n6 + 1; /*0xffc8a052*/
n6 = n6_2; /*0xffc8a054*/
if ( n6_2 >= 4u ) /*0xffc8a05b*/
goto LABEL_35; /*0xffc8a05b*/
}
DebugPrint( /*0xffc8a084*/
(int)n4,
3,
n4a,
n6a_2,
n2_1,
255,
255,
255,
"Communication with the NGN DIMM failed setting performance knob %d\n",
v37[4 * n6]);
KtiFunc1162(n4, 15, 2, n4a, n6a_2, n2_1, 255); /*0xffc8a09a*/
KtiFunc8B24(n4, n4a, n6a_2, n2_1); /*0xffc8a0a6*/
v16 = *(_WORD **)&p_n20[3]; /*0xffc8a0ab*/
LABEL_35:
v15 = v28; /*0xffc8a0b2*/
n2_2 = n2; /*0xffc8a0b6*/
LABEL_36:
++n2_2; /*0xffc8a0ba*/
v16 = (_WORD *)((char *)v16 + 1379); /*0xffc8a0bc*/
++v15; /*0xffc8a0c2*/
LOBYTE(n2) = n2_2; /*0xffc8a0c3*/
v28 = v15; /*0xffc8a0c7*/
*(_DWORD *)&p_n20[3] = v16; /*0xffc8a0cb*/
}
while ( n2_2 < 2u ); /*0xffc8a0d2*/
n6a_1 = n6a_3; /*0xffc8a0d8*/
n3 = p_n20[1]; /*0xffc8a0dc*/
v10 = v29; /*0xffc8a0e0*/
LABEL_38:
++n3; /*0xffc8a0e7*/
v10 += 2; /*0xffc8a0e9*/
n6a_1 += 7688; /*0xffc8a0eb*/
p_n20[1] = n3; /*0xffc8a0f0*/
v29 = v10; /*0xffc8a0f4*/
n6a_3 = n6a_1; /*0xffc8a0f8*/
}
while ( (unsigned __int8)n3 < 3u ); /*0xffc8a0ff*/
v7 = v24; /*0xffc8a105*/
v6 = v35; /*0xffc8a109*/
SocketInfo = SocketInfo_1; /*0xffc8a10d*/
LABEL_40:
v7 += 3; /*0xffc8a111*/
result = v30 + 1; /*0xffc8a118*/
v24 = v7; /*0xffc8a11a*/
LOBYTE(v30) = result; /*0xffc8a11e*/
}
while ( result < n4[244317] ); /*0xffc8a128*/
return result; /*0xffc8a12e*/
}
// Function: MemChipFuncA136 @ 0xffc8a136 (0x170 bytes)
// Index: 1071/2560
char __cdecl MemChipFuncA136(int n6, __int16 n16)
{
int n6_1; // ebp
_DWORD *v3; // esi
unsigned __int8 n4; // bl
_BYTE *v5; // eax
int SocketInfo; // eax
_DWORD *v7; // edi
unsigned __int8 n6_2; // cl
unsigned __int8 *v9; // esi
unsigned __int8 v10; // bh
int CpuCount; // eax
unsigned __int8 v12; // bl
int v13; // edi
unsigned __int8 v15; // [esp+13h] [ebp-19h]
int n4_1; // [esp+14h] [ebp-18h]
int CpuCount_1; // [esp+18h] [ebp-14h]
int v18; // [esp+1Ch] [ebp-10h]
_DWORD *v19; // [esp+20h] [ebp-Ch]
_BYTE *v20; // [esp+24h] [ebp-8h]
_DWORD *v21; // [esp+28h] [ebp-4h]
n6_1 = n6; /*0xffc8a13b*/
v3 = (_DWORD *)(n6 + 10281); /*0xffc8a149*/
v21 = (_DWORD *)(n6 + 10281); /*0xffc8a14f*/
v15 = (n16 != 16) + 1; /*0xffc8a15a*/
n4 = 0; /*0xffc8a15e*/
v5 = (_BYTE *)(n6 + 258689); /*0xffc8a160*/
LOBYTE(n4_1) = 0; /*0xffc8a166*/
v20 = (_BYTE *)(n6 + 258689); /*0xffc8a16a*/
do /*0xffc8a296*/
{
if ( *v5 ) /*0xffc8a16e*/
{
SocketInfo = GetSocketInfo(n6_1, n4_1); /*0xffc8a17c*/
v7 = v3; /*0xffc8a185*/
n6_2 = 0; /*0xffc8a187*/
v19 = v3; /*0xffc8a189*/
LOBYTE(n6) = 0; /*0xffc8a18d*/
v9 = (unsigned __int8 *)(SocketInfo + 3); /*0xffc8a191*/
do /*0xffc8a268*/
{
if ( *(v9 - 3) ) /*0xffc8a194*/
{
v10 = 0; /*0xffc8a1a2*/
CpuCount = GetCpuCount(n6_1, n4_1, n6); /*0xffc8a1a9*/
CpuCount_1 = CpuCount; /*0xffc8a1b0*/
v12 = 0; /*0xffc8a1b7*/
LOBYTE(v18) = 0; /*0xffc8a1b9*/
if ( *v9 ) /*0xffc8a1bd*/
{
do /*0xffc8a226*/
{
v13 = 1379 * v12; /*0xffc8a1c4*/
if ( *(_BYTE *)(v13 + CpuCount) ) /*0xffc8a1ca*/
{
if ( MemChipFuncACE9(n6_1, n4_1, n6, v18) ) /*0xffc8a1dd*/
{
CpuCount = CpuCount_1; /*0xffc8a1f1*/
if ( n16 == 16 ) /*0xffc8a1f5*/
{
if ( *(_BYTE *)(v13 + CpuCount_1 + 107) && *(_WORD *)(v13 + CpuCount_1 + 1331) ) /*0xffc8a1ff*/
++v10; /*0xffc8a209*/
}
else if ( *(_BYTE *)(v13 + CpuCount_1 + 107) ) /*0xffc8a20d*/
{
++v10; /*0xffc8a214*/
}
}
else
{
CpuCount = CpuCount_1; /*0xffc8a218*/
}
}
LOBYTE(v18) = ++v12; /*0xffc8a220*/
}
while ( v12 < *v9 ); /*0xffc8a226*/
v7 = v19; /*0xffc8a228*/
}
if ( n16 == 16 ) /*0xffc8a23c*/
*(v7 - 2) = v10 * v15; /*0xffc8a241*/
else
*v7 = v10 * v15; /*0xffc8a249*/
n6_2 = n6; /*0xffc8a24b*/
}
++n6_2; /*0xffc8a24f*/
v7 = (_DWORD *)((char *)v7 + 8077); /*0xffc8a251*/
v9 += 7688; /*0xffc8a257*/
LOBYTE(n6) = n6_2; /*0xffc8a25d*/
v19 = v7; /*0xffc8a261*/
}
while ( n6_2 < 6u ); /*0xffc8a268*/
n4 = n4_1; /*0xffc8a26e*/
v5 = v20; /*0xffc8a272*/
v3 = v21; /*0xffc8a276*/
}
++n4; /*0xffc8a27a*/
v5 += 48704; /*0xffc8a27c*/
v3 = (_DWORD *)((char *)v3 + 50813); /*0xffc8a281*/
LOBYTE(n4_1) = n4; /*0xffc8a287*/
v20 = v5; /*0xffc8a28b*/
v21 = v3; /*0xffc8a28f*/
}
while ( n4 < 4u ); /*0xffc8a296*/
return 0; /*0xffc8a29c*/
}
// Function: MemChipFuncA2A6 @ 0xffc8a2a6 (0x11d bytes)
// Index: 1072/2560
int __cdecl MemChipFuncA2A6(int n4)
{
int v2; // eax
int *v3; // ebp
_BYTE *v4; // ebx
int n4_1; // eax
int v6; // esi
int result; // eax
bool v8; // zf
int v9; // [esp-1Ch] [ebp-34h]
unsigned __int64 v10; // [esp-14h] [ebp-2Ch]
int n4a; // [esp+1Ch] [ebp+4h]
DimmInterleaveConfig(n4); /*0xffc8a2b5*/
HIDWORD(v10) = *(_DWORD *)(n4 + 1540); /*0xffc8a2bc*/
LODWORD(v10) = 0; /*0xffc8a2c2*/
v2 = RmtFunc6F34(v10, 26); /*0xffc8a2c4*/
v9 = *(_DWORD *)(n4 + 1540); /*0xffc8a2ca*/
*(_DWORD *)(n4 + 244318) = v2; /*0xffc8a2d5*/
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "mmiohbasefrom setup: %x MMIOH base = %x (64mb)\n", v9, v2);
v3 = (int *)(n4 + 255248); /*0xffc8a2f1*/
v4 = (_BYTE *)(n4 + 258689); /*0xffc8a2f7*/
n4_1 = 4; /*0xffc8a2ff*/
n4a = 4; /*0xffc8a300*/
do /*0xffc8a378*/
{
if ( *v4 ) /*0xffc8a304*/
{
v6 = *v3; /*0xffc8a309*/
if ( (*v3 & 0x2000) != 0 ) /*0xffc8a312*/
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "SKX Capability does not support 2LM, forcing to 1LM.\n"); /*0xffc8a327*/
n4_1 = n4a; /*0xffc8a32c*/
*(_BYTE *)(n4 + 244313) = 0; /*0xffc8a333*/
}
if ( (v6 & 0x18000) != 0 ) /*0xffc8a340*/
{
DebugPrint( /*0xffc8a355*/
n4,
2,
255,
255,
255,
255,
255,
255,
"SKX Capability does not support persistent modes, forcing to non-persistent mode.\n");
n4_1 = n4a; /*0xffc8a35a*/
*(_BYTE *)(n4 + 244371) = 0; /*0xffc8a361*/
}
}
v3 += 7; /*0xffc8a368*/
v4 += 48704; /*0xffc8a36b*/
n4a = --n4_1; /*0xffc8a374*/
}
while ( n4_1 ); /*0xffc8a378*/
result = *(unsigned __int8 *)(n4 + 1558); /*0xffc8a37a*/
v8 = (*(_BYTE *)(n4 + 1388) & 1) == 0; /*0xffc8a38c*/
*(_DWORD *)(n4 + 246760) = 4 * (*(_DWORD *)(n4 + 1510) - result); /*0xffc8a393*/
if ( v8 ) /*0xffc8a399*/
{
*(_DWORD *)(n4 + 9522) = 64; /*0xffc8a3b2*/
}
else
{
result = 1 << (*(_BYTE *)(n4 + 244372) - 26); /*0xffc8a3a8*/
*(_DWORD *)(n4 + 9522) = result; /*0xffc8a3aa*/
}
return result; /*0xffc8a3bc*/
}
// Function: MemChipFuncA3C3 @ 0xffc8a3c3 (0x259 bytes)
// Index: 1073/2560
int __cdecl MemChipFuncA3C3(int n4)
{
int n34; // eax
int n34_1; // edi
int v3; // eax
char v4; // al
_BYTE v6[96]; // [esp+Ch] [ebp-C4h] BYREF
_BYTE v7[96]; // [esp+6Ch] [ebp-64h] BYREF
char v8; // [esp+CCh] [ebp-4h]
*(_BYTE *)(n4 + 9479) = 2; /*0xffc8a3d3*/
KtiFunc886D(n4); /*0xffc8a3da*/
KtiFunc4093(n4, 16); /*0xffc8a3e2*/
*(_BYTE *)(n4 + 244313) = *(_BYTE *)(n4 + 1545) == 0 ? 0 : 2;
*(_BYTE *)(n4 + 10187) = 0; /*0xffc8a410*/
*(_BYTE *)(n4 + 244314) = 0; /*0xffc8a416*/
v8 = 0; /*0xffc8a41c*/
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "\n***BEGIN MEMORY MAPPING***\n"); /*0xffc8a41f*/
MemChipFuncA95A((_BYTE *)n4, v7); /*0xffc8a429*/
MemChipFuncA2A6(n4); /*0xffc8a433*/
MemChipFuncA61C((unsigned __int8 *)n4); /*0xffc8a43c*/
while ( 1 ) /*0xffc8a5aa*/
{
MemChipFuncCCB3(n4, v7); /*0xffc8a447*/
if ( *(_BYTE *)(n4 + 10187) != 1 ) /*0xffc8a455*/
{
MemChipFunc8CDF((_BYTE *)n4, (int)v7); /*0xffc8a45c*/
MemChipFuncBC64(n4, v7); /*0xffc8a466*/
if ( !*(_BYTE *)(n4 + 144) && *(_BYTE *)(n4 + 257314) == 1 ) /*0xffc8a47e*/
{
MemChipFunc36B2((_BYTE *)n4); /*0xffc8a481*/
MemChipFunc3BE1((_BYTE *)n4); /*0xffc8a487*/
}
}
if ( !*(_BYTE *)(n4 + 10187) ) /*0xffc8a48e*/
RmtFunc6BCD(n4); /*0xffc8a498*/
if ( *(_BYTE *)(n4 + 244313) == 1 && (KtiFuncE78(n4, 0, 9u) || KtiFuncE34(n4, 0, 9)) ) /*0xffc8a4c1*/
{
if ( MemChipFunc431B(n4) == 1 ) /*0xffc8a4d6*/
{
DebugPrint(n4, 3, 255, 255, 255, 255, 255, 255, "2-2-2 config\n"); /*0xffc8a4e6*/
if ( (*(_BYTE *)(n4 + 1388) & 0x40) != 0 ) /*0xffc8a4f5*/
{
DebugPrint(n4, 3, 255, 255, 255, 255, 255, 255, "2-2-2 config; force 1-ch way\n"); /*0xffc8a505*/
*(_BYTE *)(n4 + 9413) = 1; /*0xffc8a50a*/
v8 = 1; /*0xffc8a511*/
}
}
else
{
DebugPrint(n4, 3, 255, 255, 255, 255, 255, 255, "2-2-2 config is false\n"); /*0xffc8a525*/
}
}
n34 = MemChipFunc4993(n4, (int)v7); /*0xffc8a532*/
n34_1 = n34; /*0xffc8a537*/
if ( n34 && n34 != 34 || (n34_1 = MemChipFunc49D9((unsigned __int8 *)n4)) != 0 ) /*0xffc8a55d*/
{
MemChipFunc49FF((_BYTE *)n4, (int)v7); /*0xffc8a549*/
goto LABEL_22; /*0xffc8a550*/
}
MemChipFuncC3BC(n4); /*0xffc8a560*/
MemChipFuncB813(n4, v6); /*0xffc8a56d*/
if ( !v3 ) /*0xffc8a577*/
{
n34_1 = MemChipFunc951C(n4, (int)v7); /*0xffc8a587*/
if ( !n34_1 ) /*0xffc8a58d*/
{
MemChipFunc4BC1(n4); /*0xffc8a594*/
MemChipFuncF587((unsigned __int8 *)n4); /*0xffc8a59a*/
KtiFunc6114(n4); /*0xffc8a5a0*/
LABEL_22:
if ( !n34_1 ) /*0xffc8a5aa*/
break; /*0xffc8a5aa*/
}
}
}
MemChipFunc39BA(n4, (int)v6); /*0xffc8a5b8*/
KtiFunc3686(n4); /*0xffc8a5c0*/
KtiFunc76BB(n4); /*0xffc8a5c6*/
MemChipFunc2D95((unsigned __int8 *)n4, (int)v7); /*0xffc8a5d0*/
MemChipFuncEE7D((_BYTE *)n4); /*0xffc8a5d6*/
*(_DWORD *)(n4 + 453644) = *(unsigned __int8 *)(n4 + 244313); /*0xffc8a5e5*/
v4 = *(_BYTE *)(n4 + 1403); /*0xffc8a5eb*/
if ( v4 ) /*0xffc8a5f3*/
*(_BYTE *)(n4 + 244315) = v4; /*0xffc8a5fd*/
else
*(_BYTE *)(n4 + 244315) = 0; /*0xffc8a5f5*/
if ( *(_BYTE *)(n4 + 244314) == 1 ) /*0xffc8a60a*/
*(_BYTE *)(n4 + 244315) = 0; /*0xffc8a60c*/
return 0; /*0xffc8a613*/
}
// Function: MemChipFuncA61C @ 0xffc8a61c (0x2b8 bytes)
// Index: 1074/2560
unsigned __int8 __cdecl MemChipFuncA61C(unsigned __int8 *n4)
{
unsigned __int8 n4_2; // al
int v3; // edi
unsigned __int8 *v4; // ecx
int n4_1; // ebx
int SocketInfo; // eax
unsigned __int8 n6_2; // dl
int v8; // edi
unsigned __int8 *n4a_2; // ecx
int n6_1; // ebp
int CpuCount; // edx
unsigned __int8 v12; // cl
unsigned __int8 *n4a_1; // eax
int n2_1; // edi
int v15; // eax
int v16; // edx
__int16 v17; // cx
int n2_2; // edi
char p_n20[6]; // [esp+12h] [ebp-4Ah] BYREF
int n2; // [esp+18h] [ebp-44h]
int n6; // [esp+1Ch] [ebp-40h]
int v22; // [esp+20h] [ebp-3Ch]
int n4_3; // [esp+24h] [ebp-38h]
int v24; // [esp+28h] [ebp-34h]
int v25; // [esp+2Ch] [ebp-30h] BYREF
int p_n4; // [esp+30h] [ebp-2Ch] BYREF
unsigned __int8 *v27; // [esp+34h] [ebp-28h]
int v28; // [esp+38h] [ebp-24h]
int buf[8]; // [esp+3Ch] [ebp-20h] BYREF
unsigned __int8 *n4a; // [esp+60h] [ebp+4h]
n4_2 = 0; /*0xffc8a626*/
v3 = 0; /*0xffc8a629*/
p_n20[0] = 0; /*0xffc8a62b*/
p_n20[1] = 0; /*0xffc8a630*/
v4 = n4 + 258689; /*0xffc8a635*/
LOBYTE(n4_3) = 0; /*0xffc8a63b*/
v24 = 0; /*0xffc8a63f*/
v27 = n4 + 258689; /*0xffc8a643*/
do /*0xffc8a8c6*/
{
if ( *v4 ) /*0xffc8a647*/
{
n4_1 = n4_3; /*0xffc8a650*/
SocketInfo = GetSocketInfo((int)n4, n4_3); /*0xffc8a656*/
n6_2 = 0; /*0xffc8a65d*/
v8 = 0; /*0xffc8a65f*/
n4a_2 = (unsigned __int8 *)(SocketInfo + 3); /*0xffc8a661*/
LOBYTE(n6) = 0; /*0xffc8a664*/
v22 = 0; /*0xffc8a668*/
n4a = (unsigned __int8 *)(SocketInfo + 3); /*0xffc8a66c*/
do /*0xffc8a89b*/
{
if ( *(n4a_2 - 3) ) /*0xffc8a670*/
{
n6_1 = n6; /*0xffc8a67a*/
CpuCount = GetCpuCount((int)n4, n4_1, n6); /*0xffc8a686*/
v12 = 0; /*0xffc8a688*/
n4a_1 = n4a; /*0xffc8a68a*/
*(_DWORD *)&p_n20[2] = CpuCount; /*0xffc8a691*/
LOBYTE(n2) = 0; /*0xffc8a695*/
if ( *n4a ) /*0xffc8a699*/
{
do /*0xffc8a871*/
{
if ( *(_BYTE *)(1379 * v12 + CpuCount + 107) ) /*0xffc8a6aa*/
{
n2_1 = n2; /*0xffc8a6b5*/
if ( MemChipFuncACE9((int)n4, n4_1, n6_1, n2) ) /*0xffc8a6bd*/
{
DebugPrint((int)n4, 3, n4_1, n6_1, n2_1, 255, 255, 255, "Set System Time for NVMDIMM\n"); /*0xffc8a6e0*/
if ( ProcCommonFuncECF6(n4, n4_1, n6_1, n2_1, p_n20) ) /*0xffc8a6ee*/
{
DebugPrint((int)n4, 3, n4_1, n6_1, n2_1, 255, 255, 255, "Communication with the NGN DIMM failed\n"); /*0xffc8a70d*/
KtiFunc1162(n4, 15, 2, n4_1, n6_1, n2_1, 255); /*0xffc8a71f*/
KtiFunc8B24(n4, n4_1, n6_1, n2_1); /*0xffc8a72b*/
}
v25 = 0; /*0xffc8a733*/
p_n4 = 0; /*0xffc8a73c*/
v15 = ProcCommonFuncDC9A(n4, n4_1, n6_1, n2_1, &v25, &p_n4, p_n20); /*0xffc8a750*/
v16 = v22 + v24; /*0xffc8a75c*/
v17 = v25; /*0xffc8a760*/
v28 = v15; /*0xffc8a764*/
n4[v22 + 244401 + v24] = 0; /*0xffc8a768*/
if ( (v17 & 0x100) != 0 && (p_n4 & 1) != 0 ) /*0xffc8a77d*/
n4[v16 + 244401] = 1; /*0xffc8a77f*/
if ( n4[244376] == 1 || n4[v16 + 244377] == 1 ) /*0xffc8a798*/
{
if ( v28 ) /*0xffc8a7a3*/
{
DebugPrint( /*0xffc8a837*/
(int)n4,
3,
n4_1,
n6_1,
n2_1,
255,
255,
255,
"Communication with the NGN DIMM failed\n");
KtiFunc1162(n4, 15, 2, n4_1, n6_1, n2_1, 255); /*0xffc8a849*/
KtiFunc8B24(n4, n4_1, n6_1, n2_1); /*0xffc8a855*/
}
else if ( (v17 & 0x106) == 6 ) /*0xffc8a7ae*/
{
memset(buf, 0, sizeof(buf)); /*0xffc8a7c2*/
n2_2 = n2; /*0xffc8a7c4*/
DebugPrint((int)n4, 3, n4_1, n6_1, n2, 255, 255, 255, "Set Secure Erase Unit\n"); /*0xffc8a7d6*/
if ( ProcCommonFuncE839(n4, n4_1, n6_1, n2_2, (int)buf, &p_n20[1]) ) /*0xffc8a7e9*/
{
DebugPrint( /*0xffc8a808*/
(int)n4,
3,
n4_1,
n6_1,
n2_2,
255,
255,
255,
"Communication with the NGN DIMM failed\n");
KtiFunc1162(n4, 15, 2, n4_1, n6_1, n2_2, 255); /*0xffc8a81a*/
}
}
}
}
CpuCount = *(_DWORD *)&p_n20[2]; /*0xffc8a85d*/
n4a_1 = n4a; /*0xffc8a861*/
}
v12 = n2 + 1; /*0xffc8a869*/
LOBYTE(n2) = v12; /*0xffc8a86b*/
}
while ( v12 < *n4a_1 ); /*0xffc8a871*/
v8 = v22; /*0xffc8a877*/
}
n6_2 = n6; /*0xffc8a87b*/
n4a_2 = n4a; /*0xffc8a87f*/
}
++n6_2; /*0xffc8a883*/
n4a_2 += 7688; /*0xffc8a885*/
++v8; /*0xffc8a88b*/
LOBYTE(n6) = n6_2; /*0xffc8a88c*/
v22 = v8; /*0xffc8a890*/
n4a = n4a_2; /*0xffc8a894*/
}
while ( n6_2 < 6u ); /*0xffc8a89b*/
n4_2 = n4_3; /*0xffc8a8a1*/
v4 = v27; /*0xffc8a8a5*/
v3 = v24; /*0xffc8a8a9*/
}
++n4_2; /*0xffc8a8ad*/
v4 += 48704; /*0xffc8a8af*/
v3 += 6; /*0xffc8a8b5*/
LOBYTE(n4_3) = n4_2; /*0xffc8a8b8*/
v27 = v4; /*0xffc8a8bc*/
v24 = v3; /*0xffc8a8c0*/
}
while ( n4_2 < 4u ); /*0xffc8a8c6*/
return n4_2; /*0xffc8a8cc*/
}
// Function: MemChipFuncA8D4 @ 0xffc8a8d4 (0x86 bytes)
// Index: 1075/2560
char __cdecl MemChipFuncA8D4(int __return_address, __int16 n32)
{
unsigned __int8 n4; // bl
_BYTE *v4; // esi
_DWORD *v5; // edi
_BYTE *SocketInfo; // edx
_DWORD *v7; // ecx
int n6; // eax
int v9; // eax
unsigned __int8 n4_1; // [esp+10h] [ebp-4h]
int n6_1; // [esp+18h] [ebp+4h]
n4 = 0; /*0xffc8a8db*/
n4_1 = 0; /*0xffc8a8df*/
v4 = (_BYTE *)(__return_address + 258689); /*0xffc8a8e3*/
v5 = (_DWORD *)(__return_address + 10297); /*0xffc8a8e9*/
do /*0xffc8a950*/
{
if ( *v4 ) /*0xffc8a8ef*/
{
SocketInfo = (_BYTE *)GetSocketInfo(__return_address, n4_1); /*0xffc8a902*/
v7 = v5; /*0xffc8a904*/
n6 = 6; /*0xffc8a906*/
n6_1 = 6; /*0xffc8a907*/
do /*0xffc8a939*/
{
if ( *SocketInfo ) /*0xffc8a90b*/
{
if ( n32 == 16 ) /*0xffc8a916*/
v9 = *(v7 - 6); /*0xffc8a918*/
else
v9 = *(v7 - 4); /*0xffc8a91d*/
*v7 = v9; /*0xffc8a920*/
n6 = n6_1; /*0xffc8a922*/
}
SocketInfo += 7688; /*0xffc8a926*/
v7 = (_DWORD *)((char *)v7 + 8077); /*0xffc8a92c*/
n6_1 = --n6; /*0xffc8a935*/
}
while ( n6 ); /*0xffc8a939*/
}
++n4; /*0xffc8a93b*/
v4 += 48704; /*0xffc8a93d*/
v5 = (_DWORD *)((char *)v5 + 50813); /*0xffc8a943*/
n4_1 = n4; /*0xffc8a949*/
}
while ( n4 < 4u ); /*0xffc8a950*/
return 0; /*0xffc8a952*/
}
// Function: MemChipFuncA95A @ 0xffc8a95a (0x107 bytes)
// Index: 1076/2560
int __cdecl MemChipFuncA95A(_BYTE *n4, _BYTE *a2)
{
unsigned __int8 n4_1; // cl
_BYTE *v3; // ebx
_BYTE *v4; // ebp
int result; // eax
unsigned __int16 v6; // ax
int v7; // ebp
int n4_2; // [esp+10h] [ebp-8h]
_BYTE *v9; // [esp+14h] [ebp-4h]
n4_1 = 0; /*0xffc8a961*/
v3 = a2 + 9; /*0xffc8a969*/
LOBYTE(n4_2) = 0; /*0xffc8a96d*/
v4 = n4 + 258689; /*0xffc8a971*/
v9 = n4 + 258689; /*0xffc8a977*/
do
{
*(_DWORD *)(v3 - 5) = 0; /*0xffc8a97b*/
*(_DWORD *)(v3 - 9) = 0xFFFF; /*0xffc8a982*/
result = 0; /*0xffc8a989*/
*(_WORD *)(v3 - 1) = 0; /*0xffc8a98b*/
*(_DWORD *)(v3 + 1) = 0; /*0xffc8a991*/
*(_DWORD *)(v3 + 5) = 0; /*0xffc8a992*/
*(_DWORD *)(v3 + 9) = 0; /*0xffc8a993*/
if ( *v4 )
{
if ( DimmConfigPerSocket(n4, n4_2, 186, 0) )
{
result = DebugPrint((int)n4, 3, n4_2, 255, 255, 255, 255, 255, "Error reading SkuLimit from PCU \n"); /*0xffc8aa32*/
}
else
{
v6 = CpuIoRead((int)n4, n4_2, 0, 67190924); /*0xffc8a9bf*/
v7 = v6; /*0xffc8a9c4*/
if ( !v6 ) /*0xffc8a9cc*/
{
DebugPrint((int)n4, 2, n4_2, 255, 255, 255, 255, 255, "Error reading SKU Limit FUSE\n"); /*0xffc8a9e1*/
ProcMemInitCheck((int)n4, 247, 2); /*0xffc8a9ee*/
}
*(_DWORD *)(v3 - 9) = v7; /*0xffc8aa01*/
*(v3 - 1) = 1; /*0xffc8aa0d*/
result = DebugPrint((int)n4, 2, n4_2, 255, 255, 255, 255, 255, "SkuLimit value in 64GB units: 0x%x \n", v7);
v4 = v9; /*0xffc8aa16*/
}
n4_1 = n4_2; /*0xffc8aa3a*/
}
++n4_1; /*0xffc8aa3e*/
v4 += 48704; /*0xffc8aa40*/
v3 += 24; /*0xffc8aa46*/
LOBYTE(n4_2) = n4_1; /*0xffc8aa49*/
v9 = v4; /*0xffc8aa4d*/
}
while ( n4_1 < 4u );
return result; /*0xffc8aa5a*/
}
// Function: MemChipFuncAA61 @ 0xffc8aa61 (0x64 bytes)
// Index: 1077/2560
char __cdecl MemChipFuncAA61(int n4, unsigned __int8 n4a)
{
unsigned __int8 n4a_1; // cl
unsigned __int8 v4; // bh
unsigned __int8 v5; // bl
unsigned __int8 v7; // [esp+14h] [ebp+8h]
if ( !n4 ) /*0xffc8aa6c*/
return 0; /*0xffc8aa6c*/
n4a_1 = n4a; /*0xffc8aa6e*/
if ( n4a >= 4u ) /*0xffc8aa74*/
return 0; /*0xffc8aa74*/
v4 = *(_BYTE *)(n4 + 244317); /*0xffc8aa76*/
v5 = 0; /*0xffc8aa7c*/
v7 = 0; /*0xffc8aa7e*/
if ( !v4 ) /*0xffc8aa83*/
return 0; /*0xffc8aac0*/
while ( !*(_BYTE *)(50813 * n4a + v5 + n4 + 10189) ) /*0xffc8aa9b*/
{
LABEL_7:
v7 = ++v5; /*0xffc8aab3*/
if ( v5 >= v4 ) /*0xffc8aab8*/
return 0; /*0xffc8aab8*/
}
if ( (MemChipFunc429A(n4, n4a_1, v7) & 2) == 0 ) /*0xffc8aaac*/
{
n4a_1 = n4a; /*0xffc8aaae*/
goto LABEL_7; /*0xffc8aaae*/
}
return 1; /*0xffc8aabc*/
}
// Function: MemChipFuncAAC5 @ 0xffc8aac5 (0x7a bytes)
// Index: 1078/2560
bool __cdecl MemChipFuncAAC5(int __return_address, unsigned __int8 n4, unsigned __int8 n6, unsigned __int8 n2)
{
return __return_address /*0xffc8ab3b*/
&& n4 < 4u
&& n6 < 6u
&& n2 < 2u
&& *(_BYTE *)(1379 * n2 + 48704 * n4 + __return_address + 7688 * n6 + 259225)
&& (*(_BYTE *)(2688 * n2 + 50813 * n4 + __return_address + 8077 * n6 + 15244) & 1) == 0;
}
// Function: MemChipFuncAB3F @ 0xffc8ab3f (0xc2 bytes)
// Index: 1079/2560
char __cdecl MemChipFuncAB3F(int n4, char n255)
{
int n255_1; // edx
unsigned __int8 n4_1; // bl
unsigned __int8 n6; // bh
int SocketInfo; // ebp
int v6; // edi
int CpuCount; // eax
unsigned __int8 v8; // dl
unsigned __int8 v9; // cl
int CpuCount_1; // edi
int v11; // eax
unsigned __int8 v13; // [esp+10h] [ebp-10h]
unsigned __int8 v14; // [esp+14h] [ebp-Ch]
n255_1 = (unsigned __int8)n255; /*0xffc8ab42*/
n4_1 = 0; /*0xffc8ab4e*/
v13 = 0; /*0xffc8ab51*/
while ( ((1 << n4_1) & n255_1) == 0 || !*(_BYTE *)(48704 * n4_1 + n4 + 258689) ) /*0xffc8ab73*/
{
LABEL_13:
v13 = ++n4_1; /*0xffc8abe6*/
if ( n4_1 >= 4u ) /*0xffc8abed*/
return 0; /*0xffc8abfc*/
}
n6 = 0; /*0xffc8ab80*/
SocketInfo = GetSocketInfo(n4, v13); /*0xffc8ab82*/
v14 = 0; /*0xffc8ab85*/
while ( 1 ) /*0xffc8ab8c*/
{
v6 = 7688 * n6; /*0xffc8ab8c*/
if ( *(_BYTE *)(v6 + SocketInfo) ) /*0xffc8ab92*/
{
CpuCount = GetCpuCount(n4, v13, v14); /*0xffc8aba1*/
v8 = *(_BYTE *)(v6 + SocketInfo + 3); /*0xffc8aba6*/
v9 = 0; /*0xffc8abad*/
if ( v8 ) /*0xffc8abb5*/
break; /*0xffc8abb5*/
}
LABEL_11:
v14 = ++n6; /*0xffc8abd7*/
if ( n6 >= 6u ) /*0xffc8abde*/
{
n255_1 = (unsigned __int8)n255; /*0xffc8abe0*/
goto LABEL_13; /*0xffc8abe0*/
}
}
CpuCount_1 = CpuCount; /*0xffc8abb7*/
while ( 1 ) /*0xffc8abbc*/
{
v11 = 1379 * v9; /*0xffc8abbc*/
if ( *(_BYTE *)(v11 + CpuCount_1) ) /*0xffc8abc2*/
{
if ( *(_BYTE *)(v11 + CpuCount_1 + 107) ) /*0xffc8abc8*/
return 1; /*0xffc8abf5*/
}
if ( ++v9 >= v8 ) /*0xffc8abd3*/
goto LABEL_11; /*0xffc8abd3*/
}
}
// Function: MemChipFuncAC01 @ 0xffc8ac01 (0xe8 bytes)
// Index: 1080/2560
char __cdecl MemChipFuncAC01(int __return_address, __int16 n2, __int16 a3, unsigned __int8 a4)
{
unsigned __int8 v4; // dl
char result; // al
unsigned __int8 i_1; // dh
int n2a_1; // edi
int n3; // ebp
int i_2; // ebx
_BYTE *v10; // ecx
_DWORD *v11; // eax
int n3_1; // edi
unsigned __int8 i; // cl
_DWORD *v14; // eax
_WORD v15[2]; // [esp+Ch] [ebp-4h] BYREF
int n2a; // [esp+18h] [ebp+8h]
v4 = 0; /*0xffc8ac08*/
v15[0] = 0; /*0xffc8ac15*/
if ( n2 == 2 || n2 == 8 || n2 == 6 ) /*0xffc8ac30*/
{
result = KtiFn_FFC927EB(__return_address, a3); /*0xffc8ac34*/
if ( !result ) /*0xffc8ac3d*/
return result; /*0xffc8ac3d*/
v4 = 0; /*0xffc8ac43*/
}
i_1 = *(_BYTE *)(__return_address + 244317); /*0xffc8ac47*/
n2a_1 = 50813 * (unsigned __int8)a3; /*0xffc8ac52*/
n3 = 3; /*0xffc8ac5a*/
n2a = n2a_1; /*0xffc8ac5b*/
if ( i_1 ) /*0xffc8ac61*/
{
i_2 = i_1; /*0xffc8ac69*/
v10 = v15; /*0xffc8ac6c*/
v11 = (_DWORD *)(n2a_1 + __return_address + 10297); /*0xffc8ac70*/
do /*0xffc8ac89*/
{
n3_1 = 3; /*0xffc8ac72*/
do /*0xffc8ac83*/
{
if ( *v11 ) /*0xffc8ac74*/
++*v10; /*0xffc8ac79*/
v11 = (_DWORD *)((char *)v11 + 8077); /*0xffc8ac7b*/
--n3_1; /*0xffc8ac80*/
}
while ( n3_1 ); /*0xffc8ac83*/
++v10; /*0xffc8ac85*/
--i_2; /*0xffc8ac86*/
}
while ( i_2 ); /*0xffc8ac89*/
n2a_1 = n2a; /*0xffc8ac8b*/
}
for ( i = 0; i < i_1; ++i ) /*0xffc8ac97*/
{
if ( i >= 2u ) /*0xffc8ac9c*/
break; /*0xffc8ac9c*/
if ( *((_BYTE *)v15 + i) < a4 ) /*0xffc8aca5*/
return 0; /*0xffc8aca5*/
}
if ( *(_BYTE *)(__return_address + 246412) ) /*0xffc8acad*/
return 1; /*0xffc8acad*/
v14 = (_DWORD *)(n2a_1 + __return_address + 34528); /*0xffc8acbc*/
do /*0xffc8acd6*/
{
if ( *(_DWORD *)((char *)v14 - 24231) ) /*0xffc8acbe*/
{
if ( *v14 ) /*0xffc8acc7*/
++v4; /*0xffc8accc*/
}
v14 = (_DWORD *)((char *)v14 + 8077); /*0xffc8acce*/
--n3; /*0xffc8acd3*/
}
while ( n3 ); /*0xffc8acd6*/
return v4 >= a4; /*0xffc8ace0*/
}
// Function: MemChipFuncACE9 @ 0xffc8ace9 (0x71 bytes)
// Index: 1081/2560
char __cdecl MemChipFuncACE9(int a1, int a2, int a3, int a4)
{
int CpuCount; // esi
_BYTE *v5; // eax
int v6; // ecx
CpuCount = GetCpuCount(a1, a2, a3); /*0xffc8acff*/
v5 = (_BYTE *)KtiFunc91AF(a1, a2, a3, a4); /*0xffc8ad0b*/
v6 = 1379 * (unsigned __int8)a4; /*0xffc8ad16*/
if ( *(_BYTE *)(v6 + CpuCount + 107) ) /*0xffc8ad1c*/
{
if ( *v5 && !*(_BYTE *)(v6 + CpuCount + 15) ) /*0xffc8ad28*/
return 1; /*0xffc8ad31*/
DebugPrint(a1, 3, a2, a3, a4, 255, 255, 255, "NVDIMM is disabled!\n"); /*0xffc8ad4c*/
}
return 0; /*0xffc8ad56*/
}
// Function: MemChipFuncAD5A @ 0xffc8ad5a (0x2fe bytes)
// Index: 1082/2560
unsigned __int8 __cdecl MemChipFuncAD5A(
int __return_address,
__int16 n2,
int buf,
unsigned __int8 *n3,
_DWORD *a5,
_BYTE *a6)
{
unsigned __int8 v6; // bl
int v7; // ebp
int n4; // ecx
unsigned __int8 v9; // al
unsigned __int8 v10; // dl
int v11; // eax
bool v12; // zf
unsigned __int8 *n3_2; // edi
unsigned __int8 *n3_3; // esi
unsigned int *v15; // eax
int __return_address_1; // ebp
char v17; // bl
unsigned __int8 v18; // dl
char v19; // dh
int v20; // eax
unsigned int v21; // ecx
unsigned __int8 v22; // al
_BYTE *v23; // esi
_BYTE *v24; // eax
char n4_2; // dl
int n4_3; // ecx
unsigned __int8 v27; // ch
unsigned __int8 v28; // cl
unsigned int n0xFFFF_1; // ebp
unsigned int *v30; // eax
unsigned __int8 v31; // dl
int v32; // ecx
unsigned int v33; // eax
int n3_5; // ecx
char v36; // [esp+11h] [ebp-1Fh]
unsigned __int8 n4_5; // [esp+12h] [ebp-1Eh]
unsigned __int8 v38; // [esp+13h] [ebp-1Dh]
_DWORD *v39; // [esp+14h] [ebp-1Ch]
int v40; // [esp+14h] [ebp-1Ch]
_BYTE *v41; // [esp+18h] [ebp-18h]
unsigned __int8 n2_1; // [esp+18h] [ebp-18h]
int v43; // [esp+1Ch] [ebp-14h]
unsigned int *v44; // [esp+1Ch] [ebp-14h]
int n4_1; // [esp+20h] [ebp-10h]
int n4_4; // [esp+20h] [ebp-10h]
int n3_1; // [esp+24h] [ebp-Ch]
int n0xFFFF; // [esp+24h] [ebp-Ch]
unsigned __int8 *n3_4; // [esp+28h] [ebp-8h]
_BYTE *v50; // [esp+2Ch] [ebp-4h]
v6 = 0; /*0xffc8ad67*/
v38 = 0; /*0xffc8ad70*/
n4_5 = 0; /*0xffc8ad74*/
v36 = 0; /*0xffc8ad78*/
v41 = a6; /*0xffc8ad7c*/
v43 = 0; /*0xffc8ad80*/
v39 = a5; /*0xffc8ad84*/
n3_1 = 3; /*0xffc8ad8c*/
do /*0xffc8ae0d*/
{
v7 = 0; /*0xffc8ad99*/
n4 = 4; /*0xffc8ada1*/
v9 = *(_BYTE *)(__return_address + 244317); /*0xffc8ada2*/
n4_1 = 4; /*0xffc8ada8*/
do /*0xffc8addc*/
{
v10 = 0; /*0xffc8adac*/
if ( v9 ) /*0xffc8adb0*/
{
do /*0xffc8adce*/
{
v11 = v43 + v7 * v9 + v10++; /*0xffc8adbf*/
*(_DWORD *)(buf + 4 * v11) = 0; /*0xffc8adc3*/
v9 = *(_BYTE *)(__return_address + 244317); /*0xffc8adc6*/
}
while ( v10 < v9 ); /*0xffc8adce*/
n4 = n4_1; /*0xffc8add0*/
}
++v7; /*0xffc8add4*/
n4_1 = --n4; /*0xffc8add8*/
}
while ( n4 ); /*0xffc8addc*/
v43 += 8; /*0xffc8aded*/
v41[n3 - a6] = 0; /*0xffc8adf1*/
*v41 = 0; /*0xffc8adf4*/
*v39 = 0xFFFF; /*0xffc8adf7*/
v12 = n3_1-- == 1; /*0xffc8ae00*/
++v41; /*0xffc8ae05*/
++v39; /*0xffc8ae09*/
}
while ( !v12 ); /*0xffc8ae0d*/
n3_2 = n3; /*0xffc8ae0f*/
n3_3 = n3; /*0xffc8ae13*/
v15 = a5; /*0xffc8ae15*/
__return_address_1 = __return_address; /*0xffc8ae19*/
n2_1 = 0; /*0xffc8ae1d*/
v40 = 0; /*0xffc8ae21*/
n3_4 = n3; /*0xffc8ae25*/
v44 = a5; /*0xffc8ae29*/
do /*0xffc8b037*/
{
if ( n2 == 2 || n2 == 8 || n2 == 6 ) /*0xffc8ae42*/
MemChipFunc9150(__return_address_1, buf, (int)n3_2, (int)v15, (int)a6, n2_1); /*0xffc8ae68*/
else
MemChipFunc8F8B(__return_address_1, buf, n3_2, v15, n2_1); /*0xffc8ae4f*/
if ( *n3_3 ) /*0xffc8ae70*/
{
v17 = v36; /*0xffc8ae75*/
do /*0xffc8ae90*/
{
if ( RmtFunc6E93(*n3_3) && *n3_3 <= 8u ) /*0xffc8ae8a*/
break; /*0xffc8ae8a*/
--*n3_3; /*0xffc8ae8c*/
++v17; /*0xffc8ae8e*/
}
while ( *n3_3 ); /*0xffc8ae90*/
v36 = v17; /*0xffc8ae96*/
v6 = 0; /*0xffc8ae9a*/
}
v18 = 0; /*0xffc8aea3*/
v19 = v36; /*0xffc8aea5*/
if ( 4 * *(unsigned __int8 *)(__return_address_1 + 244317) ) /*0xffc8aea9*/
{
while ( v19 ) /*0xffc8aeb2*/
{
v20 = v40 + v18; /*0xffc8aebf*/
if ( *(_DWORD *)(buf + 4 * v20) ) /*0xffc8aec3*/
{
v21 = *(_DWORD *)(buf + 4 * v20 + 4); /*0xffc8aec9*/
if ( v21 ) /*0xffc8aecf*/
{
if ( *(_DWORD *)(buf + 4 * v20) >= v21 ) /*0xffc8aeda*/
*(_DWORD *)(buf + 4 * v20 + 4) = 0; /*0xffc8aee1*/
else
*(_DWORD *)(buf + 4 * v20) = 0; /*0xffc8aedc*/
n3_2 = n3; /*0xffc8aee5*/
v36 = --v19; /*0xffc8aeeb*/
}
}
v22 = *(_BYTE *)(__return_address_1 + 244317); /*0xffc8aeef*/
v18 += v22; /*0xffc8aef5*/
if ( v18 >= 4 * (unsigned int)v22 ) /*0xffc8af02*/
goto LABEL_29; /*0xffc8af02*/
}
}
else
{
LABEL_29:
if ( v19 ) /*0xffc8af06*/
{
v23 = (_BYTE *)(__return_address_1 + 453505); /*0xffc8af0c*/
do /*0xffc8afb1*/
{
v24 = v23; /*0xffc8af16*/
n4_2 = 4; /*0xffc8af1c*/
n0xFFFF = 0xFFFF; /*0xffc8af20*/
n4_3 = 4; /*0xffc8af28*/
do /*0xffc8af89*/
{
v24 -= 48704; /*0xffc8af29*/
--n4_2; /*0xffc8af2e*/
--n4_3; /*0xffc8af30*/
v50 = v24; /*0xffc8af31*/
n4_4 = n4_3; /*0xffc8af35*/
if ( *v24 ) /*0xffc8af39*/
{
v27 = *(_BYTE *)(__return_address_1 + 244317); /*0xffc8af3e*/
v28 = 0; /*0xffc8af44*/
if ( v27 ) /*0xffc8af48*/
{
n0xFFFF_1 = n0xFFFF; /*0xffc8af4a*/
v30 = (unsigned int *)(buf + 4 * (v40 + n4_4 * v27)); /*0xffc8af58*/
do /*0xffc8af75*/
{
if ( *v30 && n0xFFFF_1 > *v30 ) /*0xffc8af62*/
{
n0xFFFF_1 = *v30; /*0xffc8af64*/
v38 = v28; /*0xffc8af66*/
n4_5 = n4_2; /*0xffc8af6a*/
}
++v28; /*0xffc8af6e*/
++v30; /*0xffc8af70*/
}
while ( v28 < v27 ); /*0xffc8af75*/
v24 = v50; /*0xffc8af77*/
n0xFFFF = n0xFFFF_1; /*0xffc8af7b*/
__return_address_1 = __return_address; /*0xffc8af7f*/
}
n4_3 = n4_4; /*0xffc8af83*/
}
}
while ( n4_2 ); /*0xffc8af89*/
v23 = (_BYTE *)(__return_address_1 + 453505); /*0xffc8afa1*/
*(_DWORD *)(buf + 4 * (v40 + n4_5 * *(unsigned __int8 *)(__return_address_1 + 244317) + v38)) = 0; /*0xffc8afab*/
--v19; /*0xffc8afae*/
}
while ( v19 ); /*0xffc8afb1*/
n3_3 = n3_4; /*0xffc8afb7*/
n3_2 = n3; /*0xffc8afbb*/
v36 = 0; /*0xffc8afbf*/
}
}
v31 = 0; /*0xffc8afc7*/
*v44 = 0xFFFF; /*0xffc8afc9*/
*n3_3 = 0; /*0xffc8afcf*/
if ( 4 * *(unsigned __int8 *)(__return_address_1 + 244317) ) /*0xffc8afd8*/
{
v32 = 0; /*0xffc8afe3*/
do /*0xffc8b010*/
{
if ( *(_DWORD *)(buf + 4 * (v32 + v40)) ) /*0xffc8afeb*/
{
++*n3_3; /*0xffc8aff4*/
v33 = *(_DWORD *)(buf + 4 * (v32 + v40)); /*0xffc8aff6*/
if ( *v44 > v33 ) /*0xffc8affb*/
*v44 = v33; /*0xffc8affd*/
}
v32 = ++v31; /*0xffc8b008*/
}
while ( v31 < 4 * (unsigned int)*(unsigned __int8 *)(__return_address_1 + 244317) ); /*0xffc8b010*/
n3_2 = n3; /*0xffc8b012*/
}
++v44; /*0xffc8b01a*/
v40 += 8; /*0xffc8b024*/
++n3_3; /*0xffc8b028*/
++n2_1; /*0xffc8b029*/
v15 = a5; /*0xffc8b02f*/
n3_4 = n3_3; /*0xffc8b033*/
}
while ( n2_1 < 3u ); /*0xffc8b037*/
n3_5 = 3; /*0xffc8b03f*/
do /*0xffc8b04d*/
{
if ( *n3_2 > v6 ) /*0xffc8b045*/
v6 = *n3_2; /*0xffc8b047*/
++n3_2; /*0xffc8b049*/
--n3_5; /*0xffc8b04a*/
}
while ( n3_5 ); /*0xffc8b04d*/
return v6; /*0xffc8b040*/
}
// Function: MemChipFn_FFC8B058 @ 0xffc8b058 (0x60 bytes)
// Index: 1083/2560
char __cdecl MemChipFn_FFC8B058(_BYTE *__return_address, unsigned __int8 n255)
{
unsigned __int8 v2; // dl
unsigned __int8 v3; // cl
unsigned int v4; // edi
int v5; // eax
v2 = 0; /*0xffc8b05e*/
while ( 1 ) /*0xffc8b06c*/
{
if ( ((1 << v2) & n255) != 0 ) /*0xffc8b071*/
{
v3 = 0; /*0xffc8b080*/
v4 = 3 * (unsigned __int8)__return_address[244317]; /*0xffc8b082*/
if ( v4 ) /*0xffc8b089*/
break; /*0xffc8b089*/
}
LABEL_7:
if ( ++v2 >= 4u ) /*0xffc8b0ab*/
return 0; /*0xffc8b0b3*/
}
v5 = 0; /*0xffc8b08b*/
while ( !*(_DWORD *)&__return_address[50813 * v2 + 10261 + 8077 * v5] ) /*0xffc8b09b*/
{
v5 = ++v3; /*0xffc8b09f*/
if ( v3 >= v4 ) /*0xffc8b0a4*/
goto LABEL_7; /*0xffc8b0a4*/
}
return 1; /*0xffc8b0af*/
}
// Function: MemChipFn_FFC8B0B8 @ 0xffc8b0b8 (0x1bb bytes)
// Index: 1084/2560
unsigned __int8 __cdecl MemChipFn_FFC8B0B8(int __return_address, __int16 n32, int buf, unsigned __int8 *a4)
{
int __return_address_1; // edx
int v5; // eax
unsigned __int8 v6; // bl
int n7; // edi
int v8; // ecx
unsigned int v9; // eax
int v10; // esi
unsigned __int8 *v11; // edi
int v12; // esi
int n4; // ecx
int v14; // ebp
unsigned __int8 v15; // al
unsigned __int8 v16; // bl
unsigned __int8 n8_2; // bh
int n8_3; // eax
int v19; // ecx
unsigned __int8 n8_1; // cl
unsigned int n0xFFFF; // edx
int v22; // eax
unsigned __int8 v24; // al
unsigned __int8 n8; // [esp+10h] [ebp-14h]
int n4_1; // [esp+18h] [ebp-Ch]
unsigned __int8 p_n8[5]; // [esp+1Ch] [ebp-8h] BYREF
__int16 v28; // [esp+21h] [ebp-3h]
int n32a; // [esp+2Ch] [ebp+8h]
__return_address_1 = __return_address; /*0xffc8b0bb*/
v5 = *(unsigned __int8 *)(__return_address + 244317); /*0xffc8b0c2*/
v6 = 0; /*0xffc8b0c9*/
n7 = 7; /*0xffc8b0ce*/
memset(p_n8, 0, sizeof(p_n8)); /*0xffc8b0d1*/
v8 = 0; /*0xffc8b0d5*/
v28 = 0; /*0xffc8b0db*/
n8 = 0; /*0xffc8b0e0*/
v9 = 4 * v5; /*0xffc8b0e4*/
while ( 1 ) /*0xffc8b0ec*/
{
if ( v9 ) /*0xffc8b0f2*/
{
v10 = 0; /*0xffc8b0f4*/
do /*0xffc8b10f*/
{
*(_DWORD *)(buf + 4 * (v8 + v10)) = 0; /*0xffc8b0f9*/
++v6; /*0xffc8b0fe*/
v9 = 4 * *(unsigned __int8 *)(__return_address + 244317); /*0xffc8b107*/
v10 = v6; /*0xffc8b10a*/
}
while ( v6 < v9 ); /*0xffc8b10f*/
}
v8 += 8; /*0xffc8b114*/
if ( !--n7 ) /*0xffc8b119*/
break; /*0xffc8b119*/
v6 = 0; /*0xffc8b0ea*/
}
if ( n32 == 2 || n32 == 8 || n32 == 6 ) /*0xffc8b138*/
{
v24 = MemChipFn_FFC88D67(__return_address, buf, p_n8, 7u); /*0xffc8b256*/
*a4 = v24; /*0xffc8b262*/
return p_n8[v24]; /*0xffc8b267*/
}
else
{
v11 = a4; /*0xffc8b13e*/
v12 = __return_address + 10239; /*0xffc8b142*/
n4 = 4; /*0xffc8b14a*/
v14 = 0; /*0xffc8b14b*/
n4_1 = 4; /*0xffc8b14d*/
*a4 = 0; /*0xffc8b151*/
do /*0xffc8b22d*/
{
v15 = *(_BYTE *)(__return_address_1 + 244317); /*0xffc8b154*/
v16 = 0; /*0xffc8b15a*/
if ( v15 ) /*0xffc8b15e*/
{
n8_2 = 0; /*0xffc8b164*/
do /*0xffc8b215*/
{
*(_DWORD *)(buf + 4 * (v16 + v14 * v15 + 8 * *v11)) = 0; /*0xffc8b189*/
n8_3 = n8_2; /*0xffc8b18d*/
v19 = 8077 * n8_2; /*0xffc8b190*/
if ( *(_DWORD *)(v19 + v12 + 58) && *(_DWORD *)(v19 + v12 + 8135) && *(_DWORD *)(v19 + v12 + 16212) ) /*0xffc8b1a7*/
{
n8_1 = n8_2; /*0xffc8b1b4*/
*(_DWORD *)p_n8 = n8_2 + 3; /*0xffc8b1b6*/
n0xFFFF = 0xFFFF; /*0xffc8b1ba*/
do /*0xffc8b1d7*/
{
v22 = 8077 * n8_3; /*0xffc8b1be*/
if ( *(_DWORD *)(v22 + v12 + 58) < n0xFFFF ) /*0xffc8b1c8*/
n0xFFFF = *(_DWORD *)(v22 + v12 + 58); /*0xffc8b1ca*/
n8_3 = ++n8_1; /*0xffc8b1d0*/
}
while ( (unsigned int)n8_1 < *(_DWORD *)p_n8 ); /*0xffc8b1d7*/
n32a = n0xFFFF; /*0xffc8b1dc*/
__return_address_1 = __return_address; /*0xffc8b1e0*/
++n8; /*0xffc8b1f6*/
*(_DWORD *)(buf + 4 * (v16 + v14 * *(unsigned __int8 *)(__return_address + 244317) + 8 * *v11)) = n32a; /*0xffc8b201*/
v11 = a4; /*0xffc8b204*/
}
v15 = *(_BYTE *)(__return_address_1 + 244317); /*0xffc8b208*/
++v16; /*0xffc8b20e*/
n8_2 += 3; /*0xffc8b210*/
}
while ( v16 < v15 ); /*0xffc8b215*/
n4 = n4_1; /*0xffc8b21b*/
}
++v14; /*0xffc8b21f*/
v12 += 50813; /*0xffc8b220*/
n4_1 = --n4; /*0xffc8b229*/
}
while ( n4 ); /*0xffc8b22d*/
return MemChipFunc319E(__return_address_1, buf + 32 * *v11, n8); /*0xffc8b243*/
}
}
// Function: MemChipFn_FFC8B273 @ 0xffc8b273 (0x438 bytes)
// Index: 1085/2560
unsigned __int8 __cdecl MemChipFn_FFC8B273(
_BYTE *__return_address,
unsigned __int16 n32,
int buf,
_BYTE *n3,
unsigned int *a5,
int a6)
{
unsigned __int8 v6; // bl
int v7; // eax
int v8; // eax
unsigned __int8 v9; // al
unsigned int *v10; // ecx
int n4; // esi
unsigned __int8 v12; // dl
unsigned int *v13; // esi
int v14; // eax
_BYTE *v15; // edx
bool v16; // zf
_BYTE *n3_2; // eax
unsigned __int8 *n3_3; // ebp
unsigned int *v19; // ecx
unsigned __int16 n32_1; // si
unsigned __int8 v21; // cl
char v22; // dl
char v23; // bl
unsigned __int8 v24; // dl
char v25; // dh
int v26; // eax
unsigned int v27; // ecx
unsigned __int8 v28; // al
_BYTE *n0xFFFF_3; // ebp
char n4_2; // dl
unsigned int n0xFFFF_1; // esi
int n4_3; // ecx
_BYTE *n0xFFFF_2; // eax
unsigned __int8 v34; // ch
unsigned __int8 v35; // cl
unsigned int *v36; // eax
unsigned int *v37; // ecx
unsigned __int8 v38; //... [9987 chars total]
// Function: MemChipFuncB6AB @ 0xffc8b6ab (0x168 bytes)
// Index: 1086/2560
int __cdecl MemChipFuncB6AB(unsigned __int8 *n4, int n4a)
{
int n4a_1; // ebx
unsigned __int8 *n4_1; // esi
int v4; // edi
int SocketInfo; // eax
unsigned __int8 v6; // cl
int v7; // ebx
int v8; // ecx
int v9; // edx
unsigned __int8 *v10; // eax
char v11; // dl
unsigned __int8 v12; // cl
int v13; // ebp
unsigned __int8 v14; // ch
_BYTE *SocketInfo_2; // eax
unsigned __int8 *v16; // ebx
unsigned __int8 v17; // dh
char v18; // dl
_BYTE *SocketInfo_3; // ecx
int n3; // ebp
int v22; // [esp+Ch] [ebp-20h]
int SocketInfo_1; // [esp+10h] [ebp-1Ch]
int v24; // [esp+14h] [ebp-18h]
unsigned __int8 *v25; // [esp+18h] [ebp-14h]
unsigned __int8 *v26; // [esp+28h] [ebp-4h]
n4a_1 = n4a; /*0xffc8b6af*/
n4_1 = n4; /*0xffc8b6b4*/
v4 = 0; /*0xffc8b6bb*/
SocketInfo = GetSocketInfo((int)n4, n4a); /*0xffc8b6bd*/
v6 = n4[244317]; /*0xffc8b6c4*/
SocketInfo_1 = SocketInfo; /*0xffc8b6ca*/
if ( v6 ) /*0xffc8b6d0*/
{
v22 = 0; /*0xffc8b6d6*/
v7 = 50813 * (unsigned __int8)n4a; /*0xffc8b6dd*/
v24 = v6; /*0xffc8b6f0*/
v8 = 0; /*0xffc8b6f4*/
v9 = v24; /*0xffc8b6f8*/
v10 = &n4[v7 + 10189]; /*0xffc8b6fc*/
v25 = v10; /*0xffc8b702*/
while ( 1 ) /*0xffc8b707*/
{
if ( !*v10 ) /*0xffc8b70a*/
goto LABEL_23; /*0xffc8b70a*/
v11 = 0; /*0xffc8b710*/
v12 = 0; /*0xffc8b712*/
while ( 1 ) /*0xffc8b717*/
{
v13 = 7688 * v12; /*0xffc8b717*/
if ( *(_BYTE *)(SocketInfo_1 + v13) ) /*0xffc8b725*/
break; /*0xffc8b725*/
LABEL_16:
if ( ++v12 >= 3u ) /*0xffc8b7a6*/
goto LABEL_22; /*0xffc8b7a6*/
}
v14 = 0; /*0xffc8b733*/
v26 = &n4_1[48704 * (unsigned __int8)n4a + v13]; /*0xffc8b739*/
SocketInfo_2 = (_BYTE *)SocketInfo_1; /*0xffc8b747*/
v16 = &n4_1[8077 * v12 + v7]; /*0xffc8b74b*/
v17 = *(_BYTE *)(SocketInfo_1 + v13 + 3); /*0xffc8b74d*/
if ( v17 ) /*0xffc8b753*/
{
while ( 1 ) /*0xffc8b76a*/
{
n4_1 = n4; /*0xffc8b76a*/
if ( v26[1379 * v14 + 259225] ) /*0xffc8b762*/
{
if ( v16[2688 * v14 + 14448] && v16[2688 * v14 + 14449] ) /*0xffc8b780*/
break; /*0xffc8b780*/
}
if ( ++v14 >= v17 ) /*0xffc8b78e*/
goto LABEL_13; /*0xffc8b78e*/
}
v11 = 1; /*0xffc8b792*/
LABEL_13:
SocketInfo_2 = (_BYTE *)SocketInfo_1; /*0xffc8b794*/
}
if ( v11 != 1 ) /*0xffc8b79b*/
break; /*0xffc8b79b*/
v18 = 0; /*0xffc8b7b5*/
SocketInfo_3 = SocketInfo_2; /*0xffc8b7b9*/
n3 = 3; /*0xffc8b7bb*/
do /*0xffc8b7d1*/
{
if ( *SocketInfo_3 ) /*0xffc8b7bc*/
v4 |= 1 << (v22 + v18); /*0xffc8b7c4*/
++v18; /*0xffc8b7c7*/
SocketInfo_3 += 7688; /*0xffc8b7c8*/
--n3; /*0xffc8b7ce*/
}
while ( n3 ); /*0xffc8b7d1*/
LABEL_22:
v9 = v24; /*0xffc8b7d3*/
v8 = v22; /*0xffc8b7d7*/
v10 = v25; /*0xffc8b7db*/
LABEL_23:
v7 = 50813 * (unsigned __int8)n4a; /*0xffc8b7df*/
++v10; /*0xffc8b7e3*/
v8 += 3; /*0xffc8b7e4*/
v25 = v10; /*0xffc8b7e7*/
--v9; /*0xffc8b7eb*/
v22 = v8; /*0xffc8b7ee*/
v24 = v9; /*0xffc8b7f2*/
if ( !v9 ) /*0xffc8b7f6*/
{
n4a_1 = n4a; /*0xffc8b7fc*/
return AutoGenFunc174A(n4_1, n4a_1, v4); /*0xffc8b7fc*/
}
}
v7 = 50813 * (unsigned __int8)n4a; /*0xffc8b79d*/
goto LABEL_16; /*0xffc8b79d*/
}
return AutoGenFunc174A(n4_1, n4a_1, v4); /*0xffc8b80c*/
}
// Function: MemChipFuncB813 @ 0xffc8b813 (0x15 bytes)
// Index: 1087/2560
void __cdecl MemChipFuncB813(int n4, _BYTE *a2)
{
KtiFunc7D83(a2, 0, 96); /*0xffc8b81b*/
JUMPOUT(0xFFC929B3); /*0xffc929b3*/
}
// Function: DimmPartitionDdrt @ 0xffc8b828 (0x40a bytes)
// Index: 1088/2560
int __cdecl DimmPartitionDdrt(unsigned __int8 *n4, int n4a, int n6, int n2)
{
int result; // eax
unsigned __int8 n20; // bl
int CpuCount; // ebp
char v7; // cl
int v8; // esi
int v9; // edi
int v10; // ecx
unsigned int v11; // esi
unsigned int n0x40000; // ebx
int n0x20000; // eax
int v14; // ebx
unsigned int v15; // edx
int v16; // eax
unsigned int v17; // ecx
int v18; // eax
int v19; // [esp-28h] [ebp-1AE8h]
unsigned __int8 n40; // [esp+9h] [ebp-1AB7h]
unsigned __int8 n80; // [esp+Ah] [ebp-1AB6h]
char p_n20; // [esp+Bh] [ebp-1AB5h] BYREF
unsigned int v23; // [esp+Ch] [ebp-1AB4h]
int n80_1; // [esp+10h] [ebp-1AB0h]
int n40_1; // [esp+14h] [ebp-1AACh]
unsigned int v26; // [esp+18h] [ebp-1AA8h]
int n6_1; // [esp+1Ch] [ebp-1AA4h]
int n2_1; // [esp+20h] [ebp-1AA0h]
int v29; // [esp+28h] [ebp-1A98h]
_BYTE v30[6804]; // [esp+2Ch] [ebp-1A94h] BYREF
result = 0; /*0xffc8b837*/
n20 = 0; /*0xffc8b839*/
n80 = 0; /*0xffc8b83b*/
n40 = 0; /*0xffc8b83f*/
p_n20 = 0; /*0xffc8b843*/
if ( !n4[244358] )
{
CpuCount = GetCpuCount((int)n4, n4a, n6); /*0xffc8b86f*/
DebugPrint((int)n4, 2, n4a, n6, n2, 255, 255, 255, "\tIn PartitionDDRT dimm\n"); /*0xffc8b88b*/
v7 = n4a * n4[244317]; /*0xffc8b8a9*/
n6_1 = (unsigned __int8)n6; /*0xffc8b8ae*/
v8 = (unsigned __int8)((unsigned __int8)n6 / 3u + v7); /*0xffc8b8bd*/
DebugPrint((int)n4, 2, n4a, n6, n2, 255, 255, 255, "\tmcIndex: %d\n", v8);
switch ( n4[v8 + 244360] ) /*0xffc8b8fd*/
{
case 0u: /*0xffc8b8fd*/
n20 = 20; /*0xffc8b904*/
n80 = 80; /*0xffc8b906*/
goto LABEL_4; /*0xffc8b906*/
case 1u: /*0xffc8b8fd*/
n20 = 80; /*0xffc8b915*/
n80 = 20; /*0xffc8b917*/
goto LABEL_4; /*0xffc8b91c*/
case 2u: /*0xffc8b8fd*/
n20 = 50; /*0xffc8b920*/
n80 = 50; /*0xffc8b921*/
LABEL_4:
n40 = 0; /*0xffc8b90b*/
break; /*0xffc8b910*/
case 3u: /*0xffc8b8fd*/
n20 = 60; /*0xffc8b927*/
n40 = 40; /*0xffc8b929*/
goto LABEL_16; /*0xffc8b92e*/
case 4u: /*0xffc8b8fd*/
n20 = 40; /*0xffc8b930*/
n80 = 10; /*0xffc8b932*/
n40 = 50; /*0xffc8b937*/
break; /*0xffc8b93c*/
case 5u: /*0xffc8b8fd*/
n20 = 0; /*0xffc8b93e*/
n80 = 40; /*0xffc8b940*/
n40 = 60; /*0xffc8b945*/
break; /*0xffc8b94a*/
case 6u: /*0xffc8b8fd*/
n20 = 0; /*0xffc8b94c*/
n80 = 30; /*0xffc8b94e*/
n40 = 70; /*0xffc8b953*/
break; /*0xffc8b958*/
case 7u: /*0xffc8b8fd*/
n20 = 100; /*0xffc8b95a*/
n40 = 0; /*0xffc8b95c*/
goto LABEL_16; /*0xffc8b961*/
case 8u: /*0xffc8b8fd*/
n20 = 0; /*0xffc8b963*/
n80 = 100; /*0xffc8b965*/
n40 = 0; /*0xffc8b969*/
break; /*0xffc8b96d*/
case 9u: /*0xffc8b8fd*/
n20 = 0; /*0xffc8b96f*/
n40 = 100; /*0xffc8b971*/
n80 = 0; /*0xffc8b975*/
break; /*0xffc8b979*/
case 0xAu: /*0xffc8b8fd*/
n20 = 30; /*0xffc8b97b*/
n80 = 60; /*0xffc8b97d*/
n40 = 10; /*0xffc8b982*/
break; /*0xffc8b987*/
case 0xBu: /*0xffc8b8fd*/
n20 = 70; /*0xffc8b989*/
n40 = 30; /*0xffc8b98b*/
LABEL_16:
n80 = 0; /*0xffc8b990*/
break; /*0xffc8b990*/
default:
break;
}
DebugPrint((int)n4, 2, n4a, n6, n2, 255, 255, 255, "\t option chosen: %d\n", n4[v8 + 244360]);
n80_1 = n80; /*0xffc8b9dc*/
n40_1 = n40; /*0xffc8b9f0*/
DebugPrint((int)n4, 2, n4a, n6, n2, 255, 255, 255, "\t %d %d %d\n", n20, n80, n40); /*0xffc8b9fe*/
v9 = 1379 * (unsigned __int8)n2; /*0xffc8ba09*/
n2_1 = (unsigned __int8)n2; /*0xffc8ba11*/
v10 = *(unsigned __int16 *)(v9 + CpuCount + 1297); /*0xffc8ba18*/
v26 = n80 + n40; /*0xffc8ba33*/
v11 = ((unsigned int)n20 * v10 / 0x64) << 14; /*0xffc8ba3a*/
v23 = v11; /*0xffc8ba3d*/
n0x40000 = (v10 * v26 / 0x64) << 14; /*0xffc8ba47*/
n0x20000 = v11 & 0x3FFFF; /*0xffc8ba4a*/
if ( (v11 & 0x3FFFF) != 0 ) /*0xffc8ba4f*/
{
if ( n0x40000 > 0x40000 && (unsigned int)n0x20000 >= 0x20000 ) /*0xffc8ba5f*/
n0x20000 -= 0x40000; /*0xffc8ba61*/
v11 -= n0x20000; /*0xffc8ba63*/
v23 = v11; /*0xffc8ba65*/
if ( n0x40000 > 0x40000 || n0x20000 > 0 && n0x40000 ) /*0xffc8ba73*/
n0x40000 += n0x20000; /*0xffc8ba75*/
}
DebugPrint(
(int)n4,
2,
n4a,
n6,
n2,
255,
255,
255,
"\t Requesting partitioning for volCap(4kb gran): %d nonVolCap(4kb gran):%d \n",
v11,
n0x40000);
result = ProcCommonFuncEB22(n4, n4a, n6, n2, v23, n0x40000, v30, &p_n20); /*0xffc8bacf*/
v29 = result; /*0xffc8bad7*/
if ( result )
{
*(_DWORD *)(v9 + CpuCount + 1337) = 0; /*0xffc8bc12*/
*(_DWORD *)(v9 + CpuCount + 1341) = 0; /*0xffc8bc19*/
*(_DWORD *)(v9 + CpuCount + 1329) = 0; /*0xffc8bc20*/
}
else
{
v14 = ProcCommonFuncDA5A((int)v30); /*0xffc8baed*/
v15 = 60 * (n2_1 + 2 * (n6_1 + 6 * (unsigned __int8)n4a)); /*0xffc8bb07*/
v23 = v15; /*0xffc8bb0a*/
*(_WORD *)(v9 + CpuCount + 1329) = *(_DWORD *)(v15 + v14) >> 14; /*0xffc8bb14*/
*(_WORD *)(v9 + CpuCount + 1331) = *(_DWORD *)(v15 + v14 + 12) >> 14; /*0xffc8bb23*/
DebugPrint(
(int)n4,
2,
n4a,
n6,
n2,
255,
255,
255,
"\t Partitioing returns the values: volCap(4kb): %d nonVolCap(4kb):%d \n",
*(_DWORD *)(v15 + v14),
*(_DWORD *)(v15 + v14 + 12));
v16 = *(unsigned __int16 *)(v9 + CpuCount + 1331); /*0xffc8bb5c*/
if ( (_WORD)v16 ) /*0xffc8bb6a*/
{
v17 = n40_1 * v16; /*0xffc8bb80*/
*(_WORD *)(v9 + CpuCount + 1333) = n80_1 * v16 / v26; /*0xffc8bb8b*/
*(_WORD *)(v9 + CpuCount + 1335) = v17 / v26; /*0xffc8bb99*/
}
else
{
*(_DWORD *)(v9 + CpuCount + 1333) = 0; /*0xffc8bb6e*/
}
*(_DWORD *)(v9 + CpuCount + 1337) = RmtFunc6F34(*(_QWORD *)(v23 + v14 + 4), 26); /*0xffc8bbb4*/
v18 = RmtFunc6F34(*(_QWORD *)(v23 + v14 + 16), 26); /*0xffc8bbc9*/
v19 = *(_DWORD *)(v9 + CpuCount + 1337); /*0xffc8bbcf*/
*(_DWORD *)(v9 + CpuCount + 1341) = v18; /*0xffc8bbd6*/
DebugPrint((int)n4, 2, n4a, n6, n2, 255, 255, 255, aVoldpaDPerdpaD, v19, v18); /*0xffc8bc02*/
return v29; /*0xffc8bc07*/
}
}
return result; /*0xffc8bc29*/
}
// Function: MemChipFuncBC64 @ 0xffc8bc64 (0x730 bytes)
// Index: 1089/2560
char __cdecl MemChipFuncBC64(int n4, _BYTE *a2)
{
_DWORD *v2; // ecx
int n4_1; // ebp
_DWORD *v4; // eax
_WORD *v5; // esi
int n6; // ebx
_WORD *v7; // edx
bool v8; // zf
int v9; // edi
unsigned __int8 n4_2; // cl
int v12; // esi
int v13; // eax
_DWORD *v14; // ebp
int v15; // edx
int SocketInfo; // eax
int v17; // edi
_DWORD *n4a_1; // esi
unsigned __int8 n6_1; // cl
unsigned __int8 *v20; // eax
char *v21; // edx
int CpuCount; // edx
unsigned __int8 v23; // cl
int v24; // ebp
int v25; // eax
unsigned __int8 v26; // al
int v27; // edi
int v28; // ecx
__int16 v29; // ax
char *v30; // esi
char v31; // al
int v32; // ecx
unsigned __int8 i_1; // cl
char n4b_1; // ch
int v35; // edx
unsigned __int8 v36; // si
unsigned __int8 v37; // al
int v38; // esi
int v39; // ebp
unsigned __int8 v40; // cl
char *v41; // eax
unsigned __int8 n4_3; // al
_DWORD *v43; // esi
_BYTE *v44; // ebp
char result; // al
unsigned... [16466 chars total]
// Function: MemChipFuncC394 @ 0xffc8c394 (0x28 bytes)
// Index: 1090/2560
char __cdecl MemChipFuncC394(char n2)
{
char n2_1; // cl
if ( n2 == 1 ) /*0xffc8c39c*/
return 0; /*0xffc8c39c*/
if ( n2 == 2 ) /*0xffc8c3a1*/
return 1; /*0xffc8c3b5*/
n2_1 = 2; /*0xffc8c3a5*/
if ( n2 != 4 ) /*0xffc8c3a8*/
{
if ( n2 == 8 ) /*0xffc8c3ad*/
return 3; /*0xffc8c3b1*/
return 0; /*0xffc8c3b7*/
}
return n2_1; /*0xffc8c3bb*/
}
// Function: MemChipFuncC3BC @ 0xffc8c3bc (0x17 bytes)
// Index: 1091/2560
int __cdecl MemChipFuncC3BC(int n4)
{
MemChipFuncC3D3(n4); /*0xffc8c3c0*/
MemChipFuncC928(n4); /*0xffc8c3c9*/
return 0; /*0xffc8c3d2*/
}
// Function: MemChipFuncC3D3 @ 0xffc8c3d3 (0x555 bytes)
// Index: 1092/2560
int __cdecl MemChipFuncC3D3(int n4)
{
int n4_1; // ebp
unsigned __int8 n4_5; // cl
int v3; // edx
int v4; // eax
int v5; // ebx
_BYTE *v6; // esi
unsigned __int8 n6_1; // cl
int v8; // edi
int v9; // eax
int v10; // ebx
int v11; // esi
unsigned __int16 v12; // di
unsigned __int8 n2_8; // al
unsigned __int8 n2_3; // dl
int v15; // eax
unsigned __int8 n2; // dh
unsigned __int8 v17; // bl
int v18; // esi
char v19; // ch
unsigned __int8 n2_2; // cl
int i; // eax
_BYTE *v22; // ecx
_BYTE *v23; // eax
int n4_6; // esi
unsigned __int8 n8; // cl
_BYTE *v26; // esi
_DWORD *v27; // ecx
_BYTE *v28; // ebx
int v29; // eax
unsigned __int16 v30; // ax
int v31; // eax
int n2_10; // ebx
char *v33; // edx
int v34; // ecx
int v35; // eax
int v36; // eax
_BYTE *CpuCount_1; // edx
_WORD *v38; // esi
int n2_5; // eax
_WORD *v40; // ecx
int n4_3; // edi
_BYTE *v42; // edi
_DWORD *v43; // esi
unsigned __int16 *v44; // ecx... [13573 chars total]
// Function: MemChipFuncC928 @ 0xffc8c928 (0x217 bytes)
// Index: 1093/2560
int __cdecl MemChipFuncC928(int n4)
{
int n4_1; // esi
unsigned __int8 n4_2; // al
int v3; // edx
_BYTE *v4; // ecx
unsigned __int8 n6; // bl
unsigned __int8 *v6; // edi
int v7; // ecx
int CpuCount; // eax
unsigned __int8 v9; // dl
int CpuCount_1; // ebp
int v11; // eax
int v12; // edi
int v13; // ebx
int v14; // ebx
int v15; // eax
_BYTE *v16; // edx
_BYTE *v17; // eax
_DWORD *v18; // ebp
int *v19; // edi
_BYTE *v20; // esi
int v21; // ecx
_DWORD *v22; // edx
_BYTE *v23; // ecx
int v25; // [esp+10h] [ebp-28h]
unsigned __int8 n6_1; // [esp+14h] [ebp-24h]
unsigned __int8 n4_3; // [esp+18h] [ebp-20h]
_BYTE *v28; // [esp+1Ch] [ebp-1Ch]
int v29; // [esp+1Ch] [ebp-1Ch]
int v30; // [esp+20h] [ebp-18h]
unsigned __int8 v31; // [esp+24h] [ebp-14h]
int v32; // [esp+28h] [ebp-10h]
int n2; // [esp+28h] [ebp-10h]
int n3; // [esp+2Ch] [ebp-Ch]
unsigned __int8 *v35; // [esp+30h] [ebp-8h]
_BYTE *v36; // [esp+34h] [ebp-4h]
n4_1 = n4; /*0xffc8c92e*/
n4_2 = 0; /*0xffc8c932*/
v3 = 0; /*0xffc8c934*/
n4_3 = 0; /*0xffc8c936*/
v30 = 0; /*0xffc8c93b*/
v4 = (_BYTE *)(n4 + 258689); /*0xffc8c93f*/
v36 = (_BYTE *)(n4 + 258689); /*0xffc8c945*/
do /*0xffc8cb2f*/
{
if ( *v4 ) /*0xffc8c949*/
{
n6 = 0; /*0xffc8c952*/
v25 = 0; /*0xffc8c956*/
v6 = v4 + 36; /*0xffc8c95a*/
v7 = 0; /*0xffc8c95d*/
n6_1 = 0; /*0xffc8c961*/
v35 = v6; /*0xffc8c965*/
do /*0xffc8cb01*/
{
if ( *(v6 - 3) ) /*0xffc8c969*/
{
CpuCount = GetCpuCount(n4_1, n4_3, n6_1); /*0xffc8c97c*/
v9 = 0; /*0xffc8c983*/
v31 = 0; /*0xffc8c988*/
CpuCount_1 = CpuCount; /*0xffc8c98c*/
if ( *v6 ) /*0xffc8c981*/
{
while ( 1 ) /*0xffc8c999*/
{
v11 = 1379 * v9; /*0xffc8c999*/
if ( *(_BYTE *)(v11 + CpuCount_1) ) /*0xffc8c99f*/
{
if ( *(_BYTE *)(v11 + CpuCount_1 + 107) ) /*0xffc8c9a5*/
break; /*0xffc8c9a5*/
}
v31 = ++v9; /*0xffc8c9ae*/
if ( v9 >= *v6 ) /*0xffc8c9b4*/
goto LABEL_22; /*0xffc8c9b4*/
}
v12 = v30 + v25; /*0xffc8c9bf*/
v13 = *(unsigned __int16 *)(1379 * v9 + CpuCount_1 + 1297); /*0xffc8c9d3*/
if ( *(_BYTE *)(n4_1 + 244313) != 1 ) /*0xffc8c9db*/
v13 += *(_DWORD *)(v12 + n4_1 + 10241); /*0xffc8c9dd*/
v14 = v13 + 4; /*0xffc8c9e4*/
if ( (v14 & 7) != 0 ) /*0xffc8c9ec*/
v14 = v14 - (v14 & 7) + 8; /*0xffc8c9f0*/
v15 = KtiFunc91AF(n4_1, n4_3, n6_1, v31); /*0xffc8ca00*/
*(_DWORD *)(v12 + n4_1 + 18109) = v14; /*0xffc8ca0b*/
v16 = (_BYTE *)(n4_1 + v12 + 18125); /*0xffc8ca18*/
v28 = (_BYTE *)(n4_1 + v12 + 18129); /*0xffc8ca1f*/
*v16 = 1; /*0xffc8ca23*/
*v28 = 1; /*0xffc8ca26*/
*(_BYTE *)(v12 + n4_1 + 18261) = *(_BYTE *)(v15 + 2); /*0xffc8ca2c*/
if ( *(_BYTE *)(n4_1 + 244313) == 1 ) /*0xffc8ca3a*/
*(_DWORD *)(v12 + n4_1 + 18133) = 0; /*0xffc8ca3c*/
else
*(_DWORD *)(v12 + n4_1 + 18133) = *(_DWORD *)(v12 + n4_1 + 10241); /*0xffc8ca4d*/
*(_BYTE *)(v12 + n4_1 + 18262) = 0; /*0xffc8ca5a*/
*(_DWORD *)(v12 + n4_1 + 18137) = 0; /*0xffc8ca62*/
n3 = 3; /*0xffc8ca72*/
v32 = n4_1 + v12 + 18269; /*0xffc8ca7a*/
v17 = v16 + 1; /*0xffc8ca7e*/
v18 = (_DWORD *)(n4_1 + v12 + 18165); /*0xffc8ca8b*/
v19 = (int *)(n4_1 + v12 + 18113); /*0xffc8ca8d*/
v20 = (_BYTE *)v32; /*0xffc8ca8f*/
v21 = v28 - v16; /*0xffc8ca93*/
v29 = v28 - v16; /*0xffc8ca95*/
do /*0xffc8cad2*/
{
*v19 = v14; /*0xffc8ca99*/
v22 = v18; /*0xffc8ca9b*/
v17[v21] = 0; /*0xffc8ca9d*/
v23 = v20; /*0xffc8caa1*/
*v17 = 0; /*0xffc8caa3*/
n2 = 2; /*0xffc8caa6*/
do /*0xffc8cabd*/
{
*v23 = 0; /*0xffc8caae*/
*v22++ = 0; /*0xffc8cab1*/
++v23; /*0xffc8cab7*/
--n2; /*0xffc8cab8*/
}
while ( n2 ); /*0xffc8cabd*/
v21 = v29; /*0xffc8cabf*/
++v19; /*0xffc8cac3*/
++v17; /*0xffc8cac6*/
v20 += 8; /*0xffc8cac7*/
v18 += 8; /*0xffc8caca*/
--n3; /*0xffc8cacd*/
}
while ( n3 ); /*0xffc8cad2*/
n4_1 = n4; /*0xffc8cad4*/
n6 = n6_1; /*0xffc8cad8*/
v6 = v35; /*0xffc8cadc*/
}
LABEL_22:
v7 = v25; /*0xffc8cae0*/
}
++n6; /*0xffc8cae4*/
v6 += 7688; /*0xffc8cae6*/
v7 += 8077; /*0xffc8caec*/
n6_1 = n6; /*0xffc8caf2*/
v35 = v6; /*0xffc8caf6*/
v25 = v7; /*0xffc8cafa*/
}
while ( n6 < 6u ); /*0xffc8cb01*/
n4_2 = n4_3; /*0xffc8cb07*/
v4 = v36; /*0xffc8cb0b*/
v3 = v30; /*0xffc8cb0f*/
}
++n4_2; /*0xffc8cb13*/
v4 += 48704; /*0xffc8cb15*/
v3 += 50813; /*0xffc8cb1b*/
n4_3 = n4_2; /*0xffc8cb21*/
v36 = v4; /*0xffc8cb25*/
v30 = v3; /*0xffc8cb29*/
}
while ( n4_2 < 4u ); /*0xffc8cb2f*/
return 0; /*0xffc8cb35*/
}
// Function: MemChipFuncCB3F @ 0xffc8cb3f (0x174 bytes)
// Index: 1094/2560
unsigned __int8 __cdecl MemChipFuncCB3F(int n4, _BYTE *a2, char a3, char n6)
{
unsigned __int8 n6_1; // di
int CpuCount; // ecx
unsigned __int8 n4_1; // bh
unsigned __int8 v7; // bl
int v8; // ebp
unsigned __int8 n2; // al
_BYTE *CpuCount_2; // esi
int v11; // edi
unsigned __int8 v12; // cl
_BYTE *v13; // edx
_BYTE *v14; // edx
int v15; // eax
_BYTE *v16; // edi
int v17; // ecx
unsigned __int8 n2_1; // [esp+10h] [ebp-18h]
_BYTE *CpuCount_3; // [esp+14h] [ebp-14h]
unsigned __int8 n4_2; // [esp+18h] [ebp-10h]
int v22; // [esp+20h] [ebp-8h]
int CpuCount_1; // [esp+24h] [ebp-4h]
n6_1 = n6; /*0xffc8cb46*/
CpuCount = GetCpuCount(n4, a3, n6); /*0xffc8cb5b*/
CpuCount_1 = CpuCount; /*0xffc8cb5f*/
n4_1 = 0; /*0xffc8cb63*/
v7 = 0; /*0xffc8cb65*/
n4_2 = 0; /*0xffc8cb67*/
v8 = 0; /*0xffc8cb6b*/
do /*0xffc8cca3*/
{
n2 = 0; /*0xffc8cb6d*/
CpuCount_2 = (_BYTE *)CpuCount; /*0xffc8cb6f*/
n2_1 = 0; /*0xffc8cb71*/
CpuCount_3 = (_BYTE *)CpuCount; /*0xffc8cb75*/
do /*0xffc8cc8a*/
{
if ( *CpuCount_2 && CpuCount_2[107] != 1 ) /*0xffc8cb86*/
{
v11 = KtiFunc91AF(n4, a3, n6_1, n2_1); /*0xffc8cba4*/
v22 = v11; /*0xffc8cbaa*/
if ( !KtiFunc89E9(n4, a3, n6, n2_1, n4_2, 1) && *(_WORD *)(v11 + v8 + 18) ) /*0xffc8cbcc*/
{
v12 = 0; /*0xffc8cbd7*/
v13 = a2; /*0xffc8cbd9*/
if ( v7 ) /*0xffc8cbdf*/
{
do /*0xffc8cbf7*/
{
if ( *(_WORD *)&a2[7 * v12 + 5] < *(_WORD *)(v11 + v8 + 18) ) /*0xffc8cbf1*/
break; /*0xffc8cbf1*/
++v12; /*0xffc8cbf3*/
}
while ( v12 < v7 ); /*0xffc8cbf7*/
CpuCount_2 = CpuCount_3; /*0xffc8cbf9*/
if ( v12 < v7 ) /*0xffc8cbff*/
{
v14 = &a2[7 * v7]; /*0xffc8cc13*/
v15 = (unsigned __int8)(v7 - v12); /*0xffc8cc19*/
do /*0xffc8cc2b*/
{
v16 = v14; /*0xffc8cc1c*/
v14 -= 7; /*0xffc8cc21*/
*(_DWORD *)v16 = *(_DWORD *)v14; /*0xffc8cc24*/
v16 += 4; /*0xffc8cc24*/
*(_WORD *)v16 = *((_WORD *)v14 + 2); /*0xffc8cc25*/
v16[2] = v14[6]; /*0xffc8cc27*/
--v15; /*0xffc8cc28*/
}
while ( v15 ); /*0xffc8cc2b*/
CpuCount_2 = CpuCount_3; /*0xffc8cc2d*/
v13 = a2; /*0xffc8cc31*/
v11 = v22; /*0xffc8cc35*/
}
}
v17 = 7 * v12; /*0xffc8cc3c*/
++v7; /*0xffc8cc3f*/
v13[v17] = a3; /*0xffc8cc45*/
v13[v17 + 1] = n6; /*0xffc8cc4c*/
v13[v17 + 2] = n2_1; /*0xffc8cc54*/
v13[v17 + 3] = n4_1; /*0xffc8cc58*/
v13[v17 + 4] = *(_BYTE *)(v11 + v8 + 2); /*0xffc8cc60*/
*(_WORD *)&v13[v17 + 5] = *(_WORD *)(v11 + v8 + 18); /*0xffc8cc69*/
}
n2 = n2_1; /*0xffc8cc70*/
n6_1 = n6; /*0xffc8cc74*/
}
++n2; /*0xffc8cc78*/
CpuCount_2 += 1379; /*0xffc8cc7a*/
n2_1 = n2; /*0xffc8cc80*/
CpuCount_3 = CpuCount_2; /*0xffc8cc84*/
}
while ( n2 < 2u ); /*0xffc8cc8a*/
CpuCount = CpuCount_1; /*0xffc8cc90*/
++n4_1; /*0xffc8cc94*/
v8 += 242; /*0xffc8cc96*/
n4_2 = n4_1; /*0xffc8cc9c*/
}
while ( n4_1 < 4u ); /*0xffc8cca3*/
return v7; /*0xffc8cca9*/
}
// Function: MemChipFuncCCB3 @ 0xffc8ccb3 (0x2d bytes)
// Index: 1095/2560
_BYTE *__cdecl MemChipFuncCCB3(int n4, _BYTE *a2)
{
_BYTE *v2; // ecx
_BYTE *result; // eax
int n4_1; // edx
v2 = a2 + 9; /*0xffc8ccbb*/
result = (_BYTE *)(n4 + 258689); /*0xffc8ccc0*/
n4_1 = 4; /*0xffc8ccc5*/
do /*0xffc8ccdd*/
{
if ( *result ) /*0xffc8ccc6*/
{
*(_DWORD *)(v2 - 5) = 0; /*0xffc8cccb*/
*v2 = 0; /*0xffc8cccf*/
}
result += 48704; /*0xffc8ccd2*/
v2 += 24; /*0xffc8ccd7*/
--n4_1; /*0xffc8ccda*/
}
while ( n4_1 ); /*0xffc8ccdd*/
return result; /*0xffc8ccdf*/
}
// Function: MemChipFuncCCE0 @ 0xffc8cce0 (0xa8 bytes)
// Index: 1096/2560
int __cdecl MemChipFuncCCE0(int a1, int a2, unsigned __int16 n16, char n3)
{
int result; // eax
result = a1; /*0xffc8cce3*/
*(_BYTE *)a1 = 0; /*0xffc8ccea*/
*(_WORD *)(a1 + 1) = 0; /*0xffc8ccec*/
if ( n16 > 8u ) /*0xffc8ccf7*/
{
if ( n16 == 16 || n16 == 32 ) /*0xffc8cd67*/
goto LABEL_17; /*0xffc8cd67*/
if ( n16 != 260 ) /*0xffc8cd6f*/
return result; /*0xffc8cd6f*/
goto LABEL_21; /*0xffc8cd6f*/
}
if ( n16 == 8 ) /*0xffc8ccf9*/
{
LABEL_7:
if ( n3 != 1 ) /*0xffc8cd18*/
{
if ( n3 == 2 ) /*0xffc8cd1d*/
{
*(_WORD *)a1 = 2; /*0xffc8cd49*/
*(_BYTE *)(a1 + 2) = 1; /*0xffc8cd4e*/
}
else if ( n3 == 3 ) /*0xffc8cd22*/
{
*(_WORD *)a1 = 2; /*0xffc8cd24*/
*(_BYTE *)(a1 + 2) = 2; /*0xffc8cd29*/
}
return result; /*0xffc8cd2e*/
}
*(_BYTE *)(a1 + 2) = 2; /*0xffc8cd54*/
LABEL_17:
*(_WORD *)a1 = 258; /*0xffc8cd58*/
return result; /*0xffc8cd58*/
}
if ( n16 != 1 ) /*0xffc8ccfe*/
{
if ( n16 != 2 ) /*0xffc8cd03*/
{
if ( n16 != 4 ) /*0xffc8cd09*/
{
if ( n16 != 6 ) /*0xffc8cd0f*/
return result; /*0xffc8cd0f*/
goto LABEL_7; /*0xffc8cd0f*/
}
LABEL_21:
if ( n3 == 1 ) /*0xffc8cd78*/
{
*(_WORD *)a1 = 514; /*0xffc8cd81*/
return result; /*0xffc8cd81*/
}
if ( n3 != 2 ) /*0xffc8cd7d*/
return result; /*0xffc8cd7d*/
goto LABEL_17; /*0xffc8cd7d*/
}
goto LABEL_7; /*0xffc8cd03*/
}
if ( n3 == 1 ) /*0xffc8cd36*/
{
*(_WORD *)a1 = 257; /*0xffc8cd42*/
}
else if ( n3 == 2 ) /*0xffc8cd3b*/
{
*(_WORD *)a1 = 0; /*0xffc8cd3d*/
}
return result; /*0xffc8cd2d*/
}
// Function: MemChipFuncCD88 @ 0xffc8cd88 (0x38c bytes)
// Index: 1097/2560
int __cdecl MemChipFuncCD88(_BYTE *n4, int a2, unsigned __int8 n0x18, char a4)
{
_BYTE *v5; // ebp
unsigned __int16 n16; // si
int v8; // eax
unsigned __int8 n4a_1; // bl
bool v10; // al
unsigned __int8 v11; // al
unsigned __int8 n3; // dl
char v13; // cl
_BYTE *v14; // ebp
unsigned __int8 v15; // al
char v16; // cl
unsigned __int8 n8_3; // bl
_BYTE *n0x18_2; // ecx
_BYTE *n0x18_3; // esi
unsigned int v20; // eax
int n8_1; // ecx
unsigned int v22; // ebx
__int16 n4_2; // ax
char v24; // cl
unsigned __int8 n0x18_4; // al
char n5; // [esp+Dh] [ebp-3Bh]
char n5_1; // [esp+Eh] [ebp-3Ah]
char v28; // [esp+Fh] [ebp-39h]
__int16 v29; // [esp+10h] [ebp-38h]
char v30; // [esp+13h] [ebp-35h]
char v31; // [esp+14h] [ebp-34h]
__int16 v32; // [esp+15h] [ebp-33h]
int v33; // [esp+18h] [ebp-30h]
_BYTE *v34; // [esp+1Ch] [ebp-2Ch]
int n4_3; // [esp+20h] [ebp-28h]
int n4_1; // [esp+24h] [ebp-24h]
int n260; // [esp+28h] [ebp-20h]
int n8_2; // [esp+2Ch] [ebp-1Ch]
_BYTE *n0x18_1; // [esp+30h] [ebp-18h]
int v40; // [esp+34h] [ebp-14h]
int n4a_2; // [esp+38h] [ebp-10h]
int n2; // [esp+3Ch] [ebp-Ch]
int n8; // [esp+40h] [ebp-8h]
int n6; // [esp+44h] [ebp-4h]
unsigned __int8 n4a; // [esp+4Ch] [ebp+4h]
char v46; // [esp+50h] [ebp+8h]
v33 = 0; /*0xffc8cd8b*/
v32 = 0; /*0xffc8cd97*/
v40 = (unsigned __int8)a2; /*0xffc8cda5*/
n0x18_1 = (_BYTE *)n0x18; /*0xffc8cdaf*/
v31 = 0; /*0xffc8cdbb*/
n8_2 = 50813 * (unsigned __int8)a2; /*0xffc8cdc0*/
v5 = &n4[19 * n0x18 + 58799 + n8_2]; /*0xffc8cdcc*/
v34 = v5; /*0xffc8cdce*/
if ( v5[17] == 2 ) /*0xffc8cdd6*/
return -1; /*0xffc8cddb*/
n16 = *(_WORD *)(v5 + 1); /*0xffc8cde5*/
v8 = MemChipFuncCCE0((int)&n0x18, (int)n4, n16, v5[3]); /*0xffc8cdf1*/
n4a_1 = 0; /*0xffc8cdf8*/
v29 = *(_WORD *)v8; /*0xffc8cdfd*/
v28 = *(_BYTE *)(v8 + 2); /*0xffc8ce05*/
v10 = MemChipFunc9C5C(v5[13]); /*0xffc8ce0e*/
if ( a4 ) /*0xffc8ce1d*/
v11 = v5[v10 + 11]; /*0xffc8ce25*/
else
v11 = v5[v10 + 9]; /*0xffc8ce1f*/
n3 = 0; /*0xffc8ce2c*/
v13 = 0; /*0xffc8ce30*/
n4_3 = 1; /*0xffc8ce33*/
do /*0xffc8ce4f*/
{
if ( ((1 << v13) & v11) != 0 ) /*0xffc8ce3b*/
*(&v30 + ++n4a_1) = n3; /*0xffc8ce42*/
++n3; /*0xffc8ce46*/
++v13; /*0xffc8ce48*/
}
while ( n3 < 3u ); /*0xffc8ce4f*/
n4a = n4a_1; /*0xffc8ce56*/
n2 = 2; /*0xffc8ce5f*/
n6 = 6; /*0xffc8ce6c*/
n8 = 8; /*0xffc8ce74*/
n260 = 260; /*0xffc8ce78*/
n4_1 = 4; /*0xffc8ce7f*/
if ( n16 == 1 || n16 == 4 || n16 == 260 ) /*0xffc8ce94*/
{
v14 = v34; /*0xffc8cf0f*/
v15 = v34[8]; /*0xffc8cf13*/
if ( v15 > 1u && n4a_1 == 2 ) /*0xffc8cf1f*/
{
v16 = HIBYTE(v29); /*0xffc8cf21*/
goto LABEL_19; /*0xffc8cf25*/
}
}
else if ( n16 == 2 || n16 == 8 || n16 == 6 ) /*0xffc8cea9*/
{
v14 = v34; /*0xffc8ceab*/
v15 = v34[8]; /*0xffc8ceaf*/
if ( v15 > 1u && n4a_1 == 2 ) /*0xffc8cebb*/
{
v16 = v28; /*0xffc8cebd*/
LABEL_19:
if ( v16 == (_BYTE)v29 && 2 * (unsigned int)v15 > 8 ) /*0xffc8cece*/
{
DebugPrint((int)n4, 3, a2, 255, 255, 255, 255, 255, "Not enough target entries to encode SAD rule\n"); /*0xffc8cee3*/
KtiFunc211E((int)n4, 14, 8, a2, 255, 255, 255); /*0xffc8cef3*/
ProcMemInitCheck((int)n4, 248, 4); /*0xffc8cf05*/
}
}
}
else
{
v14 = v34; /*0xffc8cf27*/
}
n8_3 = 0; /*0xffc8cf2b*/
n4a_2 = n4a; /*0xffc8cf38*/
v46 = 0; /*0xffc8cf40*/
n0x18 = 0; /*0xffc8cf44*/
n5 = 0; /*0xffc8cf48*/
n5_1 = 0; /*0xffc8cf4f*/
n0x18_2 = &n4[8 * (_DWORD)n0x18_1 + 59255 + n8_2]; /*0xffc8cf59*/
n0x18_1 = n0x18_2; /*0xffc8cf5b*/
do /*0xffc8d102*/
{
n0x18_3 = n0x18_2; /*0xffc8cf61*/
v20 = 0; /*0xffc8cf63*/
n8_1 = 8; /*0xffc8cf65*/
v34 = 0; /*0xffc8cf66*/
n8_2 = 8; /*0xffc8cf6a*/
do /*0xffc8d0f5*/
{
if ( *n0x18_3 ) /*0xffc8cf6e*/
{
v22 = v20 / (unsigned __int8)n4[244317]; /*0xffc8cf82*/
if ( v22 == v40 ) /*0xffc8cf88*/
{
v22 = (v20 % (unsigned __int8)n4[244317]) | 8; /*0xffc8cf95*/
if ( n4a == 1 ) /*0xffc8cf9e*/
v22 |= 2 * (unsigned __int8)*(&v30 + n4a_2); /*0xffc8cfab*/
++n5_1; /*0xffc8cfad*/
}
else
{
++n5; /*0xffc8cf8a*/
}
v33 |= v22 << (4 * v46); /*0xffc8cfbf*/
if ( v14[8] > 1u && n4a == 2 ) /*0xffc8cfd4*/
{
if ( ((n4_2 = *(_WORD *)(v14 + 1), n4_2 == (_WORD)n2) || n4_2 == (_WORD)n8 || n4_2 == (_WORD)n6) /*0xffc8d02c*/
&& (v24 = 4 * v46, v28 == (_BYTE)v29)
|| (n4_2 == (_WORD)n4_3 || n4_2 == (_WORD)n4_1 || n4_2 == (_WORD)n260)
&& (v24 = 4 * v46, HIBYTE(v29) == (_BYTE)v29) )
{
if ( (n4_2 == (_WORD)n4_3 || n4_2 == (_WORD)n4_1 || n4_2 == (_WORD)n260) /*0xffc8d06a*/
&& !n4[246412]
&& n4[246424] < 3u
&& (n4[8307] == 1 || n4[257243] == 1) )
{
v33 |= v22 << (4 * ++v46); /*0xffc8d07a*/
}
else
{
if ( (v22 & 8) != 0 ) /*0xffc8d08a*/
{
if ( n5 ) /*0xffc8d091*/
{
n0x18_4 = n0x18; /*0xffc8d0ad*/
}
else
{
n0x18_4 = n0x18; /*0xffc8d095*/
if ( (v46 & 1) == 0 && v46 ) /*0xffc8d0a0*/
{
n0x18_4 = n0x18 ^ 1; /*0xffc8d0a5*/
n0x18 ^= 1u; /*0xffc8d0a7*/
}
}
v33 |= (unsigned __int8)*(&v31 + n0x18_4) << (v24 + 1); /*0xffc8d0bc*/
}
if ( n5 == n5_1 || n5 == 5 ) /*0xffc8d0cd*/
n0x18 ^= 1u; /*0xffc8d0d2*/
}
}
}
v20 = (unsigned int)v34; /*0xffc8d0da*/
n8_3 = v46 + 1; /*0xffc8d0de*/
n8_1 = n8_2; /*0xffc8d0e0*/
++v46; /*0xffc8d0e4*/
}
++v20; /*0xffc8d0e8*/
++n0x18_3; /*0xffc8d0e9*/
--n8_1; /*0xffc8d0ea*/
v34 = (_BYTE *)v20; /*0xffc8d0ed*/
n8_2 = n8_1; /*0xffc8d0f1*/
}
while ( n8_1 ); /*0xffc8d0f5*/
n0x18_2 = n0x18_1; /*0xffc8d0fb*/
}
while ( n8_3 < 8u ); /*0xffc8d102*/
return v33; /*0xffc8d10d*/
}
// Function: MemChipFuncD114 @ 0xffc8d114 (0x28 bytes)
// Index: 1098/2560
int __cdecl MemChipFuncD114(char n3)
{
int n2; // ecx
if ( n3 == 3 ) /*0xffc8d11c*/
return 1; /*0xffc8d138*/
n2 = 2; /*0xffc8d120*/
if ( n3 == 5 ) /*0xffc8d123*/
return 3; /*0xffc8d133*/
if ( n3 != 6 ) /*0xffc8d128*/
return 0; /*0xffc8d12d*/
return n2; /*0xffc8d13b*/
}
// Function: MemChipFuncD13C @ 0xffc8d13c (0x27 bytes)
// Index: 1099/2560
char __cdecl MemChipFuncD13C(int n4, char a2)
{
char v2; // cl
v2 = 0; /*0xffc8d141*/
if ( a2 ) /*0xffc8d145*/
{
switch ( a2 ) /*0xffc8d14a*/
{
case 1: /*0xffc8d14a*/
return 1; /*0xffc8d15e*/
case 2: /*0xffc8d14a*/
return 2; /*0xffc8d15a*/
case 3: /*0xffc8d14a*/
return 3; /*0xffc8d156*/
}
}
return v2; /*0xffc8d162*/
}
// Function: MemChipFuncD163 @ 0xffc8d163 (0x34c bytes)
// Index: 1100/2560
int __cdecl MemChipFuncD163(int __return_address, int a2, unsigned __int16 a3, int n32)
{
unsigned __int8 n4; // bl
unsigned __int8 v5; // bl
int result; // eax
unsigned int v7; // eax
int v8; // edx
int n4_1; // edi
unsigned __int8 v10; // bl
int v11; // ecx
unsigned __int8 p_n64[5]; // [esp+13h] [ebp-161h] BYREF
unsigned __int8 n3[4]; // [esp+18h] [ebp-15Ch] BYREF
char v14; // [esp+1Ch] [ebp-158h] BYREF
__int16 v15; // [esp+1Dh] [ebp-157h]
unsigned int v16[3]; // [esp+20h] [ebp-154h] BYREF
unsigned __int8 v17[4]; // [esp+2Ch] [ebp-148h]
unsigned __int8 v18[4]; // [esp+30h] [ebp-144h] BYREF
_OWORD buf[6]; // [esp+34h] [ebp-140h] BYREF
_OWORD buf_1[14]; // [esp+94h] [ebp-E0h] BYREF
n4 = 0; /*0xffc8d16f*/
KtiFunc7D83(buf, 0, 0x60u); /*0xffc8d177*/
KtiFunc7D83(buf_1, 0, 0xE0u); /*0xffc8d18a*/
memset(v16, 255, sizeof(v16)); /*0xffc8d198*/
n3[0] = 0; /*0xffc8d1b8*/
*(_WORD *)&n3[1] = 0; /*0xffc8d1bc*/
v14 = 0; /*0xffc8d1c1*/
v15 = 0; /*0xffc8d1c5*/
memset(p_n64, 0, sizeof(p_n64)); /*0xffc8d1ce*/
if ( *(_BYTE *)(a2 + 96) ) /*0xffc8d1d2*/
{
LABEL_21:
while ( MemChipFuncAD5A(__return_address, n32, (int)buf, n3, v16, &v14) > 1u ) /*0xffc8d36b*/
{
result = MemChipFunc5FA5( /*0xffc8d395*/
__return_address,
a2,
a3,
n32,
(int)buf,
n3,
v16,
(int)&v14,
p_n64,
(unsigned int *)&p_n64[1]);
if ( result ) /*0xffc8d39f*/
return result; /*0xffc8d39f*/
result = MemChipFunc2E86(__return_address, (int)&buf[2 * p_n64[0]], *(int *)&p_n64[1], n32); /*0xffc8d3ba*/
if ( result ) /*0xffc8d3c4*/
return result; /*0xffc8d3c4*/
if ( (*(_DWORD *)(__return_address + 130) & 0x200000) != 0 && *(_DWORD *)&p_n64[1] == 64 ) /*0xffc8d3df*/
return 0; /*0xffc8d3df*/
}
n3[0] = 0; /*0xffc8d3ea*/
do /*0xffc8d44e*/
{
if ( (*(_DWORD *)(__return_address + 130) & 0x200000) != 0 ) /*0xffc8d3fc*/
{
result = MemChipFunc4EBE(__return_address, a2, *(int *)n3, a3, n32, (int *)&p_n64[1], 1); /*0xffc8d40f*/
if ( result ) /*0xffc8d419*/
return result; /*0xffc8d419*/
if ( *(_DWORD *)&p_n64[1] == 64 ) /*0xffc8d424*/
return 0; /*0xffc8d424*/
}
else
{
result = MemChipFunc4EBE(__return_address, a2, *(int *)n3, a3, n32, (int *)&p_n64[1], 0); /*0xffc8d439*/
if ( result ) /*0xffc8d443*/
return result; /*0xffc8d443*/
}
n3[0] = ++n4; /*0xffc8d447*/
}
while ( n4 < 4u ); /*0xffc8d44e*/
v7 = 3 * *(unsigned __int8 *)(__return_address + 244317); /*0xffc8d459*/
v8 = 0; /*0xffc8d45c*/
n4_1 = 4; /*0xffc8d45e*/
do /*0xffc8d4a0*/
{
v10 = 0; /*0xffc8d45f*/
if ( v7 ) /*0xffc8d463*/
{
v11 = 0; /*0xffc8d465*/
do /*0xffc8d495*/
{
++v10; /*0xffc8d47d*/
*(_DWORD *)(v8 + 8077 * v11 + __return_address + 10297) = *(_DWORD *)(v8 /*0xffc8d47f*/
+ 8077 * v11
+ __return_address
+ 10241)
- *(_DWORD *)(v8
+ 8077 * v11
+ __return_address
+ 10289);
v7 = 3 * *(unsigned __int8 *)(__return_address + 244317); /*0xffc8d48d*/
v11 = v10; /*0xffc8d490*/
}
while ( v10 < v7 ); /*0xffc8d495*/
}
v8 += 50813; /*0xffc8d497*/
--n4_1; /*0xffc8d49d*/
}
while ( n4_1 ); /*0xffc8d4a0*/
return 0; /*0xffc8d4a2*/
}
else
{
if ( *(_BYTE *)(__return_address + 9413) == 3 || (_WORD)n32 == 16 || (_WORD)n32 == 32 ) /*0xffc8d1f2*/
{
while ( 1 ) /*0xffc8d20f*/
{
v17[0] = MemChipFn_FFC8B0B8(__return_address, n32, (int)buf_1, v18); /*0xffc8d20f*/
if ( v17[0] <= 1u ) /*0xffc8d215*/
break; /*0xffc8d215*/
v5 = v18[0]; /*0xffc8d217*/
result = MemChipFn_FFC870C1(__return_address, a2, a3, n32, (int)buf_1, v18[0], v17[0], (int *)&p_n64[1]); /*0xffc8d237*/
if ( result ) /*0xffc8d241*/
return result; /*0xffc8d241*/
result = MemChipFunc2E86(__return_address, (int)&buf_1[2 * v5], *(int *)&p_n64[1], n32); /*0xffc8d25d*/
if ( result ) /*0xffc8d267*/
return result; /*0xffc8d267*/
if ( (*(_DWORD *)(__return_address + 130) & 0x200000) != 0 && *(_DWORD *)&p_n64[1] == 64 ) /*0xffc8d282*/
return 0; /*0xffc8d282*/
}
n4 = 0; /*0xffc8d292*/
}
if ( *(_BYTE *)(__return_address + 9413) < 2u && (_WORD)n32 != 16 && (_WORD)n32 != 32 ) /*0xffc8d2a6*/
goto LABEL_21; /*0xffc8d2a6*/
while ( 1 ) /*0xffc8d2ac*/
{
if ( MemChipFn_FFC8B273((_BYTE *)__return_address, n32, (int)buf, n3, v16, (int)&v14) <= 1u ) /*0xffc8d2cc*/
goto LABEL_21; /*0xffc8d2cc*/
result = MemChipFn_FFC88274(__return_address, a2, a3, n32, (int)buf, n3, v16, (int)&v14, p_n64, (int *)&p_n64[1]); /*0xffc8d2f6*/
if ( result ) /*0xffc8d300*/
break; /*0xffc8d300*/
result = MemChipFunc2E86(__return_address, (int)&buf[2 * p_n64[0]], *(int *)&p_n64[1], n32); /*0xffc8d31b*/
if ( result ) /*0xffc8d325*/
break; /*0xffc8d325*/
if ( (*(_DWORD *)(__return_address + 130) & 0x200000) != 0 && *(_DWORD *)&p_n64[1] == 64 ) /*0xffc8d340*/
return 0; /*0xffc8d340*/
}
}
return result; /*0xffc8d4a4*/
}
// Function: MemChipFuncD4AF @ 0xffc8d4af (0x184 bytes)
// Index: 1101/2560
int __cdecl MemChipFuncD4AF(_BYTE *__return_address, int a2, int a3, unsigned __int16 a4, int n16)
{
int v5; // ebx
int v6; // ebp
int n16_1; // edi
int result; // eax
unsigned __int8 n0x18; // al
int p_n64_1; // eax
unsigned int v11; // ebp
unsigned int v12; // ecx
unsigned __int8 v13; // bl
int p_n64; // [esp+10h] [ebp-34h] BYREF
int v15; // [esp+14h] [ebp-30h]
unsigned int v16; // [esp+1Ch] [ebp-28h]
int p_n64_2; // [esp+20h] [ebp-24h]
_DWORD v18[8]; // [esp+24h] [ebp-20h] BYREF
p_n64 = 0; /*0xffc8d4b2*/
v5 = a3; /*0xffc8d4b7*/
v6 = a2; /*0xffc8d4bc*/
n16_1 = n16; /*0xffc8d4c6*/
if ( __return_address[244316] != 2 || __return_address[244317] <= 1u ) /*0xffc8d4de*/
return MemChipFunc4EBE((int)__return_address, v6, v5, a4, n16_1, &p_n64, 0); /*0xffc8d4de*/
if ( __return_address[9413] != 3 /*0xffc8d510*/
|| !MemChipFuncAC01((int)__return_address, n16, a3, 3u)
|| (result = MemChipFunc690A((int)__return_address, a2, a3, a4, n16)) == 0 )
{
if ( __return_address[9413] < 2u ) /*0xffc8d51d*/
goto LABEL_12; /*0xffc8d51d*/
while ( MemChipFuncAC01((int)__return_address, n16, a3, 2u) ) /*0xffc8d548*/
{
result = MemChipFunc7AD8((int)__return_address, a2, a3, a4, n16); /*0xffc8d529*/
if ( result ) /*0xffc8d533*/
return result; /*0xffc8d533*/
}
LABEL_12:
while ( MemChipFuncAC01((int)__return_address, n16, a3, 1u) ) /*0xffc8d573*/
{
result = MemChipFunc583A((int)__return_address, a2, a3, a4, n16); /*0xffc8d554*/
if ( result ) /*0xffc8d55e*/
return result; /*0xffc8d55e*/
}
n0x18 = MemChipFunc978E((int)__return_address, a3); /*0xffc8d577*/
if ( !n0x18 || n0x18 >= 0x18u ) /*0xffc8d588*/
return MemChipFunc4EBE((int)__return_address, v6, v5, a4, n16_1, &p_n64, 0); /*0xffc8d588*/
p_n64_1 = *(_DWORD *)&__return_address[50813 * (unsigned __int8)a3 + 58784 + 19 * n0x18]; /*0xffc8d59f*/
v16 = (unsigned __int8)__return_address[244317]; /*0xffc8d5ad*/
p_n64_2 = p_n64_1; /*0xffc8d5b4*/
p_n64 = p_n64_1; /*0xffc8d5b8*/
v15 = 4 * v16; /*0xffc8d5bc*/
if ( 4 * v16 ) /*0xffc8d5b1*/
{
v11 = v15; /*0xffc8d5c4*/
v12 = 0; /*0xffc8d5c8*/
v13 = 0; /*0xffc8d5ca*/
do /*0xffc8d5ee*/
{
v18[v12] = 0; /*0xffc8d5d0*/
if ( v12 / v16 == (unsigned __int8)a3 ) /*0xffc8d5dd*/
v18[v12] = 1; /*0xffc8d5df*/
v12 = ++v13; /*0xffc8d5e9*/
}
while ( v13 < v11 ); /*0xffc8d5ee*/
v5 = a3; /*0xffc8d5f0*/
n16_1 = n16; /*0xffc8d5f4*/
v6 = a2; /*0xffc8d5f8*/
p_n64_1 = p_n64_2; /*0xffc8d5fc*/
}
result = MemChipFunc2E86((int)__return_address, (int)v18, p_n64_1, n16_1); /*0xffc8d608*/
if ( !result ) /*0xffc8d612*/
return MemChipFunc4EBE((int)__return_address, v6, v5, a4, n16_1, &p_n64, 0); /*0xffc8d623*/
}
return result; /*0xffc8d62b*/
}
// Function: MemChipFuncD633 @ 0xffc8d633 (0x6 bytes)
// Index: 1102/2560
int __cdecl MemChipFuncD633(int a1)
{
return a1 - 1; /*0xffc8d638*/
}
// Function: MemChipFuncD639 @ 0xffc8d639 (0x3a bytes)
// Index: 1103/2560
int __cdecl MemChipFuncD639(int n4)
{
int v1; // esi
int n4_1; // edi
unsigned __int8 n0x18; // dl
int v4; // ecx
int result; // eax
v1 = n4 + 58784; /*0xffc8d641*/
n4_1 = 4; /*0xffc8d647*/
do /*0xffc8d66e*/
{
n0x18 = 0; /*0xffc8d648*/
v4 = v1; /*0xffc8d64a*/
do /*0xffc8d663*/
{
if ( !*(_BYTE *)(v4 + 15) ) /*0xffc8d64c*/
{
if ( n0x18 ) /*0xffc8d654*/
{
result = *(_DWORD *)v4; /*0xffc8d656*/
*(_DWORD *)(v4 + 19) = *(_DWORD *)v4; /*0xffc8d658*/
}
}
++n0x18; /*0xffc8d65b*/
v4 += 19; /*0xffc8d65d*/
}
while ( n0x18 < 0x18u ); /*0xffc8d663*/
v1 += 50813; /*0xffc8d665*/
--n4_1; /*0xffc8d66b*/
}
while ( n4_1 ); /*0xffc8d66e*/
return result; /*0xffc8d670*/
}
// Function: MemChipFuncD673 @ 0xffc8d673 (0xbb bytes)
// Index: 1104/2560
int __cdecl MemChipFuncD673(_BYTE *__return_address, int a2, unsigned __int16 a3)
{
int n4; // edi
int result; // eax
char v5; // al
int n6; // [esp-4h] [ebp-14h]
n4 = (unsigned __int16)((__return_address[244313] == 1) + 1); /*0xffc8d692*/
MemChipFuncEDC7(__return_address, 255); /*0xffc8d696*/
result = MemChipFuncD859(__return_address, a2, a3, n4); /*0xffc8d6a5*/
if ( !result ) /*0xffc8d6af*/
{
result = MemChipFuncD72E(__return_address, a2, a3, n4); /*0xffc8d6bb*/
if ( !result ) /*0xffc8d6c5*/
{
if ( __return_address[244358] == 1 ) /*0xffc8d6ce*/
return 0; /*0xffc8d6ce*/
if ( !MemChipFn_FFC8B058(__return_address, 0xFFu) ) /*0xffc8d6d2*/
return 0; /*0xffc8d6d2*/
v5 = __return_address[244371]; /*0xffc8d6dd*/
switch ( v5 ) /*0xffc8d6e5*/
{
case 0: /*0xffc8d6e5*/
return 0; /*0xffc8d727*/
case 1: /*0xffc8d6e5*/
n4 = 4; /*0xffc8d6ed*/
if ( __return_address[244313] != 1 || !__return_address[244314] ) /*0xffc8d6f6*/
{
LABEL_13:
MemChipFn_FFC8ED4C(__return_address, 0xFFu); /*0xffc8d70a*/
result = MemChipFuncD163((int)__return_address, a2, a3, n4); /*0xffc8d71b*/
if ( result ) /*0xffc8d725*/
return result; /*0xffc8d725*/
return 0; /*0xffc8d725*/
}
n6 = 6; /*0xffc8d6ff*/
break;
case 2: /*0xffc8d6e5*/
n6 = 8; /*0xffc8d707*/
break;
default:
goto LABEL_13; /*0xffc8d705*/
}
n4 = n6; /*0xffc8d709*/
goto LABEL_13; /*0xffc8d709*/
}
}
return result; /*0xffc8d729*/
}
// Function: MemChipFuncD72E @ 0xffc8d72e (0x12b bytes)
// Index: 1105/2560
int __cdecl MemChipFuncD72E(_BYTE *__return_address, int a2, unsigned __int16 a3, int n4)
{
_BYTE *__return_address_1; // esi
int v6; // edx
int n4_1; // edi
unsigned __int8 v8; // bl
int v9; // ecx
int n64; // edi
unsigned __int8 v11; // bl
unsigned __int8 v12; // al
unsigned __int8 v13; // dl
int v14; // ebp
_DWORD *v15; // ecx
int n4_2; // ebx
char v17; // [esp+7h] [ebp-9h]
int v18; // [esp+Ch] [ebp-4h]
__return_address_1 = __return_address; /*0xffc8d732*/
*(_DWORD *)(__return_address + 9502) = 0; /*0xffc8d736*/
if ( !*(_DWORD *)(__return_address + 9494) ) /*0xffc8d73d*/
return 0; /*0xffc8d746*/
v6 = 0; /*0xffc8d751*/
n4_1 = 4; /*0xffc8d753*/
do /*0xffc8d798*/
{
v8 = 0; /*0xffc8d75b*/
if ( 3 * (unsigned __int8)__return_address[244317] ) /*0xffc8d75d*/
{
v9 = 0; /*0xffc8d764*/
do /*0xffc8d78d*/
{
++v8; /*0xffc8d76e*/
*(_DWORD *)&__return_address[8077 * v9 + 10297 + v6] = *(_DWORD *)&__return_address[8077 * v9 + 10289 + v6]; /*0xffc8d777*/
v9 = v8; /*0xffc8d788*/
}
while ( v8 < 3 * (unsigned int)(unsigned __int8)__return_address[244317] ); /*0xffc8d78d*/
}
v6 += 50813; /*0xffc8d78f*/
--n4_1; /*0xffc8d795*/
}
while ( n4_1 ); /*0xffc8d798*/
v17 = __return_address[9413]; /*0xffc8d7a7*/
if ( !__return_address[1022] && __return_address[263] == 2 ) /*0xffc8d7b4*/
__return_address[9413] = 1; /*0xffc8d7b6*/
n64 = MemChipFunc9CDD((int)__return_address, 0); /*0xffc8d7c5*/
if ( !n64 ) /*0xffc8d7cb*/
n64 = 64; /*0xffc8d7cf*/
v11 = MemChipFunc978E((int)__return_address, 4u); /*0xffc8d7dc*/
v18 = MemChipFuncD163((int)__return_address, a2, a3, n4); /*0xffc8d7ef*/
v12 = MemChipFunc978E((int)__return_address, 4u); /*0xffc8d7f3*/
if ( v11 < v12 ) /*0xffc8d7fd*/
{
v13 = v11; /*0xffc8d805*/
v14 = (unsigned __int8)(v12 - v11); /*0xffc8d80d*/
do /*0xffc8d82b*/
{
v15 = __return_address + 58777; /*0xffc8d812*/
n4_2 = 4; /*0xffc8d814*/
do /*0xffc8d825*/
{
*v15 |= 1 << v13; /*0xffc8d81a*/
v15 = (_DWORD *)((char *)v15 + 50813); /*0xffc8d81c*/
--n4_2; /*0xffc8d822*/
}
while ( n4_2 ); /*0xffc8d825*/
++v13; /*0xffc8d827*/
--v14; /*0xffc8d828*/
}
while ( v14 ); /*0xffc8d82b*/
__return_address_1 = __return_address; /*0xffc8d82d*/
}
__return_address_1[9413] = v17; /*0xffc8d839*/
*(_DWORD *)(__return_address_1 + 9502) = MemChipFunc9CDD((int)__return_address_1, 0) - n64; /*0xffc8d849*/
return v18; /*0xffc8d854*/
}
// Function: MemChipFuncD859 @ 0xffc8d859 (0x67 bytes)
// Index: 1106/2560
int __cdecl MemChipFuncD859(_BYTE *__return_address, int a2, unsigned __int16 a3, int n4)
{
int n64; // ebx
int v6; // esi
*(_DWORD *)(__return_address + 9498) = 0; /*0xffc8d860*/
if ( (_WORD)n4 == 1 && *(_DWORD *)(__return_address + 9490) == *(_DWORD *)(__return_address + 9494) ) /*0xffc8d87a*/
return 0; /*0xffc8d87c*/
n64 = MemChipFunc9CDD((int)__return_address, 0); /*0xffc8d88a*/
if ( !n64 ) /*0xffc8d890*/
n64 = 64; /*0xffc8d894*/
v6 = MemChipFuncD163((int)__return_address, a2, a3, n4); /*0xffc8d8a7*/
*(_DWORD *)(__return_address + 9498) = MemChipFunc9CDD((int)__return_address, 0) - n64; /*0xffc8d8b3*/
return v6; /*0xffc8d8bd*/
}
// Function: MemChipFuncD8C0 @ 0xffc8d8c0 (0xf7 bytes)
// Index: 1107/2560
int __cdecl MemChipFuncD8C0(int __return_address, int a2, unsigned __int16 a3)
{
_BYTE *__return_address_1; // edi
int v4; // esi
int n2; // eax
unsigned __int8 n4; // bl
unsigned __int8 v7; // dl
int v8; // ecx
__return_address_1 = (_BYTE *)__return_address; /*0xffc8d8c5*/
MemChipFuncEDC7((_BYTE *)__return_address, 255); /*0xffc8d8ce*/
if ( (*(_DWORD *)(__return_address + 130) & 0x200000) == 0 /*0xffc8d905*/
|| (v4 = *(_DWORD *)(__return_address + 9494),
*(_DWORD *)(__return_address + 9494) = 0,
n2 = MemChipFuncD673((_BYTE *)__return_address, a2, a3),
*(_DWORD *)(__return_address + 9494) = v4,
!n2) )
{
n4 = 0; /*0xffc8d90c*/
LOBYTE(__return_address) = 0; /*0xffc8d90e*/
do /*0xffc8d9aa*/
{
if ( __return_address_1[48704 * n4 + 258689] ) /*0xffc8d91a*/
{
n2 = MemChipFuncDC7C(__return_address_1, a2, __return_address, a3); /*0xffc8d92e*/
if ( n2 != 2 ) /*0xffc8d939*/
{
if ( n2 ) /*0xffc8d93d*/
return n2; /*0xffc8d93d*/
n2 = MemChipFuncDBAA(__return_address_1, a2, __return_address, a3); /*0xffc8d949*/
if ( n2 != 2 ) /*0xffc8d954*/
{
if ( n2 ) /*0xffc8d958*/
return n2; /*0xffc8d958*/
v7 = 0; /*0xffc8d961*/
if ( 3 * (unsigned __int8)__return_address_1[244317] ) /*0xffc8d963*/
{
v8 = 0; /*0xffc8d96a*/
do /*0xffc8d9a0*/
{
++v7; /*0xffc8d988*/
*(_DWORD *)&__return_address_1[50813 * n4 + 10297 + 8077 * v8] = *(_DWORD *)&__return_address_1[50813 * n4 + 10241 + 8077 * v8] /*0xffc8d98a*/
- *(_DWORD *)&__return_address_1[50813 * n4 + 10289 + 8077 * v8];
v8 = v7; /*0xffc8d99b*/
}
while ( v7 < 3 * (unsigned int)(unsigned __int8)__return_address_1[244317] ); /*0xffc8d9a0*/
}
}
}
}
LOBYTE(__return_address) = ++n4; /*0xffc8d9a4*/
}
while ( n4 < 4u ); /*0xffc8d9aa*/
return 0; /*0xffc8d9b0*/
}
return n2; /*0xffc8d9b3*/
}
// Function: MemChipFuncD9B7 @ 0xffc8d9b7 (0x173 bytes)
// Index: 1108/2560
int __cdecl MemChipFuncD9B7(_BYTE *__return_address, int a2, int __return_address_1, unsigned __int16 a4, int n16)
{
int v6; // edi
unsigned __int8 v8; // dl
int v9; // ecx
int n64; // ebx
int v11; // eax
int v12; // eax
unsigned __int8 v14; // al
unsigned __int8 v15; // cl
int v16; // edx
unsigned __int8 v17; // cl
int v18; // eax
int v19; // ebp
char v20; // [esp+Eh] [ebp-6h]
unsigned __int8 v21; // [esp+Fh] [ebp-5h]
int v22; // [esp+10h] [ebp-4h]
char v23; // [esp+18h] [ebp+4h]
unsigned __int8 v24; // [esp+20h] [ebp+Ch]
v6 = 50813 * (unsigned __int8)__return_address_1; /*0xffc8d9c9*/
*(_DWORD *)&__return_address[v6 + 58773] = 0; /*0xffc8d9cf*/
if ( !*(_DWORD *)&__return_address[v6 + 58765] ) /*0xffc8d9d6*/
return 0; /*0xffc8d9df*/
v8 = 0; /*0xffc8d9ed*/
if ( 3 * (unsigned __int8)__return_address[244317] ) /*0xffc8d9ef*/
{
v9 = 0; /*0xffc8d9f6*/
do /*0xffc8da1f*/
{
++v8; /*0xffc8da00*/
*(_DWORD *)&__return_address[8077 * v9 + 10297 + v6] = *(_DWORD *)&__return_address[8077 * v9 + 10289 + v6]; /*0xffc8da09*/
v9 = v8; /*0xffc8da1a*/
}
while ( v8 < 3 * (unsigned int)(unsigned __int8)__return_address[244317] ); /*0xffc8da1f*/
}
v23 = __return_address[244316]; /*0xffc8da27*/
v20 = __return_address[9413]; /*0xffc8da31*/
if ( !__return_address[1022] && __return_address[263] == 2 ) /*0xffc8da44*/
{
__return_address[244316] = 1; /*0xffc8da46*/
__return_address[9413] = 1; /*0xffc8da4d*/
}
n64 = MemChipFunc9CDD((int)__return_address, 0); /*0xffc8da5b*/
if ( !n64 ) /*0xffc8da61*/
n64 = 64; /*0xffc8da65*/
v21 = MemChipFunc978E((int)__return_address, __return_address_1); /*0xffc8da74*/
v11 = MemChipFuncD4AF(__return_address, a2, __return_address_1, a4, n16); /*0xffc8da85*/
__return_address[244316] = v23; /*0xffc8da92*/
v22 = v11; /*0xffc8da9d*/
__return_address[9413] = v20; /*0xffc8daa1*/
v12 = MemChipFunc9CDD((int)__return_address, __return_address_1) - n64; /*0xffc8daac*/
*(_DWORD *)&__return_address[v6 + 58773] = v12; /*0xffc8dab4*/
v14 = MemChipFunc978E((int)__return_address, __return_address_1); /*0xffc8dabb*/
v15 = v14; /*0xffc8dac4*/
v24 = v14; /*0xffc8dac9*/
if ( v21 < v14 ) /*0xffc8dacf*/
{
v16 = *(_DWORD *)&__return_address[v6 + 58777]; /*0xffc8dad1*/
v17 = v14 - v21; /*0xffc8dad8*/
v18 = v21; /*0xffc8dadb*/
v19 = v17; /*0xffc8dade*/
do /*0xffc8dae8*/
{
v16 |= 1 << v18++; /*0xffc8dae1*/
--v19; /*0xffc8dae5*/
}
while ( v19 ); /*0xffc8dae8*/
v15 = v24; /*0xffc8daea*/
*(_DWORD *)&__return_address[v6 + 58777] = v16; /*0xffc8daee*/
}
DebugPrint( /*0xffc8db18*/
(int)__return_address,
2,
__return_address_1,
255,
255,
255,
255,
255,
"NvMemSadIndexStart = %d, NvMemSadIndexEnd = %d,NvMemSadIdxBitMap = 0x%x\n",
v21,
v15,
*(_DWORD *)&__return_address[v6 + 58777]);
return v22; /*0xffc8db24*/
}
// Function: MemChipFuncDB2A @ 0xffc8db2a (0x80 bytes)
// Index: 1109/2560
int __cdecl MemChipFuncDB2A(_BYTE *__return_address, int a2, int __return_address_1, unsigned __int16 a4, int n16)
{
int v5; // ebp
int n64; // ebx
int v8; // esi
v5 = 50813 * (unsigned __int8)__return_address_1; /*0xffc8db32*/
*(_DWORD *)&__return_address[v5 + 58769] = 0; /*0xffc8db3d*/
if ( (_WORD)n16 == 1 && *(_DWORD *)&__return_address[v5 + 10195] == *(_DWORD *)&__return_address[v5 + 58765] ) /*0xffc8db5b*/
return 0; /*0xffc8db5d*/
n64 = MemChipFunc9CDD((int)__return_address, __return_address_1); /*0xffc8db6a*/
if ( !n64 ) /*0xffc8db70*/
n64 = 64; /*0xffc8db74*/
v8 = MemChipFuncD4AF(__return_address, a2, __return_address_1, a4, n16); /*0xffc8db8f*/
*(_DWORD *)&__return_address[v5 + 58769] = MemChipFunc9CDD((int)__return_address, __return_address_1) - n64; /*0xffc8db9c*/
return v8; /*0xffc8dba7*/
}
// Function: MemChipFuncDBAA @ 0xffc8dbaa (0xd2 bytes)
// Index: 1110/2560
int __cdecl MemChipFuncDBAA(_BYTE *__return_address, int a2, int __return_address_1, unsigned __int16 a4)
{
int n4; // edi
char v5; // al
int result; // eax
n4 = 0; /*0xffc8dbb3*/
if ( __return_address[244358] == 1 ) /*0xffc8dbbc*/
{
result = KtiFn_FFC9F35E(__return_address, a2, __return_address_1); /*0xffc8dc4e*/
if ( result ) /*0xffc8dc58*/
return result; /*0xffc8dc58*/
if ( !__return_address[10186] ) /*0xffc8dc5a*/
{
result = MemChipFuncF6AE(__return_address, a2, __return_address_1); /*0xffc8dc69*/
if ( result ) /*0xffc8dc73*/
return result; /*0xffc8dc73*/
}
return 0; /*0xffc8dc75*/
}
if ( !MemChipFn_FFC8B058(__return_address, 1 << __return_address_1) ) /*0xffc8dbd5*/
return 0; /*0xffc8dbd5*/
v5 = __return_address[244371]; /*0xffc8dbe4*/
switch ( v5 ) /*0xffc8dbec*/
{
case 0: /*0xffc8dbec*/
return 0; /*0xffc8dbec*/
case 1: /*0xffc8dbec*/
n4 = 4; /*0xffc8dbf8*/
if ( __return_address[244313] == 1 && __return_address[244314] ) /*0xffc8dc01*/
{
n4 = 6; /*0xffc8dc0c*/
LABEL_8:
MemChipFn_FFC8ED4C(__return_address, 1 << __return_address_1); /*0xffc8dc0d*/
return MemChipFuncD4AF(__return_address, a2, __return_address_1, a4, n4); /*0xffc8dc29*/
}
break;
case 2: /*0xffc8dbec*/
n4 = 8; /*0xffc8dc31*/
break;
default:
goto LABEL_8; /*0xffc8dc2d*/
}
if ( *(_DWORD *)&__return_address[50813 * (unsigned __int8)__return_address_1 + 58791] ) /*0xffc8dc38*/
goto LABEL_8; /*0xffc8dc40*/
return 2; /*0xffc8dc77*/
}
// Function: MemChipFuncDC7C @ 0xffc8dc7c (0x72 bytes)
// Index: 1111/2560
int __cdecl MemChipFuncDC7C(_BYTE *__return_address, int a2, int __return_address_1, unsigned __int16 a4)
{
char v4; // cl
int n16; // edi
int v6; // eax
bool v7; // zf
int result; // eax
v4 = __return_address[244313]; /*0xffc8dc8a*/
n16 = (unsigned __int16)((v4 == 1) + 1); /*0xffc8dc9d*/
v6 = 50813 * (unsigned __int8)__return_address_1; /*0xffc8dc9f*/
if ( v4 == 1 ) /*0xffc8dca8*/
v7 = *(_DWORD *)&__return_address[v6 + 58787] == 0; /*0xffc8dcb9*/
else
v7 = *(_DWORD *)&__return_address[v6 + 10195] == 0; /*0xffc8dcaa*/
if ( v7 ) /*0xffc8dcb2*/
return 2; /*0xffc8dcb6*/
result = MemChipFuncDB2A(__return_address, a2, __return_address_1, a4, (unsigned __int16)((v4 == 1) + 1)); /*0xffc8dccc*/
if ( !result ) /*0xffc8dcd6*/
return MemChipFuncD9B7(__return_address, a2, __return_address_1, a4, n16); /*0xffc8dce1*/
return result; /*0xffc8dce9*/
}
// Function: MemCmdControlSetup @ 0xffc8dcee (0xa8a bytes)
// Index: 1112/2560
int __cdecl MemCmdControlSetup(unsigned __int8 *n4, unsigned __int16 n48)
{
unsigned __int8 v2; // bh
unsigned __int8 n4_2; // al
unsigned __int8 *n4_1; // edi
unsigned __int8 *v5; // esi
unsigned __int8 n0x18; // bl
int v7; // ebp
bool v8; // al
unsigned __int16 n2; // cx
unsigned int n48_1; // ebx
char n3; // al
unsigned __int8 n3_3; // cl
int v14; // eax
unsigned int v15; // edx
unsigned int v16; // eax
unsigned __int8 v17; // al
unsigned __int8 v18; // dl
int v19; // ebx
char n19; // al
char n12_1; // dl
unsigned int n48_2; // eax
int v23; // ecx
unsigned __int8 n3_2; // al
int v25; // edx
int n3_4; // ecx
int v27; // eax
int CpuCount; // eax
int n2_4; // edx
unsigned __int8 i; // al
int n2_5; // ecx
unsigned int n8; // eax
unsigned int v33; // eax
unsigned int v34; // eax
unsigned int n2_3; // eax
int v36; // eax
int v37; // edx
int v38; // ecx
int v39; // edx
int v40; // ecx
unsigned int v41; // eax
i... [20265 chars total]
// Function: MemChipFn_FFC8E778 @ 0xffc8e778 (0x42 bytes)
// Index: 1113/2560
int __cdecl MemChipFn_FFC8E778(int n4, unsigned __int8 n4a)
{
int v2; // edx
unsigned __int8 v3; // bl
_DWORD *v4; // ecx
int v5; // esi
int n3; // eax
v2 = 0; /*0xffc8e77d*/
v3 = *(_BYTE *)(n4 + 244317); /*0xffc8e78a*/
if ( v3 ) /*0xffc8e792*/
{
v4 = (_DWORD *)(n4 + 50813 * n4a + 10241); /*0xffc8e79b*/
v5 = v3; /*0xffc8e79d*/
do /*0xffc8e7b3*/
{
n3 = 3; /*0xffc8e7a2*/
do /*0xffc8e7ae*/
{
v2 += *v4; /*0xffc8e7a3*/
v4 = (_DWORD *)((char *)v4 + 8077); /*0xffc8e7a5*/
--n3; /*0xffc8e7ab*/
}
while ( n3 ); /*0xffc8e7ae*/
--v5; /*0xffc8e7b0*/
}
while ( v5 ); /*0xffc8e7b3*/
}
return v2; /*0xffc8e7b8*/
}
// Function: MemChipFn_FFC8E7BA @ 0xffc8e7ba (0x592 bytes)
// Index: 1114/2560
char __cdecl MemChipFn_FFC8E7BA(unsigned __int8 *n4)
{
unsigned __int8 *n4_1; // ebx
unsigned __int8 *v2; // ecx
unsigned __int8 n4a_2; // al
int v4; // esi
int n4a_1; // edi
unsigned __int8 *v6; // ebp
unsigned __int8 n6a_1; // cl
int v8; // eax
int CpuCount; // esi
unsigned __int8 n2_2; // al
int v11; // ebp
_BYTE *v12; // ecx
_BYTE *v13; // edx
int n2_1; // edi
_BYTE *v15; // ecx
_BYTE *v16; // edx
int n4_2; // ebx
_BYTE *v18; // ecx
_BYTE *v19; // edx
int n20; // edi
_BYTE *v21; // ecx
_BYTE *v22; // edx
int n9; // ebx
unsigned int v24; // eax
int v25; // edi
int CpuCount_2; // edx
int v27; // esi
int v28; // ecx
__int16 v29; // ax
int v30; // eax
int v31; // eax
int n2; // [esp+Bh] [ebp-1B09h]
int n6a; // [esp+Fh] [ebp-1B05h]
unsigned __int8 p_n20; // [esp+13h] [ebp-1B01h] BYREF
int n4a; // [esp+14h] [ebp-1B00h]
int v37; // [esp+18h] [ebp-1AFCh]
int CpuCount_1; // [esp+1Ch] [ebp-1AF8h]
int v39; // [esp+20h... [11970 chars total]
// Function: MemChipFn_FFC8ED4C @ 0xffc8ed4c (0x7b bytes)
// Index: 1115/2560
unsigned int __cdecl MemChipFn_FFC8ED4C(_BYTE *__return_address, unsigned __int8 n255)
{
int v2; // edx
int v3; // esi
int n4; // edi
unsigned int i_2; // eax
int i_1; // ecx
unsigned __int8 i; // dl
int v8; // [esp+14h] [ebp-4h]
v2 = 0; /*0xffc8ed53*/
v8 = 0; /*0xffc8ed5f*/
v3 = 0; /*0xffc8ed63*/
n4 = 4; /*0xffc8ed65*/
do /*0xffc8edbe*/
{
i_2 = 1 << v2; /*0xffc8ed6b*/
if ( ((1 << v2) & n255) != 0 ) /*0xffc8ed6f*/
{
i_2 = 3 * (unsigned __int8)__return_address[244317]; /*0xffc8ed78*/
if ( i_2 ) /*0xffc8ed7d*/
{
i_1 = 0; /*0xffc8ed7f*/
for ( i = 0; i < i_2; i_1 = i ) /*0xffc8ed81*/
{
++i; /*0xffc8ed8b*/
*(_DWORD *)&__return_address[8077 * i_1 + 10297 + v3] = *(_DWORD *)&__return_address[8077 * i_1 + 10261 + v3]; /*0xffc8ed94*/
i_2 = 3 * (unsigned __int8)__return_address[244317]; /*0xffc8eda2*/
}
v2 = v8; /*0xffc8edac*/
}
}
++v2; /*0xffc8edb0*/
v3 += 50813; /*0xffc8edb1*/
v8 = v2; /*0xffc8edb7*/
--n4; /*0xffc8edbb*/
}
while ( n4 ); /*0xffc8edbe*/
return i_2; /*0xffc8edc0*/
}
// Function: MemChipFuncEDC7 @ 0xffc8edc7 (0x94 bytes)
// Index: 1116/2560
unsigned int __cdecl MemChipFuncEDC7(_BYTE *__return_address, unsigned __int8 n255)
{
int n4; // ebx
char v3; // di
int v4; // esi
unsigned int i_2; // eax
int i_1; // ecx
unsigned __int8 i; // bl
int v8; // ecx
int v9; // eax
int n4_1; // [esp+14h] [ebp-4h]
n4 = 4; /*0xffc8edd8*/
v3 = 0; /*0xffc8edd9*/
n4_1 = 4; /*0xffc8eddb*/
v4 = 0; /*0xffc8eddf*/
do /*0xffc8ee52*/
{
i_2 = 1 << v3; /*0xffc8ede6*/
if ( ((1 << v3) & n255) != 0 ) /*0xffc8edea*/
{
i_2 = 3 * (unsigned __int8)__return_address[244317]; /*0xffc8edf3*/
if ( i_2 ) /*0xffc8edf8*/
{
i_1 = 0; /*0xffc8edfa*/
for ( i = 0; i < i_2; i_1 = i ) /*0xffc8edfc*/
{
v8 = v4 + 8077 * i_1; /*0xffc8ee04*/
if ( __return_address[244313] == 1 ) /*0xffc8ee0d*/
v9 = *(_DWORD *)&__return_address[v8 + 10249]; /*0xffc8ee0f*/
else
v9 = *(_DWORD *)&__return_address[v8 + 10241] - *(_DWORD *)&__return_address[v8 + 10289]; /*0xffc8ee1f*/
*(_DWORD *)&__return_address[v8 + 10297] = v9; /*0xffc8ee26*/
++i; /*0xffc8ee2d*/
i_2 = 3 * (unsigned __int8)__return_address[244317]; /*0xffc8ee36*/
}
n4 = n4_1; /*0xffc8ee40*/
}
}
++v3; /*0xffc8ee44*/
v4 += 50813; /*0xffc8ee45*/
n4_1 = --n4; /*0xffc8ee4e*/
}
while ( n4 ); /*0xffc8ee52*/
return i_2; /*0xffc8ee54*/
}
// Function: MemChipFuncEE5B @ 0xffc8ee5b (0x22 bytes)
// Index: 1117/2560
int __cdecl MemChipFuncEE5B(int n4)
{
if ( *(_BYTE *)(n4 + 10187) == 2 ) /*0xffc8ee66*/
return 0; /*0xffc8ee68*/
*(_BYTE *)(n4 + 10187) = 2; /*0xffc8ee6c*/
MemChipFunc4600(n4); /*0xffc8ee73*/
return 32; /*0xffc8ee6a*/
}
// Function: MemChipFuncEE7D @ 0xffc8ee7d (0xa0 bytes)
// Index: 1118/2560
void __cdecl MemChipFuncEE7D(_BYTE *n4)
{
_BYTE *n4_1; // esi
unsigned __int8 n4_2; // bl
_BYTE *v3; // edi
n4_1 = n4; /*0xffc8ee7e*/
if ( n4 ) /*0xffc8ee84*/
{
if ( n4[121] ) /*0xffc8ee8a*/
{
if ( n4[244313] == 1 ) /*0xffc8ee9b*/
{
n4_2 = 0; /*0xffc8eea0*/
if ( !KtiFuncE78((int)n4, 0, 0xAu) ) /*0xffc8eea4*/
{
LOBYTE(n4) = 0; /*0xffc8eeb2*/
v3 = n4_1 + 258689; /*0xffc8eeb6*/
do /*0xffc8ef16*/
{
if ( *v3 && MemChipFuncAA61((int)n4_1, (unsigned __int8)n4) && !DimmConfigPerSocket(n4_1, (int)n4, 176, 6) ) /*0xffc8eee2*/
DebugPrint((int)n4_1, 3, (int)n4, 255, 255, 255, 255, 255, "PCU memory mode info updated successfully\n"); /*0xffc8eeff*/
++n4_2; /*0xffc8ef07*/
v3 += 48704; /*0xffc8ef09*/
LOBYTE(n4) = n4_2; /*0xffc8ef0f*/
}
while ( n4_2 < 4u ); /*0xffc8ef16*/
}
}
}
}
}
// Function: MemChipFuncEF1D @ 0xffc8ef1d (0x4b1 bytes)
// Index: 1119/2560
char __cdecl MemChipFuncEF1D(unsigned __int8 *n4, unsigned __int8 a2)
{
unsigned __int8 n4a_3; // bl
unsigned __int8 n4a_1; // cl
char v5; // al
char v6; // al
unsigned int v7; // ebp
unsigned __int8 *v8; // eax
unsigned __int8 *v9; // esi
int v10; // eax
unsigned int *v11; // ecx
unsigned int v12; // esi
int v13; // eax
unsigned __int8 *v14; // ecx
unsigned int v15; // eax
unsigned int v16; // eax
char v17; // bl
unsigned __int8 v18; // cl
unsigned __int8 n4b_1; // cl
unsigned int v20; // eax
unsigned __int8 v21; // cl
bool v22; // al
char v23; // al
unsigned int v24; // esi
unsigned int v25; // esi
BOOL v26; // esi
char result; // al
int v28; // ebp
unsigned int v29; // esi
char v30; // [esp+12h] [ebp-12h]
char v31; // [esp+12h] [ebp-12h]
unsigned __int8 n4a_4; // [esp+13h] [ebp-11h]
unsigned __int8 n4a_5; // [esp+14h] [ebp-10h]
char v34; // [esp+14h] [ebp-10h]
unsigned __int8 v35; // [esp+15h] [ebp-Fh]
unsigned __int8 v36; // [esp+16h] [ebp-Eh]
char v37; // [esp+17h] [ebp-Dh]
unsigned __int8 v38; // [esp+18h] [ebp-Ch]
unsigned __int8 n4a_2; // [esp+18h] [ebp-Ch]
unsigned __int8 v40; // [esp+18h] [ebp-Ch]
unsigned __int8 *v41; // [esp+1Ch] [ebp-8h]
unsigned __int8 n4a; // [esp+28h] [ebp+4h]
unsigned __int8 n4b; // [esp+28h] [ebp+4h]
unsigned __int8 n4c; // [esp+28h] [ebp+4h]
unsigned __int8 n4d; // [esp+28h] [ebp+4h]
n4a_3 = 0; /*0xffc8ef32*/
v30 = 0; /*0xffc8ef3e*/
DebugPrint( /*0xffc8ef42*/
(int)n4,
2,
255,
255,
255,
255,
255,
255,
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\t\tWrite CHA CSRs for Socket: %d\n", a2);
DebugPrint( /*0xffc8ef79*/
(int)n4,
2,
255,
255,
255,
255,
255,
255,
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
n4a_1 = n4[244317]; /*0xffc8ef7e*/
v38 = 0; /*0xffc8ef87*/
n4a = n4a_1; /*0xffc8ef8b*/
if ( n4a_1 ) /*0xffc8ef91*/
{
while ( 1 ) /*0xffc8ef9c*/
{
v5 = MemChipFunc429A((int)n4, a2, v38); /*0xffc8ef9c*/
n4a_1 = n4a; /*0xffc8efa1*/
if ( (v5 & 0xA) != 0 ) /*0xffc8efaa*/
break; /*0xffc8efaa*/
if ( ++v38 >= n4a ) /*0xffc8efb8*/
goto LABEL_6; /*0xffc8efb8*/
}
v30 = 1; /*0xffc8efbc*/
}
LABEL_6:
n4a_4 = n4[351 * a2 + 255719]; /*0xffc8efc1*/
v6 = v30; /*0xffc8efd2*/
if ( v30 )
{
v7 = 0; /*0xffc8efe4*/
n4a_2 = 0; /*0xffc8efe6*/
v8 = &n4[50813 * a2 + 10239]; /*0xffc8efef*/
if ( n4[244370] ) /*0xffc8eff5*/
{
if ( n4a_1 ) /*0xffc8f05f*/
{
v41 = v8 + 2; /*0xffc8f068*/
do /*0xffc8f0e6*/
{
v12 = 0; /*0xffc8f070*/
n4a_5 = 0; /*0xffc8f072*/
if ( (MemChipFunc429A((int)n4, a2, n4a_2) & 0xA) != 0 ) /*0xffc8f085*/
{
LOBYTE(v13) = n4[9475]; /*0xffc8f087*/
if ( (_BYTE)v13 ) /*0xffc8f08f*/
{
v14 = v41; /*0xffc8f091*/
v13 = (unsigned __int8)v13; /*0xffc8f095*/
do /*0xffc8f0b2*/
{
if ( *(_DWORD *)v14 ) /*0xffc8f098*/
{
++n4a_3; /*0xffc8f09d*/
if ( !v12 || *(_DWORD *)v14 < v12 ) /*0xffc8f0a5*/
v12 = *(_DWORD *)v14; /*0xffc8f0a7*/
}
v14 += 8077; /*0xffc8f0a9*/
--v13; /*0xffc8f0af*/
}
while ( v13 ); /*0xffc8f0b2*/
n4a_5 = n4a_3; /*0xffc8f0b4*/
n4a_3 = 0; /*0xffc8f0b8*/
}
v15 = v12 * n4a_5; /*0xffc8f0bf*/
if ( v15 && (!v7 || v15 < v7) ) /*0xffc8f0cc*/
v7 = v12 * n4a_5; /*0xffc8f0ce*/
}
v41 += 24231; /*0xffc8f0d4*/
++n4a_2; /*0xffc8f0de*/
}
while ( n4a_2 < n4a ); /*0xffc8f0e6*/
}
}
else if ( n4a_1 ) /*0xffc8efff*/
{
v9 = v8 + 2; /*0xffc8f005*/
do /*0xffc8f056*/
{
if ( (MemChipFunc429A((int)n4, a2, n4a_2) & 0xA) != 0 ) /*0xffc8f01b*/
{
LOBYTE(v10) = n4[9475]; /*0xffc8f01d*/
if ( (_BYTE)v10 ) /*0xffc8f025*/
{
v11 = (unsigned int *)v9; /*0xffc8f027*/
v10 = (unsigned __int8)v10; /*0xffc8f029*/
do /*0xffc8f044*/
{
if ( *v11 && (!v7 || *v11 < v7) ) /*0xffc8f037*/
v7 = *v11; /*0xffc8f039*/
v11 = (unsigned int *)((char *)v11 + 8077); /*0xffc8f03b*/
--v10; /*0xffc8f041*/
}
while ( v10 ); /*0xffc8f044*/
}
}
++n4a_3; /*0xffc8f046*/
v9 += 24231; /*0xffc8f048*/
n4a_2 = n4a_3; /*0xffc8f04e*/
}
while ( n4a_3 < n4a ); /*0xffc8f056*/
}
v16 = RmtFunc6E78(v7 >> 4); /*0xffc8f0ec*/
v17 = 14 - RmtFunc6ED9(v16); /*0xffc8f0fb*/
v37 = v17 + RmtFunc6ED9(4); /*0xffc8f106*/
n4a_3 = 0; /*0xffc8f10f*/
v36 = MemChipFuncC394(8); /*0xffc8f111*/
v18 = 0; /*0xffc8f115*/
v40 = 0; /*0xffc8f117*/
v35 = 0; /*0xffc8f11e*/
if ( n4[244317] ) /*0xffc8f122*/
{
v34 = 0; /*0xffc8f132*/
do /*0xffc8f1d5*/
{
if ( (MemChipFunc429A((int)n4, a2, v40) & 0xA) != 0 ) /*0xffc8f149*/
{
n4b_1 = 0; /*0xffc8f14b*/
for ( n4b = 0; n4b_1 < n4[9475]; n4b = n4b_1 ) /*0xffc8f151*/
{
if ( *(_DWORD *)&n4[50813 * a2 + 10241 + 24231 * v40 + 8077 * n4b_1] ) /*0xffc8f16c*/
{
v20 = MiscConfigCheck(n4, a2, n4b_1 + v34, 117522568); /*0xffc8f186*/
v21 = (v20 >> 2) & 3; /*0xffc8f195*/
v22 = (v20 & 2) != 0; /*0xffc8f198*/
if ( v21 < v36 ) /*0xffc8f19e*/
v36 = v21; /*0xffc8f1a0*/
n4b_1 = n4b; /*0xffc8f1a4*/
if ( (unsigned __int8)v22 > v35 ) /*0xffc8f1ac*/
v35 = v22; /*0xffc8f1ae*/
}
++n4b_1; /*0xffc8f1b2*/
}
}
v34 += 3; /*0xffc8f1c4*/
++v40; /*0xffc8f1cb*/
}
while ( v40 < n4[244317] ); /*0xffc8f1d5*/
v18 = v35; /*0xffc8f1db*/
}
v23 = v37 - v36; /*0xffc8f1e3*/
if ( !n4[244370] ) /*0xffc8f1e7*/
v23 -= v18; /*0xffc8f1ef*/
v24 = (0x3FFF >> v23) & 0x3FFF | 0x100000; /*0xffc8f211*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "TWO_LM_CONFIG_CHABC_SAD_REG\n"); /*0xffc8f217*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\tenable: %x\tmask: %x\n", v24 >> 20, v24 & 0x3FFF);
CpuIoCfgWrite((int)n4, a2, 0, 50348680, v24); /*0xffc8f24e*/
n4c = 0; /*0xffc8f256*/
if ( n4a_4 )
{
do
{
v25 = CpuIoRead((int)n4, a2, n4c, 16793836) | 8; /*0xffc8f283*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "HA_COH_CFG_TOR_CHA_PMA_REG\n"); /*0xffc8f286*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\ttwolm: %x\n", (v25 >> 3) & 1);
CpuIoCfgWrite((int)n4, a2, n4c, 16793836, v25); /*0xffc8f2b9*/
n4c = ++n4a_3; /*0xffc8f2c3*/
}
while ( n4a_3 < n4a_4 );
n4a_3 = 0; /*0xffc8f2cd*/
}
v6 = v30; /*0xffc8f2cf*/
v26 = 0; /*0xffc8f2d3*/
}
else
{
v26 = n4[257195] == 1; /*0xffc8f2e4*/
}
if ( n4[257196] ) /*0xffc8f2e5*/
v31 = v6 ^ 1; /*0xffc8f2f6*/
else
v31 = 0; /*0xffc8f2ee*/
if ( SocketPresentCheck((int)n4, 0, 9u) )
result = n4[1482] == 1 ? 0 : v31;
else
result = v31; /*0xffc8f31c*/
n4d = 0; /*0xffc8f325*/
if ( n4a_4 )
{
v28 = (v26 | ((result & 1) << 13)) << 9; /*0xffc8f33a*/
do
{
v29 = v28 | CpuIoRead((int)n4, a2, n4d, 16656) & 0xFFBFFDFF; /*0xffc8f36b*/
DebugPrint((int)n4, 3, 255, 255, 255, 255, 255, 255, "HA_COH_CHA_MISC_REG\n"); /*0xffc8f36d*/
DebugPrint(
(int)n4,
3,
255,
255,
255,
255,
255,
255,
"iodc_enable:%x, dis_spec_rd: %x\n",
(v29 >> 22) & 1,
(v29 >> 9) & 1);
result = CpuIoCfgWrite((int)n4, a2, n4d, 16656, v29); /*0xffc8f3ae*/
n4d = ++n4a_3; /*0xffc8f3b8*/
}
while ( n4a_3 < n4a_4 );
}
return result; /*0xffc8f3c6*/
}
// Function: MemChipFuncF3CE @ 0xffc8f3ce (0x1b9 bytes)
// Index: 1120/2560
int __cdecl MemChipFuncF3CE(
unsigned __int8 *n4,
unsigned __int8 a2,
char a3,
unsigned __int8 a4,
_BYTE *a5,
int n4c,
int j)
{
int v8; // ecx
int v9; // eax
unsigned __int8 *v10; // ecx
int n4_1; // esi
int v12; // eax
char v13; // bl
int v14; // edx
bool v15; // zf
char v16; // si
int v17; // esi
int v18; // ecx
unsigned int v19; // esi
unsigned __int16 n16; // [esp-8h] [ebp-48h]
char n3; // [esp-4h] [ebp-44h]
int v23; // [esp+Ch] [ebp-34h] BYREF
_DWORD v24[12]; // [esp+10h] [ebp-30h]
__int16 v25; // [esp+54h] [ebp+14h]
v24[0] = 117524624; /*0xffc8f3d8*/
v24[1] = 117524628; /*0xffc8f3e0*/
v8 = 19 * (unsigned __int8)a5[1]; /*0xffc8f3ec*/
v9 = 50813 * a2; /*0xffc8f3f6*/
v24[2] = 117524632; /*0xffc8f3fc*/
v10 = &n4[v8]; /*0xffc8f404*/
v24[3] = 117524636; /*0xffc8f408*/
v24[4] = 117524640; /*0xffc8f410*/
v24[5] = 117524644; /*0xffc8f418*/
v24[6] = 117524648; /*0xffc8f420*/
v24[7] = 117524652; /*0xffc8f428*/
n4_1 = *(unsigned __int16 *)&v10[v9 + 58800]; /*0xffc8f430*/
n3 = v10[v9 + 58802]; /*0xffc8f440*/
n16 = *(_WORD *)&v10[v9 + 58800]; /*0xffc8f441*/
v24[8] = 117524656; /*0xffc8f44a*/
v24[9] = 117524660; /*0xffc8f453*/
v24[10] = 117524664; /*0xffc8f45b*/
v24[11] = 117524668; /*0xffc8f463*/
v12 = MemChipFuncCCE0((int)&v23, (int)n4, n16, n3); /*0xffc8f46b*/
v13 = *(_BYTE *)(v12 + 2); /*0xffc8f473*/
v25 = *(_WORD *)v12; /*0xffc8f47b*/
v14 = MemChipFuncC394(a5[3]) & 3 | (4 * (((v25 & 3) << 25) | (a5[4] - 1) & 3)); /*0xffc8f4a6*/
if ( n4_1 == 4 || (_WORD)n4_1 == 260 || n4_1 == 16 || (v15 = n4_1 == 32, v16 = v13, v15) ) /*0xffc8f4c2*/
v16 = HIBYTE(v25); /*0xffc8f4c4*/
v17 = v14 | ((v16 & 3) << 29); /*0xffc8f4d7*/
v18 = *(_DWORD *)(n4c + 4 * a4); /*0xffc8f4dc*/
if ( v18 < 0 ) /*0xffc8f4e1*/
v17 |= 0x80000000; /*0xffc8f4e3*/
v19 = (16 * (v18 & 0xFFFFF | ((*(_BYTE *)(a4 + j) & 3) << 20))) | v17; /*0xffc8f505*/
DebugPrint( /*0xffc8f54b*/
(int)n4,
2,
255,
255,
255,
255,
255,
255,
" FM - skt_ways:%d chn_ways:%d skt_granularity:%d ch_gran:%d tad_offset:%x chn_idx:%x\n",
v19 & 3,
(v19 >> 2) & 3,
(v19 >> 27) & 3,
(v19 >> 29) & 3,
(v19 >> 4) & 0xFFFFF,
HIBYTE(v19) & 3);
return MiscIoCheck(n4, a2, (unsigned __int8)(a4 + 3 * a3), v24[(unsigned __int8)a5[6]], v19); /*0xffc8f580*/
}
// Function: MemChipFuncF587 @ 0xffc8f587 (0x71 bytes)
// Index: 1121/2560
int __cdecl MemChipFuncF587(unsigned __int8 *n4)
{
unsigned __int8 n4_2; // bl
unsigned __int8 *v2; // ebp
unsigned int n4_1; // [esp+10h] [ebp-4h]
n4_2 = 0; /*0xffc8f590*/
LOBYTE(n4_1) = 0; /*0xffc8f592*/
v2 = n4 + 258689; /*0xffc8f596*/
do /*0xffc8f5e9*/
{
if ( *v2 ) /*0xffc8f59c*/
{
KtiFn_FFC90709(n4, n4_1); /*0xffc8f5a8*/
KtiFn_FFC90957(n4, n4_1); /*0xffc8f5af*/
MemChipFn_FFC8F5F8(n4, n4_1); /*0xffc8f5b6*/
KtiFn_FFC918AE(n4, n4_1); /*0xffc8f5bd*/
KtiFn_FFC9002A(n4, n4_1); /*0xffc8f5c4*/
MemChipFuncEF1D(n4, n4_1); /*0xffc8f5cb*/
KtiFn_FFC9274C(n4, n4_1); /*0xffc8f5d2*/
}
++n4_2; /*0xffc8f5da*/
v2 += 48704; /*0xffc8f5dc*/
LOBYTE(n4_1) = n4_2; /*0xffc8f5e2*/
}
while ( n4_2 < 4u ); /*0xffc8f5e9*/
return KtiFn_FFC92577(n4); /*0xffc8f5f2*/
}
// Function: MemChipFn_FFC8F5F8 @ 0xffc8f5f8 (0x8a6 bytes)
// Index: 1122/2560
char __cdecl MemChipFn_FFC8F5F8(unsigned __int8 *n4, unsigned int a2)
{
unsigned int v2; // ebx
int v4; // esi
int n6_1; // ecx
unsigned __int8 n6_2; // al
int v7; // ecx
unsigned __int8 n6_4; // bp
unsigned __int16 v9; // ax
unsigned int v10; // eax
int v11; // eax
int v12; // eax
int v13; // eax
int v14; // eax
int n100679904; // esi
int v16; // eax
char v17; // al
int v18; // eax
int v19; // eax
int v20; // eax
unsigned int v21; // esi
unsigned int v22; // esi
int v23; // ebp
unsigned __int8 n4a_2; // dl
int v25; // eax
unsigned __int8 *v26; // ebp
int v27; // ecx
int v28; // esi
unsigned __int8 n0x14; // dl
unsigned int v30; // eax
int v31; // esi
__int16 n2; // dx
unsigned int v33; // eax
unsigned int v34; // esi
_BYTE *SocketInfo_1; // ebp
int v36; // eax
int v37; // eax
unsigned __int8 n6_3; // [esp+10h] [ebp-28h]
unsigned __int8 v40; // [esp+10h] [ebp-28h]
unsigned int v41; // [esp+14h] [ebp-24h] BYREF
... [12890 chars total]
// Function: DebugLogPrint_19 @ 0xffc8fe9e (0x18c bytes)
// Index: 1123/2560
int __cdecl DebugLogPrint_19(
unsigned __int8 *n4,
unsigned __int8 a2,
unsigned __int8 a3,
unsigned __int8 a4,
unsigned __int8 *a5,
int n4c,
int j)
{
int v7; // ecx
unsigned __int8 *v8; // edi
__int16 *v9; // eax
char v10; // bl
char v12; // al
unsigned int v13; // eax
int n2_1; // ecx
char n2; // [esp-14h] [ebp-48h]
_DWORD v17[8]; // [esp+Ch] [ebp-28h]
int v18; // [esp+2Ch] [ebp-8h] BYREF
__int16 v19; // [esp+30h] [ebp-4h]
int v20; // [esp+48h] [ebp+14h]
v17[0] = 117457040; /*0xffc8feaa*/
v7 = 19 * a5[1]; /*0xffc8feb5*/
v17[1] = 117457044; /*0xffc8fec4*/
v17[2] = 117457048; /*0xffc8fece*/
v17[3] = 117457052; /*0xffc8fed5*/
v8 = &n4[50813 * a2 + v7]; /*0xffc8fedc*/
v17[4] = 117457056; /*0xffc8fede*/
v17[5] = 117457060; /*0xffc8fee5*/
v17[6] = 117457064; /*0xffc8feec*/
v17[7] = 117457068; /*0xffc8fef3*/
v9 = (__int16 *)MemChipFuncCCE0((int)&v18, (int)n4, *((_WORD *)v8 + 29400), v8[58802]); /*0xffc8ff11*/
n2 = a5[3]; /*0xffc8ff1d*/
v19 = *v9; /*0xffc8ff1e*/
v10 = MemChipFuncC394(n2); /*0xffc8ff2b*/
v12 = MemChipFunc3551(v8[a3 + 58808]); /*0xffc8ff3c*/
v13 = v10 & 3 /*0xffc8ff94*/
| (4
* ((4
* (*(_DWORD *)(n4c + 4 * a4) & 0xFFFFF
| ((*(_BYTE *)(a4 + j) & 3 | (8 * (v19 & 3 | (4 * (HIBYTE(v19) & 3))))) << 20)))
| (v12 - 1) & 3));
n2_1 = *((unsigned __int16 *)v8 + 29400); /*0xffc8ff96*/
v20 = v13; /*0xffc8ff9d*/
if ( (_WORD)n2_1 == 2 || n2_1 == 8 ) /*0xffc8ffa9*/
{
v13 &= 0xFF00000F; /*0xffc8ffab*/
v20 = v13; /*0xffc8ffb0*/
}
DebugPrint( /*0xffc8fff5*/
(int)n4,
2,
255,
255,
255,
255,
255,
255,
" NM - skt_ways:%d chn_ways:%d skt_granularity:%d ch_gran:%d tad_offset:%x chn_idx:%x\n",
v13 & 3,
(v13 >> 2) & 3,
(v13 >> 27) & 3,
(v13 >> 29) & 3,
(v13 >> 4) & 0xFFFFF,
HIBYTE(v13) & 3);
return MiscIoCheck(n4, a2, (unsigned __int8)(a4 + 3 * a3), v17[a5[5]], v20); /*0xffc90023*/
}
// Function: KtiFn_FFC9002A @ 0xffc9002a (0x8c bytes)
// Index: 1124/2560
int __cdecl KtiFn_FFC9002A(unsigned __int8 *n4, unsigned __int8 a2)
{
unsigned __int8 n6; // bl
int result; // eax
int v4; // [esp+10h] [ebp-4h]
n6 = 0; /*0xffc90045*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc90048*/
DebugPrint( /*0xffc9005b*/
(int)n4,
2,
255,
255,
255,
255,
255,
255,
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\t\tWrite RIR CSRs for Socket: %d\n", a2);
DebugPrint( /*0xffc90086*/
(int)n4,
2,
255,
255,
255,
255,
255,
255,
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
LOBYTE(v4) = 0; /*0xffc90090*/
do /*0xffc900ae*/
{
result = DebugLogPrint(n4, a2, v4); /*0xffc9009d*/
LOBYTE(v4) = ++n6; /*0xffc900a7*/
}
while ( n6 < 6u ); /*0xffc900ae*/
return result; /*0xffc900b0*/
}
// Function: DebugLogPrint @ 0xffc900b6 (0x653 bytes)
// Index: 1125/2560
int __cdecl DebugLogPrint(unsigned __int8 *n4, unsigned __int8 a2, int a3)
{
int result; // eax
int v4; // ebp
unsigned __int8 *v5; // edx
unsigned int v6; // esi
unsigned __int8 *v7; // ecx
int v8; // edx
unsigned __int8 *v9; // eax
int v10; // edi
bool v11; // zf
unsigned __int8 v12; // dl
unsigned __int8 v13; // dh
int v14; // ecx
unsigned int *v15; // edi
int v16; // ebp
unsigned __int8 *v17; // edx
unsigned int v18; // esi
unsigned __int8 *v19; // eax
unsigned __int8 *v20; // edx
int v21; // ecx
int v22; // edi
unsigned int *v23; // [esp+Ch] [ebp-F0h]
unsigned __int8 *v24; // [esp+Ch] [ebp-F0h]
unsigned __int8 *v25; // [esp+10h] [ebp-ECh]
unsigned __int8 *v26; // [esp+10h] [ebp-ECh]
unsigned __int8 *v27; // [esp+14h] [ebp-E8h]
unsigned __int8 *v28; // [esp+14h] [ebp-E8h]
unsigned __int16 *v29; // [esp+18h] [ebp-E4h]
unsigned int *v30; // [esp+18h] [ebp-E4h]
unsigned int *v31; // [esp+1Ch] [ebp-E0h]
_DWORD *v32; // [esp+1Ch] [ebp-E0h]
int v33; // [esp+20h] [ebp-DCh]
unsigned int *v34; // [esp+20h] [ebp-DCh]
int n8; // [esp+24h] [ebp-D8h]
unsigned __int8 *v36; // [esp+24h] [ebp-D8h]
int n4_1; // [esp+28h] [ebp-D4h]
int v38; // [esp+28h] [ebp-D4h]
int n2; // [esp+2Ch] [ebp-D0h]
int n4_2; // [esp+30h] [ebp-CCh]
unsigned __int8 *v41; // [esp+34h] [ebp-C8h]
_BYTE *v42; // [esp+38h] [ebp-C4h]
_DWORD v43[4]; // [esp+3Ch] [ebp-C0h] BYREF
_DWORD v44[4]; // [esp+4Ch] [ebp-B0h] BYREF
_DWORD v45[8]; // [esp+5Ch] [ebp-A0h] BYREF
_DWORD v46[32]; // [esp+7Ch] [ebp-80h] BYREF
v43[0] = 117457160; /*0xffc900d4*/
v43[1] = 117457164; /*0xffc900dd*/
v43[2] = 117457168; /*0xffc900e5*/
v43[3] = 117457172; /*0xffc900ed*/
v46[0] = 117457184; /*0xffc900f5*/
v46[1] = 117457200; /*0xffc90100*/
v46[2] = 117457216; /*0xffc9010b*/
v46[3] = 117457232; /*0xffc90116*/
v46[4] = 117457248; /*0xffc90121*/
v46[5] = 117457264; /*0xffc9012c*/
v46[6] = 117457280; /*0xffc90137*/
v46[7] = 117457296; /*0xffc90142*/
v46[8] = 117457188; /*0xffc9014d*/
v46[9] = 117457204; /*0xffc90158*/
v46[10] = 117457220; /*0xffc90163*/
v46[11] = 117457236; /*0xffc9016e*/
v46[12] = 117457252; /*0xffc90179*/
v46[13] = 117457268; /*0xffc90184*/
v46[14] = 117457284; /*0xffc9018f*/
v46[15] = 117457300; /*0xffc9019a*/
v46[16] = 117457192; /*0xffc901a5*/
v46[17] = 117457208; /*0xffc901b0*/
v46[18] = 117457224; /*0xffc901bb*/
v46[19] = 117457240; /*0xffc901c6*/
v46[20] = 117457256; /*0xffc901d1*/
v46[21] = 117457272; /*0xffc901dc*/
v46[22] = 117457288; /*0xffc901e7*/
v46[23] = 117457304; /*0xffc901f2*/
v46[24] = 117457196; /*0xffc901fd*/
v46[25] = 117457212; /*0xffc90208*/
v46[26] = 117457228; /*0xffc90213*/
v46[27] = 117457244; /*0xffc9021e*/
v46[28] = 117457260; /*0xffc90229*/
v46[29] = 117457276; /*0xffc90234*/
v46[30] = 117457292; /*0xffc9023f*/
v46[31] = 117457308; /*0xffc9024a*/
v44[0] = 117524744; /*0xffc90255*/
v44[1] = 117524748; /*0xffc9025d*/
v44[2] = 117524752; /*0xffc90265*/
v44[3] = 117524756; /*0xffc9026d*/
v45[0] = 117524768; /*0xffc90275*/
v45[1] = 117524772; /*0xffc9027d*/
v45[2] = 117524800; /*0xffc90285*/
v45[3] = 117524804; /*0xffc9028d*/
v45[4] = 117524832; /*0xffc90295*/
v45[5] = 117524836; /*0xffc9029d*/
v45[6] = 117524864; /*0xffc902a5*/
v45[7] = 117524868; /*0xffc902ad*/
result = GetSocketInfo((int)n4, a2); /*0xffc902bb*/
v42 = (_BYTE *)(result + 7688 * (unsigned __int8)a3); /*0xffc902ca*/
if ( *v42 )
{
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, " Channel - %d\n", (unsigned __int8)a3); /*0xffc902ec*/
v4 = 0; /*0xffc902fe*/
n4_1 = 4; /*0xffc9030c*/
v23 = v46; /*0xffc90325*/
v31 = v43; /*0xffc9032d*/
v41 = &n4[50813 * a2 + 10239 + 8077 * (unsigned __int8)a3]; /*0xffc90331*/
v27 = v41 + 7710; /*0xffc9033b*/
v5 = v41 + 7706; /*0xffc9033f*/
v25 = v41 + 7838; /*0xffc9034f*/
v29 = (unsigned __int16 *)(v41 + 7694); /*0xffc9035b*/
do
{
v6 = (((unsigned int)*v29 - 1) >> 2) & 0xFFE | (((8 * v5[v4]) | MemChipFuncC394(v5[v4 - 4]) & 3) << 28); /*0xffc903a9*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, " RIRWAYNESSLIMIT_%d_MC_MAIN_REG\n", v4); /*0xffc903ab*/
DebugPrint(
(int)n4,
2,
255,
255,
255,
255,
255,
255,
" \trir_val: %x\trir_limit: %x\trir_way: %x\n\n",
v6 >> 31,
(v6 >> 1) & 0x7FF,
(v6 >> 28) & 3);
MiscIoCheck(n4, a2, a3, *v31, v6); /*0xffc903f5*/
v7 = v25; /*0xffc90401*/
v8 = 0; /*0xffc90405*/
v9 = v27; /*0xffc9040b*/
v33 = 0; /*0xffc9040f*/
n8 = 8; /*0xffc9041b*/
do
{
v10 = *(_DWORD *)v9 & 0x3FFF | ((*v7 & 0xF) << 14); /*0xffc9043a*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, " RIRILV%dOFFSET_%d_MC_MAIN_REG\n", v8, v4); /*0xffc9044f*/
DebugPrint(
(int)n4,
2,
255,
255,
255,
255,
255,
255,
" \trir_rnk_tgt0: %x\trir_offset0: %x\n\n",
(unsigned int)(4 * v10) >> 16,
v10 & 0x3FFF);
MiscIoCheck(n4, a2, a3, *v23, 4 * v10); /*0xffc90492*/
v8 = v33 + 1; /*0xffc904a2*/
v9 = v27 + 4; /*0xffc904a7*/
++v33; /*0xffc904ad*/
v7 = v25 + 1; /*0xffc904b1*/
v27 += 4; /*0xffc904b2*/
v11 = n8-- == 1; /*0xffc904b6*/
++v23; /*0xffc904bb*/
++v25; /*0xffc904bf*/
}
while ( !v11 );
++v29; /*0xffc904c9*/
++v4; /*0xffc904ce*/
++v31; /*0xffc904cf*/
v11 = n4_1-- == 1; /*0xffc904d4*/
v5 = v41 + 7706; /*0xffc904dd*/
}
while ( !v11 );
result = GetCpuCount((int)n4, a2, a3); /*0xffc904f6*/
v12 = 0; /*0xffc90502*/
v13 = v42[3]; /*0xffc90504*/
if ( v13 )
{
while ( 1 ) /*0xffc90512*/
{
v14 = 1379 * v12; /*0xffc90512*/
if ( *(_BYTE *)(v14 + result) ) /*0xffc90518*/
{
if ( *(_BYTE *)(v14 + result + 107) ) /*0xffc9051e*/
break; /*0xffc9051e*/
}
if ( ++v12 >= v13 ) /*0xffc90529*/
return result; /*0xffc90529*/
}
v30 = v44; /*0xffc90538*/
v15 = v45; /*0xffc9053c*/
v16 = 0; /*0xffc90540*/
n4_2 = 4; /*0xffc90542*/
v24 = v41 + 7894; /*0xffc90550*/
v17 = v41 + 7890; /*0xffc90554*/
v26 = v41 + 8022; /*0xffc90564*/
v32 = v41 + 7870; /*0xffc90570*/
do
{
v18 = ((unsigned int)(*v32 - 1) >> 2) & 0x3FFE | ((MemChipFuncC394(v17[v16 - 4]) & 3 | (8 * v17[v16])) << 28); /*0xffc905af*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, " FMRIRWAYNESSLIMIT_%d_MC2LM_REG\n", v16); /*0xffc905bf*/
DebugPrint(
(int)n4,
2,
255,
255,
255,
255,
255,
255,
" \trir_val: %x\trir_limit: %x\trir_way: %x\n\n",
v18 >> 31,
(v18 >> 1) & 0x1FFF,
(v18 >> 28) & 3);
MiscIoCheck(n4, a2, a3, *v30, v18); /*0xffc9060e*/
v19 = v26; /*0xffc90613*/
v20 = v24; /*0xffc9061a*/
v21 = 0; /*0xffc9061e*/
v38 = 0; /*0xffc90620*/
v34 = v15; /*0xffc90624*/
v28 = v26; /*0xffc90628*/
v36 = v24; /*0xffc9062c*/
n2 = 2; /*0xffc90630*/
do
{
v22 = *(unsigned __int16 *)v20 | ((*v19 & 0xF) << 16); /*0xffc9064b*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, " FMRIRILV%dOFFSET_%d_MC2LM_REG\n", v21, v16); /*0xffc90660*/
DebugPrint(
(int)n4,
2,
255,
255,
255,
255,
255,
255,
" \trir_rnk_tgt0: %x\trir_offset0: %x\n\n",
(unsigned int)(4 * v22) >> 18,
(unsigned __int16)v22);
MiscIoCheck(n4, a2, a3, *v34, 4 * v22); /*0xffc906a0*/
v21 = ++v38; /*0xffc906b0*/
v20 = v36 + 4; /*0xffc906bc*/
v15 = v34 + 1; /*0xffc906be*/
v19 = v28 + 1; /*0xffc906c0*/
v36 += 4; /*0xffc906c1*/
v11 = n2-- == 1; /*0xffc906c5*/
++v34; /*0xffc906ca*/
++v28; /*0xffc906ce*/
}
while ( !v11 );
++v32; /*0xffc906d8*/
++v16; /*0xffc906dc*/
++v30; /*0xffc906dd*/
v26 += 8; /*0xffc906e1*/
v24 += 32; /*0xffc906e6*/
v11 = n4_2-- == 1; /*0xffc906eb*/
result = -7890; /*0xffc906f0*/
v17 = v41 + 7890; /*0xffc906f4*/
}
while ( !v11 );
}
}
return result; /*0xffc906ff*/
}
// Function: KtiFn_FFC90709 @ 0xffc90709 (0x24e bytes)
// Index: 1126/2560
char __cdecl KtiFn_FFC90709(unsigned __int8 *n4, unsigned __int8 a2)
{
unsigned __int8 v3; // bl
int n10813440; // esi
unsigned __int8 v5; // bh
char result; // al
unsigned __int8 v7; // [esp+10h] [ebp-8h]
unsigned __int8 n4a; // [esp+1Ch] [ebp+4h]
unsigned __int8 n4b; // [esp+1Ch] [ebp+4h]
DebugPrint( /*0xffc90727*/
(int)n4,
2,
255,
255,
255,
255,
255,
255,
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\t\tWrite Route Table CSRs for Socket: %d\n", a2);
DebugPrint( /*0xffc9075a*/
(int)n4,
2,
255,
255,
255,
255,
255,
255,
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "CSR : MC_ROUTE_TABLE_CHA (per socket)\n");
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\tRingid 0 1 2 3 4 5\n"); /*0xffc90781*/
v3 = 0; /*0xffc90788*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\t %x %x %x %x %x %x\n", 0, 1, 0, 1, 0, 1); /*0xffc9079f*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\tChnlid 0 1 2 3 4 5\n"); /*0xffc907b5*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\t %x %x %x %x %x %x\n\n", 0, 0, 1, 1, 2, 2); /*0xffc907d2*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\tCSR : MC_NM_ROUTE_TABLE (per socket per IMC)\n ");
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\tChnlid 0 1 2 3 4 5\n"); /*0xffc907fb*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\t %x %x %x %x %x %x\n\n", 0, 0, 1, 1, 2, 2); /*0xffc9081b*/
n10813440 = 0; /*0xffc90825*/
if ( MemChipFuncAB3F((int)n4, 1 << a2) )
{
n10813440 = 10813440; /*0xffc90845*/
DebugPrint(
(int)n4,
2,
255,
255,
255,
255,
255,
255,
"\tCSR : MC_ROUTE_TABLE_MC - FM (per socket per IMC only in 2 LM mode)\n ");
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\tChnlid 0 1 2 3 4 5\n"); /*0xffc9086b*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\t %x %x %x %x %x %x\n\n", 0, 0, 1, 1, 2, 2); /*0xffc90890*/
}
v7 = 0; /*0xffc9089e*/
if ( n4[351 * a2 + 255719] ) /*0xffc908a2*/
{
v5 = n4[351 * a2 + 255719]; /*0xffc908ad*/
do /*0xffc908d2*/
{
CpuIoCfgWrite((int)n4, a2, v7, 16793780, 692093448); /*0xffc908c2*/
v7 = ++v3; /*0xffc908cc*/
}
while ( v3 < v5 ); /*0xffc908d2*/
v3 = 0; /*0xffc908d4*/
}
n4a = 0; /*0xffc908dd*/
if ( n4[244317] ) /*0xffc908d6*/
{
do /*0xffc9090a*/
{
MailBoxFunc8FC5((int)n4, a2, n4a, 117458624, 10813440); /*0xffc908f6*/
n4a = ++v3; /*0xffc90900*/
}
while ( v3 < n4[244317] ); /*0xffc9090a*/
v3 = 0; /*0xffc9090c*/
}
result = MemChipFuncAB3F((int)n4, 1 << a2); /*0xffc90913*/
if ( result ) /*0xffc9091c*/
{
n4b = 0; /*0xffc90925*/
if ( n4[244317] ) /*0xffc9091e*/
{
do /*0xffc9094e*/
{
result = MailBoxFunc8FC5((int)n4, a2, n4b, 117458880, n10813440); /*0xffc9093a*/
n4b = ++v3; /*0xffc90944*/
}
while ( v3 < n4[244317] ); /*0xffc9094e*/
}
}
return result; /*0xffc90950*/
}
// Function: KtiFn_FFC90957 @ 0xffc90957 (0xf57 bytes)
// Index: 1127/2560
unsigned __int8 __cdecl KtiFn_FFC90957(unsigned __int8 *n4, int a2)
{
unsigned __int8 n0x18_1; // al
int v3; // ecx
int v4; // eax
unsigned __int8 *v5; // ebp
int v6; // edx
int v7; // ecx
unsigned int v8; // edi
int v9; // eax
char n2_2; // cl
char v11; // dl
int v12; // esi
int v13; // eax
unsigned int v14; // esi
__int16 n2; // ax
int v16; // edi
char v17; // al
int v18; // ecx
__int16 n4_1; // cx
int v20; // edx
int v21; // eax
char n2_6; // dh
char v23; // dl
__int16 n2_3; // ax
bool v25; // zf
int v26; // eax
__int16 n2_5; // cx
unsigned int n8; // eax
unsigned int v29; // eax
unsigned int v30; // eax
unsigned int n2_7; // eax
int v32; // ecx
int v33; // ecx
int v34; // edx
int v35; // esi
int v36; // edi
__int16 n2_8; // ax
__int16 n2_9; // ax
int v39; // [esp-4h] [ebp-2A4h]
__int16 v40; // [esp+10h] [ebp-290h]
char n2_4; // [esp+16h] [ebp-28Ah]
unsigned __int8 v42; // [esp+17h] [ebp-289h]
unsign... [18845 chars total]
// Function: KtiFn_FFC918AE @ 0xffc918ae (0x713 bytes)
// Index: 1128/2560
unsigned __int8 __cdecl KtiFn_FFC918AE(unsigned __int8 *n4, int a2)
{
int v2; // ebx
unsigned __int8 result; // al
int v5; // edx
char v6; // cl
int v7; // ebp
unsigned __int16 n4a_1; // ax
unsigned int v9; // esi
unsigned int n0x2000; // esi
unsigned __int8 n4b_1; // al
unsigned __int8 *v12; // edx
int v13; // ecx
int v14; // ebp
int v15; // esi
unsigned int v16; // eax
char n9; // al
int v18; // eax
unsigned __int8 n8; // dl
unsigned __int8 j; // cl
int v21; // eax
unsigned __int8 n8_1; // al
int n3; // esi
char v24; // al
int v25; // ebp
int v26; // eax
unsigned __int16 v27; // bp
int v28; // esi
unsigned int n0x4000; // edx
bool v30; // cf
bool v31; // zf
unsigned __int8 n0x14_1; // al
int n0x14_2; // esi
unsigned __int8 *v34; // ebp
int n4c_1; // ecx
int j_1; // esi
int v37; // [esp-30h] [ebp-8Ch]
int v38; // [esp-30h] [ebp-8Ch]
char v39; // [esp+12h] [ebp-4Ah]
char v40; // [esp+13h] [ebp-49h]
unsigned _... [13017 chars total]
// Function: DebugLogPrint_10 @ 0xffc91fc1 (0xd7 bytes)
// Index: 1129/2560
int __cdecl DebugLogPrint_10(
unsigned __int8 *n4,
unsigned __int8 a2,
char a3,
int n4_1,
unsigned __int8 n0x14,
unsigned __int8 *a6,
int n4c,
int j)
{
int n4_2; // eax
unsigned __int8 *v9; // esi
int v10; // ebx
n4_2 = n4_1; /*0xffc91fe9*/
v9 = &n4[50813 * a2 + 19 * a6[1]]; /*0xffc91fec*/
v10 = 1 << n4_1; /*0xffc91ff1*/
if ( ((unsigned __int8)(1 << n4_1) & v9[(unsigned __int8)a3 + 58808]) != 0
|| ((unsigned __int8)v10 & v9[(unsigned __int8)a3 + 58810]) != 0 )
{
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, " Channel: %d\n", (unsigned __int8)n4_1);
n4_2 = *((unsigned __int16 *)v9 + 29400); /*0xffc92024*/
if ( n4_2 != 4 /*0xffc9204e*/
&& (_WORD)n4_2 != 260
&& n4_2 != 16
&& n4_2 != 32
&& ((unsigned __int8)v10 & v9[(unsigned __int8)a3 + 58808]) != 0 )
{
n4_2 = DebugLogPrint_19(n4, a2, a3, n4_1, a6, n4c, j); /*0xffc92065*/
}
if ( ((unsigned __int8)v10 & v9[(unsigned __int8)a3 + 58810]) != 0 ) /*0xffc92074*/
return MemChipFuncF3CE(n4, a2, a3, n4_1, a6, n4c, j); /*0xffc9208b*/
}
return n4_2; /*0xffc92093*/
}
// Function: DebugLogPrint_0 @ 0xffc92098 (0x4df bytes)
// Index: 1130/2560
unsigned __int8 __cdecl DebugLogPrint_0(unsigned __int8 *n4, unsigned __int8 a2, unsigned __int8 a3)
{
unsigned __int8 *n4_1; // ebx
unsigned __int8 *v4; // ecx
unsigned __int8 *v5; // esi
unsigned __int8 n8; // al
int v7; // ebp
unsigned __int8 v8; // dl
int v9; // edi
__int16 n2; // ax
int v11; // ecx
unsigned __int8 v12; // al
unsigned int v13; // edi
unsigned int v14; // edx
int v15; // eax
unsigned __int8 *v16; // ecx
int v17; // esi
int n192512; // esi
unsigned int v19; // esi
_WORD *v20; // eax
char v21; // dl
unsigned int v22; // edi
unsigned __int8 v23; // cl
int v24; // eax
unsigned int v25; // edi
char v26; // [esp+13h] [ebp-75h]
unsigned __int8 v27; // [esp+13h] [ebp-75h]
unsigned __int8 v28; // [esp+14h] [ebp-74h]
unsigned __int8 n8_1; // [esp+15h] [ebp-73h]
unsigned __int8 v30; // [esp+16h] [ebp-72h]
unsigned __int8 v31; // [esp+17h] [ebp-71h]
int v32; // [esp+18h] [ebp-70h]
unsigned __int8 *v33; // [esp+20h] [ebp-68h]
unsigned __int8 *v34; // [esp+24h] [ebp-64h]
unsigned int v35; // [esp+28h] [ebp-60h]
int v36; // [esp+28h] [ebp-60h]
int v37; // [esp+3Ch] [ebp-4Ch]
int v38; // [esp+44h] [ebp-44h] BYREF
_DWORD v39[8]; // [esp+48h] [ebp-40h]
_DWORD v40[8]; // [esp+68h] [ebp-20h]
n4_1 = n4; /*0xffc9209e*/
v28 = 0; /*0xffc920bb*/
v26 = 0; /*0xffc920c0*/
v39[0] = 117459072; /*0xffc920c5*/
v39[1] = 117459076; /*0xffc920cd*/
v39[2] = 117459080; /*0xffc920d5*/
v39[3] = 117459084; /*0xffc920dd*/
v39[4] = 117459088; /*0xffc920e5*/
v39[5] = 117459092; /*0xffc920ed*/
v39[6] = 117459096; /*0xffc920f8*/
v39[7] = 117459100; /*0xffc92103*/
v40[0] = 117459024; /*0xffc9210e*/
v40[1] = 117459028; /*0xffc92119*/
v40[2] = 117459032; /*0xffc92124*/
v40[3] = 117459036; /*0xffc9212f*/
v40[4] = 117459040; /*0xffc9213a*/
v40[5] = 117459044; /*0xffc92145*/
v40[6] = 117459048; /*0xffc92150*/
v40[7] = 117459052; /*0xffc9215b*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "Writing TadWayness and TadBase CSRs\n"); /*0xffc9216a*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"); /*0xffc9217c*/
v4 = &n4[50813 * a2 + 10189]; /*0xffc921a6*/
v34 = v4; /*0xffc921bc*/
v5 = &v4[768 * a3]; /*0xffc921c0*/
v31 = n4[1557]; /*0xffc921c9*/
n8 = 0; /*0xffc921cd*/
v33 = v5; /*0xffc921cf*/
n8_1 = 0; /*0xffc921d3*/
do
{
v7 = 19 * n8; /*0xffc921da*/
if ( !v5[v7 + 49645] ) /*0xffc921dd*/
break; /*0xffc921dd*/
v8 = v5[v7 + 49646]; /*0xffc921eb*/
v9 = 19 * v8; /*0xffc921f5*/
v32 = v9; /*0xffc921f8*/
n2 = *(_WORD *)&v4[v9 + 48611]; /*0xffc921fc*/
if ( n2 == 1 || n2 == 2 )
{
if ( n2 != 2 )
{
if ( v8 ) /*0xffc9230a*/
v13 = *(_DWORD *)&v4[v9 + 48595] << 12; /*0xffc92317*/
else
v13 = 0; /*0xffc9230c*/
if ( n4_1[257254] == 1 && !v8 && *(_DWORD *)&v4[v32 + 48614] == 64 && v5[v7 + 49649] == 3 ) /*0xffc9233f*/
n192512 = 192512; /*0xffc92341*/
else
n192512 = (*(_DWORD *)&v5[v7 + 49652] - 1) << 12; /*0xffc92350*/
v16 = v33; /*0xffc92353*/
v17 = (((v33[v7 + 49649] - 1) & 3) << 8) | n192512; /*0xffc92366*/
LABEL_22:
v19 = ((MemChipFuncC394(v16[v7 + 49648]) & 3) << 10) | v17; /*0xffc92368*/
DebugPrint(
(int)n4_1,
2,
255,
255,
255,
255,
255,
255,
"TADWAYNESS : \n\tChway : %x SktWay : %x Limit : %x \n",
(v19 >> 8) & 3,
(v19 >> 10) & 3,
v19 >> 12);
MailBoxFunc8FC5((int)n4_1, a2, a3, v39[v28], v19); /*0xffc923d3*/
v30 = v33[v7 + 49646]; /*0xffc923ea*/
v37 = 19 * v30; /*0xffc923f8*/
v20 = (_WORD *)MemChipFuncCCE0((int)&v38, (int)n4_1, *(_WORD *)&v34[v37 + 48611], v34[v37 + 48613]); /*0xffc92414*/
v21 = 0; /*0xffc9241c*/
v36 = v13 | (16 * (*v20 & 3 | (4 * (HIBYTE(*v20) & 3)))); /*0xffc9244c*/
v22 = a3 + a2 * n4_1[244317]; /*0xffc92454*/
v23 = 0; /*0xffc92456*/
if ( v22 ) /*0xffc9245a*/
{
v24 = 0; /*0xffc92460*/
do /*0xffc92478*/
{
if ( v34[8 * v30 + 49066 + v24] == 1 ) /*0xffc9246d*/
++v21; /*0xffc9246f*/
v24 = ++v23; /*0xffc92473*/
}
while ( v23 < v22 ); /*0xffc92478*/
n4_1 = n4; /*0xffc9247a*/
}
v25 = v36 | v21 & 7; /*0xffc9248d*/
if ( *(_WORD *)&v34[v37 + 48611] == 1 ) /*0xffc9249a*/
{
if ( n4_1[261] == 1 ) /*0xffc924a2*/
v25 |= 0x200u; /*0xffc924a4*/
if ( !a2 && !v30 && (v19 & 0x300) == 0x200 ) /*0xffc924c7*/
{
if ( ((64 - v31) & 0xFFFCu) % (3 * (unsigned int)v34[v37 + 48618]) ) /*0xffc924e5*/
v25 |= 0x200u; /*0xffc924eb*/
}
}
DebugPrint(
(int)n4_1,
2,
255,
255,
255,
255,
255,
255,
"TADBASE : \n \tbase : %x base_offset : %x skt_gran : %x ch_gran : %x ign_ptr_uc : %x\n",
v25 >> 12,
v25 & 7,
(v25 >> 4) & 3,
(unsigned __int8)v25 >> 6,
(v25 >> 9) & 1);
MailBoxFunc8FC5((int)n4_1, a2, a3, v40[v28], v25); /*0xffc9254b*/
v5 = v33; /*0xffc92550*/
++v28; /*0xffc92557*/
v4 = v34; /*0xffc9255b*/
goto LABEL_37; /*0xffc9255b*/
}
if ( v26 != 1 ) /*0xffc92228*/
{
v27 = MemChipFunc9754((int)n4_1, a2, a3); /*0xffc92249*/
v11 = MemChipFunc9660((int)n4_1, a2, a3) * v27 * v5[v7 + 49648]; /*0xffc92271*/
v12 = v5[v7 + 49646]; /*0xffc92274*/
v13 = v11 << 12; /*0xffc9227d*/
if ( v12 ) /*0xffc92282*/
{
v35 = *(_DWORD *)&v34[19 * v12 + 48595]; /*0xffc9229d*/
v14 = v35 % (v11 & 0xFFFFFu); /*0xffc922a1*/
if ( v14 ) /*0xffc922a5*/
v13 = (v13 - (v14 << 12)) & 0xFFFFF000; /*0xffc922ac*/
v13 += v35 << 12; /*0xffc922b9*/
}
v15 = MemChipFunc9660((int)n4_1, a2, a3); /*0xffc922ca*/
v16 = v33; /*0xffc922df*/
v17 = ((v27 - 1) & 3 | (16 * ((v13 >> 12) + v15 * v27 * v5[v7 + 49648] - 1))) << 8; /*0xffc922fe*/
v26 = 1; /*0xffc92302*/
goto LABEL_22; /*0xffc92306*/
}
}
LABEL_37:
n8 = n8_1 + 1; /*0xffc9255d*/
n8_1 = n8; /*0xffc92563*/
}
while ( n8 < 8u );
return n8; /*0xffc9256f*/
}
// Function: KtiFn_FFC92577 @ 0xffc92577 (0x1d5 bytes)
// Index: 1131/2560
int __cdecl KtiFn_FFC92577(unsigned __int8 *n4)
{
unsigned int n0x40; // edi
unsigned __int8 v3; // al
unsigned int n0x40_1; // esi
unsigned int v5; // esi
int v6; // ecx
int v7; // eax
int v8; // edi
unsigned __int8 *v9; // edx
int n4_1; // eax
unsigned __int8 *v11; // ecx
unsigned __int8 n4a_1; // dl
char v13; // bp
unsigned __int8 n4_2; // [esp+10h] [ebp-10h]
unsigned int v15; // [esp+14h] [ebp-Ch]
unsigned __int8 *v16; // [esp+18h] [ebp-8h]
unsigned __int8 *v17; // [esp+1Ch] [ebp-4h]
unsigned __int8 n4a; // [esp+24h] [ebp+4h]
n0x40 = 0; /*0xffc92582*/
v3 = MemChipFunc978E((int)n4, 0); /*0xffc92586*/
if ( (unsigned __int8)(v3 - 1) <= 0x16u ) /*0xffc92593*/
n0x40 = *(_DWORD *)&n4[19 * v3 + 58784] - 1; /*0xffc925a2*/
n0x40_1 = ((64 - n4[1557]) & 0xFFFFFFFC) - 1; /*0xffc925b2*/
if ( n0x40_1 >= n0x40 ) /*0xffc925b5*/
{
n0x40_1 = n0x40; /*0xffc925ba*/
if ( (((_BYTE)n0x40 + 1) & 3) != 0 ) /*0xffc925bf*/
n0x40_1 = n0x40 - (((_BYTE)n0x40 + 1) & 3) + 4; /*0xffc925c3*/
}
*(_DWORD *)(n4 + 9514) = 0; /*0xffc925c6*/
v5 = n0x40_1 << 26; /*0xffc925cd*/
v6 = (v5 >> 26) + 1; /*0xffc925d5*/
*(_DWORD *)(n4 + 9518) = v6; /*0xffc925d8*/
if ( n0x40 >= 0x40 ) /*0xffc925e1*/
{
if ( (n4[1388] & 1) != 0 ) /*0xffc925f3*/
{
v6 = (v5 >> 26) + 1; /*0xffc92608*/
v7 = n0x40 - (1 << (n4[244372] - 26)) + 1; /*0xffc9260b*/
}
else
{
v7 = n0x40 - 63; /*0xffc9260e*/
}
*(_DWORD *)(n4 + 9526) = v7; /*0xffc92611*/
}
else
{
*(_DWORD *)(n4 + 9526) = 0; /*0xffc925e3*/
}
if ( n0x40 < 0x40 ) /*0xffc9261a*/
{
v15 = -67108864; /*0xffc9262a*/
v8 = 0; /*0xffc92632*/
}
else
{
v15 = n0x40 << 26; /*0xffc92621*/
v8 = n0x40 >> 6; /*0xffc92625*/
}
*((_WORD *)n4 + 123378) = (v5 >> 26) + 1; /*0xffc92642*/
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "lowMemBase: 0x%x\nlowMemSize: 0x%x\n", 0, v6);
n4_1 = DebugPrint(
(int)n4,
2,
255,
255,
255,
255,
255,
255,
"highMemBase: 0x%x\nhighMemSize: 0x%x\nTOLM: 0x%x\nTOHM: 0x%x\n",
*(_DWORD *)(n4 + 9522),
*(_DWORD *)(n4 + 9526),
v5 >> 26,
(v8 << 6) | (v15 >> 26));
v9 = n4 + 255497; /*0xffc92693*/
LOBYTE(n4_1) = 0; /*0xffc92699*/
v16 = n4 + 255497; /*0xffc9269b*/
v11 = n4 + 258689; /*0xffc9269f*/
n4_2 = 0; /*0xffc926a5*/
v17 = n4 + 258689; /*0xffc926a9*/
do /*0xffc9273e*/
{
if ( *v11 ) /*0xffc926ad*/
{
n4a_1 = 0; /*0xffc926b2*/
v13 = 0; /*0xffc926b4*/
n4a = 0; /*0xffc926b6*/
do /*0xffc92719*/
{
n4_1 = 1 << v13; /*0xffc926bf*/
if ( ((unsigned __int8)(1 << v13) & *v16) != 0 ) /*0xffc926c7*/
{
CpuIoCfgWrite((int)n4, n4_2, n4a, 285229264, v5); /*0xffc926d8*/
CpuIoCfgWrite((int)n4, n4_2, n4a, 285229268, v15); /*0xffc926ef*/
n4_1 = CpuIoCfgWrite((int)n4, n4_2, n4a, 285229272, v8); /*0xffc92703*/
n4a_1 = n4a; /*0xffc92708*/
}
++n4a_1; /*0xffc9270f*/
++v13; /*0xffc92711*/
n4a = n4a_1; /*0xffc92712*/
}
while ( n4a_1 < 6u ); /*0xffc92719*/
LOBYTE(n4_1) = n4_2; /*0xffc9271b*/
v11 = v17; /*0xffc9271f*/
v9 = v16; /*0xffc92723*/
}
LOBYTE(n4_1) = n4_1 + 1; /*0xffc92727*/
v11 += 48704; /*0xffc92729*/
++v9; /*0xffc9272f*/
n4_2 = n4_1; /*0xffc92730*/
v17 = v11; /*0xffc92734*/
v16 = v9; /*0xffc92738*/
}
while ( (unsigned __int8)n4_1 < 4u ); /*0xffc9273e*/
return n4_1; /*0xffc92744*/
}
// Function: KtiFn_FFC9274C @ 0xffc9274c (0x9f bytes)
// Index: 1132/2560
int __cdecl KtiFn_FFC9274C(unsigned __int8 *n4, int a2)
{
unsigned __int8 v2; // cl
unsigned __int8 *n4_1; // edi
unsigned __int8 n6; // bl
int result; // eax
unsigned __int8 *v6; // ebp
int v7; // eax
int v8; // esi
v2 = a2; /*0xffc9274c*/
n4_1 = n4; /*0xffc92754*/
n6 = 0; /*0xffc92758*/
result = 48704 * (unsigned __int8)a2; /*0xffc9275d*/
LOBYTE(n4) = 0; /*0xffc92763*/
v6 = &n4_1[result + 258722]; /*0xffc9276d*/
do
{
if ( *v6 )
{
v7 = MiscConfigCheck(n4_1, v2, (unsigned __int8)n4, 117522684); /*0xffc92780*/
if ( n4_1[244313] ) /*0xffc9278a*/
v8 = v7 & 0xFFFFFFFE; /*0xffc92798*/
else
v8 = v7 | 1; /*0xffc92793*/
MiscIoCheck(n4_1, a2, (int)n4, 0x70140FCu, v8); /*0xffc927aa*/
result = DebugPrint(
(int)n4_1,
2,
a2,
(int)n4,
255,
255,
255,
255,
"CSR : SCRATCHPAD_2LMCNTL_MC_2LM_REG: %x\n",
v8);
v2 = a2; /*0xffc927ce*/
}
++n6; /*0xffc927d5*/
v6 += 7688; /*0xffc927d7*/
LOBYTE(n4) = n6; /*0xffc927dd*/
}
while ( n6 < 6u );
return result; /*0xffc927e6*/
}
// Function: KtiFn_FFC927EB @ 0xffc927eb (0xaa bytes)
// Index: 1133/2560
char __cdecl KtiFn_FFC927EB(int __return_address, __int16 a2)
{
unsigned __int8 v2; // cl
unsigned __int8 v3; // bl
int v4; // esi
_DWORD *v5; // edx
int v6; // ebp
int n3; // eax
char v8; // di
int v9; // eax
_WORD v11[2]; // [esp+8h] [ebp-8h]
_WORD v12[2]; // [esp+Ch] [ebp-4h]
int n3_1; // [esp+18h] [ebp+8h]
v2 = 0; /*0xffc927f2*/
v12[0] = 0; /*0xffc92800*/
v11[0] = 0; /*0xffc92805*/
v3 = *(_BYTE *)(__return_address + 244317); /*0xffc9280a*/
if ( !v3 ) /*0xffc92812*/
return 1; /*0xffc9288a*/
v4 = 0; /*0xffc9281b*/
v5 = (_DWORD *)(50813 * (unsigned __int8)a2 + __return_address + 10241); /*0xffc9281e*/
v6 = v3; /*0xffc92820*/
do /*0xffc92858*/
{
n3 = 3; /*0xffc92825*/
v8 = 0; /*0xffc92826*/
n3_1 = 3; /*0xffc92828*/
do /*0xffc92852*/
{
if ( *v5 ) /*0xffc9282c*/
{
v9 = *((unsigned __int8 *)v12 + v4) | (1 << v8); /*0xffc92835*/
++*((_BYTE *)v11 + v4); /*0xffc92838*/
*((_BYTE *)v12 + v4) = v9; /*0xffc9283c*/
n3 = n3_1; /*0xffc92840*/
}
++v8; /*0xffc92844*/
v5 = (_DWORD *)((char *)v5 + 8077); /*0xffc92845*/
n3_1 = --n3; /*0xffc9284e*/
}
while ( n3 ); /*0xffc92852*/
++v4; /*0xffc92854*/
--v6; /*0xffc92855*/
}
while ( v6 ); /*0xffc92858*/
while ( *((_BYTE *)v11 + v2) == *((_BYTE *)v11 + v2 + 1) /*0xffc92882*/
&& (*(_BYTE *)(__return_address + 246412) || *((_BYTE *)v12 + v2) == *((_BYTE *)v12 + v2 + 1)) )
{
v2 += v3; /*0xffc92884*/
if ( v2 >= v3 ) /*0xffc92888*/
return 1; /*0xffc92888*/
}
return 0; /*0xffc9288c*/
}
// Function: KtiFn_FFC931EC @ 0xffc931ec (0xd9 bytes)
// Index: 1134/2560
int __cdecl KtiFn_FFC931EC(int a1, unsigned __int8 n0x17, unsigned int a3, int a4)
{
int v4; // edi
int n0x17_1; // ebp
int v6; // ebx
unsigned __int8 n0x17a_1; // al
char v8; // cl
int v9; // esi
int n64; // eax
char v12; // [esp+13h] [ebp-1h]
char n0x17a; // [esp+1Ch] [ebp+8h]
v4 = a1; /*0xffc931f1*/
DebugPrint(a1, 2, 255, 255, 255, 255, 255, 255, "<AdjustMemAddrMapRemote>\n"); /*0xffc93208*/
n0x17_1 = n0x17; /*0xffc9320d*/
v6 = 50813 * n0x17 + a1 + 58799; /*0xffc93221*/
n0x17a_1 = 0; /*0xffc93223*/
n0x17a = 0; /*0xffc93225*/
v8 = 0; /*0xffc93229*/
do
{
v9 = 19 * n0x17a_1; /*0xffc9322e*/
if ( !*(_BYTE *)(v9 + v6) ) /*0xffc93231*/
break; /*0xffc93235*/
if ( *(_BYTE *)(v9 + v6 + 17) != 2 || v8 )
{
v4 = a1; /*0xffc9324a*/
if ( *(_DWORD *)(v9 + v6 + 4) >= a3 )
{
DebugPrint(
a1,
2,
255,
255,
255,
255,
255,
255,
"\t Socket: %d , SadIndex; %d, Limit: %d, AdjustSize: %d \n",
n0x17_1,
n0x17a_1,
*(_DWORD *)(v9 + v6 + 4),
a4);
n64 = *(_DWORD *)(v9 + v6 + 4); /*0xffc93272*/
if ( n64 == 64 ) /*0xffc9327c*/
{
v12 = 0; /*0xffc9327e*/
}
else
{
*(_DWORD *)(v9 + v6 + 4) = n64 - a4; /*0xffc93289*/
v12 = 1; /*0xffc9328d*/
}
v8 = v12; /*0xffc93292*/
n0x17a_1 = n0x17a; /*0xffc93296*/
}
}
n0x17a = ++n0x17a_1; /*0xffc9329c*/
}
while ( n0x17a_1 < 0x18u );
return DebugPrint(v4, 2, 255, 255, 255, 255, 255, 255, "/<AdjustMemAddrMapRemote>\n"); /*0xffc932bf*/
}
// Function: MemChipFunc39BA @ 0xffc939ba (0x246 bytes)
// Index: 1135/2560
int __cdecl MemChipFunc39BA(int n4, int a2)
{
int n4_1; // esi
unsigned __int8 n4_2; // bl
int v4; // edi
_BYTE *v5; // ebp
int v6; // edi
unsigned __int8 n0x18; // cl
int n0x18_1; // ebp
int v9; // ebx
__int16 n2_1; // ax
unsigned __int16 v11; // ax
unsigned __int16 v12; // dx
unsigned __int8 v13; // al
unsigned __int16 v14; // ax
unsigned __int8 v15; // dl
int v16; // ebp
__int16 n2; // ax
int v18; // edx
int v19; // ecx
int v20; // edx
int v21; // ecx
char v23; // [esp+11h] [ebp-23h]
char n0x18_2; // [esp+12h] [ebp-22h]
char v25; // [esp+13h] [ebp-21h]
int v26; // [esp+18h] [ebp-1Ch]
int n4_3; // [esp+1Ch] [ebp-18h]
int v28; // [esp+20h] [ebp-14h]
int v29; // [esp+24h] [ebp-10h]
_BYTE *v30; // [esp+28h] [ebp-Ch]
v28 = 0; /*0xffc939bd*/
n4_1 = n4; /*0xffc939ca*/
n4_2 = 0; /*0xffc939ce*/
v4 = 0; /*0xffc939d3*/
v25 = 0; /*0xffc939d5*/
v5 = (_BYTE *)(n4 + 258716); /*0xffc939da*/
LOBYTE(n4_3) = 0; /*0xffc939e0*/
v26 = 0; /*0xffc939e5*/
v30 = (_BYTE *)(n4 + 258716); /*0xffc939e9*/
do /*0xffc93be2*/
{
DebugPrint(n4_1, 2, n4_3, 255, 255, 255, 255, 255, "\n<AdjustMemorySizeFieldsforMirror> \n"); /*0xffc93a09*/
if ( *(v5 - 27) && *v5 ) /*0xffc93a1b*/
{
v6 = n4_1 + v4 + 58799; /*0xffc93a2b*/
n0x18 = 0; /*0xffc93a2d*/
n0x18_2 = 0; /*0xffc93a2f*/
do /*0xffc93a33*/
{
n0x18_1 = n0x18; /*0xffc93a33*/
v9 = 19 * n0x18; /*0xffc93a36*/
if ( !*(_BYTE *)(v9 + v6) ) /*0xffc93a39*/
break; /*0xffc93a39*/
if ( *(_BYTE *)(v9 + v6 + 14) ) /*0xffc93a43*/
{
n2_1 = *(_WORD *)(v9 + v6 + 1); /*0xffc93a4e*/
if ( n2_1 == 1 || n2_1 == 2 ) /*0xffc93a61*/
{
if ( *(_BYTE *)(v9 + v6 + 16) ) /*0xffc93a67*/
{
if ( n0x18 ) /*0xffc93a74*/
{
v11 = *(_WORD *)(v9 + v6 + 4) - *(_WORD *)(v9 + v6 - 15); /*0xffc93a90*/
}
else if ( *(_DWORD *)(v6 + 4) == 64 ) /*0xffc93a7a*/
{
v11 = MemChipFunc4F27(n4_1); /*0xffc93a7d*/
}
else
{
v11 = *(_WORD *)(v6 + 4); /*0xffc93a85*/
}
v12 = v11; /*0xffc93aa4*/
v29 = n0x18_1 + v28; /*0xffc93aab*/
v13 = *(_BYTE *)(n0x18_1 + v28 + a2); /*0xffc93aaf*/
if ( v13 ) /*0xffc93ab4*/
{
v12 += v13; /*0xffc93ab9*/
v25 = 1; /*0xffc93abf*/
}
v14 = v12 / *(unsigned __int8 *)(v9 + v6 + 8); /*0xffc93acd*/
v15 = 0; /*0xffc93acf*/
v16 = v14; /*0xffc93ad1*/
v23 = 0; /*0xffc93ad4*/
if ( *(_BYTE *)(n4_1 + 244317) ) /*0xffc93ad8*/
{
while ( ((unsigned __int8)(1 << v15) & *(_BYTE *)(v9 + v6 + 13)) == 0 ) /*0xffc93af0*/
{
LABEL_27:
v23 = ++v15; /*0xffc93b89*/
if ( v15 >= *(_BYTE *)(n4_1 + 244317) ) /*0xffc93b93*/
goto LABEL_28; /*0xffc93b93*/
}
n2 = *(_WORD *)(v9 + v6 + 1); /*0xffc93af6*/
if ( n2 == 1 ) /*0xffc93b00*/
{
v18 = v26 + 768 * v15; /*0xffc93b0a*/
v19 = *(_DWORD *)(v18 + n4_1 + 59450) - v16; /*0xffc93b15*/
*(_DWORD *)(v18 + n4_1 + 59450) = v19; /*0xffc93b1b*/
n4_1 = n4; /*0xffc93b2a*/
if ( *(_BYTE *)(v29 + a2) ) /*0xffc93b26*/
*(_DWORD *)(v18 + n4 + 59450) = v19 & 0xFFFFFFF0; /*0xffc93b33*/
goto LABEL_25; /*0xffc93b3a*/
}
if ( n2 == 2 ) /*0xffc93b41*/
{
v20 = v26 + 768 * v15; /*0xffc93b4b*/
v21 = *(_DWORD *)(v20 + n4_1 + 59458) - v16; /*0xffc93b56*/
*(_DWORD *)(v20 + n4_1 + 59458) = v21; /*0xffc93b5c*/
n4_1 = n4; /*0xffc93b6b*/
if ( *(_BYTE *)(v29 + a2) ) /*0xffc93b67*/
*(_DWORD *)(v20 + n4 + 59458) = v21 & 0xFFFFFFF0; /*0xffc93b74*/
LABEL_25:
v15 = v23; /*0xffc93b7b*/
}
*(_DWORD *)(n4_1 + 9490) -= v16; /*0xffc93b81*/
goto LABEL_27; /*0xffc93b81*/
}
LABEL_28:
n0x18 = n0x18_2; /*0xffc93b99*/
}
}
}
n0x18_2 = ++n0x18; /*0xffc93b9f*/
}
while ( n0x18 < 0x18u ); /*0xffc93a33*/
n4_2 = n4_3; /*0xffc93bac*/
v5 = v30; /*0xffc93bb0*/
v4 = v26; /*0xffc93bb4*/
}
v28 += 24; /*0xffc93bb8*/
++n4_2; /*0xffc93bbd*/
v5 += 48704; /*0xffc93bbf*/
LOBYTE(n4_3) = n4_2; /*0xffc93bc5*/
v4 += 50813; /*0xffc93bc9*/
v30 = v5; /*0xffc93bcf*/
v26 = v4; /*0xffc93bd3*/
}
while ( n4_2 < 4u ); /*0xffc93be2*/
if ( v25 ) /*0xffc93bed*/
*(_DWORD *)(n4_1 + 9490) &= 0xFFFFFFF0; /*0xffc93bef*/
return 0; /*0xffc93bf6*/
}
// Function: MemChipFunc3D43 @ 0xffc93d43 (0x81 bytes)
// Index: 1136/2560
int __cdecl MemChipFunc3D43(int n6)
{
unsigned __int8 v1; // cl
unsigned __int8 i; // dl
int v3; // eax
if ( (*(_BYTE *)(n6 + 257310) & 0x41) != 0x41 ) /*0xffc93d53*/
return 1; /*0xffc93dbe*/
if ( (*(_BYTE *)(n6 + 257309) & 0x63) != 0 ) /*0xffc93d5c*/
{
v1 = 0; /*0xffc93d5e*/
while ( 2 ) /*0xffc93d63*/
{
for ( i = 0; i < 6u; ++i ) /*0xffc93d63*/
{
v3 = 48704 * v1 + 7688 * i; /*0xffc93d74*/
if ( *(_BYTE *)(v3 + n6 + 258722) && *(_BYTE *)(v3 + n6 + 258726) < 2u ) /*0xffc93d88*/
{
DebugPrint(n6, 2, 255, 255, 255, 255, 255, 255, "\n System doesn't satisfy the ADDDC X Mirroring support \n"); /*0xffc93daf*/
*(_BYTE *)(n6 + 257310) &= 0xBEu; /*0xffc93db7*/
return 1; /*0xffc93db7*/
}
}
if ( ++v1 < 4u ) /*0xffc93d96*/
continue; /*0xffc93d96*/
break;
}
}
return 0; /*0xffc93dc1*/
}
// Function: MemChipFunc3DC4 @ 0xffc93dc4 (0x2f2 bytes)
// Index: 1137/2560
int __cdecl MemChipFunc3DC4(_BYTE *__return_address)
{
unsigned __int8 v2; // bl
_BYTE *v3; // edi
unsigned __int8 n4_1; // bh
_BYTE *n4a_1; // edi
unsigned __int8 v6; // dl
_BYTE *v7; // eax
int n2; // ecx
char n2_1; // cl
_BYTE *v10; // ebp
unsigned int v11; // edi
unsigned int n2_2; // edx
_BYTE *n4a_2; // eax
unsigned __int8 v14; // dl
_BYTE *v15; // eax
char v16; // ch
bool v17; // zf
int result; // eax
char v19; // bl
char v20; // [esp+12h] [ebp-1Eh]
unsigned __int8 v21; // [esp+13h] [ebp-1Dh]
int n4; // [esp+14h] [ebp-1Ch]
_BYTE *n4a; // [esp+14h] [ebp-1Ch]
int n6; // [esp+1Ch] [ebp-14h]
_BYTE *v25; // [esp+20h] [ebp-10h]
int n4_2; // [esp+24h] [ebp-Ch]
unsigned __int8 v27; // [esp+34h] [ebp+4h]
v21 = 0; /*0xffc93dd1*/
v20 = 0; /*0xffc93dda*/
v27 = __return_address[145]; /*0xffc93de4*/
DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "\t setupRASModes = %d\n", v27); /*0xffc93dfa*/
v2 = __return_address[9472]; /*0xffc93dff*/
DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "\t supportedRASModesEx = %d\n", v2); /*0xffc93e17*/
v3 = __return_address + 258716; /*0xffc93e1f*/
n4_1 = 0; /*0xffc93e25*/
LOBYTE(n4) = 0; /*0xffc93e27*/
do /*0xffc93e99*/
{
if ( *(v3 - 27) ) /*0xffc93e2b*/
{
if ( *v3 ) /*0xffc93e31*/
{
if ( MemChipFunc8FDD((int)__return_address, n4, 1) == 2 ) /*0xffc93e47*/
{
DebugPrint((int)__return_address, 2, n4, 255, 255, 255, 255, 255, "\t Disable ADDDC DIMM Config BAD \n"); /*0xffc93e5a*/
v2 &= 0xB7u; /*0xffc93e62*/
if ( (char)__return_address[243581] >= 0 ) /*0xffc93e6c*/
{
DebugPrint((int)__return_address, 2, n4, 255, 255, 255, 255, 255, "\t Disable SDDC DIMM Config BAD \n"); /*0xffc93e7f*/
v2 &= ~1u; /*0xffc93e87*/
}
}
}
}
++n4_1; /*0xffc93e8a*/
v3 += 48704; /*0xffc93e8c*/
LOBYTE(n4) = n4_1; /*0xffc93e92*/
}
while ( n4_1 < 4u ); /*0xffc93e99*/
if ( (__return_address[1009] & 0x63) != 0 ) /*0xffc93ea2*/
{
DebugPrint( /*0xffc93eba*/
(int)__return_address,
2,
255,
255,
255,
255,
255,
255,
"\t Warning!! Mirror and ADDDC Cannot be enabled together! Will attempt to enable Mirroring only \n",
(unsigned __int8)__return_address[257310]);
v2 &= 0xB6u; /*0xffc93ec2*/
}
if ( __return_address[257314] == 1 ) /*0xffc93ecc*/
{
DebugPrint( /*0xffc93edc*/
(int)__return_address,
2,
255,
255,
255,
255,
255,
255,
"\tWarning!! AEP dimm Present, disabling Plus One\n");
v2 &= ~1u; /*0xffc93ee4*/
}
if ( KtiFuncE78((int)__return_address, 0, 3u) && __return_address[257243] == 1 )
{
n4_2 = 4; /*0xffc93f14*/
n4a_1 = __return_address + 258722; /*0xffc93f1c*/
v25 = __return_address + 258722; /*0xffc93f24*/
do
{
v6 = v21; /*0xffc93f2c*/
v7 = n4a_1 + 46128; /*0xffc93f30*/
n2 = 2; /*0xffc93f38*/
do /*0xffc93f46*/
{
if ( *v7 == 1 ) /*0xffc93f3c*/
++v6; /*0xffc93f3e*/
v7 += 29; /*0xffc93f40*/
--n2; /*0xffc93f43*/
}
while ( n2 ); /*0xffc93f46*/
n2_1 = 0; /*0xffc93f4d*/
v10 = &n4a_1[-258722 - (_DWORD)__return_address]; /*0xffc93f53*/
n4a = n4a_1; /*0xffc93f55*/
v11 = 0; /*0xffc93f59*/
v21 = v6; /*0xffc93f5d*/
n6 = 6; /*0xffc93f61*/
do
{
n2_2 = v11 % 3; /*0xffc93f6d*/
n2_1 = v11 % 3 == 0 ? 0 : n2_1;
n4a_2 = n4a; /*0xffc93f7e*/
if ( *n4a == 1 ) /*0xffc93f85*/
{
v14 = 0; /*0xffc93f87*/
while ( 1 ) /*0xffc93f92*/
{
v15 = &v10[1379 * v14]; /*0xffc93f92*/
if ( __return_address[(_DWORD)v15 + 259118] == 1 && !__return_address[(_DWORD)v15 + 259225] ) /*0xffc93f9e*/
break; /*0xffc93f9e*/
if ( ++v14 >= 2u ) /*0xffc93fad*/
goto LABEL_27; /*0xffc93fad*/
}
++n2_1; /*0xffc93fb1*/
LABEL_27:
n2_2 = v11 % 3; /*0xffc93fb3*/
n4a_2 = n4a; /*0xffc93fb7*/
}
if ( n2_1 == 2 && n2_2 == 2 ) /*0xffc93fc3*/
{
v16 = 1; /*0xffc93fc5*/
v20 = 1; /*0xffc93fc7*/
}
else
{
v16 = v20; /*0xffc93fcd*/
}
++v11; /*0xffc93fd6*/
v10 += 7688; /*0xffc93fd9*/
v17 = n6-- == 1; /*0xffc93fdb*/
n4a = n4a_2 + 7688; /*0xffc93fe0*/
}
while ( !v17 );
n4a_1 = v25 + 48704; /*0xffc93fee*/
v17 = n4_2-- == 1; /*0xffc93ff4*/
v25 += 48704; /*0xffc93ff9*/
}
while ( !v17 );
if ( v21 > 1u && v16 == 1 )
{
v2 &= 0xAAu; /*0xffc94022*/
DebugPrint(
(int)__return_address,
2,
255,
255,
255,
255,
255,
255,
"\t Disable ADDDC: more than 1 IMC and an IMC has exactly two channels populated\n");
DebugPrint(
(int)__return_address,
2,
255,
255,
255,
255,
255,
255,
"\t Disable SDDC: more than 1 IMC and an IMC has exactly two channels populated\n");
DebugPrint(
(int)__return_address,
2,
255,
255,
255,
255,
255,
255,
"\t Disable Patrol Scrub: more than 1 IMC and an IMC has exactly two channels populated\n");
}
}
__return_address[257310] = v27 & v2; /*0xffc9405e*/
result = DebugPrint( /*0xffc94076*/
(int)__return_address,
2,
255,
255,
255,
255,
255,
255,
"\t host->nvram.mem.RASmodeEx = %d\n",
(unsigned __int8)(v27 & v2));
v19 = v27 & ~v2; /*0xffc94080*/
if ( (v19 & 0x40) != 0 ) /*0xffc94085*/
result = KtiFunc211E((int)__return_address, 58, 1, 255, 255, 255, 255); /*0xffc94090*/
if ( (v19 & 1) != 0 ) /*0xffc9409b*/
return KtiFunc211E((int)__return_address, 59, 2, 255, 255, 255, 255); /*0xffc940a6*/
return result; /*0xffc940ae*/
}
// Function: MemChipFunc40B6 @ 0xffc940b6 (0x223 bytes)
// Index: 1138/2560
char __cdecl MemChipFunc40B6(int a1, unsigned __int8 a2)
{
char n2; // bl
int v4; // edx
unsigned __int8 n0x18; // bh
int n0x18_3; // esi
int v7; // edi
bool v8; // al
bool v9; // cl
__int16 n2_1; // ax
unsigned __int8 v11; // al
unsigned __int8 v12; // al
int v13; // eax
int v14; // eax
int v15; // ecx
char n2_3; // bh
int v17; // edi
int v18; // esi
char v19; // al
int n0x18_2; // edx
unsigned __int8 n2_6; // bh
int v22; // edx
int v23; // eax
unsigned __int8 v24; // al
int v25; // eax
int v26; // eax
char n2_5; // al
char n2_2; // [esp+10h] [ebp-18h]
char n2_4; // [esp+10h] [ebp-18h]
int v31; // [esp+18h] [ebp-10h]
int v32; // [esp+24h] [ebp-4h]
char n0x18_1; // [esp+2Ch] [ebp+4h]
n2 = 2; /*0xffc940ce*/
v4 = 50813 * a2 + a1 + 58799; /*0xffc940e9*/
n0x18 = 0; /*0xffc940eb*/
v31 = v4; /*0xffc940ed*/
n0x18_1 = 0; /*0xffc940f1*/
while ( 1 ) /*0xffc940f5*/
{
n0x18_3 = n0x18; /*0xffc940f5*/
v7 = 19 * n0x18; /*0xffc940f8*/
if ( !*(_BYTE *)(v7 + v4) ) /*0xffc940ff*/
return n2; /*0xffc940ff*/
v8 = MemChipFunc9C5C(*(_BYTE *)(v7 + v4 + 13)); /*0xffc9410b*/
v4 = v31; /*0xffc94110*/
v9 = v8; /*0xffc94115*/
n2_1 = *(_WORD *)(v7 + v31 + 1); /*0xffc94117*/
if ( n2_1 == 1 ) /*0xffc94121*/
{
v11 = *(_BYTE *)(v7 + v9 + v31 + 9); /*0xffc94128*/
goto LABEL_7; /*0xffc9412d*/
}
if ( n2_1 == 2 ) /*0xffc94134*/
break; /*0xffc94134*/
LABEL_40:
n0x18_1 = ++n0x18; /*0xffc942b9*/
if ( n0x18 >= 0x18u ) /*0xffc942c0*/
return n2; /*0xffc942c0*/
}
v11 = *(_BYTE *)(v7 + v9 + v31 + 11); /*0xffc9413f*/
LABEL_7:
v12 = MemChipFunc3551(v11); /*0xffc94144*/
if ( !v12 ) /*0xffc94151*/
{
n2 = 0; /*0xffc942aa*/
LABEL_38:
if ( n2 == 2 ) /*0xffc942b1*/
return n2; /*0xffc942b1*/
v4 = v31; /*0xffc942b3*/
goto LABEL_40; /*0xffc942b3*/
}
v13 = v12 - 1; /*0xffc94157*/
if ( !v13 ) /*0xffc9415a*/
return 2; /*0xffc942d6*/
v14 = v13 - 1; /*0xffc94160*/
if ( v14 ) /*0xffc94163*/
{
if ( v14 == 1 ) /*0xffc9416c*/
{
v15 = a2; /*0xffc94172*/
n2_3 = 0; /*0xffc94178*/
v17 = 8 * n0x18_3; /*0xffc9417a*/
n2_2 = 0; /*0xffc9417d*/
v18 = 0; /*0xffc94181*/
do /*0xffc941f3*/
{
if ( *(_BYTE *)(v17 + v18 + v15 * (*(unsigned __int8 *)(a1 + 244317) + 50813) + a1 + 59255) ) /*0xffc94196*/
{
if ( MemChipFunc42D9(a1, a2, n2_2, 0, 1u) == 1 ) /*0xffc941bc*/
{
v19 = MemChipFunc42D9(a1, a2, n2_2, 1u, 2u); /*0xffc941cc*/
v15 = a2; /*0xffc941d1*/
if ( v19 == 1 ) /*0xffc941dd*/
n2 = 1; /*0xffc941df*/
}
else
{
v15 = a2; /*0xffc941e3*/
}
}
++n2_3; /*0xffc941e7*/
++v18; /*0xffc941e9*/
n2_2 = n2_3; /*0xffc941ed*/
}
while ( (unsigned __int8)n2_3 < 2u ); /*0xffc941f3*/
LABEL_18:
n0x18 = n0x18_1; /*0xffc941f5*/
}
goto LABEL_38; /*0xffc941f9*/
}
n0x18_2 = n0x18; /*0xffc941fe*/
n2_6 = 0; /*0xffc94200*/
v22 = 8 * n0x18_2; /*0xffc94206*/
n2_4 = 0; /*0xffc94209*/
v32 = v22; /*0xffc9420d*/
while ( 1 )
{
if ( !*(_BYTE *)(n2_6 + v22 + a2 * (*(unsigned __int8 *)(a1 + 244317) + 50813) + a1 + 59255) ) /*0xffc94231*/
goto LABEL_35; /*0xffc94231*/
v23 = n2_6 + v7; /*0xffc94235*/
v24 = *(_WORD *)(v7 + v31 + 1) == 1 ? *(_BYTE *)(v23 + v31 + 9) : *(_BYTE *)(v23 + v31 + 11);
v25 = v24 - 3; /*0xffc9424d*/
if ( v25 ) /*0xffc94250*/
break; /*0xffc94250*/
n2_5 = MemChipFunc42D9(a1, a2, n2_4, 0, 1u); /*0xffc94271*/
LABEL_30:
if ( n2_5 == 1 || n2_5 == 2 ) /*0xffc94285*/
n2 = n2_5; /*0xffc94287*/
if ( n2 == 2 ) /*0xffc9428e*/
return n2; /*0xffc9428e*/
v22 = v32; /*0xffc94290*/
LABEL_35:
n2_4 = ++n2_6; /*0xffc94299*/
if ( n2_6 >= 2u ) /*0xffc9429f*/
goto LABEL_18; /*0xffc9429f*/
}
v26 = v25 - 2; /*0xffc94255*/
if ( !v26 ) /*0xffc94257*/
{
n2_5 = MemChipFunc42D9(a1, a2, n2_4, 0, 2u); /*0xffc94263*/
goto LABEL_30; /*0xffc94263*/
}
if ( v26 == 1 ) /*0xffc9425c*/
{
n2_5 = MemChipFunc42D9(a1, a2, n2_4, 1u, 2u); /*0xffc94260*/
goto LABEL_30; /*0xffc94260*/
}
return 2; /*0xffc942c8*/
}
// Function: MemChipFunc42D9 @ 0xffc942d9 (0x21d bytes)
// Index: 1139/2560
char __cdecl MemChipFunc42D9(int a1, unsigned __int8 a2, unsigned __int8 n2, unsigned __int8 a4, unsigned __int8 n2a)
{
unsigned __int8 n2a_1; // bl
char n2_1; // bh
int v7; // esi
int SocketInfo; // ecx
char v9; // dl
int v10; // edi
unsigned __int8 n2_2; // al
int v12; // edx
const char *Yes_n; // eax
unsigned __int8 v15; // bl
int v16; // [esp+Ch] [ebp-20h]
int v17; // [esp+10h] [ebp-1Ch]
int CpuCount; // [esp+14h] [ebp-18h]
int v19; // [esp+18h] [ebp-14h]
int v20; // [esp+1Ch] [ebp-10h]
int v21; // [esp+20h] [ebp-Ch]
int v22; // [esp+24h] [ebp-8h]
int v23; // [esp+34h] [ebp+8h]
unsigned __int8 n2_3; // [esp+3Ch] [ebp+10h]
n2a_1 = n2a; /*0xffc942e2*/
if ( n2 ) /*0xffc942e8*/
{
a4 += 3; /*0xffc942ea*/
n2a_1 = n2a + 3; /*0xffc942ef*/
n2a += 3; /*0xffc942f2*/
}
n2_1 = 1; /*0xffc942fa*/
v7 = a1; /*0xffc942fc*/
v16 = a2; /*0xffc94303*/
v20 = a1 + 48704 * a2 + 258689; /*0xffc94316*/
SocketInfo = GetSocketInfo(a1, a2); /*0xffc94321*/
v19 = 7688 * a4; /*0xffc94332*/
v9 = *(_BYTE *)(v19 + SocketInfo); /*0xffc94336*/
if ( v9 || *(_BYTE *)(7688 * n2a_1 + SocketInfo) ) /*0xffc94346*/
{
v21 = 7688 * n2a_1; /*0xffc9435c*/
if ( v9 == *(_BYTE *)(v21 + SocketInfo) ) /*0xffc94363*/
{
CpuCount = GetCpuCount(a1, a2, a4); /*0xffc9437c*/
v10 = GetCpuCount(a1, a2, n2a); /*0xffc9438f*/
v23 = v10; /*0xffc9439c*/
v17 = a1 + 50813 * v16 + 8077 * a4; /*0xffc943a4*/
v22 = a1 + 50813 * v16 + 8077 * n2a_1; /*0xffc943b6*/
n2_2 = 0; /*0xffc943ba*/
n2_3 = 0; /*0xffc943bc*/
while ( 1 ) /*0xffc943c0*/
{
v7 = a1; /*0xffc943c0*/
v12 = 1379 * n2_2; /*0xffc943cb*/
if ( *(_BYTE *)(v12 + v10) == *(_BYTE *)(v12 + CpuCount) ) /*0xffc943ef*/
{
if ( *(_BYTE *)(v12 + CpuCount + 107) ) /*0xffc94459*/
{
if ( *(_WORD *)(v12 + CpuCount + 1329) != *(_WORD *)(v12 + v10 + 1329) ) /*0xffc94470*/
break; /*0xffc94470*/
}
else
{
if ( *(_WORD *)(2688 * n2_2 + v17 + 12578) != *(_WORD *)(2688 * n2_2 + v22 + 12578) ) /*0xffc94492*/
break; /*0xffc94492*/
v15 = 0; /*0xffc94498*/
while ( 1 ) /*0xffc944b9*/
{
v7 = a1; /*0xffc944b9*/
if ( *(_BYTE *)(242 * v15 + v20 + 1379 * n2_2 + v21 + 653) != *(_BYTE *)(242 * v15 /*0xffc944bd*/
+ v20
+ 1379 * n2_2
+ v19
+ 653) )
break; /*0xffc944bd*/
v10 = v23; /*0xffc944c2*/
if ( *(_BYTE *)(v15 + v12 + v23 + 15) != *(_BYTE *)(v15 + v12 + CpuCount + 15) ) /*0xffc944ce*/
goto LABEL_25; /*0xffc944ce*/
if ( ++v15 >= 4u ) /*0xffc944d5*/
goto LABEL_26; /*0xffc944d5*/
}
v10 = v23; /*0xffc944d9*/
LABEL_25:
n2_1 = 2; /*0xffc944dd*/
}
}
else if ( !*(_BYTE *)(v12 + CpuCount + 107) && !*(_BYTE *)(v12 + v10 + 107) ) /*0xffc943fc*/
{
break; /*0xffc94401*/
}
LABEL_26:
n2_2 = n2_3 + 1; /*0xffc944df*/
n2_3 = n2_2; /*0xffc944e5*/
if ( n2_2 >= 2u ) /*0xffc944eb*/
goto LABEL_12; /*0xffc944eb*/
}
}
n2_1 = 2; /*0xffc94407*/
}
else
{
n2_1 = 0; /*0xffc9434b*/
}
LABEL_12:
DebugPrint(v7, 2, 255, 255, 255, 255, 255, 255, "\nCheckMirrorPopulation (Socket = %d, Imc = %d) - ", v16, n2); /*0xffc9440a*/
Yes_n = "Yes\n"; /*0xffc9442f*/
if ( n2_1 != 1 ) /*0xffc94437*/
Yes_n = "No\n"; /*0xffc94439*/
DebugPrint(v7, 2, 255, 255, 255, 255, 255, 255, Yes_n); /*0xffc94448*/
return n2_1; /*0xffc94452*/
}
// Function: MemChipFunc44F6 @ 0xffc944f6 (0x22a bytes)
// Index: 1140/2560
int __cdecl MemChipFunc44F6(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // edi
_BYTE *SocketInfo_1; // ecx
unsigned __int8 n6_3; // bl
unsigned __int8 n6_2; // al
int n117457024; // ecx
int v6; // eax
int n2_1; // esi
int v8; // edx
int v9; // esi
unsigned __int8 v10; // cl
int CpuCount_1; // edx
int v12; // eax
int v13; // eax
_BYTE *SocketInfo_3; // esi
unsigned __int8 v16; // [esp+13h] [ebp-31h]
int n6; // [esp+14h] [ebp-30h]
int v18; // [esp+18h] [ebp-2Ch]
int CpuCount; // [esp+1Ch] [ebp-28h]
int v20; // [esp+20h] [ebp-24h]
int n2; // [esp+24h] [ebp-20h]
int v22; // [esp+28h] [ebp-1Ch]
int n117457024_1; // [esp+2Ch] [ebp-18h]
int n6_1; // [esp+30h] [ebp-14h]
_BYTE *SocketInfo_2; // [esp+34h] [ebp-10h]
int v26; // [esp+3Ch] [ebp-8h]
int SocketInfo; // [esp+40h] [ebp-4h]
__return_address_1 = __return_address; /*0xffc944fd*/
LOBYTE(n6_1) = __return_address[9402]; /*0xffc94507*/
SocketInfo = GetSocketInfo((int)__return_address, n6_1); /*0xffc9451a*/
DdrTrainFunc2AC5(__return_address, n6_1); /*0xffc9451e*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffc94526*/
n6_3 = 0; /*0xffc94528*/
SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffc9452a*/
n6_2 = 0; /*0xffc9452e*/
LOBYTE(n6) = 0; /*0xffc94530*/
do
{
if ( *SocketInfo_1 )
{
CpuCount = GetCpuCount((int)__return_address_1, n6_1, n6); /*0xffc94548*/
n117457024 = 117457024; /*0xffc9454c*/
v6 = 0; /*0xffc94551*/
n2 = 2; /*0xffc94553*/
n2_1 = 2; /*0xffc9455b*/
v22 = 0; /*0xffc94562*/
v8 = 0; /*0xffc94566*/
v18 = 0; /*0xffc94568*/
v20 = 0; /*0xffc9456c*/
n117457024_1 = 117457024; /*0xffc94570*/
do /*0xffc94698*/
{
__return_address_1 = __return_address; /*0xffc9457c*/
if ( *(_BYTE *)(v6 + CpuCount) ) /*0xffc94578*/
{
v9 = MiscConfigCheck(__return_address, n6_1, n6, n117457024); /*0xffc94592*/
v10 = 0; /*0xffc9459c*/
v16 = 0; /*0xffc945a4*/
v26 = 50813 * (unsigned __int8)n6_1; /*0xffc945a8*/
if ( __return_address[v26 + 10194] ) /*0xffc945ac*/
{
CpuCount_1 = CpuCount; /*0xffc945be*/
do /*0xffc94662*/
{
if ( *(_BYTE *)(v20 + v10 + CpuCount_1 + 15) ) /*0xffc945cb*/
{
if ( (BYTE2(v9) & (unsigned __int8)(1 << v10) & 0xF) == 0 ) /*0xffc945e5*/
{
v22 |= 1 << (v10 + v18); /*0xffc945ff*/
v12 = MiscConfigCheck(__return_address, n6_1, n6, 117457036); /*0xffc94603*/
v13 = (v12 ^ (v12 | ((unsigned __int8)v22 << 15))) & 0x78000 ^ v12; /*0xffc9461c*/
MiscIoCheck( /*0xffc94641*/
__return_address,
n6_1,
n6,
0x700408Cu,
v13 ^ (v13 ^ (v13 | (BYTE1(v22) << 19))) & 0x780000);
}
CpuCount_1 = CpuCount; /*0xffc94649*/
v10 = v16; /*0xffc9464d*/
}
v16 = ++v10; /*0xffc94657*/
}
while ( v10 < __return_address[v26 + 10194] ); /*0xffc94662*/
n6_3 = 0; /*0xffc94668*/
}
n2_1 = n2; /*0xffc9466a*/
v8 = v18; /*0xffc9466e*/
n117457024 = n117457024_1; /*0xffc94672*/
v6 = v20; /*0xffc94676*/
}
n117457024 += 4; /*0xffc9467a*/
v6 += 1379; /*0xffc9467d*/
v8 += 8; /*0xffc94682*/
n117457024_1 = n117457024; /*0xffc94685*/
--n2_1; /*0xffc94689*/
v20 = v6; /*0xffc9468c*/
v18 = v8; /*0xffc94690*/
n2 = n2_1; /*0xffc94694*/
}
while ( n2_1 ); /*0xffc94698*/
DebugPrint((int)__return_address, 2, n6_1, n6, 2, 255, 255, 255, "DimmAmap: 0x%x\n", v22);
n6_2 = n6; /*0xffc946be*/
SocketInfo_1 = SocketInfo_2; /*0xffc946c5*/
}
++n6_2; /*0xffc946c9*/
SocketInfo_1 += 7688; /*0xffc946cb*/
LOBYTE(n6) = n6_2; /*0xffc946d1*/
SocketInfo_2 = SocketInfo_1; /*0xffc946d5*/
}
while ( n6_2 < 6u );
if ( (__return_address_1[257309] & 8) != 0 ) /*0xffc946e8*/
{
SocketInfo_3 = (_BYTE *)SocketInfo; /*0xffc946ea*/
LOBYTE(n6) = 0; /*0xffc946ee*/
do /*0xffc94714*/
{
if ( *SocketInfo_3 ) /*0xffc946f2*/
DimmSpareRankConfig((int)__return_address_1, n6_1, n6); /*0xffc946fd*/
++n6_3; /*0xffc94705*/
SocketInfo_3 += 7688; /*0xffc94707*/
LOBYTE(n6) = n6_3; /*0xffc9470d*/
}
while ( n6_3 < 6u ); /*0xffc94714*/
}
return 0; /*0xffc94716*/
}
// Function: MemChipFunc4720 @ 0xffc94720 (0xdd bytes)
// Index: 1141/2560
char __cdecl MemChipFunc4720(int a1, int a2, unsigned __int8 a3)
{
int v3; // edi
bool v5; // al
__int16 n2; // ax
const char *SAD_Not_Local:_%d_n; // [esp-8h] [ebp-14h]
int v8; // [esp-4h] [ebp-10h]
v3 = 19 * a3; /*0xffc9472d*/
if ( !*(_BYTE *)(v3 + a2) )
{
DebugPrint(a1, 2, 255, 255, 255, 255, 255, 255, "SAD Not Enabled: %d\n", a3);
return 0; /*0xffc94756*/
}
if ( *(_BYTE *)(v3 + a2 + 14) != 1 )
{
v8 = a3; /*0xffc94764*/
SAD_Not_Local:_%d_n = "SAD Not Local: %d\n";
LABEL_5:
DebugPrint(a1, 2, 255, 255, 255, 255, 255, 255, SAD_Not_Local:_%d_n, v8); /*0xffc9476a*/
return 1; /*0xffc94785*/
}
if ( *(_BYTE *)(v3 + a2 + 17) == 2 ) /*0xffc9478c*/
{
v8 = a3; /*0xffc9478e*/
SAD_Not_Local:_%d_n = "Cannot mirror Non Existant Mem %d\n"; /*0xffc9478f*/
goto LABEL_5; /*0xffc94794*/
}
v5 = MemChipFunc9C5C(*(_BYTE *)(v3 + a2 + 13)); /*0xffc9479c*/
if ( MemChipFunc3551(*(_BYTE *)(v3 + v5 + a2 + 9)) == 1 ) /*0xffc947b8*/
{
v8 = a3; /*0xffc947ba*/
SAD_Not_Local:_%d_n = "SAD %d is single chway\n"; /*0xffc947bb*/
goto LABEL_5; /*0xffc947c0*/
}
n2 = *(_WORD *)(v3 + a2 + 1); /*0xffc947c2*/
if ( n2 != 1 && n2 != 2 ) /*0xffc947d2*/
{
v8 = a3; /*0xffc947d4*/
SAD_Not_Local:_%d_n = "SAD %d is not 1LM or 2LM\n"; /*0xffc947d5*/
goto LABEL_5; /*0xffc947e6*/
}
if ( *(_BYTE *)(v3 + a2 + 16) == 1 )
{
v8 = a3; /*0xffc947ee*/
SAD_Not_Local:_%d_n = "SAD: %d is already mirrored\n";
goto LABEL_5; /*0xffc947f4*/
}
return 2; /*0xffc947f8*/
}
// Function: MemChipFunc47FD @ 0xffc947fd (0x1b0 bytes)
// Index: 1142/2560
char __cdecl MemChipFunc47FD(int __return_address)
{
char n2; // cl
unsigned __int8 n4_1; // bl
int v3; // eax
int SocketInfo; // eax
unsigned __int8 n6; // bh
int n6_2; // ebp
int v7; // edi
int CpuCount; // edx
char n2_2; // cl
unsigned __int8 v10; // bh
int v11; // eax
unsigned __int8 n2_4; // bh
unsigned __int8 n4; // bl
bool v14; // zf
const char *Yes_n; // eax
char n2_5; // [esp+11h] [ebp-23h]
unsigned __int8 n2_3; // [esp+12h] [ebp-22h]
char n2_1; // [esp+13h] [ebp-21h]
char n4_3; // [esp+14h] [ebp-20h]
unsigned __int8 v21; // [esp+18h] [ebp-1Ch]
char n6_1; // [esp+1Ch] [ebp-18h]
int SocketInfo_1; // [esp+20h] [ebp-14h]
unsigned __int8 v24; // [esp+24h] [ebp-10h]
int CpuCount_1; // [esp+28h] [ebp-Ch]
int n6_3; // [esp+2Ch] [ebp-8h]
int n4_2; // [esp+30h] [ebp-4h]
n2 = 2; /*0xffc94807*/
n4_1 = 0; /*0xffc94809*/
n2_1 = 2; /*0xffc9480b*/
n4_3 = 0; /*0xffc94810*/
while ( 2 ) /*0xffc94814*/
{
n4_2 = n4_1; /*0xffc94814*/
v3 = 48704 * n4_1; /*0xffc9481b*/
if ( !*(_BYTE *)(v3 + __return_address + 258689) || !*(_BYTE *)(v3 + __return_address + 258716) ) /*0xffc9482f*/
goto LABEL_25; /*0xffc94837*/
SocketInfo = GetSocketInfo(__return_address, n4_3); /*0xffc94842*/
n6 = 0; /*0xffc94848*/
SocketInfo_1 = SocketInfo; /*0xffc9484a*/
n6_1 = 0; /*0xffc9484f*/
while ( 1 ) /*0xffc94853*/
{
n6_2 = n6; /*0xffc94853*/
v7 = 7688 * n6; /*0xffc94856*/
n6_3 = n6; /*0xffc9485c*/
if ( *(_BYTE *)(v7 + SocketInfo) ) /*0xffc94860*/
break; /*0xffc94860*/
LABEL_22:
n6_1 = ++n6; /*0xffc94976*/
if ( n6 >= 6u ) /*0xffc9497d*/
{
n2 = n2_1; /*0xffc94983*/
goto LABEL_24; /*0xffc94983*/
}
}
CpuCount = GetCpuCount(__return_address, n4_3, n6_1); /*0xffc94878*/
n2_2 = 0; /*0xffc9487a*/
CpuCount_1 = CpuCount; /*0xffc9487e*/
n2_3 = 0; /*0xffc94882*/
n2_5 = 0; /*0xffc9488d*/
v21 = 0; /*0xffc94891*/
if ( !*(_BYTE *)(v7 + SocketInfo_1 + 3) ) /*0xffc94895*/
goto LABEL_19; /*0xffc94895*/
v10 = 0; /*0xffc9489f*/
do /*0xffc94913*/
{
v11 = 1379 * v10; /*0xffc948a6*/
if ( *(_BYTE *)(v11 + CpuCount) && *(_BYTE *)(v11 + CpuCount + 107) != 1 ) /*0xffc948b7*/
{
n2_4 = n2_3; /*0xffc948b9*/
n4 = 0; /*0xffc948bd*/
v24 = 0; /*0xffc948bf*/
do /*0xffc948ed*/
{
if ( !KtiFunc89E9(__return_address, n4_3, n6_1, v21, v24, 1) ) /*0xffc948d6*/
++n2_4; /*0xffc948e2*/
v24 = ++n4; /*0xffc948e6*/
}
while ( n4 < 4u ); /*0xffc948ed*/
n2_2 = n2_5; /*0xffc948ef*/
v14 = n2_4 == 0; /*0xffc948f3*/
CpuCount = CpuCount_1; /*0xffc948f5*/
n2_3 = n2_4; /*0xffc948f9*/
v10 = v21; /*0xffc948fd*/
if ( !v14 ) /*0xffc94901*/
n2_2 = ++n2_5; /*0xffc94903*/
}
v21 = ++v10; /*0xffc9490b*/
}
while ( v10 < *(_BYTE *)(v7 + SocketInfo_1 + 3) ); /*0xffc94913*/
n4_1 = n4_3; /*0xffc94915*/
n6 = n6_1; /*0xffc94919*/
n6_2 = n6_3; /*0xffc9491d*/
if ( n2_2 != 2 && n2_3 < 2u ) /*0xffc9492b*/
{
LABEL_19:
DebugPrint( /*0xffc94945*/
__return_address,
2,
255,
255,
255,
255,
255,
255,
"\nCheckSparingPopulation (Socket = %d, ch = %d) - ",
n4_2,
n6_2);
Yes_n = "Yes\n"; /*0xffc9494d*/
if ( n2_1 != 1 ) /*0xffc94957*/
Yes_n = "No\n"; /*0xffc94959*/
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, Yes_n); /*0xffc94968*/
SocketInfo = SocketInfo_1; /*0xffc9496d*/
goto LABEL_22; /*0xffc9496d*/
}
n2 = 1; /*0xffc949a5*/
n2_1 = 1; /*0xffc949a7*/
LABEL_24:
if ( n2 != 1 ) /*0xffc9498a*/
{
LABEL_25:
n4_3 = ++n4_1; /*0xffc9498e*/
if ( n4_1 >= 4u ) /*0xffc94995*/
return n2; /*0xffc94995*/
continue; /*0xffc94995*/
}
return n2; /*0xffc9499b*/
}
}
// Function: MemChipFunc49AD @ 0xffc949ad (0x1db bytes)
// Index: 1143/2560
int __cdecl MemChipFunc49AD(int __return_address, int n4)
{
int v2; // ebx
int v3; // ecx
char v4; // dh
unsigned __int8 n6; // dl
int v6; // ecx
unsigned __int8 v7; // dl
int v8; // edi
unsigned __int8 n2; // al
int v10; // edi
unsigned __int8 v11; // dh
char v13; // [esp+12h] [ebp-Eh]
unsigned __int8 n2_1; // [esp+13h] [ebp-Dh]
int n6_1; // [esp+14h] [ebp-Ch]
v2 = 0; /*0xffc949b5*/
v3 = 48704 * (unsigned __int8)n4; /*0xffc949bb*/
v4 = 0; /*0xffc949c1*/
n6 = 0; /*0xffc949c8*/
v13 = 0; /*0xffc949cb*/
LOBYTE(n6_1) = 0; /*0xffc949d4*/
while ( 1 )
{
v6 = 7688 * n6 + v3; /*0xffc949e9*/
if ( !*(_BYTE *)(v6 + __return_address + 258722) ) /*0xffc949f2*/
goto LABEL_28; /*0xffc949f2*/
if ( (*(_BYTE *)(v6 + __return_address + 258724) & 8) != 0 ) /*0xffc94a00*/
{
v4 = 1; /*0xffc94a02*/
v13 = 1; /*0xffc94a04*/
}
if ( *(_BYTE *)(v6 + __return_address + 259118) == 1 && *(_BYTE *)(v6 + __return_address + 260497) == 1 ) /*0xffc94a1e*/
break; /*0xffc94a1e*/
n2 = 0; /*0xffc94a9a*/
n2_1 = 0; /*0xffc94a9c*/
while ( 1 ) /*0xffc94aa9*/
{
v10 = 1379 * n2 + v6; /*0xffc94aa9*/
if ( *(_BYTE *)(v10 + __return_address + 259118) ) /*0xffc94aac*/
break; /*0xffc94aac*/
LABEL_25:
n2 = n2_1 + 1; /*0xffc94af6*/
n2_1 = n2; /*0xffc94afc*/
if ( n2 >= 2u ) /*0xffc94b02*/
{
v4 = v13; /*0xffc94b04*/
goto LABEL_27; /*0xffc94b04*/
}
}
if ( *(_BYTE *)(v10 + __return_address + 259225) != 1 ) /*0xffc94abd*/
{
if ( *(_BYTE *)(v10 + __return_address + 259137) > 1u ) /*0xffc94ac7*/
{
v11 = 0; /*0xffc94acd*/
while ( !*(_BYTE *)(v10 + 242 * v11 + __return_address + 259342) /*0xffc94aed*/
|| !*(_BYTE *)(v10 + v11 + __return_address + 259133) )
{
if ( ++v11 >= 4u ) /*0xffc94af4*/
goto LABEL_25; /*0xffc94af4*/
}
}
return 1; /*0xffc94aed*/
}
DebugPrint(
__return_address,
2,
n4,
n6_1,
255,
255,
255,
255,
"CheckSvlsCfgSupport: AEP dimm in this channel:%d skipping the channel\n",
n6);
n6 = n6_1; /*0xffc94b47*/
v4 = 0; /*0xffc94b4b*/
v13 = 0; /*0xffc94b50*/
LABEL_27:
if ( v4 ) /*0xffc94b0f*/
return 1; /*0xffc94b0f*/
LABEL_28:
LOBYTE(n6_1) = ++n6; /*0xffc94b13*/
if ( n6 >= 6u ) /*0xffc94b1a*/
return v2; /*0xffc94b1a*/
v3 = 48704 * (unsigned __int8)n4; /*0xffc94b1c*/
}
if ( *(_BYTE *)(v6 + __return_address + 259225) || *(_BYTE *)(v6 + __return_address + 260604) )
{
DebugPrint(
__return_address,
2,
n4,
n6_1,
255,
255,
255,
255,
"CheckSvlsCfgSupport: Both AEP and DDR4 dimm on same channel:%d No VLS\n",
n6);
return 1; /*0xffc94b7e*/
}
if ( *(_BYTE *)(v6 + __return_address + 259137) == *(_BYTE *)(v6 + __return_address + 260516) ) /*0xffc94a48*/
{
v7 = 0; /*0xffc94a4e*/
while ( 1 ) /*0xffc94a59*/
{
v8 = v6 + 242 * v7; /*0xffc94a59*/
if ( *(_BYTE *)(v8 + __return_address + 259342) ) /*0xffc94a5b*/
{
if ( *(_BYTE *)(v6 + v7 + __return_address + 259133) ) /*0xffc94a67*/
break; /*0xffc94a67*/
}
if ( *(_BYTE *)(v8 + __return_address + 260721) && *(_BYTE *)(v6 + v7 + __return_address + 260512) ) /*0xffc94a80*/
break; /*0xffc94a80*/
if ( ++v7 >= 4u ) /*0xffc94a92*/
{
n6 = n6_1; /*0xffc94a94*/
goto LABEL_27; /*0xffc94a98*/
}
}
}
return 1; /*0xffc94b80*/
}
// Function: MemChipFunc4B88 @ 0xffc94b88 (0x33 bytes)
// Index: 1144/2560
_DWORD *__cdecl MemChipFunc4B88(int n4, int a2, _DWORD *a3)
{
_DWORD *result; // eax
result = (_DWORD *)a2; /*0xffc94b88*/
if ( *(_BYTE *)(a2 + 16) == 1 )
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "\n<ConfigMesh2MemCsrForMirrorRASHook: Setting mirror bit>\n");
*a3 |= 0x80000u; /*0xffc94bb4*/
return a3; /*0xffc94bad*/
}
return result; /*0xffc94bba*/
}
// Function: MemChipFunc4BBB @ 0xffc94bbb (0x121 bytes)
// Index: 1145/2560
int __cdecl MemChipFunc4BBB(unsigned __int8 *n6, int n4)
{
unsigned __int8 n4_1; // cl
unsigned __int8 *n6_1; // edx
unsigned __int8 n6_2; // bl
int v5; // ebp
int result; // eax
unsigned __int8 *v7; // edi
int v8; // eax
int v9; // eax
int v10; // eax
int v11; // eax
int v12; // [esp+10h] [ebp-Ch]
int v13; // [esp+18h] [ebp-4h]
n4_1 = n4; /*0xffc94bbe*/
n6_1 = n6; /*0xffc94bc2*/
n6_2 = 0; /*0xffc94bca*/
v5 = 0; /*0xffc94bd1*/
result = 48704 * (unsigned __int8)n4; /*0xffc94bd3*/
LOBYTE(v13) = 0; /*0xffc94be1*/
v12 = 0; /*0xffc94be5*/
v7 = &n6[result + 258722]; /*0xffc94be9*/
do
{
if ( *v7 )
{
v8 = MiscConfigCheck(n6_1, n4_1, v13, 184633088); /*0xffc94c00*/
MiscIoCheck(n6, n4, v13, 0xB014700u, v8 | 4); /*0xffc94c18*/
v9 = MiscConfigCheck(n6, n4, v13, 184633088); /*0xffc94c28*/
DebugPrint(
(int)n6,
2,
n4,
255,
255,
255,
255,
255,
"DisableParityCheck: Socket = %d ch = %d MC0DpChknBit = %x\n",
(unsigned __int8)n4,
v12,
v9);
v10 = MiscConfigCheck(n6, n4, v13, 117525080); /*0xffc94c62*/
MiscIoCheck(n6, n4, v13, 0x7014A58u, v10 | 0x40000); /*0xffc94c78*/
v11 = MiscConfigCheck(n6, n4, v13, 117525080); /*0xffc94c89*/
result = DebugPrint(
(int)n6,
2,
n4,
255,
255,
255,
255,
255,
"DisableParityCheck: Socket = %d ch = %d WdbParErrCtl = %x\n",
(unsigned __int8)n4,
v12,
v11);
n4_1 = n4; /*0xffc94caf*/
v5 = v12; /*0xffc94cb4*/
n6_1 = n6; /*0xffc94cb8*/
}
++n6_2; /*0xffc94cba*/
v7 += 7688; /*0xffc94cbc*/
++v5; /*0xffc94cc2*/
LOBYTE(v13) = n6_2; /*0xffc94cc3*/
v12 = v5; /*0xffc94cc7*/
}
while ( n6_2 < 6u );
return result; /*0xffc94cd4*/
}
// Function: MemChipFunc4CDC @ 0xffc94cdc (0x24b bytes)
// Index: 1146/2560
void __cdecl MemChipFunc4CDC(_BYTE *a1, int a2)
{
_BYTE *v2; // ebp
_BYTE *v3; // esi
unsigned __int8 n4_1; // bh
_BYTE *v5; // ecx
int v6; // eax
unsigned __int8 n0x18; // bl
int v8; // edi
bool v9; // al
unsigned __int8 v10; // al
unsigned __int8 v11; // dl
int n64; // ebp
unsigned int v13; // ebp
int v14; // edx
int v15; // eax
char v16; // cl
int v17; // eax
char v18; // [esp+Bh] [ebp-21h]
int v19; // [esp+Ch] [ebp-20h]
unsigned __int8 v20; // [esp+10h] [ebp-1Ch]
int v21; // [esp+14h] [ebp-18h]
unsigned int v22; // [esp+18h] [ebp-14h]
unsigned int v23; // [esp+18h] [ebp-14h]
unsigned __int8 n0x17; // [esp+1Ch] [ebp-10h]
unsigned __int8 n4; // [esp+20h] [ebp-Ch]
_BYTE *v26; // [esp+24h] [ebp-8h]
_BYTE *v27; // [esp+28h] [ebp-4h]
v2 = a1; /*0xffc94ce1*/
v22 = 0; /*0xffc94ce7*/
v20 = 0; /*0xffc94ceb*/
if ( a1[257254] == 1 ) /*0xffc94cf6*/
{
DebugPrint((int)a1, 2, 255, 255, 255, 255, 255, 255, "<DoSncGBAlignmentForMirror>\n"); /*0xffc94d11*/
v3 = a1 + 58799; /*0xffc94d19*/
v27 = a1 + 58799; /*0xffc94d21*/
n4_1 = 0; /*0xffc94d25*/
v5 = a1 + 258689; /*0xffc94d27*/
v6 = 0; /*0xffc94d2d*/
n4 = 0; /*0xffc94d2f*/
v19 = 0; /*0xffc94d33*/
v26 = a1 + 258689; /*0xffc94d37*/
while ( !*v5 || !*v3 ) /*0xffc94d47*/
{
LABEL_34:
++n4_1; /*0xffc94ef5*/
v5 += 48704; /*0xffc94ef7*/
v3 += 50813; /*0xffc94efd*/
n4 = n4_1; /*0xffc94f03*/
v6 += 24; /*0xffc94f07*/
v26 = v5; /*0xffc94f0a*/
v27 = v3; /*0xffc94f0e*/
v19 = v6; /*0xffc94f12*/
if ( n4_1 >= 4u ) /*0xffc94f19*/
return; /*0xffc94f19*/
}
n0x18 = 0; /*0xffc94d4d*/
n0x17 = 0; /*0xffc94d4f*/
while ( 1 ) /*0xffc94d56*/
{
v8 = 19 * n0x18; /*0xffc94d56*/
if ( !v3[v8] ) /*0xffc94d61*/
{
LABEL_33:
v6 = v19; /*0xffc94eed*/
v5 = v26; /*0xffc94ef1*/
goto LABEL_34; /*0xffc94ef1*/
}
if ( v3[v8 + 14] /*0xffc94daa*/
&& v3[v8 + 17] != 2
&& ((*(_DWORD *)(v2 + 130) & 0x4000) != 0 || *(_DWORD *)&v3[v8 + 4] > v22)
&& (!n0x18 || *(_DWORD *)&v3[v8 - 15] == 64) )
{
break; /*0xffc94daa*/
}
LABEL_32:
n0x17 = ++n0x18; /*0xffc94ee0*/
if ( n0x18 >= 0x18u ) /*0xffc94ee7*/
goto LABEL_33; /*0xffc94ee7*/
}
v18 = v3[v8 + 8]; /*0xffc94db4*/
v9 = MemChipFunc9C5C(v3[v8 + 13]); /*0xffc94dbe*/
if ( *(_WORD *)&v3[v8 + 1] == 1 ) /*0xffc94dcc*/
{
v10 = v3[v9 + 9 + v8]; /*0xffc94e00*/
}
else
{
if ( *(_WORD *)&v3[v8 + 1] != 2 /*0xffc94dee*/
&& *(_WORD *)&v3[v8 + 1] != 4
&& *(_WORD *)&v3[v8 + 1] != 8
&& *(_WORD *)&v3[v8 + 1] != 16
&& *(_WORD *)&v3[v8 + 1] != 32
&& *(_WORD *)&v3[v8 + 1] != 260 )
{
LABEL_23:
v11 = v18 * MemChipFunc3551(v20); /*0xffc94e08*/
if ( (unsigned int)*(unsigned __int16 *)&v3[v8 + 1] - 1 <= 1 ) /*0xffc94e26*/
{
n64 = *(_DWORD *)&v3[v8 + 4]; /*0xffc94e2c*/
if ( n64 == 64 ) /*0xffc94e33*/
{
v2 = a1; /*0xffc94ed8*/
}
else
{
v13 = n64 & 0xFFFFFFF0; /*0xffc94e3d*/
*(_BYTE *)(n0x18 + v19 + a2) = v3[v8 + 4] & 0xF; /*0xffc94e51*/
v23 = v11; /*0xffc94e5c*/
v3 = v27; /*0xffc94e62*/
if ( !(v11 % 3u) && n0x18 && (v13 - *(_DWORD *)&v27[v8 - 15]) % v11 ) /*0xffc94e76*/
{
v14 = a2; /*0xffc94e84*/
v15 = n0x18 + v19; /*0xffc94e88*/
v21 = v15; /*0xffc94e8a*/
v16 = *(_BYTE *)(v15 + a2); /*0xffc94e8e*/
do /*0xffc94ea2*/
{
v16 += 16; /*0xffc94e91*/
v13 -= 16; /*0xffc94e94*/
*(_BYTE *)(v15 + v14) = v16; /*0xffc94e97*/
v15 = v21; /*0xffc94ea6*/
v14 = a2; /*0xffc94eac*/
}
while ( (v13 - *(_DWORD *)&v27[v8 - 15]) % v23 ); /*0xffc94ea2*/
}
v17 = *(_DWORD *)&v27[v8 + 4] - v13; /*0xffc94eb6*/
v2 = a1; /*0xffc94eb8*/
MemChipFunc89D9((int)a1, n4, n0x17, v17); /*0xffc94ec6*/
v22 = *(_DWORD *)&v27[v8 + 4]; /*0xffc94ed2*/
}
}
goto LABEL_32; /*0xffc94ed6*/
}
v10 = v3[v9 + 11 + v8]; /*0xffc94df5*/
}
v20 = v10; /*0xffc94e04*/
goto LABEL_23; /*0xffc94e04*/
}
}
// Function: MemChipFunc4F27 @ 0xffc94f27 (0xd7 bytes)
// Index: 1147/2560
int __cdecl MemChipFunc4F27(int n4)
{
int v2; // ebp
unsigned __int8 v3; // bl
int v4; // edi
unsigned __int8 v5; // bh
int v6; // esi
unsigned __int8 v7; // cl
int v8; // eax
char v9; // al
char v11; // [esp+13h] [ebp-5h]
unsigned __int8 n4a; // [esp+1Ch] [ebp+4h]
v11 = 0; /*0xffc94f3d*/
v2 = (unsigned __int16)(64 - *(unsigned __int8 *)(n4 + 1557)); /*0xffc94f42*/
v3 = 0; /*0xffc94f45*/
while ( 1 ) /*0xffc94f4a*/
{
if ( *(_BYTE *)(48704 * v3 + n4 + 258689) ) /*0xffc94f50*/
{
v4 = 50813 * v3; /*0xffc94f5a*/
if ( *(_DWORD *)(v4 + n4 + 58803) == 64 ) /*0xffc94f68*/
{
v5 = 0; /*0xffc94f70*/
n4a = *(_BYTE *)(n4 + 244317); /*0xffc94f72*/
if ( n4a ) /*0xffc94f78*/
break; /*0xffc94f78*/
}
}
LABEL_13:
if ( ++v3 >= 4u ) /*0xffc94fd8*/
return v2; /*0xffc94fe6*/
}
while ( 1 ) /*0xffc94f9a*/
{
v6 = n4 + v4 + 768 * v5; /*0xffc94f9a*/
if ( ((1 << v5) & *(unsigned __int8 *)(v4 + n4 + 58812)) != 0 ) /*0xffc94f9e*/
{
v7 = 0; /*0xffc94fa0*/
while ( 1 ) /*0xffc94fa5*/
{
v8 = 19 * v7; /*0xffc94fa5*/
if ( !*(_BYTE *)(v8 + v6 + 59835) && *(_BYTE *)(v8 + v6 + 59834) == 1 ) /*0xffc94fba*/
break; /*0xffc94fba*/
if ( ++v7 >= 0x14u ) /*0xffc94fc1*/
{
v9 = v11; /*0xffc94fc3*/
goto LABEL_11; /*0xffc94fc3*/
}
}
v9 = 1; /*0xffc94fe7*/
v11 = 1; /*0xffc94fe9*/
LABEL_11:
if ( v9 ) /*0xffc94fc9*/
return *(_DWORD *)(19 * v7 + v6 + 59841); /*0xffc94fe0*/
}
if ( ++v5 >= n4a ) /*0xffc94fd1*/
goto LABEL_13; /*0xffc94fd1*/
}
}
// Function: MemChipFunc4FFE @ 0xffc94ffe (0xdb bytes)
// Index: 1148/2560
char __cdecl MemChipFunc4FFE(
int __return_address,
int n4,
unsigned __int8 n2,
unsigned __int8 a4,
char a5,
unsigned __int8 *p___return_address,
unsigned __int8 *p___return_address_3,
unsigned __int8 *p___return_address_2,
_BYTE *src)
{
unsigned __int8 *p___return_address_1; // eax
if ( !ProcCommonFunc2BA(__return_address) ) /*0xffc9500c*/
{
LOBYTE(p___return_address_1) = ProcCommonFunc2AB(__return_address); /*0xffc9509c*/
if ( !(_BYTE)p___return_address_1 ) /*0xffc950a4*/
return (char)p___return_address_1; /*0xffc950a4*/
p___return_address_1 = p___return_address; /*0xffc950a6*/
if ( *p___return_address == 1 ) /*0xffc950ac*/
{
*p___return_address_3 = n2; /*0xffc950b4*/
*src = a5; /*0xffc950bc*/
LOBYTE(p___return_address_1) = a4; /*0xffc950be*/
if ( !a4 ) /*0xffc950c3*/
{
p___return_address_1 = p___return_address_2; /*0xffc950c5*/
goto LABEL_5; /*0xffc950c8*/
}
if ( a4 != 1 ) /*0xffc950cf*/
return (char)p___return_address_1; /*0xffc950cf*/
p___return_address_1 = p___return_address_2; /*0xffc950d1*/
}
goto LABEL_29; /*0xffc950d1*/
}
*src = a5; /*0xffc95018*/
*p___return_address_2 = a4; /*0xffc95020*/
p___return_address_1 = p___return_address; /*0xffc95022*/
if ( *p___return_address != 1 ) /*0xffc9502a*/
{
if ( *p___return_address == 2 ) /*0xffc9506a*/
{
LOBYTE(p___return_address_1) = n2; /*0xffc9506c*/
if ( n2 <= 1u ) /*0xffc95071*/
{
*p___return_address_3 = 2; /*0xffc9507a*/
LOBYTE(p___return_address_1) = (_BYTE)p___return_address_3; /*0xffc95077*/
return (char)p___return_address_1; /*0xffc9507e*/
}
if ( n2 == 2 ) /*0xffc95081*/
goto LABEL_4; /*0xffc95081*/
if ( n2 == 3 || n2 == 4 ) /*0xffc95089*/
{
*p___return_address_3 = 5; /*0xffc9508e*/
LOBYTE(p___return_address_1) = (_BYTE)p___return_address_3; /*0xffc9508b*/
return (char)p___return_address_1; /*0xffc95092*/
}
if ( n2 != 5 ) /*0xffc95095*/
return (char)p___return_address_1; /*0xffc95095*/
LABEL_10:
*p___return_address_3 = 4; /*0xffc9504f*/
LOBYTE(p___return_address_1) = (_BYTE)p___return_address_3; /*0xffc9504f*/
return (char)p___return_address_1; /*0xffc95056*/
}
LABEL_29:
*p___return_address_1 = 0; /*0xffc950d4*/
return (char)p___return_address_1; /*0xffc950d4*/
}
LOBYTE(p___return_address_1) = n2; /*0xffc9502c*/
switch ( n2 ) /*0xffc95031*/
{
case 0u: /*0xffc95031*/
LABEL_4:
p___return_address_1 = p___return_address_3; /*0xffc95033*/
LABEL_5:
*p___return_address_1 = 1; /*0xffc95036*/
return (char)p___return_address_1; /*0xffc9503a*/
case 1u: /*0xffc95031*/
case 2u: /*0xffc95031*/
p___return_address_1 = p___return_address_3; /*0xffc9503f*/
goto LABEL_29; /*0xffc95042*/
case 3u: /*0xffc95031*/
goto LABEL_10; /*0xffc9504d*/
case 4u: /*0xffc95031*/
case 5u: /*0xffc95031*/
*p___return_address_3 = 3; /*0xffc95062*/
LOBYTE(p___return_address_1) = (_BYTE)p___return_address_3; /*0xffc9505f*/
break;
}
return (char)p___return_address_1; /*0xffc95039*/
}
// Function: MemChipFunc50D9 @ 0xffc950d9 (0xe4 bytes)
// Index: 1149/2560
int __cdecl MemChipFunc50D9(int a1, unsigned __int8 a2, unsigned __int8 n23, int a4)
{
int v4; // edx
int v5; // ebp
unsigned __int8 i; // bh
_DWORD *v8; // esi
char *v9; // edi
_DWORD *v10; // esi
int v11; // [esp+8h] [ebp-4h]
_DWORD *v12; // [esp+14h] [ebp+8h]
v4 = a1; /*0xffc950df*/
v5 = 50813 * a2 + a1 + 58799; /*0xffc950f5*/
v11 = 50813 * a2; /*0xffc950f7*/
if ( n23 == 23 ) /*0xffc950fe*/
return 33; /*0xffc95102*/
for ( i = 22; i >= n23; --i ) /*0xffc95112*/
{
v8 = (_DWORD *)(v5 + 19 * i); /*0xffc9511f*/
v12 = v8; /*0xffc95121*/
if ( *(_BYTE *)v8 ) /*0xffc95125*/
{
DebugPrint(v4, 2, 255, 255, 255, 255, 255, 255, "\nCopying SAD %d to SAD %d\n", i, i + 1); /*0xffc9513d*/
v9 = (char *)v8 + 19; /*0xffc95146*/
*(_DWORD *)((char *)v8 + 19) = *v8; /*0xffc95149*/
v10 = v8 + 1; /*0xffc95149*/
v9 += 4; /*0xffc95149*/
v4 = a1; /*0xffc95151*/
*(_DWORD *)v9 = *v10++; /*0xffc95155*/
v9 += 4; /*0xffc95155*/
*(_DWORD *)v9 = *v10++; /*0xffc95158*/
v9 += 4; /*0xffc95158*/
*(_DWORD *)v9 = *v10++; /*0xffc95159*/
v9 += 4; /*0xffc95159*/
*(_WORD *)v9 = *(_WORD *)v10; /*0xffc9515a*/
v9[2] = *((_BYTE *)v10 + 2); /*0xffc9515c*/
*(_DWORD *)((char *)v12 + 23) -= a4; /*0xffc9515d*/
qmemcpy((void *)(v11 + 8 * i + a1 + 59263), (const void *)(v11 + 8 * i + a1 + 59255), 8u); /*0xffc9517c*/
}
}
*(_DWORD *)(19 * n23 + v5 + 4) = a4 + *(_DWORD *)(19 * n23 + v5 - 15); /*0xffc951aa*/
DebugPrint(a1, 2, 255, 255, 255, 255, 255, 255, "\nAdjustMemAddrMap for SAD %d Limit\n", n23); /*0xffc951ae*/
return 0; /*0xffc951b9*/
}
// Function: MemChipFunc51BD @ 0xffc951bd (0x7c bytes)
// Index: 1150/2560
char __cdecl MemChipFunc51BD(int a1, unsigned __int8 a2, unsigned __int8 a3)
{
unsigned __int8 n8; // bl
int v4; // eax
_BYTE *v5; // edi
int v6; // esi
n8 = 0; /*0xffc951c2*/
v4 = a1 + 50813 * a2; /*0xffc951e1*/
v5 = (_BYTE *)(v4 + 8 * a3 + 59255); /*0xffc951e5*/
do /*0xffc95232*/
{
if ( *v5 ) /*0xffc951e7*/
{
LOBYTE(v4) = n8 >> 1; /*0xffc951ee*/
if ( n8 >> 1 != a2 ) /*0xffc951f2*/
{
v6 = (unsigned __int8)v4; /*0xffc951f5*/
DebugPrint( /*0xffc9520a*/
a1,
2,
255,
255,
255,
255,
255,
255,
"\n Mirror enabled on socket %d sad %d \n",
(unsigned __int8)v4,
a3);
LOBYTE(v4) = 19 * a3; /*0xffc95218*/
*(_BYTE *)(19 * a3 + a1 + 50813 * v6 + 58815) = 1; /*0xffc9521f*/
}
}
++n8; /*0xffc9522c*/
++v5; /*0xffc9522e*/
}
while ( n8 < 8u ); /*0xffc95232*/
return v4; /*0xffc95234*/
}
// Function: MemChipFunc5239 @ 0xffc95239 (0x1d8 bytes)
// Index: 1151/2560
int __cdecl MemChipFunc5239(unsigned __int8 *n4, unsigned __int16 n48)
{
int v2; // edi
int v3; // ebp
int n4_1; // ecx
unsigned __int8 *v5; // ebx
unsigned __int8 n0x18; // al
unsigned __int8 i_1; // al
int i_2; // edx
unsigned __int8 j; // cl
int v10; // eax
__int16 n2; // ax
int n3; // ebx
unsigned __int8 *v13; // ecx
int n3_1; // ebx
unsigned __int8 *v15; // ecx
int n3_2; // ebx
unsigned __int8 *v17; // edx
int v18; // ecx
int v19; // eax
unsigned __int8 i; // [esp+12h] [ebp-Ah]
unsigned __int8 n0x18_1; // [esp+13h] [ebp-9h]
int v23; // [esp+14h] [ebp-8h]
int n4_2; // [esp+18h] [ebp-4h]
DebugPrint((int)n4, 2, 255, 255, 255, 255, 255, 255, "\n <NewTADInterleave> \n"); /*0xffc95259*/
v2 = 0; /*0xffc95261*/
v3 = 0; /*0xffc95263*/
n4_1 = 4; /*0xffc95267*/
n4_2 = 4; /*0xffc95268*/
do /*0xffc953f7*/
{
if ( n4[v3 + 258689] ) /*0xffc9526c*/
{
v5 = &n4[v2 + 58799]; /*0xffc95280*/
if ( *v5 ) /*0xffc95282*/
{
n0x18 = 0; /*0xffc9528b*/
n0x18_1 = 0; /*0xffc9528d*/
do /*0xffc953da*/
{
v23 = 19 * n0x18; /*0xffc95297*/
if ( !v5[v23] ) /*0xffc9529b*/
break; /*0xffc9529f*/
i_1 = 0; /*0xffc952a5*/
for ( i = 0; i_1 < n4[244317]; i = i_1 ) /*0xffc952ab*/
{
i_2 = i_1; /*0xffc952b7*/
if ( n4[29 * i_1 + 304850 + v3] ) /*0xffc952bf*/
{
if ( ((unsigned __int8)(1 << i_1) & v5[v23 + 13]) != 0 ) /*0xffc952dc*/
{
for ( j = 0; j < 0x14u; ++j ) /*0xffc952e8*/
{
v10 = v2 + 768 * i_2 + 19 * j; /*0xffc952f2*/
if ( n4[v10 + 59834] != 1 ) /*0xffc952fc*/
break; /*0xffc952fc*/
n4[v10 + 59834] = 0; /*0xffc95300*/
}
n2 = *(_WORD *)&n4[v2 + 58800 + v23]; /*0xffc95314*/
if ( n2 == 1 ) /*0xffc95322*/
{
n3 = 3; /*0xffc95336*/
v13 = &n4[24231 * (i_2 & 1) + 10245 + v2]; /*0xffc95339*/
do /*0xffc95349*/
{
*(_DWORD *)v13 = *((_DWORD *)v13 - 1); /*0xffc9533e*/
v13 += 8077; /*0xffc95340*/
--n3; /*0xffc95346*/
}
while ( n3 ); /*0xffc95349*/
}
else if ( n2 == 2 ) /*0xffc95353*/
{
n3_1 = 3; /*0xffc95367*/
v15 = &n4[24231 * (i_2 & 1) + 10257 + v2]; /*0xffc9536a*/
do /*0xffc9537a*/
{
*(_DWORD *)v15 = *((_DWORD *)v15 - 2); /*0xffc9536f*/
v15 += 8077; /*0xffc95371*/
--n3_1; /*0xffc95377*/
}
while ( n3_1 ); /*0xffc9537a*/
}
}
n3_2 = 3; /*0xffc9538f*/
v17 = &n4[24231 * (i_2 & 1) + 10281 + v2]; /*0xffc95392*/
do /*0xffc953ae*/
{
v18 = *((_DWORD *)v17 - 5); /*0xffc95394*/
v19 = *(_DWORD *)v17; /*0xffc95397*/
v17 += 8077; /*0xffc95399*/
*(_DWORD *)(v17 - 8073) = v19; /*0xffc9539f*/
*(_DWORD *)(v17 - 8093) = v18; /*0xffc953a5*/
--n3_2; /*0xffc953ab*/
}
while ( n3_2 ); /*0xffc953ae*/
v5 = &n4[v2 + 58799]; /*0xffc953b6*/
}
i_1 = i + 1; /*0xffc953bc*/
}
n0x18 = n0x18_1 + 1; /*0xffc953d2*/
n0x18_1 = n0x18; /*0xffc953d4*/
}
while ( n0x18 < 0x18u ); /*0xffc953da*/
n4_1 = n4_2; /*0xffc953e0*/
}
}
v3 += 48704; /*0xffc953e4*/
v2 += 50813; /*0xffc953ea*/
n4_2 = --n4_1; /*0xffc953f3*/
}
while ( n4_1 ); /*0xffc953f7*/
return MemCmdControlSetup(n4, n48); /*0xffc95409*/
}
// Function: MemChipFunc5411 @ 0xffc95411 (0x15e bytes)
// Index: 1152/2560
void __cdecl MemChipFunc5411(int n6, unsigned __int8 n4)
{
unsigned __int8 v3; // bl
int v4; // ecx
int *n6a_2; // esi
int v6; // ebp
unsigned int v7; // esi
bool v8; // zf
unsigned __int8 v9; // [esp+8h] [ebp-2Ch]
int n8; // [esp+Ch] [ebp-28h]
_DWORD n6a_1[8]; // [esp+14h] [ebp-20h] BYREF
int *n6a; // [esp+38h] [ebp+4h]
v3 = 0; /*0xffc9541a*/
n6a_1[0] = 117459024; /*0xffc9541c*/
n6a_1[1] = 117459028; /*0xffc95424*/
n6a_1[2] = 117459032; /*0xffc9542c*/
n6a_1[3] = 117459036; /*0xffc95434*/
n6a_1[4] = 117459040; /*0xffc9543c*/
n6a_1[5] = 117459044; /*0xffc95444*/
n6a_1[6] = 117459048; /*0xffc9544c*/
n6a_1[7] = 117459052; /*0xffc95454*/
v9 = 0; /*0xffc9545c*/
if ( *(_BYTE *)(n6 + 244317) ) /*0xffc95460*/
{
v4 = 48704 * n4; /*0xffc95478*/
do /*0xffc95561*/
{
if ( *(_BYTE *)(v4 + 29 * v3 + n6 + 304850) ) /*0xffc9548c*/
{
n6a_2 = n6a_1; /*0xffc9549a*/
n8 = 8; /*0xffc9549e*/
v6 = 0; /*0xffc954a6*/
n6a = n6a_1; /*0xffc954a8*/
do /*0xffc9554b*/
{
DebugPrint(n6, 1, 255, 255, 255, 255, 255, 255, "TadBase enable here. TADIndex:%d \n", v6); /*0xffc954bb*/
v7 = MailBoxFunc8E0B(v3, n6, n4, v9, *n6a_2) | 0x200; /*0xffc954d6*/
MailBoxFunc8FC5(n6, n4, v9, *n6a, v7); /*0xffc954eb*/
DebugPrint(n6, 1, 255, 255, 255, 255, 255, 255, "mcTADBase[%d].Bits.ign_ptrl_uc:%d \n", v6, (v7 >> 9) & 1); /*0xffc95510*/
DebugPrint(n6, 1, 255, 255, 255, 255, 255, 255, "mcTADBase[%d].Data:%x \n", v6, v7); /*0xffc9552a*/
n6a_2 = n6a + 1; /*0xffc95539*/
++v6; /*0xffc9553c*/
v8 = n8-- == 1; /*0xffc9553d*/
++n6a; /*0xffc95547*/
}
while ( !v8 ); /*0xffc9554b*/
v4 = 48704 * n4; /*0xffc95551*/
}
v9 = ++v3; /*0xffc95557*/
}
while ( v3 < *(_BYTE *)(n6 + 244317) ); /*0xffc95561*/
}
}
// Function: MemChipFunc556F @ 0xffc9556f (0x183 bytes)
// Index: 1153/2560
int __cdecl MemChipFunc556F(_BYTE *__return_address)
{
_BYTE *__return_address_1; // esi
char v2; // bh
unsigned __int8 v3; // bl
unsigned __int8 v4; // bl
char v5; // bh
unsigned __int8 n4; // bl
_BYTE *v7; // edi
unsigned __int8 n6; // bh
char v10; // [esp+10h] [ebp-8h]
int v11; // [esp+14h] [ebp-4h]
unsigned __int8 v12; // [esp+1Ch] [ebp+4h]
__return_address_1 = __return_address; /*0xffc95574*/
v2 = MemChipFunc8B10((int)__return_address); /*0xffc9557f*/
__return_address[243581] = v2; /*0xffc95582*/
MemChipFunc3DC4(__return_address); /*0xffc95588*/
v3 = __return_address[1009]; /*0xffc9558d*/
v12 = v3; /*0xffc955aa*/
DebugPrint((int)__return_address_1, 2, 255, 255, 255, 255, 255, 255, "\nRASCheckDimmRanks: setupRASModes = %d\n", v3);
if ( (v3 & 0xB) == 0xB ) /*0xffc955bf*/
{
v3 &= 0xFCu; /*0xffc955ce*/
v12 = v3; /*0xffc955d2*/
DebugPrint((int)__return_address_1, 2, 255, 255, 255, 255, 255, 255, "\nSparing is ON, turn off mirroring\n"); /*0xffc955d6*/
KtiFunc211E((int)__return_address_1, 12, 1, 255, 255, 255, 255); /*0xffc955e3*/
}
v4 = v2 & v3; /*0xffc955eb*/
v5 = v12 & ~v2; /*0xffc955ef*/
v10 = v4; /*0xffc955f3*/
if ( (v5 & 1) != 0 ) /*0xffc955fa*/
{
v4 &= ~1u; /*0xffc955fc*/
v10 = v4; /*0xffc955ff*/
}
if ( (v5 & 2) != 0 ) /*0xffc95606*/
{
v4 &= ~2u; /*0xffc95608*/
v10 = v4; /*0xffc9560b*/
}
if ( (v5 & 0x20) != 0 ) /*0xffc95612*/
{
v4 &= ~0x20u; /*0xffc95614*/
v10 = v4; /*0xffc95617*/
}
if ( (v5 & 0x40) != 0 ) /*0xffc9561e*/
{
v4 &= ~0x40u; /*0xffc95620*/
v10 = v4; /*0xffc95623*/
}
DebugPrint((int)__return_address_1, 2, 255, 255, 255, 255, 255, 255, "\nRASCheckDimmRanks: RASMode = %d\n", v4);
__return_address_1[257309] = v4; /*0xffc95641*/
if ( (v5 & 3) != 0 ) /*0xffc9564a*/
KtiFunc211E((int)__return_address_1, 12, 1, 255, 255, 255, 255); /*0xffc95654*/
if ( (v5 & 0x60) != 0 ) /*0xffc9565f*/
KtiFunc211E((int)__return_address_1, 13, 1, 255, 255, 255, 255); /*0xffc95669*/
if ( (v5 & 8) != 0 ) /*0xffc95674*/
KtiFunc211E((int)__return_address_1, 16, 1, 255, 255, 255, 255); /*0xffc9567e*/
if ( v5 < 0 ) /*0xffc95688*/
KtiFunc211E((int)__return_address_1, 9, 1, 255, 255, 255, 255); /*0xffc95692*/
n4 = 0; /*0xffc9569a*/
v7 = __return_address_1 + 258716; /*0xffc9569c*/
LOBYTE(v11) = 0; /*0xffc956a2*/
do /*0xffc956e7*/
{
if ( *(v7 - 27) && *v7 ) /*0xffc956ac*/
{
n6 = 0; /*0xffc956b1*/
LOBYTE(__return_address) = 0; /*0xffc956b3*/
do /*0xffc956d6*/
{
MemChipFunc78EA((int)__return_address_1, v11, (int)__return_address, 1u, v10); /*0xffc956c5*/
LOBYTE(__return_address) = ++n6; /*0xffc956cf*/
}
while ( n6 < 6u ); /*0xffc956d6*/
}
++n4; /*0xffc956d8*/
v7 += 48704; /*0xffc956da*/
LOBYTE(v11) = n4; /*0xffc956e0*/
}
while ( n4 < 4u ); /*0xffc956e7*/
return 0; /*0xffc956e9*/
}
// Function: MemChipFunc56F2 @ 0xffc956f2 (0x557 bytes)
// Index: 1154/2560
unsigned __int8 *__usercall MemChipFunc56F2@<eax>(__int16 n2@<bx>, unsigned __int8 *n6, unsigned __int8 n4)
{
unsigned __int8 *n6_1; // edi
unsigned __int8 *result; // eax
unsigned __int8 n4_1; // cl
unsigned __int8 *v6; // ebp
int v7; // esi
int v8; // edx
char v9; // al
int v10; // esi
unsigned __int8 n4_2; // cl
unsigned __int8 n2_2; // dl
int v13; // ebx
__int16 n15_2; // bx
int v15; // esi
int n8; // ebx
__int16 n18688; // bx
unsigned int v18; // esi
int v19; // ecx
char v20; // al
int v21; // esi
int v22; // esi
unsigned __int8 i_1; // dl
char v24; // dh
unsigned __int8 i; // bl
char v26; // cl
int v27; // eax
char n15; // [esp+7h] [ebp-65h]
char n15_1; // [esp+8h] [ebp-64h]
char v30; // [esp+9h] [ebp-63h]
char n15_4; // [esp+Ah] [ebp-62h]
char n15_3; // [esp+Bh] [ebp-61h]
unsigned __int8 n2_1; // [esp+Ch] [ebp-60h]
unsigned __int8 n2_3; // [esp+Ch] [ebp-60h]
int v35; // [esp+10h] [ebp-5Ch]
unsigned __int8 *v36; ... [10913 chars total]
// Function: MemChipFunc5C49 @ 0xffc95c49 (0x82 bytes)
// Index: 1155/2560
int __cdecl MemChipFunc5C49(unsigned __int8 *n6, unsigned __int8 n4, int a3, int n184631580, __int16 a5)
{
unsigned __int8 v5; // dl
int result; // eax
int v9; // eax
int n4a; // [esp+Ch] [ebp+8h]
v5 = a3; /*0xffc95c49*/
result = 7688 * (unsigned __int8)a3; /*0xffc95c5e*/
if ( n6[48704 * n4 + 258722 + result] == 1 ) /*0xffc95c70*/
{
n4a = 4; /*0xffc95c82*/
do /*0xffc95cc4*/
{
v9 = MiscConfigCheck(n6, n4, v5, n184631580); /*0xffc95c97*/
result = MiscIoCheck(n6, n4, a3, n184631580, a5 & 0x7FFF | ((a5 & 0x7FFF) << 16) | v9 & 0x80008000); /*0xffc95cb0*/
v5 = a3; /*0xffc95cb5*/
n184631580 += 4; /*0xffc95cbc*/
--n4a; /*0xffc95cbf*/
}
while ( n4a ); /*0xffc95cc4*/
}
return result; /*0xffc95cc9*/
}
// Function: DimmReadLinkMcaData @ 0xffc95ccb (0x46f bytes)
// Index: 1156/2560
void __cdecl DimmReadLinkMcaData(int n6, unsigned __int8 n4)
{
unsigned __int8 v3; // cl
int n4_1; // edi
int v5; // ebp
unsigned __int8 v6; // dl
unsigned __int8 n6a_1; // cl
char v8; // dl
int v9; // esi
int v10; // eax
unsigned int v11; // eax
int v12; // eax
unsigned int v13; // eax
int v14; // eax
int v15; // eax
int v16; // eax
unsigned int v17; // eax
unsigned __int8 v18; // ch
int v19; // edi
unsigned __int8 v20; // cl
_BYTE *v21; // eax
int n2; // edx
int v23; // esi
unsigned int v24; // edi
unsigned int v25; // esi
unsigned int v26; // esi
unsigned int v27; // ecx
unsigned int v28; // eax
char v29; // [esp+7h] [ebp-1Dh]
char v30; // [esp+8h] [ebp-1Ch]
int v31; // [esp+10h] [ebp-14h]
int v32; // [esp+14h] [ebp-10h]
int v33; // [esp+18h] [ebp-Ch]
unsigned int v34; // [esp+1Ch] [ebp-8h]
char n6a; // [esp+28h] [ebp+4h]
v3 = 0; /*0xffc95cd3*/
v29 = 0; /*0xffc95cd5*/
if ( *(_BYTE *)(n6 + 244317) )
{
n4_1... [8284 chars total]
// Function: KtiEvAutoRecipeMain @ 0xffc9613a (0xcb2 bytes)
// Index: 1157/2560
int __cdecl KtiEvAutoRecipeMain(int n6, unsigned __int8 n4)
{
int n4_1; // ebp
unsigned __int8 n0x18; // al
int v4; // edx
_BYTE *v5; // edx
unsigned __int8 v6; // al
int v7; // ebp
unsigned int v8; // esi
int v9; // eax
int v10; // edx
unsigned __int8 n3; // cl
char v12; // al
int v13; // eax
unsigned int v14; // eax
unsigned int v15; // edi
unsigned int v16; // esi
int v17; // eax
char v18; // si
int v19; // eax
int v20; // eax
int v21; // eax
int v22; // edx
int n3_1; // ebp
int v24; // ecx
int v25; // eax
__int16 n2; // ax
unsigned int v27; // esi
int v28; // edx
int n3_2; // esi
unsigned __int8 v30; // al
unsigned int v31; // esi
int v32; // eax
int v33; // ecx
int v34; // edx
int n3_4; // ebp
int v36; // eax
int v37; // eax
unsigned __int8 n0x18_3; // cl
int *v39; // esi
int v40; // edi
_BYTE *v41; // ebp
int n8; // eax
unsigned int v43; // esi
int v44; // eax
unsigned __int8 n3_3; // dl
uns... [19902 chars total]
// Function: MemChipFunc6DEC @ 0xffc96dec (0x675 bytes)
// Index: 1158/2560
unsigned __int8 __cdecl MemChipFunc6DEC(int n6, int n4)
{
unsigned __int8 n6_1; // bl
int n4_1; // ebp
unsigned __int8 n2; // al
_BYTE *v6; // esi
int v7; // eax
_BYTE *v8; // edx
unsigned __int8 v9; // al
unsigned __int8 n6a_1; // cl
int SocketInfo_1; // esi
unsigned __int8 n6a_3; // al
int v13; // edx
int n3; // ecx
unsigned int v15; // esi
_BYTE *v16; // edx
unsigned __int8 n2_2; // al
int v18; // esi
int v19; // ecx
int v20; // esi
unsigned int n0x18; // eax
int v22; // eax
unsigned __int8 v23; // dl
unsigned __int8 n8; // cl
int v25; // esi
int v26; // eax
__int16 n2_1; // ax
unsigned int v28; // esi
int v29; // ebx
unsigned __int8 n6b_1; // cl
char v31; // al
int v32; // esi
int v33; // edx
int v34; // eax
unsigned int n255; // esi
int v36; // eax
int v37; // eax
_BYTE *SocketInfo_2; // esi
unsigned __int8 n4_2; // al
int v40; // eax
_BYTE *v41; // esi
unsigned __int8 n2_3; // al
int v43; // eax
i... [11966 chars total]
// Function: KtiSetRasConfig @ 0xffc97461 (0x489 bytes)
// Index: 1159/2560
int __cdecl KtiSetRasConfig(int n6)
{
unsigned __int8 n4_2; // al
_BYTE *v2; // ecx
int n2_1; // ebx
__int16 v4; // bp
unsigned __int8 n6_1; // bl
int v6; // eax
int v7; // eax
int SocketInfo; // eax
bool v9; // zf
unsigned __int8 n6_2; // bl
int v11; // ecx
int n184631580; // edx
int v13; // ebp
int *v14; // eax
unsigned int n184620832; // ecx
int *v16; // eax
_BYTE *v17; // eax
unsigned __int8 n2_2; // bl
int *v19; // ebp
unsigned __int8 v21; // [esp+13h] [ebp-395h]
int *v22; // [esp+14h] [ebp-394h]
unsigned int *v23; // [esp+14h] [ebp-394h]
unsigned int n184631580_1; // [esp+18h] [ebp-390h]
_BYTE *v25; // [esp+18h] [ebp-390h]
int n4; // [esp+1Ch] [ebp-38Ch]
_BYTE *v27; // [esp+20h] [ebp-388h]
__int16 n2[2]; // [esp+24h] [ebp-384h]
int n4_1; // [esp+28h] [ebp-380h]
int n184620832_1; // [esp+28h] [ebp-380h]
int v31; // [esp+2Ch] [ebp-37Ch]
_BYTE *v32; // [esp+2Ch] [ebp-37Ch]
unsigned __int8 n2_3; // [esp+30h] [ebp-378h]
... [8660 chars total]
// Function: MemChipFunc78EA @ 0xffc978ea (0x159 bytes)
// Index: 1160/2560
int MemChipFunc78EA(int __return_address, int a2, int a3, unsigned __int8 a4, ...)
{
int __return_address_1; // ebp
unsigned __int8 v5; // si
int result; // eax
_BYTE *v7; // edi
unsigned __int8 v8; // bl
int v9; // ebp
unsigned __int8 v10; // bh
int v11; // esi
int __return_address_2; // ecx
int v13; // esi
int v14; // [esp+10h] [ebp-18h]
int v15; // [esp+14h] [ebp-14h]
int v16; // [esp+18h] [ebp-10h]
int v17; // [esp+1Ch] [ebp-Ch]
__return_address_1 = __return_address; /*0xffc978f3*/
v5 = a2; /*0xffc978f8*/
result = GetSocketInfo(__return_address, a2); /*0xffc9790c*/
v7 = (_BYTE *)(7688 * (unsigned __int8)a3 + result); /*0xffc97913*/
if ( *v7 ) /*0xffc97916*/
{
v8 = 0; /*0xffc9791f*/
for ( LOBYTE(v15) = 0; v8 < v7[3]; LOBYTE(v15) = v8 ) /*0xffc97925*/
{
v14 = 1379 * v8; /*0xffc9793d*/
result = GetCpuCount(__return_address_1, v5, a3); /*0xffc97941*/
v9 = v14 + result; /*0xffc9794d*/
if ( *(_BYTE *)(v14 + result) ) /*0xffc97950*/
{
v10 = 0; /*0xffc9795a*/
LOBYTE(v17) = 0; /*0xffc9795c*/
if ( *(_BYTE *)(v9 + 20) ) /*0xffc97960*/
{
v11 = 1379 * v8; /*0xffc9796d*/
__return_address_2 = __return_address; /*0xffc97980*/
do /*0xffc97a1a*/
{
result = 7688 * (unsigned __int8)a3 + v14 + 48704 * (unsigned __int8)a2 + v10; /*0xffc97995*/
v16 = v11 + 242 * v10; /*0xffc979a3*/
if ( *(_BYTE *)(result + __return_address_2 + 259133) != 1 ) /*0xffc979ab*/
{
v13 = *(unsigned __int16 *)&v7[v16 + 636]; /*0xffc979b5*/
DebugPrint( /*0xffc979e7*/
__return_address,
2,
a2,
a3,
v15,
v17,
255,
255,
"size %d\nTechIndex 0x%x, size 0x%x\n",
v13,
*(unsigned __int8 *)(v9 + 21),
(unsigned __int16)word_FFD40BA0[*(unsigned __int8 *)(v9 + 21)]);
result = v13 * a4; /*0xffc979f6*/
v11 = 1379 * v8; /*0xffc979f9*/
*(_WORD *)&v7[v16 + 636] = result; /*0xffc979fd*/
*(_WORD *)&v7[v16 + 638] = result; /*0xffc97a05*/
__return_address_2 = __return_address; /*0xffc97a0d*/
}
LOBYTE(v17) = ++v10; /*0xffc97a13*/
}
while ( v10 < *(_BYTE *)(v9 + 20) ); /*0xffc97a1a*/
v8 = v15; /*0xffc97a20*/
v5 = a2; /*0xffc97a24*/
}
}
__return_address_1 = __return_address; /*0xffc97a28*/
++v8; /*0xffc97a2c*/
}
}
return result; /*0xffc97a3b*/
}
// Function: DimmSpareRankConfig @ 0xffc97a43 (0x3e3 bytes)
// Index: 1161/2560
int __cdecl DimmSpareRankConfig(int __return_address, int n6, int n6a)
{
unsigned __int8 n6_1; // si
int v4; // ebx
unsigned __int8 i_1; // al
int v6; // edi
_BYTE *v7; // eax
unsigned __int8 n4_1; // dh
unsigned __int8 n4; // dl
unsigned __int8 v10; // bl
unsigned __int8 v11; // dl
unsigned __int8 v12; // al
_WORD *v13; // edi
_BYTE *v14; // eax
int n2; // ecx
unsigned __int8 *v16; // esi
unsigned __int8 n2_1; // al
int v18; // edi
_BYTE *v19; // esi
unsigned __int8 j_1; // cl
unsigned __int8 k; // dl
_BYTE *v22; // ebp
unsigned __int8 *v23; // ecx
int v24; // edi
_WORD *v25; // edx
int v26; // esi
int result; // eax
int v28; // ebx
unsigned __int8 v29; // cl
int v30; // edx
int v31; // esi
int v32; // ecx
bool v33; // zf
int v34; // [esp-8h] [ebp-44h]
unsigned __int8 v35; // [esp+12h] [ebp-2Ah]
unsigned __int8 j_2; // [esp+12h] [ebp-2Ah]
unsigned __int8 i; // [esp+13h] [ebp-29h]
char v38; // [esp+13h] [ebp-29h]
unsigned __int8 n2_4; // [esp+13h] [ebp-29h]
unsigned __int8 v40; // [esp+13h] [ebp-29h]
unsigned __int8 j; // [esp+14h] [ebp-28h]
unsigned __int8 n2_2; // [esp+18h] [ebp-24h]
int n2_3; // [esp+18h] [ebp-24h]
char v44; // [esp+1Ch] [ebp-20h] BYREF
_BYTE v45[3]; // [esp+1Dh] [ebp-1Fh] BYREF
char *v46; // [esp+20h] [ebp-1Ch]
int v47; // [esp+24h] [ebp-18h]
_WORD *v48; // [esp+28h] [ebp-14h]
int v49; // [esp+2Ch] [ebp-10h]
int v50; // [esp+30h] [ebp-Ch]
int v51; // [esp+34h] [ebp-8h]
int v52; // [esp+38h] [ebp-4h]
v50 = 0; /*0xffc97a4e*/
v35 = 0; /*0xffc97a52*/
n6_1 = n6; /*0xffc97a5b*/
v51 = 7688 * (unsigned __int8)n6a; /*0xffc97a6b*/
v4 = v51 + GetSocketInfo(__return_address, n6); /*0xffc97a76*/
i_1 = 0; /*0xffc97a79*/
v49 = v4; /*0xffc97a7b*/
for ( i = 0; i_1 < *(_BYTE *)(v4 + 3); i = i_1 ) /*0xffc97a83*/
{
if ( i_1 >= 2u ) /*0xffc97a8a*/
break; /*0xffc97a8a*/
v6 = 1379 * i_1; /*0xffc97a95*/
v7 = (_BYTE *)(v6 + GetCpuCount(__return_address, n6_1, n6a)); /*0xffc97aa0*/
if ( *v7 ) /*0xffc97aa5*/
{
if ( v7[107] != 1 ) /*0xffc97aae*/
{
n4_1 = v7[19]; /*0xffc97ab0*/
n4 = 0; /*0xffc97ab3*/
if ( n4_1 ) /*0xffc97ab7*/
{
v10 = v35; /*0xffc97ab9*/
do /*0xffc97aea*/
{
if ( n4 >= 4u ) /*0xffc97ac0*/
break; /*0xffc97ac0*/
if ( !*(_BYTE *)(v51 + v6 + 48704 * (unsigned __int8)n6 + n4 + __return_address + 259133) ) /*0xffc97ada*/
++v10; /*0xffc97ae4*/
++n4; /*0xffc97ae6*/
}
while ( n4 < n4_1 ); /*0xffc97aea*/
n6_1 = n6; /*0xffc97aec*/
v35 = v10; /*0xffc97af0*/
v4 = v49; /*0xffc97af4*/
}
}
}
i_1 = i + 1; /*0xffc97afc*/
}
v11 = *(_BYTE *)(__return_address + 1018); /*0xffc97b0b*/
v12 = v35 >> 1; /*0xffc97b13*/
v38 = v35 >> 1; /*0xffc97b15*/
if ( v11 < (unsigned __int8)(v35 >> 1) ) /*0xffc97b1b*/
{
v12 = *(_BYTE *)(__return_address + 1018); /*0xffc97b1d*/
v38 = v12; /*0xffc97b1f*/
}
v13 = (_WORD *)v12; /*0xffc97b23*/
v34 = *(unsigned __int8 *)(v4 + 4); /*0xffc97b2e*/
v48 = (_WORD *)v12; /*0xffc97b3e*/
DebugPrint(
__return_address,
2,
n6,
n6a,
255,
255,
255,
255,
"SpareRankNum:%d, SetupSpareNum: %d, ch Ranks: %d, chRankEnabled: %d\n",
v12,
v11,
v34,
v35);
v14 = v45; /*0xffc97b59*/
n2 = 2; /*0xffc97b5f*/
do /*0xffc97b6c*/
{
*(_WORD *)(v14 - 1) = -1; /*0xffc97b60*/
v14 += 2; /*0xffc97b66*/
--n2; /*0xffc97b69*/
}
while ( n2 ); /*0xffc97b6c*/
if ( v38 ) /*0xffc97b72*/
{
v16 = v45; /*0xffc97b78*/
v47 = (int)v45; /*0xffc97b7c*/
do /*0xffc97ce1*/
{
n2_4 = -1; /*0xffc97b85*/
n2_1 = 0; /*0xffc97b89*/
j_2 = -1; /*0xffc97b8b*/
v51 = 0; /*0xffc97b8f*/
n2_2 = 0; /*0xffc97b93*/
if ( *(_BYTE *)(v4 + 3) ) /*0xffc97b97*/
{
do /*0xffc97c8a*/
{
if ( n2_1 >= 2u ) /*0xffc97ba2*/
break; /*0xffc97ba2*/
v18 = 1379 * n2_1; /*0xffc97bb3*/
v46 = (char *)v18; /*0xffc97bba*/
v19 = (_BYTE *)(v18 + GetCpuCount(__return_address, n6, n6a)); /*0xffc97bc6*/
if ( *v19 ) /*0xffc97bc9*/
{
if ( v19[107] != 1 ) /*0xffc97bd6*/
{
j_1 = 0; /*0xffc97bdc*/
for ( j = 0; j_1 < v19[19]; j = j_1 ) /*0xffc97be2*/
{
if ( j_1 >= 4u ) /*0xffc97bee*/
break; /*0xffc97bee*/
v52 = v18 + 242 * j_1; /*0xffc97c12*/
if ( !KtiFunc89E9(__return_address, n6, n6a, n2_2, j, 1) ) /*0xffc97c16*/
{
for ( k = 0; k < 2u; ++k ) /*0xffc97c26*/
{
if ( v45[2 * k - 1] == n2_2 && v45[2 * k] == j ) /*0xffc97c39*/
break; /*0xffc97c39*/
}
v18 = (int)v46; /*0xffc97c42*/
if ( k >= 2u && *(_WORD *)(v52 + v4 + 636) > (unsigned __int16)v51 ) /*0xffc97c5c*/
{
v51 = *(unsigned __int16 *)(v52 + v4 + 636); /*0xffc97c5e*/
n2_4 = n2_2; /*0xffc97c62*/
j_2 = j; /*0xffc97c66*/
}
}
j_1 = j + 1; /*0xffc97c6e*/
}
}
}
n2_1 = n2_2 + 1; /*0xffc97c81*/
n2_2 = n2_1; /*0xffc97c83*/
}
while ( n2_1 < *(_BYTE *)(v4 + 3) ); /*0xffc97c8a*/
v16 = (unsigned __int8 *)v47; /*0xffc97c94*/
if ( n2_4 != 0xFF ) /*0xffc97c9b*/
{
*(_BYTE *)(v47 - 1) = n2_4; /*0xffc97cb3*/
*v16 = j_2; /*0xffc97cbe*/
DebugPrint(__return_address, 2, n6, n6a, 255, 255, 255, 255, " spared dimm and rank:0x%x 0x%x \n", n2_4, j_2); /*0xffc97cc7*/
}
v13 = v48; /*0xffc97ccf*/
}
v16 += 2; /*0xffc97cd3*/
v13 = (_WORD *)((char *)v13 - 1); /*0xffc97cd6*/
v47 = (int)v16; /*0xffc97cd9*/
v48 = v13; /*0xffc97cdd*/
}
while ( v13 ); /*0xffc97ce1*/
}
v22 = (_BYTE *)(v4 + 6737); /*0xffc97ce7*/
n2_3 = 2; /*0xffc97ced*/
v23 = (unsigned __int8 *)&v44; /*0xffc97cf7*/
v46 = &v44; /*0xffc97cfd*/
v24 = -6737; /*0xffc97d01*/
v25 = (_WORD *)(v4 + 6727); /*0xffc97d03*/
v26 = -6737; /*0xffc97d09*/
v48 = (_WORD *)(v4 + 6727); /*0xffc97d0b*/
v47 = -6737; /*0xffc97d0f*/
result = 0; /*0xffc97d13*/
v51 = -6737; /*0xffc97d15*/
do /*0xffc97e18*/
{
v40 = *v23; /*0xffc97d1b*/
v28 = v49; /*0xffc97d22*/
if ( *v23 == 0xFF ) /*0xffc97d26*/
{
v22[v24 + 6719] = -1; /*0xffc97d2a*/
*v25 = 0; /*0xffc97d32*/
v22[v26 + 6735] = -1; /*0xffc97d35*/
*v22 = -1; /*0xffc97d3d*/
}
else
{
v29 = v23[1]; /*0xffc97d46*/
v30 = 1379 * v40; /*0xffc97d5d*/
v22[v47 + 6719] = v40; /*0xffc97d63*/
v31 = v28 + 242 * v29; /*0xffc97d6a*/
*(_BYTE *)(v50 + v28 + 6723) = v29; /*0xffc97d70*/
*v48 = *(_WORD *)(v30 + v31 + 636); /*0xffc97d83*/
v32 = v51; /*0xffc97d86*/
v22[v51 + 6735] = *(_BYTE *)(v30 + v31 + 623); /*0xffc97d91*/
*v22 = *(_BYTE *)(v30 + v31 + 622); /*0xffc97d9f*/
*(_DWORD *)(v30 + v31 + 636) = 0; /*0xffc97da4*/
DebugPrint( /*0xffc97de3*/
__return_address,
2,
n6,
n6a,
255,
255,
255,
255,
"Spare DIMM %d, Spare logical rank %d, Spare phy rank id %d, ch spare logical rank:0x%x \n",
v40,
*(unsigned __int8 *)(v30 + v31 + 623),
*(unsigned __int8 *)(v30 + v31 + 622),
(unsigned __int8)v22[v32 + 6735]);
result = v50; /*0xffc97de8*/
v23 = (unsigned __int8 *)v46; /*0xffc97def*/
v25 = v48; /*0xffc97df3*/
v26 = v51; /*0xffc97df7*/
v24 = v47; /*0xffc97dfb*/
}
++result; /*0xffc97dff*/
v23 += 2; /*0xffc97e00*/
++v25; /*0xffc97e03*/
v50 = result; /*0xffc97e06*/
++v22; /*0xffc97e0a*/
v46 = (char *)v23; /*0xffc97e0b*/
v33 = n2_3-- == 1; /*0xffc97e0f*/
v48 = v25; /*0xffc97e14*/
}
while ( !v33 ); /*0xffc97e18*/
return result; /*0xffc97e1e*/
}
// Function: DimmSetSpareMode @ 0xffc97e26 (0x480 bytes)
// Index: 1162/2560
void __cdecl DimmSetSpareMode(int n6, int n4)
{
int n6_1; // ebx
int v3; // eax
int v4; // eax
int v5; // eax
int v6; // eax
int v7; // ebp
int v8; // edi
int SocketInfo; // eax
int v10; // edx
int v11; // esi
int n2; // eax
unsigned __int8 *v13; // esi
unsigned __int8 v14; // cl
int v15; // eax
int v16; // esi
int v17; // esi
int v18; // edi
int v19; // ebp
_BYTE *v20; // esi
unsigned int v21; // eax
_BYTE *v22; // esi
int n2_2; // edx
int v24; // esi
int v25; // esi
unsigned __int8 n6a_1; // al
int v27; // eax
char v28; // si
int v29; // eax
int v30; // eax
int v31; // eax
int v32; // [esp+4h] [ebp-Ch]
unsigned int v33; // [esp+4h] [ebp-Ch]
int n2_1; // [esp+8h] [ebp-8h]
__int16 v35; // [esp+8h] [ebp-8h]
int v36; // [esp+8h] [ebp-8h]
unsigned __int8 n6a; // [esp+14h] [ebp+4h]
n6_1 = n6; /*0xffc97e2a*/
LOBYTE(v32) = 0; /*0xffc97e2e*/
if ( (*(_BYTE *)(n6 + 257309) & 8) != 0 )
{
DebugPrint(n6, 2, 255, 255, 255, 255, 255, 255, "\n<SetSpareMode(socket = %d)>\n", (unsigned __int8)n4); /*0xffc97e62*/
v3 = MailBoxFunc8EB3(n6, n4, 117459236); /*0xffc97e72*/
MailBoxFunc9076(n6, n4, 117459236, v3 & 0xFFFC7FFF); /*0xffc97e83*/
LOBYTE(n6) = 0; /*0xffc97e8b*/
do /*0xffc97ed7*/
{
v4 = MiscConfigCheck((unsigned __int8 *)n6_1, n4, n6, 184566584); /*0xffc97e9f*/
MiscIoCheck((unsigned __int8 *)n6_1, n4, n6, 0xB004338u, v4 & 0xFFFFC0C0); /*0xffc97eb4*/
MiscConfigCheck((unsigned __int8 *)n6_1, n4, n6, 184566584); /*0xffc97ec3*/
LOBYTE(n6) = n6 + 1; /*0xffc97ed1*/
}
while ( (unsigned __int8)n6 < 6u ); /*0xffc97ed7*/
v5 = MailBoxFunc8EB3(n6_1, n4, 117459204); /*0xffc97ee4*/
MailBoxFunc9076(n6_1, n4, 117459204, v5 & 0xC0FFFFFF | 0x22000000); /*0xffc97efa*/
v6 = MailBoxFunc8EB3(n6_1, n4, 117459228); /*0xffc97f08*/
MailBoxFunc9076(n6_1, n4, 117459228, v6 & 0xFFFF0000 | *(unsigned __int16 *)(n6_1 + 267)); /*0xffc97f22*/
DebugPrint(n6_1, 2, n4, 255, 255, 255, 255, 255, "Sparing configured\n"); /*0xffc97f3d*/
if ( (*(_BYTE *)(n6_1 + 257310) & 4) != 0 )
{
v7 = 0; /*0xffc97f52*/
LOBYTE(n6) = 0; /*0xffc97f54*/
v8 = 0; /*0xffc97f59*/
do
{
SocketInfo = GetSocketInfo(n6_1, n4); /*0xffc97f60*/
if ( *(_BYTE *)(SocketInfo + v8) )
{
v10 = 0; /*0xffc97f71*/
v11 = SocketInfo + 6737; /*0xffc97f73*/
n2 = 2; /*0xffc97f7b*/
v13 = (unsigned __int8 *)(v8 + v11); /*0xffc97f80*/
n2_1 = 2; /*0xffc97f82*/
do /*0xffc97fb1*/
{
v14 = *v13; /*0xffc97f86*/
if ( *v13 != 0xFF ) /*0xffc97f8b*/
{
LOBYTE(v32) = v14 >> 2; /*0xffc97f98*/
v10 |= 1 << ((v14 & 3) + 8 * (v14 >> 2)); /*0xffc97fa2*/
n2 = n2_1; /*0xffc97fa5*/
}
++v13; /*0xffc97fa9*/
n2_1 = --n2; /*0xffc97fad*/
}
while ( n2 ); /*0xffc97fb1*/
v35 = v10; /*0xffc97fbe*/
DebugPrint(n6_1, 2, n4, n6, v32, 255, 255, 255, "DimmAmap: 0x%x\n", v10);
v15 = MiscConfigCheck((unsigned __int8 *)n6_1, n4, n6, 117457036); /*0xffc97fe7*/
v16 = (v15 ^ (v15 | ((unsigned __int8)v35 << 15))) & 0x78000 ^ v15; /*0xffc98004*/
v17 = (v16 ^ (v16 | (HIBYTE(v35) << 19))) & 0x780000 ^ v16; /*0xffc98015*/
MiscIoCheck((unsigned __int8 *)n6_1, n4, n6, 0x700408Cu, v17); /*0xffc98026*/
DebugPrint(n6_1, 2, 255, 255, 255, 255, 255, 255, "\n<ch=%d, AMAP.Data=0x%x>\n", v7, v17); /*0xffc98043*/
}
v8 += 7688; /*0xffc9804f*/
++v7; /*0xffc98057*/
LOBYTE(n6) = n6 + 1; /*0xffc98058*/
}
while ( (unsigned __int8)n6 < 6u );
}
v18 = 0; /*0xffc98064*/
LOBYTE(n6) = 0; /*0xffc98066*/
v19 = 0; /*0xffc9806b*/
v36 = 0; /*0xffc9806d*/
do /*0xffc98188*/
{
v20 = (_BYTE *)(GetSocketInfo(n6_1, n4) + v19); /*0xffc9807d*/
if ( *v20 ) /*0xffc98080*/
{
v21 = MiscConfigCheck((unsigned __int8 *)n6_1, n4, n6, 117457472) & 0xFFFFFF00; /*0xffc980a0*/
v22 = v20 + 6735; /*0xffc980a9*/
n2_2 = 2; /*0xffc980b1*/
do /*0xffc980c3*/
{
if ( *v22 != 0xFF ) /*0xffc980b7*/
v21 |= 1 << *v22; /*0xffc980bc*/
++v22; /*0xffc980bf*/
--n2_2; /*0xffc980c0*/
}
while ( n2_2 ); /*0xffc980c3*/
v33 = v21; /*0xffc980c5*/
if ( (_BYTE)v21 ) /*0xffc980cb*/
{
v21 |= 0x100u; /*0xffc980cd*/
v33 = v21; /*0xffc980d2*/
}
MiscIoCheck((unsigned __int8 *)n6_1, n4, n6, 0x7004240u, v21); /*0xffc980e2*/
DebugPrint(n6_1, 2, 255, 255, 255, 255, 255, 255, "\n<ch=%d, SCRATCHPAD2.Data=0x%x>\n", v18, v33); /*0xffc980ff*/
if ( (_BYTE)v33 ) /*0xffc9810c*/
{
v24 = MiscConfigCheck((unsigned __int8 *)n6_1, n4, n6, 184632100); /*0xffc98123*/
if ( KtiFuncE78(n6_1, 0, 3u) ) /*0xffc98125*/
v25 = v24 | 0x80; /*0xffc98131*/
else
v25 = v24 & 0xFFFFFF7F; /*0xffc98139*/
DebugPrint(n6_1, 2, 255, 255, 255, 255, 255, 255, "<ch=%d, linkCfgRead.Data=0x%x>\n", v18, v25); /*0xffc98154*/
MiscIoCheck((unsigned __int8 *)n6_1, n4, n6, 0xB014324u, v25); /*0xffc98165*/
}
v19 = v36; /*0xffc9816d*/
}
v19 += 7688; /*0xffc98175*/
v36 = v19; /*0xffc9817d*/
++v18; /*0xffc98181*/
LOBYTE(n6) = n6 + 1; /*0xffc98182*/
}
while ( (unsigned __int8)n6 < 6u ); /*0xffc98188*/
n6a_1 = SocketPresentCheck(n6_1, 0, 5u); /*0xffc98193*/
if ( !n6a_1 ) /*0xffc9819d*/
{
n6a = 0; /*0xffc981a3*/
if ( *(_BYTE *)(n6_1 + 244317) ) /*0xffc981a7*/
{
do /*0xffc98257*/
{
if ( *(_BYTE *)(50813 * (unsigned __int8)n4 + n6a_1 + n6_1 + 10189) ) /*0xffc981c0*/
{
v27 = MailBoxFunc8E0B(n6_1, n6_1, n4, n6a, 100679940); /*0xffc981d9*/
v28 = v27; /*0xffc981de*/
MailBoxFunc8FC5(n6_1, n4, n6a, 100679940, v27 & 0xFFFFFFFD); /*0xffc981ef*/
v29 = MailBoxFunc8E0B(n6_1, n6_1, n4, n6a, 100679940); /*0xffc981ff*/
MailBoxFunc8FC5(n6_1, n4, n6a, 100679940, v29 & 0xFFFFFFFE); /*0xffc98213*/
v30 = MailBoxFunc8E0B(n6_1, n6_1, n4, n6a, 100679940); /*0xffc98226*/
MailBoxFunc8FC5(n6_1, n4, n6a, 100679940, v28 & 2 | v30 & 0xFFFFFFFD); /*0xffc9823f*/
}
n6a_1 = n6a + 1; /*0xffc9824b*/
n6a = n6a_1; /*0xffc9824d*/
}
while ( n6a_1 < *(_BYTE *)(n6_1 + 244317) ); /*0xffc98257*/
}
v31 = CpuIoRead(n6_1, n4, 0, 50348636); /*0xffc9826a*/
CpuIoCfgWrite(n6_1, n4, 0, 50348636, v31 & 0xFFFFFFFE); /*0xffc9827b*/
}
DebugPrint(n6_1, 2, 255, 255, 255, 255, 255, 255, "\n</SetSpareMode>\n"); /*0xffc98296*/
}
}
// Function: MemChipFunc82A6 @ 0xffc982a6 (0x3a5 bytes)
// Index: 1163/2560
_BYTE *__cdecl MemChipFunc82A6(int __return_address, int n2)
{
int __return_address_1; // edi
int v3; // eax
unsigned int n6_1; // ebx
unsigned int v5; // ecx
_BYTE *v6; // ebp
unsigned int v7; // esi
int v8; // eax
unsigned __int8 v9; // bl
unsigned int v10; // esi
char n3; // al
int v12; // eax
unsigned __int8 n2_1; // bp
_BYTE *SocketInfo; // esi
unsigned __int8 __return_address_2; // al
int v16; // eax
_BYTE *result; // eax
_BYTE *v18; // esi
int v19; // eax
bool v20; // zf
int v21; // eax
_BYTE *v22; // esi
int v23; // ebp
unsigned __int8 v24; // bl
int v25; // eax
_BYTE *v26; // [esp+10h] [ebp-10h]
int n6; // [esp+10h] [ebp-10h]
unsigned int n6_2; // [esp+14h] [ebp-Ch]
int v29; // [esp+18h] [ebp-8h]
_BYTE *v30; // [esp+18h] [ebp-8h]
__return_address_1 = __return_address; /*0xffc982ad*/
if ( *(char *)(__return_address + 257309) >= 0 ) /*0xffc982bd*/
{
n2_1 = n2; /*0xffc9843b*/
n6_1 = 0; /*0xffc98446*/
SocketInfo = (_BYTE *)GetSocketInfo(__return_address, n2); /*0xffc98448*/
__return_address_2 = 0; /*0xffc9844b*/
n6_2 = 0; /*0xffc9844d*/
LOBYTE(__return_address) = 0; /*0xffc98452*/
do /*0xffc9849a*/
{
if ( *SocketInfo ) /*0xffc98456*/
{
v16 = MiscConfigCheck((unsigned __int8 *)__return_address_1, n2, __return_address, 184567560); /*0xffc98465*/
MiscIoCheck( /*0xffc98480*/
(unsigned __int8 *)__return_address_1,
n2,
__return_address,
0xB004708u,
v16 & 0xFC3FFFFF | 0x2000000);
__return_address_2 = __return_address; /*0xffc98485*/
}
++__return_address_2; /*0xffc9848c*/
SocketInfo += 7688; /*0xffc9848e*/
LOBYTE(__return_address) = __return_address_2; /*0xffc98494*/
}
while ( __return_address_2 < 6u ); /*0xffc9849a*/
}
else
{
DebugPrint( /*0xffc982d9*/
__return_address,
2,
255,
255,
255,
255,
255,
255,
"\n<SetVLSModePerChannel(socket = %d)>\n",
(unsigned __int8)n2);
v3 = GetSocketInfo(__return_address, n2); /*0xffc982e0*/
n6_1 = 0; /*0xffc982e5*/
n6_2 = 0; /*0xffc982ea*/
if ( !*(_DWORD *)(__return_address + 246404) ) /*0xffc982ee*/
{
v5 = 0; /*0xffc982fa*/
LOBYTE(__return_address) = 0; /*0xffc982fc*/
v6 = (_BYTE *)(v3 + 6739); /*0xffc98300*/
v29 = 0; /*0xffc98306*/
v26 = (_BYTE *)(v3 + 6739); /*0xffc9830a*/
do /*0xffc98417*/
{
if ( *(v6 - 6739) ) /*0xffc9830e*/
{
v7 = v5 / 3; /*0xffc98345*/
v8 = MailBoxFunc8E0B(n2, __return_address_1, n2, v5 / 3, 100679908); /*0xffc9834a*/
MailBoxFunc8FC5(__return_address_1, n2, v7, 100679908, v8 | 2); /*0xffc9835b*/
v9 = v6[1] - *v6; /*0xffc98363*/
v10 = ((v9 << 22) - 29360129) & 0x3C00000 /*0xffc98394*/
| MiscConfigCheck((unsigned __int8 *)__return_address_1, n2, __return_address, 184567560) & 0xFC3FFFFF;
MiscIoCheck((unsigned __int8 *)__return_address_1, n2, __return_address, 0xB004708u, v10); /*0xffc983a2*/
n3 = *(_BYTE *)(__return_address_1 + 246424); /*0xffc983a7*/
if ( n3 == 3 || n3 == 4 || n3 == 5 ) /*0xffc983ba*/
{
v12 = MiscConfigCheck((unsigned __int8 *)__return_address_1, n2, __return_address, 184632072); /*0xffc983c8*/
MiscIoCheck( /*0xffc983e7*/
(unsigned __int8 *)__return_address_1,
n2,
__return_address,
0xB014308u,
v12 ^ ((unsigned __int8)v12 ^ (unsigned __int8)(v12 + ((v10 >> 22) & 0xF) - 4)) & 0x7F);
}
v6 = v26; /*0xffc983ef*/
}
else
{
DebugPrint( /*0xffc98326*/
__return_address_1,
2,
255,
255,
255,
255,
255,
255,
"\nch=%d Channel not enabled, skipping it \n",
v5);
}
v6 += 7688; /*0xffc983fc*/
v5 = v29 + 1; /*0xffc98408*/
LOBYTE(__return_address) = __return_address + 1; /*0xffc98409*/
++v29; /*0xffc9840d*/
v26 = v6; /*0xffc98411*/
}
while ( (unsigned __int8)__return_address < 6u ); /*0xffc98417*/
n6_1 = 0; /*0xffc9841d*/
}
DebugPrint(__return_address_1, 2, 255, 255, 255, 255, 255, 255, "\n</SetVLSModePerChannel>\n"); /*0xffc9842d*/
n2_1 = n2; /*0xffc98432*/
}
result = (_BYTE *)GetSocketInfo(__return_address_1, n2_1); /*0xffc9849e*/
v18 = result; /*0xffc984a3*/
v30 = result; /*0xffc984a7*/
if ( !*(_DWORD *)(__return_address_1 + 246404) ) /*0xffc984ab*/
{
DebugPrint(__return_address_1, 2, 255, 255, 255, 255, 255, 255, "\n Program drainrttimer\n"); /*0xffc984ca*/
n6 = 6; /*0xffc984d6*/
do /*0xffc98548*/
{
if ( *v18 ) /*0xffc984de*/
{
v19 = MailBoxFunc8E0B(n6_1, __return_address_1, n2_1, n6_1 / 3, 100679948); /*0xffc98514*/
result = (_BYTE *)MailBoxFunc8FC5(__return_address_1, n2_1, n6_1 / 3, 100679948, v19 & 0xFFFF0003 | 0x1E0); /*0xffc9852c*/
v18 = v30; /*0xffc98531*/
}
else
{
result = (_BYTE *)DebugPrint( /*0xffc984f7*/
__return_address_1,
2,
255,
255,
255,
255,
255,
255,
"\nch=%d Channel not enabled \n",
n6_1);
}
v18 += 7688; /*0xffc98538*/
++n6_1; /*0xffc9853e*/
v20 = n6-- == 1; /*0xffc9853f*/
v30 = v18; /*0xffc98544*/
}
while ( !v20 ); /*0xffc98548*/
n6_1 = 0; /*0xffc9854a*/
}
if ( (*(_BYTE *)(__return_address_1 + 257310) & 0x40) != 0 ) /*0xffc98553*/
{
DebugPrint(__return_address_1, 2, 255, 255, 255, 255, 255, 255, "\t ADDDC enabled\n", (unsigned __int8)n2); /*0xffc98574*/
v21 = GetSocketInfo(__return_address_1, n2); /*0xffc9857e*/
if ( !*(_DWORD *)(__return_address_1 + 246404) ) /*0xffc98586*/
{
LOBYTE(__return_address) = 0; /*0xffc98592*/
v22 = (_BYTE *)(v21 + 6739); /*0xffc98596*/
v23 = 0; /*0xffc9859c*/
do /*0xffc98622*/
{
if ( *(v22 - 6739) ) /*0xffc9859e*/
{
v24 = v22[1] - *v22; /*0xffc985c8*/
v25 = MiscConfigCheck((unsigned __int8 *)__return_address_1, n2, __return_address, 184567560); /*0xffc985d8*/
MiscIoCheck( /*0xffc98602*/
(unsigned __int8 *)__return_address_1,
n2,
__return_address,
0xB004708u,
((v24 + 5) << 18) & 0x3C0000 | (unsigned int)&loc_FFC3FFFF & v25);
n6_1 = n6_2; /*0xffc98607*/
}
else
{
DebugPrint( /*0xffc985bb*/
__return_address_1,
2,
255,
255,
255,
255,
255,
255,
"\nch=%d Channel not enabled, skipping it \n",
v23);
}
LOBYTE(n6_1) = n6_1 + 1; /*0xffc9860e*/
v22 += 7688; /*0xffc98610*/
++v23; /*0xffc98616*/
n6_2 = n6_1; /*0xffc98617*/
LOBYTE(__return_address) = n6_1; /*0xffc9861b*/
}
while ( (unsigned __int8)n6_1 < 6u ); /*0xffc98622*/
}
return (_BYTE *)DebugPrint(__return_address_1, 2, 255, 255, 255, 255, 255, 255, "\n</ADDDC enabled>\n"); /*0xffc9863b*/
}
return result; /*0xffc98643*/
}
// Function: MemChipFunc864B @ 0xffc9864b (0x38e bytes)
// Index: 1164/2560
void __cdecl MemChipFunc864B(int __return_address, int n2)
{
int SocketInfo; // edi
int n2_1; // ecx
unsigned __int8 *v5; // edi
_BYTE *v6; // esi
unsigned __int8 n4_1; // al
int n2_2; // ebp
unsigned int v9; // esi
unsigned __int8 n4_3; // cl
int n117457456; // eax
unsigned int v12; // esi
bool v13; // zf
unsigned __int8 n4; // [esp+7h] [ebp-1Dh]
int n6; // [esp+8h] [ebp-1Ch]
int v16; // [esp+Ch] [ebp-18h]
unsigned int n117457456_1; // [esp+10h] [ebp-14h]
unsigned int v18; // [esp+14h] [ebp-10h]
int n4_4; // [esp+18h] [ebp-Ch]
_BYTE *v20; // [esp+1Ch] [ebp-8h]
unsigned __int8 *v21; // [esp+20h] [ebp-4h]
unsigned __int8 n4_2; // [esp+28h] [ebp+4h]
int v23; // [esp+28h] [ebp+4h]
if ( *(char *)(__return_address + 257309) < 0 ) /*0xffc9865a*/
{
SocketInfo = GetSocketInfo(__return_address, n2); /*0xffc98673*/
DebugPrint(__return_address, 2, n2, 255, 255, 255, 255, 255, "\n<SetVLSRegionPerChannel\n"); /*0xffc98683*/
v18 = 0; /*0xffc98688*/
n2_1 = n2; /*0xffc98693*/
LOBYTE(n6) = 0; /*0xffc98695*/
v5 = (unsigned __int8 *)(SocketInfo + 415); /*0xffc9869d*/
v21 = v5; /*0xffc986ac*/
v6 = (_BYTE *)(48704 * (unsigned __int8)n2 + __return_address + 259118); /*0xffc986b0*/
v20 = v6; /*0xffc986b2*/
while ( 1 ) /*0xffc986da*/
{
DebugPrint( /*0xffc986da*/
__return_address,
2,
n2_1,
n6,
255,
255,
255,
255,
"\n<SetVLSRegionPerChannel(Enable:%d)>\n",
(unsigned __int8)*(v6 - 396));
if ( *(v5 - 415) ) /*0xffc986e2*/
{
if ( *v6 == 1 && v6[1379] == 1 ) /*0xffc986fb*/
{
n4_1 = *v5; /*0xffc986fd*/
n4 = 4; /*0xffc986ff*/
}
else
{
n4_1 = *v5 >> 1; /*0xffc98708*/
n4 = n4_1; /*0xffc9870a*/
}
n2_2 = n2; /*0xffc9871b*/
n4_2 = n4_1; /*0xffc98723*/
DebugPrint(__return_address, 2, n2, n6, 255, 255, 255, 255, "<SetVLSRegionPerChannel>\n"); /*0xffc98727*/
v9 = MailBoxFunc8E0B(__return_address, __return_address, n2, v18 / 3, 117459068) | 0x1000000; /*0xffc98748*/
MailBoxFunc8FC5(__return_address, n2, v18 / 3, 117459068, v9); /*0xffc98757*/
DebugPrint(__return_address, 2, n2, n6, 255, 255, 255, 255, "<MCMTR_MC_MAIN.adddc_mode = %d>\n", HIBYTE(v9) & 1); /*0xffc9877d*/
n4_3 = n4_2; /*0xffc98782*/
if ( n4_2 ) /*0xffc9878b*/
{
v23 = 0; /*0xffc98796*/
v16 = n4 << 16; /*0xffc9879e*/
n117457456 = 117457456; /*0xffc987a2*/
n117457456_1 = 117457456; /*0xffc987aa*/
n4_4 = n4_3; /*0xffc987ae*/
do /*0xffc9894a*/
{
v12 = v16 & 0x70000 /*0xffc987da*/
| (16 * (v23 & 7))
| MiscConfigCheck((unsigned __int8 *)__return_address, n2, n6, n117457456) & 0xD0880887
| 5;
MiscIoCheck((unsigned __int8 *)__return_address, n2, n6, n117457456_1, v12); /*0xffc987e5*/
DebugPrint( /*0xffc98807*/
__return_address,
2,
n2,
n6,
255,
255,
255,
255,
"\n <ADDDC_REGION%d_CONTROL.region_enable = %d>\n",
v23,
v12 & 1);
DebugPrint( /*0xffc9882f*/
__return_address,
2,
n2,
n6,
255,
255,
255,
255,
"<ADDDC_REGION%d_CONTROL.failed_cs = %d>\n",
v23,
(v12 >> 4) & 7);
DebugPrint( /*0xffc9884d*/
__return_address,
2,
n2,
n6,
255,
255,
255,
255,
"<ADDDC_REGION%d_CONTROL.failed_c = %d>\n",
v23,
0);
DebugPrint( /*0xffc9886e*/
__return_address,
2,
n2,
n6,
255,
255,
255,
255,
"<ADDDC_REGION%d_CONTROL.failed_ba = %d>\n",
v23,
0);
DebugPrint( /*0xffc9888c*/
__return_address,
2,
n2,
n6,
255,
255,
255,
255,
"<ADDDC_REGION%d_CONTROL.failed_bg = %d>\n",
v23,
0);
DebugPrint( /*0xffc988b3*/
__return_address,
2,
n2,
n6,
255,
255,
255,
255,
"<ADDDC_REGION%d_CONTROL.nonfailed_cs = %d>\n",
v23,
HIWORD(v12) & 7);
DebugPrint( /*0xffc988ce*/
__return_address,
2,
n2,
n6,
255,
255,
255,
255,
"<ADDDC_REGION%d_CONTROL.nonfailed_c = %d>\n",
v23,
0);
DebugPrint( /*0xffc988ec*/
__return_address,
2,
n2,
n6,
255,
255,
255,
255,
"<ADDDC_REGION%d_CONTROL.nonfailed_ba = %d>\n",
v23,
0);
DebugPrint( /*0xffc98907*/
__return_address,
2,
n2,
n6,
255,
255,
255,
255,
"<ADDDC_REGION%d_CONTROL.nonfailed_bg = %d>\n",
v23,
0);
DebugPrint( /*0xffc98925*/
__return_address,
2,
n2,
n6,
255,
255,
255,
255,
"<ADDDC_REGION%d_CONTROL.copy_in_progress = %d>\n",
v23,
0);
v16 += 0x10000; /*0xffc98931*/
n117457456 = n117457456_1 + 4; /*0xffc9893a*/
++v23; /*0xffc9893d*/
v13 = n4_4-- == 1; /*0xffc98941*/
n117457456_1 += 4; /*0xffc98946*/
}
while ( !v13 ); /*0xffc9894a*/
}
DebugPrint(__return_address, 2, n2, n6, 255, 255, 255, 255, "</SetVLSRegionPerChannel ch>\n"); /*0xffc98963*/
v6 = v20; /*0xffc98968*/
v5 = v21; /*0xffc9896f*/
}
else
{
n2_2 = n2; /*0xffc98975*/
}
v6 += 7688; /*0xffc98984*/
++v18; /*0xffc98986*/
v5 += 7688; /*0xffc9898a*/
LOBYTE(n6) = n6 + 1; /*0xffc9898c*/
v20 = v6; /*0xffc98990*/
v21 = v5; /*0xffc98994*/
if ( (unsigned __int8)n6 >= 6u ) /*0xffc9899a*/
break; /*0xffc9899a*/
n2_1 = n2; /*0xffc986b8*/
}
DebugPrint(__return_address, 2, n2_2, 255, 255, 255, 255, 255, "Lockstep enabled\n"); /*0xffc989b3*/
DebugPrint(__return_address, 2, n2_2, n6, 255, 255, 255, 255, "</SetVLSRegionPerChannel>\n"); /*0xffc989c9*/
}
}
// Function: MemChipFunc89D9 @ 0xffc989d9 (0x137 bytes)
// Index: 1165/2560
int __cdecl MemChipFunc89D9(int a1, unsigned __int8 n4, unsigned __int8 n0x17, int a4)
{
unsigned __int8 n4_2; // bl
unsigned __int8 n0x17_1; // cl
int n0x17_2; // edx
int v7; // ebp
unsigned int v8; // edi
int v9; // edi
char v10; // al
unsigned __int8 n4_1; // al
char v13; // [esp+13h] [ebp-9h]
int n0x17_3; // [esp+14h] [ebp-8h]
unsigned int v15; // [esp+18h] [ebp-4h]
unsigned __int8 n0x17a; // [esp+28h] [ebp+Ch]
n4_2 = 0; /*0xffc989f6*/
v13 = 0; /*0xffc989f9*/
DebugPrint(a1, 2, 255, 255, 255, 255, 255, 255, "<UpdateSADTAD>\n"); /*0xffc989fd*/
n0x17_1 = n0x17; /*0xffc98a0d*/
n0x17_2 = n0x17; /*0xffc98a1e*/
n0x17_3 = n0x17; /*0xffc98a21*/
v7 = 50813 * n4 + a1 + 58799; /*0xffc98a25*/
v8 = *(_DWORD *)(19 * n0x17 + v7 + 4); /*0xffc98a2a*/
v15 = v8; /*0xffc98a2e*/
if ( n0x17 < 0x17u )
{
do
{
v9 = 19 * n0x17_1; /*0xffc98a3a*/
if ( !*(_BYTE *)(v9 + v7) ) /*0xffc98a3d*/
break; /*0xffc98a40*/
if ( *(_BYTE *)(v9 + v7 + 17) != 2 || v13 )
{
if ( *(_DWORD *)(v9 + v7 + 4) == 64 )
{
v10 = 0; /*0xffc98a56*/
}
else
{
DebugPrint(
a1,
2,
255,
255,
255,
255,
255,
255,
"UpdateSADTAD: Socket: %x,Reducing sad %d Limit =%d by %d\n",
n4,
n0x17_1,
*(_DWORD *)(v9 + v7 + 4),
a4);
*(_DWORD *)(v9 + v7 + 4) -= a4; /*0xffc98a86*/
v10 = 1; /*0xffc98a8a*/
n0x17_1 = n0x17; /*0xffc98a8c*/
}
v13 = v10; /*0xffc98a90*/
}
n0x17 = ++n0x17_1; /*0xffc98a96*/
}
while ( n0x17_1 < 0x17u );
n0x17_2 = n0x17_3; /*0xffc98a9f*/
v8 = v15; /*0xffc98aa3*/
}
DebugPrint(a1, 2, 255, 255, 255, 255, 255, 255, "AdjustMemAddrMap Remote for SAD %d Limit\n", n0x17_2); /*0xffc98abb*/
n4_1 = n4; /*0xffc98ac0*/
n0x17a = 0; /*0xffc98ac7*/
do /*0xffc98aee*/
{
if ( n4_2 != n4_1 ) /*0xffc98acd*/
{
KtiFn_FFC931EC(a1, n0x17a, v8, a4); /*0xffc98ad9*/
n4_1 = n4; /*0xffc98ade*/
}
n0x17a = ++n4_2; /*0xffc98ae7*/
}
while ( n4_2 < 4u ); /*0xffc98aee*/
DebugPrint(a1, 2, 255, 255, 255, 255, 255, 255, "/<UpdateSADTAD>\n"); /*0xffc98afe*/
return 0; /*0xffc98b08*/
}
// Function: MemChipFunc8B10 @ 0xffc98b10 (0x4cd bytes)
// Index: 1166/2560
char __cdecl MemChipFunc8B10(int __return_address)
{
int __return_address_1; // ebx
unsigned __int8 v2; // al
unsigned __int8 n4_1; // al
_BYTE *v4; // ecx
int v5; // ebp
int v6; // esi
unsigned int v7; // edi
int v8; // edi
char v9; // cl
unsigned int v10; // esi
int v11; // esi
int v12; // esi
_BYTE *v13; // ebp
unsigned __int8 v14; // bl
_BYTE *v15; // eax
int n2; // ecx
char n2_1; // cl
unsigned int v18; // ebp
int v19; // edi
_BYTE *v20; // esi
unsigned int n2_2; // edx
unsigned __int8 v22; // dl
int v23; // eax
char v24; // al
bool v25; // zf
char v27; // [esp+Dh] [ebp-1Bh]
char v28; // [esp+Eh] [ebp-1Ah]
unsigned __int8 v29; // [esp+Fh] [ebp-19h]
int n4; // [esp+10h] [ebp-18h]
int n4a; // [esp+10h] [ebp-18h]
_BYTE *v32; // [esp+14h] [ebp-14h]
int v33; // [esp+18h] [ebp-10h]
int v34; // [esp+1Ch] [ebp-Ch]
char v35; // [esp+20h] [ebp-8h]
int n4_2; // [esp+20h] [ebp-8h]
__return_address_1 = __return_address; /... [9607 chars total]
// Function: MemChipFunc8FDD @ 0xffc98fdd (0xb1 bytes)
// Index: 1167/2560
char __cdecl MemChipFunc8FDD(int __return_address, int n4, int a3)
{
char n2; // bl
int n4_1; // ecx
unsigned __int8 n6; // bh
_BYTE *v6; // edi
n2 = 1; /*0xffc98fe2*/
if ( (_BYTE)a3 ) /*0xffc98fe7*/
{
if ( (_BYTE)a3 == 1 ) /*0xffc99024*/
{
n4_1 = n4; /*0xffc99026*/
n6 = 0; /*0xffc9902a*/
LOBYTE(a3) = 0; /*0xffc99046*/
v6 = (_BYTE *)(48704 * (unsigned __int8)n4 + __return_address + 258722); /*0xffc9904a*/
do /*0xffc99085*/
{
if ( *v6 && (v6[2] & 0x10) != 0 ) /*0xffc99055*/
{
DebugPrint(__return_address, 2, n4_1, a3, 255, 255, 255, 255, "\t No SDDC/ADDDC because of X8 Dimms \n"); /*0xffc99068*/
n4_1 = n4; /*0xffc9906d*/
n2 = 2; /*0xffc99074*/
}
++n6; /*0xffc99076*/
v6 += 7688; /*0xffc99078*/
LOBYTE(a3) = n6; /*0xffc9907e*/
}
while ( n6 < 6u ); /*0xffc99085*/
}
}
else if ( MemChipFunc49AD(__return_address, n4) ) /*0xffc98ff1*/
{
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "\t sVLS is not support supported\n"); /*0xffc99016*/
return 2; /*0xffc9901e*/
}
return n2; /*0xffc99089*/
}
// Function: KtiLinksMain @ 0xffc9908e (0xf1d bytes)
// Index: 1168/2560
int __cdecl KtiLinksMain(_BYTE *p_n42)
{
_BYTE *p_n42_1; // ebp
unsigned __int8 v2; // bl
int SocketInfo; // eax
int v4; // ecx
unsigned __int8 v5; // bl
int n4_1; // esi
int v7; // esi
bool v8; // zf
unsigned int v9; // ebp
int v10; // edi
int n4_2; // ebx
int p_n63_1; // esi
char *n2_1; // edx
const char *Enable_2; // ecx
int v15; // eax
int v16; // eax
int v17; // eax
int v18; // eax
int v19; // eax
int v20; // eax
int v21; // eax
_DWORD *Enable_10; // esi
_DWORD *v23; // ecx
int v24; // edi
int v25; // eax
int v26; // eax
int CpuCount; // eax
int v28; // ebx
_BYTE *CpuCount_1; // ecx
int v30; // esi
int n2_2; // eax
const char *Enable_3; // eax
unsigned __int16 v33; // ax
int Enable_9; // esi
int v35; // eax
int v36; // eax
char v37; // al
int v38; // eax
int v39; // eax
int v40; // eax
int v41; // eax
int n80; // eax
__int16 v43; // ax
int v44; // eax
int v45; // esi
char *v46; // eax
con... [28385 chars total]
// Function: MemChipFunc9FAB @ 0xffc99fab (0x13f bytes)
// Index: 1169/2560
int __cdecl MemChipFunc9FAB(unsigned __int8 *p_n42, int n4)
{
unsigned __int8 n6_1; // bl
_BYTE *SocketInfo; // edi
int v4; // ebp
int n4_1; // edi
_BYTE *CpuCount; // ecx
char n2_1; // bh
int v8; // eax
unsigned __int8 v9; // cl
int v10; // edx
int v11; // eax
int v13; // [esp+10h] [ebp-18h]
_BYTE *CpuCount_1; // [esp+14h] [ebp-14h]
unsigned __int8 n6; // [esp+18h] [ebp-10h]
char n2; // [esp+1Ch] [ebp-Ch]
_BYTE *SocketInfo_1; // [esp+20h] [ebp-8h]
int v18; // [esp+24h] [ebp-4h] BYREF
n6_1 = 0; /*0xffc99fc0*/
SocketInfo = (_BYTE *)GetSocketInfo((int)p_n42, n4); /*0xffc99fc2*/
SocketInfo_1 = SocketInfo; /*0xffc99fc6*/
v4 = 0; /*0xffc99fca*/
n6 = 0; /*0xffc99fcc*/
do /*0xffc9a0da*/
{
if ( *SocketInfo ) /*0xffc99fd0*/
{
n4_1 = n4; /*0xffc99fdd*/
CpuCount = (_BYTE *)GetCpuCount((int)p_n42, n4, n6); /*0xffc99fe8*/
n2_1 = 0; /*0xffc99fea*/
CpuCount_1 = CpuCount; /*0xffc99fef*/
v8 = 0; /*0xffc99ff3*/
n2 = 0; /*0xffc99ff5*/
v13 = 0; /*0xffc99ff9*/
do /*0xffc9a0ba*/
{
if ( *CpuCount ) /*0xffc99ffd*/
{
KtiFunc66B8(p_n42, n4_1, n6, n2, &v18); /*0xffc9a015*/
v9 = v18; /*0xffc9a021*/
v10 = 6365 * (unsigned __int8)n4; /*0xffc9a028*/
p_n42[v10 + 634977 + v4 + v13] = v18; /*0xffc9a036*/
if ( v9 < p_n42[v10 + 635002] ) /*0xffc9a044*/
{
p_n42[v10 + 635001] = n6_1; /*0xffc9a046*/
p_n42[v10 + 635002] = v9; /*0xffc9a04d*/
}
if ( v9 > p_n42[v10 + 635004] ) /*0xffc9a05b*/
{
p_n42[v10 + 635003] = n6_1; /*0xffc9a05d*/
p_n42[v10 + 635004] = v9; /*0xffc9a064*/
}
v11 = v10 + 84 * (v4 + v13); /*0xffc9a074*/
if ( v9 < p_n42[v11 + 633778] ) /*0xffc9a07d*/
p_n42[v11 + 633778] = v9; /*0xffc9a07f*/
n4_1 = n4; /*0xffc9a086*/
if ( v9 > p_n42[v11 + 633779] ) /*0xffc9a091*/
p_n42[v11 + 633779] = v9; /*0xffc9a093*/
CpuCount = CpuCount_1; /*0xffc9a09a*/
v8 = v13; /*0xffc9a09e*/
}
++n2_1; /*0xffc9a0a2*/
CpuCount += 1379; /*0xffc9a0a4*/
++v8; /*0xffc9a0aa*/
n2 = n2_1; /*0xffc9a0ab*/
v13 = v8; /*0xffc9a0af*/
CpuCount_1 = CpuCount; /*0xffc9a0b3*/
}
while ( (unsigned __int8)n2_1 < 2u ); /*0xffc9a0ba*/
SocketInfo = SocketInfo_1; /*0xffc9a0c0*/
}
++n6_1; /*0xffc9a0c4*/
SocketInfo += 7688; /*0xffc9a0c6*/
v4 += 2; /*0xffc9a0cc*/
n6 = n6_1; /*0xffc9a0cf*/
SocketInfo_1 = SocketInfo; /*0xffc9a0d3*/
}
while ( n6_1 < 6u ); /*0xffc9a0da*/
return 0; /*0xffc9a0e0*/
}
// Function: MemChipFuncA0EA @ 0xffc9a0ea (0x9d bytes)
// Index: 1170/2560
unsigned __int8 __cdecl MemChipFuncA0EA(
int __return_address,
unsigned int a2,
unsigned int a3,
int a4,
int a5,
__int16 a6)
{
char v6; // cl
unsigned __int8 i_2; // bh
unsigned __int8 v8; // bl
unsigned __int8 i; // dl
unsigned __int8 n8_1; // dl
unsigned __int8 n8; // bh
char v12; // cl
unsigned __int8 i_4; // dl
unsigned __int8 i_3; // [esp+12h] [ebp-2h]
unsigned __int8 i_1; // [esp+13h] [ebp-1h]
v6 = 0; /*0xffc9a0f8*/
i_2 = 0; /*0xffc9a0fe*/
v8 = 0; /*0xffc9a105*/
i_1 = 0; /*0xffc9a112*/
for ( i = 0; i < 0x20u; ++i ) /*0xffc9a116*/
{
if ( (((a4 | a2) >> v6) & 1) != 0 ) /*0xffc9a121*/
{
i_1 = i; /*0xffc9a123*/
++v8; /*0xffc9a127*/
}
if ( (((a5 | a3) >> v6) & 1) != 0 ) /*0xffc9a12f*/
{
i_2 = i; /*0xffc9a131*/
++v8; /*0xffc9a133*/
}
++v6; /*0xffc9a137*/
}
n8_1 = 0; /*0xffc9a13d*/
i_3 = i_2; /*0xffc9a13f*/
n8 = 0; /*0xffc9a143*/
v12 = 0; /*0xffc9a145*/
do /*0xffc9a159*/
{
if ( (((unsigned __int8)(a6 | HIBYTE(a6)) >> v12) & 1) != 0 ) /*0xffc9a14d*/
{
n8_1 = n8; /*0xffc9a14f*/
++v8; /*0xffc9a151*/
}
++n8; /*0xffc9a153*/
++v12; /*0xffc9a155*/
}
while ( n8 < 8u ); /*0xffc9a159*/
if ( n8_1 ) /*0xffc9a161*/
{
i_4 = n8_1 + 64; /*0xffc9a163*/
}
else if ( i_3 ) /*0xffc9a16a*/
{
i_4 = i_3 + 32; /*0xffc9a16f*/
}
else
{
i_4 = i_1; /*0xffc9a173*/
}
if ( v8 > 1u ) /*0xffc9a17e*/
return -1; /*0xffc9a180*/
return i_4; /*0xffc9a177*/
}
// Function: MemChipFuncA187 @ 0xffc9a187 (0x2b3 bytes)
// Index: 1171/2560
int __cdecl MemChipFuncA187(
unsigned __int8 *p_n42,
int n4,
int n6,
unsigned __int8 n5,
unsigned __int8 n2,
unsigned __int8 a6)
{
int v6; // edi
int v7; // eax
int v8; // ebp
unsigned __int8 v10; // dl
unsigned __int8 v11; // al
int n6_1; // ebp
int v13; // ecx
int CpuCount_1; // esi
int v15; // edi
char v16; // al
int v18; // [esp+10h] [ebp-48h]
int SocketInfo; // [esp+14h] [ebp-44h]
int CpuCount; // [esp+1Ch] [ebp-3Ch]
int n4a; // [esp+20h] [ebp-38h]
unsigned __int8 n4b; // [esp+20h] [ebp-38h]
unsigned __int16 v23; // [esp+24h] [ebp-34h]
unsigned __int8 n2a; // [esp+6Ch] [ebp+14h]
int n2_1; // [esp+70h] [ebp+18h]
SocketInfo = GetSocketInfo((int)p_n42, n4); /*0xffc9a1a4*/
CpuCount = GetCpuCount((int)p_n42, n4, n6); /*0xffc9a1b5*/
n4a = MiscConfigCheck(p_n42, n4, n6, 184566272); /*0xffc9a1c6*/
v6 = MiscConfigCheck(p_n42, n4, n6, 184566280); /*0xffc9a1d7*/
v7 = MiscConfigCheck(p_n42, n4, n6, 184566432); /*0xffc9a1d9*/
v18 = 7688 * (unsigned __int8)n6; /*0xffc9a1fd*/
v8 = *(unsigned __int16 *)(SocketInfo + v18 + 360); /*0xffc9a209*/
v23 = *(_WORD *)(SocketInfo + v18 + 356); /*0xffc9a215*/
n2_1 = (v7 ^ ((a6 + v8) << 16)) & 0x70000 ^ v7; /*0xffc9a251*/
v10 = *(_BYTE *)(v18 + SocketInfo + 307); /*0xffc9a259*/
*(_WORD *)(v18 + SocketInfo + 356) = v23 + n2; /*0xffc9a283*/
*(_WORD *)(SocketInfo + v18 + 360) = v8 + a6; /*0xffc9a2a3*/
*(_BYTE *)(SocketInfo + v18 + 307) = n5 + v10; /*0xffc9a2ab*/
MiscIoCheck( /*0xffc9a2bc*/
p_n42,
n4,
n6,
0xB004200u,
((unsigned __int16)n4a ^ (unsigned __int16)((n5 + (unsigned __int16)v10) << 9)) & 0x3E00 ^ n4a);
MiscIoCheck(p_n42, n4, n6, 0xB004208u, (v6 ^ ((n2 + v23) << 27)) & 0x38000000 ^ v6); /*0xffc9a2d7*/
MiscIoCheck(p_n42, n4, n6, 0xB0042A0u, n2_1); /*0xffc9a2f2*/
v11 = 0; /*0xffc9a2fb*/
LOBYTE(n2_1) = 0; /*0xffc9a304*/
if ( *(_BYTE *)(v18 + SocketInfo + 3) ) /*0xffc9a308*/
{
n6_1 = (unsigned __int8)n6; /*0xffc9a312*/
v13 = 7688 * (unsigned __int8)n6; /*0xffc9a316*/
CpuCount_1 = CpuCount; /*0xffc9a318*/
do /*0xffc9a42a*/
{
if ( *(_BYTE *)(1379 * v11 + CpuCount_1) ) /*0xffc9a325*/
{
if ( p_n42[6365 * (unsigned __int8)n4 + 635017 + 2 * n6_1 + v11] ) /*0xffc9a341*/
{
KtiFunc91AF((int)p_n42, n4, n6, n2_1); /*0xffc9a35a*/
v15 = 50813 * (unsigned __int8)n4; /*0xffc9a35f*/
n2a = 0; /*0xffc9a368*/
if ( p_n42[v15 + 10194] ) /*0xffc9a36d*/
{
do /*0xffc9a406*/
{
if ( !KtiFunc89E9((int)p_n42, n4, n6, n2_1, n2a, 0) ) /*0xffc9a38c*/
{
n4b = KtiFunc88D1((int)p_n42, n4, n6, n2_1, n2a); /*0xffc9a3a8*/
v16 = ProcCommonFuncD799(p_n42, n4, n6, n4b); /*0xffc9a3b6*/
MailBoxFunc49CA(p_n42, n4, n6, n4b, v16 + 2 * n5); /*0xffc9a3d7*/
MemChipFuncCB99(p_n42, n4, n6, n2_1, n2a); /*0xffc9a3ed*/
}
++n2a; /*0xffc9a3fb*/
}
while ( n2a < p_n42[v15 + 10194] ); /*0xffc9a406*/
n6_1 = (unsigned __int8)n6; /*0xffc9a40c*/
}
CpuCount_1 = CpuCount; /*0xffc9a410*/
}
v13 = 7688 * (unsigned __int8)n6; /*0xffc9a414*/
}
v11 = n2_1 + 1; /*0xffc9a420*/
LOBYTE(n2_1) = v11; /*0xffc9a422*/
}
while ( v11 < *(_BYTE *)(v13 + SocketInfo + 3) ); /*0xffc9a42a*/
}
return 0; /*0xffc9a430*/
}
// Function: MemChipFuncA43A @ 0xffc9a43a (0x16b bytes)
// Index: 1172/2560
int __cdecl MemChipFuncA43A(int p_n42, unsigned __int8 a2, _BYTE *p_n63)
{
int v3; // esi
int v4; // edi
int p_n42_1; // edx
unsigned __int8 n6; // bl
int v7; // ecx
int v8; // ebp
int CpuCount; // eax
int v10; // edx
int v11; // ecx
int n2; // eax
char v13; // al
unsigned __int8 n5; // al
__int16 v15; // ax
int n2_1; // [esp+10h] [ebp-18h]
int v18; // [esp+14h] [ebp-14h]
unsigned __int8 n6_1; // [esp+18h] [ebp-10h]
int v20; // [esp+1Ch] [ebp-Ch]
v3 = 0; /*0xffc9a447*/
v4 = 6365 * a2; /*0xffc9a44a*/
memset_save_flags((void *)(v4 + p_n42 + 628688), 0, 0x18DDu); /*0xffc9a462*/
p_n42_1 = p_n42; /*0xffc9a467*/
n6 = 0; /*0xffc9a46b*/
v7 = 0; /*0xffc9a46d*/
n6_1 = 0; /*0xffc9a46f*/
v20 = 0; /*0xffc9a476*/
v18 = v4 + p_n42 + 635005; /*0xffc9a492*/
do /*0xffc9a58a*/
{
v8 = v18; /*0xffc9a4a2*/
if ( ((unsigned __int8)(1 << v7) & *p_n63) != 0 ) /*0xffc9a4a6*/
{
CpuCount = GetCpuCount(p_n42_1, a2, n6_1); /*0xffc9a4b5*/
v10 = 0; /*0xffc9a4bd*/
v11 = CpuCount + 147; /*0xffc9a4bf*/
n2 = 2; /*0xffc9a4c7*/
n2_1 = 2; /*0xffc9a4c8*/
do /*0xffc9a564*/
{
if ( !*(_BYTE *)(v11 - 40) ) /*0xffc9a4cc*/
{
if ( *(_BYTE *)(v11 - 147) ) /*0xffc9a4d6*/
{
v8 = v18; /*0xffc9a4e7*/
if ( *(_WORD *)v11 == 0xAD00 ) /*0xffc9a4eb*/
{
if ( *(_WORD *)(v11 - 5) == 0x9801 ) /*0xffc9a4f6*/
{
v13 = *(_BYTE *)(v11 + 36); /*0xffc9a4f8*/
}
else if ( *(_BYTE *)(v11 + 40) == 32 ) /*0xffc9a501*/
{
v13 = *(_BYTE *)(v11 + 31); /*0xffc9a503*/
}
else
{
v13 = *(_BYTE *)(v11 + 33); /*0xffc9a508*/
}
*(_BYTE *)(v10 + v18) = v13; /*0xffc9a50b*/
n5 = *(_BYTE *)(v11 - 29); /*0xffc9a50e*/
if ( n5 >= 5u ) /*0xffc9a513*/
{
if ( n5 != 5 || (v8 = v18, *(_BYTE *)(v4 + v10 + p_n42 + 635005) != 77) ) /*0xffc9a52a*/
{
v15 = *(_WORD *)(v11 - 5); /*0xffc9a52c*/
if ( v15 == -26623 || v15 == -21248 ) /*0xffc9a53c*/
{
++v3; /*0xffc9a545*/
*(_BYTE *)(v4 + v10 + p_n42 + 635017) = 1; /*0xffc9a546*/
v8 = v18; /*0xffc9a54e*/
}
}
}
n2 = n2_1; /*0xffc9a552*/
}
}
}
++v10; /*0xffc9a556*/
v11 += 1379; /*0xffc9a557*/
n2_1 = --n2; /*0xffc9a560*/
}
while ( n2 ); /*0xffc9a564*/
p_n42_1 = p_n42; /*0xffc9a56a*/
v7 = v20; /*0xffc9a56e*/
}
++n6; /*0xffc9a572*/
++v7; /*0xffc9a577*/
n6_1 = n6; /*0xffc9a578*/
v4 += 2; /*0xffc9a57c*/
v20 = v7; /*0xffc9a57f*/
v18 = v8 + 2; /*0xffc9a583*/
}
while ( n6 < 6u ); /*0xffc9a58a*/
if ( !v3 ) /*0xffc9a592*/
*p_n63 = 0; /*0xffc9a598*/
return v3; /*0xffc9a59b*/
}
// Function: MemChipFuncA5A5 @ 0xffc9a5a5 (0x1b9 bytes)
// Index: 1173/2560
int __cdecl MemChipFuncA5A5(unsigned __int8 *__return_address, unsigned __int8 n4, int a3, int a4)
{
unsigned __int8 n6; // dl
int v5; // ebp
int v6; // ecx
unsigned __int8 n4_1; // si
int *v8; // edi
unsigned __int8 v9; // al
unsigned __int8 v10; // al
unsigned int v11; // eax
int n6_1; // [esp+10h] [ebp-Ch]
int v14; // [esp+14h] [ebp-8h]
int v15; // [esp+18h] [ebp-4h]
n6 = 0; /*0xffc9a5ad*/
v5 = a3; /*0xffc9a5b0*/
v6 = 0; /*0xffc9a5b4*/
n4_1 = n4; /*0xffc9a5b7*/
LOBYTE(n6_1) = 0; /*0xffc9a5c0*/
v8 = (int *)(a4 + 8); /*0xffc9a5c4*/
v14 = 0; /*0xffc9a5c7*/
do /*0xffc9a74e*/
{
if ( ((1 << v6) & v5) != 0 ) /*0xffc9a5d2*/
{
*(v8 - 2) = MiscConfigCheck(__return_address, n4_1, n6_1, 184567128); /*0xffc9a5f1*/
*(v8 - 1) = MiscConfigCheck(__return_address, n4_1, n6_1, 184567132); /*0xffc9a601*/
*v8 = MiscConfigCheck(__return_address, n4_1, n6_1, 184567136); /*0xffc9a611*/
v8[1] = MiscConfigCheck(__return_address, n4_1, n6_1, 184567140); /*0xffc9a61b*/
if ( __return_address[257312] ) /*0xffc9a61e*/
v8[2] = MiscConfigCheck(__return_address, n4_1, n6_1, 184567312); /*0xffc9a637*/
else
v8[2] = 0; /*0xffc9a63c*/
MiscIoCheck(__return_address, n4_1, n6_1, 0xB004558u, 0); /*0xffc9a64a*/
MiscIoCheck(__return_address, n4_1, n6_1, 0xB00455Cu, 0); /*0xffc9a659*/
MiscIoCheck(__return_address, n4_1, n6_1, 0xB004560u, 0); /*0xffc9a668*/
MiscIoCheck(__return_address, n4_1, n6_1, 0xB004564u, 0); /*0xffc9a677*/
MiscIoCheck(__return_address, n4_1, n6_1, 0xB004610u, 0); /*0xffc9a689*/
LOBYTE(v15) = DdrTrainFunc45AB((int)__return_address, n4_1, n6_1); /*0xffc9a696*/
v9 = DdrTrainFunc459C(v15, n6_1); /*0xffc9a6a0*/
v8[8] = MailBoxFunc8E0B((int)__return_address, (int)__return_address, n4, v15, 4 * v9 + 117460304) & 7; /*0xffc9a6c0*/
v10 = DdrTrainFunc459C(v15, n6_1); /*0xffc9a6c3*/
n4_1 = n4; /*0xffc9a6d7*/
v8[7] = MailBoxFunc8E0B((int)__return_address, (int)__return_address, n4, v15, 4 * v10 + 117459884) & 7; /*0xffc9a6ed*/
v8[3] = MiscConfigCheck(__return_address, n4, n6_1, 184567144); /*0xffc9a6fd*/
v8[5] = MiscConfigCheck(__return_address, n4, n6_1, 184567152) & 0x1FFFFF; /*0xffc9a712*/
v11 = MiscConfigCheck(__return_address, n4, n6_1, 184567156); /*0xffc9a715*/
n6 = n6_1; /*0xffc9a71a*/
v5 = a3; /*0xffc9a720*/
v8[4] = v11 & 0x3FC; /*0xffc9a733*/
v6 = v14; /*0xffc9a736*/
v8[6] = HIBYTE(v11) & 0xF; /*0xffc9a73a*/
}
++n6; /*0xffc9a73d*/
v8 += 11; /*0xffc9a73f*/
++v6; /*0xffc9a742*/
LOBYTE(n6_1) = n6; /*0xffc9a743*/
v14 = v6; /*0xffc9a747*/
}
while ( n6 < 6u ); /*0xffc9a74e*/
return 0; /*0xffc9a754*/
}
// Function: MemChipFuncA75E @ 0xffc9a75e (0x37 bytes)
// Index: 1174/2560
int __cdecl MemChipFuncA75E(int n6, int n4, unsigned __int8 n6a)
{
int v3; // eax
v3 = MailBoxFunc8E6B(n6, n4, n6a, 117459720, 4); /*0xffc9a773*/
return MailBoxFunc902D(n6, n4, n6a, 117459720, 4, v3 & 0xFFFFFF7F); /*0xffc9a792*/
}
// Function: MemChipFuncA795 @ 0xffc9a795 (0x8c bytes)
// Index: 1175/2560
int __cdecl MemChipFuncA795(unsigned __int8 *n6, unsigned __int8 n4, int a3)
{
int n6_1; // ebx
char v4; // si
char v6; // [esp+8h] [ebp-8h]
int v7; // [esp+Ch] [ebp-4h]
n6_1 = 0; /*0xffc9a79b*/
LOBYTE(v7) = 0; /*0xffc9a79e*/
v4 = 0; /*0xffc9a7a1*/
do /*0xffc9a816*/
{
if ( ((1 << v4) & a3) != 0 ) /*0xffc9a7ad*/
{
MiscIoCheck(n6, n4, v7, 0xB004548u, -65535); /*0xffc9a7c2*/
v6 = DdrTrainFunc45AB((int)n6, n4, v7); /*0xffc9a7da*/
if ( (MailBoxFunc8E0B(n6_1, (int)n6, n4, v6, 117459068) & 4) == 0 ) /*0xffc9a7f0*/
MiscIoCheck(n6, n4, v7, 0xB004554u, 255); /*0xffc9a805*/
}
LOBYTE(n6_1) = n6_1 + 1; /*0xffc9a80d*/
++v4; /*0xffc9a80f*/
LOBYTE(v7) = n6_1; /*0xffc9a810*/
}
while ( (unsigned __int8)n6_1 < 6u ); /*0xffc9a816*/
return 1; /*0xffc9a81a*/
}
// Function: MemChipFuncA821 @ 0xffc9a821 (0x23e bytes)
// Index: 1176/2560
int __cdecl MemChipFuncA821(
unsigned __int8 *a1,
unsigned __int8 a2,
int a3,
unsigned __int8 a4,
int a5,
char a6,
int a7)
{
unsigned __int8 n6; // bl
unsigned int v8; // esi
int v9; // edx
int CpuCount; // eax
int CpuCount_1; // edi
int v12; // eax
int v13; // ecx
int v14; // edx
char n5; // al
int v16; // edi
unsigned __int8 v17; // cl
int v18; // ebx
char v19; // al
int v20; // ecx
char v21; // al
int v22; // eax
bool v23; // zf
int v24; // eax
unsigned __int8 n8_1; // [esp+13h] [ebp-21h]
int n6_1; // [esp+14h] [ebp-20h]
int v28; // [esp+18h] [ebp-1Ch]
int v29; // [esp+1Ch] [ebp-18h]
char v30; // [esp+1Ch] [ebp-18h]
int v31; // [esp+20h] [ebp-14h]
int v32; // [esp+24h] [ebp-10h]
int v33; // [esp+28h] [ebp-Ch]
int n8; // [esp+2Ch] [ebp-8h]
unsigned int v35; // [esp+30h] [ebp-4h]
int v36; // [esp+30h] [ebp-4h]
n6 = 0; /*0xffc9a82a*/
v8 = v35; /*0xffc9a82d*/
v9 = 0; /*0xffc9a831*/
LOBYTE(n6_1) = 0; /*0xffc9a834*/
v31 = 0; /*0xffc9a838*/
do /*0xffc9aa4e*/
{
if ( ((1 << v9) & a3) != 0 ) /*0xffc9a847*/
{
CpuCount = GetCpuCount((int)a1, a2, n6_1); /*0xffc9a856*/
v9 = v31; /*0xffc9a85b*/
CpuCount_1 = CpuCount; /*0xffc9a85f*/
v29 = 6365 * a2; /*0xffc9a882*/
v12 = *(unsigned __int8 *)(v31 + 6 * a4 + a7); /*0xffc9a886*/
v13 = v29 + v12 + 2 * v31; /*0xffc9a88c*/
if ( a1[v13 + 635017] ) /*0xffc9a890*/
{
v14 = 1379 * v12; /*0xffc9a89e*/
n5 = *(_BYTE *)(1379 * v12 + CpuCount_1 + 118); /*0xffc9a8a4*/
if ( n5 == 6 ) /*0xffc9a8aa*/
{
if ( *(_BYTE *)(v14 + CpuCount_1 + 104) ) /*0xffc9a8d3*/
{
v16 = dword_FFD5B684[4 * a5]; /*0xffc9a8e1*/
v17 = byte_FFD5B688[16 * a5]; /*0xffc9a8e7*/
v18 = dword_FFD5B690[4 * a5]; /*0xffc9a8ed*/
LABEL_12:
if ( a6 ) /*0xffc9a90f*/
{
v16 = ~v16; /*0xffc9a911*/
v18 = ~v18; /*0xffc9a913*/
}
*(_DWORD *)&a1[v29 + 635037] = v16; /*0xffc9a92b*/
v32 = v17; /*0xffc9a933*/
*(_DWORD *)&a1[v29 + 635041] = v17; /*0xffc9a937*/
MiscIoCheck(a1, a2, n6_1, 0xB0044A0u, 0); /*0xffc9a93e*/
MiscIoCheck(a1, a2, n6_1, 0xB004500u, 0); /*0xffc9a953*/
n8 = 8; /*0xffc9a95b*/
v19 = 0; /*0xffc9a963*/
v33 = 0; /*0xffc9a965*/
while ( 1 ) /*0xffc9a96b*/
{
n8_1 = 0; /*0xffc9a96b*/
v20 = v19 & 0x3F; /*0xffc9a970*/
v21 = 0; /*0xffc9a973*/
v36 = v20; /*0xffc9a975*/
v30 = 0; /*0xffc9a979*/
do /*0xffc9aa1e*/
{
v8 = v20 | ((v21 & 7) << 6) | v8 & 0xFFFFFE00; /*0xffc9a98b*/
MiscIoCheck(a1, a2, n6_1, 0xB014530u, v8); /*0xffc9a99c*/
v22 = 1 << v30; /*0xffc9a9ab*/
if ( (n8_1 & 1) != 0 ) /*0xffc9a9b2*/
{
v23 = (v22 & v32) == 0; /*0xffc9a9b4*/
v24 = v18; /*0xffc9a9b8*/
if ( v23 ) /*0xffc9a9ba*/
{
v28 = v18; /*0xffc9a9bc*/
goto LABEL_22; /*0xffc9a9c0*/
}
LABEL_20:
v24 = ~v24; /*0xffc9a9ca*/
v28 = v24; /*0xffc9a9cc*/
goto LABEL_22; /*0xffc9a9d0*/
}
v23 = (v22 & v32) == 0; /*0xffc9a9c2*/
v24 = v16; /*0xffc9a9c6*/
if ( !v23 ) /*0xffc9a9c8*/
goto LABEL_20; /*0xffc9a9c8*/
v28 = v16; /*0xffc9a9d2*/
LABEL_22:
MiscIoCheck(a1, a2, n6_1, 0xB014550u, v24); /*0xffc9a9d6*/
MiscIoCheck(a1, a2, n6_1, 0xB014554u, v28); /*0xffc9a9fc*/
v21 = v30 + 1; /*0xffc9aa0e*/
++n8_1; /*0xffc9aa0f*/
++v30; /*0xffc9aa16*/
v20 = v36; /*0xffc9aa1a*/
}
while ( n8_1 < 8u ); /*0xffc9aa1e*/
v19 = v33 + 1; /*0xffc9aa28*/
v23 = n8-- == 1; /*0xffc9aa29*/
++v33; /*0xffc9aa2e*/
if ( v23 ) /*0xffc9aa32*/
{
n6 = n6_1; /*0xffc9aa38*/
v9 = v31; /*0xffc9aa3c*/
goto LABEL_25; /*0xffc9aa3c*/
}
}
}
}
else if ( n5 != 5 || a1[v13 + 635005] != 68 ) /*0xffc9a8b8*/
{
v16 = dword_FFD5B484[4 * a5]; /*0xffc9a8c1*/
v17 = byte_FFD5B488[16 * a5]; /*0xffc9a8c7*/
LABEL_11:
v18 = v16; /*0xffc9a908*/
goto LABEL_12; /*0xffc9a908*/
}
v16 = dword_FFD5B884[4 * a5]; /*0xffc9a8fc*/
v17 = byte_FFD5B888[16 * a5]; /*0xffc9a902*/
goto LABEL_11; /*0xffc9a902*/
}
}
LABEL_25:
++n6; /*0xffc9aa40*/
++v9; /*0xffc9aa42*/
LOBYTE(n6_1) = n6; /*0xffc9aa43*/
v31 = v9; /*0xffc9aa47*/
}
while ( n6 < 6u ); /*0xffc9aa4e*/
return 1; /*0xffc9aa54*/
}
// Function: MemChipFuncAA5F @ 0xffc9aa5f (0x92e bytes)
// Index: 1177/2560
int __cdecl MemChipFuncAA5F(
unsigned __int8 *p_n42,
int n4,
const char *Enable,
char n2,
int a5,
char a6,
char a7,
char n4a,
unsigned __int16 a9)
{
int n4_1; // ebx
int SocketInfo; // esi
int v11; // ebp
unsigned __int8 p_n8_1; // al
int v13; // esi
int v14; // ebp
int i_1; // eax
int CpuCount; // edx
int v17; // eax
int v18; // ecx
int v19; // eax
unsigned __int8 n6; // al
bool v21; // zf
unsigned __int8 n5; // al
unsigned __int8 *v23; // ecx
_BYTE *v24; // ebp
unsigned __int8 v25; // bp
unsigned __int8 v27; // [esp+13h] [ebp-155h]
char v28; // [esp+17h] [ebp-151h] BYREF
int p_n8; // [esp+18h] [ebp-150h] BYREF
int n6_1; // [esp+1Ch] [ebp-14Ch]
int v31; // [esp+20h] [ebp-148h]
int v32; // [esp+24h] [ebp-144h]
int i; // [esp+28h] [ebp-140h]
int v34[2]; // [esp+2Ch] [ebp-13Ch] BYREF
unsigned __int8 v35[4]; // [esp+34h] [ebp-134h]
int v36; // [esp+38h] [ebp-130h]
... [12510 chars total]
// Function: MemChipFuncB38D @ 0xffc9b38d (0x10d bytes)
// Index: 1178/2560
int __cdecl MemChipFuncB38D(unsigned __int8 *a1, unsigned __int8 a2, int a3)
{
unsigned __int8 n6; // dl
char v4; // bp
int n6_1; // [esp+10h] [ebp-4h]
n6 = 0; /*0xffc9b393*/
v4 = 0; /*0xffc9b39c*/
LOBYTE(n6_1) = 0; /*0xffc9b39e*/
do /*0xffc9b48b*/
{
if ( ((1 << v4) & a3) != 0 ) /*0xffc9b3ad*/
{
MiscIoCheck(a1, a2, n6_1, 0xB004544u, 8356096); /*0xffc9b3c4*/
MiscIoCheck(a1, a2, n6_1, 0xB004538u, 0); /*0xffc9b3d3*/
MiscIoCheck(a1, a2, n6_1, 0xB00453Cu, 0); /*0xffc9b3e2*/
MiscIoCheck(a1, a2, n6_1, 0xB004540u, 0); /*0xffc9b3f1*/
MiscIoCheck(a1, a2, n6_1, 0xB014534u, 16457); /*0xffc9b406*/
MiscIoCheck(a1, a2, n6_1, 0xB01450Cu, 11184810); /*0xffc9b418*/
MiscIoCheck(a1, a2, n6_1, 0xB014510u, 13421772); /*0xffc9b42a*/
MiscIoCheck(a1, a2, n6_1, 0xB014514u, 15790320); /*0xffc9b43c*/
MiscIoCheck(a1, a2, n6_1, 0xB014518u, 11184810); /*0xffc9b451*/
MiscIoCheck(a1, a2, n6_1, 0xB01451Cu, 13421772); /*0xffc9b463*/
MiscIoCheck(a1, a2, n6_1, 0xB014520u, 15790320); /*0xffc9b475*/
n6 = n6_1; /*0xffc9b47a*/
}
++n6; /*0xffc9b481*/
++v4; /*0xffc9b483*/
LOBYTE(n6_1) = n6; /*0xffc9b484*/
}
while ( n6 < 6u ); /*0xffc9b48b*/
return 1; /*0xffc9b491*/
}
// Function: MemChipFuncB49A @ 0xffc9b49a (0x4eb bytes)
// Index: 1179/2560
char __cdecl MemChipFuncB49A(
unsigned __int8 *n6,
int n4,
int a3,
unsigned __int8 a4,
char a5,
int a6,
int a7,
int a8,
int a9,
int a10,
int a11,
int a12,
int a13,
char a14,
char n2,
char n4a,
char a17)
{
int n4_1; // ebx
int v18; // esi
int v19; // edi
int v20; // ecx
int v21; // ebx
int v22; // edi
char n4_2; // al
unsigned __int8 v24; // al
int v25; // eax
__int16 v26; // ax
int v27; // esi
_BYTE *v29; // [esp-10h] [ebp-70h]
unsigned __int8 v30; // [esp+11h] [ebp-4Fh]
unsigned __int8 n4a_1; // [esp+12h] [ebp-4Eh]
unsigned __int8 v32; // [esp+13h] [ebp-4Dh]
int n6a; // [esp+14h] [ebp-4Ch]
int v34; // [esp+18h] [ebp-48h]
unsigned int v35; // [esp+1Ch] [ebp-44h]
__int16 v36; // [esp+20h] [ebp-40h]
int n0x4000000; // [esp+24h] [ebp-3Ch]
int n1946157284; // [esp+28h] [ebp-38h]
int v39; // [esp+2Ch] [ebp-34h]
int v40; // [esp+30h] [ebp-30h]
char *n2_1; // [esp+34h] [ebp-2Ch]
_DWORD *Enable; // [esp+38h] [ebp-28h]
int v43; // [esp+3Ch] [ebp-24h]
int SocketInfo; // [esp+44h] [ebp-1Ch]
int CpuCount; // [esp+4Ch] [ebp-14h]
int v46; // [esp+50h] [ebp-10h]
int v47; // [esp+54h] [ebp-Ch]
char v48; // [esp+58h] [ebp-8h]
char v49; // [esp+70h] [ebp+10h]
unsigned __int8 v50; // [esp+70h] [ebp+10h]
n4_1 = n4; /*0xffc9b49e*/
SocketInfo = GetSocketInfo((int)n6, n4); /*0xffc9b4b4*/
LOBYTE(n6a) = 0; /*0xffc9b4bd*/
v43 = a4; /*0xffc9b4c1*/
v34 = 0; /*0xffc9b4c5*/
v40 = 0; /*0xffc9b4c9*/
do /*0xffc9b968*/
{
v18 = 0; /*0xffc9b4d1*/
n4a_1 = n4a; /*0xffc9b4e1*/
v49 = 0; /*0xffc9b4e7*/
v39 = 0; /*0xffc9b4ee*/
n1946157284 = 0; /*0xffc9b4f2*/
MemChipFuncD0FB(n6, n4_1, a3, n6a, 0, 0); /*0xffc9b4f6*/
v48 = DdrTrainFunc45AB((int)n6, n4_1, n6a); /*0xffc9b50a*/
if ( ((1 << v34) & a3) == 0 /*0xffc9b551*/
|| !n6[48704 * (unsigned __int8)n4_1 + 258722 + v40]
|| !*(_BYTE *)(v40 + SocketInfo + 6262) && a5 )
{
MemChipFuncA75E((int)n6, n4_1, n6a); /*0xffc9b93c*/
v20 = v34; /*0xffc9b941*/
LABEL_34:
v27 = a3; /*0xffc9b948*/
goto LABEL_35; /*0xffc9b948*/
}
v19 = 6 * v43; /*0xffc9b55f*/
CpuCount = GetCpuCount((int)n6, n4_1, n6a); /*0xffc9b573*/
v47 = 6365 * (unsigned __int8)n4_1; /*0xffc9b580*/
LOBYTE(Enable) = *(_BYTE *)(6 * v43 + v34 + a10); /*0xffc9b58a*/
v20 = v34; /*0xffc9b58e*/
v46 = v47 + (unsigned __int8)Enable + 2 * v34; /*0xffc9b59b*/
if ( !n6[v46 + 635017] ) /*0xffc9b5a7*/
goto LABEL_34; /*0xffc9b5a7*/
v21 = v34 + v19; /*0xffc9b5b1*/
n0x4000000 = 0; /*0xffc9b5b4*/
v30 = *(_BYTE *)(v34 + v19 + a7); /*0xffc9b5db*/
v32 = *(_BYTE *)(v34 + v19 + a6) - 3; /*0xffc9b5e6*/
v50 = *(_BYTE *)(v34 + v19 + a8); /*0xffc9b5f8*/
v35 = 8 * (((1 << v32) - 1) & 0x3FFFF | ((((unsigned __int8)(1 << v50) - 1) & 0xF) << 21)); /*0xffc9b61b*/
v36 = v30; /*0xffc9b626*/
v22 = ((1 << v30) - 1) & 0x3FFFF; /*0xffc9b62d*/
MiscIoCheck(n6, n4, n6a, 0xB00454Cu, 0); /*0xffc9b633*/
MiscIoCheck(n6, n4, n6a, 0xB004550u, 0); /*0xffc9b64b*/
MiscIoCheck(n6, n4, n6a, 0xB004554u, 0); /*0xffc9b663*/
LOBYTE(n2_1) = *(_BYTE *)(v21 + a13); /*0xffc9b67c*/
if ( !n4a ) /*0xffc9b682*/
goto LABEL_20; /*0xffc9b682*/
if ( *(_WORD *)(1379 * (unsigned __int8)Enable + CpuCount + 147) != 0xAD00 || !n6[v46 + 635017] ) /*0xffc9b6ab*/
{
n0x4000000 = 0; /*0xffc9b762*/
v35 = 0; /*0xffc9b767*/
v22 = 0; /*0xffc9b76c*/
LABEL_20:
n4_1 = n4; /*0xffc9b76e*/
goto LABEL_21; /*0xffc9b76e*/
}
if ( 4 << (*(_BYTE *)(1379 * (unsigned __int8)Enable + CpuCount + 110) & 7) == 8 && n4a == 8 ) /*0xffc9b6cd*/
{
n4_2 = 4; /*0xffc9b6cf*/
n4a_1 = 4; /*0xffc9b6d1*/
}
else
{
n4_2 = n4a; /*0xffc9b6d7*/
}
n4_1 = n4; /*0xffc9b6db*/
if ( n4_2 == 4 ) /*0xffc9b6e1*/
{
--v50; /*0xffc9b706*/
v24 = v30 - 1; /*0xffc9b70a*/
v29 = &byte_FFD5B458; /*0xffc9b712*/
}
else
{
if ( n4_2 != 8 ) /*0xffc9b6e5*/
goto LABEL_21; /*0xffc9b6e5*/
--v50; /*0xffc9b6ef*/
v24 = v30 - 2; /*0xffc9b6f3*/
v29 = &unk_FFD5B43C; /*0xffc9b6fb*/
}
v30 = v24; /*0xffc9b71b*/
v36 = v24; /*0xffc9b72f*/
n0x4000000 = 0x4000000; /*0xffc9b743*/
v35 = v35 & 0xF0FFFFFF | 0xB000000; /*0xffc9b74d*/
v22 = ((1 << v24) - 1) & 0x3FFFF; /*0xffc9b752*/
MemChipFuncBE68(n6, n4, n6a, Enable, n2_1, v29, 0xFu, 3, 0); /*0xffc9b758*/
LABEL_21:
v49 = v32 + v30 + v50; /*0xffc9b772*/
n6[8 * v34 + 634925 + v43 + v47] = n4a_1; /*0xffc9b79f*/
DdrTrainFuncE35((int)n6, n4_1, n6a, 1 << v43, 0xAu, a5); /*0xffc9b7b8*/
v25 = MiscConfigCheck(n6, n4_1, n6a, 117525076); /*0xffc9b7c8*/
MiscIoCheck(n6, n4_1, n6a, 0x7014A54u, v25 & 0xFFFF3FFF); /*0xffc9b7de*/
if ( !n2 ) /*0xffc9b7f1*/
{
v26 = v36; /*0xffc9b816*/
v18 = ((v32 & 0x1F) << 26) | 1; /*0xffc9b820*/
n1946157284 = 1946157284; /*0xffc9b823*/
goto LABEL_25; /*0xffc9b823*/
}
if ( n2 == 2 ) /*0xffc9b7f7*/
{
v26 = v36; /*0xffc9b7f9*/
n1946157284 = 1946157281; /*0xffc9b802*/
v18 = (v36 & 0x1F | 0x40) << 8; /*0xffc9b80d*/
LABEL_25:
v39 = (16 * (v32 + v26)) & 0x1F0; /*0xffc9b82b*/
}
MailBoxFunc8FC5((int)n6, n4_1, v48, 117459948, 0xFFFF); /*0xffc9b83b*/
MemChipFuncCA49(n6, n4_1, n6a, a17 != 0); /*0xffc9b869*/
if ( a14 == 1 ) /*0xffc9b879*/
{
MailBoxFunc902D((int)n6, n4_1, n6a, 117459984, 80, 34603137); /*0xffc9b88d*/
MailBoxFunc902D((int)n6, n4_1, n6a, 117459992, 80, 33554561); /*0xffc9b897*/
}
else if ( a17 ) /*0xffc9b8a1*/
{
MailBoxFunc902D((int)n6, n4_1, n6a, 117459984, 80, 1107296385); /*0xffc9b8b5*/
MailBoxFunc902D((int)n6, n4_1, n6a, 117459992, 80, 1108344961); /*0xffc9b8cc*/
}
else
{
MailBoxFunc902D((int)n6, n4_1, n6a, 117459984, 80, 33554561); /*0xffc9b8e8*/
}
MemChipFuncBB76(n6, n4_1, n6a, v18, v39, n0x4000000, 0, v35, v22, n1946157284); /*0xffc9b90a*/
v27 = a3; /*0xffc9b916*/
MemChipFuncD0FB(n6, n4_1, a3, n6a, v49, a17); /*0xffc9b92b*/
v20 = v34; /*0xffc9b930*/
LABEL_35:
v40 += 7688; /*0xffc9b94c*/
LOBYTE(n6a) = n6a + 1; /*0xffc9b95b*/
v34 = v20 + 1; /*0xffc9b95f*/
}
while ( (unsigned __int8)n6a < 6u ); /*0xffc9b968*/
MemChipFuncA795(n6, n4_1, v27); /*0xffc9b971*/
return v49; /*0xffc9b97d*/
}
// Function: MemChipFuncB985 @ 0xffc9b985 (0x1f1 bytes)
// Index: 1180/2560
int __cdecl MemChipFuncB985(
unsigned __int8 *__return_address,
int n4,
int a3,
char a4,
char a5,
unsigned __int8 a6,
char a7,
int a8)
{
int v8; // ebx
unsigned __int8 n6; // dl
unsigned int v10; // esi
int v11; // edi
__int64 v12; // kr00_8
__int64 v13; // kr08_8
unsigned int v14; // ecx
unsigned __int8 n2; // al
unsigned __int8 n2_1; // [esp+13h] [ebp-1Dh]
unsigned int v18; // [esp+14h] [ebp-1Ch]
unsigned int v19; // [esp+18h] [ebp-18h]
unsigned __int8 n6_1; // [esp+1Ch] [ebp-14h]
int v21; // [esp+20h] [ebp-10h]
char v22; // [esp+24h] [ebp-Ch]
char v23; // [esp+28h] [ebp-8h]
v8 = 0; /*0xffc9b98e*/
n6 = 0; /*0xffc9b991*/
LOBYTE(v21) = 0; /*0xffc9b993*/
v10 = 0; /*0xffc9b997*/
n6_1 = 0; /*0xffc9b999*/
v11 = a3; /*0xffc9b99e*/
v19 = 0; /*0xffc9b9a2*/
do /*0xffc9bb33*/
{
if ( ((1 << v10) & v11) != 0 ) /*0xffc9b9af*/
{
v22 = DdrTrainFunc45AB((int)__return_address, n4, n6_1); /*0xffc9b9cc*/
n2_1 = __return_address[9475]; /*0xffc9b9d0*/
if ( ((unsigned __int8)(1 << v22) & (unsigned __int8)v21) == 0 ) /*0xffc9b9e6*/
{
v12 = KtiFunc9D6(); /*0xffc9b9f5*/
do /*0xffc9ba4e*/
{
v23 = MailBoxFunc8E0B(0, (int)__return_address, n4, v22, 117459712); /*0xffc9ba0d*/
if ( (unsigned int)KtiFuncA21((int)__return_address, v12, SHIDWORD(v12)) > 0x8F0D180 ) /*0xffc9ba1e*/
break; /*0xffc9ba1e*/
if ( !a4 ) /*0xffc9ba25*/
MemChipFuncBC17(__return_address, n4, a3, 0, a5, a6, a7, a8); /*0xffc9ba41*/
}
while ( (v23 & 5) != 0 ); /*0xffc9ba4e*/
v13 = KtiFunc9D6(); /*0xffc9ba59*/
do /*0xffc9bb11*/
{
LOBYTE(v18) = 1; /*0xffc9ba64*/
v14 = MailBoxFunc8E0B(v8, (int)__return_address, n4, v22, 117459716); /*0xffc9ba73*/
n2 = n2_1; /*0xffc9ba78*/
if ( n2_1 ) /*0xffc9ba7e*/
{
n2 = n2_1; /*0xffc9ba8b*/
if ( !(v19 % n2_1) ) /*0xffc9ba89*/
v18 = HIWORD(v14) & 0xFFFFFF01; /*0xffc9ba9e*/
}
if ( n2 > 1u ) /*0xffc9baa4*/
{
if ( v19 % n2 == 1 ) /*0xffc9bab4*/
LOBYTE(v18) = (v14 >> 17) & v18; /*0xffc9babb*/
n2 = n2_1; /*0xffc9babf*/
}
if ( n2 <= 2u ) /*0xffc9bac5*/
{
v8 = v18; /*0xffc9bae2*/
}
else
{
v8 = v18; /*0xffc9bad2*/
if ( v19 % n2 == 2 ) /*0xffc9bad9*/
LOBYTE(v8) = (v14 >> 18) & v18; /*0xffc9bade*/
}
if ( (_BYTE)v8 == 1 ) /*0xffc9bae9*/
v21 = (unsigned __int8)v21 | (1 << v22); /*0xffc9baf9*/
}
while ( (unsigned int)KtiFuncA21((int)__return_address, v13, SHIDWORD(v13)) <= 0x8F0D180 && !(_BYTE)v8 ); /*0xffc9bb11*/
v10 = v19; /*0xffc9bb17*/
v8 = 0; /*0xffc9bb1b*/
v11 = a3; /*0xffc9bb1d*/
}
n6 = n6_1; /*0xffc9bb21*/
}
++n6; /*0xffc9bb25*/
++v10; /*0xffc9bb27*/
n6_1 = n6; /*0xffc9bb28*/
v19 = v10; /*0xffc9bb2c*/
}
while ( n6 < 6u ); /*0xffc9bb33*/
if ( !a4 ) /*0xffc9bb3e*/
{
MemChipFuncBC17(__return_address, n4, v11, 0, a5, a6, a7, a8); /*0xffc9bb57*/
return MemChipFuncC727(__return_address, n4, v11); /*0xffc9bb6a*/
}
return v8; /*0xffc9bb6c*/
}
// Function: MemChipFuncBB76 @ 0xffc9bb76 (0xa1 bytes)
// Index: 1181/2560
int __cdecl MemChipFuncBB76(
unsigned __int8 *n6,
unsigned __int8 n4,
unsigned __int8 n6a,
int a4,
int a5,
int n0x4000000,
int a7,
int a8,
int a9,
int n1946157284)
{
MailBoxFunc902D((int)n6, n4, n6a, 117459772, 4, n0x4000000); /*0xffc9bb96*/
MailBoxFunc902D((int)n6, n4, n6a, 117460328, 4, a7); /*0xffc9bba8*/
MailBoxFunc902D((int)n6, n4, n6a, 117459788, 4, a8); /*0xffc9bbba*/
MailBoxFunc902D((int)n6, n4, n6a, 117460344, 4, a9); /*0xffc9bbcf*/
MailBoxFunc902D((int)n6, n4, n6a, 117459836, 8, a4); /*0xffc9bbe2*/
MailBoxFunc902D((int)n6, n4, n6a, 117459840, 8, a5); /*0xffc9bbf5*/
return MailBoxFunc902D((int)n6, n4, n6a, 117459820, 4, n1946157284); /*0xffc9bc12*/
}
// Function: MemChipFuncBC17 @ 0xffc9bc17 (0x251 bytes)
// Index: 1182/2560
int __cdecl MemChipFuncBC17(
unsigned __int8 *__return_address,
int n4,
int a3,
char a4,
char a5,
unsigned __int8 a6,
char a7,
int a8)
{
int v8; // edx
int v9; // ecx
int v10; // ebx
char *v11; // esi
bool v12; // zf
unsigned __int8 v13; // bl
char v14; // al
int v16; // [esp+0h] [ebp-124h]
int v17; // [esp+4h] [ebp-120h]
int v18; // [esp+4h] [ebp-120h]
int n6; // [esp+8h] [ebp-11Ch]
int v20; // [esp+Ch] [ebp-118h]
unsigned int v21[2]; // [esp+10h] [ebp-114h] BYREF
int v22; // [esp+18h] [ebp-10Ch]
int v23[4]; // [esp+1Ch] [ebp-108h] BYREF
char v24; // [esp+2Ch] [ebp-F8h] BYREF
v8 = 0; /*0xffc9bc1d*/
v17 = 0; /*0xffc9bc1f*/
if ( !a4 ) /*0xffc9bc2a*/
{
v16 = 0; /*0xffc9bc30*/
v9 = 0; /*0xffc9bc33*/
v10 = a3; /*0xffc9bc37*/
v11 = &v24; /*0xffc9bc48*/
LOBYTE(n6) = 0; /*0xffc9bc4c*/
do /*0xffc9be55*/
{
if ( ((1 << v9) & v10) != 0 ) /*0xffc9bc57*/
{
if ( (MiscConfigCheck(__return_address, n4, n6, 184567164) & 0x3F) != 0 /*0xffc9bcf8*/
&& ((MiscConfigCheck(__return_address, n4, n6, 184567148),
MiscConfigCheck(__return_address, n4, n6, 184567160),
MiscIoCheck(__return_address, n4, n6, 0xB00457Cu, 0),
MiscIoCheck(__return_address, n4, n6, 0xB00456Cu, 0),
MiscIoCheck(__return_address, n4, n6, 0xB004578u, 0),
MemChipFuncA5A5(__return_address, n4, a3, (int)v23),
*((_DWORD *)v11 - 4))
|| *((_DWORD *)v11 - 3)
|| *((_DWORD *)v11 - 2)
|| *((_DWORD *)v11 - 1)
|| *(_WORD *)v11) )
{
v21[0] = *((_DWORD *)v11 - 2) | *((_DWORD *)v11 - 4); /*0xffc9bd09*/
v12 = __return_address[257312] == 0; /*0xffc9bd13*/
v21[1] = *((_DWORD *)v11 - 1) | *((_DWORD *)v11 - 3); /*0xffc9bd1a*/
if ( v12 ) /*0xffc9bd1e*/
v22 = 0; /*0xffc9bd2f*/
else
v22 = (unsigned __int8)*v11 | (unsigned __int8)v11[1]; /*0xffc9bd29*/
v13 = *(_BYTE *)(v16 + 6 * a6 + a8); /*0xffc9bd4c*/
LOBYTE(v20) = v13; /*0xffc9bd54*/
v18 = MemChipFuncC774(__return_address, n4, n6, v20, v21); /*0xffc9bd75*/
__return_address[6365 * (unsigned __int8)n4 + 633762 + 168 * v16 + 84 * v13] = 1; /*0xffc9bd97*/
if ( KtiFunc9CA7(__return_address, n4, n6, a6) ) /*0xffc9bd9f*/
*((_DWORD *)v11 + 3) &= 0x3FFFFu; /*0xffc9bdab*/
else
*((_DWORD *)v11 + 3) &= 0x1FFFFu; /*0xffc9bdb4*/
v14 = MemChipFuncA0EA( /*0xffc9bdd5*/
(int)__return_address,
*((_DWORD *)v11 - 4),
*((_DWORD *)v11 - 3),
*((_DWORD *)v11 - 2),
*((_DWORD *)v11 - 1),
*(_DWORD *)v11);
v8 = KtiFn_FFC9D8C0( /*0xffc9be27*/
__return_address,
n4,
n6,
v13,
v11[20] & 3,
a7,
(4 * (v11[16] & 3)) | (*((_DWORD *)v11 + 4) >> 2) & 3,
*((_DWORD *)v11 + 3),
*((_WORD *)v11 + 4) & 0x3FF,
v14,
a5,
v18);
v17 = v8; /*0xffc9be2c*/
}
else
{
v8 = v17; /*0xffc9be32*/
}
v9 = v16; /*0xffc9be36*/
v10 = a3; /*0xffc9be3a*/
}
v11 += 44; /*0xffc9be45*/
++v9; /*0xffc9be4a*/
LOBYTE(n6) = n6 + 1; /*0xffc9be4b*/
v16 = v9; /*0xffc9be4f*/
}
while ( (unsigned __int8)n6 < 6u ); /*0xffc9be55*/
}
return v8; /*0xffc9be61*/
}
// Function: MemChipFuncBE68 @ 0xffc9be68 (0x22f bytes)
// Index: 1183/2560
int __cdecl MemChipFuncBE68(
unsigned __int8 *n6,
int n4,
int n6a,
_DWORD *Enable,
char *n2,
_BYTE *a6,
unsigned __int8 n12,
char n3,
char a9)
{
unsigned __int8 n12_2; // bl
int CpuCount; // eax
_DWORD *Enable_1; // edx
int Enable_2; // edi
int n4_1; // ecx
unsigned __int8 n12_1; // al
_BYTE *v15; // edi
unsigned __int8 v16; // al
unsigned __int8 v17; // al
unsigned __int8 n12_4; // [esp+13h] [ebp-9h]
int n12_3; // [esp+14h] [ebp-8h]
LOBYTE(n2) = (unsigned __int8)n2 & 3; /*0xffc9be6b*/
n12_2 = 0; /*0xffc9be77*/
MemChipFuncCCE8(n6, n4, 0); /*0xffc9be81*/
KtiFunc8C4((int)n6, 0xAu); /*0xffc9be89*/
CpuCount = GetCpuCount((int)n6, n4, n6a); /*0xffc9be95*/
Enable_1 = Enable; /*0xffc9be9a*/
Enable_2 = (unsigned __int8)Enable; /*0xffc9bebb*/
n4_1 = n4; /*0xffc9bebf*/
if ( *(_WORD *)(1379 * (unsigned __int8)Enable + CpuCount + 147) == 0xAD00 ) /*0xffc9bec3*/
{
if ( !n6[257313] && n6[48704 * (unsigned __int8)n4 + 258703] ) /*0xffc9beda*/
{
RmtFunc765((int)n6, n4, n6a, (int)Enable, (int)n2, 0x18u, 0xB0u); /*0xffc9bef2*/
n4_1 = n4; /*0xffc9bef7*/
Enable_1 = Enable; /*0xffc9befe*/
}
n12_1 = 0; /*0xffc9bf02*/
n12_4 = 0; /*0xffc9bf04*/
if ( n12 ) /*0xffc9bf0c*/
{
v15 = a6; /*0xffc9bf12*/
while ( 1 ) /*0xffc9bf23*/
{
n12_3 = n12_1; /*0xffc9bf23*/
v16 = v15[n12_1]; /*0xffc9bf27*/
if ( !v16 ) /*0xffc9bf2c*/
break; /*0xffc9bf2c*/
if ( n3 == 3 ) /*0xffc9bf3b*/
{
RmtFunc349(n6, n4_1, n6a, (int)Enable_1, (unsigned __int8)n2, v16 | 0x300, 0); /*0xffc9bf4b*/
RmtFunc349(n6, n4, n6a, (int)Enable, (unsigned __int8)n2, (unsigned __int8)v15[n12_3] | 0x600, 0); /*0xffc9bf6e*/
RmtFunc349(n6, n4, n6a, (int)Enable, (unsigned __int8)n2, (unsigned __int8)a6[n12_3] | 0x100, 0); /*0xffc9bf91*/
KtiFunc8C4((int)n6, 0x1F4u); /*0xffc9bf9f*/
v15 = a6; /*0xffc9bfa4*/
}
else
{
RmtFunc349(n6, n4_1, n6a, (int)Enable_1, (unsigned __int8)n2, v16 | 0x100, 0); /*0xffc9bfba*/
KtiFunc8C4((int)n6, 0x1F4u); /*0xffc9bfc5*/
}
n12_1 = n12_4 + 1; /*0xffc9bfd1*/
n12_4 = n12_1; /*0xffc9bfd3*/
if ( n12_1 >= n12 ) /*0xffc9bfdb*/
break; /*0xffc9bfdb*/
n4_1 = n4; /*0xffc9bf18*/
Enable_1 = Enable; /*0xffc9bf1c*/
}
Enable_2 = (unsigned __int8)Enable; /*0xffc9bfe1*/
}
LOBYTE(n4_1) = n4; /*0xffc9bfe5*/
if ( !n6[257313] && n6[48704 * (unsigned __int8)n4 + 258703] ) /*0xffc9bffa*/
{
RmtFunc765((int)n6, n4, n6a, (int)Enable, (int)n2, 0, 0xB0u); /*0xffc9c014*/
LOBYTE(n4_1) = n4; /*0xffc9c019*/
}
}
if ( a9 && *a6 ) /*0xffc9c02a*/
{
LogDebugString( /*0xffc9c04e*/
n6,
(int)"DramModeRank[ N:%d, C:%d, D:%d, R:%d, TM[%d]-",
(unsigned __int8)n4_1,
(unsigned __int8)n6a,
Enable_2,
(unsigned __int8)n2,
n12);
if ( n12 ) /*0xffc9c05a*/
{
do /*0xffc9c07e*/
{
v17 = a6[n12_2]; /*0xffc9c05f*/
if ( !v17 ) /*0xffc9c064*/
break; /*0xffc9c064*/
LogDebugString(n6, (int)"[%02X]", v17); /*0xffc9c070*/
++n12_2; /*0xffc9c078*/
}
while ( n12_2 < n12 ); /*0xffc9c07e*/
}
LogDebugString(n6, (int)"\n"); /*0xffc9c086*/
}
return 0; /*0xffc9c08d*/
}
// Function: DimmExecuteSmartPpr @ 0xffc9c097 (0x488 bytes)
// Index: 1184/2560
int __cdecl DimmExecuteSmartPpr(unsigned __int8 *n6, int n4, unsigned __int8 a3, int a4, unsigned int i, int a6)
{
unsigned __int8 *n6_1; // esi
unsigned __int8 n2; // al
int n4_1; // ebx
int v10; // edi
unsigned __int8 v11; // al
int v12; // edx
unsigned __int16 v13; // ax
unsigned __int8 n2_2; // al
unsigned __int8 v15; // al
int n4_4; // ebx
unsigned __int8 n2_3; // al
int n4_3; // [esp-40h] [ebp-68h]
int v20; // [esp-3Ch] [ebp-64h]
int v21; // [esp-38h] [ebp-60h]
unsigned int v22; // [esp-38h] [ebp-60h]
int v23; // [esp-34h] [ebp-5Ch]
int v24; // [esp-30h] [ebp-58h]
int v25; // [esp-2Ch] [ebp-54h]
int v26; // [esp-28h] [ebp-50h]
int v27; // [esp-Ch] [ebp-34h]
int v28; // [esp-Ch] [ebp-34h]
int n2_1; // [esp+10h] [ebp-18h]
int v30; // [esp+14h] [ebp-14h]
int v31; // [esp+18h] [ebp-10h]
_DWORD v32[2]; // [esp+1Ch] [ebp-Ch]
int n4_2; // [esp+24h] [ebp-4h]
bool v34; // [esp+34h] [ebp+Ch]
unsigned __int8 v35; // [esp+38h] [ebp+10h]
unsigned int ia; // [esp+3Ch] [ebp+14h]
unsigned __int16 v37; // [esp+40h] [ebp+18h]
n6_1 = n6; /*0xffc9c09d*/
KtiFunc4541((int)n6, 0xB7u, 0x37u, 0); /*0xffc9c0ac*/
v30 = a3; /*0xffc9c0bb*/
n2 = 2; /*0xffc9c0c4*/
if ( (a3 & 0x3F) == 2 ) /*0xffc9c0c7*/
{
n2 = 1; /*0xffc9c0ec*/
}
else if ( (a3 & 0x3F) != 4 ) /*0xffc9c0cb*/
{
switch ( a3 & 0x3F ) /*0xffc9c0d0*/
{
case 8: /*0xffc9c0d0*/
n2 = 3; /*0xffc9c0e8*/
break;
case 16: /*0xffc9c0d0*/
n2 = 4; /*0xffc9c0e4*/
break;
case 32: /*0xffc9c0d0*/
n2 = 5; /*0xffc9c0e0*/
break;
default:
n2 = 0; /*0xffc9c0dc*/
break;
}
}
n4_1 = n4; /*0xffc9c0f2*/
LOBYTE(n6) = n2; /*0xffc9c0f6*/
v10 = 12 * n2; /*0xffc9c0ff*/
n2_1 = n2; /*0xffc9c10b*/
MemChipFuncBE68( /*0xffc9c120*/
n6_1,
n4,
(int)n6,
(_DWORD *)*(unsigned __int8 *)(v10 + a4),
(char *)*(unsigned __int8 *)(v10 + a4 + 1),
byte_FFD5B474,
9u,
3,
0);
v26 = *(_DWORD *)(v10 + a4 + 3); /*0xffc9c125*/
v25 = *(_DWORD *)(v10 + a4 + 8); /*0xffc9c12e*/
v24 = *(unsigned __int8 *)(v10 + a4 + 7); /*0xffc9c135*/
v23 = *(unsigned __int8 *)(v10 + a4 + 2); /*0xffc9c13b*/
v21 = *(unsigned __int8 *)(v10 + a4 + 1); /*0xffc9c141*/
v20 = *(unsigned __int8 *)(v10 + a4); /*0xffc9c146*/
n4_2 = (unsigned __int8)n4; /*0xffc9c14b*/
LogDebugString( /*0xffc9c156*/
n6_1,
(int)"skExecuteSmartPPR[ N:%d, C:%d, D:%d, R:%d(%d), B:%X, Row:0x%05X, DevMask:%05X ] \n",
(unsigned __int8)n4,
n2_1,
v20,
v21,
v23,
v24,
v25,
v26);
*(_DWORD *)(a6 + 4 * n2_1) = 0; /*0xffc9c16b*/
KtiFunc4541((int)n6_1, 0xB7u, 0x38u, 0); /*0xffc9c177*/
v27 = *(unsigned __int8 *)(v10 + a4 + 2); /*0xffc9c188*/
v11 = DdrTrainFunc4CEE(*(_BYTE *)(v10 + a4), *(_BYTE *)(v10 + a4 + 1)); /*0xffc9c194*/
MailBoxFuncC615(v11, n6_1, n4, (int)n6, v11, v27, 62, 4); /*0xffc9c1a5*/
KtiFunc6998(n6_1, n4, a3); /*0xffc9c1b0*/
v34 = ProcCommonFunc24D8(n6_1, n4, (unsigned __int8)n6); /*0xffc9c1c9*/
*((_BYTE *)v32 + n2_1) = v34; /*0xffc9c1cd*/
if ( v34 ) /*0xffc9c1d3*/
ProcCommonFunc3D3D(n6_1, n4, (int)n6, 0); /*0xffc9c1dd*/
GetCpuCount((int)n6_1, n4, (unsigned __int8)n6); /*0xffc9c1eb*/
v35 = *(_BYTE *)(v10 + a4); /*0xffc9c206*/
v31 = 50813 * n4_2; /*0xffc9c213*/
v32[0] = 8077 * n2_1; /*0xffc9c217*/
v12 = (int)&n6_1[50813 * n4_2 + 12586 + 8077 * n2_1 + 2688 * v35]; /*0xffc9c225*/
if ( i == 1 ) /*0xffc9c22e*/
{
ia = 2000000; /*0xffc9c240*/
v13 = *(_WORD *)(244 * *(unsigned __int8 *)(v10 + a4 + 1) + v12 + 8) | 0x2000; /*0xffc9c24d*/
}
else
{
ia = 1; /*0xffc9c252*/
v13 = *(_WORD *)(244 * *(unsigned __int8 *)(v10 + a4 + 1) + v12 + 8) | 0x20; /*0xffc9c26a*/
}
v37 = v13; /*0xffc9c271*/
if ( ProcCommonFunc24FA((int)n6_1, n4, (unsigned __int8)n6, v35) ) /*0xffc9c27b*/
{
n2_2 = MemChipFuncD4A4((int)n6_1, n4, (unsigned __int8)n6, *(_BYTE *)(v10 + a4 + 1), *(_BYTE *)(v10 + a4 + 2)); /*0xffc9c2a0*/
RmtFunc765((int)n6_1, n4, (int)n6, *(unsigned __int8 *)(v10 + a4), n2_2, 8u, 0xB0u); /*0xffc9c2b7*/
}
RmtFunc349(n6_1, n4, (int)n6, *(unsigned __int8 *)(v10 + a4), *(_BYTE *)(v10 + a4 + 1), v37, 4); /*0xffc9c2da*/
RmtFunc349(n6_1, n4, (int)n6, *(unsigned __int8 *)(v10 + a4), *(_BYTE *)(v10 + a4 + 1), 0xCFFu, 0); /*0xffc9c2f7*/
RmtFunc349(n6_1, n4, (int)n6, *(unsigned __int8 *)(v10 + a4), *(_BYTE *)(v10 + a4 + 1), 0x7FFu, 0); /*0xffc9c314*/
RmtFunc349(n6_1, n4, (int)n6, *(unsigned __int8 *)(v10 + a4), *(_BYTE *)(v10 + a4 + 1), 0xBFFu, 0); /*0xffc9c334*/
RmtFunc349(n6_1, n4, (int)n6, *(unsigned __int8 *)(v10 + a4), *(_BYTE *)(v10 + a4 + 1), 0x3FFu, 0); /*0xffc9c351*/
KtiFunc8C4((int)n6_1, 0x3E8u); /*0xffc9c35c*/
MailBoxFuncF639( /*0xffc9c389*/
n6_1,
n4,
(int)n6,
*(_BYTE *)(v10 + a4),
*(_BYTE *)(v10 + a4 + 1),
*(_BYTE *)(v10 + a4 + 2),
*(_DWORD *)(v10 + a4 + 3),
*(_BYTE *)(v10 + a4 + 7),
*(_DWORD *)(v10 + a4 + 8));
MailBoxFuncD466(v10, (int)n6_1, n4, v30, 0); /*0xffc9c396*/
KtiFunc8C4((int)n6_1, ia); /*0xffc9c3a0*/
v28 = *(unsigned __int8 *)(v10 + a4 + 2); /*0xffc9c3b1*/
v15 = DdrTrainFunc4CEE(*(_BYTE *)(v10 + a4), *(_BYTE *)(v10 + a4 + 1)); /*0xffc9c3bd*/
MailBoxFuncC615(v15, n6_1, n4, (int)n6, v15, v28, 62, 4); /*0xffc9c3ce*/
KtiFunc6998(n6_1, n4, v30); /*0xffc9c3d9*/
KtiFunc8C4((int)n6_1, 1u); /*0xffc9c3e1*/
LOBYTE(n4_1) = *(_BYTE *)(v10 + a4); /*0xffc9c3e6*/
v22 = *(unsigned __int16 *)&n6_1[2688 * (unsigned __int8)n4_1 /*0xffc9c413*/
+ 12594
+ 244 * *(unsigned __int8 *)(v10 + a4 + 1)
+ v32[0]
+ v31];
n4_3 = n4_1; /*0xffc9c415*/
n4_4 = n4; /*0xffc9c41a*/
RmtFunc349(n6_1, n4, (int)n6, n4_3, *(_BYTE *)(v10 + a4 + 1), v22, 4); /*0xffc9c420*/
KtiFunc8C4((int)n6_1, 0x32u); /*0xffc9c42b*/
if ( ProcCommonFunc24FA((int)n6_1, n4, (unsigned __int8)n6, *(_BYTE *)(v10 + a4)) ) /*0xffc9c43b*/
{
n2_3 = MemChipFuncD4A4((int)n6_1, n4, (unsigned __int8)n6, *(_BYTE *)(v10 + a4 + 1), *(_BYTE *)(v10 + a4 + 2)); /*0xffc9c460*/
RmtFunc765((int)n6_1, n4, (int)n6, *(unsigned __int8 *)(v10 + a4), n2_3, 0, 0xB0u); /*0xffc9c477*/
}
GetCpuCount((int)n6_1, n4, (unsigned __int8)n6); /*0xffc9c485*/
LOBYTE(n4_4) = *(_BYTE *)(v10 + a4); /*0xffc9c48a*/
RmtFunc349( /*0xffc9c4c4*/
n6_1,
n4,
(int)n6,
n4_4,
*(_BYTE *)(v10 + a4 + 1),
*(unsigned __int16 *)&n6_1[2688 * (unsigned __int8)n4_4
+ 12586
+ 244 * *(unsigned __int8 *)(v10 + a4 + 1)
+ v32[0]
+ v31],
0);
if ( v34 ) /*0xffc9c4d1*/
ProcCommonFunc3D3D(n6_1, n4, (int)n6, 1); /*0xffc9c4db*/
n6_1[6365 * n4_2 + 633762 + 168 * n2_1 + 84 * *(unsigned __int8 *)(v10 + a4)] = 3; /*0xffc9c505*/
KtiFunc4541((int)n6_1, 0xB7u, 0x39u, 0); /*0xffc9c50d*/
return 0; /*0xffc9c517*/
}
// Function: MemChipFuncC51F @ 0xffc9c51f (0xa0 bytes)
// Index: 1185/2560
char __cdecl MemChipFuncC51F(
int __return_address,
unsigned __int8 n4,
char n6,
char a4,
char a5,
char a6,
char a7,
int a8,
int a9,
int a10)
{
unsigned int n0x78; // edx
int v11; // eax
n0x78 = 0; /*0xffc9c524*/
v11 = 6365 * n4 + __return_address + 628694; /*0xffc9c547*/
while ( *(_BYTE *)v11 /*0xffc9c578*/
|| *(_BYTE *)(v11 + 1)
|| *(_BYTE *)(v11 + 2)
|| *(_DWORD *)(v11 + 3)
|| *(_WORD *)(v11 + 7)
|| *(_BYTE *)(v11 - 1)
|| *(_BYTE *)(v11 - 2)
|| *(_BYTE *)(v11 - 3) )
{
if ( a5 != *(_BYTE *)v11 /*0xffc9c5a9*/
|| a6 != *(_BYTE *)(v11 + 1)
|| a7 != *(_BYTE *)(v11 + 2)
|| a8 != *(_DWORD *)(v11 + 3)
|| a4 != *(_BYTE *)(v11 - 1)
|| n6 != *(_BYTE *)(v11 - 2)
|| n4 != *(_BYTE *)(v11 - 3)
|| a10 != *(_DWORD *)(v11 + 10) )
{
++n0x78; /*0xffc9c5ab*/
v11 += 42; /*0xffc9c5ac*/
if ( n0x78 < 0x78 ) /*0xffc9c5b2*/
continue; /*0xffc9c5b2*/
}
return 1; /*0xffc9c5ba*/
}
return 0; /*0xffc9c5b6*/
}
// Function: MemChipFuncC5BF @ 0xffc9c5bf (0x20 bytes)
// Index: 1186/2560
unsigned int __cdecl MemChipFuncC5BF(unsigned __int8 *p_n42, unsigned __int8 n4, unsigned __int8 a3)
{
return ((unsigned int)MiscConfigCheck(p_n42, n4, a3, 184566276) >> 24) & 0x1F; /*0xffc9c5de*/
}
// Function: MemChipFuncC5DF @ 0xffc9c5df (0xe5 bytes)
// Index: 1187/2560
int __cdecl MemChipFuncC5DF(_BYTE *p_n42, int n4)
{
unsigned __int8 p_n42a; // [esp+2h] [ebp-2h] BYREF
char v4; // [esp+3h] [ebp-1h] BYREF
v4 = 0; /*0xffc9c5e6*/
p_n42a = 0; /*0xffc9c5ee*/
DdrTrainFunc4439(p_n42, n4, (bool *)&v4, &p_n42a); /*0xffc9c5f9*/
if ( v4 ) /*0xffc9c605*/
return 1; /*0xffc9c6bf*/
if ( p_n42a <= 0x14u ) /*0xffc9c612*/
{
switch ( p_n42a ) /*0xffc9c614*/
{
case 0x14u: /*0xffc9c614*/
return 2666; /*0xffc9c66f*/
case 6u: /*0xffc9c614*/
return 800; /*0xffc9c668*/
case 8u: /*0xffc9c614*/
return 1066; /*0xffc9c661*/
case 0xAu: /*0xffc9c614*/
return 1333; /*0xffc9c65a*/
case 0xCu: /*0xffc9c614*/
return 1600; /*0xffc9c653*/
case 0xEu: /*0xffc9c614*/
return 1866; /*0xffc9c64c*/
case 0x10u: /*0xffc9c614*/
return 2133; /*0xffc9c645*/
case 0x12u: /*0xffc9c614*/
return 2400; /*0xffc9c63b*/
}
return 0; /*0xffc9c634*/
}
switch ( p_n42a ) /*0xffc9c674*/
{
case 0x16u: /*0xffc9c674*/
return 2933; /*0xffc9c6b6*/
case 0x18u: /*0xffc9c674*/
return 3200; /*0xffc9c6af*/
case 0x1Au: /*0xffc9c674*/
return 3466; /*0xffc9c6a8*/
case 0x1Bu: /*0xffc9c674*/
return 3600; /*0xffc9c6a1*/
case 0x1Cu: /*0xffc9c674*/
return 3733; /*0xffc9c69a*/
}
if ( p_n42a != 30 ) /*0xffc9c68d*/
return 0; /*0xffc9c691*/
return 4000; /*0xffc9c6c0*/
}
// Function: MemChipFuncC6C4 @ 0xffc9c6c4 (0x63 bytes)
// Index: 1188/2560
char __cdecl MemChipFuncC6C4(int p_n42)
{
char v3; // [esp+7h] [ebp-1h] BYREF
v3 = 1; /*0xffc9c6cc*/
if ( !*(_DWORD *)(p_n42 + 679608) ) /*0xffc9c6d0*/
ProcCommonFuncFAA4(p_n42, 0, 1); /*0xffc9c6de*/
if ( (*(_DWORD *)(p_n42 + 679608))++ == -1 ) /*0xffc9c6e6*/
{
if ( *(_BYTE *)(p_n42 + 246425) == *(_BYTE *)(p_n42 + 453660) ) /*0xffc9c701*/
KtiFunc7B40(p_n42, 207, 1, &v3); /*0xffc9c70b*/
KtiFunc1EF9(p_n42); /*0xffc9c717*/
}
return 1; /*0xffc9c722*/
}
// Function: MemChipFuncC727 @ 0xffc9c727 (0x4d bytes)
// Index: 1189/2560
int __cdecl MemChipFuncC727(unsigned __int8 *__return_address, unsigned __int8 n4, int a3)
{
int v3; // ebx
unsigned __int8 n6; // dl
char v5; // si
int v6; // eax
unsigned __int8 n6_1; // [esp+Ch] [ebp-4h]
v3 = 0; /*0xffc9c72c*/
n6 = 0; /*0xffc9c72f*/
v5 = 0; /*0xffc9c731*/
n6_1 = 0; /*0xffc9c737*/
do /*0xffc9c769*/
{
if ( ((1 << v5) & a3) != 0 ) /*0xffc9c743*/
{
v6 = MiscConfigCheck(__return_address, n4, n6_1, 184567164); /*0xffc9c753*/
n6 = n6_1; /*0xffc9c758*/
v3 += v6; /*0xffc9c75e*/
}
++n6; /*0xffc9c760*/
++v5; /*0xffc9c762*/
n6_1 = n6; /*0xffc9c763*/
}
while ( n6 < 6u ); /*0xffc9c769*/
return v3; /*0xffc9c76b*/
}
// Function: MemChipFuncC774 @ 0xffc9c774 (0x130 bytes)
// Index: 1190/2560
int __cdecl MemChipFuncC774(unsigned __int8 *__return_address, int n4, int n6, int a4, unsigned int *a5)
{
int CpuCount; // eax
int v6; // edx
int CpuCount_1; // esi
unsigned int v8; // eax
char n9; // bl
int v10; // edi
char v11; // bp
char v12; // cl
char v13; // bh
unsigned int v14; // eax
unsigned int v15; // eax
char v16; // al
unsigned int v17; // eax
unsigned int v19; // [esp+18h] [ebp-8h]
DebugPrint( /*0xffc9c7a8*/
(int)__return_address,
2,
n4,
n6,
a4,
255,
255,
255,
"GetFailDevice - bwSerr[0]:0x%08x, bwSerr[1]:0x%08x, bwSerr[2]:0x%08x\n",
*a5,
a5[1],
a5[2]);
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffc9c7b9*/
v6 = 0; /*0xffc9c7c1*/
CpuCount_1 = CpuCount; /*0xffc9c7c6*/
v8 = *a5; /*0xffc9c7c8*/
n9 = 1; /*0xffc9c7cb*/
v10 = 1379 * (unsigned __int8)a4; /*0xffc9c7cd*/
v11 = 0; /*0xffc9c7d6*/
v19 = a5[1]; /*0xffc9c7d8*/
v12 = 0; /*0xffc9c7dc*/
v13 = 0; /*0xffc9c7e2*/
do /*0xffc9c86c*/
{
v14 = v8 >> v12; /*0xffc9c7e4*/
if ( (_BYTE)v14 ) /*0xffc9c7ec*/
{
if ( *(_BYTE *)(v10 + CpuCount_1 + 104) ) /*0xffc9c7ee*/
{
if ( (v14 & 0xF) != 0 ) /*0xffc9c7f7*/
v6 |= 1 << (n9 - 1); /*0xffc9c7ff*/
if ( (v14 & 0xF0) != 0 ) /*0xffc9c808*/
v6 |= 1 << n9; /*0xffc9c812*/
}
else if ( v13 != -1 ) /*0xffc9c81a*/
{
v6 |= 1 << v11; /*0xffc9c81c*/
}
}
v15 = v19 >> v12; /*0xffc9c823*/
if ( (unsigned __int8)(v19 >> v12) ) /*0xffc9c823*/
{
if ( !*(_BYTE *)(v10 + CpuCount_1 + 104) ) /*0xffc9c832*/
{
v16 = v13 + 4; /*0xffc9c850*/
LABEL_17:
if ( v16 != -1 ) /*0xffc9c854*/
v6 |= 1 << v16; /*0xffc9c859*/
goto LABEL_19; /*0xffc9c859*/
}
if ( (v15 & 0xF) != 0 ) /*0xffc9c836*/
{
v6 |= 1 << (n9 + 7); /*0xffc9c83e*/
v15 = v19 >> v12; /*0xffc9c841*/
}
if ( (v15 & 0xF0) != 0 ) /*0xffc9c847*/
{
v16 = n9 + 8; /*0xffc9c849*/
goto LABEL_17; /*0xffc9c84c*/
}
}
LABEL_19:
v8 = *a5; /*0xffc9c85c*/
++v13; /*0xffc9c860*/
n9 += 2; /*0xffc9c862*/
++v11; /*0xffc9c865*/
v12 += 8; /*0xffc9c866*/
}
while ( (unsigned __int8)n9 < 9u ); /*0xffc9c86c*/
v17 = a5[2]; /*0xffc9c876*/
if ( (_BYTE)v17 ) /*0xffc9c87b*/
{
if ( *(_BYTE *)(v10 + CpuCount_1 + 104) ) /*0xffc9c87d*/
{
if ( (v17 & 0xF) != 0 ) /*0xffc9c886*/
v6 |= 0x10000u; /*0xffc9c888*/
if ( (v17 & 0xF0) != 0 ) /*0xffc9c88e*/
return v6 | 0x20000; /*0xffc9c890*/
}
else
{
return v6 | 0x100; /*0xffc9c896*/
}
}
return v6; /*0xffc9c89a*/
}
// Function: MemChipFuncC8A4 @ 0xffc9c8a4 (0x5b bytes)
// Index: 1191/2560
int __usercall MemChipFuncC8A4@<eax>(int n4@<ebx>, int p_n42, char n4a)
{
unsigned __int8 v3; // al
unsigned __int8 n6; // cl
unsigned __int8 v6; // [esp+0h] [ebp-4h]
char v7; // [esp+0h] [ebp-4h]
v3 = KtiFunc8E32(p_n42, n4a); /*0xffc9c8ae*/
n6 = 0; /*0xffc9c8b5*/
v6 = 0; /*0xffc9c8ba*/
while ( ((1 << n6) & v3) == 0 ) /*0xffc9c8c4*/
{
v6 = ++n6; /*0xffc9c8c8*/
if ( n6 >= 6u ) /*0xffc9c8ce*/
return 0; /*0xffc9c8d2*/
}
v7 = DdrTrainFunc45AB(p_n42, n4a, v6); /*0xffc9c8e7*/
return MailBoxFunc8E0B(n4, p_n42, n4a, v7, 117459068); /*0xffc9c8fd*/
}
// Function: MemChipFuncC8FF @ 0xffc9c8ff (0x50 bytes)
// Index: 1192/2560
char __cdecl MemChipFuncC8FF(unsigned __int8 *p_n42, char n4)
{
unsigned __int8 v2; // al
unsigned __int8 n6; // cl
int v4; // eax
unsigned __int8 v6; // [esp+0h] [ebp-4h]
v2 = KtiFunc8E32((int)p_n42, n4); /*0xffc9c909*/
n6 = 0; /*0xffc9c910*/
v6 = 0; /*0xffc9c915*/
while ( ((1 << n6) & v2) == 0 ) /*0xffc9c91f*/
{
v6 = ++n6; /*0xffc9c923*/
if ( n6 >= 6u ) /*0xffc9c929*/
{
LOBYTE(v4) = 0; /*0xffc9c92b*/
return v4; /*0xffc9c92d*/
}
}
return ((unsigned int)MiscConfigCheck(p_n42, n4, v6, 184567108) >> 8) & 1; /*0xffc9c94d*/
}
// Function: MemChipFuncC94F @ 0xffc9c94f (0x4f bytes)
// Index: 1193/2560
int __cdecl MemChipFuncC94F(unsigned __int8 *p_n42, char n4)
{
unsigned __int8 v2; // al
unsigned __int8 n6; // cl
unsigned __int8 v5; // [esp+0h] [ebp-4h]
v2 = KtiFunc8E32((int)p_n42, n4); /*0xffc9c959*/
n6 = 0; /*0xffc9c960*/
v5 = 0; /*0xffc9c965*/
while ( ((1 << n6) & v2) == 0 ) /*0xffc9c96f*/
{
v5 = ++n6; /*0xffc9c973*/
if ( n6 >= 6u ) /*0xffc9c979*/
return 0; /*0xffc9c97d*/
}
return MiscConfigCheck(p_n42, n4, v5, 184566292) & 0x7FFF; /*0xffc9c99c*/
}
// Function: MemChipFuncC99E @ 0xffc9c99e (0x66 bytes)
// Index: 1194/2560
int __cdecl MemChipFuncC99E(int p_n42, unsigned __int8 n4)
{
char v2; // bl
int v3; // ebp
unsigned __int8 v4; // dl
int n32; // edi
char v6; // cl
int n32_1; // esi
v2 = 0; /*0xffc9c9a7*/
v3 = 6365 * n4; /*0xffc9c9a9*/
v4 = 0; /*0xffc9c9b3*/
n32 = 32; /*0xffc9c9be*/
v6 = 0; /*0xffc9c9c0*/
do /*0xffc9c9d9*/
{
if ( ((*(_DWORD *)(p_n42 + v3 + 634754) >> v6) & 1) != 0 ) /*0xffc9c9d1*/
++v4; /*0xffc9c9d3*/
++v6; /*0xffc9c9d5*/
--n32; /*0xffc9c9d6*/
}
while ( n32 ); /*0xffc9c9d9*/
n32_1 = 32; /*0xffc9c9db*/
do /*0xffc9c9f8*/
{
if ( ((*(_DWORD *)(p_n42 + v3 + 634758) >> v2) & 1) != 0 ) /*0xffc9c9f0*/
++v4; /*0xffc9c9f2*/
++v2; /*0xffc9c9f4*/
--n32_1; /*0xffc9c9f5*/
}
while ( n32_1 ); /*0xffc9c9f8*/
return v4; /*0xffc9c9fa*/
}
// Function: MemChipFuncCA04 @ 0xffc9ca04 (0x45 bytes)
// Index: 1195/2560
char __cdecl MemChipFuncCA04(unsigned __int8 *p_n42, char n4)
{
unsigned __int8 v2; // al
unsigned __int8 n6; // cl
unsigned __int8 v5; // [esp+0h] [ebp-4h]
v2 = KtiFunc8E32((int)p_n42, n4); /*0xffc9ca0e*/
n6 = 0; /*0xffc9ca15*/
v5 = 0; /*0xffc9ca1a*/
while ( ((1 << n6) & v2) == 0 ) /*0xffc9ca24*/
{
v5 = ++n6; /*0xffc9ca28*/
if ( n6 >= 6u ) /*0xffc9ca2e*/
return 0; /*0xffc9ca32*/
}
return MemChipFuncC5BF(p_n42, n4, v5); /*0xffc9ca47*/
}
// Function: MemChipFuncCA49 @ 0xffc9ca49 (0x150 bytes)
// Index: 1196/2560
int __cdecl MemChipFuncCA49(unsigned __int8 *n6, int n4, int n6a, char a4)
{
int v5; // esi
unsigned int v6; // esi
int v7; // eax
unsigned int v8; // edi
int v9; // eax
unsigned int v10; // eax
int v11; // eax
int v12; // eax
char v14; // [esp+10h] [ebp-Ch]
int v15; // [esp+14h] [ebp-8h]
int v16; // [esp+18h] [ebp-4h]
GetSocketInfo((int)n6, n4); /*0xffc9ca5a*/
v14 = DdrTrainFunc45AB((int)n6, n4, n6a); /*0xffc9ca73*/
v5 = MiscConfigCheck(n6, n4, n6a, 184632612); /*0xffc9ca84*/
MiscConfigCheck(n6, n4, n6a, 184632616); /*0xffc9ca86*/
MiscConfigCheck(n6, n4, n6a, 184632620); /*0xffc9ca93*/
v15 = 0; /*0xffc9ca98*/
v6 = v5 & 0xFFFFFF00; /*0xffc9caa0*/
v7 = DdrTrainFunc1DF(n6, n4, n6a, 0x7004C10u); /*0xffc9caae*/
v8 = MailBoxFunc8E0B(n4, (int)n6, n4, v14, v7) & 0xBFFFFFFF; /*0xffc9cacc*/
v9 = DdrTrainFunc1DF(n6, n4, n6a, 0x7004C18u); /*0xffc9cad2*/
v10 = MailBoxFunc8E0B(n4, (int)n6, n4, v14, v9) & 0xBFFFFFFF; /*0xffc9cae3*/
v16 = v10; /*0xffc9caf0*/
if ( a4 ) /*0xffc9caf4*/
{
v15 = -1; /*0xffc9caf6*/
v6 |= 0xFFu; /*0xffc9cb00*/
v8 |= 0x40000000u; /*0xffc9cb06*/
v16 = v10 | 0x40000000; /*0xffc9cb0a*/
}
MiscIoCheck(n6, n4, n6a, 0xB014524u, v6); /*0xffc9cb1a*/
MiscIoCheck(n6, n4, n6a, 0xB014528u, v15); /*0xffc9cb2f*/
MiscIoCheck(n6, n4, n6a, 0xB01452Cu, v15); /*0xffc9cb40*/
v11 = DdrTrainFunc1DF(n6, n4, n6a, 0x7004C10u); /*0xffc9cb54*/
MailBoxFunc8FC5((int)n6, n4, v14, v11, v8); /*0xffc9cb63*/
v12 = DdrTrainFunc1DF(n6, n4, n6a, 0x7004C18u); /*0xffc9cb7a*/
return MailBoxFunc8FC5((int)n6, n4, v14, v12, v16); /*0xffc9cb91*/
}
// Function: MemChipFuncCB99 @ 0xffc9cb99 (0x107 bytes)
// Index: 1197/2560
unsigned __int8 __cdecl MemChipFuncCB99(unsigned __int8 *p_n42, int n4, int n6, int n2, unsigned __int8 n2a)
{
int SocketInfo; // esi
int v6; // eax
_WORD v8[25]; // [esp+0h] [ebp-42h]
int n268701696; // [esp+32h] [ebp-10h]
int n269750288; // [esp+36h] [ebp-Ch]
int n270798880; // [esp+3Ah] [ebp-8h]
int n271847472; // [esp+3Eh] [ebp-4h]
n268701696 = 268701696; /*0xffc9cba5*/
v8[9] = 0; /*0xffc9cbac*/
v8[10] = 4; /*0xffc9cbb3*/
v8[11] = 16; /*0xffc9cbba*/
v8[12] = 20; /*0xffc9cbc1*/
v8[13] = 32; /*0xffc9cbc8*/
v8[14] = 36; /*0xffc9cbcf*/
v8[15] = 48; /*0xffc9cbd6*/
v8[16] = 52; /*0xffc9cbdd*/
v8[17] = 100; /*0xffc9cbe4*/
v8[18] = 64; /*0xffc9cbeb*/
v8[19] = 112; /*0xffc9cbf2*/
v8[20] = 68; /*0xffc9cbf9*/
v8[21] = 116; /*0xffc9cc00*/
v8[22] = 80; /*0xffc9cc07*/
v8[23] = 96; /*0xffc9cc0e*/
v8[24] = 84; /*0xffc9cc16*/
n269750288 = 269750288; /*0xffc9cc1d*/
n270798880 = 270798880; /*0xffc9cc24*/
n271847472 = 271847472; /*0xffc9cc2b*/
SocketInfo = GetSocketInfo((int)p_n42, n4); /*0xffc9cc3d*/
v6 = KtiFunc91DE((int)p_n42, n4, n6, n2); /*0xffc9cc46*/
RmtFunc349( /*0xffc9cc88*/
p_n42,
n4,
n6,
n2,
n2a,
*(_WORD *)(244 * n2a + v6) & 0xEF8B
| (unsigned __int16)v8[*(unsigned __int8 *)(7688 * (unsigned __int8)n6 + SocketInfo + 307)],
0);
return KtiFunc8C4((int)p_n42, 1u); /*0xffc9cc9a*/
}
// Function: MemChipFuncCCA0 @ 0xffc9cca0 (0x48 bytes)
// Index: 1198/2560
int __cdecl MemChipFuncCCA0(int a1, int a2, int a3)
{
int v3; // esi
v3 = a3; /*0xffc9cca4*/
if ( a3 > 0 ) /*0xffc9cca9*/
{
MemChipFuncCCE8(a1, a2, 0); /*0xffc9ccb3*/
do /*0xffc9ccd1*/
{
KtiFunc8C4(a1, 1000); /*0xffc9ccc7*/
--v3; /*0xffc9ccce*/
}
while ( v3 ); /*0xffc9ccd1*/
MemChipFuncCCE8(a1, a2, 1); /*0xffc9ccdb*/
}
return 0; /*0xffc9cce5*/
}
// Function: MemChipFuncCCE8 @ 0xffc9cce8 (0x9e bytes)
// Index: 1199/2560
int __cdecl MemChipFuncCCE8(unsigned __int8 *a1, unsigned __int8 a2, char a3)
{
unsigned __int8 v3; // cl
unsigned __int8 n6; // bl
unsigned __int8 *v5; // ebp
int v6; // eax
int v7; // eax
int v9; // [esp+10h] [ebp-4h]
v3 = a2; /*0xffc9cce9*/
n6 = 0; /*0xffc9ccf2*/
LOBYTE(v9) = 0; /*0xffc9cd0a*/
v5 = &a1[48704 * a2 + 258722]; /*0xffc9cd0e*/
do /*0xffc9cd60*/
{
if ( *v5 ) /*0xffc9cd10*/
{
v6 = MiscConfigCheck(a1, v3, v9, 184567108); /*0xffc9cd21*/
MiscIoCheck(a1, a2, v9, 0xB004544u, ((a3 & 1) << 8) | v6 & 0xFFFFFEFF); /*0xffc9cd45*/
v3 = a2; /*0xffc9cd4a*/
}
++n6; /*0xffc9cd51*/
v5 += 7688; /*0xffc9cd53*/
LOBYTE(v9) = n6; /*0xffc9cd59*/
}
while ( n6 < 6u ); /*0xffc9cd60*/
v7 = 50813 * a2; /*0xffc9cd62*/
if ( a3 ) /*0xffc9cd6a*/
a1[v7 + 58726] = 1; /*0xffc9cd6c*/
else
a1[v7 + 58726] = 0; /*0xffc9cd76*/
return 0; /*0xffc9cd7e*/
}
// Function: MemChipFuncCD86 @ 0xffc9cd86 (0x2e bytes)
// Index: 1200/2560
int __cdecl MemChipFuncCD86(int p_n42)
{
int result; // eax
if ( *(_DWORD *)(p_n42 + 679608) == 1 ) /*0xffc9cd92*/
ProcCommonFuncFAA4(p_n42, 0, 0); /*0xffc9cd99*/
result = *(_DWORD *)(p_n42 + 679608); /*0xffc9cda1*/
if ( result ) /*0xffc9cda9*/
*(_DWORD *)(p_n42 + 679608) = --result; /*0xffc9cdac*/
return result; /*0xffc9cdb2*/
}
// Function: MemChipFuncCDB4 @ 0xffc9cdb4 (0x25b bytes)
// Index: 1201/2560
int __cdecl MemChipFuncCDB4(unsigned __int8 *p_n42, int n4, int n6, char n5, int n2, unsigned __int8 n2a)
{
int v6; // edi
int v7; // eax
unsigned __int16 v8; // cx
unsigned __int16 v9; // dx
int v10; // esi
unsigned __int8 n4_1; // bl
int v12; // eax
unsigned __int8 v14; // al
int v15; // edx
int CpuCount_1; // esi
int n4_2; // esi
unsigned __int8 n2aa_1; // bl
char v19; // al
int v21; // [esp+10h] [ebp-48h]
int CpuCount; // [esp+14h] [ebp-44h]
int v23; // [esp+18h] [ebp-40h]
int v24; // [esp+18h] [ebp-40h]
int SocketInfo; // [esp+1Ch] [ebp-3Ch]
int n6_1; // [esp+20h] [ebp-38h]
unsigned __int8 n6a; // [esp+64h] [ebp+Ch]
unsigned __int8 n2aa; // [esp+70h] [ebp+18h]
SocketInfo = GetSocketInfo((int)p_n42, n4); /*0xffc9cdd1*/
CpuCount = GetCpuCount((int)p_n42, n4, n6); /*0xffc9cde2*/
v6 = MiscConfigCheck(p_n42, n4, n6, 184566272); /*0xffc9cdf3*/
v23 = MiscConfigCheck(p_n42, n4, n6, 184566280); /*0xffc9ce02*/
v7 = MiscConfigCheck(p_n42, n4, n6, 184566432); /*0xffc9ce06*/
n6_1 = (unsigned __int8)n6; /*0xffc9ce1d*/
v21 = 7688 * (unsigned __int8)n6; /*0xffc9ce26*/
*(_WORD *)(v21 + SocketInfo + 356) -= (unsigned __int8)n2; /*0xffc9ce2a*/
v8 = *(_WORD *)(v21 + SocketInfo + 356); /*0xffc9ce32*/
*(_WORD *)(v21 + SocketInfo + 360) -= n2a; /*0xffc9ce3f*/
v9 = *(_WORD *)(v21 + SocketInfo + 360); /*0xffc9ce4b*/
BYTE1(n2) = HIBYTE(v8); /*0xffc9ce53*/
*(_BYTE *)(v21 + SocketInfo + 307) -= n5; /*0xffc9ce5c*/
v24 = (v23 ^ (v8 << 27)) & 0x38000000 ^ v23; /*0xffc9ce80*/
v10 = (v7 ^ (v9 << 16)) & 0x70000 ^ v7; /*0xffc9ce91*/
n4_1 = n4; /*0xffc9ce96*/
v12 = v6 ^ ((unsigned __int16)v6 ^ (unsigned __int16)(*(unsigned __int8 *)(v21 + SocketInfo + 307) << 9)) & 0x3E00; /*0xffc9cea4*/
MiscIoCheck(p_n42, n4, n6, 0xB004200u, v12); /*0xffc9ceb3*/
MiscIoCheck(p_n42, n4, n6, 0xB004208u, v24); /*0xffc9cec5*/
MiscIoCheck(p_n42, n4, n6, 0xB0042A0u, v10); /*0xffc9ced3*/
v14 = 0; /*0xffc9cedc*/
v15 = v21; /*0xffc9cede*/
LOBYTE(n2) = 0; /*0xffc9cee5*/
if ( *(_BYTE *)(v21 + SocketInfo + 3) ) /*0xffc9cee9*/
{
CpuCount_1 = CpuCount; /*0xffc9cef3*/
do /*0xffc9cfff*/
{
if ( *(_BYTE *)(1379 * v14 + CpuCount_1) ) /*0xffc9cf00*/
{
n4_2 = n4_1; /*0xffc9cf0a*/
if ( p_n42[6365 * n4_1 + 635017 + 2 * n6_1 + v14] ) /*0xffc9cf1c*/
{
KtiFunc91AF((int)p_n42, n4_1, n6, n2); /*0xffc9cf31*/
n2aa_1 = 0; /*0xffc9cf3c*/
for ( n2aa = 0; n2aa_1 < p_n42[50813 * n4_2 + 10194]; n2aa = n2aa_1 ) /*0xffc9cf49*/
{
if ( !KtiFunc89E9((int)p_n42, n4, n6, n2, n2aa, 0) ) /*0xffc9cf67*/
{
n6a = KtiFunc88D1((int)p_n42, n4, n6, n2, n2aa); /*0xffc9cf83*/
v19 = ProcCommonFuncD799(p_n42, n4, n6, n6a); /*0xffc9cf8e*/
MailBoxFunc49CA(p_n42, n4, n6, n6a, v19 - 2 * n5); /*0xffc9cfac*/
MemChipFuncCB99(p_n42, n4, n6, n2, n2aa); /*0xffc9cfc2*/
}
++n2aa_1; /*0xffc9cfce*/
}
v15 = v21; /*0xffc9cfe1*/
n4_1 = n4; /*0xffc9cfe5*/
}
CpuCount_1 = CpuCount; /*0xffc9cfe9*/
}
v14 = n2 + 1; /*0xffc9cff5*/
LOBYTE(n2) = v14; /*0xffc9cff7*/
}
while ( v14 < *(_BYTE *)(v15 + SocketInfo + 3) ); /*0xffc9cfff*/
}
return 0; /*0xffc9d005*/
}
// Function: MemChipFuncD00F @ 0xffc9d00f (0x3f bytes)
// Index: 1202/2560
int __cdecl MemChipFuncD00F(unsigned __int8 *p_n42, unsigned __int8 n4, int a3, char a4)
{
int v4; // eax
v4 = MiscConfigCheck(p_n42, n4, a3, 184566276); /*0xffc9d022*/
return MiscIoCheck(p_n42, n4, a3, 0xB004204u, ((a4 & 0x1F) << 24) | v4 & 0xE0FFFFFF); /*0xffc9d04b*/
}
// Function: MemChipFuncD04E @ 0xffc9d04e (0xad bytes)
// Index: 1203/2560
int __cdecl MemChipFuncD04E(unsigned __int8 *a1, unsigned __int8 a2, int a3)
{
unsigned __int8 n6; // bl
char v4; // di
int v5; // eax
unsigned __int8 n6_1; // [esp+14h] [ebp-Ch]
unsigned __int8 v8; // [esp+18h] [ebp-8h]
char v9; // [esp+1Ch] [ebp-4h]
MemChipFuncCCE8(a1, a2, 1); /*0xffc9d060*/
KtiFunc8C4((int)a1, 0xAu); /*0xffc9d068*/
n6 = 0; /*0xffc9d072*/
v8 = 0; /*0xffc9d074*/
n6_1 = 0; /*0xffc9d077*/
v4 = 0; /*0xffc9d07a*/
do /*0xffc9d0f0*/
{
if ( ((1 << v4) & a3) != 0 ) /*0xffc9d086*/
{
v9 = DdrTrainFunc45AB((int)a1, a2, n6_1); /*0xffc9d09a*/
if ( ((1 << v9) & v8) == 0 ) /*0xffc9d0b0*/
{
v5 = MailBoxFunc8E0B(n6, (int)a1, a2, v9, 117459712); /*0xffc9d0be*/
MailBoxFunc8FC5((int)a1, a2, v9, 117459712, v5 | 5); /*0xffc9d0d3*/
v8 |= 1 << v9; /*0xffc9d0e4*/
}
}
++n6; /*0xffc9d0e7*/
++v4; /*0xffc9d0e9*/
n6_1 = n6; /*0xffc9d0ea*/
}
while ( n6 < 6u ); /*0xffc9d0f0*/
return 0; /*0xffc9d0f2*/
}
// Function: MemChipFuncD0FB @ 0xffc9d0fb (0x53 bytes)
// Index: 1204/2560
int __cdecl MemChipFuncD0FB(unsigned __int8 *n6, unsigned __int8 n4, int a3, unsigned __int8 n6a, char a5, char a6)
{
int v6; // eax
v6 = 0; /*0xffc9d104*/
if ( ((1 << n6a) & a3) != 0 && a5 ) /*0xffc9d112*/
v6 = ((a6 & 0xF) << 19) | (((unsigned __int8)a5 + 1) << 10) & 0x7C00 | 0x198; /*0xffc9d12c*/
MailBoxFunc902D((int)n6, n4, n6a, 117459720, 4, v6); /*0xffc9d142*/
return 0; /*0xffc9d14c*/
}
// Function: MemChipFuncD14E @ 0xffc9d14e (0xaf bytes)
// Index: 1205/2560
int __cdecl MemChipFuncD14E(unsigned __int8 *n6, unsigned __int8 n4, char a3)
{
const char *Enable; // eax
unsigned __int8 n6_1; // bl
int v5; // edx
char v6; // si
int v7; // eax
int v8; // eax
int v10; // [esp+0h] [ebp-8h]
int v11; // [esp+4h] [ebp-4h]
Enable = "Enable"; /*0xffc9d157*/
if ( !a3 ) /*0xffc9d15c*/
Enable = "Disable"; /*0xffc9d15e*/
DebugPrint((int)n6, 2, 255, 255, 255, 255, 255, 255, "DataScramble [ N:%d, %s ] \n", n4, Enable); /*0xffc9d183*/
n6_1 = 0; /*0xffc9d197*/
v5 = (unsigned __int8)KtiFunc8E32((int)n6, n4); /*0xffc9d199*/
v10 = v5; /*0xffc9d19c*/
v6 = 0; /*0xffc9d19f*/
LOBYTE(v11) = 0; /*0xffc9d1a1*/
do /*0xffc9d1f2*/
{
if ( ((1 << v6) & v5) != 0 ) /*0xffc9d1ad*/
{
v7 = MiscConfigCheck(n6, n4, v11, 184631776); /*0xffc9d1bb*/
if ( a3 ) /*0xffc9d1c7*/
v8 = v7 | 0xF; /*0xffc9d1c9*/
else
v8 = v7 & 0xFFFFFFF0; /*0xffc9d1ce*/
MiscIoCheck(n6, n4, v11, 0xB0141E0u, v8); /*0xffc9d1de*/
v5 = v10; /*0xffc9d1e3*/
}
++n6_1; /*0xffc9d1e9*/
++v6; /*0xffc9d1eb*/
LOBYTE(v11) = n6_1; /*0xffc9d1ec*/
}
while ( n6_1 < 6u ); /*0xffc9d1f2*/
return 0; /*0xffc9d1f9*/
}
// Function: MemChipFuncD1FD @ 0xffc9d1fd (0x8f bytes)
// Index: 1206/2560
int __cdecl MemChipFuncD1FD(int p_n42, char n4, char a3)
{
int n6; // ebx
int v4; // edx
char v5; // si
int v6; // eax
int v7; // eax
int v9; // [esp+8h] [ebp-Ch]
unsigned __int8 n6_1; // [esp+Ch] [ebp-8h]
char v11; // [esp+10h] [ebp-4h]
n6 = 0; /*0xffc9d210*/
v4 = (unsigned __int8)KtiFunc8E32(p_n42, n4); /*0xffc9d212*/
n6_1 = 0; /*0xffc9d217*/
v5 = 0; /*0xffc9d21a*/
v9 = v4; /*0xffc9d21c*/
do /*0xffc9d282*/
{
if ( ((1 << v5) & v4) != 0 ) /*0xffc9d228*/
{
v11 = DdrTrainFunc45AB(p_n42, n4, n6_1); /*0xffc9d23d*/
v6 = MailBoxFunc8E0B(n6, p_n42, n4, v11, 117459068); /*0xffc9d249*/
if ( a3 ) /*0xffc9d255*/
v7 = v6 & 0xFFFFFFFE; /*0xffc9d257*/
else
v7 = v6 | 1; /*0xffc9d25c*/
MailBoxFunc8FC5(p_n42, n4, v11, 117459068, v7); /*0xffc9d26e*/
v4 = v9; /*0xffc9d273*/
}
LOBYTE(n6) = n6 + 1; /*0xffc9d279*/
++v5; /*0xffc9d27b*/
n6_1 = n6; /*0xffc9d27c*/
}
while ( (unsigned __int8)n6 < 6u ); /*0xffc9d282*/
return 0; /*0xffc9d284*/
}
// Function: MemChipFuncD28C @ 0xffc9d28c (0x7c bytes)
// Index: 1207/2560
int __cdecl MemChipFuncD28C(unsigned __int8 *p_n42, char n4, __int16 a3)
{
unsigned __int8 n6; // bl
int v4; // edi
char v5; // si
int v6; // eax
int v8; // [esp+10h] [ebp-4h]
n6 = 0; /*0xffc9d29e*/
v4 = (unsigned __int8)KtiFunc8E32((int)p_n42, n4); /*0xffc9d2a0*/
LOBYTE(v8) = 0; /*0xffc9d2a5*/
v5 = 0; /*0xffc9d2a9*/
do /*0xffc9d2fe*/
{
if ( ((1 << v5) & v4) != 0 ) /*0xffc9d2b9*/
{
v6 = MiscConfigCheck(p_n42, n4, v8, 184566292); /*0xffc9d2c8*/
MiscIoCheck(p_n42, n4, v8, 0xB004214u, a3 & 0x7FFF | v6 & 0xFFFF8000); /*0xffc9d2ec*/
}
++n6; /*0xffc9d2f4*/
++v5; /*0xffc9d2f6*/
LOBYTE(v8) = n6; /*0xffc9d2f7*/
}
while ( n6 < 6u ); /*0xffc9d2fe*/
return 0; /*0xffc9d300*/
}
// Function: MemChipFuncD308 @ 0xffc9d308 (0x51 bytes)
// Index: 1208/2560
int __cdecl MemChipFuncD308(unsigned __int8 *p_n42, char n4, char a3)
{
unsigned __int8 n6; // bl
int v4; // edi
char v5; // si
int v7; // [esp+Ch] [ebp-4h]
n6 = 0; /*0xffc9d31a*/
v4 = (unsigned __int8)KtiFunc8E32((int)p_n42, n4); /*0xffc9d31c*/
LOBYTE(v7) = 0; /*0xffc9d321*/
v5 = 0; /*0xffc9d324*/
do /*0xffc9d34e*/
{
if ( ((1 << v5) & v4) != 0 ) /*0xffc9d32f*/
MemChipFuncD00F(p_n42, n4, v7, a3); /*0xffc9d33d*/
++n6; /*0xffc9d345*/
++v5; /*0xffc9d347*/
LOBYTE(v7) = n6; /*0xffc9d348*/
}
while ( n6 < 6u ); /*0xffc9d34e*/
return 0; /*0xffc9d350*/
}
// Function: MemChipFuncD359 @ 0xffc9d359 (0x14b bytes)
// Index: 1209/2560
int __cdecl MemChipFuncD359(_BYTE *p_n42, int n4, unsigned __int16 n1200)
{
int v3; // edi
unsigned __int16 n1200_1; // si
unsigned __int8 n1200a_1; // al
int n2; // eax
int n7; // eax
int v8; // eax
int v9; // eax
int n5; // [esp-4h] [ebp-34h]
int v12; // [esp+10h] [ebp-20h]
int n7_1; // [esp+14h] [ebp-1Ch]
int v14; // [esp+18h] [ebp-18h]
unsigned __int8 n1200a_2; // [esp+1Ch] [ebp-14h]
_DWORD v16[4]; // [esp+20h] [ebp-10h]
unsigned __int8 n1200a; // [esp+3Ch] [ebp+Ch]
v3 = 0; /*0xffc9d372*/
n7_1 = 0; /*0xffc9d374*/
v12 = 0; /*0xffc9d378*/
v16[0] = 16; /*0xffc9d37c*/
v16[1] = 18; /*0xffc9d384*/
v16[2] = 20; /*0xffc9d38c*/
v16[3] = 22; /*0xffc9d394*/
if ( !DimmConfigPerSocket(p_n42, n4, 135, 0) ) /*0xffc9d39c*/
v3 = CpuIoRead((int)p_n42, n4, 0, 67190924); /*0xffc9d3b8*/
n1200_1 = n1200; /*0xffc9d3ba*/
if ( n1200 && (n1200 < 0x384u || n1200 > 0x73Au) ) /*0xffc9d3d5*/
n1200_1 = 0; /*0xffc9d3d7*/
n1200a_1 = 0; /*0xffc9d3d9*/
n1200a = 0; /*0xffc9d3db*/
do /*0xffc9d494*/
{
n1200a_2 = n1200a_1; /*0xffc9d3e5*/
if ( ((1 << n1200a_1) & v3) != 0 ) /*0xffc9d3ed*/
{
v14 = v16[n1200a_1] << 8; /*0xffc9d3fa*/
n2 = DimmConfigPerSocket(p_n42, n4, v14 | 4, 327687); /*0xffc9d409*/
if ( n2 ) /*0xffc9d413*/
{
if ( n2 == 2 ) /*0xffc9d42e*/
return 0; /*0xffc9d42e*/
n7 = n7_1; /*0xffc9d430*/
}
else
{
n7 = CpuIoRead((int)p_n42, n4, 0, 67190924); /*0xffc9d41d*/
n7_1 = n7; /*0xffc9d425*/
}
if ( n1200_1 ) /*0xffc9d437*/
{
if ( n7 == 1 || n7 == 7 ) /*0xffc9d441*/
{
v8 = n1200_1 - 250; /*0xffc9d45b*/
n5 = 5; /*0xffc9d460*/
}
else
{
v8 = n1200_1 - 500; /*0xffc9d446*/
n5 = 10; /*0xffc9d44b*/
}
v9 = v8 / n5 + 1; /*0xffc9d451*/
v12 = v9; /*0xffc9d452*/
}
else
{
v9 = v12; /*0xffc9d464*/
}
if ( DimmConfigPerSocket(p_n42, n4, v14 | 0x80, v9) ) /*0xffc9d475*/
v3 &= ~(1 << n1200a_2); /*0xffc9d485*/
}
n1200a_1 = n1200a + 1; /*0xffc9d48c*/
n1200a = n1200a_1; /*0xffc9d48e*/
}
while ( n1200a_1 < 4u ); /*0xffc9d494*/
return 0; /*0xffc9d49a*/
}
// Function: MemChipFuncD4A4 @ 0xffc9d4a4 (0x43 bytes)
// Index: 1210/2560
char __cdecl MemChipFuncD4A4(int a1, unsigned __int8 a2, unsigned __int8 a3, char a4, char a5)
{
if ( *(_WORD *)(a1 + 257315) == 12 && *(_BYTE *)(7688 * a3 + a1 + 48704 * a2 + 264984) == 1 ) /*0xffc9d4d2*/
return (2 * a5) | a4; /*0xffc9d4dc*/
else
return a4; /*0xffc9d4e0*/
}
// Function: MemChipFuncD4E7 @ 0xffc9d4e7 (0x30f bytes)
// Index: 1211/2560
int __cdecl MemChipFuncD4E7(unsigned __int8 *n6)
{
unsigned __int8 v1; // bl
int n4; // ebp
_BYTE *SocketInfo; // esi
int *v4; // ecx
int n6_1; // edx
unsigned __int8 v6; // cl
int v7; // edx
int v8; // ebx
unsigned __int8 v9; // dl
unsigned __int8 v10; // dh
unsigned __int8 v11; // al
int v12; // esi
char v13; // cl
unsigned __int8 n3_1; // al
unsigned __int8 n3_2; // cl
char v16; // cl
unsigned __int8 n3_3; // al
char v18; // cl
unsigned __int8 n3; // al
unsigned __int8 n63; // al
unsigned __int8 n8; // [esp+11h] [ebp-73h]
unsigned __int8 v23; // [esp+12h] [ebp-72h]
char v24; // [esp+13h] [ebp-71h]
unsigned __int8 v25; // [esp+14h] [ebp-70h]
unsigned __int8 n2[4]; // [esp+18h] [ebp-6Ch]
unsigned __int8 n2a[4]; // [esp+18h] [ebp-6Ch]
int v28; // [esp+1Ch] [ebp-68h] BYREF
_DWORD v29[6]; // [esp+24h] [ebp-60h] BYREF
_BYTE v30[72]; // [esp+3Ch] [ebp-48h] BYREF
v1 = n6[9402]; /*0xffc9d4f5*/
n2[0] = v1; /*0xffc9d4fb*/
n4 = *(_DWORD *)n2; /*0xffc9d4ff*/
SocketInfo = (_BYTE *)GetSocketInfo((int)n6, v1); /*0xffc9d50c*/
v24 = KtiFunc8E32((int)n6, v1); /*0xffc9d516*/
v4 = &v28; /*0xffc9d51a*/
n6_1 = 6; /*0xffc9d520*/
do /*0xffc9d533*/
{
if ( *SocketInfo ) /*0xffc9d521*/
*(_BYTE *)v4 = 0; /*0xffc9d526*/
SocketInfo += 7688; /*0xffc9d529*/
v4 = (int *)((char *)v4 + 1); /*0xffc9d52f*/
--n6_1; /*0xffc9d530*/
}
while ( n6_1 ); /*0xffc9d533*/
v6 = 0; /*0xffc9d538*/
v7 = 6365 * v1; /*0xffc9d53a*/
v23 = 0; /*0xffc9d540*/
*(_DWORD *)n2a = v7; /*0xffc9d544*/
if ( n6[v7 + 628688] ) /*0xffc9d548*/
{
do /*0xffc9d55b*/
{
v8 = v7 + 42 * v6; /*0xffc9d55b*/
if ( !n6[v8 + 628689] ) /*0xffc9d565*/
break; /*0xffc9d565*/
v9 = n6[v8 + 628692]; /*0xffc9d56b*/
v10 = n6[v8 + 628693]; /*0xffc9d572*/
if ( n6[168 * v9 + 633763 + 84 * v10 + *(_DWORD *)n2a] <= 1u ) /*0xffc9d591*/
{
v11 = n6[v8 + 628694]; /*0xffc9d597*/
v12 = 12 * v9; /*0xffc9d5a1*/
LOBYTE(v28) = n6[v8 + 628692]; /*0xffc9d5a4*/
v29[v9] = 0; /*0xffc9d5a8*/
v30[v12 + 1] = v11; /*0xffc9d5ad*/
v30[v12 + 2] = n6[v8 + 628695]; /*0xffc9d5b8*/
*(_DWORD *)&v30[v12 + 3] = *(_DWORD *)&n6[v8 + 628704]; /*0xffc9d5c3*/
v30[v12 + 7] = n6[v8 + 628696]; /*0xffc9d5ce*/
n8 = n6[v8 + 628690]; /*0xffc9d5d9*/
v25 = v24 & (1 << v9); /*0xffc9d5e5*/
*(_DWORD *)&v30[v12 + 8] = *(_DWORD *)&n6[v8 + 628697]; /*0xffc9d5f0*/
v30[v12] = v10; /*0xffc9d5ff*/
DimmExecuteSmartPpr(n6, n4, v25, (int)v30, 1u, (int)v29); /*0xffc9d60a*/
if ( (unsigned __int8)(256 << *(_BYTE *)(1379 * (unsigned __int8)v30[v12] + GetCpuCount((int)n6, n4, v28) + 118) >> 10) != 16 ) /*0xffc9d63d*/
{
if ( n8 == 8 || n8 == 4 ) /*0xffc9d6fe*/
{
*(_DWORD *)&v30[v12 + 8] = *(_DWORD *)&n6[v8 + 628697] + 0x8000; /*0xffc9d710*/
DimmExecuteSmartPpr(n6, n4, v25, (int)v30, 1u, (int)v29); /*0xffc9d726*/
v18 = n6[v8 + 628696] & 0xF; /*0xffc9d735*/
n3 = v18 - 4; /*0xffc9d73d*/
if ( (v30[v12 + 1] & 1) != 0 ) /*0xffc9d740*/
{
if ( n3 <= 3u ) /*0xffc9d744*/
v30[v12 + 7] -= 4; /*0xffc9d746*/
if ( (unsigned __int8)(v18 - 8) <= 3u ) /*0xffc9d751*/
v30[v12 + 7] += 4; /*0xffc9d753*/
}
else
{
if ( n3 <= 3u ) /*0xffc9d75c*/
v30[v12 + 7] += 8; /*0xffc9d75e*/
if ( (unsigned __int8)(v18 - 8) <= 3u ) /*0xffc9d769*/
v30[v12 + 7] -= 8; /*0xffc9d76b*/
}
*(_DWORD *)&v30[v12 + 8] = *(_DWORD *)&n6[v8 + 628697]; /*0xffc9d777*/
DimmExecuteSmartPpr(n6, n4, v25, (int)v30, 1u, (int)v29); /*0xffc9d78d*/
*(_DWORD *)&v30[v12 + 8] = *(_DWORD *)&n6[v8 + 628697] + 0x8000; /*0xffc9d79e*/
DimmExecuteSmartPpr(n6, n4, v25, (int)v30, 1u, (int)v29); /*0xffc9d7b4*/
}
goto LABEL_42; /*0xffc9d7b4*/
}
if ( n8 == 8 ) /*0xffc9d648*/
{
v13 = n6[v8 + 628696] & 0xF; /*0xffc9d651*/
n3_1 = v13 - 4; /*0xffc9d659*/
if ( (v30[v12 + 1] & 1) != 0 ) /*0xffc9d65c*/
{
if ( n3_1 <= 3u ) /*0xffc9d660*/
v30[v12 + 7] -= 4; /*0xffc9d662*/
if ( (unsigned __int8)(v13 - 8) <= 3u ) /*0xffc9d66c*/
v30[v12 + 7] += 4; /*0xffc9d66e*/
LABEL_29:
*(_DWORD *)&v30[v12 + 8] = *(_DWORD *)&n6[v8 + 628697]; /*0xffc9d6ce*/
DimmExecuteSmartPpr(n6, n4, v25, (int)v30, 1u, (int)v29); /*0xffc9d6eb*/
goto LABEL_42; /*0xffc9d6f3*/
}
if ( n3_1 <= 3u ) /*0xffc9d677*/
v30[v12 + 7] += 8; /*0xffc9d679*/
n3_2 = v13 - 8; /*0xffc9d67d*/
LABEL_27:
if ( n3_2 <= 3u ) /*0xffc9d6c7*/
v30[v12 + 7] -= 8; /*0xffc9d6c9*/
goto LABEL_29; /*0xffc9d6c9*/
}
if ( n8 == 4 ) /*0xffc9d686*/
{
v16 = n6[v8 + 628696] & 0xF; /*0xffc9d693*/
n3_3 = v16 - 4; /*0xffc9d698*/
if ( (v30[v12 + 1] & 1) != 0 ) /*0xffc9d69f*/
{
if ( n3_3 <= 3u ) /*0xffc9d6a3*/
v30[v12 + 7] -= 4; /*0xffc9d6a5*/
if ( (unsigned __int8)(v16 - 8) <= 3u ) /*0xffc9d6b0*/
v30[v12 + 7] += 4; /*0xffc9d6b2*/
goto LABEL_29; /*0xffc9d6b6*/
}
if ( n3_3 <= 3u ) /*0xffc9d6ba*/
v30[v12 + 7] += 8; /*0xffc9d6bc*/
n3_2 = v16 - 8; /*0xffc9d6c1*/
goto LABEL_27; /*0xffc9d6c1*/
}
}
LABEL_42:
v7 = *(_DWORD *)n2a; /*0xffc9d7bc*/
v6 = v23 + 1; /*0xffc9d7c4*/
v23 = v6; /*0xffc9d7c6*/
}
while ( v6 < n6[*(_DWORD *)n2a + 628688] ); /*0xffc9d55b*/
}
n63 = KtiFunc8E32((int)n6, n4); /*0xffc9d7d7*/
MailBoxFuncEF71(n6, n4, n63); /*0xffc9d7e4*/
return 0; /*0xffc9d7ee*/
}
// Function: MemChipFuncD7F6 @ 0xffc9d7f6 (0xca bytes)
// Index: 1212/2560
unsigned int __cdecl MemChipFuncD7F6(_BYTE *p_n42, int n4)
{
int v2; // edi
unsigned __int16 v3; // ax
v2 = 6365 * (unsigned __int8)n4; /*0xffc9d807*/
*(_WORD *)&p_n42[v2 + 634737] = 9733; /*0xffc9d814*/
*(_DWORD *)&p_n42[v2 + 634739] = 101860354; /*0xffc9d81c*/
p_n42[v2 + 634743] = p_n42[128]; /*0xffc9d82d*/
p_n42[v2 + 634763] = p_n42[129]; /*0xffc9d83a*/
*(_WORD *)&p_n42[v2 + 634746] = 100; /*0xffc9d842*/
*(_WORD *)&p_n42[v2 + 634744] = 1; /*0xffc9d851*/
*(_DWORD *)&p_n42[v2 + 634749] = 84411628; /*0xffc9d859*/
p_n42[v2 + 634748] = 8; /*0xffc9d864*/
p_n42[v2 + 634753] = 5; /*0xffc9d86c*/
*(_DWORD *)&p_n42[v2 + 634754] = 610335; /*0xffc9d874*/
*(_DWORD *)&p_n42[v2 + 634758] = 610335; /*0xffc9d87b*/
p_n42[v2 + 634762] = 1; /*0xffc9d882*/
v3 = MemChipFuncC5DF(p_n42, n4); /*0xffc9d889*/
p_n42[v2 + 634780] = 5; /*0xffc9d8a4*/
return AutoGenFuncEB71((unsigned int)&p_n42[v2 + 634781], 0x80u, "CLX[%d-%d-%d,%d,DDR4-%04d]", 4, 6, 2, 1, v3); /*0xffc9d8bc*/
}
// Function: KtiFn_FFC9D8C0 @ 0xffc9d8c0 (0x57c bytes)
// Index: 1213/2560
int __cdecl KtiFn_FFC9D8C0(
unsigned __int8 *__return_address,
unsigned __int8 n4,
unsigned __int8 n6,
unsigned __int8 a4,
unsigned __int8 a5,
unsigned __int8 a6,
unsigned __int8 a7,
int a8,
int a9,
char a10,
char a11,
int a12)
{
char n6_1; // cl
int v13; // esi
unsigned __int8 *v14; // eax
int n120; // ecx
unsigned __int8 *v16; // eax
int n6_2; // edx
int n2; // ecx
int v20; // edi
unsigned __int8 v21; // al
int v22; // ecx
int v23; // ebx
unsigned __int8 n0x78_2; // al
unsigned __int8 n0x78_3; // al
int v26; // ecx
int v27; // ebx
char v28; // al
int v29; // ebx
int v30; // ecx
int v31; // ebp
unsigned __int8 n0x78; // al
unsigned __int8 n0x78_1; // al
int v34; // ecx
n6_1 = n6; /*0xffc9d8c0*/
if ( !n6 && !a4 && !a5 && !a6 && !a7 && !a8 && !a10 && !a11 ) /*0xffc9d914*/
{
v13 = 6365 * n4; /*0xffc9d91f*/
if ( !__return_address[v13 + 628688] ) /*0xffc9d925*/
{
memset_save_flags(&__return_address[v13 + 628689], 0, 0x13B0u); /*0xffc9d93f*/
v14 = &__return_address[v13 + 628690]; /*0xffc9d94d*/
n120 = 120; /*0xffc9d951*/
do /*0xffc9d96d*/
{
*(_DWORD *)(v14 - 1) = 0; /*0xffc9d954*/
*(_DWORD *)(v14 + 3) = 0; /*0xffc9d957*/
v14 += 42; /*0xffc9d95a*/
*(_DWORD *)(v14 - 35) = 0; /*0xffc9d95d*/
*(_WORD *)(v14 - 31) = 0; /*0xffc9d960*/
*(v14 - 29) = 0; /*0xffc9d964*/
*((_DWORD *)v14 - 7) = 0; /*0xffc9d967*/
--n120; /*0xffc9d96a*/
}
while ( n120 ); /*0xffc9d96d*/
v16 = &__return_address[v13 + 633763]; /*0xffc9d977*/
n6_2 = 6; /*0xffc9d979*/
do /*0xffc9d98c*/
{
n2 = 2; /*0xffc9d97c*/
do /*0xffc9d987*/
{
*(_WORD *)(v16 - 1) = 0; /*0xffc9d97d*/
v16 += 84; /*0xffc9d981*/
--n2; /*0xffc9d984*/
}
while ( n2 ); /*0xffc9d987*/
--n6_2; /*0xffc9d989*/
}
while ( n6_2 ); /*0xffc9d98c*/
}
return 0; /*0xffc9d98c*/
}
v20 = 6365 * n4; /*0xffc9d9a0*/
v21 = __return_address[v20 + 628688]; /*0xffc9d9a6*/
if ( v21 ) /*0xffc9d9af*/
{
v27 = 42 * v21; /*0xffc9dbcb*/
v28 = a5; /*0xffc9dbce*/
v29 = v20 + v27; /*0xffc9dbd2*/
if ( a5 != __return_address[v29 + 628652] /*0xffc9dc18*/
|| (n6_1 = n6, a7 != __return_address[v29 + 628654])
|| a8 != *(_DWORD *)&__return_address[v29 + 628655]
|| a4 != __return_address[v29 + 628651]
|| n6 != __return_address[v29 + 628650]
|| (v28 = a5, n4 != __return_address[v29 + 628649]) )
{
if ( !MemChipFuncC51F((int)__return_address, n4, n6_1, a4, v28, a6, a7, a8, a9, a12) ) /*0xffc9dc37*/
{
v30 = a4 + 2 * n6; /*0xffc9dc55*/
v31 = v20 + 84 * v30; /*0xffc9dc5b*/
if ( __return_address[v31 + 633763] <= 1u ) /*0xffc9dc65*/
{
__return_address[v29 + 628689] = 1; /*0xffc9dc6b*/
__return_address[42 * __return_address[v20 + 628688] + 628690 + v20] = __return_address[4 * v30 /*0xffc9dc93*/
+ 634925
+ v20
+ a5];
__return_address[42 * __return_address[v20 + 628688] + 628691 + v20] = n4; /*0xffc9dcab*/
__return_address[42 * __return_address[v20 + 628688] + 628692 + v20] = n6; /*0xffc9dcc3*/
__return_address[42 * __return_address[v20 + 628688] + 628693 + v20] = a4; /*0xffc9dcdb*/
__return_address[42 * __return_address[v20 + 628688] + 628694 + v20] = a5; /*0xffc9dcf3*/
__return_address[42 * __return_address[v20 + 628688] + 628695 + v20] = a6; /*0xffc9dd07*/
__return_address[42 * __return_address[v20 + 628688] + 628696 + v20] = a7; /*0xffc9dd1f*/
*(_DWORD *)&__return_address[42 * __return_address[v20 + 628688] + 628697 + v20] = a8; /*0xffc9dd37*/
*(_WORD *)&__return_address[42 * __return_address[v20 + 628688] + 628701 + v20] = a9 & 0x3FF; /*0xffc9dd55*/
__return_address[42 * __return_address[v20 + 628688] + 628703 + v20] = a10; /*0xffc9dd6e*/
*(_DWORD *)&__return_address[42 * __return_address[v20 + 628688] + 628704 + v20] = a12; /*0xffc9dd86*/
n0x78 = __return_address[v31 + 633763]; /*0xffc9dd8d*/
__return_address[v31 + 633762] = 1; /*0xffc9dd94*/
if ( n0x78 < 0x78u ) /*0xffc9dd9e*/
__return_address[v31 + 633763] = n0x78 + 1; /*0xffc9dda2*/
n0x78_1 = __return_address[v20 + 628688]; /*0xffc9dda9*/
if ( n0x78_1 < 0x78u ) /*0xffc9ddb2*/
__return_address[v20 + 628688] = n0x78_1 + 1; /*0xffc9ddb6*/
KtiFunc8014((int)__return_address); /*0xffc9ddbe*/
KtiFunc83A2((int)__return_address, 31, 40, 0); /*0xffc9ddca*/
v34 = v20 + 42 * __return_address[v20 + 628688]; /*0xffc9ddda*/
DebugPrint( /*0xffc9de37*/
(int)__return_address,
128,
255,
255,
255,
255,
255,
255,
"$-$ N:%d, C:%d, D:%d, R:%d(%d), Ba:0x%X, Row:0x%05X, Col:0x%03X, Dq:%3d, DevMask[%05X] -\n",
__return_address[v34 + 628649],
__return_address[v34 + 628650],
__return_address[v34 + 628651],
__return_address[v34 + 628652],
__return_address[v34 + 628653],
__return_address[v34 + 628654],
*(_DWORD *)&__return_address[v34 + 628655],
*(unsigned __int16 *)&__return_address[v34 + 628659],
__return_address[v34 + 628661],
*(_DWORD *)&__return_address[v34 + 628662]);
goto LABEL_24; /*0xffc9de37*/
}
}
}
return 0; /*0xffc9d994*/
}
v22 = a4 + 2 * n6; /*0xffc9d9bb*/
v23 = v20 + 84 * v22; /*0xffc9d9c1*/
if ( __return_address[v23 + 633763] > 1u ) /*0xffc9d9cb*/
return 0; /*0xffc9d9cb*/
__return_address[v20 + 628689] = 1; /*0xffc9d9d6*/
__return_address[42 * __return_address[v20 + 628688] + 628690 + v20] = __return_address[4 * v22 + 634925 + v20 + a5]; /*0xffc9d9f5*/
__return_address[42 * __return_address[v20 + 628688] + 628691 + v20] = n4; /*0xffc9da0d*/
__return_address[42 * __return_address[v20 + 628688] + 628692 + v20] = n6; /*0xffc9da25*/
__return_address[42 * __return_address[v20 + 628688] + 628693 + v20] = a4; /*0xffc9da3d*/
__return_address[42 * __return_address[v20 + 628688] + 628694 + v20] = a5; /*0xffc9da55*/
__return_address[42 * __return_address[v20 + 628688] + 628695 + v20] = a6; /*0xffc9da6d*/
__return_address[42 * __return_address[v20 + 628688] + 628696 + v20] = a7; /*0xffc9da85*/
*(_DWORD *)&__return_address[42 * __return_address[v20 + 628688] + 628697 + v20] = a8; /*0xffc9daa3*/
*(_WORD *)&__return_address[42 * __return_address[v20 + 628688] + 628701 + v20] = a9 & 0x3FF; /*0xffc9dab7*/
__return_address[42 * __return_address[v20 + 628688] + 628703 + v20] = a10; /*0xffc9dad0*/
*(_DWORD *)&__return_address[42 * __return_address[v20 + 628688] + 628704 + v20] = a12; /*0xffc9dae8*/
n0x78_2 = __return_address[v23 + 633763]; /*0xffc9daef*/
__return_address[v23 + 633762] = 1; /*0xffc9daf6*/
if ( n0x78_2 < 0x78u ) /*0xffc9db00*/
__return_address[v23 + 633763] = n0x78_2 + 1; /*0xffc9db04*/
n0x78_3 = __return_address[v20 + 628688]; /*0xffc9db0b*/
if ( n0x78_3 < 0x78u ) /*0xffc9db14*/
__return_address[v20 + 628688] = n0x78_3 + 1; /*0xffc9db18*/
KtiFunc8014((int)__return_address); /*0xffc9db20*/
KtiFunc83A2((int)__return_address, 31, 40, 0); /*0xffc9db2c*/
v26 = v20 + 42 * __return_address[v20 + 628688]; /*0xffc9db3c*/
DebugPrint( /*0xffc9dbaa*/
(int)__return_address,
128,
255,
255,
255,
255,
255,
255,
"#-# N:%d, C:%d, D:%d, R:%d(%d), Ba:0x%X, Row:0x%05X, Col:0x%03X, Dq:%3d, DevMask[%05X] -\n",
__return_address[v26 + 628649],
__return_address[v26 + 628650],
__return_address[v26 + 628651],
__return_address[v26 + 628652],
__return_address[v26 + 628653],
__return_address[v26 + 628654],
*(_DWORD *)&__return_address[v26 + 628655],
*(unsigned __int16 *)&__return_address[v26 + 628659],
__return_address[v26 + 628661],
*(_DWORD *)&__return_address[v26 + 628662]);
LABEL_24:
KtiFunc846F(__return_address); /*0xffc9dbaf*/
KtiFunc834D((int)__return_address); /*0xffc9dbb9*/
return 1; /*0xffc9d990*/
}
// Function: MemChipFuncDE3C @ 0xffc9de3c (0x379 bytes)
// Index: 1214/2560
int __cdecl MemChipFuncDE3C(unsigned __int8 *p_n42, unsigned __int8 n4)
{
_BYTE *SocketInfo; // eax
unsigned __int8 n6; // bl
int v4; // edi
char *v5; // ebp
unsigned __int8 n2; // al
int v7; // ecx
int v8; // ebx
unsigned __int8 *v9; // edi
unsigned __int8 v10; // al
unsigned __int8 n3; // cl
unsigned __int8 v12; // al
int v14; // [esp-4h] [ebp-2Ch]
const char *[SKIP]__n; // [esp-4h] [ebp-2Ch]
unsigned __int8 n2_1; // [esp+13h] [ebp-15h]
int v17; // [esp+14h] [ebp-14h]
int v18; // [esp+18h] [ebp-10h]
unsigned __int8 n6_1; // [esp+1Ch] [ebp-Ch]
_BYTE *SocketInfo_1; // [esp+20h] [ebp-8h]
KtiFunc8014((int)p_n42); /*0xffc9de48*/
KtiFunc83A2((int)p_n42, 32, 40, 0); /*0xffc9de54*/
DebugPrint((int)p_n42, 128, 255, 255, 255, 255, 255, 255, "\n\nskTestDimmResults(N:%d) :: \n", n4);
SocketInfo = (_BYTE *)GetSocketInfo((int)p_n42, n4); /*0xffc9de82*/
n6 = 0; /*0xffc9de87*/
SocketInfo_1 = SocketInfo; /*0xffc9de89*/
n6_1 = 0; /*0xffc9de90*/
v4 = 0; /*0xffc9de94*/
v18 = 0; /*0xffc9de96*/
do
{
if ( !*SocketInfo ) /*0xffc9de9d*/
goto LABEL_23; /*0xffc9de9d*/
v17 = 0; /*0xffc9deb6*/
n2_1 = 0; /*0xffc9debb*/
v5 = (char *)(GetCpuCount((int)p_n42, n4, n6_1) + 150); /*0xffc9debf*/
n2 = 0; /*0xffc9dec5*/
v7 = 0; /*0xffc9dec7*/
do
{
if ( !*(v5 - 150) ) /*0xffc9ded2*/
goto LABEL_21; /*0xffc9ded2*/
v8 = 6365 * n4; /*0xffc9ded8*/
v9 = &p_n42[84 * v7 + 84 * v4]; /*0xffc9def1*/
v9[v8 + 633729] = n4; /*0xffc9def3*/
v9[v8 + 633730] = n6_1; /*0xffc9defe*/
v9[v8 + 633731] = n2_1; /*0xffc9df05*/
*(_WORD *)&v9[v8 + 633732] = *((_WORD *)v5 - 4); /*0xffc9df10*/
AutoGenFunc8E72((int)&v9[v8 + 633754], v5, 4); /*0xffc9df21*/
AutoGenFunc8E72((int)&v9[v8 + 633734], v5 + 22, 20); /*0xffc9df35*/
v9[v8 + 633753] = 0; /*0xffc9df3a*/
v9[v8 + 633758] = 256 << *(v5 - 32) >> 10; /*0xffc9df4f*/
v9[v8 + 633759] = 4 << (*(v5 - 40) & 7); /*0xffc9df66*/
v9[v8 + 633760] = *(v5 - 26); /*0xffc9df70*/
v9[v8 + 633761] = *(v5 - 131); /*0xffc9df7d*/
*(_DWORD *)&v9[v8 + 633764] = *(_DWORD *)(v5 - 146) / 1000; /*0xffc9df8d*/
v14 = (unsigned __int8)RmtFunc35FB(*(v5 - 5)); /*0xffc9dfa4*/
v10 = RmtFunc35FB(*(v5 - 4)); /*0xffc9dfaa*/
AutoGenFuncEB71((unsigned int)&v9[v8 + 633768], 0xAu, "ww%02d 20%02d", v10, v14); /*0xffc9dfc4*/
if ( v9[v8 + 633763] ) /*0xffc9dfcc*/
{
KtiFunc845C((int)p_n42); /*0xffc9dfd7*/
}
else if ( v9[v8 + 633762] == 4 ) /*0xffc9dfeb*/
{
KtiFunc83A2((int)p_n42, 33, 40, 0); /*0xffc9dfef*/
}
else
{
KtiFunc83A2((int)p_n42, 32, 40, 0); /*0xffc9dff4*/
}
DebugPrint( /*0xffc9e0a9*/
(int)p_n42,
128,
255,
255,
255,
255,
255,
255,
" N:%d, C:%d, D:%d, [%04X:%s], [%02X%02X%02X%02X], %2dGbx%d %dH/%dR, %d, %s, %d'C<>%d'C - ",
v9[v8 + 633729],
v9[v8 + 633730],
v9[v8 + 633731],
*(unsigned __int16 *)&v9[v8 + 633732],
(const char *)&v9[v8 + 633734],
v9[v8 + 633754],
v9[v8 + 633755],
v9[v8 + 633756],
v9[v8 + 633757],
v9[v8 + 633758],
v9[v8 + 633759],
v9[v8 + 633760],
v9[v8 + 633761],
*(_DWORD *)&v9[v8 + 633764],
(const char *)&v9[v8 + 633768],
v9[v8 + 633778],
v9[v8 + 633779]);
n3 = v9[v8 + 633762]; /*0xffc9e0ae*/
if ( n3 )
{
if ( n3 != 4 )
{
v12 = v9[v8 + 633763]; /*0xffc9e0f1*/
if ( v12 <= 1u )
{
if ( n3 == 3 )
DebugPrint((int)p_n42, 128, 255, 255, 255, 255, 255, 255, "[REPAIRED : %1d] \n", v12);
else
DebugPrint((int)p_n42, 128, 255, 255, 255, 255, 255, 255, "[FAIL : %1d] \n", v12);
}
else
{
DebugPrint((int)p_n42, 128, 255, 255, 255, 255, 255, 255, "[Non-Fixable FAIL : %1d] \n", v12);
v9[v8 + 633762] = 2; /*0xffc9e112*/
}
goto LABEL_20; /*0xffc9e11a*/
}
[SKIP]__n = "[SKIP] \n"; /*0xffc9e0e1*/
}
else
{
[SKIP]__n = "[PASS] \n"; /*0xffc9e0bc*/
}
DebugPrint((int)p_n42, 128, 255, 255, 255, 255, 255, 255, [SKIP]__n); /*0xffc9e0d2*/
LABEL_20:
n2 = n2_1; /*0xffc9e151*/
v4 = v18; /*0xffc9e155*/
v7 = v17; /*0xffc9e159*/
LABEL_21:
++n2; /*0xffc9e15d*/
v5 += 1379; /*0xffc9e15f*/
++v7; /*0xffc9e165*/
n2_1 = n2; /*0xffc9e166*/
v17 = v7; /*0xffc9e16a*/
}
while ( n2 < 2u );
n6 = n6_1; /*0xffc9e176*/
SocketInfo = SocketInfo_1; /*0xffc9e17a*/
LABEL_23:
++n6; /*0xffc9e17e*/
SocketInfo += 7688; /*0xffc9e180*/
v4 += 2; /*0xffc9e185*/
n6_1 = n6; /*0xffc9e188*/
SocketInfo_1 = SocketInfo; /*0xffc9e18c*/
v18 = v4; /*0xffc9e190*/
}
while ( n6 < 6u );
KtiFunc846F(p_n42); /*0xffc9e19e*/
KtiFunc834D((int)p_n42); /*0xffc9e1a4*/
return 0; /*0xffc9e1ab*/
}
// Function: MemChipFuncE1B5 @ 0xffc9e1b5 (0x173 bytes)
// Index: 1215/2560
int __cdecl MemChipFuncE1B5(unsigned __int8 *n6, unsigned __int8 n4)
{
int v2; // edi
unsigned __int8 v3; // bl
int v4; // ecx
v2 = 6365 * n4; /*0xffc9e1c4*/
if ( n6[v2 + 628688] )
{
KtiFunc8014((int)n6); /*0xffc9e1d9*/
KtiFunc83A2((int)n6, 33, 40, 0); /*0xffc9e1e5*/
DebugPrint(
(int)n6,
128,
255,
255,
255,
255,
255,
255,
"\n\nskTestErrorLogInformation(N:%d, %d) :: \n",
n4,
n6[v2 + 628688]);
v3 = 0; /*0xffc9e212*/
do /*0xffc9e2b3*/
{
v4 = v2 + 42 * v3; /*0xffc9e21a*/
if ( !n6[v4 + 628689] ) /*0xffc9e21c*/
break; /*0xffc9e224*/
DebugPrint( /*0xffc9e2a2*/
(int)n6,
128,
255,
255,
255,
255,
255,
255,
"- N:%d, C:%d, D:%d, Rank:%d, subRank:%d, Ba:0x%X, Row:0x%05X, Column:0x%03X, Dq:%3d, DramMask[%05X] -\n",
n6[v4 + 628691],
n6[v4 + 628692],
n6[v4 + 628693],
n6[v4 + 628694],
n6[v4 + 628695],
n6[v4 + 628696],
*(_DWORD *)&n6[v4 + 628697] & 0xFFFFF,
*(_WORD *)&n6[v4 + 628701] & 0x3FF,
n6[v4 + 628703],
*(_DWORD *)&n6[v4 + 628704] & 0xFFFFF);
++v3; /*0xffc9e2aa*/
}
while ( v3 <= n6[v2 + 628688] ); /*0xffc9e2b3*/
MemChipFuncCCE8(n6, n4, 0); /*0xffc9e2c1*/
MemChipFuncD14E(n6, n4, 0); /*0xffc9e2ca*/
KtiFunc846F(n6); /*0xffc9e2d0*/
KtiFunc834D((int)n6); /*0xffc9e2d6*/
if ( n6[129] ) /*0xffc9e2de*/
{
DebugPrint((int)n6, 128, 255, 255, 255, 255, 255, 255, "Repair Phase - Enable \n"); /*0xffc9e2f8*/
MemChipFuncD4E7(n6); /*0xffc9e2fe*/
}
else
{
DebugPrint((int)n6, 128, 255, 255, 255, 255, 255, 255, "Repair Phase - Disable \n"); /*0xffc9e319*/
}
}
return 0; /*0xffc9e321*/
}
// Function: MemChipFuncE328 @ 0xffc9e328 (0x9d bytes)
// Index: 1216/2560
int __cdecl MemChipFuncE328(int p_n42, unsigned __int8 a2, unsigned __int8 a3, char n15, char a5, char a6, char *buf)
{
char *buf_1; // esi
char i; // cl
MemChipFuncC6C4(p_n42); /*0xffc9e333*/
buf_1 = buf; /*0xffc9e33c*/
MEMORY[0xBFD04] = n15 & 0xF | (16 * ((8 * a6) | a5 & 7)); /*0xffc9e35d*/
MEMORY[0xBFD00] = a3 + 80 * a2; /*0xffc9e36d*/
for ( i = *buf; *buf_1; i = *buf_1 ) /*0xffc9e36f*/
{
++buf_1; /*0xffc9e37d*/
if ( i == 10 ) /*0xffc9e381*/
{
MEMORY[0xBFD00] += 80; /*0xffc9e3ac*/
}
else if ( i == 13 ) /*0xffc9e388*/
{
MEMORY[0xBFD00] = 80 * (MEMORY[0xBFD00] / 0x50u); /*0xffc9e3a8*/
}
else
{
*(_BYTE *)(2 * MEMORY[0xBFD00] + 0xB8000) = i; /*0xffc9e38a*/
*(_BYTE *)(2 * MEMORY[0xBFD00]++ + 0xB8001) = MEMORY[0xBFD04]; /*0xffc9e396*/
}
}
MemChipFuncCD86(p_n42); /*0xffc9e3ba*/
return 0; /*0xffc9e3c0*/
}
// Function: MemChipFuncE3C5 @ 0xffc9e3c5 (0x2b9 bytes)
// Index: 1217/2560
int __cdecl MemChipFuncE3C5(int __return_address, _BYTE *a2, char n2)
{
int v3; // esi
int v4; // ebp
_BYTE *v5; // ebx
_BYTE *v6; // ebp
_BYTE *v7; // esi
_BYTE *v8; // edi
_BYTE *v9; // edx
_BYTE *v10; // ecx
int result; // eax
_BYTE *v12; // esi
char *v13; // ebx
int n4; // edi
char v15; // al
_BYTE *v16; // ebx
char *v17; // ebp
int n20; // esi
char v19; // al
__int16 *n2a_2; // esi
char *v21; // ebp
_BYTE *v22; // ebx
_WORD *v23; // edi
int n4_1; // edx
char v25; // al
__int16 v26; // ax
bool v27; // zf
_BYTE *v28; // ecx
_BYTE *v29; // edx
int n2a_1; // [esp+10h] [ebp-2Ch]
_BYTE *v31; // [esp+14h] [ebp-28h]
_BYTE *v32; // [esp+18h] [ebp-24h]
_BYTE *v33; // [esp+1Ch] [ebp-20h]
int n2_2; // [esp+20h] [ebp-1Ch]
_BYTE *v35; // [esp+24h] [ebp-18h]
_BYTE *v36; // [esp+28h] [ebp-14h]
int n6; // [esp+2Ch] [ebp-10h]
int n2_1; // [esp+30h] [ebp-Ch]
int v39; // [esp+34h] [ebp-8h]
int v40; // [esp+38h] [ebp-4h]
__int16 *n2a; // [esp+48h] [ebp+Ch]
v3 = 50813 * (unsigned __int8)n2; /*0xffc9e3df*/
v4 = 4292 * (unsigned __int8)n2; /*0xffc9e3e5*/
n6 = 6; /*0xffc9e3eb*/
a2[8604] = *(_BYTE *)(__return_address + 257311); /*0xffc9e3f9*/
*((_WORD *)a2 + 4301) = *(_WORD *)(__return_address + 257315); /*0xffc9e406*/
v5 = &a2[v4 + 4234]; /*0xffc9e40d*/
a2[8] = *(_BYTE *)(__return_address + 9402); /*0xffc9e415*/
a2[8601] = *(_BYTE *)(__return_address + 257313); /*0xffc9e41e*/
a2[8600] = *(_BYTE *)(__return_address + 257312); /*0xffc9e42a*/
*(_DWORD *)a2 = *(_DWORD *)(__return_address + 130); /*0xffc9e436*/
a2[v4 + 13] = *(_BYTE *)(v3 + __return_address + 58722); /*0xffc9e43f*/
a2[v4 + 12] = *(_BYTE *)(v3 + __return_address + 58721); /*0xffc9e44a*/
a2[v4 + 14] = *(_BYTE *)(v3 + __return_address + 58724); /*0xffc9e455*/
a2[v4 + 17] = 0; /*0xffc9e459*/
a2[v4 + 18] = *(_BYTE *)(v3 + __return_address + 10194); /*0xffc9e465*/
*((_DWORD *)a2 + 2149) = *(_DWORD *)(__return_address + 246468); /*0xffc9e46f*/
v40 = v3; /*0xffc9e47d*/
n2a_1 = v3 + __return_address + 12594; /*0xffc9e481*/
v39 = v4; /*0xffc9e497*/
v6 = &a2[v4 + 4220]; /*0xffc9e4a1*/
n2_1 = 2; /*0xffc9e4a3*/
v7 = &a2[888 * (unsigned __int8)n2 + 8609]; /*0xffc9e4ab*/
v35 = v7; /*0xffc9e4b3*/
v8 = (_BYTE *)(48704 * (unsigned __int8)n2 + __return_address + 258725); /*0xffc9e4b7*/
v36 = v8; /*0xffc9e4b9*/
do /*0xffc9e64a*/
{
v9 = v8 + 430; /*0xffc9e4c0*/
*(v7 - 1) = *(v8 - 3); /*0xffc9e4c6*/
v10 = v7 + 16; /*0xffc9e4c9*/
*v7 = *v8; /*0xffc9e4ce*/
v7[2] = v8[6670]; /*0xffc9e4d6*/
v7[1] = v8[6259]; /*0xffc9e4df*/
*(_DWORD *)(v7 + 3) = (unsigned __int8)v8[313]; /*0xffc9e4e9*/
*(_DWORD *)(v7 + 11) = (unsigned __int8)v8[308]; /*0xffc9e4f3*/
*(_DWORD *)(v7 + 7) = (unsigned __int8)v8[317]; /*0xffc9e4fd*/
HIWORD(result) = HIWORD(n2a_1); /*0xffc9e500*/
v32 = v6; /*0xffc9e504*/
n2a = (__int16 *)n2a_1; /*0xffc9e508*/
v33 = v8 + 430; /*0xffc9e50c*/
v31 = v5; /*0xffc9e510*/
n2_2 = 2; /*0xffc9e514*/
do /*0xffc9e61b*/
{
v12 = v5; /*0xffc9e51f*/
*(v10 - 1) = *(v9 - 18); /*0xffc9e521*/
*v10 = *v9; /*0xffc9e526*/
v10[1] = *(v9 - 37); /*0xffc9e52b*/
v10[2] = v9[82]; /*0xffc9e531*/
v10[3] = v9[81]; /*0xffc9e537*/
v10[4] = v9[67]; /*0xffc9e53d*/
v10[5] = v9[87]; /*0xffc9e543*/
*(_WORD *)(v10 + 7) = *(_WORD *)(v9 + 105); /*0xffc9e54a*/
v10[29] = *(v9 - 17); /*0xffc9e551*/
v10[30] = v9[70]; /*0xffc9e557*/
v10[31] = v9[76]; /*0xffc9e55d*/
v10[32] = v9[83]; /*0xffc9e563*/
*v6 = 0; /*0xffc9e566*/
*((_WORD *)v5 - 1) = *((_WORD *)v9 + 54); /*0xffc9e570*/
v13 = v9 + 113; /*0xffc9e574*/
n4 = 4; /*0xffc9e577*/
do /*0xffc9e581*/
{
v15 = *v13++; /*0xffc9e578*/
*v12++ = v15; /*0xffc9e57b*/
--n4; /*0xffc9e57e*/
}
while ( n4 ); /*0xffc9e581*/
v16 = v10 + 9; /*0xffc9e585*/
v17 = v9 + 135; /*0xffc9e588*/
n20 = 20; /*0xffc9e58e*/
do /*0xffc9e599*/
{
v19 = *v17++; /*0xffc9e58f*/
*v16++ = v19; /*0xffc9e593*/
--n20; /*0xffc9e596*/
}
while ( n20 ); /*0xffc9e599*/
n2a_2 = n2a; /*0xffc9e59b*/
v21 = v9 + 190; /*0xffc9e59f*/
v22 = v10 + 34; /*0xffc9e5a7*/
v23 = v10 + 39; /*0xffc9e5aa*/
n4_1 = 4; /*0xffc9e5ad*/
do /*0xffc9e5e7*/
{
*(v22 - 1) = *(v21 - 3); /*0xffc9e5b1*/
v25 = *v21; /*0xffc9e5b4*/
v21 += 242; /*0xffc9e5b7*/
*v22 = v25; /*0xffc9e5bd*/
v22 += 8; /*0xffc9e5bf*/
*(_WORD *)(v22 - 7) = *(n2a_2 - 4); /*0xffc9e5c6*/
v26 = *n2a_2; /*0xffc9e5ca*/
n2a_2 += 122; /*0xffc9e5cd*/
*(_WORD *)(v22 - 5) = v26; /*0xffc9e5d3*/
LOWORD(result) = *(_WORD *)(v21 - 229); /*0xffc9e5d7*/
*v23 = result; /*0xffc9e5de*/
v23 += 4; /*0xffc9e5e1*/
--n4_1; /*0xffc9e5e4*/
}
while ( n4_1 ); /*0xffc9e5e7*/
v10 += 66; /*0xffc9e5ed*/
v5 = v31 + 6; /*0xffc9e5f4*/
v6 = v32 + 1; /*0xffc9e5fb*/
n2a += 1344; /*0xffc9e5fc*/
v9 = v33 + 1379; /*0xffc9e604*/
v27 = n2_2-- == 1; /*0xffc9e60a*/
v31 += 6; /*0xffc9e60f*/
++v32; /*0xffc9e613*/
v33 += 1379; /*0xffc9e617*/
}
while ( !v27 ); /*0xffc9e61b*/
v7 = v35 + 148; /*0xffc9e629*/
n2a_1 += 8077; /*0xffc9e62f*/
v8 = v36 + 7688; /*0xffc9e637*/
v27 = n6-- == 1; /*0xffc9e63d*/
v35 += 148; /*0xffc9e642*/
v36 += 7688; /*0xffc9e646*/
}
while ( !v27 ); /*0xffc9e64a*/
v28 = &a2[v39 + 15]; /*0xffc9e65b*/
v29 = (_BYTE *)(__return_address + v40 + 10189); /*0xffc9e665*/
do /*0xffc9e678*/
{
LOBYTE(result) = *v29++; /*0xffc9e66d*/
*v28++ = result; /*0xffc9e670*/
--n2_1; /*0xffc9e673*/
}
while ( n2_1 ); /*0xffc9e678*/
return result; /*0xffc9e669*/
}
// Function: MemChipFuncE67E @ 0xffc9e67e (0x28 bytes)
// Index: 1218/2560
char __cdecl MemChipFuncE67E(int __return_address)
{
DebugPrint(__return_address, 3, 255, 255, 255, 255, 255, 255, "Get rcWriteRegDump\n"); /*0xffc9e696*/
return *(_BYTE *)(__return_address + 246409); /*0xffc9e6a4*/
}
// Function: KtiCohMain @ 0xffc9e6a6 (0x18c bytes)
// Index: 1219/2560
int __cdecl KtiCohMain(unsigned __int8 *__return_address)
{
char n2_2; // bl
int n2_1; // edi
int n2; // [esp+10h] [ebp-2A24h]
char n2a; // [esp+10h] [ebp-2A24h]
_BYTE v6[10784]; // [esp+14h] [ebp-2A20h] BYREF
n2_2 = __return_address[9402]; /*0xffc9e6c3*/
LOBYTE(n2) = n2_2; /*0xffc9e6da*/
DebugPrint( /*0xffc9e6de*/
(int)__return_address,
3,
255,
255,
255,
255,
255,
255,
"STEP Enable Status = %d\n",
__return_address[1486]);
DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "STEP Mode = %d\n", __return_address[1487]); /*0xffc9e6f8*/
if ( __return_address[1486] ) /*0xffc9e700*/
{
if ( !*((_DWORD *)__return_address + 61601) /*0xffc9e749*/
&& (*(_DWORD *)(__return_address + 9405) == 8 || *(_DWORD *)(__return_address + 9405) == 11) )
{
DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "STEP Enabled, Run Test.\n"); /*0xffc9e75c*/
DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "STEP Version = %d.%d.%d\n", 3, 3, 3); /*0xffc9e771*/
n2_1 = n2; /*0xffc9e77f*/
v6[4] = __return_address[1486]; /*0xffc9e783*/
v6[5] = __return_address[1487]; /*0xffc9e78d*/
MemChipFuncE3C5((int)__return_address, v6, n2_2); /*0xffc9e798*/
IioFunc8E1F(__return_address, v6, n2); /*0xffc9e7a4*/
if ( (*(_DWORD *)(__return_address + 130) & 0x80) == 0 || n2_2 ) /*0xffc9e7bb*/
{
if ( (*(_DWORD *)(__return_address + 130) & 0x80) == 0 ) /*0xffc9e7e2*/
MemChipFuncE832((int)__return_address, v6, n2_2); /*0xffc9e7eb*/
}
else
{
n2a = 0; /*0xffc9e7bd*/
do /*0xffc9e7dc*/
{
MemChipFuncE832((int)__return_address, v6, n2a); /*0xffc9e7cb*/
n2a = ++n2_2; /*0xffc9e7d5*/
}
while ( (unsigned __int8)n2_2 < 2u ); /*0xffc9e7dc*/
}
IioFuncC358(__return_address, v6, n2_1); /*0xffc9e7fa*/
}
else
{
DebugPrint( /*0xffc9e811*/
(int)__return_address,
3,
255,
255,
255,
255,
255,
255,
"STEP test support Cold Boot and Cold Boot Fast only. Execute Full Reset.\n");
AutoGenFunc804(0xCF9u, 0xEu); /*0xffc9e81d*/
}
}
else
{
DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "STEP Disabled.\n"); /*0xffc9e716*/
}
return 0; /*0xffc9e825*/
}
// Function: MemChipFuncE832 @ 0xffc9e832 (0x24a bytes)
// Index: 1220/2560
int __cdecl MemChipFuncE832(int __return_address, _BYTE *a2, unsigned __int8 n2)
{
unsigned int v3; // eax
unsigned __int16 n0xD2; // bp
unsigned __int16 n5; // di
unsigned __int8 n2_1; // cl
unsigned __int16 i; // bx
_BYTE *v8; // edx
int v9; // ecx
bool v10; // cf
int v11; // ecx
int v12; // ebx
char *v13; // edi
_BYTE *v14; // ecx
_BYTE *v15; // edx
_BYTE *v16; // ebp
char *v17; // esi
int n4; // ecx
char v19; // al
int v21; // [esp+10h] [ebp-10h]
int n2_2; // [esp+10h] [ebp-10h]
unsigned int v23; // [esp+14h] [ebp-Ch]
_BYTE *v24; // [esp+14h] [ebp-Ch]
int n6; // [esp+18h] [ebp-8h]
unsigned __int16 n0xD2_1; // [esp+1Ch] [ebp-4h]
v3 = *(unsigned __int16 *)(__return_address + 622906); /*0xffc9e840*/
n0xD2 = *(_WORD *)(__return_address + 622906); /*0xffc9e847*/
*(_DWORD *)(__return_address + 622898) = 1346720851; /*0xffc9e849*/
*(_DWORD *)(__return_address + 622902) = 1145128264; /*0xffc9e853*/
*(_DWORD *)(__return_address + 622909) = 100860675; /*0xffc9e85d*/
*(_BYTE *)(__return_address + 622908) = 2; /*0xffc9e867*/
*(_BYTE *)(__return_address + 622913) = 2; /*0xffc9e86e*/
if ( n0xD2 ) /*0xffc9e87c*/
{
n5 = v3 / 0x2A; /*0xffc9e88a*/
v23 = v3 % 0x2A; /*0xffc9e890*/
}
else
{
n5 = 0; /*0xffc9e87e*/
v23 = 0; /*0xffc9e880*/
}
n2_1 = n2; /*0xffc9e894*/
for ( i = 0; i < 0xD2u; ++i ) /*0xffc9e898*/
{
if ( n0xD2 >= 0xD2u || n5 >= 5u ) /*0xffc9e8ac*/
break; /*0xffc9e8ac*/
v8 = &a2[4292 * n2_1]; /*0xffc9e8c1*/
v21 = 20 * i; /*0xffc9e8c5*/
if ( v8[v21 + 20] == 0xAA ) /*0xffc9e8ce*/
{
v9 = 24 * ((unsigned __int16)v23 + 42 * n5); /*0xffc9e8e9*/
*(_BYTE *)(v9 + __return_address + 623594) = n2; /*0xffc9e8ec*/
*(_BYTE *)(v9 + __return_address + 623595) = v8[v21 + 21]; /*0xffc9e8fb*/
*(_BYTE *)(v9 + __return_address + 623596) = v8[v21 + 22]; /*0xffc9e90a*/
*(_BYTE *)(v9 + __return_address + 623597) = v8[v21 + 23]; /*0xffc9e919*/
*(_BYTE *)(v9 + __return_address + 623598) = v8[v21 + 24]; /*0xffc9e928*/
*(_DWORD *)(v9 + __return_address + 623602) = *(_DWORD *)&v8[v21 + 28]; /*0xffc9e937*/
*(_WORD *)(v9 + __return_address + 623606) = *(_WORD *)&v8[v21 + 32]; /*0xffc9e947*/
*(_BYTE *)(v9 + __return_address + 623599) = (v8[v21 + 34] >> 2) & 3; /*0xffc9e95c*/
++n0xD2; /*0xffc9e96d*/
*(_BYTE *)(v9 + __return_address + 623600) = v8[v21 + 34] & 3; /*0xffc9e96e*/
*(_BYTE *)(v9 + __return_address + 623601) = v8[v21 + 35]; /*0xffc9e97d*/
*(_BYTE *)(v9 + __return_address + 623608) = v8[v21 + 36]; /*0xffc9e98c*/
*(_BYTE *)(v9 + __return_address + 623609) = v8[v21 + 37]; /*0xffc9e99b*/
*(_BYTE *)(v9 + __return_address + 623610) = v8[v21 + 38]; /*0xffc9e9aa*/
v10 = (unsigned __int16)++v23 < 0x2Au; /*0xffc9e9b7*/
n2_1 = n2; /*0xffc9e9be*/
if ( !v10 ) /*0xffc9e9c2*/
{
v23 = 0; /*0xffc9e9c4*/
++n5; /*0xffc9e9c9*/
}
}
}
v11 = 4292 * n2; /*0xffc9e9e7*/
n0xD2_1 = n0xD2; /*0xffc9e9ed*/
n6 = 6; /*0xffc9e9f5*/
v12 = 72 * n2 + __return_address + 623020; /*0xffc9e9fd*/
v13 = &a2[v11 + 4234]; /*0xffc9ea0e*/
v14 = &a2[v11 + 4220]; /*0xffc9ea16*/
v15 = (_BYTE *)(12 * n2 + __return_address + 622922); /*0xffc9ea18*/
do /*0xffc9ea61*/
{
v24 = v14; /*0xffc9ea1a*/
n2_2 = 2; /*0xffc9ea1e*/
do /*0xffc9ea5a*/
{
v16 = (_BYTE *)v12; /*0xffc9ea28*/
*v15 = *v14; /*0xffc9ea2a*/
v17 = v13; /*0xffc9ea2c*/
*(_WORD *)(v12 - 2) = *((_WORD *)v13 - 1); /*0xffc9ea34*/
n4 = 4; /*0xffc9ea38*/
do /*0xffc9ea43*/
{
v19 = *v17++; /*0xffc9ea39*/
*v16++ = v19; /*0xffc9ea3c*/
--n4; /*0xffc9ea40*/
}
while ( n4 ); /*0xffc9ea43*/
v12 += 6; /*0xffc9ea49*/
v13 += 6; /*0xffc9ea4c*/
v14 = v24 + 1; /*0xffc9ea4f*/
++v15; /*0xffc9ea50*/
++v24; /*0xffc9ea51*/
--n2_2; /*0xffc9ea55*/
}
while ( n2_2 ); /*0xffc9ea5a*/
--n6; /*0xffc9ea5c*/
}
while ( n6 ); /*0xffc9ea61*/
*(_WORD *)(__return_address + 622906) = n0xD2_1; /*0xffc9ea6c*/
return 0; /*0xffc9ea6b*/
}
// Function: MemChipFuncEA7C @ 0xffc9ea7c (0x32 bytes)
// Index: 1221/2560
int __cdecl MemChipFuncEA7C(int __return_address, unsigned __int8 a2)
{
int result; // eax
result = DebugPrint(__return_address, 3, 255, 255, 255, 255, 255, 255, "Set rcWriteRegDump to %d\n", a2); /*0xffc9ea9d*/
*(_BYTE *)(__return_address + 246409) = a2; /*0xffc9eaa5*/
return result; /*0xffc9eaab*/
}
// Function: MemChipFuncEAAE @ 0xffc9eaae (0x33e bytes)
// Index: 1222/2560
unsigned __int8 __cdecl MemChipFuncEAAE(int __return_address, int a2)
{
_WORD *v2; // ebx
unsigned __int8 n2_4; // al
_BYTE *v4; // edx
_BYTE *v5; // ebp
_BYTE *v6; // ecx
char *v7; // esi
_BYTE *v8; // edi
_BYTE *v9; // ebx
char *v10; // ebp
int n4; // edi
char v12; // al
bool v13; // zf
_WORD *v14; // ebx
int n0xD2; // ebp
int n0xD2_1; // ecx
int n2_5; // esi
int v18; // edi
int v19; // edx
int v20; // esi
int v21; // ecx
unsigned __int8 v22; // al
char n2_2; // al
char n2_3; // [esp+7h] [ebp-19h]
_BYTE *v25; // [esp+8h] [ebp-18h]
int n2_1; // [esp+Ch] [ebp-14h]
int n6; // [esp+10h] [ebp-10h]
int v28; // [esp+14h] [ebp-Ch]
int n2; // [esp+18h] [ebp-8h]
int n0xD2_2; // [esp+18h] [ebp-8h]
_WORD *v31; // [esp+1Ch] [ebp-4h]
int n2_6; // [esp+1Ch] [ebp-4h]
v2 = AutoGenFuncACD((int)&unk_FFD51474); /*0xffc9eabc*/
v31 = v2; /*0xffc9eabf*/
n2_4 = ProcessLibraryEntryPoint(); /*0xffc9eac3*/
if ( !n2_4 ) /*0xffc9eaca*/
{
LABEL_4:
if ( !v2 ) /*0xffc9eae6*/
return n2_4; /*0xffc9eae6*/
goto LABEL_5; /*0xffc9eae6*/
}
if ( !v2 ) /*0xffc9eace*/
{
n2_4 = DebugPrintEx( /*0xffc9eadc*/
(int)"e:\\hs\\PurleySktPkg\\Library\\ProcMemInit\\STB_OEM_EnCPGC.c",
78,
(int)"GuidHob != ((void *) 0)");
goto LABEL_4; /*0xffc9eadc*/
}
LABEL_5:
v4 = v2 + 87; /*0xffc9eaec*/
n2 = 2; /*0xffc9eaf8*/
v5 = (_BYTE *)(a2 + 4220); /*0xffc9eb06*/
*(_DWORD *)(v2 + 2061) = *(_DWORD *)(a2 + 8596); /*0xffc9eb0c*/
v6 = v2 + 100; /*0xffc9eb12*/
v28 = a2 + 4220; /*0xffc9eb18*/
do /*0xffc9eb86*/
{
v7 = v5 + 14; /*0xffc9eb1d*/
n6 = 6; /*0xffc9eb20*/
v8 = v5; /*0xffc9eb28*/
do /*0xffc9eb71*/
{
v25 = v8; /*0xffc9eb2a*/
n2_1 = 2; /*0xffc9eb2e*/
do /*0xffc9eb6a*/
{
v9 = v6; /*0xffc9eb38*/
*v4 = *v8; /*0xffc9eb3a*/
v10 = v7; /*0xffc9eb3c*/
*((_WORD *)v6 - 1) = *((_WORD *)v7 - 1); /*0xffc9eb44*/
n4 = 4; /*0xffc9eb48*/
do /*0xffc9eb53*/
{
v12 = *v10++; /*0xffc9eb49*/
*v9++ = v12; /*0xffc9eb4d*/
--n4; /*0xffc9eb50*/
}
while ( n4 ); /*0xffc9eb53*/
v6 += 6; /*0xffc9eb59*/
v7 += 6; /*0xffc9eb5c*/
v8 = v25 + 1; /*0xffc9eb5f*/
++v4; /*0xffc9eb60*/
++v25; /*0xffc9eb61*/
--n2_1; /*0xffc9eb65*/
}
while ( n2_1 ); /*0xffc9eb6a*/
--n6; /*0xffc9eb6c*/
}
while ( n6 ); /*0xffc9eb71*/
v5 = (_BYTE *)(v28 + 4292); /*0xffc9eb77*/
v13 = n2-- == 1; /*0xffc9eb7d*/
v28 += 4292; /*0xffc9eb82*/
}
while ( !v13 ); /*0xffc9eb86*/
v14 = v31; /*0xffc9eb88*/
n0xD2 = 0; /*0xffc9eb8c*/
n2_4 = 0; /*0xffc9eb8e*/
n2_3 = 0; /*0xffc9eb95*/
do
{
if ( (unsigned __int16)n0xD2 >= 0xD2u ) /*0xffc9eb9c*/
break; /*0xffc9eb9c*/
n0xD2_1 = 0; /*0xffc9eba2*/
n0xD2_2 = 0; /*0xffc9eba4*/
do
{
if ( (unsigned __int16)n0xD2 >= 0xD2u ) /*0xffc9ebab*/
break; /*0xffc9ebab*/
n2_5 = n2_4; /*0xffc9ebb1*/
n2_4 = n2_3; /*0xffc9ebba*/
v18 = 4292 * n2_5; /*0xffc9ebbe*/
n2_6 = n2_5; /*0xffc9ebc4*/
v19 = a2 + 20 * (unsigned __int16)n0xD2_1; /*0xffc9ebc8*/
if ( *(_BYTE *)(4292 * n2_5 + v19 + 20) == 0xAA
&& (unsigned __int8)n2_3 < 2u
&& *(_BYTE *)(v18 + v19 + 21) < 6u
&& *(_BYTE *)(v18 + v19 + 22) < 2u
&& *(_BYTE *)(v18 + v19 + 23) < 4u
&& *(_BYTE *)(v18 + v19 + 24) < 8u
&& *(_BYTE *)(v18 + v19 + 34) < 0x10u
&& *(_DWORD *)(v18 + v19 + 28) < 0x40000u
&& *(_WORD *)(v18 + v19 + 32) < 0x400u
&& *(_BYTE *)(v18 + v19 + 35) < 0x48u
&& *(_BYTE *)(v18 + v19 + 36) < 3u )
{
while ( LOBYTE(v14[9 * (unsigned __int16)n0xD2 + 171]) == 0xAA ) /*0xffc9ec5b*/
++n0xD2; /*0xffc9ec4c*/
v20 = 9 * (unsigned __int16)n0xD2; /*0xffc9ec64*/
HIBYTE(v14[v20 + 171]) = n2_3; /*0xffc9ec67*/
LOBYTE(v14[v20 + 171]) = -86; /*0xffc9ec6e*/
LOBYTE(v14[v20 + 172]) = *(_BYTE *)(v18 + v19 + 21); /*0xffc9ec7a*/
HIBYTE(v14[v20 + 172]) = *(_BYTE *)(v18 + v19 + 22); /*0xffc9ec85*/
HIBYTE(v14[v20 + 173]) = *(_BYTE *)(v18 + v19 + 24); /*0xffc9ec90*/
LOBYTE(v14[v20 + 173]) = *(_BYTE *)(v18 + v19 + 23); /*0xffc9ec9b*/
LOBYTE(v14[v20 + 177]) = (*(_BYTE *)(v18 + v19 + 34) >> 2) & 3; /*0xffc9ecab*/
HIBYTE(v14[v20 + 177]) = *(_BYTE *)(v18 + v19 + 34) & 3; /*0xffc9ecb8*/
v21 = 9 * ((unsigned __int16)n0xD2 + 18); /*0xffc9ecc2*/
*(_DWORD *)&v14[v21 + 12] = *(_DWORD *)(v18 + v19 + 28); /*0xffc9ecc9*/
v14[v20 + 176] = *(_WORD *)(v18 + v19 + 32); /*0xffc9ecd2*/
LOBYTE(v14[v20 + 178]) = *(_BYTE *)(v18 + v19 + 35); /*0xffc9ecde*/
HIBYTE(v14[v20 + 178]) = *(_BYTE *)(v18 + v19 + 36); /*0xffc9ece9*/
LOBYTE(v14[v20 + 179]) = *(_BYTE *)(v18 + v19 + 37); /*0xffc9ecf4*/
v22 = *(_BYTE *)(v18 + v19 + 38); /*0xffc9ecfb*/
HIBYTE(v14[v20 + 179]) = v22; /*0xffc9ed04*/
DebugPrint(
__return_address,
3,
255,
255,
255,
255,
255,
255,
"Save HOB Data : [FailedPatternBitMask 0x%X] N%d.C%d.D%d. R%d.CID%d.BG%d.BA%d.ROW:0x%05x.COL:0x%03x.DQ%02d.Temp%02d'C.",
LOBYTE(v14[v20 + 179]),
n2_6,
LOBYTE(v14[v20 + 172]),
HIBYTE(v14[v20 + 172]),
LOBYTE(v14[v20 + 173]),
HIBYTE(v14[v20 + 173]),
LOBYTE(v14[v20 + 177]),
HIBYTE(v14[v20 + 177]),
*(_DWORD *)&v14[v21 + 12],
(unsigned __int16)v14[v20 + 176],
LOBYTE(v14[v20 + 178]),
v22);
n2_2 = HIBYTE(v14[v20 + 178]); /*0xffc9ed81*/
if ( n2_2 == 1 ) /*0xffc9ed8d*/
{
DebugPrint(__return_address, 3, 255, 255, 255, 255, 255, 255, "PPR:Done(PASS)\n"); /*0xffc9ed94*/
}
else if ( n2_2 == 2 ) /*0xffc9ed98*/
{
DebugPrint(__return_address, 3, 255, 255, 255, 255, 255, 255, "PPR:Done(FAIL)\n"); /*0xffc9ed9f*/
}
else
{
DebugPrint(__return_address, 3, 255, 255, 255, 255, 255, 255, "\n"); /*0xffc9edb2*/
}
n2_4 = n2_3; /*0xffc9edb7*/
n0xD2_1 = n0xD2_2; /*0xffc9edbe*/
++n0xD2; /*0xffc9edc2*/
}
n0xD2_2 = ++n0xD2_1; /*0xffc9edc9*/
}
while ( (unsigned __int16)n0xD2_1 < 0xD2u );
n2_3 = ++n2_4; /*0xffc9edd8*/
}
while ( n2_4 < 2u );
return n2_4; /*0xffc9ede7*/
}
// Function: MemChipFuncEDEC @ 0xffc9edec (0x572 bytes)
// Index: 1223/2560
int __cdecl MemChipFuncEDEC(
_BYTE *__return_address,
int a2,
int a3,
unsigned __int8 a4,
unsigned __int8 a5,
char a6,
int n4,
int n6,
char a9,
__int16 n4_2,
int *a11)
{
unsigned __int8 n3_1; // bh
char v13; // cl
int n3; // edx
int v15; // ebp
int v16; // ecx
unsigned __int8 n4_4; // al
_BYTE *v18; // edi
int v19; // eax
int n4_1; // ebp
unsigned __int8 n0x18; // al
unsigned __int8 n0x18_2; // bl
unsigned int v23; // edx
int n6_1; // ecx
unsigned __int8 v25; // al
unsigned __int8 v26; // dl
unsigned __int8 v27; // cl
int v28; // ecx
unsigned __int8 v29; // dl
unsigned __int8 v30; // cl
char v31; // bh
unsigned int v32; // ecx
int result; // eax
int n0x18_3; // eax
int v35; // ebx
char v36; // al
unsigned __int8 v37; // dl
char v38; // al
int *v39; // ecx
unsigned __int8 v40; // dl
int v41; // ecx
int n0x18_6; // eax
unsigned __int8 n4_... [9330 chars total]
// Function: KtiFn_FFC9F35E @ 0xffc9f35e (0x1fc bytes)
// Index: 1224/2560
int __cdecl KtiFn_FFC9F35E(_BYTE *__return_address, int a2, int a3)
{
_BYTE *__return_address_1; // esi
unsigned __int8 n6_1; // bh
int v5; // edi
_BYTE *v6; // ebp
int v7; // eax
int v8; // edx
unsigned __int8 *v9; // ecx
unsigned __int8 v10; // bl
int v11; // edi
int v12; // edx
int v13; // eax
int v14; // ebp
int v15; // ecx
int n2; // eax
_BYTE *v17; // ebp
unsigned __int8 *v18; // esi
unsigned __int8 n255; // al
unsigned __int8 *v21; // [esp-30h] [ebp-6Ch]
int v22; // [esp+10h] [ebp-2Ch]
int v23; // [esp+14h] [ebp-28h]
int n6; // [esp+1Ch] [ebp-20h]
unsigned __int8 *v25; // [esp+20h] [ebp-1Ch]
int v26; // [esp+24h] [ebp-18h] BYREF
int v27; // [esp+28h] [ebp-14h]
int n2_1; // [esp+2Ch] [ebp-10h]
int v29; // [esp+30h] [ebp-Ch]
_BYTE *v30; // [esp+34h] [ebp-8h]
int v31; // [esp+38h] [ebp-4h]
__return_address_1 = __return_address; /*0xffc9f368*/
n6_1 = 0; /*0xffc9f36c*/
v5 = (unsigned __int8)a3; /*0xffc9f36f*/
LOBYTE(n6) = 0; /*0xffc9f382*/
v6 = &__return_address[48704 * (unsigned __int8)a3 + 257308]; /*0xffc9f386*/
v7 = 0; /*0xffc9f388*/
v8 = 0; /*0xffc9f38a*/
v30 = v6; /*0xffc9f38c*/
v22 = 0; /*0xffc9f390*/
v29 = 0; /*0xffc9f394*/
v9 = v6 + 1417; /*0xffc9f398*/
v25 = v6 + 1417; /*0xffc9f39e*/
do /*0xffc9f54a*/
{
if ( *(v9 - 3) ) /*0xffc9f3a2*/
{
v10 = 0; /*0xffc9f3b2*/
LOBYTE(v23) = 0; /*0xffc9f3ba*/
v11 = (int)&__return_address_1[50813 * v5 + 12557 + v8]; /*0xffc9f3c0*/
if ( *v9 ) /*0xffc9f3c2*/
{
do /*0xffc9f50c*/
{
v12 = v10; /*0xffc9f3ca*/
v31 = v10; /*0xffc9f3d3*/
if ( v6[1379 * v10 + 1917] ) /*0xffc9f3d7*/
{
v9 = v25; /*0xffc9f3fa*/
if ( !*(_BYTE *)(v10 + 2 * (v22 + 12 * (unsigned __int8)a3) + a2 + 10) ) /*0xffc9f3f5*/
{
v13 = 2688 * v10; /*0xffc9f404*/
if ( *(_BYTE *)(v13 + v11 + 2659) != 1 /*0xffc9f447*/
&& (__return_address_1[10186] || !*(_BYTE *)(v13 + v11 + 1891) || !*(_BYTE *)(v13 + v11 + 1892))
&& *(_BYTE *)(v13 + v11 + 1511)
&& *(_BYTE *)(v13 + v11 + 1512) )
{
v14 = v13 + 1519; /*0xffc9f455*/
v15 = 0; /*0xffc9f45b*/
n2 = 2; /*0xffc9f45f*/
v27 = 0; /*0xffc9f460*/
v17 = (_BYTE *)(v11 + v14); /*0xffc9f464*/
n2_1 = 2; /*0xffc9f466*/
do /*0xffc9f4f6*/
{
if ( *v17 && v17[1] && v17[2] != 1 ) /*0xffc9f47a*/
{
v26 = 0; /*0xffc9f47e*/
v18 = (unsigned __int8 *)(v11 + 168 * (v15 + 16 * v12) + 1555); /*0xffc9f499*/
n255 = KtiFn_FFC9F55A(__return_address, a2, a3, n6, v23, (int)v17, v18, &v26); /*0xffc9f4b1*/
v21 = v18; /*0xffc9f4bd*/
__return_address_1 = __return_address; /*0xffc9f4be*/
KtiFunc3EE8(__return_address, a3, n6, v23, v17, v21, v26, 0, n255); /*0xffc9f4d3*/
v12 = v31; /*0xffc9f4d8*/
v15 = v27; /*0xffc9f4df*/
n2 = n2_1; /*0xffc9f4e3*/
}
++v15; /*0xffc9f4e7*/
v17 += 18; /*0xffc9f4e8*/
--n2; /*0xffc9f4eb*/
v27 = v15; /*0xffc9f4ee*/
n2_1 = n2; /*0xffc9f4f2*/
}
while ( n2 ); /*0xffc9f4f6*/
v9 = v25; /*0xffc9f4fc*/
v6 = v30; /*0xffc9f500*/
}
}
}
LOBYTE(v23) = ++v10; /*0xffc9f506*/
}
while ( v10 < *v9 ); /*0xffc9f50c*/
v8 = v29; /*0xffc9f512*/
}
v5 = (unsigned __int8)a3; /*0xffc9f516*/
v7 = v22; /*0xffc9f51a*/
}
++n6_1; /*0xffc9f51e*/
v8 += 8077; /*0xffc9f520*/
++v7; /*0xffc9f526*/
LOBYTE(n6) = n6_1; /*0xffc9f527*/
v6 += 7688; /*0xffc9f52b*/
v22 = v7; /*0xffc9f531*/
v9 += 7688; /*0xffc9f535*/
v29 = v8; /*0xffc9f53b*/
v30 = v6; /*0xffc9f53f*/
v25 = v9; /*0xffc9f543*/
}
while ( n6_1 < 6u ); /*0xffc9f54a*/
return 0; /*0xffc9f550*/
}
// Function: KtiFn_FFC9F55A @ 0xffc9f55a (0x154 bytes)
// Index: 1225/2560
int __cdecl KtiFn_FFC9F55A(
_BYTE *__return_address,
int a2,
int a3,
int n6,
int a5,
int a6,
unsigned __int8 *a7,
int *a8)
{
char n2; // cl
int n6_1; // edi
int result; // eax
char v12[4]; // [esp+10h] [ebp-2Ch] BYREF
unsigned __int8 v13[4]; // [esp+14h] [ebp-28h] BYREF
unsigned __int8 v14[4]; // [esp+18h] [ebp-24h] BYREF
int v15[8]; // [esp+1Ch] [ebp-20h] BYREF
memset(v15, 0, sizeof(v15)); /*0xffc9f567*/
n2 = __return_address[244371]; /*0xffc9f574*/
v14[0] = 0; /*0xffc9f57d*/
v13[0] = 0; /*0xffc9f581*/
v12[0] = 0; /*0xffc9f585*/
n6_1 = (unsigned __int16)(4 * (n2 == 2) + 4); /*0xffc9f596*/
if ( n2 != 2 && __return_address[244313] == 1 && __return_address[244314] ) /*0xffc9f5a6*/
n6_1 = 6; /*0xffc9f5b1*/
KtiFunc106E((int)__return_address, a6, a7, (int)v15, v14); /*0xffc9f5c7*/
if ( KtiFunc4F8((int)__return_address, a3, n6, a5, a6, (int)a7, v13) == 1 ) /*0xffc9f5eb*/
{
*a8 = 0; /*0xffc9f5f6*/
DebugPrint( /*0xffc9f610*/
(int)__return_address,
3,
a3,
n6,
a5,
255,
255,
255,
"Channel interleave doesnt match between IMCs specied in the interleave Request.\n");
return 10; /*0xffc9f61b*/
}
if ( (_WORD)n6_1 == 8 && MemChipFuncFBDD((int)__return_address, (int)v15, v12) == 1 ) /*0xffc9f63c*/
{
*a8 = 0; /*0xffc9f647*/
DebugPrint( /*0xffc9f661*/
(int)__return_address,
3,
a3,
n6,
a5,
255,
255,
255,
"NM population doesnt match between IMCs specied in the interleave Request.\n");
return 11; /*0xffc9f66b*/
}
result = MemChipFuncEDEC( /*0xffc9f695*/
__return_address,
a2,
(int)v15,
v14[0],
v13[0],
v12[0],
*(unsigned __int16 *)(a7 + 5),
n6_1,
*(_BYTE *)(a6 + 15),
*(_DWORD *)(a6 + 11),
a8);
if ( !result ) /*0xffc9f69f*/
return 255; /*0xffc9f6a1*/
return result; /*0xffc9f6a6*/
}
// Function: MemChipFuncF6AE @ 0xffc9f6ae (0x1ef bytes)
// Index: 1226/2560
int __cdecl MemChipFuncF6AE(_BYTE *__return_address, int a2, int a3)
{
int v3; // ecx
unsigned __int8 n6_1; // bh
int v5; // edi
_BYTE *v6; // esi
int v7; // edx
unsigned __int8 *v8; // ebp
unsigned __int8 v9; // bl
_BYTE *v10; // ecx
int v11; // edx
int v12; // eax
_BYTE *v13; // ebp
int v14; // ecx
_BYTE *v15; // edi
int n2; // eax
unsigned __int8 *v17; // esi
unsigned __int8 n255; // al
int v20; // [esp+10h] [ebp-30h]
int n6; // [esp+18h] [ebp-28h]
unsigned __int8 *v22; // [esp+1Ch] [ebp-24h]
int v23; // [esp+20h] [ebp-20h] BYREF
int v24; // [esp+24h] [ebp-1Ch]
int n2_1; // [esp+28h] [ebp-18h]
_BYTE *v26; // [esp+2Ch] [ebp-14h]
int v27; // [esp+30h] [ebp-10h]
int v28; // [esp+34h] [ebp-Ch]
_BYTE *v29; // [esp+38h] [ebp-8h]
int v30; // [esp+3Ch] [ebp-4h]
v3 = (unsigned __int8)a3; /*0xffc9f6b7*/
n6_1 = 0; /*0xffc9f6ba*/
v5 = 0; /*0xffc9f6ce*/
LOBYTE(n6) = 0; /*0xffc9f6d4*/
v27 = 0; /*0xffc9f6d8*/
v6 = &__return_address[48704 * (unsigned __int8)a3 + 257308]; /*0xffc9f6dc*/
v7 = 0; /*0xffc9f6de*/
v29 = v6; /*0xffc9f6e0*/
v28 = 0; /*0xffc9f6e4*/
v8 = v6 + 1417; /*0xffc9f6e8*/
v22 = v6 + 1417; /*0xffc9f6ee*/
do /*0xffc9f88d*/
{
if ( *(v8 - 3) ) /*0xffc9f6f2*/
{
v9 = 0; /*0xffc9f702*/
LOBYTE(v20) = 0; /*0xffc9f70e*/
v10 = &__return_address[50813 * v3 + 12557 + v7]; /*0xffc9f714*/
v26 = v10; /*0xffc9f716*/
if ( *v8 ) /*0xffc9f71a*/
{
do /*0xffc9f853*/
{
v11 = v9; /*0xffc9f723*/
v30 = v9; /*0xffc9f72c*/
if ( v6[1379 * v9 + 1917] ) /*0xffc9f730*/
{
v8 = v22; /*0xffc9f751*/
if ( !*(_BYTE *)(v9 + 2 * (v5 + 12 * (unsigned __int8)a3) + a2 + 10) ) /*0xffc9f74c*/
{
v12 = 2688 * v9; /*0xffc9f75b*/
if ( v10[v12 + 2659] != 1 && v10[v12 + 1891] && v10[v12 + 1892] ) /*0xffc9f77d*/
{
v13 = v26; /*0xffc9f78b*/
v14 = 0; /*0xffc9f78f*/
v24 = 0; /*0xffc9f793*/
v15 = &v26[v12 + 1903]; /*0xffc9f79d*/
n2 = 2; /*0xffc9f79f*/
n2_1 = 2; /*0xffc9f7a0*/
do /*0xffc9f834*/
{
if ( *v15 && v15[1] && v15[2] != 1 ) /*0xffc9f7b3*/
{
v23 = 0; /*0xffc9f7b7*/
v17 = &v13[2688 * v11 + 1939 + 168 * v14]; /*0xffc9f7cd*/
n255 = KtiFn_FFC9F55A(__return_address, a2, a3, n6, v20, (int)v15, v17, &v23); /*0xffc9f7ea*/
KtiFunc3EE8(__return_address, a3, n6, v20, v15, v17, v23, 1, n255); /*0xffc9f80e*/
v11 = v30; /*0xffc9f813*/
v14 = v24; /*0xffc9f81d*/
n2 = n2_1; /*0xffc9f821*/
}
++v14; /*0xffc9f825*/
v15 += 18; /*0xffc9f826*/
--n2; /*0xffc9f829*/
v24 = v14; /*0xffc9f82c*/
n2_1 = n2; /*0xffc9f830*/
}
while ( n2 ); /*0xffc9f834*/
v8 = v22; /*0xffc9f83a*/
v10 = v26; /*0xffc9f83e*/
v6 = v29; /*0xffc9f842*/
v5 = v27; /*0xffc9f846*/
}
}
}
LOBYTE(v20) = ++v9; /*0xffc9f84c*/
}
while ( v9 < *v8 ); /*0xffc9f853*/
v7 = v28; /*0xffc9f859*/
}
v3 = (unsigned __int8)a3; /*0xffc9f85d*/
}
++n6_1; /*0xffc9f861*/
v7 += 8077; /*0xffc9f863*/
++v5; /*0xffc9f869*/
LOBYTE(n6) = n6_1; /*0xffc9f86a*/
v6 += 7688; /*0xffc9f86e*/
v27 = v5; /*0xffc9f874*/
v8 += 7688; /*0xffc9f878*/
v28 = v7; /*0xffc9f87e*/
v29 = v6; /*0xffc9f882*/
v22 = v8; /*0xffc9f886*/
}
while ( n6_1 < 6u ); /*0xffc9f88d*/
return 0; /*0xffc9f893*/
}
// Function: MemChipFuncF89D @ 0xffc9f89d (0x13e bytes)
// Index: 1227/2560
void __cdecl MemChipFuncF89D(_BYTE *n4, int n4a, int n6, int n2a)
{
int v5; // esi
int v6; // edi
char v7; // ah
char v8; // al
char v9; // al
char v10; // al
if ( n4 && (unsigned __int8)n4a < 4u && (unsigned __int8)n6 < 6u && (unsigned __int8)n2a < 2u ) /*0xffc9f8c6*/
{
v5 = (int)&n4[50813 * (unsigned __int8)n4a + 12557 + 8077 * (unsigned __int8)n6]; /*0xffc9f8ed*/
v6 = 2688 * (unsigned __int8)n2a; /*0xffc9f8f2*/
v7 = *(_BYTE *)(v6 + v5 + 2685); /*0xffc9f8f8*/
v8 = v7 & 1; /*0xffc9f901*/
if ( (v7 & 1) != 0 ) /*0xffc9f906*/
{
if ( (v7 & 0xFE) == 6 ) /*0xffc9f90e*/
{
v9 = *(_BYTE *)(v6 + v5 + 2686); /*0xffc9f910*/
if ( (v9 & 1) != 0 && (v9 & 0xFE) == 6 ) /*0xffc9f91f*/
{
*(_WORD *)(v6 + v5 + 2685) = 0; /*0xffc9f92b*/
*(_BYTE *)(v6 + v5 + 2659) = 1; /*0xffc9f93c*/
DebugPrint((int)n4, 2, n4a, n6, n2a, 255, 255, 255, "New NGN DIMM detected\n"); /*0xffc9f948*/
return; /*0xffc9f950*/
}
}
v8 = *(_BYTE *)(v6 + v5 + 2685) & 1; /*0xffc9f955*/
}
if ( v8 && (v7 & 0xFE) == 6 && (*(_BYTE *)(v6 + v5 + 2686) & 1) == 0 ) /*0xffc9f96c*/
{
if ( !KtiFn_FFCA1E81((int)n4, n4a, n6, n2a) ) /*0xffc9f974*/
{
*(_BYTE *)(v6 + v5 + 1891) = 0; /*0xffc9f980*/
*(_BYTE *)(v6 + v5 + 2275) = 0; /*0xffc9f987*/
}
KtiFunc1162(n4, 136, 3, n4a, n6, n2a, 255); /*0xffc9f9a3*/
}
else
{
v10 = *(_BYTE *)(v6 + v5 + 2686); /*0xffc9f9a5*/
if ( (v10 & 1) != 0 && (v10 & 0xFE) == 6 && (*(_BYTE *)(v6 + v5 + 2685) & 1) == 0 ) /*0xffc9f9ba*/
KtiFunc1162(n4, 137, 3, n4a, n6, n2a, 255); /*0xffc9f9ce*/
}
}
}
// Function: MemChipFuncF9DB @ 0xffc9f9db (0x44 bytes)
// Index: 1228/2560
bool __cdecl MemChipFuncF9DB(
int __return_address,
unsigned __int8 n2,
unsigned __int8 n3,
unsigned __int8 k,
unsigned __int8 a5,
unsigned __int8 n6)
{
int v6; // esi
int v7; // eax
unsigned __int8 v8; // cl
v6 = k + 2 * n3; /*0xffc9f9ea*/
v7 = __return_address + 50813 * n2; /*0xffc9f9f7*/
v8 = *(_BYTE *)(v7 + 2 * v6 + 58742); /*0xffc9f9fa*/
if ( v8 < a5 ) /*0xffc9fa03*/
return 1; /*0xffc9fa05*/
if ( v8 <= a5 ) /*0xffc9fa09*/
return *(_BYTE *)(v7 + 2 * v6 + 58741) < n6; /*0xffc9fa19*/
return 0; /*0xffc9fa1c*/
}
// Function: MemChipFuncFA1F @ 0xffc9fa1f (0x1be bytes)
// Index: 1229/2560
int __cdecl MemChipFuncFA1F(_BYTE *n4)
{
unsigned __int8 n4_2; // bl
_BYTE *n4_1; // esi
int v3; // edx
_BYTE *v4; // ebp
unsigned __int8 n6; // bh
int v6; // ecx
_BYTE *v7; // ecx
char v8; // al
char v10; // [esp+12h] [ebp-1Ah]
char v11; // [esp+13h] [ebp-19h]
int v12; // [esp+14h] [ebp-18h]
_BYTE *v13; // [esp+18h] [ebp-14h]
_BYTE *v14; // [esp+1Ch] [ebp-10h]
int v15; // [esp+20h] [ebp-Ch]
int v16; // [esp+24h] [ebp-8h]
int v17; // [esp+28h] [ebp-4h]
n4_2 = 0; /*0xffc9fa23*/
v10 = 0; /*0xffc9fa28*/
n4_1 = n4; /*0xffc9fa2f*/
v11 = -1; /*0xffc9fa33*/
LOBYTE(n4) = 0; /*0xffc9fa3a*/
while ( 1 ) /*0xffc9fa41*/
{
v3 = 48704 * n4_2; /*0xffc9fa41*/
v17 = v3; /*0xffc9fa47*/
if ( n4_1[v3 + 258689] ) /*0xffc9fa4b*/
break; /*0xffc9fa4b*/
LABEL_18:
LOBYTE(n4) = ++n4_2; /*0xffc9fb47*/
if ( n4_2 >= 4u ) /*0xffc9fb4e*/
return 0; /*0xffc9fb5d*/
}
v4 = &n4_1[v3 + 258722]; /*0xffc9fa5f*/
n6 = 0; /*0xffc9fa61*/
v14 = v4; /*0xffc9fa63*/
LOBYTE(v15) = 0; /*0xffc9fa67*/
while ( 1 ) /*0xffc9fa6e*/
{
v6 = 7688 * n6; /*0xffc9fa6e*/
v16 = v6; /*0xffc9fa74*/
if ( v4[v6] ) /*0xffc9fa78*/
{
LOBYTE(v12) = 0; /*0xffc9fa88*/
v13 = &n4_1[v6 + 259118 + v3]; /*0xffc9fa96*/
if ( v4[v6 + 3] ) /*0xffc9fa91*/
break; /*0xffc9fa91*/
}
LABEL_17:
LOBYTE(v15) = ++n6; /*0xffc9fb38*/
if ( n6 >= 6u ) /*0xffc9fb3f*/
goto LABEL_18; /*0xffc9fb3f*/
}
while ( 1 ) /*0xffc9faa4*/
{
if ( !MemChipFuncACE9((int)n4_1, (int)n4, v15, v12) ) /*0xffc9fab9*/
goto LABEL_15; /*0xffc9fab9*/
v7 = &v13[1379 * (unsigned __int8)v12]; /*0xffc9face*/
v8 = v7[1350]; /*0xffc9fad0*/
if ( v10 ) /*0xffc9fad8*/
{
if ( !v8 ) /*0xffc9faeb*/
goto LABEL_15; /*0xffc9faeb*/
if ( v10 != (v8 & 0x27) ) /*0xffc9faf1*/
{
DebugPrint((int)n4_1, 255, (int)n4, v15, v12, 255, 255, 255, "DIMM SKU mismatch\n"); /*0xffc9fbba*/
if ( (n4_1[1388] & 4) == 0 ) /*0xffc9fbc9*/
goto LABEL_21; /*0xffc9fbc9*/
goto LABEL_24; /*0xffc9fbc9*/
}
}
else
{
v10 = v8 & 0x27; /*0xffc9fadf*/
if ( !v8 ) /*0xffc9fae5*/
goto LABEL_15; /*0xffc9fae5*/
}
if ( v11 != -1 ) /*0xffc9fb02*/
break; /*0xffc9fb02*/
v11 = v7[24]; /*0xffc9fb07*/
LABEL_15:
LOBYTE(v12) = v12 + 1; /*0xffc9fb12*/
if ( (unsigned __int8)v12 >= v14[v16 + 3] ) /*0xffc9fb28*/
{
v3 = v17; /*0xffc9fb2e*/
v4 = v14; /*0xffc9fb32*/
goto LABEL_17; /*0xffc9fb32*/
}
}
if ( v11 == v7[24] ) /*0xffc9fb10*/
goto LABEL_15; /*0xffc9fb10*/
DebugPrint((int)n4_1, 255, (int)n4, v15, v12, 255, 255, 255, "DIMM controller revision mismatch\n"); /*0xffc9fb72*/
if ( (n4_1[1388] & 4) == 0 ) /*0xffc9fb81*/
{
LABEL_21:
KtiFunc1162(n4_1, 7, 15, (int)n4, v15, v12, 255); /*0xffc9fb88*/
return 1; /*0xffc9fb94*/
}
LABEL_24:
ProcMemInitCheck((int)n4_1, 248, 6); /*0xffc9fbcb*/
return 1; /*0xffc9fb56*/
}
// Function: MemChipFuncFBDD @ 0xffc9fbdd (0xb8 bytes)
// Index: 1230/2560
int __cdecl MemChipFuncFBDD(int __return_address, int a2, char *a3)
{
char v3; // dl
unsigned __int8 n4; // bl
unsigned __int8 v5; // al
unsigned __int8 v6; // bh
char v8; // [esp+13h] [ebp-9h]
unsigned __int8 v9; // [esp+14h] [ebp-8h]
unsigned __int8 v10; // [esp+18h] [ebp-4h]
v3 = -1; /*0xffc9fbe6*/
n4 = 0; /*0xffc9fbee*/
v8 = -1; /*0xffc9fbf1*/
v10 = 0; /*0xffc9fbf5*/
while ( 1 ) /*0xffc9fbfc*/
{
if ( *(_BYTE *)(48704 * n4 + __return_address + 258689) ) /*0xffc9fc02*/
{
v5 = *(_BYTE *)(__return_address + 244317); /*0xffc9fc0c*/
v6 = 0; /*0xffc9fc12*/
v9 = 0; /*0xffc9fc14*/
if ( v5 ) /*0xffc9fc1a*/
break; /*0xffc9fc1a*/
}
LABEL_9:
v10 = ++n4; /*0xffc9fc73*/
if ( n4 >= 4u ) /*0xffc9fc7a*/
{
*a3 = v3; /*0xffc9fc84*/
return 0; /*0xffc9fc8f*/
}
}
while ( !*(_DWORD *)(a2 + 4 * (v6 + n4 * v5)) ) /*0xffc9fc2c*/
{
LABEL_8:
v5 = *(_BYTE *)(__return_address + 244317); /*0xffc9fc61*/
v9 = ++v6; /*0xffc9fc69*/
if ( v6 >= v5 ) /*0xffc9fc6f*/
goto LABEL_9; /*0xffc9fc6f*/
}
if ( v3 == -1 || v8 == MemChipFunc9700(__return_address, v10, v9) ) /*0xffc9fc48*/
{
v3 = MemChipFunc9700(__return_address, v10, v9); /*0xffc9fc58*/
v8 = v3; /*0xffc9fc5d*/
goto LABEL_8; /*0xffc9fc5d*/
}
return 1; /*0xffc9fc88*/
}
// Function: MemChipFuncFC95 @ 0xffc9fc95 (0x21c bytes)
// Index: 1231/2560
_BYTE *__cdecl MemChipFuncFC95(_BYTE *n4)
{
char n4a_1; // ch
unsigned __int8 n4_1; // bl
int v4; // edx
_BYTE *v5; // ebp
_BYTE *result; // eax
char n4a_3; // bl
unsigned __int8 *v8; // edi
unsigned __int8 n6; // cl
int v10; // eax
unsigned __int8 v11; // bh
int v12; // eax
char n4a_2; // [esp+13h] [ebp-29h]
int n6_1; // [esp+14h] [ebp-28h]
int n4_2; // [esp+18h] [ebp-24h]
int v16; // [esp+1Ch] [ebp-20h]
int v17; // [esp+20h] [ebp-1Ch]
int v18; // [esp+24h] [ebp-18h]
_BYTE *v19; // [esp+28h] [ebp-14h]
_BYTE *v20; // [esp+2Ch] [ebp-10h]
int v21; // [esp+30h] [ebp-Ch]
_BYTE *v22; // [esp+38h] [ebp-4h]
char n4a; // [esp+40h] [ebp+4h]
n4a_1 = 0; /*0xffc9fc9f*/
n4_1 = 0; /*0xffc9fca1*/
n4a_2 = 0; /*0xffc9fca3*/
v4 = 0; /*0xffc9fca8*/
n4a = 0; /*0xffc9fcaa*/
v5 = n4 + 259118; /*0xffc9fcaf*/
LOBYTE(n4_2) = 0; /*0xffc9fcb5*/
result = n4 + 258689; /*0xffc9fcb9*/
v21 = 0; /*0xffc9fcbf*/
v20 = n4 + 259118; /*0xffc9fcc3*/
v19 = n4 + 258689; /*0xffc9fcc7*/
do /*0xffc9fe7b*/
{
if ( *result ) /*0xffc9fccb*/
{
n4a_3 = n4a_2; /*0xffc9fcd4*/
v8 = v5 - 393; /*0xffc9fcd8*/
n6 = 0; /*0xffc9fcde*/
v10 = 0; /*0xffc9fce4*/
LOBYTE(n6_1) = 0; /*0xffc9fce6*/
v17 = 0; /*0xffc9fcea*/
do /*0xffc9fe43*/
{
if ( *(v8 - 3) ) /*0xffc9fcee*/
{
v11 = 0; /*0xffc9fcfd*/
LOBYTE(v16) = 0; /*0xffc9fd01*/
v22 = &n4[v4 + 12557 + v10]; /*0xffc9fd07*/
if ( *v8 ) /*0xffc9fd0b*/
{
do /*0xffc9fe0f*/
{
if ( !MemChipFuncACE9((int)n4, n4_2, n6_1, v16) ) /*0xffc9fd20*/
goto LABEL_13; /*0xffc9fd20*/
++n4a_3; /*0xffc9fd33*/
v12 = 1379 * v11; /*0xffc9fd39*/
v18 = v12; /*0xffc9fd3f*/
if ( (v5[v12 + 1350] & 1) == 0 ) /*0xffc9fd4b*/
{
DebugPrint( /*0xffc9fd69*/
(int)n4,
2,
n4_2,
n6_1,
v16,
255,
255,
255,
"Memory mode not enabled. Booting in 1Lm only. \n");
v12 = v18; /*0xffc9fd6e*/
n4[244313] = 0; /*0xffc9fd75*/
}
if ( (v5[v12 + 1350] & 2) == 0 ) /*0xffc9fd84*/
{
DebugPrint((int)n4, 2, n4_2, n6_1, v16, 255, 255, 255, "BlockMode is not supported. \n"); /*0xffc9fda2*/
v12 = v18; /*0xffc9fda7*/
n4[244425] = 0; /*0xffc9fdae*/
}
if ( (v5[v12 + 1350] & 4) != 0 ) /*0xffc9fdbd*/
{
LABEL_13:
n4a_1 = n4a; /*0xffc9fe03*/
}
else
{
DebugPrint((int)n4, 2, n4_2, n6_1, v16, 255, 255, 255, "App Direct Mode not enabled. \n"); /*0xffc9fddb*/
v22[2688 * v11 + 2687] |= 1u; /*0xffc9fdef*/
n4a_1 = ++n4a; /*0xffc9fdfb*/
}
LOBYTE(v16) = ++v11; /*0xffc9fe09*/
}
while ( v11 < *v8 ); /*0xffc9fe0f*/
n6 = n6_1; /*0xffc9fe15*/
v4 = v21; /*0xffc9fe19*/
n4a_2 = n4a_3; /*0xffc9fe1d*/
}
v10 = v17; /*0xffc9fe21*/
}
++n6; /*0xffc9fe25*/
v10 += 8077; /*0xffc9fe27*/
v5 += 7688; /*0xffc9fe2c*/
LOBYTE(n6_1) = n6; /*0xffc9fe32*/
v8 += 7688; /*0xffc9fe36*/
v17 = v10; /*0xffc9fe3c*/
}
while ( n6 < 6u ); /*0xffc9fe43*/
n4_1 = n4_2; /*0xffc9fe49*/
v5 = v20; /*0xffc9fe4d*/
result = v19; /*0xffc9fe51*/
}
++n4_1; /*0xffc9fe55*/
result += 48704; /*0xffc9fe57*/
v5 += 48704; /*0xffc9fe5c*/
LOBYTE(n4_2) = n4_1; /*0xffc9fe62*/
v4 += 50813; /*0xffc9fe66*/
v19 = result; /*0xffc9fe6c*/
v20 = v5; /*0xffc9fe70*/
v21 = v4; /*0xffc9fe74*/
}
while ( n4_1 < 4u ); /*0xffc9fe7b*/
if ( n4a_2 == n4a_1 ) /*0xffc9fe85*/
{
result = (_BYTE *)DebugPrint( /*0xffc9fe9a*/
(int)n4,
2,
255,
255,
255,
255,
255,
255,
"App Direct Mode disabled for the system. \n");
n4[244371] = 0; /*0xffc9fea2*/
}
return result; /*0xffc9fea9*/
}
// Function: MemChipFuncFEB1 @ 0xffc9feb1 (0x1a bytes)
// Index: 1232/2560
char __cdecl MemChipFuncFEB1(char *p_n1145589060, unsigned int n0x80)
{
unsigned int n0x80_1; // ecx
char n1145589060; // al
n0x80_1 = 1; /*0xffc9feb7*/
for ( n1145589060 = *p_n1145589060; n0x80_1 < n0x80; ++n0x80_1 ) /*0xffc9febe*/
n1145589060 += p_n1145589060[n0x80_1]; /*0xffc9fec0*/
return n1145589060; /*0xffc9feca*/
}
// Function: MemChipFuncFECB @ 0xffc9fecb (0x94 bytes)
// Index: 1233/2560
int __cdecl MemChipFuncFECB(int n4, unsigned __int8 n4a, unsigned __int8 a3, unsigned __int8 n2, unsigned __int8 a5)
{
int v5; // edx
int v6; // esi
int v7; // edi
int result; // eax
int n24; // ecx
v5 = 8077 * a3 + 12557 + n4 + 50813 * n4a; /*0xffc9fef7*/
v6 = 18 * a5; /*0xffc9ff00*/
v7 = v5 + 2688 * n2; /*0xffc9ff0d*/
result = v5 + 168 * (a5 + 16 * n2) + 1555; /*0xffc9ff16*/
*(_DWORD *)(v6 + v7 + 1526) = 0; /*0xffc9ff1a*/
*(_DWORD *)(v6 + v7 + 1530) = 0; /*0xffc9ff21*/
*(_WORD *)(v6 + v7 + 1534) = 0; /*0xffc9ff28*/
*(_WORD *)(v6 + v7 + 1519) = 0; /*0xffc9ff30*/
*(_BYTE *)(v6 + v7 + 1521) = 0; /*0xffc9ff38*/
*(_DWORD *)(v6 + v7 + 1522) = 0; /*0xffc9ff3f*/
n24 = 24; /*0xffc9ff46*/
do /*0xffc9ff58*/
{
*(_WORD *)result = 0; /*0xffc9ff49*/
*(_BYTE *)(result + 2) = 0; /*0xffc9ff4c*/
result += 7; /*0xffc9ff4f*/
*(_DWORD *)(result - 4) = 0; /*0xffc9ff52*/
--n24; /*0xffc9ff55*/
}
while ( n24 ); /*0xffc9ff58*/
return result; /*0xffc9ff5a*/
}
// Function: MemChipFuncFF5F @ 0xffc9ff5f (0xc8 bytes)
// Index: 1234/2560
int __cdecl MemChipFuncFF5F(int __return_address, int a2, unsigned __int8 *a3, unsigned __int8 n6)
{
unsigned __int16 *v5; // ebx
char v7; // [esp+13h] [ebp-1h]
v7 = 0; /*0xffc9ff69*/
if ( n6 ) /*0xffc9ff73*/
{
v5 = (unsigned __int16 *)(a2 + 3); /*0xffc9ff7d*/
while ( 1 ) /*0xffc9ffa8*/
{
DebugPrint( /*0xffc9ffa8*/
__return_address,
2,
*((unsigned __int8 *)v5 - 3),
*((unsigned __int8 *)v5 - 2),
*((unsigned __int8 *)v5 - 1),
255,
255,
255,
"Comparing DIMM Interleave ID (PartitionOffset 0x%x, PartitionSize 0x%x)\n",
*v5,
v5[1]);
if ( AutoGenFunc8E45((int)v5 - 3, (char *)a3, 7) ) /*0xffc9ffb1*/
break; /*0xffc9ffb1*/
v5 = (unsigned __int16 *)((char *)v5 + 7); /*0xffc9ffc1*/
a3 += 7; /*0xffc9ffc4*/
if ( (unsigned __int8)++v7 >= n6 ) /*0xffc9ffd1*/
goto LABEL_5; /*0xffc9ffd1*/
}
DebugPrint( /*0xffca001a*/
__return_address,
3,
*a3,
a3[1],
a3[2],
255,
255,
255,
"DIMM Interleave ID Mismatch (PartitionOffset 0x%x, PartitionSize 0x%x)\n",
*(unsigned __int16 *)(a3 + 3),
*(unsigned __int16 *)(a3 + 5));
return 1; /*0xffca0024*/
}
else
{
LABEL_5:
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "DIMM Interleave IDs Match\n"); /*0xffc9ffd3*/
return 0; /*0xffc9ffec*/
}
}
// Function: KtiFunc27 @ 0xffca0027 (0x66 bytes)
// Index: 1235/2560
int __cdecl KtiFunc27(int n4, unsigned __int8 a2, unsigned __int8 n6, unsigned __int8 n2, int a5)
{
int v5; // esi
int v6; // edi
v5 = 2688 * n2; /*0xffca004a*/
v6 = n4 + 50813 * a2 + 8077 * n6; /*0xffca0053*/
*(_WORD *)(v5 + v6 + 14070) = *(_WORD *)a5; /*0xffca0055*/
*(_WORD *)(v5 + v6 + 14072) = *(_QWORD *)(a5 + 4) >> 26; /*0xffca006a*/
*(_WORD *)(v5 + v6 + 14074) = *(_QWORD *)(a5 + 12) >> 26; /*0xffca007c*/
return 0; /*0xffca0087*/
}
// Function: KtiFunc8D @ 0xffca008d (0x11f bytes)
// Index: 1236/2560
int __cdecl KtiFunc8D(int n4, unsigned __int8 a2, unsigned __int8 n6, unsigned __int8 a4, unsigned __int8 n2)
{
unsigned __int8 v5; // bl
int v6; // edx
int v7; // edi
int v8; // esi
_BYTE *v9; // edx
_BYTE *v10; // ecx
v5 = 0; /*0xffca00ad*/
v6 = 8077 * n6 + 12557 + n4 + 50813 * a2; /*0xffca00bd*/
v7 = 18 * n2; /*0xffca00c6*/
v8 = v6 + 2688 * a4; /*0xffca00c9*/
v9 = (_BYTE *)(168 * (n2 + 16 * a4) + v6 + 1939); /*0xffca00d7*/
*(_BYTE *)(v7 + v8 + 2287) = *(_BYTE *)(v7 + v8 + 1903); /*0xffca00e0*/
*(_BYTE *)(v7 + v8 + 2288) = *(_BYTE *)(v7 + v8 + 1904); /*0xffca00ee*/
*(_BYTE *)(v7 + v8 + 2289) = *(_BYTE *)(v7 + v8 + 1905); /*0xffca00fc*/
*(_DWORD *)(v7 + v8 + 2290) = *(_DWORD *)(v7 + v8 + 1906); /*0xffca010a*/
*(_WORD *)(v7 + v8 + 2294) = *(_WORD *)(v7 + v8 + 1910); /*0xffca0119*/
*(_BYTE *)(v7 + v8 + 2296) = *(_BYTE *)(v7 + v8 + 1912); /*0xffca0128*/
*(_BYTE *)(v7 + v8 + 2297) = *(_BYTE *)(v7 + v8 + 1913); /*0xffca0136*/
*(_DWORD *)(v7 + v8 + 2298) = *(_DWORD *)(v7 + v8 + 1914); /*0xffca0144*/
*(_BYTE *)(v7 + v8 + 2302) = *(_BYTE *)(v7 + v8 + 1918); /*0xffca0152*/
if ( *(_BYTE *)(v7 + v8 + 1912) ) /*0xffca0159*/
{
v10 = v9 + 386; /*0xffca0162*/
do /*0xffca01a3*/
{
++v5; /*0xffca016a*/
*(v10 - 2) = *v9; /*0xffca016c*/
v9 += 7; /*0xffca016f*/
*(v10 - 1) = *(v10 - 385); /*0xffca0178*/
*v10 = *(v10 - 384); /*0xffca0181*/
v10 += 7; /*0xffca0183*/
*((_WORD *)v10 - 3) = *((_WORD *)v10 - 195); /*0xffca018d*/
*((_WORD *)v10 - 2) = *((_WORD *)v10 - 194); /*0xffca0198*/
}
while ( v5 < *(_BYTE *)(v7 + v8 + 1912) ); /*0xffca01a3*/
}
return 0; /*0xffca01a5*/
}
// Function: KtiFunc1AC @ 0xffca01ac (0x5c bytes)
// Index: 1237/2560
int __cdecl KtiFunc1AC(_BYTE *a1, unsigned __int8 *a2, unsigned int a3)
{
int v3; // esi
unsigned int v5; // ebx
v3 = 0; /*0xffca01ae*/
if ( a3 ) /*0xffca01b9*/
{
do /*0xffca01f5*/
{
LogDebugString(a1, (int)"%02X ", *a2); /*0xffca01ce*/
v5 = v3 + 1; /*0xffca01d6*/
++a2; /*0xffca01d9*/
if ( (((_BYTE)v3 + 1) & 0xF) == 0 && v3 ) /*0xffca01e1*/
LogDebugString(a1, (int)"\n"); /*0xffca01e8*/
++v3; /*0xffca01ef*/
}
while ( v5 < a3 ); /*0xffca01f5*/
}
return LogDebugString(a1, (int)"\n"); /*0xffca0205*/
}
// Function: KtiFunc208 @ 0xffca0208 (0x3e bytes)
// Index: 1238/2560
char __cdecl KtiFunc208(int __return_address, __int16 n8, __int16 n4)
{
bool v4; // zf
if ( (n8 & 4) != 0 ) /*0xffca0216*/
{
if ( HIBYTE(n4) == 64 ) /*0xffca021b*/
{
if ( (_BYTE)n4 == 4 ) /*0xffca021f*/
return 2; /*0xffca0223*/
v4 = (_BYTE)n4 == 64; /*0xffca0224*/
LABEL_6:
if ( v4 ) /*0xffca0226*/
return 1; /*0xffca022a*/
}
}
else if ( n8 == 8 && HIBYTE(n4) == 64 ) /*0xffca0236*/
{
if ( (_BYTE)n4 == 1 ) /*0xffca023a*/
return 3; /*0xffca023e*/
v4 = (_BYTE)n4 == 4; /*0xffca023f*/
goto LABEL_6; /*0xffca0241*/
}
return -1; /*0xffca0223*/
}
// Function: KtiFunc246 @ 0xffca0246 (0x5f bytes)
// Index: 1239/2560
char __cdecl KtiFunc246(unsigned __int8 n255)
{
if ( n255 == 255 ) /*0xffca0257*/
return 1; /*0xffca029f*/
if ( n255 > 8u ) /*0xffca025c*/
{
switch ( n255 ) /*0xffca0283*/
{
case 0xAu: /*0xffca0283*/
return 10; /*0xffca029e*/
case 0xBu: /*0xffca0283*/
return 12; /*0xffca029b*/
case 0xDu: /*0xffca0283*/
return 7; /*0xffca0298*/
case 0xEu: /*0xffca0283*/
return 11; /*0xffca0295*/
}
}
else
{
switch ( n255 ) /*0xffca025e*/
{
case 8u: /*0xffca025e*/
return 8; /*0xffca027f*/
case 2u: /*0xffca025e*/
return 3; /*0xffca027c*/
case 3u: /*0xffca025e*/
return 4; /*0xffca0279*/
case 5u: /*0xffca025e*/
return 5; /*0xffca0276*/
case 7u: /*0xffca025e*/
return 9; /*0xffca0273*/
}
}
return 2; /*0xffca0273*/
}
// Function: KtiFunc2A5 @ 0xffca02a5 (0x3e bytes)
// Index: 1240/2560
int __cdecl KtiFunc2A5(char n9)
{
switch ( n9 ) /*0xffca02ad*/
{
case 1: /*0xffca02ad*/
return 5; /*0xffca02e1*/
case 2: /*0xffca02ad*/
return 3; /*0xffca02dd*/
case 3: /*0xffca02ad*/
return 4; /*0xffca02d9*/
case 4: /*0xffca02ad*/
return 6; /*0xffca02d5*/
case 5: /*0xffca02ad*/
return 7; /*0xffca02d1*/
}
return n9 == 9; /*0xffca02ca*/
}
// Function: KtiFunc2E3 @ 0xffca02e3 (0x1f9 bytes)
// Index: 1241/2560
int __cdecl KtiFunc2E3(int n4, int a2, unsigned __int16 *a3)
{
int n4_1; // ecx
unsigned __int8 n4_2; // bl
int v5; // edx
int v6; // ebp
unsigned __int8 n6; // bh
int v8; // edi
int v9; // ebp
unsigned __int8 v10; // al
int v11; // edx
int v12; // ecx
int v13; // edi
int v15; // [esp+10h] [ebp-18h]
int v16; // [esp+14h] [ebp-14h]
int v17; // [esp+18h] [ebp-10h]
int v18; // [esp+1Ch] [ebp-Ch]
int v19; // [esp+20h] [ebp-8h]
int v20; // [esp+24h] [ebp-4h]
n4_1 = n4; /*0xffca02e6*/
n4_2 = 0; /*0xffca02ed*/
LOBYTE(v18) = 0; /*0xffca02f0*/
while ( 1 ) /*0xffca02f7*/
{
v5 = 48704 * n4_2; /*0xffca02f7*/
v20 = v5; /*0xffca02fd*/
if ( *(_BYTE *)(v5 + n4_1 + 258689) ) /*0xffca0301*/
break; /*0xffca0301*/
LABEL_17:
LOBYTE(v18) = ++n4_2; /*0xffca041d*/
if ( n4_2 >= 4u ) /*0xffca0424*/
{
*(_WORD *)a2 = -1; /*0xffca0436*/
*(_BYTE *)(a2 + 2) = -1; /*0xffca043b*/
return 1; /*0xffca0445*/
}
}
v6 = v5 + n4_1 + 258722; /*0xffca0315*/
n6 = 0; /*0xffca0317*/
v15 = v6; /*0xffca0319*/
LOBYTE(v19) = 0; /*0xffca031d*/
while ( 1 ) /*0xffca0324*/
{
v8 = 7688 * n6; /*0xffca0324*/
v16 = v8; /*0xffca032a*/
if ( *(_BYTE *)(v8 + v6) ) /*0xffca032e*/
break; /*0xffca032e*/
LABEL_16:
LOBYTE(v19) = ++n6; /*0xffca040e*/
if ( n6 >= 6u ) /*0xffca0415*/
goto LABEL_17; /*0xffca0415*/
}
v9 = v8 + v5 + n4_1; /*0xffca033b*/
v10 = 0; /*0xffca033e*/
LOBYTE(v17) = 0; /*0xffca0343*/
if ( !*(_BYTE *)(v8 + v5 + n4_1 + 258725) ) /*0xffca0352*/
{
v6 = v5 + n4_1 + 258722; /*0xffca040a*/
goto LABEL_16; /*0xffca040a*/
}
v11 = v15; /*0xffca0358*/
v12 = 7688 * n6; /*0xffca035c*/
while ( 1 ) /*0xffca0361*/
{
v13 = 1379 * v10; /*0xffca0361*/
if ( *(_BYTE *)(v13 + v9 + 259225) ) /*0xffca0367*/
break; /*0xffca0367*/
LABEL_13:
v10 = v17 + 1; /*0xffca03e2*/
LOBYTE(v17) = v10; /*0xffca03e8*/
if ( v10 >= *(_BYTE *)(v12 + v11 + 3) ) /*0xffca03f0*/
{
n4_1 = n4; /*0xffca03f6*/
v5 = v20; /*0xffca03fa*/
v6 = v15; /*0xffca03fe*/
goto LABEL_16; /*0xffca0402*/
}
}
if ( AutoGenFunc8E45((int)a3, (char *)(v13 + v9 + 260443), 2) /*0xffca03ce*/
|| AutoGenFunc8E45((int)(a3 + 1), (char *)(v13 + v9 + 259262), 1)
|| AutoGenFunc8E45((int)a3 + 5, (char *)(v13 + v9 + 259268), 4)
|| AutoGenFunc8E45((int)a3 + 3, (char *)(v13 + v9 + 259263), 2) )
{
v11 = v15; /*0xffca03da*/
v12 = v16; /*0xffca03de*/
goto LABEL_13; /*0xffca03de*/
}
DebugPrint(n4, 3, v18, v19, v17, 255, 255, 255, "DIMM UID matched\n"); /*0xffca0466*/
DebugPrint( /*0xffca04b2*/
n4,
3,
v18,
v19,
v17,
255,
255,
255,
"UID->IdCodeLocDateSN %02x%02x%02x%02x%02x%02x%02x%02x%02x\n",
(unsigned __int8)*a3,
HIBYTE(*a3),
*((unsigned __int8 *)a3 + 2),
*((unsigned __int8 *)a3 + 3),
*((unsigned __int8 *)a3 + 4),
*((unsigned __int8 *)a3 + 5),
*((unsigned __int8 *)a3 + 6),
*((unsigned __int8 *)a3 + 7),
*((unsigned __int8 *)a3 + 8));
*(_BYTE *)a2 = v18; /*0xffca04c5*/
*(_BYTE *)(a2 + 1) = v19; /*0xffca04cb*/
*(_BYTE *)(a2 + 2) = v17; /*0xffca04d2*/
return 0; /*0xffca043e*/
}
// Function: KtiFunc4DC @ 0xffca04dc (0x1c bytes)
// Index: 1242/2560
char __cdecl KtiFunc4DC(int __return_address, int a2, unsigned __int8 n4)
{
char result; // al
result = 0; /*0xffca04e0*/
if ( n4 < 4u ) /*0xffca04e5*/
return *(_BYTE *)(a2 + 8 * n4) | (2 * *(_BYTE *)(a2 + 8 * n4 + 4)); /*0xffca04f4*/
return result; /*0xffca04f7*/
}
// Function: KtiFunc4F8 @ 0xffca04f8 (0x10e bytes)
// Index: 1243/2560
int __cdecl KtiFunc4F8(int __return_address, int a2, int n6, int a4, int a5, int a6, _BYTE *a7)
{
unsigned __int8 v7; // bl
unsigned __int8 n4; // cl
unsigned __int8 v9; // dl
unsigned __int8 v10; // al
unsigned __int8 v11; // bh
char *v12; // esi
int v13; // edi
char v14; // bp
unsigned int v15; // eax
unsigned int v16; // eax
char v17; // dl
bool v18; // zf
unsigned __int8 v19; // dl
char n4_1; // [esp+Dh] [ebp-Fh]
unsigned __int8 v22; // [esp+Eh] [ebp-Eh]
unsigned __int8 v23; // [esp+Fh] [ebp-Dh]
int v24; // [esp+10h] [ebp-Ch]
char v25; // [esp+14h] [ebp-8h] BYREF
int v26; // [esp+15h] [ebp-7h]
__int16 v27; // [esp+19h] [ebp-3h]
char v28; // [esp+1Bh] [ebp-1h]
char v29; // [esp+30h] [ebp+14h]
v25 = 0; /*0xffca04fe*/
v7 = 0; /*0xffca0509*/
v26 = 0; /*0xffca050b*/
n4 = 0; /*0xffca050c*/
n4_1 = 0; /*0xffca050e*/
v27 = 0; /*0xffca0513*/
v28 = 0; /*0xffca0515*/
*a7 = 0; /*0xffca051a*/
v9 = *(_BYTE *)(a5 + 9); /*0xffca0521*/
v23 = v9; /*0xffca0528*/
v10 = *(_BYTE *)(__return_address + 244317); /*0xffca052c*/
v22 = v10; /*0xffca0532*/
do /*0xffca05b2*/
{
v11 = 0; /*0xffca0536*/
if ( !v10 ) /*0xffca053a*/
goto LABEL_14; /*0xffca053a*/
do /*0xffca05a7*/
{
v29 = 0; /*0xffca053c*/
if ( !v9 ) /*0xffca0543*/
goto LABEL_13; /*0xffca0543*/
v12 = (char *)(a6 + 1); /*0xffca0549*/
v13 = v9; /*0xffca054a*/
do /*0xffca0593*/
{
v14 = *v12; /*0xffca054d*/
v15 = (unsigned __int8)*v12; /*0xffca0552*/
HIBYTE(v24) = 0; /*0xffca0554*/
v16 = v15 / 3; /*0xffca055c*/
if ( n4 != *(v12 - 1) || v11 != (_BYTE)v16 ) /*0xffca0567*/
goto LABEL_9; /*0xffca0567*/
v17 = 1; /*0xffca0569*/
v29 = 1; /*0xffca056b*/
if ( (_BYTE)v16 ) /*0xffca0571*/
{
*(&v25 + v7) |= 1 << (v14 - 3); /*0xffca0581*/
n4 = n4_1; /*0xffca0585*/
LABEL_9:
v17 = v29; /*0xffca0589*/
goto LABEL_10; /*0xffca0589*/
}
*(&v25 + v7) |= 1 << v14; /*0xffca05e0*/
n4 = n4_1; /*0xffca05e4*/
LABEL_10:
v12 += 7; /*0xffca058d*/
--v13; /*0xffca0590*/
}
while ( v13 ); /*0xffca0593*/
v10 = v22; /*0xffca0595*/
v18 = v17 == 0; /*0xffca0599*/
v9 = v23; /*0xffca059b*/
if ( !v18 ) /*0xffca059f*/
++v7; /*0xffca05a1*/
LABEL_13:
++v11; /*0xffca05a3*/
}
while ( v11 < v10 ); /*0xffca05a7*/
LABEL_14:
n4_1 = ++n4; /*0xffca05ab*/
}
while ( n4 < 4u ); /*0xffca05b2*/
if ( v7 <= 1u ) /*0xffca05b8*/
{
if ( !v7 ) /*0xffca05f1*/
return 1; /*0xffca05f1*/
LABEL_23:
*a7 = v25; /*0xffca05f3*/
return 0; /*0xffca05fd*/
}
else
{
v19 = 1; /*0xffca05ba*/
while ( *(&v25 + v19) == *(&v25 + v19 - 1) ) /*0xffca05cb*/
{
if ( ++v19 >= v7 ) /*0xffca05d1*/
goto LABEL_23; /*0xffca05d1*/
}
return 1; /*0xffca05ea*/
}
}
// Function: KtiDiscoveryFunc0606 @ 0xffca0606 (0x91f bytes)
// Index: 1244/2560
int __cdecl KtiDiscoveryFunc0606(unsigned __int8 *n4)
{
unsigned __int8 n4_4; // al
int v2; // esi
unsigned __int8 *v3; // ecx
unsigned __int8 *v4; // edx
unsigned __int8 *v5; // edx
int n4_1; // ebp
unsigned __int8 n6a_2; // al
int v8; // edi
bool v9; // zf
int n6a_1; // edi
int n2_1; // esi
unsigned __int8 v12; // cl
unsigned __int8 v13; // ch
int v14; // eax
unsigned __int8 *v15; // ebp
int v16; // edi
int n2_3; // esi
unsigned __int8 v18; // al
unsigned __int8 *v19; // ebp
int v20; // edi
int n4_2; // esi
unsigned __int8 v22; // al
unsigned __int8 *v23; // ebp
int v24; // edi
int n20; // esi
unsigned __int8 v26; // al
unsigned __int8 *v27; // ebp
int v28; // edi
int n9; // esi
unsigned __int8 v30; // al
int v31; // edx
int n2_4; // esi
unsigned __int8 v33; // al
const char *FNV; // ecx
unsigned __int16 v35; // cx
unsigned int v36; // eax
int result; // eax
unsigned __int8 n4_5; // al
unsigned __int8 *v39;... [18593 chars total]
// Function: KtiFuncF25 @ 0xffca0f25 (0x149 bytes)
// Index: 1245/2560
__int16 __cdecl KtiFuncF25(
int n4,
unsigned __int8 n4a,
unsigned __int8 n6,
unsigned __int8 n2,
unsigned __int8 n2_1,
char a6)
{
int v6; // ecx
int v7; // edi
int v8; // eax
unsigned __int8 v9; // bl
int v10; // eax
int v11; // edi
int v12; // eax
int v13; // eax
char v14; // cl
if ( !n4 || n4a >= 4u || n6 >= 6u || n2 >= 2u || n2_1 >= 2u ) /*0xffca0f62*/
return 0; /*0xffca0f62*/
v6 = 8077 * n6 + n4 + 50813 * n4a + 12557; /*0xffca0f84*/
if ( a6 ) /*0xffca0f8c*/
{
if ( a6 != 1 ) /*0xffca0ff0*/
return 0; /*0xffca0ff0*/
v11 = 2688 * n2; /*0xffca0ff5*/
if ( !*(_BYTE *)(v11 + v6 + 1891) ) /*0xffca0ffb*/
return 0; /*0xffca0ffb*/
if ( !*(_BYTE *)(v11 + v6 + 1892) ) /*0xffca1005*/
return 0; /*0xffca1005*/
v12 = v11 + 18 * n2_1; /*0xffca1015*/
if ( !*(_BYTE *)(v12 + v6 + 1903) || !*(_BYTE *)(v12 + v6 + 1904) ) /*0xffca1021*/
return 0; /*0xffca1029*/
v9 = *(_BYTE *)(v12 + v6 + 1912); /*0xffca102b*/
v10 = 168 * (n2_1 + 16 * n2) + 1939; /*0xffca103d*/
}
else
{
v7 = 2688 * n2; /*0xffca0f91*/
if ( !*(_BYTE *)(v7 + v6 + 1511) ) /*0xffca0f97*/
return 0; /*0xffca0f97*/
if ( !*(_BYTE *)(v7 + v6 + 1512) ) /*0xffca0fa4*/
return 0; /*0xffca0fa4*/
v8 = v7 + 18 * n2_1; /*0xffca0fb7*/
if ( !*(_BYTE *)(v8 + v6 + 1519) || !*(_BYTE *)(v8 + v6 + 1520) ) /*0xffca0fc7*/
return 0; /*0xffca0fcf*/
v9 = *(_BYTE *)(v8 + v6 + 1528); /*0xffca0fd5*/
v10 = 168 * (n2_1 + 16 * n2) + 1555; /*0xffca0fe7*/
}
v13 = v6 + v10; /*0xffca1042*/
v14 = 0; /*0xffca1044*/
if ( !v9 ) /*0xffca1048*/
return 0; /*0xffca1067*/
while ( n4a != *(_BYTE *)v13 || n6 != *(_BYTE *)(v13 + 1) || n2 != *(_BYTE *)(v13 + 2) ) /*0xffca1056*/
{
v13 += 7; /*0xffca1058*/
if ( (unsigned __int8)++v14 >= v9 ) /*0xffca105f*/
return 0; /*0xffca105f*/
}
return *(_WORD *)(v13 + 5); /*0xffca1063*/
}
// Function: KtiFunc106E @ 0xffca106e (0x66 bytes)
// Index: 1246/2560
int __cdecl KtiFunc106E(int __return_address, int a2, unsigned __int8 *a3, int a4, _BYTE *a5)
{
unsigned __int8 v5; // al
int v7; // edi
unsigned int v8; // edx
v5 = *(_BYTE *)(a2 + 9); /*0xffca1072*/
if ( v5 ) /*0xffca1077*/
{
v7 = v5; /*0xffca1089*/
do /*0xffca10cb*/
{
v8 = a3[1] / 3u + *(unsigned __int8 *)(__return_address + 244317) * *a3; /*0xffca10b2*/
if ( !*(_DWORD *)(a4 + 4 * v8) ) /*0xffca10b4*/
{
*(_DWORD *)(a4 + 4 * v8) = 1; /*0xffca10bb*/
++*a5; /*0xffca10c3*/
}
a3 += 7; /*0xffca10c5*/
--v7; /*0xffca10c8*/
}
while ( v7 ); /*0xffca10cb*/
}
return 0; /*0xffca10d3*/
}
// Function: KtiFunc10D4 @ 0xffca10d4 (0x229 bytes)
// Index: 1247/2560
int __cdecl KtiFunc10D4(int n4, int a2, int n6, int n2, _WORD *a5, unsigned int n4a, char n2a)
{
int v7; // edx
_WORD *v8; // ebp
int v9; // edi
unsigned int n4_1; // eax
int n4a_1; // ecx
bool v12; // zf
int v13; // eax
int v14; // eax
int n2_2; // ecx
int v17; // eax
int v18; // eax
unsigned __int8 n2_1; // [esp+10h] [ebp-8h]
int n4a_2; // [esp+14h] [ebp-4h]
v7 = a2; /*0xffca10d6*/
n4a_2 = 0; /*0xffca10da*/
v8 = a5; /*0xffca10e5*/
n2_1 = 0; /*0xffca10fd*/
v9 = 8077 * (unsigned __int8)n6 + 12557 + n4 + 50813 * (unsigned __int8)a2; /*0xffca110b*/
if ( a5 && (n4_1 = n4a) != 0 ) /*0xffca111b*/
{
while ( 1 ) /*0xffca112a*/
{
v8 = (_WORD *)((char *)v8 + n4a_2); /*0xffca112a*/
if ( n4_1 <= 4 || (unsigned __int16)v8[1] > n4a ) /*0xffca1143*/
break; /*0xffca1143*/
if ( *v8 == 4 ) /*0xffca1150*/
{
KtiFunc3E69(n4, v7, n6, n2, (int)v8, n2a); /*0xffca11a6*/
}
else if ( *v8 == 5 ) /*0xffca1155*/
{
if ( n2_1 >= 2u ) /*0xffca117a*/
{
v13 = 2688 * (unsigned __int8)n2; /*0xffca11d2*/
if ( n2a ) /*0xffca11da*/
{
*(_BYTE *)(v13 + v9 + 2280) = 6; /*0xffca11f0*/
if ( n2a == 1 ) /*0xffca11fb*/
*(_BYTE *)(v13 + v9 + 1892) = 0; /*0xffca11fd*/
}
else
{
*(_BYTE *)(v13 + v9 + 1512) = 0; /*0xffca11de*/
*(_WORD *)(v13 + v9 + 1513) = 10; /*0xffca11e6*/
}
DebugPrint(n4, 3, v7, n6, n2, 255, 255, 255, "Interleave requests exceed two!\n"); /*0xffca121a*/
KtiFunc211E(n4, 14, 14, a2, n6, n2, 255); /*0xffca122e*/
return 1; /*0xffca1236*/
}
KtiFn_FFCA3D56(n4, v7, n6, n2, (int)v8, n2a, n2_1++); /*0xffca118c*/
}
else
{
DebugPrint(n4, 3, v7, n6, n2, 255, 255, 255, "Unknown PCAT type found, skip processing...\n"); /*0xffca116b*/
}
n4a_1 = (unsigned __int16)v8[1]; /*0xffca11ae*/
n4_1 = n4a - n4a_1; /*0xffca11b6*/
v12 = n4a == n4a_1; /*0xffca11b6*/
n4a_2 = n4a_1; /*0xffca11b8*/
n4a -= n4a_1; /*0xffca11bc*/
if ( v12 ) /*0xffca11c0*/
return 0; /*0xffca11c0*/
v7 = a2; /*0xffca11c6*/
}
v14 = 2688 * (unsigned __int8)n2; /*0xffca123e*/
if ( n2a ) /*0xffca1246*/
{
*(_BYTE *)(v14 + v9 + 2280) = 2; /*0xffca125c*/
if ( n2a == 1 ) /*0xffca1267*/
*(_BYTE *)(v14 + v9 + 1892) = 0; /*0xffca1269*/
}
else
{
*(_BYTE *)(v14 + v9 + 1512) = 0; /*0xffca124a*/
*(_WORD *)(v14 + v9 + 1513) = 10; /*0xffca1252*/
}
DebugPrint(n4, 3, v7, n6, n2, 255, 255, 255, "Invalid PCATs length!\n"); /*0xffca127e*/
}
else
{
if ( n2a ) /*0xffca1285*/
{
n2_2 = n2; /*0xffca12b1*/
v18 = 2688 * (unsigned __int8)n2; /*0xffca12b8*/
*(_BYTE *)(v18 + v9 + 2280) = 2; /*0xffca12c3*/
if ( n2a == 1 ) /*0xffca12cb*/
*(_BYTE *)(v18 + v9 + 1892) = 0; /*0xffca12cd*/
}
else
{
if ( a5 ) /*0xffca1289*/
return 0; /*0xffca128d*/
n2_2 = n2; /*0xffca128f*/
v17 = 2688 * (unsigned __int8)n2; /*0xffca1296*/
*(_BYTE *)(v17 + v9 + 1512) = 0; /*0xffca129f*/
*(_WORD *)(v17 + v9 + 1513) = 10; /*0xffca12a7*/
}
DebugPrint(n4, 3, a2, n6, n2_2, 255, 255, 255, "PCATs not found!\n"); /*0xffca12eb*/
}
return 1; /*0xffca12f6*/
}
// Function: KtiFunc12FD @ 0xffca12fd (0x1c7 bytes)
// Index: 1248/2560
int __cdecl KtiFunc12FD(int n6, unsigned __int8 n4, unsigned __int8 a3, unsigned __int8 a4, __int16 p_n20)
{
int v5; // ebp
int v6; // ebx
int v7; // edi
__int16 v8; // ax
unsigned __int8 n4a_1; // al
int n4a_2; // esi
int v11; // eax
int v12; // ebx
char v13; // al
unsigned __int8 p_n20a_1; // cl
int v15; // eax
unsigned __int8 *v16; // ebp
int n6_1; // ecx
int v18; // eax
_BYTE *v19; // esi
unsigned __int8 *v20; // ebp
bool v21; // zf
unsigned __int8 n6_2; // [esp+10h] [ebp-18h]
int v24; // [esp+14h] [ebp-14h]
int v25; // [esp+18h] [ebp-10h]
int v26; // [esp+1Ch] [ebp-Ch]
int v27; // [esp+20h] [ebp-8h]
int v28; // [esp+24h] [ebp-4h]
unsigned __int8 n4a; // [esp+30h] [ebp+8h]
int n2; // [esp+34h] [ebp+Ch]
unsigned __int8 *v31; // [esp+38h] [ebp+10h]
int p_n20a; // [esp+3Ch] [ebp+14h]
v5 = a4; /*0xffca130b*/
v6 = 2688 * a4; /*0xffca1329*/
v27 = a4; /*0xffca1333*/
v7 = 8077 * a3 + 3157 + n6 + 9400 + 50813 * n4; /*0xffca133c*/
v28 = v6; /*0xffca133e*/
v8 = KtiFunc2A5(4); /*0xffca1342*/
*(_BYTE *)(v6 + v7 + 2280) = 2; /*0xffca1352*/
*(_WORD *)(v6 + v7 + 2285) = (p_n20 << 8) | v8; /*0xffca135a*/
n4a_1 = 0; /*0xffca1362*/
n4a = 0; /*0xffca1364*/
do /*0xffca14b4*/
{
n4a_2 = n4a_1; /*0xffca1368*/
v11 = 18 * n4a_1; /*0xffca136b*/
v12 = v11 + v6; /*0xffca136e*/
v25 = v11; /*0xffca1370*/
if ( !*(_BYTE *)(v12 + v7 + 1903) || !*(_BYTE *)(v12 + v7 + 1904) ) /*0xffca1382*/
break; /*0xffca138a*/
*(_BYTE *)(v12 + v7 + 1904) = 0; /*0xffca1392*/
v13 = KtiFunc246(8u); /*0xffca139a*/
p_n20a_1 = *(_BYTE *)(v12 + v7 + 1912); /*0xffca13a0*/
*(_BYTE *)(v12 + v7 + 2303) = v13; /*0xffca13a7*/
n6_2 = p_n20a_1; /*0xffca13ae*/
if ( p_n20a_1 ) /*0xffca13b4*/
{
v15 = 168 * (n4a_2 + 16 * v5); /*0xffca13cd*/
v16 = (unsigned __int8 *)(v15 + v7 + 1940); /*0xffca13d5*/
v24 = v15 + v7 + 1939; /*0xffca13da*/
v31 = v16; /*0xffca13de*/
p_n20a = p_n20a_1; /*0xffca13e2*/
do /*0xffca149a*/
{
n6_1 = n6; /*0xffca13ea*/
n2 = 2; /*0xffca13fe*/
v18 = 8077 * *v16 + 50813 * *(v16 - 1) + 2688 * v16[1]; /*0xffca1418*/
v19 = (_BYTE *)(v18 + n6 + 14470); /*0xffca1420*/
v26 = v18; /*0xffca1422*/
v20 = (unsigned __int8 *)(v18 + n6 + 14496); /*0xffca1426*/
do /*0xffca1488*/
{
if ( *(v19 - 1) == *(_BYTE *)(v12 + v7 + 1912) || *v19 == *(_BYTE *)(v12 + v7 + 1913) ) /*0xffca143d*/
{
if ( !MemChipFuncFF5F(n6_1, v24, v20, n6_2) ) /*0xffca1449*/
{
*(v19 - 9) = 0; /*0xffca1456*/
*(_BYTE *)(v26 + v25 + n6 + 14860) = KtiFunc246(0); /*0xffca146b*/
}
n6_1 = n6; /*0xffca1472*/
}
v20 += 168; /*0xffca147a*/
v19 += 18; /*0xffca1480*/
--n2; /*0xffca1483*/
}
while ( n2 ); /*0xffca1488*/
v16 = v31 + 7; /*0xffca148e*/
v21 = p_n20a-- == 1; /*0xffca1491*/
v31 += 7; /*0xffca1496*/
}
while ( !v21 ); /*0xffca149a*/
v5 = v27; /*0xffca14a0*/
}
v6 = v28; /*0xffca14a8*/
n4a_1 = n4a + 1; /*0xffca14ac*/
n4a = n4a_1; /*0xffca14ae*/
}
while ( n4a_1 < 2u ); /*0xffca14b4*/
return 0; /*0xffca14ba*/
}
// Function: KtiFunc14C4 @ 0xffca14c4 (0x629 bytes)
// Index: 1249/2560
int __cdecl KtiFunc14C4(unsigned __int8 *n6)
{
unsigned __int8 *n6_1; // ebp
unsigned __int8 n4_4; // al
int v3; // esi
unsigned __int8 *v4; // edi
int v5; // ebx
unsigned __int8 *v6; // edx
unsigned __int8 *v7; // ecx
unsigned __int8 *v8; // ebx
unsigned int v9; // esi
unsigned __int8 n6_2; // dl
int v11; // eax
unsigned __int8 *v12; // edi
unsigned __int8 v13; // al
int v14; // ebx
int n2_1; // esi
int v16; // ecx
int n4_2; // edx
unsigned __int8 n2; // al
int v19; // eax
int v20; // eax
int v21; // eax
int v22; // esi
int v23; // edx
int v24; // esi
unsigned int v25; // ecx
unsigned __int8 v26; // dl
int v27; // ebp
__int16 v28; // cx
unsigned __int8 v29; // al
unsigned __int8 v30; // dl
int v31; // edx
unsigned __int16 v32; // ax
unsigned __int8 n2_2; // cl
int n4_3; // ecx
int v35; // esi
int v36; // eax
int v37; // esi
unsigned __int8 v38; // dl
int v39; // ebp
unsigned __int8 v40; // dl
char p_n20;... [12930 chars total]
// Function: KtiFn_FFCA1AED @ 0xffca1aed (0x339 bytes)
// Index: 1250/2560
int __cdecl KtiFn_FFCA1AED(unsigned __int8 *n4, int a2)
{
unsigned __int8 *n4_1; // edi
int v3; // esi
unsigned __int8 n4_3; // bl
unsigned __int8 n4_2; // cl
unsigned __int8 *v6; // edx
int v7; // ebp
int v8; // esi
unsigned __int8 *v9; // eax
unsigned __int8 n6_1; // cl
int v11; // esi
int v12; // ebp
unsigned __int8 *v13; // eax
int v14; // eax
int v15; // eax
int v16; // eax
_BYTE *v17; // esi
int n2; // [esp+8h] [ebp-38h]
unsigned __int8 *v20; // [esp+Ch] [ebp-34h]
int n6; // [esp+10h] [ebp-30h]
int v22; // [esp+14h] [ebp-2Ch]
unsigned __int8 *v23; // [esp+18h] [ebp-28h]
int v24; // [esp+1Ch] [ebp-24h]
int v25; // [esp+20h] [ebp-20h]
int v26; // [esp+24h] [ebp-1Ch]
int v27; // [esp+28h] [ebp-18h] BYREF
int n2_1; // [esp+2Ch] [ebp-14h]
int n255; // [esp+30h] [ebp-10h]
unsigned __int8 *v30; // [esp+34h] [ebp-Ch]
unsigned __int8 *v31; // [esp+38h] [ebp-8h]
int v32; // [esp+3Ch] [ebp-4h] BYREF
n4_1 = n4; /*0xffca1af2*/
v3 = KtiDiscoveryFunc0606(n4); /*0xffca1afd*/
MemChipFuncFC95(n4); /*0xffca1aff*/
if ( v3 == 1 ) /*0xffca1b09*/
{
LABEL_32:
MemChipFuncA136((int)n4_1, 32); /*0xffca1e14*/
return 0; /*0xffca1e17*/
}
if ( !n4[10187] ) /*0xffca1b0f*/
{
n4_3 = 0; /*0xffca1b1d*/
n255 = 255; /*0xffca1b1f*/
n4_2 = 0; /*0xffca1b28*/
v6 = n4 + 259118; /*0xffca1b2a*/
v7 = 0; /*0xffca1b30*/
LOBYTE(n4) = 0; /*0xffca1b32*/
v8 = 0; /*0xffca1b36*/
v26 = 0; /*0xffca1b38*/
v9 = n4_1 + 258689; /*0xffca1b3c*/
v25 = 0; /*0xffca1b42*/
v31 = n4_1 + 259118; /*0xffca1b46*/
v30 = n4_1 + 258689; /*0xffca1b4a*/
do /*0xffca1dcd*/
{
if ( *v9 ) /*0xffca1b4e*/
{
n6_1 = 0; /*0xffca1b56*/
v20 = v6; /*0xffca1b58*/
v11 = 0; /*0xffca1b5c*/
LOBYTE(n6) = 0; /*0xffca1b5e*/
v12 = 0; /*0xffca1b62*/
v22 = 0; /*0xffca1b64*/
v13 = v6 - 393; /*0xffca1b68*/
v24 = 0; /*0xffca1b6e*/
v23 = v6 - 393; /*0xffca1b72*/
do /*0xffca1d86*/
{
if ( *(v13 - 3) ) /*0xffca1b76*/
{
LOBYTE(n2) = 0; /*0xffca1b7f*/
if ( *v13 ) /*0xffca1b83*/
{
while ( 1 ) /*0xffca1b8f*/
{
if ( MemChipFuncACE9((int)n4_1, (int)n4, n6, n2) ) /*0xffca1b9a*/
{
n2_1 = (unsigned __int8)n2; /*0xffca1bbb*/
if ( *(_BYTE *)((unsigned __int8)n2 + 2 * (v22 + v25) + a2 + 10) ) /*0xffca1bc2*/
{
v14 = 1379 * (unsigned __int8)n2; /*0xffca1bc8*/
*(_DWORD *)&v20[v14 + 1329] = 0; /*0xffca1bd9*/
*(_DWORD *)&v20[v14 + 1333] = 0; /*0xffca1be0*/
DebugPrint( /*0xffca1bf7*/
(int)n4_1,
3,
(int)n4,
n6,
n2,
n255,
n255,
n255,
"DIMM Unmapped - SKU Limit Violation! PCD is not read!\n");
}
else
{
ProcCommonFuncE302((int)n4_1, (int)n4, n6, n2, &v27, &v32); /*0xffca1c15*/
if ( (v27 & 0x30000) != 0x10000 || (v27 & 0x1000000) != 0 ) /*0xffca1c39*/
{
v16 = 1379 * n2_1; /*0xffca1cd3*/
*(_DWORD *)&v20[v16 + 1329] = 0; /*0xffca1ce8*/
*(_DWORD *)&v20[v16 + 1333] = 0; /*0xffca1cef*/
ProcCommonFuncEF57((int)n4_1, (int)n4, n6, n2); /*0xffca1cf6*/
DebugPrint( /*0xffca1d10*/
(int)n4_1,
3,
(int)n4,
n6,
n2,
n255,
n255,
n255,
"DIMM Media Disabled! PCD is not read!\n");
KtiFunc1162(n4_1, 132, 3, (int)n4, n6, n2, 255); /*0xffca1d2b*/
goto LABEL_21; /*0xffca1d2b*/
}
if ( DebugLogPrint_4(n4_1, (int)n4, n6, n2) == 1 ) /*0xffca1c58*/
{
if ( !KtiTopoBoundsCheck(n4_1, n4, n6, n2) || DebugLogPrint_3(n4_1, (int)n4, n6, n2) == 1 ) /*0xffca1c7c*/
goto LABEL_21; /*0xffca1c7c*/
if ( KtiFn_FFCA1E81((int)n4_1, (unsigned __int8)n4, n6, n2) ) /*0xffca1c89*/
{
LABEL_19:
MemChipFuncF89D(n4_1, (int)n4, n6, n2); /*0xffca1cc2*/
goto LABEL_21; /*0xffca1cd1*/
}
v15 = v24 + v26 + 2688 * n2_1; /*0xffca1ca1*/
n4_1[v15 + 14448] = 0; /*0xffca1ca5*/
n4_1[v15 + 14832] = 0; /*0xffca1cac*/
}
else if ( DebugLogPrint_3(n4_1, (int)n4, n6, n2) != 1 ) /*0xffca1cc0*/
{
goto LABEL_19; /*0xffca1cc0*/
}
}
}
LABEL_21:
LOBYTE(n2) = n2 + 1; /*0xffca1d33*/
if ( (unsigned __int8)n2 >= *v23 ) /*0xffca1d43*/
{
v6 = v20; /*0xffca1d49*/
v13 = v23; /*0xffca1d4d*/
n6_1 = n6; /*0xffca1d4f*/
v12 = v24; /*0xffca1d53*/
v11 = v22; /*0xffca1d57*/
break; /*0xffca1d57*/
}
}
}
}
++n6_1; /*0xffca1d5b*/
v6 += 7688; /*0xffca1d5d*/
++v11; /*0xffca1d63*/
LOBYTE(n6) = n6_1; /*0xffca1d64*/
v13 += 7688; /*0xffca1d68*/
v22 = v11; /*0xffca1d6d*/
v12 += 8077; /*0xffca1d71*/
v20 = v6; /*0xffca1d77*/
v23 = v13; /*0xffca1d7b*/
v24 = v12; /*0xffca1d7f*/
}
while ( n6_1 < 6u ); /*0xffca1d86*/
n4_2 = (unsigned __int8)n4; /*0xffca1d8c*/
v6 = v31; /*0xffca1d90*/
v9 = v30; /*0xffca1d94*/
v7 = v26; /*0xffca1d98*/
v8 = v25; /*0xffca1d9c*/
}
++n4_2; /*0xffca1da0*/
v9 += 48704; /*0xffca1da2*/
v6 += 48704; /*0xffca1da7*/
LOBYTE(n4) = n4_2; /*0xffca1dad*/
v8 += 12; /*0xffca1db1*/
v30 = v9; /*0xffca1db4*/
v7 += 50813; /*0xffca1db8*/
v31 = v6; /*0xffca1dbe*/
v25 = v8; /*0xffca1dc2*/
v26 = v7; /*0xffca1dc6*/
}
while ( n4_2 < 4u ); /*0xffca1dcd*/
if ( n4_1[244425] == 1 ) /*0xffca1dda*/
MemChipFuncA136((int)n4_1, 16); /*0xffca1ddf*/
LOBYTE(n4) = 0; /*0xffca1de6*/
v17 = n4_1 + 258689; /*0xffca1dea*/
do /*0xffca1e10*/
{
if ( *v17 ) /*0xffca1df0*/
DebugLogPrint_5(n4_1, n4); /*0xffca1dfa*/
++n4_3; /*0xffca1e01*/
v17 += 48704; /*0xffca1e03*/
LOBYTE(n4) = n4_3; /*0xffca1e09*/
}
while ( n4_3 < 4u ); /*0xffca1e10*/
goto LABEL_32; /*0xffca1e10*/
}
return 0; /*0xffca1e1e*/
}
// Function: KtiTopoBoundsCheck @ 0xffca1e26 (0x5b bytes)
// Index: 1251/2560
bool __cdecl KtiTopoBoundsCheck(_BYTE *n4, _BYTE *n4_1, unsigned __int8 n6, unsigned __int8 n2)
{
char n2_1; // al
bool result; // al
result = 0; /*0xffca1e7c*/
if ( n4 ) /*0xffca1e2e*/
{
if ( (unsigned __int8)n4_1 < 4u && n6 < 6u && n2 < 2u ) /*0xffca1e45*/
{
n2_1 = n4[50813 * (unsigned __int8)n4_1 + 15242 + 8077 * n6 + 2688 * n2] >> 1; /*0xffca1e6e*/
if ( n2_1 != 1 && n2_1 != 2 ) /*0xffca1e76*/
return 1; /*0xffca1e2e*/
}
}
return result; /*0xffca1e7e*/
}
// Function: KtiFn_FFCA1E81 @ 0xffca1e81 (0x7d bytes)
// Index: 1252/2560
bool __cdecl KtiFn_FFCA1E81(int n4, unsigned __int8 n4a, unsigned __int8 n6, unsigned __int8 n2)
{
int v4; // ecx
int v5; // edx
bool result; // al
result = 0; /*0xffca1ed7*/
if ( n4 ) /*0xffca1e89*/
{
if ( n4a < 4u && n6 < 6u && n2 < 2u ) /*0xffca1ea0*/
{
v4 = 8077 * n6 + n4 + 50813 * n4a; /*0xffca1eb7*/
v5 = 2688 * n2; /*0xffca1ebc*/
if ( *(_BYTE *)(v5 + v4 + 14448) ) /*0xffca1ec2*/
{
if ( !*(_BYTE *)(v5 + v4 + 14832) || *(_DWORD *)(v5 + v4 + 14833) != *(_DWORD *)(v5 + v4 + 14450) ) /*0xffca1ef7*/
return 1; /*0xffca1e89*/
}
}
}
return result; /*0xffca1efb*/
}
// Function: DebugLogPrint_4 @ 0xffca1efe (0x2a8 bytes)
// Index: 1253/2560
int __cdecl DebugLogPrint_4(unsigned __int8 *n4, int n4_1, int n6, int n2)
{
int n2_1; // eax
char v6; // [esp+13h] [ebp-1AA1h] BYREF
unsigned __int8 *v7; // [esp+14h] [ebp-1AA0h]
int v8; // [esp+18h] [ebp-1A9Ch]
int n2_2; // [esp+1Ch] [ebp-1A98h]
int v10[1632]; // [esp+20h] [ebp-1A94h] BYREF
char p_n1145589060[4]; // [esp+19A0h] [ebp-114h] BYREF
unsigned int n0x80; // [esp+19A4h] [ebp-110h]
char v13; // [esp+19A8h] [ebp-10Ch]
int v14; // [esp+19C4h] [ebp-F0h]
int v15; // [esp+19C8h] [ebp-ECh]
v6 = 0; /*0xffca1f36*/
v7 = &n4[50813 * (unsigned __int8)n4_1 + 12557 + 8077 * (unsigned __int8)n6]; /*0xffca1f4d*/
v8 = 2688 * (unsigned __int8)n2; /*0xffca1f51*/
v7[v8 + 1511] = 0; /*0xffca1f55*/
DebugPrint( /*0xffca1f75*/
(int)n4,
2,
n4_1,
n6,
n2,
255,
255,
255,
"ReadBIOSPartition->GetPlatformConfigData, partition = %d, option = %d, offset = %d\n",
0,
0,
0);
n2_1 = ProcCommonFuncDB23(n4, n4_1, n6, n2, 0, 0, 0, (int)v10, &v6); /*0xffca1f9b*/
n2_2 = n2_1; /*0xffca1fa3*/
if ( n2_1 == 1 ) /*0xffca1faa*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Communication with the NGN DIMM failed\n"); /*0xffca1fbf*/
KtiFunc1162(n4, 15, 2, n4_1, n6, n2, 255); /*0xffca1fd1*/
KtiFunc8B24(n4, n4_1, n6, n2); /*0xffca1fdd*/
v7[v8 + 2685] = 3; /*0xffca1fed*/
}
else if ( n2_1 == 2 || n2_1 == 3 || n2_1 == 4 ) /*0xffca200f*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Problem with Media Access\n"); /*0xffca2169*/
KtiFunc1162(n4, 132, n2_2, n4_1, n6, n2, 255); /*0xffca2180*/
v7[v8 + 2685] = 5; /*0xffca2190*/
}
else
{
if ( *(_DWORD *)p_n1145589060 != 1145589060 ) /*0xffca2020*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "DMHD signature not found in the NGN DIMM Partition %d\n", 0); /*0xffca2037*/
KtiFunc1AC(n4, (unsigned __int8 *)p_n1145589060, 0x80u); /*0xffca204a*/
v7[v8 + 2685] = 7; /*0xffca205c*/
return 0; /*0xffca2064*/
}
if ( v13 == 1 ) /*0xffca2071*/
{
if ( !MemChipFuncFEB1(p_n1145589060, n0x80) ) /*0xffca20e3*/
return DebugLogPrint_13(n4, n4_1, n6, n2, v15, v14); /*0xffca2154*/
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "BIOS Partition DMHD checksum failure.\n"); /*0xffca20f8*/
KtiFunc1AC(n4, (unsigned __int8 *)p_n1145589060, 0x80u); /*0xffca210b*/
KtiFunc1162(n4, 136, 1, n4_1, n6, n2, 255); /*0xffca2120*/
v7[v8 + 2685] = 11; /*0xffca2130*/
}
else
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "NVMDIMM Mgmt SW - BIOS interface revision mismatch(DMHD).\n"); /*0xffca2086*/
KtiFunc1AC(n4, (unsigned __int8 *)p_n1145589060, 0x80u); /*0xffca2099*/
KtiFunc1162(n4, 136, 2, n4_1, n6, n2, 255); /*0xffca20ae*/
v7[v8 + 2685] = 9; /*0xffca20be*/
}
}
return 1; /*0xffca219b*/
}
// Function: DebugLogPrint_14 @ 0xffca21a6 (0x437 bytes)
// Index: 1254/2560
int __cdecl DebugLogPrint_14(unsigned __int8 *n4, int n4_1, int n6, int n2, int a5, int a6)
{
unsigned __int8 *v6; // ebp
int v7; // ebx
unsigned int n0x80; // ecx
unsigned int v9; // eax
int n2_1; // eax
char *v11; // ebp
int v12; // eax
unsigned __int8 v14; // [esp+12h] [ebp-241Ah]
char v15; // [esp+13h] [ebp-2419h] BYREF
unsigned int v16; // [esp+14h] [ebp-2418h]
unsigned __int8 *v17; // [esp+18h] [ebp-2414h]
unsigned int v18; // [esp+1Ch] [ebp-2410h]
int v19; // [esp+20h] [ebp-240Ch]
int n2_2; // [esp+24h] [ebp-2408h]
char v21[2416]; // [esp+28h] [ebp-2404h] BYREF
int v22[1632]; // [esp+998h] [ebp-1A94h] BYREF
char v23[276]; // [esp+2318h] [ebp-114h] BYREF
unsigned int n0x970; // [esp+2444h] [ebp+18h]
v16 = 0; /*0xffca21ba*/
v15 = 0; /*0xffca21e5*/
v6 = &n4[50813 * (unsigned __int8)n4_1 + 12557 + 8077 * (unsigned __int8)n6]; /*0xffca21ef*/
v17 = v6; /*0xffca21fa*/
v7 = a5 & 0x7F; /*0xffca21fe*/
n0x80 = v7 + a6; /*0xffca2208*/
v19 = v7; /*0xffca220c*/
v18 = a5 - v7; /*0xffca2210*/
n0x970 = n0x80; /*0xffca2214*/
if ( n0x80 <= 0x80 ) /*0xffca2221*/
{
v9 = v16; /*0xffca2238*/
}
else
{
v9 = n0x80 >> 7; /*0xffca2225*/
v16 = n0x80 >> 7; /*0xffca2228*/
if ( (n0x80 & 0x7F) != 0 ) /*0xffca222f*/
v16 = ++v9; /*0xffca2232*/
}
DebugPrint( /*0xffca226d*/
(int)n4,
2,
n4_1,
n6,
n2,
255,
255,
255,
"ReadCfgInTable->GetPlatformConfigData, partition = %d, OffsetAdjustment = %d, ConfRequestDataOffset = %d, ConfReques"
"tDataSize = %d, Counter = %d, MAX_CFG_IN_SIZE= %d \n",
1,
a5 & 0x7F,
a5,
n0x80,
v9,
2416);
if ( n0x970 > 0x970 ) /*0xffca2280*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "OS partition(CIN) data size exceeded! \n"); /*0xffca259b*/
KtiFunc1162(n4, 134, 4, n4_1, n6, n2, 255); /*0xffca25b6*/
v6[2688 * (unsigned __int8)n2 + 2686] = 15; /*0xffca25c7*/
return 1; /*0xffca25cf*/
}
else
{
v14 = 0; /*0xffca228d*/
do /*0xffca2341*/
{
DebugPrint( /*0xffca22b3*/
(int)n4,
2,
n4_1,
n6,
n2,
255,
255,
255,
"ReadCfgInTable->GetPlatformConfigData, partition = %d, option = %d, offset = %d\n",
1,
0,
v18);
n2_1 = ProcCommonFuncDB23(n4, n4_1, n6, n2, 1u, 0, v18, (int)v22, &v15); /*0xffca22d7*/
n2_2 = n2_1; /*0xffca22df*/
if ( n2_1 == 1 ) /*0xffca22e6*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Communication with the NGN DIMM failed\n"); /*0xffca254d*/
KtiFunc1162(n4, 15, 2, n4_1, n6, n2, 255); /*0xffca2565*/
v6[2688 * (unsigned __int8)n2 + 2686] = 3; /*0xffca2576*/
return 1; /*0xffca257e*/
}
if ( n2_1 == 2 || n2_1 == 3 || n2_1 == 4 ) /*0xffca2301*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Problem with Media Access\n"); /*0xffca24f9*/
KtiFunc1162(n4, 132, n2_2, n4_1, n6, n2, 255); /*0xffca2516*/
v6[2688 * (unsigned __int8)n2 + 2686] = 5; /*0xffca2527*/
return 1; /*0xffca252f*/
}
AutoGenFunc8E72((int)&v21[128 * v14], v23, 128); /*0xffca2323*/
v18 += 128; /*0xffca232f*/
++v14; /*0xffca2336*/
}
while ( v14 <= v16 ); /*0xffca2341*/
v11 = &v21[v19]; /*0xffca234b*/
if ( *(_DWORD *)&v21[v19] != 1598966083 ) /*0xffca2359*/
{
v17[2688 * (unsigned __int8)n2 + 2686] = 7; /*0xffca236d*/
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "CIN_ signature not found in the NGN DIMM PCD 2.\n"); /*0xffca2389*/
KtiFunc1AC(n4, (unsigned __int8 *)v11, 0x970u); /*0xffca2395*/
KtiFunc1162(n4, 134, 1, n4_1, n6, n2, 255); /*0xffca23b0*/
return 1; /*0xffca23b0*/
}
if ( MemChipFuncFEB1(&v21[v19], *(_DWORD *)&v21[v19 + 4]) ) /*0xffca23bf*/
{
v17[2688 * (unsigned __int8)n2 + 2686] = 11; /*0xffca23dc*/
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Configuration Input Record checksum failure.\n"); /*0xffca23f8*/
KtiFunc1AC(n4, (unsigned __int8 *)v11, 0x970u); /*0xffca2404*/
KtiFunc1162(n4, 134, 2, n4_1, n6, n2, 255); /*0xffca2419*/
return 1; /*0xffca2419*/
}
if ( v11[8] != 2 ) /*0xffca241f*/
{
v17[2688 * (unsigned __int8)n2 + 2686] = 9; /*0xffca242c*/
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "NVMDIMM Mgmt SW - BIOS interface revision mismatch(CIN_).\n"); /*0xffca2448*/
KtiFunc1AC(n4, (unsigned __int8 *)v11, 0x970u); /*0xffca2454*/
KtiFunc1162(n4, 134, 3, n4_1, n6, n2, 255); /*0xffca2469*/
return 1; /*0xffca2469*/
}
v12 = *((_DWORD *)v11 + 9); /*0xffca2474*/
v16 = 2688 * (unsigned __int8)n2; /*0xffca2479*/
*(_DWORD *)&v17[v16 + 1893] = v12; /*0xffca247d*/
if ( KtiFunc10D4((int)n4, n4_1, n6, n2, (_WORD *)v11 + 24, *((_DWORD *)v11 + 1) - 48, 1) ) /*0xffca2499*/
{
KtiFunc1AC(n4, (unsigned __int8 *)v11, 0x970u); /*0xffca24ac*/
v17[v16 + 2686] = 17; /*0xffca24bc*/
return 1; /*0xffca24c4*/
}
v17[v16 + 1891] = 1; /*0xffca24d1*/
return 0; /*0xffca24d9*/
}
}
// Function: DebugLogPrint_16 @ 0xffca25dd (0x3ed bytes)
// Index: 1255/2560
int __cdecl DebugLogPrint_16(unsigned __int8 *n4, int n4_1, int n6, int n2, int a5, int a6)
{
unsigned __int8 *v6; // ebp
int v7; // ebx
unsigned int n0x80; // ecx
unsigned int v9; // eax
int n2_1; // eax
char *v11; // ebp
char v12; // al
unsigned __int8 *v13; // edx
int v14; // ecx
unsigned __int8 v16; // [esp+12h] [ebp-241Ah]
char v17; // [esp+13h] [ebp-2419h] BYREF
unsigned int v18; // [esp+14h] [ebp-2418h]
unsigned int v19; // [esp+18h] [ebp-2414h]
unsigned __int8 *v20; // [esp+1Ch] [ebp-2410h]
int v21; // [esp+20h] [ebp-240Ch]
int n2_2; // [esp+24h] [ebp-2408h]
char v23[2416]; // [esp+28h] [ebp-2404h] BYREF
int v24[1632]; // [esp+998h] [ebp-1A94h] BYREF
char v25[276]; // [esp+2318h] [ebp-114h] BYREF
unsigned int n0x970; // [esp+2444h] [ebp+18h]
v19 = 0; /*0xffca25f1*/
v17 = 0; /*0xffca261c*/
v6 = &n4[50813 * (unsigned __int8)n4_1 + 12557 + 8077 * (unsigned __int8)n6]; /*0xffca2626*/
v20 = v6; /*0xffca2631*/
v7 = a5 & 0x7F; /*0xffca2635*/
n0x80 = v7 + a6; /*0xffca263f*/
v21 = v7; /*0xffca2643*/
v18 = a5 - v7; /*0xffca2647*/
n0x970 = n0x80; /*0xffca264b*/
if ( n0x80 <= 0x80 ) /*0xffca2658*/
{
v9 = v19; /*0xffca266f*/
}
else
{
v9 = n0x80 >> 7; /*0xffca265c*/
v19 = n0x80 >> 7; /*0xffca265f*/
if ( (n0x80 & 0x7F) != 0 ) /*0xffca2666*/
v19 = ++v9; /*0xffca2669*/
}
DebugPrint( /*0xffca26a4*/
(int)n4,
2,
n4_1,
n6,
n2,
255,
255,
255,
"ReadCfgInTable->GetPlatformConfigData, partition = %d, OffsetAdjustment = %d, ConfResponseDataOffset = %d, ConfRespo"
"nseDataSize = %d, Counter = %d, MAX_CFG_OUT_SIZE= %d \n",
1,
a5 & 0x7F,
a5,
n0x80,
v9,
2416);
if ( n0x970 > 0x970 ) /*0xffca26b7*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "OS partition(COUT) data size exceeded! \n"); /*0xffca2988*/
KtiFunc1162(n4, 135, 4, n4_1, n6, n2, 255); /*0xffca29a3*/
v6[2688 * (unsigned __int8)n2 + 2686] = 15; /*0xffca29b4*/
return 1; /*0xffca29bc*/
}
else
{
v16 = 0; /*0xffca26c4*/
do /*0xffca2778*/
{
DebugPrint( /*0xffca26ea*/
(int)n4,
2,
n4_1,
n6,
n2,
255,
255,
255,
"ReadCfgOutTable->GetPlatformConfigData, partition = %d, option = %d, offset = %d\n",
1,
0,
v18);
n2_1 = ProcCommonFuncDB23(n4, n4_1, n6, n2, 1u, 0, v18, (int)v24, &v17); /*0xffca270e*/
n2_2 = n2_1; /*0xffca2716*/
if ( n2_1 == 1 ) /*0xffca271d*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Communication with the NGN DIMM failed\n"); /*0xffca293a*/
KtiFunc1162(n4, 15, 2, n4_1, n6, n2, 255); /*0xffca2952*/
v6[2688 * (unsigned __int8)n2 + 2686] = 3; /*0xffca2963*/
return 1; /*0xffca296b*/
}
if ( n2_1 == 2 || n2_1 == 3 || n2_1 == 4 ) /*0xffca2738*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Problem with Media Access\n"); /*0xffca28e6*/
KtiFunc1162(n4, 132, n2_2, n4_1, n6, n2, 255); /*0xffca2903*/
v6[2688 * (unsigned __int8)n2 + 2686] = 5; /*0xffca2914*/
return 1; /*0xffca291c*/
}
AutoGenFunc8E72((int)&v23[128 * v16], v25, 128); /*0xffca275a*/
v18 += 128; /*0xffca2766*/
++v16; /*0xffca276d*/
}
while ( v16 <= v19 ); /*0xffca2778*/
v11 = &v23[v21]; /*0xffca2782*/
if ( *(_DWORD *)&v23[v21] != 1414876995 ) /*0xffca278d*/
{
v20[2688 * (unsigned __int8)n2 + 2686] = 7; /*0xffca27a1*/
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "COUT signature not found in the NGN DIMM PCD 2.\n"); /*0xffca27bd*/
KtiFunc1AC(n4, (unsigned __int8 *)v11, 0x970u); /*0xffca27c9*/
KtiFunc1162(n4, 135, 1, n4_1, n6, n2, 255); /*0xffca27e4*/
return 1; /*0xffca27e4*/
}
v12 = MemChipFuncFEB1(&v23[v21], *((_DWORD *)v11 + 1)); /*0xffca27f5*/
v13 = v20; /*0xffca27fa*/
if ( v12 ) /*0xffca2805*/
{
v20[2688 * (unsigned __int8)n2 + 2686] = 11; /*0xffca2812*/
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Configuration Output Record checksum failure.\n"); /*0xffca282e*/
KtiFunc1AC(n4, (unsigned __int8 *)v11, 0x970u); /*0xffca283a*/
KtiFunc1162(n4, 135, 2, n4_1, n6, n2, 255); /*0xffca284f*/
return 1; /*0xffca284f*/
}
if ( v11[8] != 2 ) /*0xffca2855*/
{
v20[2688 * (unsigned __int8)n2 + 2686] = 9; /*0xffca2862*/
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "NVMDIMM Mgmt SW - BIOS interface revision mismatch(COUT).\n"); /*0xffca287e*/
KtiFunc1AC(n4, (unsigned __int8 *)v11, 0x970u); /*0xffca288a*/
KtiFunc1162(n4, 135, 3, n4_1, n6, n2, 255); /*0xffca289f*/
return 1; /*0xffca289f*/
}
v14 = 2688 * (unsigned __int8)n2; /*0xffca28a4*/
*(_DWORD *)&v20[v14 + 2276] = *((_DWORD *)v11 + 9); /*0xffca28ad*/
v13[v14 + 2280] = v11[40]; /*0xffca28b7*/
v13[v14 + 2275] = 1; /*0xffca28c0*/
return 0; /*0xffca28be*/
}
}
// Function: DebugLogPrint_13 @ 0xffca29ca (0x4a8 bytes)
// Index: 1256/2560
int __cdecl DebugLogPrint_13(unsigned __int8 *n4, int n4_1, int n6, int n2, int a5, int a6)
{
unsigned __int8 *v6; // ebp
int n0x80_3; // edi
unsigned int n0x80; // eax
unsigned int v9; // ecx
int n2_1; // eax
unsigned __int8 *p_n1145589060; // ebp
int v12; // eax
bool v13; // zf
unsigned int n0x80_1; // edx
unsigned __int8 v16; // [esp+13h] [ebp-2415h]
unsigned int v17; // [esp+14h] [ebp-2414h]
int v18; // [esp+14h] [ebp-2414h]
char v19; // [esp+1Bh] [ebp-240Dh] BYREF
unsigned __int8 *v20; // [esp+1Ch] [ebp-240Ch]
unsigned int v21; // [esp+20h] [ebp-2408h]
unsigned int n0x80_2; // [esp+24h] [ebp-2404h]
int n2_2; // [esp+28h] [ebp-2400h]
_BYTE v24[2408]; // [esp+2Ch] [ebp-23FCh] BYREF
int v25[1632]; // [esp+994h] [ebp-1A94h] BYREF
char v26[276]; // [esp+2314h] [ebp-114h] BYREF
unsigned int n0x968; // [esp+2440h] [ebp+18h]
v17 = 0; /*0xffca29e0*/
v19 = 0; /*0xffca2a09*/
v6 = &n4[50813 * (unsigned __int8)n4_1 + 12557 + 8077 * (unsigned __int8)n6]; /*0xffca2a13*/
v20 = v6; /*0xffca2a19*/
n0x80_3 = a5 & 0x7F; /*0xffca2a1d*/
n0x80_2 = n0x80_3; /*0xffca2a24*/
v21 = a5 - n0x80_3; /*0xffca2a28*/
n0x80 = n0x80_3 + a6; /*0xffca2a33*/
n0x968 = n0x80; /*0xffca2a35*/
if ( n0x80 <= 0x80 ) /*0xffca2a41*/
{
v9 = 0; /*0xffca2a57*/
}
else
{
v9 = n0x80 >> 7; /*0xffca2a45*/
v17 = n0x80 >> 7; /*0xffca2a48*/
if ( (n0x80 & 0x7F) != 0 ) /*0xffca2a4e*/
v17 = ++v9; /*0xffca2a51*/
}
DebugPrint( /*0xffca2a86*/
(int)n4,
2,
n4_1,
n6,
n2,
255,
255,
255,
"ReadCurrentCfgTable->GetPlatformConfigData, partition = %d, OffsetAdjustment = %d, CurCfgOffset = %d, CurCfgSize = %"
"d, Counter = %d, MAX_CUR_CFG_SIZE= %d \n",
0,
a5 & 0x7F,
a5,
n0x80,
v9,
2408);
if ( n0x968 > 0x968 ) /*0xffca2a9a*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "BIOS partition data size exceeded! \n"); /*0xffca2e30*/
KtiFunc1162(n4, 133, 4, n4_1, n6, n2, 255); /*0xffca2e4b*/
v6[2688 * (unsigned __int8)n2 + 2685] = 15; /*0xffca2e5c*/
return 1; /*0xffca2e5c*/
}
if ( a5 + n0x968 > 0x10000 ) /*0xffca2aac*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "BIOS partition data size + start offset exceeded! \n"); /*0xffca2ddf*/
KtiFunc1162(n4, 133, 5, n4_1, n6, n2, 255); /*0xffca2dfa*/
v6[2688 * (unsigned __int8)n2 + 2685] = 13; /*0xffca2e0b*/
return 1; /*0xffca2e66*/
}
v16 = 0; /*0xffca2ab9*/
do /*0xffca2b6d*/
{
DebugPrint( /*0xffca2adf*/
(int)n4,
2,
n4_1,
n6,
n2,
255,
255,
255,
"ReadCurrentCfgTable->GetPlatformConfigData, partition = %d, option = %d, offset = %d\n",
0,
0,
v21);
n2_1 = ProcCommonFuncDB23(n4, n4_1, n6, n2, 0, 0, v21, (int)v25, &v19); /*0xffca2b03*/
n2_2 = n2_1; /*0xffca2b0b*/
if ( n2_1 == 1 ) /*0xffca2b12*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Communication with the NGN DIMM failed\n"); /*0xffca2d8e*/
KtiFunc1162(n4, 15, 2, n4_1, n6, n2, 255); /*0xffca2da6*/
v6[2688 * (unsigned __int8)n2 + 2685] = 3; /*0xffca2db7*/
return 1; /*0xffca2dbf*/
}
if ( n2_1 == 2 || n2_1 == 3 || n2_1 == 4 ) /*0xffca2b2d*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Problem with Media Access\n"); /*0xffca2d3a*/
KtiFunc1162(n4, 132, n2_2, n4_1, n6, n2, 255); /*0xffca2d57*/
v6[2688 * (unsigned __int8)n2 + 2685] = 5; /*0xffca2d68*/
return 1; /*0xffca2d70*/
}
AutoGenFunc8E72((int)&v24[128 * v16], v26, 128); /*0xffca2b4f*/
v21 += 128; /*0xffca2b5b*/
++v16; /*0xffca2b62*/
}
while ( v16 <= v17 ); /*0xffca2b6d*/
p_n1145589060 = &v24[n0x80_2]; /*0xffca2b7b*/
v12 = 2688 * (unsigned __int8)n2; /*0xffca2b82*/
v13 = *(_DWORD *)&v24[n0x80_2] == 1381319491; /*0xffca2b88*/
n0x80_1 = *(_DWORD *)&v24[n0x80_2 + 4]; /*0xffca2b8f*/
n0x80_2 = n0x80_1; /*0xffca2b92*/
if ( !v13 ) /*0xffca2b96*/
{
v20[v12 + 2685] = 7; /*0xffca2b9f*/
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "CCUR signature not found in the NGN DIMM Partition %d\n", 0); /*0xffca2bbb*/
KtiFunc1AC(n4, p_n1145589060, 0x968u); /*0xffca2bc7*/
KtiFunc1162(n4, 133, 1, n4_1, n6, n2, 255); /*0xffca2be2*/
return 1; /*0xffca2bea*/
}
v18 = 2688 * (unsigned __int8)n2; /*0xffca2bf1*/
v20[v12 + 1511] = 1; /*0xffca2bf5*/
if ( MemChipFuncFEB1((char *)p_n1145589060, n0x80_1) ) /*0xffca2bfd*/
{
v20[v18 + 2685] = 11; /*0xffca2c15*/
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Current Configuration Record checksum failure.\n"); /*0xffca2c31*/
KtiFunc1AC(n4, p_n1145589060, 0x968u); /*0xffca2c3d*/
KtiFunc1162(n4, 133, 2, n4_1, n6, n2, 255); /*0xffca2c58*/
return 1; /*0xffca2c58*/
}
if ( p_n1145589060[8] != 2 ) /*0xffca2c69*/
{
v20[v18 + 2685] = 9; /*0xffca2c78*/
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "NVMDIMM Mgmt SW - BIOS interface revision mismatch(CCUR).\n"); /*0xffca2c94*/
KtiFunc1AC(n4, p_n1145589060, 0x968u); /*0xffca2ca0*/
KtiFunc1162(n4, 133, 3, n4_1, n6, n2, 255); /*0xffca2cb5*/
return 1; /*0xffca2cb5*/
}
KtiFunc27((int)n4, n4_1, n6, n2, (int)(p_n1145589060 + 36)); /*0xffca2cc5*/
if ( KtiFunc10D4((int)n4, n4_1, n6, n2, (_WORD *)p_n1145589060 + 28, n0x80_2 - 56, 0) ) /*0xffca2ce2*/
{
v20[v18 + 2685] = 17; /*0xffca2cfd*/
KtiFunc1AC(n4, p_n1145589060, 0x968u); /*0xffca2d05*/
return 1; /*0xffca2d0d*/
}
v20[v18 + 1511] = 1; /*0xffca2d12*/
return 0; /*0xffca2e67*/
}
// Function: DebugLogPrint_3 @ 0xffca2e72 (0x33d bytes)
// Index: 1257/2560
int __cdecl DebugLogPrint_3(unsigned __int8 *n4, int n4_1, int n6, int n2)
{
unsigned __int8 *v4; // ebp
int v5; // eax
int n2_1; // eax
int n2_3; // eax
char v8; // [esp+13h] [ebp-1AA1h] BYREF
unsigned __int8 *v9; // [esp+14h] [ebp-1AA0h]
int v10; // [esp+18h] [ebp-1A9Ch]
int n2_2; // [esp+1Ch] [ebp-1A98h]
int v12[1632]; // [esp+20h] [ebp-1A94h] BYREF
char p_n1145589060[4]; // [esp+19A0h] [ebp-114h] BYREF
unsigned int n0x80; // [esp+19A4h] [ebp-110h]
char v15; // [esp+19A8h] [ebp-10Ch]
int v16; // [esp+19CCh] [ebp-E8h]
int v17; // [esp+19D0h] [ebp-E4h]
int v18; // [esp+19D4h] [ebp-E0h]
int v19; // [esp+19D8h] [ebp-DCh]
v8 = 0; /*0xffca2eae*/
v4 = &n4[50813 * (unsigned __int8)n4_1 + 12557 + 8077 * (unsigned __int8)n6]; /*0xffca2eba*/
v5 = 2688 * (unsigned __int8)n2; /*0xffca2ebf*/
v9 = v4; /*0xffca2ecc*/
v10 = v5; /*0xffca2ed0*/
v4[v5 + 1891] = 0; /*0xffca2ed4*/
v4[v5 + 2275] = 0; /*0xffca2edc*/
DebugPrint( /*0xffca2ef2*/
(int)n4,
2,
n4_1,
n6,
n2,
255,
255,
255,
"ReadOSPartition->GetPlatformConfigData, partition = %d, option = %d, offset = %d\n",
1,
0,
0);
n2_1 = ProcCommonFuncDB23(n4, n4_1, n6, n2, 1u, 0, 0, (int)v12, &v8); /*0xffca2f19*/
n2_2 = n2_1; /*0xffca2f21*/
if ( n2_1 == 1 ) /*0xffca2f28*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Communication with the NGN DIMM failed\n"); /*0xffca2f3d*/
KtiFunc1162(n4, 15, 2, n4_1, n6, n2, 255); /*0xffca2f4f*/
KtiFunc8B24(n4, n4_1, n6, n2); /*0xffca2f5b*/
v9[v10 + 2686] = 3; /*0xffca2f6b*/
return 1; /*0xffca31a3*/
}
if ( n2_1 == 2 || n2_1 == 3 || n2_1 == 4 ) /*0xffca2f8f*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "Problem with Media Access\n"); /*0xffca3171*/
KtiFunc1162(n4, 132, n2_2, n4_1, n6, n2, 255); /*0xffca3189*/
v9[v10 + 2686] = 5; /*0xffca3199*/
return 1; /*0xffca3199*/
}
if ( *(_DWORD *)p_n1145589060 != 1145589060 ) /*0xffca2fa0*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "DMHD signature not found in the NGN DIMM Partition %d\n", 1); /*0xffca2fb6*/
KtiFunc1AC(n4, (unsigned __int8 *)p_n1145589060, 0x80u); /*0xffca2fc9*/
v9[v10 + 2686] = 7; /*0xffca2fdb*/
return 0; /*0xffca2fe3*/
}
if ( v15 != 1 ) /*0xffca2ff0*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "NVMDIMM Mgmt SW - BIOS interface revision mismatch(DMHD).\n"); /*0xffca3004*/
KtiFunc1AC(n4, (unsigned __int8 *)p_n1145589060, 0x80u); /*0xffca3017*/
KtiFunc1162(n4, 137, 2, n4_1, n6, n2, 255); /*0xffca302c*/
v9[v10 + 2686] = 9; /*0xffca303c*/
return 1; /*0xffca3044*/
}
if ( n0x80 > 0x80 ) /*0xffca3054*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "OS Partition length invalid\n"); /*0xffca3068*/
KtiFunc1AC(n4, (unsigned __int8 *)p_n1145589060, 0x80u); /*0xffca307b*/
v9[v10 + 2686] = 15; /*0xffca308b*/
return 1; /*0xffca3093*/
}
if ( MemChipFuncFEB1(p_n1145589060, n0x80) ) /*0xffca30a7*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2, 255, 255, 255, "OS Partition DMHD checksum failure.\n"); /*0xffca30c5*/
KtiFunc1AC(n4, (unsigned __int8 *)p_n1145589060, 0x80u); /*0xffca30d8*/
KtiFunc1162(n4, 137, 1, n4_1, n6, n2, 255); /*0xffca30ed*/
v9[v10 + 2686] = 11; /*0xffca30fd*/
return 1; /*0xffca3105*/
}
if ( v16 ) /*0xffca3112*/
{
n2_3 = DebugLogPrint_14(n4, n4_1, n6, n2, v17, v16); /*0xffca3126*/
if ( n2_3 == 1 ) /*0xffca3131*/
return 1; /*0xffca3131*/
}
else
{
n2_3 = n2_2; /*0xffca3135*/
}
if ( v18 ) /*0xffca3141*/
return DebugLogPrint_16(n4, n4_1, n6, n2, v19, v18); /*0xffca3155*/
return n2_3; /*0xffca31a4*/
}
// Function: DebugLogPrint_5 @ 0xffca31af (0x1f8 bytes)
// Index: 1258/2560
int __cdecl DebugLogPrint_5(unsigned __int8 *n4, _BYTE *n4_1)
{
int SocketInfo; // eax
unsigned __int8 n2_3; // dl
unsigned __int8 *v4; // ecx
int n2_1; // ebx
int CpuCount; // edx
unsigned __int8 v7; // cl
unsigned __int8 *v8; // eax
int v9; // ecx
int n2_2; // ebp
char v12; // [esp+12h] [ebp-22h] BYREF
char v13; // [esp+13h] [ebp-21h] BYREF
unsigned __int8 *v14; // [esp+14h] [ebp-20h]
int CpuCount_1; // [esp+18h] [ebp-1Ch]
int n2; // [esp+1Ch] [ebp-18h]
int n2_4; // [esp+20h] [ebp-14h]
int v18; // [esp+24h] [ebp-10h] BYREF
unsigned __int8 buf_[4]; // [esp+28h] [ebp-Ch] BYREF
int v20; // [esp+2Ch] [ebp-8h]
int v21; // [esp+30h] [ebp-4h] BYREF
v12 = 0; /*0xffca31c0*/
SocketInfo = GetSocketInfo((int)n4, (unsigned __int8)n4_1); /*0xffca31c5*/
n2_3 = 0; /*0xffca31cc*/
v4 = (unsigned __int8 *)(SocketInfo + 3); /*0xffca31ce*/
LOBYTE(n2) = 0; /*0xffca31d1*/
v14 = (unsigned __int8 *)(SocketInfo + 3); /*0xffca31d5*/
do /*0xffca3397*/
{
if ( *(v4 - 3) ) /*0xffca31d9*/
{
n2_1 = n2; /*0xffca31e3*/
CpuCount = GetCpuCount((int)n4, (unsigned __int8)n4_1, n2); /*0xffca31ef*/
v7 = 0; /*0xffca31f1*/
v8 = v14; /*0xffca31f3*/
CpuCount_1 = CpuCount; /*0xffca31fa*/
LOBYTE(n2_4) = 0; /*0xffca31fe*/
if ( *v14 ) /*0xffca3202*/
{
while ( 1 ) /*0xffca320d*/
{
v9 = 1379 * v7; /*0xffca320d*/
v20 = v9; /*0xffca3213*/
if ( !*(_BYTE *)(v9 + CpuCount) || !*(_BYTE *)(v9 + CpuCount + 107) ) /*0xffca3221*/
goto LABEL_18; /*0xffca3226*/
n2_2 = n2_4; /*0xffca322c*/
ProcCommonFuncE302((int)n4, (int)n4_1, n2_1, n2_4, &v18, &v21); /*0xffca323e*/
if ( (v18 & 0x30000) != 0x10000 || (v18 & 0x1000000) != 0 ) /*0xffca3262*/
break; /*0xffca3262*/
CpuCount = CpuCount_1; /*0xffca326c*/
if ( (*(_BYTE *)(v20 + CpuCount_1 + 1350) & 8) != 0 ) /*0xffca3278*/
{
if ( ProcCommonFuncD7B0(n4, (int)n4_1, n2_1, n2_2, buf_, &v13, &v12) == 1 ) /*0xffca329c*/
goto LABEL_10; /*0xffca329c*/
if ( v13 ) /*0xffca32e1*/
{
buf_[0] = n4[226]; /*0xffca3306*/
if ( ProcCommonFuncEADA(n4, (int)n4_1, n2_1, n2_2, buf_[0], &v12) == 1 ) /*0xffca3322*/
{
LABEL_10:
DebugPrint((int)n4, 3, (int)n4_1, n2_1, n2_2, 255, 255, 255, "Communication with the NGN DIMM failed\n"); /*0xffca329e*/
KtiFunc1162(n4, 15, 2, (int)n4_1, n2_1, n2_2, 255); /*0xffca32c3*/
KtiFunc8B24(n4, (int)n4_1, n2_1, n2_2); /*0xffca32cf*/
}
}
else
{
DebugPrint((int)n4, 3, (int)n4_1, n2_1, n2_2, 255, 255, 255, "DieSparing not supported\n"); /*0xffca32f6*/
}
LABEL_16:
CpuCount = CpuCount_1; /*0xffca3362*/
}
v8 = v14; /*0xffca3366*/
LABEL_18:
v7 = n2_4 + 1; /*0xffca336a*/
LOBYTE(n2_4) = v7; /*0xffca3370*/
if ( v7 >= *v8 ) /*0xffca3376*/
goto LABEL_19; /*0xffca3376*/
}
ProcCommonFuncEF57((int)n4, (int)n4_1, n2_1, n2_2); /*0xffca332d*/
DebugPrint( /*0xffca3345*/
(int)n4,
3,
(int)n4_1,
n2_1,
n2_2,
255,
255,
255,
"DIMM Media Disabled! Skip Die Sparing Policy setting\n");
KtiFunc1162(n4, 132, 3, (int)n4_1, n2_1, n2_2, 255); /*0xffca335a*/
goto LABEL_16; /*0xffca335a*/
}
LABEL_19:
n2_3 = n2; /*0xffca337c*/
v4 = v14; /*0xffca3380*/
}
++n2_3; /*0xffca3384*/
v4 += 7688; /*0xffca3386*/
LOBYTE(n2) = n2_3; /*0xffca338c*/
v14 = v4; /*0xffca3390*/
}
while ( n2_3 < 6u ); /*0xffca3397*/
return 0; /*0xffca339d*/
}
// Function: KtiFn_FFCA33A7 @ 0xffca33a7 (0x68c bytes)
// Index: 1259/2560
void __cdecl KtiFn_FFCA33A7(int n4)
{
int n4_1; // ebx
unsigned __int8 n4a_1; // al
int v3; // edx
int v4; // esi
_BYTE *v5; // ecx
unsigned __int8 n6_2; // cl
unsigned __int8 *v7; // ebp
int v8; // edi
unsigned __int8 v9; // al
int v10; // esi
int n6_1; // ebp
int v12; // edi
bool v13; // zf
unsigned __int8 n2_5; // cl
int v15; // eax
__int16 v16; // ax
__int16 v17; // ax
__int16 v18; // ax
int v19; // edx
int v20; // ebp
int v21; // edx
unsigned __int8 v22; // bl
int v23; // ecx
char v24; // al
unsigned __int8 n2_3; // cl
int v26; // eax
__int16 v27; // ax
__int16 v28; // ax
unsigned __int8 n2_4; // [esp+8h] [ebp-38h]
unsigned __int8 n2_1; // [esp+8h] [ebp-38h]
unsigned __int8 n2_2; // [esp+8h] [ebp-38h]
int n2; // [esp+Ch] [ebp-34h]
int n4a; // [esp+10h] [ebp-30h]
int v34; // [esp+14h] [ebp-2Ch]
unsigned __int8 n6[4]; // [esp+1Ch] [ebp-24h]
int v36; // [esp+20h] [ebp-20h]
int v37; // [esp+24h] [ebp-1Ch]
int ... [12644 chars total]
// Function: DebugLogPrint_8 @ 0xffca3a33 (0xf7 bytes)
// Index: 1260/2560
int __cdecl DebugLogPrint_8(int n4, int n4a, int n6, int n2)
{
int v4; // ebx
int v5; // esi
int v6; // edi
__int16 v7; // ax
int n2_1; // ecx
_BYTE *v9; // eax
int v11; // [esp+10h] [ebp-4h]
v11 = 8077 * (unsigned __int8)n6; /*0xffca3a6a*/
v4 = n4 + 50813 * (unsigned __int8)n4a; /*0xffca3a76*/
v5 = v4 + v11 + 12557; /*0xffca3a85*/
v6 = 2688 * (unsigned __int8)n2; /*0xffca3a8d*/
*(_WORD *)(v6 + v5 + 1511) = 257; /*0xffca3a97*/
DebugPrint(n4, 2, n4a, n6, n2, 255, 255, 255, "UpdateCfgCurForNewDimm: Setting default CCUR for new DIMM\n");
if ( *(_BYTE *)(n4 + 244313) ) /*0xffca3aa9*/
v7 = *(_WORD *)(1379 * (unsigned __int8)n2 + 48704 * (unsigned __int8)n4a + n4 + 7688 * (unsigned __int8)n6 + 260447) /*0xffca3ade*/
- *(_WORD *)(v11 + v4 + 10257);
else
v7 = 0; /*0xffca3ab2*/
*(_WORD *)(v6 + v5 + 1515) = v7; /*0xffca3ae6*/
*(_WORD *)(v6 + v5 + 1517) = 0; /*0xffca3af2*/
*(_WORD *)(v6 + v5 + 1513) = 5; /*0xffca3afd*/
n2_1 = 2; /*0xffca3b0b*/
v9 = (_BYTE *)(v5 + v6 + 2303); /*0xffca3b0d*/
do /*0xffca3b24*/
{
if ( *(v9 - 784) ) /*0xffca3b12*/
*v9 = 2; /*0xffca3b1b*/
v9 += 18; /*0xffca3b1e*/
--n2_1; /*0xffca3b21*/
}
while ( n2_1 ); /*0xffca3b24*/
return 0; /*0xffca3b0c*/
}
// Function: KtiFn_FFCA3B2A @ 0xffca3b2a (0x22c bytes)
// Index: 1261/2560
void __cdecl KtiFn_FFCA3B2A(int n4)
{
int n4a_1; // ecx
unsigned __int8 n4_2; // al
_BYTE *v4; // edx
int v5; // esi
unsigned __int8 n6_1; // dl
int v7; // eax
unsigned __int8 *v8; // ebp
int v9; // edi
unsigned __int8 v10; // al
int n4a_2; // edx
int v12; // esi
char v13; // al
char v14; // cl
__int16 v15; // ax
unsigned __int8 n2_1; // al
_BYTE *v17; // ebp
unsigned __int8 n2; // [esp+4h] [ebp-24h]
int v19; // [esp+8h] [ebp-20h]
int n6; // [esp+Ch] [ebp-1Ch]
int n4_1; // [esp+10h] [ebp-18h]
int v22; // [esp+14h] [ebp-14h]
unsigned __int8 *v23; // [esp+18h] [ebp-10h]
_BYTE *v24; // [esp+1Ch] [ebp-Ch]
int n4a_3; // [esp+20h] [ebp-8h]
int v26; // [esp+24h] [ebp-4h]
int n4a; // [esp+2Ch] [ebp+4h]
n4a_1 = n4 + 257308; /*0xffca3b39*/
n4a_3 = n4 + 257308; /*0xffca3b3f*/
if ( !*(_BYTE *)(n4 + 10186) )
{
n4_2 = 0; /*0xffca3b4b*/
v4 = (_BYTE *)(n4 + 258689); /*0xffca3b4d*/
v5 = 0; /*0xffca3b53*/
LOBYTE(n4_1) = 0; /*0xffca3b55*/
v26 = 0; /*0xffca3b5a*/
v24 = (_BYTE *)(n4 + 258689); /*0xffca3b5e*/
do
{
if ( *v4 )
{
n6_1 = 0; /*0xffca3b6b*/
n4a = n4a_1; /*0xffca3b6d*/
v7 = 0; /*0xffca3b71*/
LOBYTE(n6) = 0; /*0xffca3b73*/
v8 = (unsigned __int8 *)(n4a_1 + 1417); /*0xffca3b77*/
v22 = 0; /*0xffca3b7d*/
v23 = (unsigned __int8 *)(n4a_1 + 1417); /*0xffca3b81*/
do
{
if ( *(v8 - 3) )
{
v9 = v5 + v7 + n4 + 12557; /*0xffca3b97*/
v10 = 0; /*0xffca3b99*/
LOBYTE(v19) = 0; /*0xffca3b9b*/
if ( *v8 )
{
n4a_2 = n4a; /*0xffca3ba8*/
do
{
if ( *(_BYTE *)(1379 * v10 + n4a_2 + 1917) )
{
v12 = 2688 * v10; /*0xffca3bc3*/
if ( *(_BYTE *)(v12 + v9 + 1891) )
{
if ( *(_BYTE *)(v12 + v9 + 2275) && *(_DWORD *)(v12 + v9 + 2276) == *(_DWORD *)(v12 + v9 + 1893) )
{
DebugPrint(
n4,
2,
n4_1,
n6,
v19,
255,
255,
255,
"UpdateCfgOutAfterMemmap: Valid Cout found, ignoring CIN\n");
}
else
{
v13 = *(_BYTE *)(v12 + v9 + 1897); /*0xffca3c1a*/
*(_BYTE *)(v12 + v9 + 2275) = 1; /*0xffca3c24*/
if ( v13 ) /*0xffca3c2d*/
{
v14 = *(_BYTE *)(v12 + v9 + 1898); /*0xffca3c2f*/
*(_BYTE *)(v12 + v9 + 2281) = v13; /*0xffca3c36*/
v15 = *(_WORD *)(v12 + v9 + 1899); /*0xffca3c3d*/
*(_BYTE *)(v12 + v9 + 2282) = v14; /*0xffca3c45*/
*(_WORD *)(v12 + v9 + 2283) = v15; /*0xffca3c4c*/
if ( !v14 || *(_WORD *)(v12 + v9 + 2285) != 1 ) /*0xffca3c60*/
*(_BYTE *)(v12 + v9 + 2280) = 2; /*0xffca3c62*/
}
n2_1 = 0; /*0xffca3c6a*/
n2 = 0; /*0xffca3c72*/
v17 = (_BYTE *)(v12 + v9 + 1904); /*0xffca3c76*/
do /*0xffca3cbd*/
{
if ( *(v17 - 1) ) /*0xffca3c78*/
{
KtiFunc8D(n4, n4_1, n6, v19, n2); /*0xffca3c8f*/
if ( !*v17 || v17[399] != 1 ) /*0xffca3ca4*/
*(_BYTE *)(v12 + v9 + 2280) = 2; /*0xffca3ca6*/
n2_1 = n2; /*0xffca3cae*/
}
++n2_1; /*0xffca3cb2*/
v17 += 18; /*0xffca3cb4*/
n2 = n2_1; /*0xffca3cb7*/
}
while ( n2_1 < 2u ); /*0xffca3cbd*/
v8 = v23; /*0xffca3cbf*/
}
n4a_2 = n4a; /*0xffca3cc3*/
}
}
v10 = v19 + 1; /*0xffca3ccb*/
LOBYTE(v19) = v10; /*0xffca3ccd*/
}
while ( v10 < *v8 );
n6_1 = n6; /*0xffca3cda*/
v5 = v26; /*0xffca3cde*/
n4a_1 = n4a; /*0xffca3ce2*/
}
v7 = v22; /*0xffca3ce6*/
}
++n6_1; /*0xffca3cea*/
v7 += 8077; /*0xffca3cec*/
n4a_1 += 7688; /*0xffca3cf1*/
LOBYTE(n6) = n6_1; /*0xffca3cf7*/
v8 += 7688; /*0xffca3cfb*/
v22 = v7; /*0xffca3d01*/
n4a = n4a_1; /*0xffca3d05*/
v23 = v8; /*0xffca3d09*/
}
while ( n6_1 < 6u );
n4_2 = n4_1; /*0xffca3d16*/
n4a_1 = n4a_3; /*0xffca3d1a*/
v4 = v24; /*0xffca3d1e*/
}
++n4_2; /*0xffca3d22*/
v4 += 48704; /*0xffca3d24*/
n4a_1 += 48704; /*0xffca3d2a*/
LOBYTE(n4_1) = n4_2; /*0xffca3d30*/
v5 += 50813; /*0xffca3d34*/
v24 = v4; /*0xffca3d3a*/
n4a_3 = n4a_1; /*0xffca3d3e*/
v26 = v5; /*0xffca3d42*/
}
while ( n4_2 < 4u );
}
}
// Function: KtiFn_FFCA3D56 @ 0xffca3d56 (0x113 bytes)
// Index: 1262/2560
int __cdecl KtiFn_FFCA3D56(
int n4,
unsigned __int8 a2,
unsigned __int8 n6,
unsigned __int8 n2,
int a5,
char n2a,
unsigned __int8 a7)
{
int v7; // ebp
int v8; // esi
int v9; // ebx
int v10; // eax
int v11; // esi
int v12; // ecx
int v13; // esi
_WORD *v14; // esi
unsigned int v15; // ecx
unsigned int v16; // eax
unsigned __int8 v18; // [esp+14h] [ebp+8h]
v7 = 8077 * n6 + n4 + 50813 * a2 + 12557; /*0xffca3d91*/
v8 = 168 * (a7 + 16 * n2); /*0xffca3d99*/
v9 = a5 + 24; /*0xffca3d9f*/
if ( n2a ) /*0xffca3da4*/
{
if ( n2a == 1 ) /*0xffca3db8*/
{
v10 = 18 * a7 + 1903; /*0xffca3dbd*/
v11 = v8 + 1939; /*0xffca3dc2*/
}
else
{
v10 = 18 * a7 + 2287; /*0xffca3dcd*/
v11 = v8 + 2323; /*0xffca3dd2*/
}
}
else
{
v10 = 18 * a7 + 1519; /*0xffca3da9*/
v11 = v8 + 1555; /*0xffca3dae*/
}
v18 = 0; /*0xffca3dda*/
v12 = v10 + v7 + 2688 * n2; /*0xffca3ddf*/
v13 = v7 + v11; /*0xffca3de1*/
*(_BYTE *)v12 = 1; /*0xffca3de3*/
*(_WORD *)(v12 + 7) = *(_WORD *)(a5 + 4); /*0xffca3dea*/
*(_BYTE *)(v12 + 9) = *(_BYTE *)(a5 + 6); /*0xffca3df1*/
*(_BYTE *)(v12 + 10) = *(_BYTE *)(a5 + 7); /*0xffca3df7*/
*(_DWORD *)(v12 + 11) = *(_DWORD *)(a5 + 8); /*0xffca3dfd*/
*(_BYTE *)(v12 + 15) = *(_BYTE *)(a5 + 12); /*0xffca3e03*/
*(_BYTE *)(v12 + 16) = *(_BYTE *)(a5 + 13); /*0xffca3e09*/
*(_BYTE *)(v12 + 17) = *(_BYTE *)(a5 + 14); /*0xffca3e0f*/
if ( *(_BYTE *)(a5 + 6) ) /*0xffca3e12*/
{
v14 = (_WORD *)(v13 + 5); /*0xffca3e18*/
do /*0xffca3e60*/
{
KtiFunc2E3(n4, (int)v14 - 5, (unsigned __int16 *)v9); /*0xffca3e24*/
*(v14 - 1) = *(_QWORD *)(v9 + 32) >> 26; /*0xffca3e39*/
v15 = *(_DWORD *)(v9 + 40); /*0xffca3e3d*/
v16 = *(_DWORD *)(v9 + 44); /*0xffca3e40*/
v9 += 48; /*0xffca3e43*/
*v14 = __PAIR64__(v16, v15) >> 26; /*0xffca3e53*/
v14 = (_WORD *)((char *)v14 + 7); /*0xffca3e56*/
++v18; /*0xffca3e59*/
}
while ( v18 < *(_BYTE *)(a5 + 6) ); /*0xffca3e60*/
}
return 0; /*0xffca3e63*/
}
// Function: KtiFunc3E69 @ 0xffca3e69 (0x7f bytes)
// Index: 1263/2560
int __cdecl KtiFunc3E69(int n4, unsigned __int8 a2, unsigned __int8 n6, unsigned __int8 n2, int a5, char n2a)
{
int v6; // esi
int v7; // edx
int v8; // edx
v6 = 8077 * n6 + n4 + 50813 * a2; /*0xffca3e88*/
if ( n2a == 1 ) /*0xffca3e8f*/
{
v7 = 2688 * n2; /*0xffca3e95*/
*(_BYTE *)(v7 + v6 + 14454) = 1; /*0xffca3e9b*/
*(_WORD *)(v7 + v6 + 14456) = *(_QWORD *)(a5 + 8) >> 26; /*0xffca3ead*/
}
else if ( n2a == 2 ) /*0xffca3eb9*/
{
v8 = 2688 * n2; /*0xffca3ebf*/
*(_BYTE *)(v8 + v6 + 14838) = 1; /*0xffca3ec5*/
*(_WORD *)(v8 + v6 + 14840) = *(_QWORD *)(a5 + 8) >> 26; /*0xffca3ed7*/
}
return 0; /*0xffca3ee2*/
}
// Function: KtiFunc3EE8 @ 0xffca3ee8 (0x22a bytes)
// Index: 1264/2560
int __cdecl KtiFunc3EE8(
_BYTE *__return_address,
int a2,
unsigned __int8 n6,
int a4,
_BYTE *a5,
unsigned __int8 *a6,
int a7,
char a8,
unsigned __int8 n255)
{
unsigned __int8 *v9; // ebp
char v10; // bl
unsigned __int8 v11; // al
unsigned __int8 n2; // cl
unsigned __int8 v13; // dl
unsigned __int8 v14; // ch
int v15; // ebx
int v16; // esi
int v17; // edi
int n2_1; // edx
_BYTE *v19; // ecx
int v20; // eax
_BYTE *__return_address_1; // ebx
_BYTE *v22; // edi
_BYTE *v23; // esi
int v24; // ebx
int v25; // esi
int v26; // edi
int n2_2; // edx
unsigned __int8 *v28; // esi
int v29; // esi
unsigned __int8 n2_3; // [esp+13h] [ebp-11h]
unsigned __int8 v32; // [esp+14h] [ebp-10h]
unsigned __int8 v33; // [esp+15h] [ebp-Fh]
unsigned __int8 v34; // [esp+16h] [ebp-Eh]
unsigned __int8 n6_2; // [esp+17h] [ebp-Dh]
int v36; // [esp+18h] [ebp-Ch]
_BYTE *v37; // [esp+1Ch] [ebp-8h]
unsigned __int8 n6_1; // [esp+20h] [ebp-4h]
v36 = 0; /*0xffca3eef*/
v9 = a6; /*0xffca3ef9*/
n6_1 = a5[9]; /*0xffca3efd*/
n6_2 = 0; /*0xffca3f01*/
if ( n6_1 ) /*0xffca3f0a*/
{
v10 = a8; /*0xffca3f10*/
do /*0xffca4102*/
{
v11 = *v9; /*0xffca3f14*/
n2 = 0; /*0xffca3f17*/
v13 = v9[1]; /*0xffca3f19*/
v14 = v9[2]; /*0xffca3f1c*/
v32 = *v9; /*0xffca3f1f*/
v33 = v13; /*0xffca3f23*/
v34 = v14; /*0xffca3f27*/
n2_3 = 0; /*0xffca3f2b*/
do /*0xffca409a*/
{
if ( v10 == 1 ) /*0xffca3f32*/
{
v15 = 50813 * v11; /*0xffca3f37*/
v16 = v14; /*0xffca3f3d*/
v17 = 8077 * v13; /*0xffca3f43*/
n2_1 = n2; /*0xffca3f49*/
v19 = &__return_address[2688 * v14 + 14460 + 18 * n2 + v15 + v17]; /*0xffca3f69*/
v20 = v15 + v17 + 168 * (n2_1 + 16 * v16); /*0xffca3f73*/
__return_address_1 = __return_address; /*0xffca3f75*/
v22 = __return_address + 9400; /*0xffca3f79*/
v23 = __return_address + 14496; /*0xffca3f7f*/
}
else
{
if ( v10 ) /*0xffca3f89*/
return 1; /*0xffca3f89*/
v24 = 50813 * v11; /*0xffca3f92*/
v25 = v14; /*0xffca3f98*/
v26 = 8077 * v13; /*0xffca3f9e*/
n2_2 = n2; /*0xffca3fa4*/
v19 = &__return_address[2688 * v14 + 14076 + 18 * n2 + v24 + v26]; /*0xffca3fc4*/
v20 = v24 + v26 + 168 * (n2_2 + 16 * v25); /*0xffca3fce*/
__return_address_1 = __return_address; /*0xffca3fd0*/
v22 = __return_address + 9400; /*0xffca3fd4*/
v23 = __return_address + 14112; /*0xffca3fda*/
}
v28 = &v23[v20]; /*0xffca3fe4*/
v37 = v19; /*0xffca3fe9*/
if ( v19[9] == a5[9] || v19[10] == a5[10] ) /*0xffca3ff8*/
{
v29 = MemChipFuncFF5F((int)__return_address_1, (int)a6, v28, n6_1); /*0xffca4009*/
v36 = v29; /*0xffca400e*/
if ( !v29 ) /*0xffca4014*/
{
n2 = n2_3; /*0xffca4016*/
goto LABEL_12; /*0xffca4016*/
}
}
else
{
v29 = v36; /*0xffca4079*/
}
v10 = a8; /*0xffca4081*/
n2 = n2_3 + 1; /*0xffca4085*/
v11 = v32; /*0xffca4087*/
v13 = v33; /*0xffca408b*/
v14 = v34; /*0xffca408f*/
n2_3 = n2; /*0xffca4093*/
}
while ( n2 < 2u ); /*0xffca409a*/
if ( v29 ) /*0xffca40a2*/
return 1; /*0xffca40a2*/
LABEL_12:
v37[2] = 1; /*0xffca401a*/
*(_DWORD *)(v37 + 3) = a7; /*0xffca4026*/
if ( n2 >= 2u ) /*0xffca402c*/
return 1; /*0xffca40ab*/
v10 = a8; /*0xffca402e*/
if ( a8 == 1 ) /*0xffca4035*/
{
v22[50813 * v32 + 5460 + 8077 * v33 + 2688 * v34 + 18 * n2_3] = KtiFunc246(n255); /*0xffca4070*/
}
else if ( !a8 ) /*0xffca40af*/
{
v22[50813 * v32 + 4692 + 8077 * v33 + 2688 * v34 + 18 * n2_3] = KtiFunc246(n255); /*0xffca40ea*/
}
v9 += 7; /*0xffca40f5*/
++n6_2; /*0xffca40fa*/
}
while ( n6_2 < n6_1 ); /*0xffca4102*/
}
return 0; /*0xffca410a*/
}
// Function: KtiFunc4112 @ 0xffca4112 (0x260 bytes)
// Index: 1265/2560
int __cdecl KtiFunc4112(int n4, int a2)
{
int n4_1; // ebx
unsigned __int8 n4_2; // al
int v4; // edi
int v5; // edx
int v6; // esi
_BYTE *v7; // ecx
unsigned __int8 n6; // cl
int v9; // eax
int v10; // edi
unsigned __int8 *v11; // ebp
int v12; // esi
unsigned __int8 v13; // al
int v14; // edi
_BYTE *v15; // eax
int n2; // ecx
bool v17; // zf
unsigned __int8 n2_1; // al
int v19; // ebx
unsigned __int8 n2_2; // [esp+13h] [ebp-29h]
int v22; // [esp+14h] [ebp-28h]
int n6_1; // [esp+18h] [ebp-24h]
int v24; // [esp+1Ch] [ebp-20h]
int n4_3; // [esp+20h] [ebp-1Ch]
int v26; // [esp+24h] [ebp-18h]
int v27; // [esp+28h] [ebp-14h]
int v28; // [esp+2Ch] [ebp-10h]
int v29; // [esp+30h] [ebp-Ch]
_BYTE *v30; // [esp+34h] [ebp-8h]
int v31; // [esp+38h] [ebp-4h]
n4_1 = n4; /*0xffca4116*/
n4_2 = 0; /*0xffca411a*/
v4 = 0; /*0xffca411f*/
LOBYTE(n4_3) = 0; /*0xffca4121*/
v5 = n4 + 257308; /*0xffca4125*/
v27 = 0; /*0xffca412b*/
v6 = 0; /*0xffca412f*/
v31 = n4 + 257308; /*0xffca4131*/
v7 = (_BYTE *)(n4 + 258689); /*0xffca4135*/
v26 = 0; /*0xffca413b*/
v30 = (_BYTE *)(n4 + 258689); /*0xffca413f*/
do
{
if ( *v7 )
{
n6 = 0; /*0xffca414c*/
v29 = v5; /*0xffca414e*/
v9 = 0; /*0xffca4152*/
LOBYTE(n6_1) = 0; /*0xffca4154*/
v10 = 0; /*0xffca4158*/
v24 = 0; /*0xffca415a*/
v28 = 0; /*0xffca415e*/
v11 = (unsigned __int8 *)(v5 + 1417); /*0xffca4162*/
do
{
if ( *(v11 - 3) )
{
v12 = v6 + v10 + n4_1 + 12557; /*0xffca417b*/
v13 = 0; /*0xffca417d*/
LOBYTE(v22) = 0; /*0xffca417f*/
if ( *v11 )
{
do
{
if ( *(_BYTE *)(1379 * v13 + v5 + 1917) )
{
v14 = 2688 * v13; /*0xffca41a3*/
if ( *(_BYTE *)(v14 + v12 + 2659) != 1 )
{
if ( *(_BYTE *)(v13 + 2 * (v24 + v27) + a2 + 10) )
{
DebugPrint(
n4_1,
2,
n4_3,
n6_1,
v22,
255,
255,
255,
"UpdateRequestforDegradedMemoryMapping: DIMM Unmapped (SKU Limit Violation)\n");
*(_WORD *)(v14 + v12 + 1513) = 7; /*0xffca41f4*/
v15 = (_BYTE *)(v14 + v12 + 1535); /*0xffca4204*/
n2 = 2; /*0xffca4206*/
do /*0xffca4216*/
{
if ( *(v15 - 16) ) /*0xffca4207*/
*v15 = 2; /*0xffca420d*/
v15 += 18; /*0xffca4210*/
--n2; /*0xffca4213*/
}
while ( n2 ); /*0xffca4216*/
}
else
{
DebugPrint(
n4_1,
2,
n4_3,
n6_1,
v22,
255,
255,
255,
"UpdateRequestforDegradedMemoryMapping: CCUR used\n");
*(_WORD *)(v14 + v12 + 1513) = 6; /*0xffca423f*/
}
v17 = *(_BYTE *)(v14 + v12 + 1891) == 0; /*0xffca4247*/
*(_WORD *)(v14 + v12 + 1513) = 6; /*0xffca424f*/
if ( !v17 && *(_BYTE *)(v14 + v12 + 1897) && *(_BYTE *)(v14 + v12 + 1898) ) /*0xffca4263*/
*(_WORD *)(v14 + v12 + 2285) = KtiFunc2A5(5); /*0xffca4275*/
n2_1 = 0; /*0xffca427d*/
n2_2 = 0; /*0xffca427f*/
do /*0xffca42c2*/
{
v19 = v14 + 18 * n2_1; /*0xffca4289*/
if ( !*(_BYTE *)(v19 + v12 + 1903) ) /*0xffca428b*/
break; /*0xffca4293*/
if ( !*(_BYTE *)(v19 + v12 + 1904) ) /*0xffca4295*/
break; /*0xffca429d*/
*(_BYTE *)(v19 + v12 + 1904) = 0; /*0xffca42a1*/
*(_BYTE *)(v19 + v12 + 2303) = KtiFunc246(5u); /*0xffca42ae*/
n2_1 = n2_2 + 1; /*0xffca42b9*/
n2_2 = n2_1; /*0xffca42bb*/
}
while ( n2_1 < 2u ); /*0xffca42c2*/
n4_1 = n4; /*0xffca42c4*/
v5 = v29; /*0xffca42c8*/
*(_BYTE *)(v14 + v12 + 2280) = 2; /*0xffca42cc*/
}
}
v13 = v22 + 1; /*0xffca42d8*/
LOBYTE(v22) = v13; /*0xffca42da*/
}
while ( v13 < *v11 );
n6 = n6_1; /*0xffca42e7*/
v10 = v28; /*0xffca42eb*/
}
v9 = v24; /*0xffca42ef*/
v6 = v26; /*0xffca42f3*/
}
++n6; /*0xffca42f7*/
v10 += 8077; /*0xffca42f9*/
++v9; /*0xffca42ff*/
LOBYTE(n6_1) = n6; /*0xffca4300*/
v5 += 7688; /*0xffca4304*/
v24 = v9; /*0xffca430a*/
v11 += 7688; /*0xffca430e*/
v28 = v10; /*0xffca4314*/
v29 = v5; /*0xffca4318*/
}
while ( n6 < 6u );
n4_2 = n4_3; /*0xffca4325*/
v5 = v31; /*0xffca4329*/
v7 = v30; /*0xffca432d*/
v4 = v27; /*0xffca4331*/
}
++n4_2; /*0xffca4335*/
v7 += 48704; /*0xffca4337*/
v5 += 48704; /*0xffca433d*/
LOBYTE(n4_3) = n4_2; /*0xffca4343*/
v6 += 50813; /*0xffca4347*/
v30 = v7; /*0xffca434d*/
v4 += 12; /*0xffca4351*/
v31 = v5; /*0xffca4354*/
v26 = v6; /*0xffca4358*/
v27 = v4; /*0xffca435c*/
}
while ( n4_2 < 4u );
return 0; /*0xffca4368*/
}
// Function: KtiFunc4372 @ 0xffca4372 (0x336 bytes)
// Index: 1266/2560
BOOL __cdecl KtiFunc4372(unsigned __int8 *n4, int n4_1, int n6, int n2, unsigned __int8 a5, unsigned int *p_n48)
{
int n4_2; // edx
int n6_1; // ebx
unsigned __int8 *v8; // ebp
int n2_1; // ecx
unsigned __int8 *v10; // esi
int v11; // edi
bool v12; // zf
unsigned __int8 n2a_1; // al
int v14; // edi
int v15; // eax
int v16; // eax
unsigned __int8 n3; // bl
int v18; // edi
__int16 v19; // ax
__int16 v20; // ax
char v21; // cl
__int16 n4_3; // dx
int n2_2; // [esp-8h] [ebp-30h]
int v25; // [esp-8h] [ebp-30h]
char n9_1; // [esp-4h] [ebp-2Ch]
unsigned __int8 v27; // [esp+11h] [ebp-17h]
char v28; // [esp+12h] [ebp-16h]
char p_n20; // [esp+13h] [ebp-15h] BYREF
int n2a; // [esp+14h] [ebp-14h]
int v31; // [esp+18h] [ebp-10h]
char v32[4]; // [esp+1Ch] [ebp-Ch]
char n9[4]; // [esp+20h] [ebp-8h]
unsigned __int8 *v34; // [esp+24h] [ebp-4h]
n4_2 = n4_1; /*0xffca4375*/
n6_1 = n6; /*0xffca437c*/
v8 = 0; /*0xffca4385*/
v28 = 0; /*0xffca4396*/
n2_1 = n2; /*0xffca439a*/
p_n20 = 0; /*0xffca43a4*/
v10 = &n4[50813 * (unsigned __int8)n4_1 + 12557 + 8077 * (unsigned __int8)n6]; /*0xffca43ad*/
v27 = 0; /*0xffca43af*/
v34 = 0; /*0xffca43ba*/
if ( a5 == 1 ) /*0xffca43be*/
{
v11 = 2688 * (unsigned __int8)n2; /*0xffca43c7*/
v12 = v10[v11 + 1897] == 1; /*0xffca43cd*/
*(_DWORD *)&v10[v11 + 2276] = *(_DWORD *)&v10[v11 + 1893]; /*0xffca43dc*/
v10[v11 + 2280] = 1; /*0xffca43e3*/
if ( v12 ) /*0xffca43eb*/
{
v10[v11 + 2281] = 1; /*0xffca43f1*/
n9[0] = KtiFn_FFCA50ED(n4, n4_1, n6, n2, &p_n20); /*0xffca4409*/
if ( n9[0] == -1 ) /*0xffca440f*/
{
v10[v11 + 1898] = 1; /*0xffca443e*/
}
else
{
n9_1 = n9[0]; /*0xffca4411*/
v28 = 1; /*0xffca4415*/
v10[v11 + 1898] = 0; /*0xffca441a*/
*(_WORD *)&v10[v11 + 2285] = ((unsigned __int8)p_n20 << 8) | KtiFunc2A5(n9_1); /*0xffca4434*/
}
n4_2 = n4_1; /*0xffca4446*/
n2_1 = n2; /*0xffca444a*/
}
}
n2a_1 = 0; /*0xffca444e*/
*(_DWORD *)v32 = 3; /*0xffca4450*/
v14 = 0; /*0xffca4458*/
LOBYTE(n2a) = 0; /*0xffca445a*/
v31 = 0; /*0xffca445e*/
do
{
if ( a5 == 1 ) /*0xffca4467*/
{
v15 = v14 + 2688 * (unsigned __int8)n2_1; /*0xffca4478*/
v8 = &v10[v15 + 1904]; /*0xffca447a*/
v34 = v8; /*0xffca447c*/
v27 = v10[v15 + 1903]; /*0xffca4487*/
n6_1 = n6; /*0xffca448d*/
if ( v27 ) /*0xffca4491*/
v10[v15 + 2287] = 1; /*0xffca4493*/
}
else
{
if ( a5 ) /*0xffca44a2*/
goto LABEL_14; /*0xffca44a2*/
v16 = v14 + 2688 * (unsigned __int8)n2_1; /*0xffca44b3*/
v8 = &v10[v16 + 1520]; /*0xffca44b5*/
v34 = v8; /*0xffca44b7*/
v27 = v10[v16 + 1519]; /*0xffca44c2*/
n4_2 = n4_1; /*0xffca44c6*/
}
n2a_1 = n2a; /*0xffca44ca*/
LABEL_14:
if ( v27 != 1 ) /*0xffca44d3*/
goto LABEL_41; /*0xffca44d3*/
n3 = KtiFn_FFCA47DD(n4, n4_2, n6_1, n2_1, n2a, a5, p_n48); /*0xffca44f1*/
n9[0] = n3; /*0xffca44fb*/
if ( n3 == 0xFF ) /*0xffca4501*/
{
*v8 = 1; /*0xffca4663*/
goto LABEL_38; /*0xffca4667*/
}
*v8 = 0; /*0xffca4517*/
v28 = 1; /*0xffca4528*/
DebugPrint(
(int)n4,
v32[0],
n4_1,
n6,
n2,
255,
255,
255,
"Interleave Info/Request Validation FAILED. ERROR Code: %d \n",
n3);
if ( a5 == 1 )
{
v18 = 2688 * (unsigned __int8)n2; /*0xffca454f*/
v10[v18 + 2303 + v31] = KtiFunc246(n9[0]); /*0xffca4561*/
if ( v10[v18 + 1897] == 1 && v10[v18 + 1898] == 1 )
{
v10[v18 + 1898] = 0; /*0xffca4584*/
switch ( n3 )
{
case 0xCu:
case 0xFu:
v19 = KtiFunc2A5(0); /*0xffca461b*/
n2_2 = 0; /*0xffca4620*/
goto LABEL_23; /*0xffca4622*/
case 2u:
v19 = KtiFunc2A5(2); /*0xffca45a1*/
n2_2 = 2; /*0xffca45a6*/
LABEL_23:
n6_1 = n6; /*0xffca45a8*/
*(_WORD *)&v10[v18 + 2285] = v19; /*0xffca45b1*/
DebugPrint(
(int)n4,
v32[0],
n4_1,
n6,
n2,
255,
255,
255,
"Partition Request Validation FAILED. ERROR Code: %d \n",
n2_2);
LABEL_24:
v14 = v31; /*0xffca45d4*/
LABEL_39:
n2_1 = n2; /*0xffca4671*/
goto LABEL_40; /*0xffca4671*/
case 3u:
v20 = KtiFunc2A5(v32[0]); /*0xffca45ed*/
v21 = v32[0]; /*0xffca45f2*/
n6_1 = n6; /*0xffca45f6*/
v25 = *(_DWORD *)v32; /*0xffca45fa*/
*(_WORD *)&v10[v18 + 2285] = v20; /*0xffca4600*/
DebugPrint(
(int)n4,
v21,
n4_1,
n6,
n2,
255,
255,
255,
"Partition Request Validation FAILED. ERROR Code: %d \n",
v25);
goto LABEL_24; /*0xffca4617*/
}
}
v14 = v31; /*0xffca4669*/
LABEL_38:
n6_1 = n6; /*0xffca466d*/
goto LABEL_39; /*0xffca466d*/
}
if ( a5 ) /*0xffca4629*/
goto LABEL_38; /*0xffca4629*/
if ( n3 == 2 || n3 == 7 ) /*0xffca4633*/
{
n4_3 = *(_WORD *)v32; /*0xffca465d*/
}
else
{
if ( n3 != 3 && n3 != 15 ) /*0xffca463d*/
goto LABEL_38; /*0xffca463d*/
n4_3 = 4; /*0xffca4641*/
}
n2_1 = n2; /*0xffca4642*/
n6_1 = n6; /*0xffca4646*/
*(_WORD *)&v10[2688 * (unsigned __int8)n2 + 1513] = n4_3; /*0xffca4653*/
LABEL_40:
n2a_1 = n2a; /*0xffca4675*/
LABEL_41:
n4_2 = n4_1; /*0xffca4679*/
++n2a_1; /*0xffca467d*/
v8 = v34; /*0xffca467f*/
v14 += 18; /*0xffca4683*/
LOBYTE(n2a) = n2a_1; /*0xffca4686*/
v31 = v14; /*0xffca468a*/
}
while ( n2a_1 < 2u );
return v28 == 1; /*0xffca4696*/
}
// Function: KtiDdrParamValidate @ 0xffca46a8 (0x7e bytes)
// Index: 1267/2560
int __cdecl KtiDdrParamValidate(int __return_address, unsigned int n48, char n48a)
{
int v3; // ecx
bool v4; // zf
bool v5; // zf
v3 = 1; /*0xffca46b0*/
if ( n48 > 0x24 ) /*0xffca46b4*/
{
if ( n48 != 40 ) /*0xffca46f8*/
{
if ( n48 != 45 ) /*0xffca46fd*/
{
if ( n48 == 48 ) /*0xffca4702*/
goto LABEL_22; /*0xffca4702*/
if ( n48 != 54 ) /*0xffca4707*/
{
if ( n48 == 56 ) /*0xffca470d*/
goto LABEL_9; /*0xffca470d*/
if ( n48 != 63 ) /*0xffca4712*/
return v3; /*0xffca4712*/
v5 = n48a == 6; /*0xffca4714*/
goto LABEL_23; /*0xffca4718*/
}
}
LABEL_14:
v3 = 0; /*0xffca46ed*/
v4 = n48a == 4; /*0xffca46ef*/
goto LABEL_10; /*0xffca46f3*/
}
LABEL_22:
v5 = n48a == 2; /*0xffca471a*/
LABEL_23:
if ( v5 ) /*0xffca471e*/
return 0; /*0xffca4720*/
return v3; /*0xffca4720*/
}
if ( n48 == 36 ) /*0xffca46b6*/
goto LABEL_22; /*0xffca46b6*/
if ( n48 > 9 ) /*0xffca46bb*/
{
if ( n48 != 18 && n48 != 24 ) /*0xffca46e6*/
{
if ( n48 != 27 ) /*0xffca46eb*/
return v3; /*0xffca46eb*/
goto LABEL_14; /*0xffca46eb*/
}
goto LABEL_22; /*0xffca46e6*/
}
if ( n48 == 9 || n48 == 3 ) /*0xffca46c2*/
goto LABEL_22; /*0xffca46c2*/
if ( n48 <= 4 ) /*0xffca46c7*/
return v3; /*0xffca46c7*/
if ( n48 <= 6 ) /*0xffca46cc*/
goto LABEL_22; /*0xffca46cc*/
if ( n48 == 7 ) /*0xffca46d1*/
{
LABEL_9:
v3 = 0; /*0xffca46d3*/
v4 = n48a == 3; /*0xffca46d5*/
LABEL_10:
LOBYTE(v3) = !v4; /*0xffca46d9*/
}
return v3; /*0xffca4724*/
}
// Function: KtiDdrParamCompare @ 0xffca4726 (0xb7 bytes)
// Index: 1268/2560
BOOL __cdecl KtiDdrParamCompare(
char n6,
unsigned __int8 n8,
unsigned __int8 n2,
unsigned __int8 n8_1,
unsigned __int8 n2_1,
unsigned __int8 n8_2)
{
int v6; // ecx
bool v7; // cc
v6 = 0; /*0xffca472d*/
switch ( n6 ) /*0xffca4733*/
{
case 2: /*0xffca4733*/
if ( !n8 ) /*0xffca47c6*/
return v6; /*0xffca47c6*/
v7 = n2 <= n2_1; /*0xffca47ce*/
if ( n2 == n2_1 ) /*0xffca47d0*/
return n8_2 >= n8_1; /*0xffca47db*/
goto LABEL_17; /*0xffca47d0*/
case 3: /*0xffca4733*/
return n8 != n8_1; /*0xffca47c1*/
case 4: /*0xffca4733*/
if ( n8 != 1 ) /*0xffca4781*/
{
if ( n8 == 2 ) /*0xffca4786*/
{
if ( n8_1 <= n8_2 || n2 >= n2_1 ) /*0xffca47b2*/
return 1; /*0xffca47b2*/
return v6; /*0xffca47b2*/
}
if ( n8 != 3 ) /*0xffca478b*/
return v6; /*0xffca478b*/
}
if ( n8_1 != n8_2 ) /*0xffca4793*/
return 1; /*0xffca479f*/
v7 = n2 <= n2_1; /*0xffca4798*/
LABEL_17:
if ( !v7 ) /*0xffca479b*/
return v6; /*0xffca479b*/
return 1; /*0xffca479b*/
}
if ( n6 != 6 ) /*0xffca4747*/
return 1; /*0xffca4747*/
if ( n8 ) /*0xffca474e*/
{
if ( n8 % 3u != n8_1 || n2 == n2_1 ) /*0xffca4776*/
return 1; /*0xffca4776*/
}
else if ( n8_1 || n2 ) /*0xffca4758*/
{
return 1; /*0xffca4758*/
}
return v6; /*0xffca47a2*/
}
// Function: KtiFn_FFCA47DD @ 0xffca47dd (0x603 bytes)
// Index: 1269/2560
char __cdecl KtiFn_FFCA47DD(
_BYTE *__return_address,
int n4,
int n6,
int n2,
unsigned __int8 n2a,
unsigned __int8 a6,
unsigned int *p_n48)
{
_BYTE *__return_address_1; // ebp
_BYTE *v8; // edx
char n2_1; // al
int v11; // esi
_BYTE *v12; // edi
char v13; // al
unsigned __int8 n48_1; // dl
char v15; // cl
_BYTE *v16; // esi
_BYTE *v17; // edi
int v18; // eax
int v19; // eax
int n2_2; // ebx
unsigned __int8 n8_3; // cl
unsigned __int8 v22; // al
int n8_4; // esi
int v24; // ecx
unsigned __int8 n4a_1; // dl
int v26; // eax
unsigned __int8 n6a_1; // cl
unsigned __int8 n2_6; // al
int v29; // eax
int n4a_3; // edi
unsigned __int8 n2_5; // al
int v32; // edx
int v33; // eax
int v34; // edx
int v35; // ecx
int v36; // edx
unsigned __int8 *v37; // ecx
const char *Interleave_requests_across_sockets_not_supported_n; // [esp-Ch] [ebp-5Ch]
__int16 n8_1; // [esp-4h] [ebp-54h]
u... [10330 chars total]
// Function: KtiFn_FFCA4DE0 @ 0xffca4de0 (0x30d bytes)
// Index: 1270/2560
int __cdecl KtiFn_FFCA4DE0(unsigned __int8 *n4)
{
unsigned __int8 n4_2; // al
int v3; // ebp
unsigned __int8 *v4; // edx
unsigned __int8 *v5; // ecx
unsigned __int8 *v6; // edi
int n4_1; // ebx
char n4a_1; // ah
unsigned __int8 n6_1; // cl
int v10; // edx
unsigned __int8 v11; // al
unsigned __int8 *v12; // ecx
int v13; // edi
int n2_1; // ebp
int v15; // edi
unsigned __int8 *v17; // [esp+10h] [ebp-34h]
int n6; // [esp+14h] [ebp-30h]
unsigned __int8 *v19; // [esp+18h] [ebp-2Ch]
int v20; // [esp+1Ch] [ebp-28h]
unsigned int p_n48; // [esp+20h] [ebp-24h] BYREF
int n4_3; // [esp+24h] [ebp-20h]
int n2; // [esp+28h] [ebp-1Ch]
unsigned __int8 *v24; // [esp+2Ch] [ebp-18h]
unsigned __int8 *v25; // [esp+30h] [ebp-14h]
unsigned int p_n48_1; // [esp+34h] [ebp-10h]
unsigned int p_n48_2; // [esp+38h] [ebp-Ch]
unsigned __int8 *v28; // [esp+3Ch] [ebp-8h]
int v29; // [esp+40h] [ebp-4h]
char n4a; // [esp+48h] [ebp+4h]
n4_2 = 0; /*0xffca4dea*/
v3 = 0; /*0xffca4dec*/
LOBYTE(n4_3) = 0; /*0xffca4dee*/
v29 = 0; /*0xffca4df3*/
v4 = n4 + 257308; /*0xffca4df7*/
v5 = n4 + 258689; /*0xffca4dfd*/
v25 = n4 + 257308; /*0xffca4e03*/
v24 = n4 + 258689; /*0xffca4e07*/
do /*0xffca50dd*/
{
if ( !*v5 ) /*0xffca4e0e*/
goto LABEL_40; /*0xffca4e0e*/
p_n48 = 0; /*0xffca4e14*/
v6 = v4 + 1417; /*0xffca4e19*/
n4_1 = n4_3; /*0xffca4e1f*/
n4a_1 = 1; /*0xffca4e23*/
n6_1 = 0; /*0xffca4e25*/
p_n48_2 = 0; /*0xffca4e27*/
v20 = 0; /*0xffca4e2b*/
p_n48_1 = 0; /*0xffca4e30*/
v17 = v4; /*0xffca4e36*/
v10 = 0; /*0xffca4e3a*/
n4a = 1; /*0xffca4e3e*/
LOBYTE(n6) = 0; /*0xffca4e42*/
v28 = v6; /*0xffca4e46*/
do /*0xffca5078*/
{
if ( *(v6 - 3) ) /*0xffca4e4a*/
{
v19 = &n4[v3 + 12557 + v20]; /*0xffca4e61*/
v11 = 0; /*0xffca4e65*/
LOBYTE(n2) = 0; /*0xffca4e67*/
if ( *v6 ) /*0xffca4e6b*/
{
v12 = v17; /*0xffca4e73*/
while ( 1 ) /*0xffca4e77*/
{
v13 = v11; /*0xffca4e77*/
if ( v12[1379 * v11 + 1917] ) /*0xffca4e80*/
{
n2_1 = n2; /*0xffca4e8e*/
if ( !MemChipFuncACE9((int)n4, n4_1, n6, n2) ) /*0xffca4e99*/
goto LABEL_24; /*0xffca4e99*/
v15 = 2688 * v13; /*0xffca4ead*/
if ( v19[v15 + 2659] == 1 ) /*0xffca4ebb*/
goto LABEL_24; /*0xffca4ebb*/
if ( v19[v15 + 1511] == 1 ) /*0xffca4ec9*/
{
if ( KtiFunc4372(n4, n4_1, n6, n2_1, 0, &p_n48) ) /*0xffca4ed9*/
{
v19[v15 + 1512] = 0; /*0xffca4ee9*/
DebugPrint((int)n4, 3, n4_1, n6, n2_1, 255, 255, 255, "CfgCur Validation FAILED. \n"); /*0xffca4ef6*/
}
else
{
v19[v15 + 1512] = 1; /*0xffca4efd*/
DebugPrint((int)n4, 2, n4_1, n6, n2_1, 255, 255, 255, "CfgCur Validation SUCCESSFUL. \n"); /*0xffca4f16*/
if ( p_n48 ) /*0xffca4f24*/
{
if ( p_n48_1 ) /*0xffca4f2c*/
{
if ( p_n48_1 != p_n48 ) /*0xffca4f36*/
n4a = 0; /*0xffca4f38*/
}
else
{
p_n48_1 = p_n48; /*0xffca4f2e*/
}
}
}
}
else
{
DebugPrint((int)n4, 3, n4_1, n6, n2_1, 255, 255, 255, "Could not find a CfgCur record to validate. \n"); /*0xffca4f55*/
}
if ( v19[v15 + 1891] != 1 ) /*0xffca4f69*/
{
DebugPrint((int)n4, 3, n4_1, n6, n2_1, 255, 255, 255, "Could not find a CfgReq record to validate. \n"); /*0xffca5046*/
goto LABEL_24; /*0xffca5046*/
}
if ( v19[v15 + 2275] && *(_DWORD *)&v19[v15 + 2276] == *(_DWORD *)&v19[v15 + 1893] ) /*0xffca4f87*/
goto LABEL_24; /*0xffca4f87*/
if ( KtiFunc4372(n4, n4_1, n6, n2_1, 1u, &p_n48) ) /*0xffca4f97*/
{
v19[v15 + 1892] = 0; /*0xffca4fa7*/
DebugPrint((int)n4, 3, n4_1, n6, n2_1, 255, 255, 255, "CfgReq Validation FAILED. \n"); /*0xffca4fc5*/
LABEL_24:
v12 = v17; /*0xffca4fcd*/
goto LABEL_25; /*0xffca4fcd*/
}
v19[v15 + 1892] = 1; /*0xffca4ffa*/
DebugPrint((int)n4, 2, n4_1, n6, n2_1, 255, 255, 255, "CfgReq Validation SUCCESSFUL. \n"); /*0xffca5013*/
if ( !p_n48 ) /*0xffca5021*/
goto LABEL_24; /*0xffca5021*/
if ( !p_n48_2 ) /*0xffca5029*/
{
p_n48_2 = p_n48; /*0xffca502b*/
goto LABEL_24; /*0xffca502f*/
}
v12 = v17; /*0xffca5031*/
if ( p_n48_2 != p_n48 ) /*0xffca5037*/
{
n4a_1 = 0; /*0xffca5039*/
n4a = 0; /*0xffca503b*/
goto LABEL_26; /*0xffca503f*/
}
}
LABEL_25:
n4a_1 = n4a; /*0xffca4fd1*/
LABEL_26:
v6 = v28; /*0xffca4fd5*/
v11 = n2 + 1; /*0xffca4fdd*/
LOBYTE(n2) = v11; /*0xffca4fdf*/
if ( v11 >= *v28 ) /*0xffca4fe5*/
{
n6_1 = n6; /*0xffca4feb*/
v3 = v29; /*0xffca4fef*/
goto LABEL_35; /*0xffca4ff3*/
}
}
}
n4a_1 = n4a; /*0xffca504b*/
LABEL_35:
v10 = v20; /*0xffca504f*/
}
v17 += 7688; /*0xffca5053*/
++n6_1; /*0xffca505b*/
v10 += 8077; /*0xffca505d*/
LOBYTE(n6) = n6_1; /*0xffca5063*/
v6 += 7688; /*0xffca5067*/
v20 = v10; /*0xffca506d*/
v28 = v6; /*0xffca5071*/
}
while ( n6_1 < 6u ); /*0xffca5078*/
if ( !n4a_1 ) /*0xffca5080*/
{
DebugPrint((int)n4, 3, n4_1, 255, 255, 255, 255, 255, "DDRT partition mismatch on Socket\n"); /*0xffca5095*/
KtiFunc1162(n4, 23, 14, n4_1, 255, 255, 255); /*0xffca50a3*/
}
v5 = v24; /*0xffca50ab*/
v4 = v25; /*0xffca50af*/
n4_2 = n4_3; /*0xffca50b3*/
LABEL_40:
++n4_2; /*0xffca50b7*/
v5 += 48704; /*0xffca50b9*/
v4 += 48704; /*0xffca50bf*/
LOBYTE(n4_3) = n4_2; /*0xffca50c5*/
v3 += 50813; /*0xffca50c9*/
v24 = v5; /*0xffca50cf*/
v25 = v4; /*0xffca50d3*/
v29 = v3; /*0xffca50d7*/
}
while ( n4_2 < 4u ); /*0xffca50dd*/
return 0; /*0xffca50e3*/
}
// Function: KtiFn_FFCA50ED @ 0xffca50ed (0xf9 bytes)
// Index: 1271/2560
char __cdecl KtiFn_FFCA50ED(unsigned __int8 *n4, int n4_2, int n6, int n2, char *p_n20)
{
int n2_1; // ebx
unsigned __int8 *n4_1; // edi
unsigned __int8 *v7; // ebp
unsigned __int8 *v8; // esi
int v9; // eax
int v11; // [esp+10h] [ebp-4h] BYREF
n2_1 = n2; /*0xffca50f3*/
v11 = 0; /*0xffca50f8*/
n4_1 = n4; /*0xffca5103*/
v7 = &n4[48704 * (unsigned __int8)n4_2 + 7688 * (unsigned __int8)n6]; /*0xffca5132*/
v8 = &n4[50813 * (unsigned __int8)n4_2 + 8077 * (unsigned __int8)n6]; /*0xffca5143*/
v9 = ProcCommonFuncDC9A(n4, n4_2, n6, n2, &v11, &n4, p_n20); /*0xffca5145*/
if ( v9 ) /*0xffca514f*/
{
if ( v9 == 1 ) /*0xffca5180*/
{
KtiFunc8B24(n4_1, n4_2, n6, n2_1); /*0xffca518c*/
return 4; /*0xffca5196*/
}
}
else if ( (v11 & 4) != 0 ) /*0xffca5156*/
{
DebugPrint((int)n4_1, 3, n4_2, n6, n2_1, 255, 255, 255, aSecurityStateL); /*0xffca5171*/
return 16; /*0xffca517b*/
}
if ( *(_WORD *)&v8[2688 * (unsigned __int8)n2_1 + 14456] <= *(_WORD *)&v7[1379 * (unsigned __int8)n2_1 + 260415] ) /*0xffca51b7*/
return -1; /*0xffca51de*/
DebugPrint( /*0xffca51d2*/
(int)n4_1,
3,
n4_2,
n6,
n2_1,
255,
255,
255,
"Partition Request Validation FAILED. - Partition requested too big.\n");
return 1; /*0xffca51e0*/
}
// Function: KtiFn_FFCA51E6 @ 0xffca51e6 (0x85f bytes)
// Index: 1272/2560
int __cdecl KtiFn_FFCA51E6(unsigned __int8 *n2, int n4)
{
int n6_1; // ebx
int v4; // esi
int n18; // edi
unsigned __int8 *v6; // edi
unsigned __int8 n6; // al
unsigned __int8 *v8; // ecx
int v9; // eax
char v10; // al
int v11; // eax
unsigned int v12; // eax
int v13; // eax
unsigned int v14; // eax
int v15; // eax
unsigned int v16; // eax
int v17; // eax
unsigned int v18; // eax
int v19; // eax
unsigned int v20; // eax
int v21; // eax
unsigned int v22; // eax
int v23; // eax
char v24; // al
int v25; // eax
unsigned int v26; // eax
int result; // eax
unsigned int v28; // edi
unsigned int v29; // esi
int n6_2; // [esp+10h] [ebp-24h]
unsigned int v31; // [esp+14h] [ebp-20h]
unsigned int v32; // [esp+18h] [ebp-1Ch]
unsigned int v33; // [esp+1Ch] [ebp-18h]
unsigned int v34; // [esp+20h] [ebp-14h]
unsigned int v35; // [esp+24h] [ebp-10h]
unsigned __int8 *v36; // [esp+28h] [ebp-Ch]
unsigned int v37; // [esp+28h] [ebp-Ch]
... [10327 chars total]
// Function: KtiFunc5A45 @ 0xffca5a45 (0x9e bytes)
// Index: 1273/2560
int __cdecl KtiFunc5A45(unsigned __int8 *__return_address, int n4)
{
KtiFunc5AE3((int)__return_address, n4); /*0xffca5a52*/
RmtFunc423C((int)__return_address, n4); /*0xffca5a59*/
KtiFunc5CE5((int)__return_address, n4); /*0xffca5a60*/
DebugPrint((int)__return_address, 10, n4, 255, 255, 255, 255, 255, "\nSTART_POWER_TRAINING_DUMP\n"); /*0xffca5a78*/
RmtFunc5646(__return_address, n4, 30); /*0xffca5a81*/
RmtFunc5646(__return_address, n4, 6); /*0xffca5a8d*/
RmtFunc5646(__return_address, n4, 12); /*0xffca5a96*/
RmtFunc5646(__return_address, n4, 26); /*0xffca5a9f*/
RmtFunc5646(__return_address, n4, 31); /*0xffca5aa8*/
RmtFunc5646(__return_address, n4, 9); /*0xffca5ab1*/
RmtFunc5646(__return_address, n4, 24); /*0xffca5aba*/
KtiFn_FFCA51E6(__return_address, n4); /*0xffca5ac4*/
return DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffca5adf*/
}
// Function: KtiFunc5AE3 @ 0xffca5ae3 (0x202 bytes)
// Index: 1274/2560
int __cdecl KtiFunc5AE3(int __return_address, int n4)
{
unsigned __int8 n6; // bl
_BYTE *SocketInfo; // esi
int v4; // eax
unsigned __int8 n8; // bh
int v6; // ecx
unsigned int v7; // esi
int v9; // [esp+10h] [ebp-18h]
int v10; // [esp+14h] [ebp-14h]
int v11; // [esp+18h] [ebp-10h]
_BYTE *SocketInfo_2; // [esp+1Ch] [ebp-Ch]
int v13; // [esp+20h] [ebp-8h]
_BYTE *SocketInfo_1; // [esp+24h] [ebp-4h]
n6 = 0; /*0xffca5afe*/
SocketInfo = (_BYTE *)GetSocketInfo(__return_address, n4); /*0xffca5b03*/
SocketInfo_1 = SocketInfo; /*0xffca5b0e*/
DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, "\nSTART_SENSE_AMP_TRAINING_OFFSETS\n"); /*0xffca5b12*/
DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, "Senseamp bit: 0 1 2 3\n");
SocketInfo_2 = SocketInfo; /*0xffca5b2c*/
LOBYTE(v10) = 0; /*0xffca5b33*/
v9 = 0; /*0xffca5b37*/
v4 = 0; /*0xffca5b3c*/
do
{
if ( *SocketInfo )
{
if ( *(_BYTE *)GetCpuCount(__return_address, n4, v10) )
{
v13 = KtiFunc91AF(__return_address, n4, v10, 0); /*0xffca5b6d*/
if ( !KtiFunc89E9(__return_address, n4, v10, 0, 0, 0) )
{
n8 = 0; /*0xffca5b8c*/
v6 = 0; /*0xffca5b8e*/
v11 = 0; /*0xffca5b90*/
do
{
if ( *(_BYTE *)(__return_address + 257312) || n8 != 8 && n8 != 17 )
{
v7 = *(_DWORD *)&SocketInfo_1[72 * *(unsigned __int8 *)(v13 + 1) + 5614 + 4 * v6 + 4 * v9]; /*0xffca5bca*/
DebugPrint(__return_address, 10, n4, v10, 0, 0, 255, 255, "Nibble %2d: ", v6);
DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, " %2d", v7 & 0x1F); /*0xffca5c02*/
DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, " %2d", (v7 >> 5) & 0x1F); /*0xffca5c26*/
DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, " %2d", (v7 >> 10) & 0x1F); /*0xffca5c47*/
DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, " %2d", (v7 >> 15) & 0x1F); /*0xffca5c69*/
DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffca5c7c*/
v6 = v11; /*0xffca5c81*/
}
++n8; /*0xffca5c88*/
v11 = ++v6; /*0xffca5c8b*/
}
while ( n8 < 0x12u );
SocketInfo = SocketInfo_2; /*0xffca5c98*/
}
}
v4 = v9; /*0xffca5c9c*/
}
++n6; /*0xffca5ca0*/
SocketInfo += 7688; /*0xffca5ca2*/
v4 += 1922; /*0xffca5ca8*/
LOBYTE(v10) = n6; /*0xffca5cad*/
SocketInfo_2 = SocketInfo; /*0xffca5cb1*/
v9 = v4; /*0xffca5cb5*/
}
while ( n6 < 6u );
return DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffca5cdd*/
}
// Function: KtiFunc5CE5 @ 0xffca5ce5 (0x188 bytes)
// Index: 1275/2560
int __cdecl KtiFunc5CE5(int __return_address, int n4)
{
_BYTE *SocketInfo; // edi
unsigned __int8 n6; // bl
int CpuCount; // eax
unsigned __int8 n2; // bh
int v6; // ebp
unsigned __int8 n0x48; // al
unsigned int v8; // ecx
unsigned __int8 n0x48_1; // [esp+13h] [ebp-15h]
unsigned int v11; // [esp+14h] [ebp-14h]
int v12; // [esp+18h] [ebp-10h]
int CpuCount_1; // [esp+1Ch] [ebp-Ch]
int v14; // [esp+20h] [ebp-8h]
_BYTE *SocketInfo_1; // [esp+24h] [ebp-4h]
DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, "\nSTART_SWIZZLE_TRAINING_RESULTS\n"); /*0xffca5d03*/
SocketInfo = (_BYTE *)GetSocketInfo(__return_address, n4); /*0xffca5d15*/
n6 = 0; /*0xffca5d17*/
SocketInfo_1 = SocketInfo; /*0xffca5d19*/
LOBYTE(v12) = 0; /*0xffca5d1d*/
do /*0xffca5e44*/
{
if ( *SocketInfo ) /*0xffca5d21*/
{
CpuCount = GetCpuCount(__return_address, n4, v12); /*0xffca5d33*/
n2 = 0; /*0xffca5d38*/
CpuCount_1 = CpuCount; /*0xffca5d3a*/
LOBYTE(v14) = 0; /*0xffca5d41*/
v6 = 0; /*0xffca5d45*/
do /*0xffca5e27*/
{
if ( *(_BYTE *)(CpuCount + v6) ) /*0xffca5d47*/
{
DebugPrint(__return_address, 10, n4, v12, v14, 255, 255, 255, " "); /*0xffca5d6d*/
n0x48 = 0; /*0xffca5d76*/
n0x48_1 = 0; /*0xffca5d7b*/
v8 = 0; /*0xffca5d7f*/
v11 = 0; /*0xffca5d81*/
do /*0xffca5df7*/
{
if ( n0x48 && (v8 & 7) == 0 ) /*0xffca5d8c*/
{
DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, " "); /*0xffca5da1*/
v8 = v11; /*0xffca5da6*/
}
DebugPrint( /*0xffca5dda*/
__return_address,
10,
255,
255,
255,
255,
255,
255,
"%d",
(*(unsigned __int8 *)(v6 + (v8 >> 1) + CpuCount_1 + 1261) >> (4 * (v8 & 1))) & 7);
n0x48 = n0x48_1 + 1; /*0xffca5dea*/
v8 = v11 + 1; /*0xffca5dec*/
n0x48_1 = n0x48; /*0xffca5ded*/
++v11; /*0xffca5df1*/
}
while ( n0x48 < 0x48u ); /*0xffca5df7*/
DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffca5e0c*/
CpuCount = CpuCount_1; /*0xffca5e11*/
}
++n2; /*0xffca5e18*/
v6 += 1379; /*0xffca5e1a*/
LOBYTE(v14) = n2; /*0xffca5e20*/
}
while ( n2 < 2u ); /*0xffca5e27*/
SocketInfo = SocketInfo_1; /*0xffca5e2d*/
}
++n6; /*0xffca5e31*/
SocketInfo += 7688; /*0xffca5e33*/
LOBYTE(v12) = n6; /*0xffca5e39*/
SocketInfo_1 = SocketInfo; /*0xffca5e3d*/
}
while ( n6 < 6u ); /*0xffca5e44*/
return DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffca5e65*/
}
// Function: KtiFunc5E6D @ 0xffca5e6d (0x65 bytes)
// Index: 1276/2560
void __cdecl KtiFunc5E6D(unsigned __int8 *__return_address, int n4, int n6, int n21)
{
unsigned int v4; // esi
unsigned int v5; // eax
if ( n21 == 21 ) /*0xffca5e74*/
{
v4 = MiscConfigCheck(__return_address, n4, n6, 184566284); /*0xffca5e92*/
v5 = MiscConfigCheck(__return_address, n4, n6, 184566424); /*0xffca5e9a*/
DebugPrint( /*0xffca5ec7*/
(int)__return_address,
10,
n4,
n6,
255,
255,
255,
255,
"t_cwl_adj = %d\n",
((v4 >> 8) & 7) - ((v5 >> 20) & 3));
}
}
// Function: KtiFunc5ED2 @ 0xffca5ed2 (0x160 bytes)
// Index: 1277/2560
int __cdecl KtiFunc5ED2(int __return_address, int a2)
{
int SocketInfo; // esi
int result; // eax
unsigned __int8 n6; // bl
_DWORD *v5; // esi
_DWORD *v6; // ebp
int n18; // esi
int v8; // [esp+10h] [ebp-8h]
_DWORD *v9; // [esp+14h] [ebp-4h]
SocketInfo = GetSocketInfo(__return_address, a2); /*0xffca5ef0*/
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "\nSTART_DATA_XOVER\n"); /*0xffca5efb*/
result = DebugPrint( /*0xffca5f0e*/
__return_address,
2,
255,
255,
255,
255,
255,
255,
" CMDN CMDS CTL CKE CLK 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 "
" 15 16 17\n");
n6 = 0; /*0xffca5f13*/
v5 = (_DWORD *)(SocketInfo + 6573); /*0xffca5f18*/
LOBYTE(v8) = 0; /*0xffca5f1e*/
v9 = v5; /*0xffca5f22*/
do /*0xffca6025*/
{
if ( *((_BYTE *)v5 - 6573) ) /*0xffca5f26*/
{
DebugPrint(__return_address, 2, a2, v8, 255, 255, 255, 255, " %3d", *(v5 - 1) & 0x3F); /*0xffca5f4e*/
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, " %3d", *v5 & 0x3F); /*0xffca5f67*/
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, " %3d", v5[3] & 0x3F); /*0xffca5f84*/
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, " %3d", v5[4] & 0x3F); /*0xffca5f9e*/
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, " %3d", v5[5] & 0x3F); /*0xffca5fbb*/
v6 = v5 + 7; /*0xffca5fc3*/
n18 = 18; /*0xffca5fc8*/
do /*0xffca5ff1*/
{
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, " %3d", *v6++ & 0x3F); /*0xffca5fe3*/
--n18; /*0xffca5fee*/
}
while ( n18 ); /*0xffca5ff1*/
result = DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "\n"); /*0xffca6006*/
v5 = v9; /*0xffca600b*/
}
++n6; /*0xffca6012*/
v5 += 1922; /*0xffca6014*/
LOBYTE(v8) = n6; /*0xffca601a*/
v9 = v5; /*0xffca601e*/
}
while ( n6 < 6u ); /*0xffca6025*/
return result; /*0xffca602b*/
}
// Function: KtiFunc6032 @ 0xffca6032 (0xe2 bytes)
// Index: 1278/2560
int __cdecl KtiFunc6032(int __return_address, int a2)
{
unsigned __int8 n6; // bl
int SocketInfo; // edi
int result; // eax
unsigned __int8 n2; // bh
_BYTE *v6; // ebp
int v7; // [esp+10h] [ebp-8h]
int v8; // [esp+14h] [ebp-4h]
n6 = 0; /*0xffca604b*/
SocketInfo = GetSocketInfo(__return_address, a2); /*0xffca6050*/
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "\nSTART_DATA_XOVER_FNV\n"); /*0xffca605b*/
result = DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, " CMDS\n"); /*0xffca606e*/
LOBYTE(v7) = 0; /*0xffca6078*/
do /*0xffca6107*/
{
if ( *(_BYTE *)SocketInfo ) /*0xffca607c*/
{
result = GetCpuCount(__return_address, a2, v7); /*0xffca608a*/
n2 = 0; /*0xffca6092*/
LOBYTE(v8) = 0; /*0xffca6094*/
v6 = (_BYTE *)(result + 107); /*0xffca6098*/
do /*0xffca60f6*/
{
if ( *v6 ) /*0xffca609b*/
{
DebugPrint(__return_address, 2, a2, v7, v8, 255, 255, 255, " %3d", *(_DWORD *)(SocketInfo + 6581) & 0x3F); /*0xffca60c7*/
result = DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "\n"); /*0xffca60df*/
}
++n2; /*0xffca60e7*/
v6 += 1379; /*0xffca60e9*/
LOBYTE(v8) = n2; /*0xffca60ef*/
}
while ( n2 < 2u ); /*0xffca60f6*/
}
++n6; /*0xffca60f8*/
SocketInfo += 7688; /*0xffca60fa*/
LOBYTE(v7) = n6; /*0xffca6100*/
}
while ( n6 < 6u ); /*0xffca6107*/
return result; /*0xffca610d*/
}
// Function: KtiFunc6114 @ 0xffca6114 (0x2ea bytes)
// Index: 1279/2560
unsigned int __cdecl KtiFunc6114(int n4)
{
unsigned int result; // eax
unsigned __int8 n0x18_1; // cl
unsigned int v3; // ebp
unsigned int v4; // edi
int v5; // esi
unsigned int v6; // esi
int v7; // ecx
int n8; // edx
int v9; // eax
int v10; // ebp
int v11; // edi
int n0x18a_3; // ecx
int v13; // esi
unsigned int v14; // ebp
unsigned __int8 v15; // cl
int v16; // [esp-Ch] [ebp-34h]
int v17; // [esp+8h] [ebp-20h]
unsigned __int8 v18; // [esp+8h] [ebp-20h]
int n0x18a_2; // [esp+Ch] [ebp-1Ch]
unsigned __int8 n0x18; // [esp+10h] [ebp-18h]
int n0x18a; // [esp+10h] [ebp-18h]
unsigned int v22; // [esp+14h] [ebp-14h]
int n0x18a_1; // [esp+18h] [ebp-10h]
int n0x18a_4; // [esp+1Ch] [ebp-Ch]
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "Initiate FPGA SAD CSRs\n"); /*0xffca6130*/
v22 = *(_DWORD *)(n4 + 246472); /*0xffca614a*/
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "host->var.common.FpgaPresentBitMap: %8X\n", v22);
if ( !v22 ) /*0xffca615b*/
return DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "No Active FPGA\n"); /*0xffca616b*/
LOBYTE(v17) = *(_BYTE *)(n4 + 453660); /*0xffca6180*/
n0x18_1 = 0; /*0xffca6184*/
v3 = 0; /*0xffca6189*/
v4 = 0; /*0xffca61a1*/
n0x18a_2 = 0; /*0xffca61a3*/
n0x18a_1 = 0; /*0xffca61a7*/
v5 = 50813 * (unsigned __int8)v17 + n4 + 58803; /*0xffca61ab*/
n0x18a_4 = 0; /*0xffca61ad*/
n0x18 = 0; /*0xffca61b1*/
do /*0xffca61fb*/
{
if ( *(_BYTE *)(v5 - 4) ) /*0xffca61b5*/
{
v16 = *(_DWORD *)v5; /*0xffca61bf*/
if ( *(_BYTE *)(v5 + 10) ) /*0xffca61bb*/
{
v4 = MemChipFuncD633(v16); /*0xffca61c9*/
}
else
{
v3 = MemChipFuncD633(v16); /*0xffca61d8*/
n0x18a_1 = MemChipFuncCD88((_BYTE *)n4, v17, n0x18, 0); /*0xffca61e7*/
}
n0x18_1 = n0x18; /*0xffca61eb*/
}
++n0x18_1; /*0xffca61ef*/
v5 += 19; /*0xffca61f1*/
n0x18 = n0x18_1; /*0xffca61f4*/
}
while ( n0x18_1 < 0x18u ); /*0xffca61fb*/
v6 = 0; /*0xffca61fd*/
if ( !v4 && !v3 ) /*0xffca6207*/
return DebugPrint(n4, 3, v17, 255, 255, 255, 255, 255, "error.Unable to Program FPGA Rules. no sbsp SAD enabled\n"); /*0xffca621f*/
v7 = 0; /*0xffca6230*/
n8 = 8; /*0xffca6234*/
do /*0xffca6243*/
{
v9 = (unsigned __int8)v17 << v7; /*0xffca6237*/
v7 += 4; /*0xffca6239*/
n0x18a_2 |= v9; /*0xffca623c*/
--n8; /*0xffca6240*/
}
while ( n8 ); /*0xffca6243*/
if ( v4 ) /*0xffca6247*/
{
if ( v3 ) /*0xffca625e*/
{
if ( v4 >= v3 ) /*0xffca627a*/
{
n0x18a = n0x18a_1; /*0xffca629e*/
n0x18a_3 = n0x18a_2; /*0xffca62a2*/
v13 = (v4 & 0xFFFFF) << 7; /*0xffca62a8*/
v11 = (v3 & 0xFFFFF) << 7; /*0xffca62ae*/
}
else
{
n0x18a = n0x18a_2; /*0xffca6284*/
n0x18a_3 = n0x18a_1; /*0xffca6288*/
v13 = (v3 & 0xFFFFF) << 7; /*0xffca628e*/
v11 = (v4 & 0xFFFFF) << 7; /*0xffca6291*/
}
n0x18a_4 = n0x18a_3; /*0xffca62b0*/
v6 = v13 | 1; /*0xffca62b4*/
}
else
{
n0x18a = n0x18a_2; /*0xffca626a*/
v11 = (v4 & 0xFFFFF) << 7; /*0xffca626e*/
}
v10 = v11; /*0xffca62b7*/
}
else
{
n0x18a = n0x18a_1; /*0xffca6253*/
v10 = (v3 & 0xFFFFF) << 7; /*0xffca6257*/
}
v14 = v10 | 1; /*0xffca62d0*/
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, " En Base Limit\n"); /*0xffca62d3*/
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "Rule0 : %x %05x %05x\n", 1, 0, v14 >> 7);
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "Rule1 : %x %05x %05x\n", v6 & 1, (v14 >> 7) + 1, v6 >> 7);
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "\nINTERLEAVE0 : %08x\n", n0x18a);
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "INTERLEAVE1 : %08x\n", n0x18a_4);
result = v22; /*0xffca635a*/
v15 = 0; /*0xffca6361*/
v18 = 0; /*0xffca6363*/
do
{
if ( (result & 1) != 0 )
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "\t\tWrite FPGA SAD CSRs for Socket: %d\n", v15);
CpuIoCfgWrite(n4, v18, 0, 335561264, v14); /*0xffca6390*/
CpuIoCfgWrite(n4, v18, 0, 335561268, n0x18a); /*0xffca63a2*/
if ( (v6 & 1) != 0 ) /*0xffca63af*/
{
CpuIoCfgWrite(n4, v18, 0, 335561272, v6); /*0xffca63bb*/
CpuIoCfgWrite(n4, v18, 0, 335561276, n0x18a_4); /*0xffca63cd*/
}
v15 = v18; /*0xffca63d5*/
result = v22; /*0xffca63de*/
}
result >>= 1; /*0xffca63e2*/
++v15; /*0xffca63e4*/
v22 = result; /*0xffca63e6*/
v18 = v15; /*0xffca63ea*/
}
while ( result );
return result; /*0xffca63f8*/
}
// Function: KtiFunc63FE @ 0xffca63fe (0x122 bytes)
// Index: 1280/2560
int __cdecl KtiFunc63FE(unsigned __int8 *p_n42, unsigned __int8 n4, int n6, char n31, int a5, unsigned __int8 n0x20)
{
int result; // eax
unsigned __int8 n0x20_1; // bl
int v8; // esi
unsigned __int8 i; // bh
unsigned __int8 *v10; // edi
unsigned __int8 *v11; // edx
int v12; // ecx
int n4_1; // ebp
int v14; // eax
unsigned __int8 *v15; // edx
int v16; // ecx
int n4_2; // esi
int v18; // eax
bool v19; // zf
int v20; // [esp+Ch] [ebp-Ch]
int n8; // [esp+10h] [ebp-8h]
int v22; // [esp+14h] [ebp-4h]
int n31a; // [esp+28h] [ebp+10h]
int n0x20a; // [esp+30h] [ebp+18h]
result = MiscConfigCheck(p_n42, n4, n6, 184632624); /*0xffca6416*/
n0x20_1 = n0x20; /*0xffca641b*/
v8 = result; /*0xffca6426*/
for ( i = n0x20 + n31; n0x20_1 < i; ++n0x20_1 ) /*0xffca642c*/
{
if ( n0x20_1 >= 0x20u ) /*0xffca6436*/
break; /*0xffca6436*/
n8 = 8; /*0xffca6441*/
v8 ^= ((unsigned __int8)v8 ^ n0x20_1) & 0x3F; /*0xffca6451*/
LOWORD(result) = 0; /*0xffca6453*/
v10 = (unsigned __int8 *)(a5 + (n0x20_1 << 6)); /*0xffca6455*/
v20 = 0; /*0xffca6459*/
do /*0xffca6508*/
{
n0x20a = 0; /*0xffca645d*/
v11 = v10; /*0xffca6462*/
n31a = 0; /*0xffca6464*/
v12 = 0; /*0xffca6475*/
v22 = ((unsigned __int16)v8 ^ (unsigned __int16)((_WORD)result << 6)) & 0x1C0 ^ v8; /*0xffca6479*/
n4_1 = 4; /*0xffca647d*/
do /*0xffca648e*/
{
v14 = *v11 << v12; /*0xffca6481*/
v12 += 8; /*0xffca6483*/
n0x20a |= v14; /*0xffca6486*/
++v11; /*0xffca648a*/
--n4_1; /*0xffca648b*/
}
while ( n4_1 ); /*0xffca648e*/
v15 = v10 + 4; /*0xffca6494*/
v16 = 0; /*0xffca6499*/
n4_2 = 4; /*0xffca649b*/
do /*0xffca64ac*/
{
v18 = *v15 << v16; /*0xffca649f*/
v16 += 8; /*0xffca64a1*/
n31a |= v18; /*0xffca64a4*/
++v15; /*0xffca64a8*/
--n4_2; /*0xffca64a9*/
}
while ( n4_2 ); /*0xffca64ac*/
v8 = v22; /*0xffca64ae*/
MiscIoCheck(p_n42, n4, n6, 0xB014530u, v22); /*0xffca64c1*/
MiscIoCheck(p_n42, n4, n6, 0xB014550u, n0x20a); /*0xffca64d8*/
MiscIoCheck(p_n42, n4, n6, 0xB014554u, n31a); /*0xffca64ef*/
result = v20 + 1; /*0xffca64fb*/
v10 += 8; /*0xffca64fc*/
v19 = n8-- == 1; /*0xffca64ff*/
++v20; /*0xffca6504*/
}
while ( !v19 ); /*0xffca6508*/
}
return result; /*0xffca6519*/
}
// Function: KtiFunc6520 @ 0xffca6520 (0x130 bytes)
// Index: 1281/2560
int __cdecl KtiFunc6520(int a1, int a2, int n74, _DWORD *a4)
{
int v4; // esi
bool v5; // zf
int v6; // esi
v4 = 0; /*0xffca652c*/
*a4 = 56; /*0xffca6531*/
switch ( n74 )
{
case 0:
case 2:
case 3:
case 4:
case 6:
case 20:
case 21:
case 24:
v6 = a2; /*0xffca65f5*/
if ( !a2 ) /*0xffca65fb*/
*a4 = 62; /*0xffca65fd*/
return v6 != 0 ? 4 : 0;
case 1:
case 5:
case 22:
case 23:
if ( a2 && (a2 != 1 || !KtiFunc68D2(a1)) ) /*0xffca65e3*/
return 4; /*0xffca65eb*/
*a4 = 62; /*0xffca65ed*/
return v4; /*0xffca65f3*/
case 18:
case 25:
v6 = a2; /*0xffca660c*/
if ( !a2 ) /*0xffca6612*/
*a4 = 63; /*0xffca6614*/
return v6 != 0 ? 4 : 0;
case 40:
case 44:
case 45:
case 46:
case 47:
case 48:
case 53:
case 71:
case 72:
case 73:
case 74:
case 75:
if ( !a2 && n74 != 74 && n74 != 75 ) /*0xffca6558*/
goto LABEL_5; /*0xffca6558*/
if ( n74 == 53 ) /*0xffca6564*/
{
if ( KtiFunc69A4(a1) ) /*0xffca656b*/
{
LABEL_19:
*a4 = 60; /*0xffca65ca*/
return v4; /*0xffca65d0*/
}
v5 = *(_BYTE *)(a1 + 257314) == 0; /*0xffca6575*/
}
else
{
if ( (n74 == 40 || n74 == 44) && (KtiFunc69A4(a1) || *(_BYTE *)(a1 + 257314) && *(_BYTE *)(a1 + 195)) ) /*0xffca659e*/
goto LABEL_19; /*0xffca65a4*/
if ( n74 != 74 && n74 != 75 || !*(_BYTE *)(a1 + 257314) ) /*0xffca65b4*/
return 4; /*0xffca65bb*/
v5 = *(_BYTE *)(a1 + 195) == 0; /*0xffca65c1*/
}
LABEL_18:
if ( !v5 ) /*0xffca65c8*/
goto LABEL_19; /*0xffca65c8*/
return 4;
case 60:
if ( a2 ) /*0xffca6620*/
return 4; /*0xffca6620*/
v5 = *(_BYTE *)(a1 + 257314) == 0; /*0xffca6626*/
goto LABEL_18; /*0xffca662d*/
case 61:
if ( a2 || !*(_BYTE *)(a1 + 257314) ) /*0xffca6639*/
return 4; /*0xffca6640*/
LABEL_5:
*a4 = 56; /*0xffca655a*/
return v4; /*0xffca655c*/
default:
return 4;
}
}
// Function: KtiFunc66B8 @ 0xffca66b8 (0xd7 bytes)
// Index: 1282/2560
int *__cdecl KtiFunc66B8(unsigned __int8 *p_n42, int n4, unsigned __int8 n6, unsigned __int8 n2, int *a5)
{
unsigned int v5; // eax
int v6; // ecx
int n5; // [esp+8h] [ebp-Ch]
char v9; // [esp+Ch] [ebp-8h]
unsigned int v10; // [esp+10h] [ebp-4h] BYREF
LOWORD(n5) = 4; /*0xffca66c8*/
v10 = 0; /*0xffca66d7*/
BYTE2(n5) = DdrTrainFunc45AB((int)p_n42, n4, n6); /*0xffca671b*/
if ( (CpuIoRead((int)p_n42, n4, 0, 4 * (((((n6 / 3u) & 0xF) << 8) & 0xF00) != 0) + 67453084) & 0x100000) != 0 ) /*0xffca673d*/
{
LOBYTE(v5) = MiscConfigCheck(p_n42, n4, n6, 4 * n2 + 184566096); /*0xffca6752*/
}
else
{
DdrTrainFunc4A71( /*0xffca6773*/
p_n42,
n4,
n5,
v9 & 1 | (((n6 / 3u) & 0xF) << 8) | (2 * (n2 + 2 * (n6 % 3u))) & 0xE | 0x30,
5,
(unsigned __int8 *)&v10);
v5 = v10 >> 4; /*0xffca677e*/
}
v6 = (unsigned __int8)v5; /*0xffca6781*/
*a5 = v6; /*0xffca6789*/
return a5; /*0xffca6787*/
}
// Function: KtiFunc678F @ 0xffca678f (0x48 bytes)
// Index: 1283/2560
int __usercall KtiFunc678F@<eax>(int a1@<ebx>, int a2, unsigned __int8 a3, unsigned __int8 a4, int a5)
{
int v5; // eax
v5 = MailBoxFunc8E0B(a1, a2, a3, a4, 117459068); /*0xffca67a2*/
return MailBoxFunc8FC5(a2, a3, a4, 117459068, (a5 != 0 ? 0 : 1024) | v5 & 0xFFFFF3FF);
}
// Function: KtiFunc67D7 @ 0xffca67d7 (0x3d bytes)
// Index: 1284/2560
int __usercall KtiFunc67D7@<eax>(int n4@<ebx>, int a2, unsigned __int8 n4a, unsigned __int8 a4, char a5)
{
int v5; // eax
v5 = MailBoxFunc8E0B(n4, a2, n4a, a4, 117459124); /*0xffca67ea*/
return MailBoxFunc8FC5(a2, n4a, a4, 117459124, (32 * (a5 & 1)) | v5 & 0xFFFFFFDF); /*0xffca6811*/
}
// Function: KtiFunc6814 @ 0xffca6814 (0xbe bytes)
// Index: 1285/2560
int __cdecl KtiFunc6814(unsigned __int8 *a1, unsigned __int8 a2, char a3, char a4, bool *a5)
{
unsigned __int8 n3; // bl
int SocketInfo; // edi
int result; // eax
int v8; // eax
char v9; // [esp+13h] [ebp-5h]
int v10; // [esp+14h] [ebp-4h]
unsigned __int8 n6; // [esp+24h] [ebp+Ch]
n3 = 0; /*0xffca681e*/
LOBYTE(v10) = 0; /*0xffca6824*/
v9 = 0; /*0xffca6828*/
SocketInfo = GetSocketInfo((int)a1, a2); /*0xffca6836*/
if ( a3 == 1 ) /*0xffca683a*/
{
n3 = 3; /*0xffca683c*/
n6 = 6; /*0xffca683e*/
LOBYTE(v10) = 3; /*0xffca6843*/
}
else
{
n6 = 3; /*0xffca6849*/
}
do /*0xffca68c9*/
{
result = 7688 * n3; /*0xffca685a*/
if ( *(_BYTE *)(result + SocketInfo) ) /*0xffca6860*/
{
v8 = MiscConfigCheck(a1, a2, v10, 184567100); /*0xffca6873*/
if ( a5 ) /*0xffca687d*/
{
if ( !v9 ) /*0xffca6884*/
*a5 = (_BYTE)v8 == 0; /*0xffca688b*/
}
result = MiscIoCheck(a1, a2, v10, 0xB00453Cu, v8 & 0xFFFFFF00 | (unsigned __int8)((a4 != 0) - 1)); /*0xffca68b2*/
v9 = 1; /*0xffca68ba*/
}
LOBYTE(v10) = ++n3; /*0xffca68c1*/
}
while ( n3 < n6 ); /*0xffca68c9*/
return result; /*0xffca68cb*/
}
// Function: KtiFunc68D2 @ 0xffca68d2 (0xd2 bytes)
// Index: 1286/2560
char __cdecl KtiFunc68D2(int a1)
{
unsigned __int8 n4; // bl
unsigned __int8 n6; // bh
int SocketInfo; // edi
int v5; // ebp
int CpuCount; // edx
unsigned __int8 v7; // al
unsigned __int8 v9; // [esp+10h] [ebp-Ch]
unsigned __int8 v10; // [esp+14h] [ebp-8h]
int CpuCount_1; // [esp+18h] [ebp-4h]
unsigned __int8 v12; // [esp+20h] [ebp+4h]
n4 = 0; /*0xffca68dc*/
v9 = 0; /*0xffca68df*/
while ( !*(_BYTE *)(48704 * n4 + a1 + 258689) ) /*0xffca68f4*/
{
LABEL_11:
v9 = ++n4; /*0xffca6989*/
if ( n4 >= 4u ) /*0xffca6990*/
return 0; /*0xffca699f*/
}
n6 = 0; /*0xffca6905*/
SocketInfo = GetSocketInfo(a1, v9); /*0xffca6907*/
v10 = 0; /*0xffca690a*/
while ( 1 ) /*0xffca6911*/
{
v5 = 7688 * n6; /*0xffca6911*/
if ( *(_BYTE *)(SocketInfo + v5) ) /*0xffca6917*/
{
CpuCount = GetCpuCount(a1, v9, v10); /*0xffca692b*/
v7 = 0; /*0xffca6930*/
CpuCount_1 = CpuCount; /*0xffca6932*/
v12 = 0; /*0xffca6936*/
if ( *(_BYTE *)(SocketInfo + v5 + 3) ) /*0xffca693a*/
break; /*0xffca693a*/
}
LABEL_10:
v10 = ++n6; /*0xffca697e*/
if ( n6 >= 6u ) /*0xffca6985*/
goto LABEL_11; /*0xffca6985*/
}
while ( 1 ) /*0xffca6940*/
{
if ( !*(_BYTE *)(1379 * v7 + CpuCount) ) /*0xffca694d*/
goto LABEL_9; /*0xffca694d*/
if ( ProcCommonFunc24FA(a1, v9, v10, v12) ) /*0xffca695c*/
return 1; /*0xffca6998*/
CpuCount = CpuCount_1; /*0xffca6968*/
LABEL_9:
v7 = v12 + 1; /*0xffca696c*/
v12 = v7; /*0xffca6972*/
if ( v7 >= *(_BYTE *)(SocketInfo + v5 + 3) ) /*0xffca697a*/
goto LABEL_10; /*0xffca697a*/
}
}
// Function: KtiFunc69A4 @ 0xffca69a4 (0xd2 bytes)
// Index: 1287/2560
char __cdecl KtiFunc69A4(int a1)
{
unsigned __int8 n4; // bl
unsigned __int8 n6; // bh
int SocketInfo; // edi
int v5; // ebp
int CpuCount; // edx
unsigned __int8 v7; // al
unsigned __int8 v9; // [esp+10h] [ebp-Ch]
unsigned __int8 v10; // [esp+14h] [ebp-8h]
int CpuCount_1; // [esp+18h] [ebp-4h]
unsigned __int8 v12; // [esp+20h] [ebp+4h]
n4 = 0; /*0xffca69ae*/
v9 = 0; /*0xffca69b1*/
while ( !*(_BYTE *)(48704 * n4 + a1 + 258689) ) /*0xffca69c6*/
{
LABEL_11:
v9 = ++n4; /*0xffca6a5b*/
if ( n4 >= 4u ) /*0xffca6a62*/
return 0; /*0xffca6a71*/
}
n6 = 0; /*0xffca69d7*/
SocketInfo = GetSocketInfo(a1, v9); /*0xffca69d9*/
v10 = 0; /*0xffca69dc*/
while ( 1 ) /*0xffca69e3*/
{
v5 = 7688 * n6; /*0xffca69e3*/
if ( *(_BYTE *)(SocketInfo + v5) ) /*0xffca69e9*/
{
CpuCount = GetCpuCount(a1, v9, v10); /*0xffca69fd*/
v7 = 0; /*0xffca6a02*/
CpuCount_1 = CpuCount; /*0xffca6a04*/
v12 = 0; /*0xffca6a08*/
if ( *(_BYTE *)(SocketInfo + v5 + 3) ) /*0xffca6a0c*/
break; /*0xffca6a0c*/
}
LABEL_10:
v10 = ++n6; /*0xffca6a50*/
if ( n6 >= 6u ) /*0xffca6a57*/
goto LABEL_11; /*0xffca6a57*/
}
while ( 1 ) /*0xffca6a12*/
{
if ( !*(_BYTE *)(1379 * v7 + CpuCount) ) /*0xffca6a1f*/
goto LABEL_9; /*0xffca6a1f*/
if ( KtiFuncCB2E(a1, v9, v10, v12) ) /*0xffca6a2e*/
return 1; /*0xffca6a6a*/
CpuCount = CpuCount_1; /*0xffca6a3a*/
LABEL_9:
v7 = v12 + 1; /*0xffca6a3e*/
v12 = v7; /*0xffca6a44*/
if ( v7 >= *(_BYTE *)(SocketInfo + v5 + 3) ) /*0xffca6a4c*/
goto LABEL_10; /*0xffca6a4c*/
}
}
// Function: IioResetCheck @ 0xffca6a76 (0x113 bytes)
// Index: 1288/2560
int __cdecl IioResetCheck(int __return_address)
{
_BYTE *v1; // edi
unsigned __int8 n4_1; // bl
unsigned __int8 n4; // [esp+14h] [ebp-21D0h]
unsigned int n4_; // [esp+18h] [ebp-21CCh] BYREF
char v6[4]; // [esp+1A5Bh] [ebp-789h] BYREF
_BYTE v7[1876]; // [esp+1A90h] [ebp-754h] BYREF
*(_DWORD *)(__return_address + 246324) = __return_address; /*0xffca6a88*/
KtiFunc703D(__return_address); /*0xffca6a8e*/
IioTailFuncCA0D((int)v6, (char *)(__return_address + 244459), 1926); /*0xffca6aa9*/
IioTailFuncCA0D((int)&n4_, (char *)(__return_address + 1570), 6723); /*0xffca6abf*/
v1 = v7; /*0xffca6ac7*/
n4_1 = 0; /*0xffca6ace*/
n4 = 0; /*0xffca6ad0*/
do /*0xffca6b02*/
{
if ( *v1 ) /*0xffca6ad4*/
{
IioTailFuncD449((int *)&n4_, n4); /*0xffca6ae2*/
IioTailFuncD59A((int)&n4_, n4); /*0xffca6af0*/
}
++n4_1; /*0xffca6af8*/
++v1; /*0xffca6afa*/
n4 = n4_1; /*0xffca6afb*/
}
while ( n4_1 < 4u ); /*0xffca6b02*/
if ( !*(_BYTE *)(__return_address + 246400) ) /*0xffca6b04*/
{
nullsub_5(); /*0xffca6b1d*/
IioTailFuncD1C2((unsigned int)&n4_); /*0xffca6b27*/
nullsub_5(); /*0xffca6b37*/
}
if ( v7[1872] ) /*0xffca6b47*/
*(_BYTE *)(__return_address + 246400) |= 2u; /*0xffca6b49*/
IioTailFuncCA0D(__return_address + 244459, v6, 1926); /*0xffca6b5e*/
IioTailFuncCA0D(__return_address + 1570, (char *)&n4_, 6723); /*0xffca6b74*/
return 0; /*0xffca6b7e*/
}
// Function: PostMrcInitConfig @ 0xffca6b89 (0xc6 bytes)
// Index: 1289/2560
int __cdecl PostMrcInitConfig(int __return_address)
{
char src[4]; // [esp+14h] [ebp-21CCh] BYREF
char v3[4]; // [esp+1A57h] [ebp-789h] BYREF
IioTailFuncCA0D((int)v3, (char *)(__return_address + 244459), 1926); /*0xffca6bae*/
IioTailFuncCA0D((int)src, (char *)(__return_address + 1570), 6723); /*0xffca6bc4*/
nullsub_5(src, 0x80000000); /*0xffca6bd9*/
IioTailFuncCC9D((int)src); /*0xffca6be3*/
IioTailFuncE547(src); /*0xffca6bed*/
KtiFunc6C4F(__return_address, src); /*0xffca6bf8*/
nullsub_5(src, 0x80000000); /*0xffca6c08*/
KtiFunc758E(src); /*0xffca6c15*/
IioTailFuncCA0D(__return_address + 244459, v3, 1926); /*0xffca6c2a*/
IioTailFuncCA0D(__return_address + 1570, src, 6723); /*0xffca6c3a*/
return 0; /*0xffca6c44*/
}
// Function: KtiFunc6C4F @ 0xffca6c4f (0x180 bytes)
// Index: 1290/2560
_BYTE *__cdecl KtiFunc6C4F(int __return_address, _BYTE *src)
{
unsigned __int8 n4; // bl
_BYTE *result; // eax
char *v4; // ecx
unsigned __int8 n0x15; // bh
char *v6; // edi
unsigned int v7; // edx
unsigned int v8; // eax
char v9; // cl
unsigned int v10; // eax
char v11; // cl
unsigned __int8 n0x15_3; // [esp+10h] [ebp-54h]
unsigned __int8 n4_3; // [esp+14h] [ebp-50h]
unsigned int v14; // [esp+18h] [ebp-4Ch]
_BYTE *v15; // [esp+1Ch] [ebp-48h]
char *v16; // [esp+20h] [ebp-44h]
unsigned int v17; // [esp+24h] [ebp-40h]
int n9; // [esp+2Ch] [ebp-38h] BYREF
__int16 n25; // [esp+30h] [ebp-34h]
int v20; // [esp+32h] [ebp-32h]
unsigned __int8 n4_1; // [esp+3Ah] [ebp-2Ah]
char v22; // [esp+3Bh] [ebp-29h]
unsigned __int8 n0x15_1; // [esp+3Ch] [ebp-28h]
char v24; // [esp+43h] [ebp-21h]
char v25; // [esp+44h] [ebp-20h]
int n8; // [esp+48h] [ebp-1Ch] BYREF
__int16 n25_1; // [esp+4Ch] [ebp-18h]
int v28; // [esp+4Eh] [ebp-16h]
unsigned __int8 n4_2; // [esp+56h] [ebp-Eh]
char v30; // [esp+57h] [ebp-Dh]
unsigned __int8 n0x15_2; // [esp+58h] [ebp-Ch]
char v32; // [esp+5Fh] [ebp-5h]
char v33; // [esp+60h] [ebp-4h]
n4 = 0; /*0xffca6c58*/
n4_3 = 0; /*0xffca6c5c*/
result = src + 6776; /*0xffca6c60*/
v4 = src + 7008; /*0xffca6c66*/
v15 = src + 6776; /*0xffca6c6c*/
v16 = src + 7008; /*0xffca6c70*/
do /*0xffca6dc1*/
{
if ( *result ) /*0xffca6c74*/
{
n0x15 = 0; /*0xffca6c7d*/
v6 = v4; /*0xffca6c7f*/
n0x15_3 = 0; /*0xffca6c81*/
do /*0xffca6d9e*/
{
if ( v6[740] && IioTailFuncCEB0((int)src, n4_3, n0x15_3) != 1 ) /*0xffca6ca5*/
{
LOWORD(v14) = IioTailFuncC97F((int)src, n4_3, n0x15_3, 234889378); /*0xffca6cce*/
LOWORD(v8) = IioTailFuncC97F((int)src, n4_3, n0x15_3, 234897564); /*0xffca6cd4*/
v7 = (unsigned __int16)v14; /*0xffca6cdc*/
v8 = (unsigned __int16)v8; /*0xffca6cdf*/
v17 = (unsigned __int16)v8; /*0xffca6ce6*/
if ( (((unsigned __int8)v8 ^ (unsigned __int8)v14) & 0xF) != 0 ) /*0xffca6cf4*/
{
v9 = *v6; /*0xffca6cf6*/
v24 = v8 & 0xF; /*0xffca6cfa*/
n25 = 25; /*0xffca6d04*/
v25 = v14 & 0xF; /*0xffca6d09*/
n9 = 9; /*0xffca6d16*/
v20 = 1; /*0xffca6d1e*/
n4_1 = n4; /*0xffca6d26*/
v22 = v9; /*0xffca6d2a*/
n0x15_1 = n0x15; /*0xffca6d2e*/
KtiFunc7B13(__return_address, (int)&n9); /*0xffca6d32*/
v8 = v17; /*0xffca6d37*/
v7 = (unsigned __int16)v14; /*0xffca6d3b*/
}
v10 = v8 >> 4; /*0xffca6d41*/
if ( (((unsigned __int8)v10 ^ (unsigned __int8)(v7 >> 4)) & 0x3F) != 0 ) /*0xffca6d4c*/
{
v11 = *v6; /*0xffca6d4e*/
v32 = v10 & 0x3F; /*0xffca6d52*/
n25_1 = 25; /*0xffca6d5f*/
v33 = (v14 >> 4) & 0x3F; /*0xffca6d64*/
n8 = 8; /*0xffca6d71*/
v28 = 1; /*0xffca6d79*/
n4_2 = n4; /*0xffca6d81*/
v30 = v11; /*0xffca6d85*/
n0x15_2 = n0x15; /*0xffca6d89*/
KtiFunc7B13(__return_address, (int)&n8); /*0xffca6d8d*/
}
}
++n0x15; /*0xffca6d94*/
++v6; /*0xffca6d96*/
n0x15_3 = n0x15; /*0xffca6d97*/
}
while ( n0x15 < 0x15u ); /*0xffca6d9e*/
result = v15; /*0xffca6da4*/
v4 = v16; /*0xffca6da8*/
}
++n4; /*0xffca6dac*/
v4 += 21; /*0xffca6dae*/
++result; /*0xffca6db1*/
n4_3 = n4; /*0xffca6db2*/
v15 = result; /*0xffca6db6*/
v16 = v4; /*0xffca6dba*/
}
while ( n4 < 4u ); /*0xffca6dc1*/
return result; /*0xffca6dc7*/
}
// Function: KtiFunc6DCF @ 0xffca6dcf (0x26e bytes)
// Index: 1291/2560
void __cdecl KtiFunc6DCF(int __return_address, int src, int n4)
{
unsigned int n3; // esi
_BYTE *v5; // ebx
int n21; // edx
_BYTE *v7; // ebp
unsigned int v8; // ecx
int v9; // eax
int n4_1; // edx
unsigned __int8 n4_2; // bl
int v12; // ebp
int v13; // ecx
__int16 v14; // ax
int v15; // [esp+18h] [ebp-4h]
int v16; // [esp+20h] [ebp+4h]
v15 = 351 * (unsigned __int8)n4; /*0xffca6deb*/
*(_BYTE *)((unsigned __int8)n4 + src + 6780) = *(_BYTE *)(v15 + __return_address + 255743); /*0xffca6e06*/
*(_BYTE *)((unsigned __int8)n4 + src + 6784) = *(_BYTE *)(v15 + __return_address + 255744); /*0xffca6e14*/
*(_BYTE *)((unsigned __int8)n4 + src + 6788) = *(_BYTE *)((unsigned __int8)n4 + __return_address + 255497); /*0xffca6e22*/
*(_DWORD *)(src + 8 * (unsigned __int8)n4 + 6792) = *(_DWORD *)(v15 + __return_address + 255781); /*0xffca6e30*/
*(_DWORD *)(src + 8 * (unsigned __int8)n4 + 6796) = *(_DWORD *)(v15 + __return_address + 255785); /*0xffca6e44*/
*(_BYTE *)((unsigned __int8)n4 + src + 6824) = *(_BYTE *)((unsigned __int8)n4 + __return_address + 255537); /*0xffca6e52*/
n3 = 3; /*0xffca6e59*/
v16 = 9 * (unsigned __int8)n4; /*0xffca6e64*/
v5 = (_BYTE *)(3 * (unsigned __int8)n4 + src + 7832); /*0xffca6e6b*/
n21 = 21; /*0xffca6e70*/
v7 = (_BYTE *)(21 * (unsigned __int8)n4 + src + 7008); /*0xffca6e71*/
do /*0xffca6e98*/
{
v8 = n3 >> 2; /*0xffca6e75*/
v9 = 39 * (v16 + (unsigned __int8)(n3++ >> 2)); /*0xffca6e7f*/
*(v7 - 84) = *(_BYTE *)(v9 + __return_address + 255791); /*0xffca6e8a*/
*v7++ = v8; /*0xffca6e8d*/
*v5++ = 0; /*0xffca6e91*/
--n21; /*0xffca6e95*/
}
while ( n21 ); /*0xffca6e98*/
n4_1 = (unsigned __int8)n4; /*0xffca6e9a*/
*(_BYTE *)((unsigned __int8)n4 + src + 7092) = *(_BYTE *)((unsigned __int8)n4 + __return_address + 255533); /*0xffca6ead*/
*(_DWORD *)(src + 4 * (unsigned __int8)n4 + 7100) = *(_DWORD *)(v15 + __return_address + 255757); /*0xffca6ebb*/
n4_2 = 0; /*0xffca6ec9*/
*(_DWORD *)(src + 4 * (unsigned __int8)n4 + 7116) = *(_DWORD *)(v15 + __return_address + 255761); /*0xffca6ecb*/
do /*0xffca6fbe*/
{
if ( ((unsigned __int8)(1 << n4_2) & *(_BYTE *)(n4_1 + src + 6788)) != 0 ) /*0xffca6ee5*/
{
v12 = 39 * (n4_2 + v16); /*0xffca6ef1*/
*(_BYTE *)(n4_2 + 6 * (n4_1 + 1142) + src) = *(_BYTE *)(__return_address + v12 + 255791); /*0xffca6f08*/
*(_BYTE *)(n4_2 + 6 * (n4_1 + 1146) + src) = *(_BYTE *)(__return_address + v12 + 255791); /*0xffca6f1f*/
*(_BYTE *)(n4_2 + 6 * (n4_1 + 1150) + src) = *(_BYTE *)(__return_address + v12 + 255792); /*0xffca6f36*/
v13 = n4_2 + 6 * n4_1; /*0xffca6f4c*/
*(_DWORD *)(src + 4 * v13 + 7229) = *(_DWORD *)(__return_address + v12 + 255809) & 0xFFFFC000; /*0xffca6f50*/
if ( *(_BYTE *)(n4_1 + __return_address + 257244) && n4_2 == 4 ) /*0xffca6f64*/
{
*(_DWORD *)(src + 24 * n4_1 + 7245) = (*(_DWORD *)(351 * (unsigned __int8)n4 + __return_address + 255965) /*0xffca6f80*/
- 0x400000)
& 0xFFFFC000;
n4_1 = (unsigned __int8)n4; /*0xffca6f87*/
}
*(_DWORD *)(src + 4 * v13 + 7325) = *(_DWORD *)(__return_address + v12 + 255797); /*0xffca6f92*/
*(_DWORD *)(src + 4 * v13 + 7133) = *(_DWORD *)(__return_address + v12 + 255809); /*0xffca6fa0*/
if ( *(_BYTE *)(__return_address + v12 + 255790) == 2 ) /*0xffca6faf*/
*(_BYTE *)(n4_1 + src + 7446) = 2; /*0xffca6fb1*/
}
++n4_2; /*0xffca6fb9*/
}
while ( n4_2 < 6u ); /*0xffca6fbe*/
if ( *(_BYTE *)(n4_1 + __return_address + 257248) ) /*0xffca6fc4*/
*(_BYTE *)(n4_1 + src + 7446) = 3; /*0xffca6fce*/
IioTailFuncD3A4(src, n4); /*0xffca6fdc*/
if ( !(_BYTE)n4 ) /*0xffca6fe5*/
{
*(_DWORD *)(src + 7421) = *(_DWORD *)(src + 7229) + 0x2000; /*0xffca6ff2*/
*(_DWORD *)(src + 7096) = *(_DWORD *)(src + 7325); /*0xffca7000*/
v14 = IioTailFuncC774(src, 0, *(_BYTE *)(src + 6852), 31, 2, 64); /*0xffca7017*/
*(_DWORD *)(src + 7437) = -50331648; /*0xffca7025*/
*(_DWORD *)(src + 7433) = v14 & 0xFFFE; /*0xffca702f*/
}
}
// Function: KtiFunc703D @ 0xffca703d (0x2b0 bytes)
// Index: 1292/2560
char __cdecl KtiFunc703D(int __return_address)
{
int v1; // eax
_DWORD *v2; // ebp
int v3; // edi
_BYTE *v4; // edi
int v5; // ebp
int v6; // eax
int n4_2; // ecx
char n4a_1; // bl
int v9; // esi
unsigned __int8 v10; // al
char v11; // cl
int n4; // [esp+10h] [ebp-21E4h]
char n4a; // [esp+10h] [ebp-21E4h]
_DWORD *v15; // [esp+14h] [ebp-21E0h]
int v16; // [esp+14h] [ebp-21E0h]
_BYTE *v17; // [esp+18h] [ebp-21DCh]
int n4_1; // [esp+1Ch] [ebp-21D8h]
int src[1680]; // [esp+28h] [ebp-21CCh] BYREF
char v20[6]; // [esp+1A6Bh] [ebp-789h] BYREF
int v21; // [esp+1A71h] [ebp-783h]
char v22; // [esp+1A9Bh] [ebp-759h]
char v23; // [esp+1A9Ch] [ebp-758h]
_BYTE v24[16]; // [esp+1AA0h] [ebp-754h] BYREF
_BYTE v25[633]; // [esp+1AB0h] [ebp-744h] BYREF
int v26; // [esp+1D29h] [ebp-4CBh]
int v27; // [esp+1D2Dh] [ebp-4C7h]
char v28; // [esp+1D3Dh] [ebp-4B7h]
char v29; // [esp+1D5Ah] [ebp-49Ah]
_BYTE v30[1176]; // [esp+1D5Ch] [ebp-498h] BYREF
IioTailFuncCA0D((int)v20, (char *)(__return_address + 244459), 1926); /*0xffca7066*/
IioTailFuncCA0D((int)src, (char *)(__return_address + 1570), 6723); /*0xffca7080*/
v1 = *(_DWORD *)(__return_address + 246764); /*0xffca7085*/
v27 = 0; /*0xffca708b*/
v26 = v1; /*0xffca7093*/
v22 = 0; /*0xffca709f*/
IioTailX_FFD16023((int)src); /*0xffca70a7*/
v20[0] = *(_BYTE *)(__return_address + 246412); /*0xffca70b9*/
v2 = v25; /*0xffca70c0*/
v20[1] = *(_BYTE *)(__return_address + 246424); /*0xffca70d0*/
v3 = 0; /*0xffca70d7*/
v20[4] = *(_BYTE *)(__return_address + 257172); /*0xffca70df*/
v21 = *(_DWORD *)(__return_address + 255584); /*0xffca70ec*/
v20[3] = *(_BYTE *)(__return_address + 255602); /*0xffca70f9*/
v20[5] = *(_BYTE *)(__return_address + 255479); /*0xffca7106*/
v25[340] = *(_BYTE *)(__return_address + 255588); /*0xffca7113*/
v28 = *(_BYTE *)(__return_address + 246408); /*0xffca7120*/
v29 = *(_BYTE *)(__return_address + 8303); /*0xffca712d*/
v15 = (_DWORD *)(__return_address + 255560); /*0xffca713a*/
v23 = 0; /*0xffca7142*/
LOBYTE(n4) = 0; /*0xffca714a*/
n4_1 = 4; /*0xffca7153*/
do /*0xffca7210*/
{
nullsub_5(); /*0xffca717b*/
v24[v3] = ((1 << v3) & *(_DWORD *)(__return_address + 246468)) != 0; /*0xffca7189*/
nullsub_5(); /*0xffca71a4*/
v30[v3] = v30[v3 + 257244 + __return_address - (_DWORD)v30]; /*0xffca71c2*/
if ( v24[v3] ) /*0xffca71c4*/
{
v2[1] = *(v15 - 4); /*0xffca71d5*/
*v2 = *v15; /*0xffca71da*/
KtiFunc6DCF(__return_address, (int)src, n4); /*0xffca71e3*/
IioTailFuncCF0D(src, n4); /*0xffca71f1*/
}
++v15; /*0xffca7202*/
++v3; /*0xffca7206*/
LOBYTE(n4) = n4 + 1; /*0xffca7207*/
v2 += 2; /*0xffca720b*/
}
while ( (unsigned __int8)n4 < 4u ); /*0xffca7210*/
IioTailX_FFD1614E((int)src); /*0xffca721b*/
IioTailX_FFD1617B((int)src); /*0xffca7225*/
IioTailX_FFD160C3((int)src); /*0xffca722f*/
v4 = v24; /*0xffca7237*/
v5 = 0; /*0xffca723e*/
v17 = v24; /*0xffca7240*/
v6 = 0; /*0xffca7244*/
v16 = 0; /*0xffca7246*/
n4_2 = 4; /*0xffca724c*/
do /*0xffca72b4*/
{
if ( *v4 ) /*0xffca724d*/
{
n4a_1 = 0; /*0xffca7256*/
n4a = 0; /*0xffca7258*/
v9 = 0; /*0xffca725c*/
do /*0xffca7290*/
{
v10 = IioTailFuncCE55(n4a); /*0xffca7262*/
if ( v10 != 0xFF ) /*0xffca726a*/
{
v11 = *((_BYTE *)&src[1108] + v16 + v10 + 2); /*0xffca7271*/
if ( v11 ) /*0xffca727a*/
v30[v9 + 356 + v5] = v11; /*0xffca727f*/
}
++n4a_1; /*0xffca7286*/
++v9; /*0xffca7288*/
n4a = n4a_1; /*0xffca7289*/
}
while ( (unsigned __int8)n4a_1 < 0x15u ); /*0xffca7290*/
v4 = v17; /*0xffca7292*/
v6 = v16; /*0xffca7296*/
n4_2 = n4_1; /*0xffca729a*/
}
++v4; /*0xffca729e*/
v6 += 3; /*0xffca729f*/
v5 += 21; /*0xffca72a2*/
v17 = v4; /*0xffca72a5*/
--n4_2; /*0xffca72a9*/
v16 = v6; /*0xffca72ac*/
n4_1 = n4_2; /*0xffca72b0*/
}
while ( n4_2 ); /*0xffca72b4*/
IioTailFuncCA0D(__return_address + 244459, v20, 1926); /*0xffca72c7*/
return IioTailFuncCA0D(__return_address + 1570, (char *)src, 6723); /*0xffca72e2*/
}
// Function: KtiFunc72ED @ 0xffca72ed (0x5a bytes)
// Index: 1293/2560
int __cdecl KtiFunc72ED()
{
int v0; // eax
int v2; // [esp+4h] [ebp-4h] BYREF
v0 = AutoGenFuncFD5B(); /*0xffca72f2*/
if ( (*(int (__cdecl **)(int, void *, _DWORD, _DWORD, int *))(*(_DWORD *)v0 + 32))(v0, &unk_FFD514D4, 0, 0, &v2) ) /*0xffca7307*/
{
nullsub_5(); /*0xffca732b*/
IioTailFuncCA08(); /*0xffca7334*/
}
return (*(int (**)(void))(v2 + 12))(); /*0xffca7342*/
}
// Function: KtiFunc7347 @ 0xffca7347 (0x5a bytes)
// Index: 1294/2560
int __cdecl KtiFunc7347()
{
int v0; // eax
int v2; // [esp+4h] [ebp-4h] BYREF
v0 = AutoGenFuncFD5B(); /*0xffca734c*/
if ( (*(int (__cdecl **)(int, void *, _DWORD, _DWORD, int *))(*(_DWORD *)v0 + 32))(v0, &unk_FFD514D4, 0, 0, &v2) ) /*0xffca7361*/
{
nullsub_5(); /*0xffca7385*/
IioTailFuncCA08(); /*0xffca738e*/
}
return (*(int (**)(void))(v2 + 16))(); /*0xffca739c*/
}
// Function: KtiFunc73A1 @ 0xffca73a1 (0xa5 bytes)
// Index: 1295/2560
int __cdecl KtiFunc73A1(_BYTE *n4)
{
int v1; // eax
int result; // eax
int v3; // [esp+10h] [ebp-2Ch] BYREF
int buf[10]; // [esp+14h] [ebp-28h] BYREF
v1 = AutoGenFuncFD5B(); /*0xffca73a8*/
if ( (*(int (__cdecl **)(int, void *, _DWORD, _DWORD, int *))(*(_DWORD *)v1 + 32))(v1, &unk_FFD514D4, 0, 0, &v3) ) /*0xffca73be*/
{
nullsub_5(); /*0xffca73e6*/
IioTailFuncCA08(); /*0xffca73ed*/
}
AutoGenFunc193((int)buf, 0x28u); /*0xffca73fc*/
KtiFunc74E8(n4, buf); /*0xffca7407*/
result = (*(int (__cdecl **)(int *))(v3 + 8))(buf); /*0xffca7415*/
if ( result ) /*0xffca741f*/
{
nullsub_5(); /*0xffca742f*/
return IioTailFuncCA08(); /*0xffca7436*/
}
return result; /*0xffca743e*/
}
// Function: KtiFunc7446 @ 0xffca7446 (0xa2 bytes)
// Index: 1296/2560
int __cdecl KtiFunc7446(_BYTE *n4)
{
int v1; // eax
int result; // eax
int v3; // [esp+10h] [ebp-2Ch] BYREF
int buf[10]; // [esp+14h] [ebp-28h] BYREF
v1 = AutoGenFuncFD5B(); /*0xffca744d*/
if ( (*(int (__cdecl **)(int, void *, _DWORD, _DWORD, int *))(*(_DWORD *)v1 + 32))(v1, &unk_FFD514D4, 0, 0, &v3) ) /*0xffca7463*/
{
nullsub_5(); /*0xffca7488*/
IioTailFuncCA08(); /*0xffca748f*/
}
AutoGenFunc193((int)buf, 0x28u); /*0xffca749e*/
KtiFunc74E8(n4, buf); /*0xffca74a9*/
result = (*(int (__cdecl **)(int *))(v3 + 4))(buf); /*0xffca74b7*/
if ( result ) /*0xffca74c1*/
{
nullsub_5(); /*0xffca74d1*/
return IioTailFuncCA08(); /*0xffca74d8*/
}
return result; /*0xffca74e0*/
}
// Function: KtiFunc74E8 @ 0xffca74e8 (0xa6 bytes)
// Index: 1297/2560
int __cdecl KtiFunc74E8(_BYTE *n4, int *buf)
{
int v2; // eax
int *buf_1; // ecx
_DWORD *v4; // esi
int n8; // edx
int result; // eax
void (__cdecl **v7)(int *); // [esp+8h] [ebp-4h] BYREF
v2 = AutoGenFuncFD5B(); /*0xffca74ee*/
if ( (*(int (__cdecl **)(int, void *, _DWORD, _DWORD, void (__cdecl ***)(int *)))(*(_DWORD *)v2 + 32))( /*0xffca7503*/
v2,
&unk_FFD514D4,
0,
0,
&v7) )
{
nullsub_5(); /*0xffca7525*/
IioTailFuncCA08(); /*0xffca752c*/
}
(*v7)(buf); /*0xffca753b*/
*((_BYTE *)buf + 34) = n4[6734]; /*0xffca7543*/
*((_BYTE *)buf + 36) = n4[6735]; /*0xffca754c*/
n4[6737] = *((_BYTE *)buf + 35); /*0xffca7553*/
buf_1 = buf; /*0xffca7559*/
n4[6738] = *((_BYTE *)buf + 37); /*0xffca7560*/
v4 = n4 + 6739; /*0xffca7566*/
n8 = 8; /*0xffca756c*/
do /*0xffca7586*/
{
if ( !*((_BYTE *)buf + 2 * *buf_1 + 32) ) /*0xffca756f*/
*buf_1 = 0; /*0xffca7576*/
result = *buf_1++; /*0xffca7579*/
*v4++ = result; /*0xffca757e*/
--n8; /*0xffca7583*/
}
while ( n8 ); /*0xffca7586*/
return result; /*0xffca7588*/
}
// Function: KtiFunc758E @ 0xffca758e (0x62 bytes)
// Index: 1298/2560
int __cdecl KtiFunc758E(char *src)
{
int v2; // [esp-Ch] [ebp-14h]
if ( !AutoGenFuncB35((int)&unk_FFD51464, src, 0x21C9u) ) /*0xffca759f*/
{
nullsub_5(src, 0x80000000); /*0xffca75c6*/
IioTailFuncCA08((int)src, 0); /*0xffca75ce*/
}
nullsub_5(src, 0x80000000); /*0xffca75dd*/
IioTailX_FFD16121(src, v2); /*0xffca75e3*/
return 0; /*0xffca75ed*/
}
// Function: KtiFunc75F0 @ 0xffca75f0 (0x63 bytes)
// Index: 1299/2560
int __cdecl KtiFunc75F0(int __return_address)
{
int v1; // esi
int v3; // [esp-4h] [ebp-14h]
int v4; // [esp+Ch] [ebp-4h] BYREF
v4 = 0; /*0xffca75fc*/
v1 = -2147483634; /*0xffca75ff*/
if ( __return_address
&& !*(_DWORD *)(__return_address + 628676)
&& (*(int (__cdecl **)(_DWORD, void *, _DWORD, _DWORD, int *))(**(_DWORD **)(__return_address + 251104) + 32))(
*(_DWORD *)(__return_address + 251104),
&unk_FFD514A4,
0,
0,
&v4) >= 0 )
{
v3 = v4; /*0xffca7631*/
*(_DWORD *)(__return_address + 628676) = v4; /*0xffca763a*/
AssertPrint((_BYTE *)__return_address, 2, (int)"CacheMrcOemHooksPpi in HOST: Host->MrcOemHooksPpi = %08x\n", v3);
return 0; /*0xffca7648*/
}
return v1; /*0xffca764a*/
}
// Function: SkuingDataInit @ 0xffca7653 (0x20 bytes)
// Index: 1300/2560
char __cdecl SkuingDataInit(int __return_address)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7659*/
if ( result ) /*0xffca7661*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 328))(__return_address); /*0xffca766a*/
return result; /*0xffca7671*/
}
// Function: CheckPpiAvailable @ 0xffca7673 (0x2b bytes)
// Index: 1301/2560
char __cdecl CheckPpiAvailable(int a1)
{
char v1; // bl
v1 = 0; /*0xffca7678*/
if ( a1 && *(_DWORD *)(a1 + 628676) ) /*0xffca767e*/
return 1; /*0xffca7686*/
AssertPrint((_BYTE *)a1, 1, (int)"MrcOemHooksPpi used before available!\n"); /*0xffca7692*/
return v1; /*0xffca769c*/
}
// Function: KtiFunc769E @ 0xffca769e (0x1d bytes)
// Index: 1302/2560
char __cdecl KtiFunc769E(int __return_address)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca76a4*/
if ( result ) /*0xffca76ac*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 32))(__return_address); /*0xffca76b5*/
return result; /*0xffca76b9*/
}
// Function: KtiFunc76BB @ 0xffca76bb (0x20 bytes)
// Index: 1303/2560
char __cdecl KtiFunc76BB(int n4)
{
char result; // al
result = CheckPpiAvailable(n4); /*0xffca76c1*/
if ( result ) /*0xffca76c9*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(n4 + 628676) + 324))(n4); /*0xffca76d2*/
return result; /*0xffca76d9*/
}
// Function: KtiFunc76DB @ 0xffca76db (0x1d bytes)
// Index: 1304/2560
char __cdecl KtiFunc76DB(int __return_address)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca76e1*/
if ( result ) /*0xffca76e9*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 28))(__return_address); /*0xffca76f2*/
return result; /*0xffca76f6*/
}
// Function: PlatformPostInit @ 0xffca76f8 (0x1d bytes)
// Index: 1305/2560
char __cdecl PlatformPostInit(int __return_address)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca76fe*/
if ( result ) /*0xffca7706*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 24))(__return_address); /*0xffca770f*/
return result; /*0xffca7713*/
}
// Function: RcAssertPrint @ 0xffca7715 (0x23 bytes)
// Index: 1306/2560
unsigned __int8 RcAssertPrint(_BYTE *a1, unsigned __int8 a2, int a3, ...)
{
unsigned __int8 result; // al
va_list va; // [esp+10h] [ebp+10h] BYREF
va_start(va, a3);
result = a2; /*0xffca7719*/
if ( (a2 & a1[8301]) != 0 ) /*0xffca7723*/
return LogFormatString(a1, a3, (char *)va); /*0xffca772f*/
return result; /*0xffca7737*/
}
// Function: CheckAndDispatch @ 0xffca7738 (0x25 bytes)
// Index: 1307/2560
char __cdecl CheckAndDispatch(int __return_address)
{
char v1; // bl
v1 = 1; /*0xffca773e*/
if ( (unsigned __int8)CheckPpiAvailable(__return_address) ) /*0xffca7741*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 52))(__return_address); /*0xffca7756*/
return v1; /*0xffca7758*/
}
// Function: KtiFunc775D @ 0xffca775d (0x28 bytes)
// Index: 1308/2560
int __cdecl KtiFunc775D(int __return_address)
{
int v1; // edi
v1 = 0; /*0xffca7764*/
if ( CheckPpiAvailable(__return_address) ) /*0xffca7766*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 256))(__return_address); /*0xffca777e*/
return v1; /*0xffca7782*/
}
// Function: KtiFunc7785 @ 0xffca7785 (0x39 bytes)
// Index: 1309/2560
char __cdecl KtiFunc7785(int src, _BYTE *srca, char src_, int a4, int a5, int a6, int a7, char a8)
{
char result; // al
int v9; // eax
_BYTE src_1[36]; // [esp-18h] [ebp-24h] BYREF
result = CheckPpiAvailable(src); /*0xffca778d*/
if ( result ) /*0xffca7795*/
{
v9 = *(_DWORD *)(src + 628676); /*0xffca779a*/
qmemcpy(src_1, &src_, 0x14u); /*0xffca77ad*/
src_1[20] = a8; /*0xffca77b0*/
return (*(char (__cdecl **)(int, _BYTE *))(v9 + 260))(src, srca); /*0xffca77b1*/
}
return result; /*0xffca77ba*/
}
// Function: KtiFunc77BE @ 0xffca77be (0x20 bytes)
// Index: 1310/2560
char __cdecl KtiFunc77BE(int a1)
{
char result; // al
result = CheckPpiAvailable(a1); /*0xffca77c4*/
if ( result ) /*0xffca77cc*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(a1 + 628676) + 332))(a1); /*0xffca77d5*/
return result; /*0xffca77dc*/
}
// Function: KtiFunc77DE @ 0xffca77de (0x1d bytes)
// Index: 1311/2560
char __cdecl KtiFunc77DE(int __return_address)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca77e4*/
if ( result ) /*0xffca77ec*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 60))(__return_address); /*0xffca77f5*/
return result; /*0xffca77f9*/
}
// Function: KtiFunc77FB @ 0xffca77fb (0x1d bytes)
// Index: 1312/2560
char __cdecl KtiFunc77FB(int __return_address)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7801*/
if ( result ) /*0xffca7809*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 56))(__return_address); /*0xffca7812*/
return result; /*0xffca7816*/
}
// Function: KtiFunc7818 @ 0xffca7818 (0x20 bytes)
// Index: 1313/2560
char __cdecl KtiFunc7818(int __return_address)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca781e*/
if ( result ) /*0xffca7826*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 220))(__return_address); /*0xffca782f*/
return result; /*0xffca7836*/
}
// Function: PlatformDataEarlyInit @ 0xffca7838 (0x33 bytes)
// Index: 1314/2560
char __cdecl PlatformDataEarlyInit(int __return_address)
{
int v1; // eax
char result; // al
v1 = KtiFunc75F0(__return_address); /*0xffca783e*/
AssertPrint((_BYTE *)__return_address, 1, (int)"CacheMrcOemHooksPpi() status = %08x\n", v1); /*0xffca784c*/
result = CheckPpiAvailable(__return_address); /*0xffca7852*/
if ( result ) /*0xffca785c*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 4))(__return_address); /*0xffca7865*/
return result; /*0xffca7869*/
}
// Function: KtiFunc786B @ 0xffca786b (0x25 bytes)
// Index: 1315/2560
char __cdecl KtiFunc786B(int __return_address, int n4)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7871*/
if ( result ) /*0xffca7879*/
return (*(int (__cdecl **)(int, int))(*(_DWORD *)(__return_address + 628676) + 216))(__return_address, n4); /*0xffca7886*/
return result; /*0xffca788e*/
}
// Function: KtiFunc7890 @ 0xffca7890 (0x39 bytes)
// Index: 1316/2560
int __cdecl KtiFunc7890(int __return_address, int n4, int n2, int a4, int a5)
{
int v5; // edi
v5 = 0; /*0xffca7899*/
if ( CheckPpiAvailable(__return_address) ) /*0xffca789b*/
return (*(int (__cdecl **)(int, int, int, int, int))(*(_DWORD *)(__return_address + 628676) + 188))( /*0xffca78c1*/
__return_address,
n4,
n2,
a4,
a5);
return v5; /*0xffca78c5*/
}
// Function: KtiFunc78C9 @ 0xffca78c9 (0x2a bytes)
// Index: 1317/2560
char __cdecl KtiFunc78C9(int n6, int a2, int p_i)
{
char result; // al
result = CheckPpiAvailable(n6); /*0xffca78cf*/
if ( result ) /*0xffca78d7*/
return (*(char (__cdecl **)(int, int, int))(*(_DWORD *)(n6 + 628676) + 164))(n6, a2, p_i); /*0xffca78e8*/
return result; /*0xffca78f1*/
}
// Function: KtiFunc78F3 @ 0xffca78f3 (0x2a bytes)
// Index: 1318/2560
char __cdecl KtiFunc78F3(_BYTE *p_n42, _BYTE **a2, int *p_n80)
{
char result; // al
result = CheckPpiAvailable((int)p_n42); /*0xffca78f9*/
if ( result ) /*0xffca7901*/
return (*(char (__cdecl **)(_BYTE *, _BYTE **, int *))(*((_DWORD *)p_n42 + 157169) + 168))(p_n42, a2, p_n80); /*0xffca7912*/
return result; /*0xffca791b*/
}
// Function: KtiFunc791D @ 0xffca791d (0x22 bytes)
// Index: 1319/2560
char __cdecl KtiFunc791D(int __return_address, int a2)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7923*/
if ( result ) /*0xffca792b*/
return (*(int (__cdecl **)(int, int))(*(_DWORD *)(__return_address + 628676) + 36))(__return_address, a2); /*0xffca7938*/
return result; /*0xffca793d*/
}
// Function: KtiFunc793F @ 0xffca793f (0x22 bytes)
// Index: 1320/2560
char __cdecl KtiFunc793F(int __return_address, int a2)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7945*/
if ( result ) /*0xffca794d*/
return (*(int (__cdecl **)(int, int))(*(_DWORD *)(__return_address + 628676) + 12))(__return_address, a2); /*0xffca795a*/
return result; /*0xffca795f*/
}
// Function: KtiFunc7961 @ 0xffca7961 (0x22 bytes)
// Index: 1321/2560
char __cdecl KtiFunc7961(int __return_address, int a2)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7967*/
if ( result ) /*0xffca796f*/
return (*(int (__cdecl **)(int, int))(*(_DWORD *)(__return_address + 628676) + 20))(__return_address, a2); /*0xffca797c*/
return result; /*0xffca7981*/
}
// Function: KtiFunc7983 @ 0xffca7983 (0x25 bytes)
// Index: 1322/2560
int __cdecl KtiFunc7983(int __return_address)
{
int v1; // edi
v1 = 0; /*0xffca798a*/
if ( CheckPpiAvailable(__return_address) ) /*0xffca798c*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 8))(__return_address); /*0xffca79a1*/
return v1; /*0xffca79a5*/
}
// Function: KtiFunc79A8 @ 0xffca79a8 (0x1d bytes)
// Index: 1323/2560
char __cdecl KtiFunc79A8(int __return_address)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca79ae*/
if ( result ) /*0xffca79b6*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 16))(__return_address); /*0xffca79bf*/
return result; /*0xffca79c3*/
}
// Function: PlatformFinalInit @ 0xffca79c5 (0x1d bytes)
// Index: 1324/2560
char __cdecl PlatformFinalInit(int __return_address)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca79cb*/
if ( result ) /*0xffca79d3*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 40))(__return_address); /*0xffca79dc*/
return result; /*0xffca79e0*/
}
// Function: KtiFunc79E2 @ 0xffca79e2 (0x28 bytes)
// Index: 1325/2560
char __cdecl KtiFunc79E2(int __return_address)
{
char v1; // bl
v1 = 0; /*0xffca79e8*/
if ( CheckPpiAvailable(__return_address) ) /*0xffca79eb*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 212))(__return_address); /*0xffca7a03*/
return v1; /*0xffca7a05*/
}
// Function: KtiFunc7A0A @ 0xffca7a0a (0x32 bytes)
// Index: 1326/2560
int __cdecl KtiFunc7A0A(int __return_address, int a2, int a3)
{
int v3; // edi
v3 = 0; /*0xffca7a11*/
if ( CheckPpiAvailable(__return_address) ) /*0xffca7a13*/
return (*(int (__cdecl **)(int, int, int))(*(_DWORD *)(__return_address + 628676) + 184))(__return_address, a2, a3); /*0xffca7a35*/
return v3; /*0xffca7a39*/
}
// Function: KtiFunc7A3C @ 0xffca7a3c (0x25 bytes)
// Index: 1327/2560
int __cdecl KtiFunc7A3C(int n4)
{
int v1; // edi
v1 = 0; /*0xffca7a43*/
if ( CheckPpiAvailable(n4) ) /*0xffca7a45*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(n4 + 628676) + 112))(n4); /*0xffca7a5a*/
return v1; /*0xffca7a5e*/
}
// Function: KtiFunc7A61 @ 0xffca7a61 (0x25 bytes)
// Index: 1328/2560
char __cdecl KtiFunc7A61(int __return_address, int p_n5000)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7a67*/
if ( result ) /*0xffca7a6f*/
return (*(int (__cdecl **)(int, int))(*(_DWORD *)(__return_address + 628676) + 208))(__return_address, p_n5000); /*0xffca7a7c*/
return result; /*0xffca7a84*/
}
// Function: SetMem @ 0xffca7a86 (0x20 bytes)
// Index: 1329/2560
char __cdecl SetMem(int __return_address)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7a8c*/
if ( result ) /*0xffca7a94*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 152))(__return_address); /*0xffca7a9d*/
return result; /*0xffca7aa4*/
}
// Function: KtiFunc7AA6 @ 0xffca7aa6 (0x20 bytes)
// Index: 1330/2560
char __cdecl KtiFunc7AA6(int __return_address)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7aac*/
if ( result ) /*0xffca7ab4*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 224))(__return_address); /*0xffca7abd*/
return result; /*0xffca7ac4*/
}
// Function: KtiFunc7AC6 @ 0xffca7ac6 (0x25 bytes)
// Index: 1331/2560
int __cdecl KtiFunc7AC6(int __return_address)
{
int v1; // edi
v1 = 0; /*0xffca7acd*/
if ( CheckPpiAvailable(__return_address) ) /*0xffca7acf*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 104))(__return_address); /*0xffca7ae4*/
return v1; /*0xffca7ae8*/
}
// Function: PlatformDataLateInit @ 0xffca7aeb (0x28 bytes)
// Index: 1332/2560
int __cdecl PlatformDataLateInit(int __return_address)
{
int v1; // edi
v1 = 0; /*0xffca7af2*/
if ( CheckPpiAvailable(__return_address) ) /*0xffca7af4*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(__return_address + 628676) + 244))(__return_address); /*0xffca7b0c*/
return v1; /*0xffca7b10*/
}
// Function: KtiFunc7B13 @ 0xffca7b13 (0x2d bytes)
// Index: 1333/2560
int __cdecl KtiFunc7B13(int a1, int a2)
{
int v2; // edi
v2 = 0; /*0xffca7b1a*/
if ( CheckPpiAvailable(a1) ) /*0xffca7b1c*/
return (*(int (__cdecl **)(int, int))(*(_DWORD *)(a1 + 628676) + 252))(a1, a2); /*0xffca7b39*/
return v2; /*0xffca7b3d*/
}
// Function: KtiFunc7B40 @ 0xffca7b40 (0x2e bytes)
// Index: 1334/2560
char __cdecl KtiFunc7B40(int __return_address, int n207, int a3, char *a4)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7b46*/
if ( result ) /*0xffca7b4e*/
return (*(char (__cdecl **)(int, int, int, char *))(*(_DWORD *)(__return_address + 628676) + 240))( /*0xffca7b63*/
__return_address,
n207,
a3,
a4);
return result; /*0xffca7b6c*/
}
// Function: KtiFunc7B6E @ 0xffca7b6e (0x3f bytes)
// Index: 1335/2560
char __cdecl KtiFunc7B6E(int __return_address, int n4, int n5, __int16 a4, int a5, int a6)
{
char result; // al
int v7; // [esp-Ch] [ebp-10h]
__int16 v8; // [esp-2h] [ebp-6h]
result = CheckPpiAvailable(__return_address); /*0xffca7b76*/
if ( result ) /*0xffca7b7e*/
{
HIWORD(v7) = v8; /*0xffca7b8f*/
LOWORD(v7) = a4; /*0xffca7b9d*/
return (*(char (__cdecl **)(int, int, int, int, int, int))(*(_DWORD *)(__return_address + 628676) + 156))( /*0xffca7ba1*/
__return_address,
n4,
n5,
v7,
a5,
a6);
}
return result; /*0xffca7baa*/
}
// Function: KtiFunc7BAD @ 0xffca7bad (0x22 bytes)
// Index: 1336/2560
char __cdecl KtiFunc7BAD(int __return_address, int n4)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7bb3*/
if ( result ) /*0xffca7bbb*/
return (*(int (__cdecl **)(int, int))(*(_DWORD *)(__return_address + 628676) + 64))(__return_address, n4); /*0xffca7bc8*/
return result; /*0xffca7bcd*/
}
// Function: KtiFunc7BCF @ 0xffca7bcf (0x2e bytes)
// Index: 1337/2560
char __cdecl KtiFunc7BCF(int __return_address, int n192, int n2, int n255)
{
char result; // al
result = CheckPpiAvailable(__return_address); /*0xffca7bd5*/
if ( result ) /*0xffca7bdd*/
return (*(char (__cdecl **)(int, int, int, int))(*(_DWORD *)(__return_address + 628676) + 236))( /*0xffca7bf2*/
__return_address,
n192,
n2,
n255);
return result; /*0xffca7bfb*/
}
// Function: KtiFunc7BFD @ 0xffca7bfd (0x37 bytes)
// Index: 1338/2560
char __cdecl KtiFunc7BFD(int a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
char result; // al
result = CheckPpiAvailable(a1); /*0xffca7c05*/
if ( result ) /*0xffca7c0d*/
return (*(int (__cdecl **)(int, int, int, int, int, int, int))(*(_DWORD *)(a1 + 628676) + 232))( /*0xffca7c28*/
a1,
a2,
a3,
a4,
a5,
a6,
a7);
return result; /*0xffca7c31*/
}
// Function: KtiFunc7C34 @ 0xffca7c34 (0x37 bytes)
// Index: 1339/2560
char __cdecl KtiFunc7C34(int a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
char result; // al
result = CheckPpiAvailable(a1); /*0xffca7c3c*/
if ( result ) /*0xffca7c44*/
return (*(int (__cdecl **)(int, int, int, int, int, int, int))(*(_DWORD *)(a1 + 628676) + 228))( /*0xffca7c5f*/
a1,
a2,
a3,
a4,
a5,
a6,
a7);
return result; /*0xffca7c68*/
}
// Function: KtiFunc7C6B @ 0xffca7c6b (0x47 bytes)
// Index: 1340/2560
char __cdecl KtiFunc7C6B(int __return_address, int a2, int n5, __int16 a4, int a5, int a6)
{
char v6; // bl
int v8; // [esp-Ch] [ebp-14h]
__int16 v9; // [esp-2h] [ebp-Ah]
v6 = 0; /*0xffca7c73*/
if ( CheckPpiAvailable(__return_address) ) /*0xffca7c76*/
{
HIWORD(v8) = v9; /*0xffca7c8f*/
LOWORD(v8) = a4; /*0xffca7c9d*/
return (*(int (__cdecl **)(int, int, int, int, int, int))(*(_DWORD *)(__return_address + 628676) + 268))( /*0xffca7caa*/
__return_address,
a2,
n5,
v8,
a5,
a6);
}
return v6; /*0xffca7cac*/
}
// Function: KtiFunc7CB2 @ 0xffca7cb2 (0x22 bytes)
// Index: 1341/2560
char __cdecl KtiFunc7CB2(int n6, int n4)
{
char result; // al
result = CheckPpiAvailable(n6); /*0xffca7cb8*/
if ( result ) /*0xffca7cc0*/
return (*(int (__cdecl **)(int, int))(*(_DWORD *)(n6 + 628676) + 100))(n6, n4); /*0xffca7ccd*/
return result; /*0xffca7cd2*/
}
// Function: KtiFunc7CD4 @ 0xffca7cd4 (0x2a bytes)
// Index: 1342/2560
char __cdecl KtiFunc7CD4(int n6, int n6a)
{
char v2; // bl
v2 = 1; /*0xffca7cda*/
if ( CheckPpiAvailable(n6) ) /*0xffca7cdd*/
return (*(int (__cdecl **)(int, int))(*(_DWORD *)(n6 + 628676) + 96))(n6, n6a); /*0xffca7cf7*/
return v2; /*0xffca7cf9*/
}
// Function: KtiFunc7CFE @ 0xffca7cfe (0x44 bytes)
// Index: 1343/2560
char __cdecl KtiFunc7CFE(int __return_address, int n4, __int16 a3, int a4, int a5)
{
char v5; // bl
int v7; // [esp-Ch] [ebp-14h]
__int16 v8; // [esp-2h] [ebp-Ah]
v5 = 0; /*0xffca7d06*/
if ( CheckPpiAvailable(__return_address) ) /*0xffca7d09*/
{
HIWORD(v7) = v8; /*0xffca7d22*/
LOWORD(v7) = a3; /*0xffca7d2d*/
return (*(int (__cdecl **)(int, int, int, int, int))(*(_DWORD *)(__return_address + 628676) + 272))( /*0xffca7d3a*/
__return_address,
n4,
v7,
a4,
a5);
}
return v5; /*0xffca7d3c*/
}
// Function: KtiFunc7D42 @ 0xffca7d42 (0x28 bytes)
// Index: 1344/2560
int __cdecl KtiFunc7D42(int n4)
{
int v1; // edi
v1 = 0; /*0xffca7d49*/
if ( CheckPpiAvailable(n4) ) /*0xffca7d4b*/
return (*(int (__cdecl **)(int))(*(_DWORD *)(n4 + 628676) + 264))(n4); /*0xffca7d63*/
return v1; /*0xffca7d67*/
}
// Function: KtiFunc7D6A @ 0xffca7d6a (0x19 bytes)
// Index: 1345/2560
_BYTE *__cdecl KtiFunc7D6A(_BYTE *p_n4, char *a2, int n112)
{
AutoGenFunc8E72((int)p_n4, a2, n112); /*0xffca7d76*/
return p_n4; /*0xffca7d82*/
}
// Function: KtiFunc7D83 @ 0xffca7d83 (0x1b bytes)
// Index: 1346/2560
void *__cdecl KtiFunc7D83(void *buf, char value, unsigned int count)
{
memset_save_flags(buf, value, count); /*0xffca7d91*/
return buf; /*0xffca7d9d*/
}
// Function: AssertPrint @ 0xffca7d9e (0x56 bytes)
// Index: 1347/2560
void AssertPrint(_BYTE *a1, char a2, int a3, ...)
{
char v3; // bl
va_list va; // [esp+18h] [ebp+10h] BYREF
va_start(va, a3);
v3 = 0; /*0xffca7da4*/
if ( a1 && (unsigned __int8)ProcCommonFuncFB4A(a1, a2) ) /*0xffca7daf*/
{
if ( a1[246736] ) /*0xffca7dba*/
v3 = KtiFunc8014(a1); /*0xffca7dc9*/
LogFormatString(a1, a3, (char *)va); /*0xffca7dd5*/
if ( a1[246736] ) /*0xffca7ddd*/
{
if ( v3 ) /*0xffca7de8*/
KtiFunc834D(a1); /*0xffca7deb*/
}
}
}
// Function: KtiFunc7DF4 @ 0xffca7df4 (0x64 bytes)
// Index: 1348/2560
char __cdecl KtiFunc7DF4(unsigned int n0x10000, _BYTE *a2)
{
_BYTE *v2; // eax
_BYTE *v3; // ecx
int v4; // edx
char n3; // cl
_BYTE *v6; // eax
int v7; // esi
if ( n0x10000 >= 0x10 ) /*0xffca7dfb*/
{
if ( n0x10000 >= 0x100 ) /*0xffca7e13*/
{
if ( n0x10000 >= 0x10000 ) /*0xffca7e21*/
{
LOBYTE(v4) = 4; /*0xffca7e2c*/
n3 = 3; /*0xffca7e2e*/
}
else
{
n3 = 2; /*0xffca7e25*/
LOBYTE(v4) = 2; /*0xffca7e26*/
}
}
else
{
LOBYTE(v4) = 1; /*0xffca7e17*/
n3 = 1; /*0xffca7e18*/
}
v6 = a2; /*0xffca7e2f*/
v4 = (unsigned __int8)v4; /*0xffca7e3e*/
*a2 = 16 * (n3 | 8); /*0xffca7e41*/
v3 = v6 + 1; /*0xffca7e43*/
v7 = (char *)&n0x10000 - (v6 + 1); /*0xffca7e46*/
do /*0xffca7e51*/
{
LOBYTE(v2) = v3[v7]; /*0xffca7e48*/
*v3++ = (_BYTE)v2; /*0xffca7e4b*/
--v4; /*0xffca7e4e*/
}
while ( v4 ); /*0xffca7e51*/
}
else
{
v2 = a2; /*0xffca7e00*/
*a2 = n0x10000 | 0x80; /*0xffca7e07*/
v3 = v2 + 1; /*0xffca7e09*/
}
*v3 = 0; /*0xffca7e54*/
return (char)v2; /*0xffca7e57*/
}
// Function: KtiFunc7E58 @ 0xffca7e58 (0x3c bytes)
// Index: 1349/2560
char __cdecl KtiFunc7E58(unsigned int n0x10000, int a2, int a3)
{
_BYTE *v3; // esi
char result; // al
v3 = (_BYTE *)a3; /*0xffca7e63*/
if ( a2 ) /*0xffca7e65*/
{
*(_BYTE *)a3 = -64; /*0xffca7e77*/
*(_DWORD *)(a3 + 1) = n0x10000; /*0xffca7e82*/
result = a2; /*0xffca7e84*/
*(_DWORD *)(a3 + 5) = a2; /*0xffca7e88*/
v3 = (_BYTE *)(a3 + 9); /*0xffca7e8b*/
}
else
{
result = KtiFunc7DF4(n0x10000, (_BYTE *)a3); /*0xffca7e6b*/
}
*v3 = 0; /*0xffca7e8e*/
return result; /*0xffca7e91*/
}
// Function: KtiFunc7E94 @ 0xffca7e94 (0x2d bytes)
// Index: 1350/2560
int __cdecl KtiFunc7E94(char **a1)
{
char *v1; // edx
int v2; // ecx
char n57; // al
v1 = *a1; /*0xffca7e99*/
if ( **a1 == 48 ) /*0xffca7e9e*/
++v1; /*0xffca7ea0*/
v2 = 0; /*0xffca7ea1*/
while ( 1 ) /*0xffca7eb5*/
{
n57 = *v1; /*0xffca7eb5*/
if ( *v1 < 48 || n57 > 57 ) /*0xffca7ea7*/
break; /*0xffca7ea7*/
v2 = n57 + 10 * v2 - 48; /*0xffca7eb2*/
++v1; /*0xffca7eb4*/
}
*a1 = v1; /*0xffca7ebb*/
return v2; /*0xffca7ebf*/
}
// Function: KtiFunc7EC1 @ 0xffca7ec1 (0x153 bytes)
// Index: 1351/2560
char __cdecl KtiFunc7EC1(unsigned int n0x7FFFFFFF, char *a2, _BYTE *a3, char n2, unsigned int n16)
{
unsigned int n0x7FFFFFFF_1; // ecx
char *v6; // esi
unsigned int v7; // ecx
unsigned int v8; // ebx
unsigned int v9; // edx
unsigned int v10; // eax
bool v11; // zf
char *v12; // edi
char n48; // dl
char v14; // cl
_BYTE _0123456789ABCDEF0123456789abcdef[32]; // [esp+18h] [ebp+0h] BYREF
unsigned int n0x7FFFFFFFa; // [esp+3Ch] [ebp+24h]
qmemcpy( /*0xffca7f1b*/
_0123456789ABCDEF0123456789abcdef,
"0123456789ABCDEF0123456789abcdef",
sizeof(_0123456789ABCDEF0123456789abcdef));
n0x7FFFFFFF_1 = n0x7FFFFFFF; /*0xffca7f2f*/
v6 = a2; /*0xffca7f33*/
if ( n0x7FFFFFFF > 0x7FFFFFFF && (n2 & 0x20) != 0 ) /*0xffca7f42*/
{
v7 = ~n0x7FFFFFFF; /*0xffca7f44*/
n0x7FFFFFFFa = 1; /*0xffca7f46*/
n0x7FFFFFFF_1 = v7 + 1; /*0xffca7f4e*/
}
else
{
n0x7FFFFFFFa = 0; /*0xffca7f51*/
}
v8 = 0; /*0xffca7f62*/
do /*0xffca7fac*/
{
v9 = n0x7FFFFFFF_1 % n16; /*0xffca7f6e*/
++v8; /*0xffca7f72*/
n0x7FFFFFFF_1 /= n16; /*0xffca7f73*/
LOBYTE(v10) = _0123456789ABCDEF0123456789abcdef[v9]; /*0xffca7f75*/
*v6++ = v10; /*0xffca7f78*/
if ( (n2 & 0x40) == 0 ) /*0xffca7f7d*/
continue; /*0xffca7f7d*/
if ( n16 == 16 ) /*0xffca7f84*/
{
v11 = (v8 & 3) == 0; /*0xffca7f86*/
}
else
{
if ( n16 != 10 ) /*0xffca7f90*/
continue; /*0xffca7f90*/
v10 = v8 / 3; /*0xffca7f9e*/
v11 = v8 % 3 == 0; /*0xffca7fa2*/
}
if ( v11 ) /*0xffca7fa4*/
*v6++ = 44; /*0xffca7fa6*/
}
while ( n0x7FFFFFFF_1 ); /*0xffca7fac*/
v12 = a2; /*0xffca7fb2*/
if ( *(v6 - 1) == 44 ) /*0xffca7fba*/
--v6; /*0xffca7fbc*/
if ( n0x7FFFFFFFa ) /*0xffca7fc2*/
{
*v6 = 45; /*0xffca7fc4*/
goto LABEL_20; /*0xffca7fc7*/
}
if ( (n2 & 2) != 0 ) /*0xffca7fcc*/
{
*v6 = 43; /*0xffca7fce*/
LABEL_20:
++v6; /*0xffca7fd1*/
}
if ( (n2 & 8) != 0 ) /*0xffca7fd5*/
{
n48 = 48; /*0xffca7fd9*/
LABEL_25:
LOBYTE(v10) = (_BYTE)a3; /*0xffca7fe3*/
if ( v6 - a2 < (unsigned int)a3 ) /*0xffca7fed*/
{
v10 = (unsigned int)&a3[-(v6 - a2)]; /*0xffca7fef*/
do /*0xffca7ff7*/
{
*v6++ = n48; /*0xffca7ff1*/
--v10; /*0xffca7ff4*/
}
while ( v10 ); /*0xffca7ff7*/
}
}
else if ( (n2 & 1) == 0 ) /*0xffca7fdf*/
{
n48 = 32; /*0xffca7fe1*/
goto LABEL_25; /*0xffca7fe1*/
}
for ( *v6 = 0; v12 < --v6; *v6 = v14 ) /*0xffca7ff9*/
{
v14 = *v12; /*0xffca7ffe*/
LOBYTE(v10) = *v6; /*0xffca8000*/
*v12++ = *v6; /*0xffca8002*/
}
return v10; /*0xffca800c*/
}
// Function: KtiFunc8014 @ 0xffca8014 (0x8a bytes)
// Index: 1352/2560
char __cdecl KtiFunc8014(int a1)
{
char v3; // [esp+7h] [ebp-1h] BYREF
v3 = 1; /*0xffca801c*/
if ( !*(_BYTE *)(a1 + 9400) ) /*0xffca8020*/
*(_BYTE *)(a1 + 9479) = *(_BYTE *)(a1 + 1494); /*0xffca802f*/
if ( *(_BYTE *)(a1 + 246736) && *(_BYTE *)(a1 + 9479) ) /*0xffca803e*/
{
if ( !*(_DWORD *)(a1 + 255484) ) /*0xffca8047*/
ProcCommonFuncFAA4(a1, 0, 1); /*0xffca8055*/
if ( (*(_DWORD *)(a1 + 255484))++ == -1 ) /*0xffca805d*/
{
if ( *(_BYTE *)(a1 + 246425) == *(_BYTE *)(a1 + 453660) ) /*0xffca8078*/
KtiFunc7B40(a1, 207, 1, &v3); /*0xffca8082*/
KtiFunc1EF9(a1, 207, 1); /*0xffca808e*/
}
}
return 1; /*0xffca8099*/
}
// Function: LogDebugString @ 0xffca809e (0x38 bytes)
// Index: 1353/2560
int LogDebugString(_BYTE *a1, int a2, ...)
{
va_list va; // [esp+Ch] [ebp+Ch] BYREF
va_start(va, a2);
if ( !a1[9400] ) /*0xffca80a2*/
a1[9479] = a1[1494]; /*0xffca80b1*/
if ( a1[9479] ) /*0xffca80b7*/
return LogFormatString(a1, a2, (char *)va); /*0xffca80ca*/
else
return 0; /*0xffca80d3*/
}
// Function: LogFormatString @ 0xffca80d6 (0x277 bytes)
// Index: 1354/2560
int __cdecl LogFormatString(_BYTE *__return_address, unsigned __int8 *a2, char *va)
{
unsigned __int8 *v4; // ebx
int v5; // ebp
char *va_1; // edi
char n2_1; // bp
unsigned __int8 n43; // al
char n48; // al
int v10; // eax
_BYTE *v11; // ecx
char *va_2; // edx
int n112; // eax
int v14; // eax
int v15; // eax
int v16; // eax
int n5; // eax
unsigned __int8 v18; // al
int v19; // eax
int v20; // eax
int n3; // eax
_BYTE *v22; // eax
unsigned __int8 *v23; // edi
unsigned __int8 v24; // bl
char n2; // [esp-10h] [ebp-C4h]
unsigned int n16; // [esp-10h] [ebp-C4h]
_BYTE *v27; // [esp+4h] [ebp-B0h] BYREF
char v28; // [esp+Bh] [ebp-A9h]
int v29; // [esp+Ch] [ebp-A8h]
_BYTE *v30; // [esp+10h] [ebp-A4h]
char v31[160]; // [esp+14h] [ebp-A0h] BYREF
unsigned __int8 *v32; // [esp+BCh] [ebp+8h]
v28 = 0; /*0xffca80e4*/
if ( !__return_address ) /*0xffca80eb*/
return 1; /*0xffca80f0*/
if ( !*((_DWORD *)__return_address + 62746) && __return_address[246736] ) /*0xffca80fe*/
v28 = KtiFunc8014((int)__return_address); /*0xffca810e*/
v4 = a2; /*0xffca8113*/
v5 = 0; /*0xffca811b*/
v29 = 0; /*0xffca811d*/
if ( *a2 ) /*0xffca8121*/
{
va_1 = va; /*0xffca812b*/
while ( 1 ) /*0xffca8132*/
{
if ( *v4 != 37 ) /*0xffca8136*/
{
if ( *v4 == 10 ) /*0xffca813a*/
{
KtiFuncAB35((int)__return_address, 0xDu); /*0xffca813f*/
++v5; /*0xffca8146*/
}
KtiFuncAB35((int)__return_address, *v4); /*0xffca814c*/
++v5; /*0xffca8153*/
goto LABEL_57; /*0xffca8154*/
}
++v4; /*0xffca8159*/
n2_1 = 0; /*0xffca815a*/
v32 = v4; /*0xffca815c*/
v27 = v4; /*0xffca8163*/
n43 = *v4; /*0xffca8167*/
if ( *v4 == 45 ) /*0xffca816b*/
break; /*0xffca816b*/
if ( n43 == 43 ) /*0xffca8172*/
{
n2 = 2; /*0xffca8174*/
goto LABEL_18; /*0xffca8176*/
}
if ( n43 == 32 ) /*0xffca817a*/
{
n2 = 4; /*0xffca817c*/
LABEL_18:
n2_1 = n2; /*0xffca817e*/
LABEL_19:
v32 = ++v4; /*0xffca8180*/
v27 = v4; /*0xffca8187*/
}
n48 = *v4; /*0xffca818b*/
if ( (char)*v4 >= 48 && n48 <= 57 ) /*0xffca8193*/
{
if ( n48 == 48 ) /*0xffca8197*/
n2_1 |= 8u; /*0xffca8199*/
v10 = KtiFunc7E94(&v27); /*0xffca81a1*/
v4 = v27; /*0xffca81a6*/
v11 = (_BYTE *)v10; /*0xffca81ab*/
goto LABEL_27; /*0xffca81ad*/
}
if ( n48 == 42 ) /*0xffca81b1*/
{
v11 = *(_BYTE **)va_1; /*0xffca81b3*/
va_1 += 4; /*0xffca81b5*/
va = va_1; /*0xffca81b8*/
++v4; /*0xffca81bf*/
LABEL_27:
v32 = v4; /*0xffca81c0*/
goto LABEL_29; /*0xffca81c7*/
}
v11 = 0; /*0xffca81c9*/
LABEL_29:
va_2 = va_1; /*0xffca81cb*/
if ( *v4 == 44 ) /*0xffca81d0*/
{
n2_1 |= 0x40u; /*0xffca81d2*/
v32 = ++v4; /*0xffca81d6*/
}
v27 = v31; /*0xffca81e1*/
n112 = (char)*v4; /*0xffca81e5*/
if ( n112 > 112 ) /*0xffca81eb*/
{
v19 = n112 - 114; /*0xffca8286*/
if ( !v19 ) /*0xffca8289*/
{
va_1 += 4; /*0xffca82b7*/
va = va_1; /*0xffca82bf*/
KtiFunc7DF4(*((_DWORD *)va_1 - 1), v31); /*0xffca82c9*/
goto LABEL_52; /*0xffca82c9*/
}
v20 = v19 - 1; /*0xffca828b*/
if ( !v20 ) /*0xffca828e*/
{
v22 = *(_BYTE **)va_1; /*0xffca82a5*/
va_1 += 4; /*0xffca82a7*/
va = va_1; /*0xffca82aa*/
v27 = v22; /*0xffca82b1*/
goto LABEL_53; /*0xffca82b5*/
}
n3 = v20 - 2; /*0xffca8291*/
if ( n3 ) /*0xffca8294*/
{
if ( n3 != 3 ) /*0xffca8299*/
goto LABEL_52; /*0xffca8299*/
LABEL_42:
va_1 += 4; /*0xffca8261*/
n16 = 16; /*0xffca8264*/
goto LABEL_40; /*0xffca8266*/
}
va_1 += 4; /*0xffca829d*/
}
else
{
if ( n112 == 112 ) /*0xffca81f1*/
goto LABEL_42; /*0xffca81f1*/
v14 = n112 - 82; /*0xffca81f3*/
if ( !v14 ) /*0xffca81f6*/
{
va_1 += 8; /*0xffca826c*/
va = va_1; /*0xffca8273*/
KtiFunc7E58(*(_DWORD *)va_2, *((_DWORD *)va_2 + 1), (int)v31); /*0xffca827c*/
goto LABEL_52; /*0xffca8284*/
}
v15 = v14 - 6; /*0xffca81f8*/
if ( !v15 ) /*0xffca81fb*/
goto LABEL_42; /*0xffca81fb*/
v16 = v15 - 11; /*0xffca81fd*/
if ( !v16 ) /*0xffca8200*/
{
v18 = *va_1; /*0xffca8236*/
va_1 += 4; /*0xffca8239*/
va = va_1; /*0xffca823e*/
KtiFuncAB35((int)__return_address, v18); /*0xffca8245*/
v5 = v29 + 1; /*0xffca8250*/
v31[0] = 0; /*0xffca8251*/
LABEL_57:
v29 = v5; /*0xffca8307*/
goto LABEL_58; /*0xffca8307*/
}
n5 = v16 - 1; /*0xffca8202*/
if ( n5 && n5 != 5 ) /*0xffca820a*/
goto LABEL_52; /*0xffca820a*/
va_1 += 4; /*0xffca8210*/
n2_1 |= 0x20u; /*0xffca8213*/
}
n16 = 10; /*0xffca8216*/
LABEL_40:
va = va_1; /*0xffca8218*/
KtiFunc7EC1(*((_DWORD *)va_1 - 1), v31, v11, n2_1, n16); /*0xffca8229*/
LABEL_52:
v22 = v27; /*0xffca82d0*/
LABEL_53:
LOBYTE(v22) = *v22; /*0xffca82d4*/
v5 = v29; /*0xffca82d6*/
v30 = v22; /*0xffca82da*/
if ( (_BYTE)v22 ) /*0xffca82e0*/
{
v23 = v27; /*0xffca82e2*/
v24 = (unsigned __int8)v22; /*0xffca82e6*/
do /*0xffca82f3*/
{
KtiFuncAB35((int)__return_address, v24); /*0xffca82ea*/
++v23; /*0xffca82ef*/
++v5; /*0xffca82f0*/
v24 = *v23; /*0xffca82f3*/
}
while ( *v23 ); /*0xffca82f3*/
va_1 = va; /*0xffca82f9*/
v4 = v32; /*0xffca8300*/
goto LABEL_57; /*0xffca8300*/
}
LABEL_58:
if ( !*++v4 ) /*0xffca830c*/
goto LABEL_59; /*0xffca830f*/
}
n2_1 = 1; /*0xffca816d*/
goto LABEL_19; /*0xffca816e*/
}
LABEL_59:
if ( *((_DWORD *)__return_address + 62746) ) /*0xffca8316*/
{
KtiFuncA833(__return_address, 0); /*0xffca833a*/
}
else if ( __return_address[246736] ) /*0xffca831f*/
{
if ( v28 ) /*0xffca832d*/
KtiFunc834D((int)__return_address); /*0xffca8330*/
}
return v5; /*0xffca8345*/
}
// Function: KtiFunc834D @ 0xffca834d (0x55 bytes)
// Index: 1355/2560
void __cdecl KtiFunc834D(int a1)
{
int v1; // eax
if ( !*(_BYTE *)(a1 + 9400) ) /*0xffca8352*/
*(_BYTE *)(a1 + 9479) = *(_BYTE *)(a1 + 1494); /*0xffca8361*/
if ( *(_BYTE *)(a1 + 246736) && *(_BYTE *)(a1 + 9479) ) /*0xffca8370*/
{
if ( *(_DWORD *)(a1 + 255484) == 1 ) /*0xffca8380*/
ProcCommonFuncFAA4(a1, 0, 0); /*0xffca8387*/
v1 = *(_DWORD *)(a1 + 255484); /*0xffca838f*/
if ( v1 ) /*0xffca8397*/
*(_DWORD *)(a1 + 255484) = v1 - 1; /*0xffca839a*/
}
}
// Function: KtiFunc83A2 @ 0xffca83a2 (0xba bytes)
// Index: 1356/2560
int __cdecl KtiFunc83A2(int a1, char a2, char a3, char a4)
{
KtiFuncAB35(a1, 27); /*0xffca83ac*/
KtiFuncAB35(a1, 91); /*0xffca83b4*/
KtiFuncAB35(a1, 48); /*0xffca83bc*/
KtiFuncAB35(a1, (unsigned __int8)(a4 + 48)); /*0xffca83cc*/
KtiFuncAB35(a1, 109); /*0xffca83d4*/
KtiFuncAB35(a1, 27); /*0xffca83dc*/
KtiFuncAB35(a1, 91); /*0xffca83e4*/
KtiFuncAB35(a1, (unsigned __int8)(a2 / 10 + 48)); /*0xffca83fd*/
KtiFuncAB35(a1, (unsigned __int8)(a2 % 10 + 48)); /*0xffca840d*/
KtiFuncAB35(a1, 109); /*0xffca8415*/
KtiFuncAB35(a1, 27); /*0xffca841d*/
KtiFuncAB35(a1, 91); /*0xffca8425*/
KtiFuncAB35(a1, (unsigned __int8)(a3 / 10 + 48)); /*0xffca843b*/
KtiFuncAB35(a1, (unsigned __int8)(a3 % 10 + 48)); /*0xffca8448*/
return KtiFuncAB35(a1, 109); /*0xffca8458*/
}
// Function: KtiFunc845C @ 0xffca845c (0x13 bytes)
// Index: 1357/2560
int __cdecl KtiFunc845C(int p_n42)
{
return KtiFunc83A2(p_n42, 31, 40, 0); /*0xffca846e*/
}
// Function: KtiFunc846F @ 0xffca846f (0x13 bytes)
// Index: 1358/2560
int __cdecl KtiFunc846F(unsigned __int8 *n6)
{
return KtiFunc83A2((int)n6, 37, 40, 0); /*0xffca8481*/
}
// Function: CopyMem @ 0xffca8482 (0x3d3 bytes)
// Index: 1359/2560
int __cdecl CopyMem(unsigned __int8 *__return_address)
{
unsigned __int8 n4_1; // al
unsigned __int8 *v2; // ecx
int v3; // ebp
int v4; // ebp
unsigned __int8 *v5; // ebx
int CpuCount; // eax
unsigned __int8 v7; // cl
int CpuCount_1; // edi
int v9; // ebp
int v10; // ebx
unsigned __int8 n3_3; // al
unsigned __int16 *v12; // ebx
unsigned __int8 n3_2; // cl
unsigned __int16 CpuCount_4; // di
int CpuCount_3; // eax
char v16; // cl
unsigned __int8 v17; // al
unsigned __int16 CpuCount_7; // ax
unsigned __int8 n3_1; // cl
unsigned __int16 v20; // ax
unsigned __int8 n3; // [esp+13h] [ebp-31h]
unsigned __int16 CpuCount_5; // [esp+14h] [ebp-30h]
int n6; // [esp+18h] [ebp-2Ch]
int n4; // [esp+1Ch] [ebp-28h]
int CpuCount_2; // [esp+20h] [ebp-24h]
int n2; // [esp+24h] [ebp-20h]
unsigned __int8 *v28; // [esp+28h] [ebp-1Ch]
char v29; // [esp+2Ch] [ebp-18h]
_BYTE *v30; // [esp+30h] [ebp-14h]
int v31; // [esp+34h] [ebp-10h]
int v32; // [esp... [9295 chars total]
// Function: KtiFunc8855 @ 0xffca8855 (0x18 bytes)
// Index: 1360/2560
int __cdecl KtiFunc8855(_BYTE *__return_address)
{
int n6; // esi
int result; // eax
n6 = 6; /*0xffca8858*/
do /*0xffca8869*/
{
result = RmtFunc696A(__return_address, 0x14u); /*0xffca885f*/
--n6; /*0xffca8866*/
}
while ( n6 ); /*0xffca8869*/
return result; /*0xffca886b*/
}
// Function: KtiFunc886D @ 0xffca886d (0x17c bytes)
// Index: 1361/2560
bool __cdecl KtiFunc886D(int n4)
{
unsigned __int8 n4_1; // bl
char v2; // bp
_BYTE *v3; // esi
unsigned __int8 *v4; // eax
_BYTE *v5; // edi
unsigned __int8 v6; // bl
unsigned __int8 n6; // bh
_BYTE *CpuCount; // ecx
unsigned __int8 n2; // al
bool v10; // zf
unsigned __int8 v12; // [esp+13h] [ebp-21h]
unsigned __int8 v13; // [esp+13h] [ebp-21h]
int n2_1; // [esp+14h] [ebp-20h]
int n4_2; // [esp+18h] [ebp-1Ch]
int v16; // [esp+1Ch] [ebp-18h]
unsigned __int8 *v17; // [esp+20h] [ebp-14h]
unsigned __int8 v18; // [esp+24h] [ebp-10h]
_BYTE *CpuCount_1; // [esp+28h] [ebp-Ch]
_BYTE *v20; // [esp+2Ch] [ebp-8h]
_BYTE *v21; // [esp+30h] [ebp-4h]
v12 = 0; /*0xffca8873*/
n4_1 = 0; /*0xffca8877*/
v2 = 0; /*0xffca887f*/
LOBYTE(n4_2) = 0; /*0xffca8881*/
v3 = (_BYTE *)(n4 + 258716); /*0xffca8885*/
v4 = (unsigned __int8 *)(n4 + 10194); /*0xffca888b*/
v21 = (_BYTE *)(n4 + 258716); /*0xffca8891*/
v17 = (unsigned __int8 *)(n4 + 10194); /*0xffca8895*/
do /*0xffca89d2*/
{
v5 = v3 + 6; /*0xffca8899*/
v20 = v3 + 6; /*0xffca88a0*/
if ( *(v3 - 27) && *v3 ) /*0xffca88aa*/
{
v6 = v12; /*0xffca88b3*/
n6 = 0; /*0xffca88b7*/
LOBYTE(v16) = 0; /*0xffca88bd*/
do /*0xffca8995*/
{
if ( *v5 ) /*0xffca88c1*/
{
CpuCount = (_BYTE *)GetCpuCount(n4, n4_2, v16); /*0xffca88dc*/
CpuCount_1 = CpuCount; /*0xffca88e1*/
n2 = 0; /*0xffca88e5*/
LOBYTE(n2_1) = 0; /*0xffca88e7*/
do /*0xffca8974*/
{
if ( *CpuCount ) /*0xffca88eb*/
{
v18 = 0; /*0xffca88f2*/
v13 = *v17; /*0xffca88f7*/
if ( *v17 ) /*0xffca88f0*/
{
while ( KtiFunc89E9(n4, n4_2, v16, n2_1, v18, 0) ) /*0xffca891c*/
{
if ( ++v18 >= v13 ) /*0xffca892c*/
goto LABEL_13; /*0xffca892c*/
}
DebugPrint(n4, 2, n4_2, v16, n2_1, 255, 255, 255, "Memory Found!\n"); /*0xffca894c*/
v6 = 1 << v2; /*0xffca8958*/
LABEL_13:
CpuCount = CpuCount_1; /*0xffca895a*/
n2 = n2_1; /*0xffca895e*/
}
}
++n2; /*0xffca8962*/
CpuCount += 1379; /*0xffca8964*/
LOBYTE(n2_1) = n2; /*0xffca896a*/
CpuCount_1 = CpuCount; /*0xffca896e*/
}
while ( n2 < 2u ); /*0xffca8974*/
v5 = v20; /*0xffca897a*/
v12 = v6; /*0xffca897e*/
}
++n6; /*0xffca8982*/
v5 += 7688; /*0xffca8984*/
LOBYTE(v16) = n6; /*0xffca898a*/
v20 = v5; /*0xffca898e*/
}
while ( n6 < 6u ); /*0xffca8995*/
v3 = v21; /*0xffca899b*/
v10 = ((unsigned __int8)(1 << v2) & v6) == 0; /*0xffca89a6*/
n4_1 = n4_2; /*0xffca89a8*/
v4 = v17; /*0xffca89ac*/
if ( v10 ) /*0xffca89b0*/
*v21 = 0; /*0xffca89b2*/
}
++n4_1; /*0xffca89b5*/
v4 += 50813; /*0xffca89b7*/
v3 += 48704; /*0xffca89bc*/
LOBYTE(n4_2) = n4_1; /*0xffca89c2*/
++v2; /*0xffca89c6*/
v17 = v4; /*0xffca89c7*/
v21 = v3; /*0xffca89cb*/
}
while ( n4_1 < 4u ); /*0xffca89d2*/
return v12 != 0; /*0xffca89dc*/
}
// Function: KtiFunc89E9 @ 0xffca89e9 (0x67 bytes)
// Index: 1362/2560
bool __cdecl KtiFunc89E9(int a1, char a2, char a3, unsigned __int8 a4, unsigned __int8 a5, char a6)
{
return !*(_BYTE *)(KtiFunc91AF(a1, a2, a3, a4) + 242 * a5) /*0xffca8a4b*/
|| (a6 & 1) != 0 && !*(_BYTE *)(a1 + 9477) && *(_BYTE *)(1379 * a4 + a5 + GetCpuCount(a1, a2, a3) + 15);
}
// Function: KtiFunc8A50 @ 0xffca8a50 (0x3e bytes)
// Index: 1363/2560
int __cdecl KtiFunc8A50(_BYTE *n6)
{
unsigned __int8 n4; // bl
_BYTE *v2; // esi
int n6a; // [esp+Ch] [ebp-4h]
n4 = 0; /*0xffca8a5a*/
LOBYTE(n6a) = 0; /*0xffca8a5c*/
v2 = n6 + 258689; /*0xffca8a5f*/
do /*0xffca8a83*/
{
if ( *v2 ) /*0xffca8a65*/
DdrTrainFunc7127(n6, n6a); /*0xffca8a6e*/
++n4; /*0xffca8a75*/
v2 += 48704; /*0xffca8a77*/
LOBYTE(n6a) = n4; /*0xffca8a7d*/
}
while ( n4 < 4u ); /*0xffca8a83*/
return 0; /*0xffca8a85*/
}
// Function: KtiFunc8A8E @ 0xffca8a8e (0x96 bytes)
// Index: 1364/2560
void __cdecl KtiFunc8A8E(_BYTE *n2, int n4, int n2a)
{
_BYTE *n2_1; // edi
_BYTE *CpuCount; // ebp
int n2a_1; // eax
_BYTE *v6; // edx
unsigned __int8 n2_2; // bl
n2_1 = n2; /*0xffca8a9f*/
DebugPrint((int)n2, 2, n4, n2a, 255, 255, 255, 255, "FPT: DisableChannel()\n");
CpuCount = (_BYTE *)GetCpuCount((int)n2, n4, n2a); /*0xffca8ac1*/
n2a_1 = n2a; /*0xffca8ac9*/
v6 = &n2[48704 * (unsigned __int8)n4]; /*0xffca8adb*/
n2_2 = 0; /*0xffca8add*/
LOBYTE(n2) = 0; /*0xffca8adf*/
v6[7688 * (unsigned __int8)n2a + 258722] = 0; /*0xffca8ae3*/
do /*0xffca8b12*/
{
if ( *CpuCount ) /*0xffca8aea*/
{
KtiFunc8B24(n2_1, n4, n2a_1, (int)n2); /*0xffca8af7*/
n2a_1 = n2a; /*0xffca8afc*/
}
++n2_2; /*0xffca8b03*/
CpuCount += 1379; /*0xffca8b05*/
LOBYTE(n2) = n2_2; /*0xffca8b0b*/
}
while ( n2_2 < 2u ); /*0xffca8b12*/
nullsub_5(); /*0xffca8b17*/
}
// Function: KtiFunc8B24 @ 0xffca8b24 (0xaa bytes)
// Index: 1365/2560
char __cdecl KtiFunc8B24(_BYTE *__return_address, int n4, int n2, int n2_1)
{
int v4; // eax
_BYTE *v5; // edx
unsigned __int8 n4_1; // bl
char result; // al
int v8; // [esp+8h] [ebp-4h]
DebugPrint((int)__return_address, 2, n4, n2, n2_1, 255, 255, 255, "FPT: DisableDIMM()\n");
v4 = 1379 * (unsigned __int8)n2_1; /*0xffca8b69*/
v5 = &__return_address[48704 * (unsigned __int8)n4 + 7688 * (unsigned __int8)n2]; /*0xffca8b72*/
if ( v5[v4 + 259225] == 1 ) /*0xffca8b7c*/
v5[v4 + 259226] = 1; /*0xffca8b7e*/
n4_1 = 0; /*0xffca8b89*/
LOBYTE(v8) = 0; /*0xffca8b8b*/
do /*0xffca8bc6*/
{
result = KtiFunc89E9((int)__return_address, n4, n2, n2_1, v8, 1); /*0xffca8b9d*/
if ( !result ) /*0xffca8ba7*/
result = KtiFunc8BCE(__return_address, n4, n2, n2_1, v8); /*0xffca8bb6*/
LOBYTE(v8) = ++n4_1; /*0xffca8bc0*/
}
while ( n4_1 < 4u ); /*0xffca8bc6*/
return result; /*0xffca8bc8*/
}
// Function: KtiFunc8BCE @ 0xffca8bce (0x1d1 bytes)
// Index: 1366/2560
char __cdecl KtiFunc8BCE(_BYTE *__return_address, int n4, int n2, int a4, int a5)
{
_BYTE *__return_address_1; // ebx
int n4_1; // ebp
int v7; // esi
int n2_1; // edi
int v9; // ecx
int v10; // eax
int CpuCount; // eax
int v12; // edx
int v13; // esi
int v14; // edi
int v15; // esi
int v16; // ecx
int v18; // [esp-34h] [ebp-5Ch]
int v19; // [esp-10h] [ebp-38h]
int src; // [esp+10h] [ebp-18h] BYREF
unsigned __int8 p___return_address[4]; // [esp+14h] [ebp-14h] BYREF
unsigned __int8 p___return_address_1[4]; // [esp+18h] [ebp-10h] BYREF
int v23; // [esp+1Ch] [ebp-Ch]
int v24; // [esp+20h] [ebp-8h]
int v25; // [esp+24h] [ebp-4h]
__return_address_1 = __return_address; /*0xffca8bd2*/
n4_1 = n4; /*0xffca8bd7*/
v7 = a4; /*0xffca8bdc*/
n2_1 = n2; /*0xffca8be1*/
v9 = KtiFunc91AF((int)__return_address, n4, n2, a4); /*0xffca8bee*/
LOBYTE(v10) = a5; /*0xffca8bf3*/
v25 = (unsigned __int8)a5; /*0xffca8bfa*/
v23 = v9; /*0xffca8c04*/
v24 = 242 * (unsigned __int8)a5; /*0xffca8c08*/
if ( *(_BYTE *)(v24 + v9) )
{
DebugPrint((int)__return_address_1, 3, n4_1, n2_1, v7, a5, 255, 255, "FPT: DisableRank()\n\n");
*(_BYTE *)(v24 + v23) = 0; /*0xffca8c39*/
CpuCount = GetCpuCount((int)__return_address_1, n4_1, n2_1); /*0xffca8c3d*/
v12 = v7; /*0xffca8c46*/
v13 = a5; /*0xffca8c48*/
v18 = a5; /*0xffca8c4c*/
*(_BYTE *)(1379 * (unsigned __int8)v12 + v25 + CpuCount + 15) = 1; /*0xffca8c5e*/
KtiFunc1162(__return_address_1, 10, 3, n4_1, n2_1, v12, v18); /*0xffca8c63*/
if ( ProcCommonFunc2AB((int)__return_address_1)
|| (LOBYTE(v10) = ProcCommonFunc2BA((int)__return_address_1), (_BYTE)v10) )
{
v19 = v13; /*0xffca8c91*/
LOBYTE(v13) = a4; /*0xffca8c92*/
DebugPrint( /*0xffca8c9c*/
(int)__return_address_1,
2,
n4_1,
n2_1,
a4,
v19,
255,
255,
"System configured for Lockstep or Mirroring. Disable paired rank(s)\n");
LOBYTE(__return_address) = 1; /*0xffca8ca4*/
do
{
LOBYTE(v10) = MemChipFunc4FFE( /*0xffca8cc5*/
(int)__return_address_1,
n4_1,
n2_1,
v13,
a5,
(unsigned __int8 *)&__return_address,
p___return_address,
p___return_address_1,
&src);
if ( !(_BYTE)__return_address ) /*0xffca8cd2*/
break; /*0xffca8cd2*/
v14 = GetCpuCount((int)__return_address_1, n4_1, p___return_address[0]); /*0xffca8ce7*/
v15 = KtiFunc91AF((int)__return_address_1, n4_1, p___return_address[0], p___return_address_1[0]); /*0xffca8cf9*/
DebugPrint(
(int)__return_address_1,
3,
n4_1,
*(int *)p___return_address,
*(int *)p___return_address_1,
src,
255,
255,
"FPT: DisableRank() paired rank\n\n");
*(_BYTE *)(242 * (unsigned __int8)src + v15) = 0; /*0xffca8d25*/
v13 = a4; /*0xffca8d2e*/
v16 = v14 + 1379 * p___return_address_1[0]; /*0xffca8d3d*/
n2_1 = n2; /*0xffca8d3f*/
*(_BYTE *)((unsigned __int8)src + v16 + 15) = 1; /*0xffca8d43*/
KtiFunc1162(__return_address_1, 10, 3, n4_1, n2_1, v13, src); /*0xffca8d54*/
LOBYTE(v10) = ProcCommonFunc2BA((int)__return_address_1); /*0xffca8d5a*/
if ( (_BYTE)v10 ) /*0xffca8d64*/
{
n4_1 = n4; /*0xffca8d6a*/
v10 = 7688 * p___return_address[0]; /*0xffca8d7c*/
__return_address_1[48704 * (unsigned __int8)n4 + 258722 + v10] = 0; /*0xffca8d84*/
}
LOBYTE(__return_address) = (_BYTE)__return_address + 1; /*0xffca8d8c*/
}
while ( (_BYTE)__return_address );
}
}
return v10; /*0xffca8d97*/
}
// Function: KtiFunc8D9F @ 0xffca8d9f (0x25 bytes)
// Index: 1367/2560
int __cdecl KtiFunc8D9F(int a1, int n20)
{
return KtiFunc8C4(a1, n20 * (*(_DWORD *)(a1 + 9506) / 0xF4240u) + 1); /*0xffca8dc2*/
}
// Function: KtiFunc8DC4 @ 0xffca8dc4 (0x6e bytes)
// Index: 1368/2560
int __cdecl KtiFunc8DC4(int a1, unsigned __int8 a2, unsigned __int8 a3, unsigned __int8 a4)
{
char v4; // cl
int v5; // edx
char n6; // bl
int v7; // esi
char v8; // bp
_BYTE *v9; // edi
bool v10; // al
char n6_1; // [esp+10h] [ebp-4h]
v4 = a2; /*0xffca8dc5*/
v5 = a1; /*0xffca8dc9*/
n6 = 0; /*0xffca8dd2*/
v7 = 0; /*0xffca8ddb*/
n6_1 = 0; /*0xffca8de4*/
v8 = 0; /*0xffca8de8*/
v9 = (_BYTE *)(48704 * a2 + a1 + 258722); /*0xffca8dea*/
do /*0xffca8e28*/
{
if ( *v9 ) /*0xffca8dec*/
{
v10 = KtiFunc89E9(v5, v4, n6_1, a3, a4, 0); /*0xffca8e01*/
v4 = a2; /*0xffca8e06*/
v5 = a1; /*0xffca8e0d*/
if ( !v10 ) /*0xffca8e13*/
v7 |= 1 << v8; /*0xffca8e15*/
}
++n6; /*0xffca8e18*/
v9 += 7688; /*0xffca8e1a*/
++v8; /*0xffca8e20*/
n6_1 = n6; /*0xffca8e21*/
}
while ( (unsigned __int8)n6 < 6u ); /*0xffca8e28*/
return v7; /*0xffca8e2a*/
}
// Function: KtiFunc8E32 @ 0xffca8e32 (0x35 bytes)
// Index: 1369/2560
int __cdecl KtiFunc8E32(int a1, unsigned __int8 a2)
{
int v2; // edx
char v3; // si
_BYTE *v4; // eax
int n6; // ecx
v2 = 0; /*0xffca8e37*/
v3 = 0; /*0xffca8e49*/
v4 = (_BYTE *)(48704 * a2 + a1 + 258722); /*0xffca8e4d*/
n6 = 6; /*0xffca8e4f*/
do /*0xffca8e61*/
{
if ( *v4 ) /*0xffca8e50*/
v2 |= 1 << v3; /*0xffca8e55*/
++v3; /*0xffca8e58*/
v4 += 7688; /*0xffca8e59*/
--n6; /*0xffca8e5e*/
}
while ( n6 ); /*0xffca8e61*/
return v2; /*0xffca8e65*/
}
// Function: KtiFunc8E67 @ 0xffca8e67 (0x94 bytes)
// Index: 1370/2560
int __cdecl KtiFunc8E67(int a1, unsigned __int8 a2, unsigned __int8 a3, unsigned __int8 a4)
{
char v4; // cl
int v5; // edx
unsigned __int8 n6; // bl
int v7; // esi
char v8; // bp
_BYTE *v9; // edi
char v10; // al
unsigned __int8 n6_1; // [esp+10h] [ebp-4h]
v4 = a2; /*0xffca8e68*/
v5 = a1; /*0xffca8e6c*/
n6 = 0; /*0xffca8e75*/
v7 = 0; /*0xffca8e7e*/
n6_1 = 0; /*0xffca8e87*/
v8 = 0; /*0xffca8e8b*/
v9 = (_BYTE *)(48704 * a2 + a1 + 258722); /*0xffca8e8d*/
do /*0xffca8ef1*/
{
if ( *v9 ) /*0xffca8e8f*/
{
if ( KtiFunc89E9(v5, v4, n6_1, a3, a4, 0) ) /*0xffca8ea4*/
{
v4 = a2; /*0xffca8ed9*/
v5 = a1; /*0xffca8edd*/
}
else
{
v10 = ProcCommonFunc24FA(a1, a2, n6_1, a3); /*0xffca8ec0*/
v4 = a2; /*0xffca8ec5*/
v5 = a1; /*0xffca8ecc*/
if ( v10 ) /*0xffca8ed2*/
v7 |= 1 << v8; /*0xffca8ed4*/
}
}
++n6; /*0xffca8ee1*/
v9 += 7688; /*0xffca8ee3*/
++v8; /*0xffca8ee9*/
n6_1 = n6; /*0xffca8eea*/
}
while ( n6 < 6u ); /*0xffca8ef1*/
return v7; /*0xffca8ef3*/
}
// Function: GetSocketInfo @ 0xffca8efb (0x17 bytes)
// Index: 1371/2560
int __cdecl GetSocketInfo(int a1, unsigned __int8 a2)
{
return 48704 * a2 + a1 + 258722; /*0xffca8f11*/
}
// Function: KtiFunc8F12 @ 0xffca8f12 (0x58 bytes)
// Index: 1372/2560
unsigned __int8 KtiFunc8F12(int __return_address, unsigned __int8 n4, ...)
{
unsigned __int8 result; // al
unsigned __int8 i; // cl
unsigned __int8 v4; // bl
result = *(_BYTE *)(48704 * n4 + __return_address + 258694); /*0xffca8f21*/
if ( result > (unsigned __int8)byte_FFD5BA8C ) /*0xffca8f30*/
return byte_FFD5BA8C; /*0xffca8f32*/
for ( i = 0; i < 9u; ++i ) /*0xffca8f35*/
{
v4 = byte_FFD5BA84[i]; /*0xffca8f3b*/
if ( result == v4 ) /*0xffca8f43*/
break; /*0xffca8f43*/
if ( i < 8u && result > v4 && result < (unsigned __int8)byte_FFD5BA85[i] ) /*0xffca8f54*/
return byte_FFD5BA85[i]; /*0xffca8f62*/
}
return result; /*0xffca8f34*/
}
// Function: GetCpuCount @ 0xffca8f6a (0x22 bytes)
// Index: 1373/2560
int __cdecl GetCpuCount(int a1, unsigned __int8 a2, unsigned __int8 a3)
{
return a1 + 48704 * a2 + 7688 * a3 + 259118; /*0xffca8f8b*/
}
// Function: KtiFunc8F8C @ 0xffca8f8c (0x17 bytes)
// Index: 1374/2560
int __cdecl KtiFunc8F8C(int n6, char n4)
{
return 48704 * (unsigned __int8)n4 + n6 + 304850; /*0xffca8fa2*/
}
// Function: KtiFunc8FA3 @ 0xffca8fa3 (0x1e8 bytes)
// Index: 1375/2560
__int16 __cdecl KtiFunc8FA3(_BYTE *n6, char n4, char a3, char n2, char a5, char n0x12, char a7)
{
__int16 v7; // di
unsigned __int16 n60; // si
int v9; // edx
int v10; // ecx
unsigned __int8 n9; // ah
int v12; // ecx
unsigned __int16 *v13; // ecx
int v14; // esi
unsigned int v15; // esi
unsigned int v16; // esi
unsigned int v17; // esi
v7 = 0; /*0xffca8fae*/
n60 = 0; /*0xffca8fb4*/
v9 = KtiFunc91DE((int)n6, n4, a3, n2); /*0xffca8fc0*/
switch ( a7 )
{
case 0:
return *(_WORD *)(244 * (unsigned __int8)a5 + v9); /*0xffca9180*/
case 1:
v10 = 244 * (unsigned __int8)a5; /*0xffca90a2*/
v7 = *(_WORD *)(v10 + v9 + 2); /*0xffca90af*/
if ( n6[9478] )
{
n9 = (unsigned __int8)n0x12 < 0x12u ? n0x12 : 0;
if ( n9 >= 9u ) /*0xffca90c7*/
v12 = v10 + 54; /*0xffca90ce*/
else
v12 = v10 + 48; /*0xffca90c9*/
v13 = (unsigned __int16 *)(v9 + v12); /*0xffca90d2*/
switch ( n9 % 9u )
{
case 0u:
LOWORD(v14) = *v13; /*0xffca90eb*/
goto LABEL_20; /*0xffca90eb*/
case 1u:
v15 = *v13; /*0xffca90f3*/
goto LABEL_22; /*0xffca90f3*/
case 2u:
v16 = *v13; /*0xffca90fb*/
goto LABEL_24; /*0xffca90fb*/
case 3u:
v17 = *v13; /*0xffca9103*/
goto LABEL_26; /*0xffca9103*/
case 4u:
v14 = *v13 >> 12; /*0xffca910e*/
goto LABEL_20; /*0xffca9111*/
case 5u:
LOWORD(v14) = v13[1]; /*0xffca9113*/
goto LABEL_20; /*0xffca9117*/
case 6u:
v15 = v13[1]; /*0xffca9119*/
LABEL_22:
v14 = v15 >> 3; /*0xffca90f6*/
goto LABEL_20; /*0xffca90f9*/
case 7u:
v16 = v13[1]; /*0xffca911f*/
LABEL_24:
v14 = v16 >> 6; /*0xffca90fe*/
goto LABEL_20; /*0xffca9101*/
case 8u:
v17 = v13[1]; /*0xffca9125*/
LABEL_26:
v14 = v17 >> 9; /*0xffca9106*/
LABEL_20:
n60 = v14 & 7; /*0xffca90ee*/
break; /*0xffca90f1*/
default:
AssertPrint(
n6,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\InitMem.c",
2365,
"FALSE");
ProcMemInitCheck((int)n6, 242, 77); /*0xffca9152*/
break; /*0xffca9152*/
}
return v7 & 0xDF9F | RmtFunc6E09(0x2060u, n60); /*0xffca9170*/
}
break;
case 2:
return *(_WORD *)(244 * (unsigned __int8)a5 + v9 + 4); /*0xffca9093*/
case 3:
return *(_WORD *)(244 * (unsigned __int8)a5 + v9 + 6); /*0xffca907e*/
case 4:
return *(_WORD *)(244 * (unsigned __int8)a5 + v9 + 8); /*0xffca9069*/
case 5:
return *(_WORD *)(244 * (unsigned __int8)a5 + v9 + 10); /*0xffca9054*/
case 6:
return *(_WORD *)(v9 + 2 * ((unsigned __int8)n0x12 + 122 * (unsigned __int8)a5) + 12); /*0xffca903f*/
default:
AssertPrint(
n6,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\InitMem.c",
2393,
"FALSE");
ProcMemInitCheck((int)n6, 242, 77); /*0xffca9023*/
break;
}
return v7; /*0xffca9187*/
}
// Function: KtiFunc91AF @ 0xffca91af (0x2f bytes)
// Index: 1376/2560
int __cdecl KtiFunc91AF(int a1, unsigned __int8 a2, unsigned __int8 a3, unsigned __int8 a4)
{
return 48704 * a2 + a1 + 7688 * a3 + 1379 * a4 + 259342; /*0xffca91dd*/
}
// Function: KtiFunc91DE @ 0xffca91de (0x2f bytes)
// Index: 1377/2560
int __cdecl KtiFunc91DE(int a1, unsigned __int8 a2, unsigned __int8 a3, unsigned __int8 a4)
{
return 50813 * a2 + a1 + 8077 * a3 + 2688 * a4 + 12586; /*0xffca920c*/
}
// Function: MemSetMaxDdrFreq @ 0xffca920d (0x464 bytes)
// Index: 1378/2560
int __cdecl MemSetMaxDdrFreq(int p_n42)
{
char n2; // bl
int n10; // eax
unsigned __int8 n4a_1; // al
char *v5; // edi
_BYTE *v6; // ebp
unsigned __int8 n6_1; // bh
char *v8; // eax
int n4_2; // ecx
unsigned __int8 p_n42a_2; // dl
unsigned __int8 n6_2; // bl
unsigned __int8 n4_3; // dh
int *v13; // edi
_BYTE *v14; // ecx
char v15; // al
unsigned __int8 p_n42a_1; // bh
int n1875000; // eax
int v18; // ebp
unsigned __int8 v19; // al
unsigned __int8 v20; // al
unsigned __int8 v21; // bl
int n9; // eax
int *v23; // ecx
_BYTE *v24; // edx
int n4_5; // edi
char v26; // al
int *v27; // ecx
_BYTE *v28; // eax
int n4_4; // edi
_BYTE *v30; // edi
unsigned __int8 n4_1; // bl
_BYTE *v32; // edi
int n4; // [esp+Ch] [ebp-14h]
unsigned __int8 n4a; // [esp+Ch] [ebp-14h]
int n6; // [esp+10h] [ebp-10h]
unsigned __int8 n6a; // [esp+10h] [ebp-10h]
_BYTE *v38; // [esp+14h] [ebp-Ch]
int v39; // [esp+18h] [ebp-8h] BYREF
char v40[4]; ... [12918 chars total]
// Function: KtiFunc9671 @ 0xffca9671 (0x187 bytes)
// Index: 1379/2560
char __cdecl KtiFunc9671(_BYTE *src_, int n6, int n6a, int a4, int a5)
{
int n6_1; // ebx
_BYTE *src__1; // edi
int v7; // esi
int CpuCount; // eax
int n6a_1; // ebp
int v10; // esi
int v11; // esi
int v12; // ecx
int v14; // [esp-28h] [ebp-44h]
unsigned __int8 p___return_address[4]; // [esp+10h] [ebp-Ch] BYREF
int v16; // [esp+14h] [ebp-8h]
unsigned __int8 p___return_address_1[4]; // [esp+18h] [ebp-4h] BYREF
n6_1 = n6; /*0xffca9675*/
src__1 = src_; /*0xffca9680*/
CpuCount = GetCpuCount((int)src_, n6, n6a); /*0xffca9687*/
v16 = (unsigned __int8)a5; /*0xffca96a3*/
v7 = CpuCount + 1379 * (unsigned __int8)a4; /*0xffca96a7*/
LOBYTE(CpuCount) = a5; /*0xffca96a9*/
n6a_1 = n6a; /*0xffca96ab*/
if ( *(_BYTE *)((unsigned __int8)a5 + v7 + 15) != 1 )
{
DebugPrint((int)src__1, 3, n6_1, n6a, a4, a5, 255, 255, "FPT: Mapout Rank()\n\n");
v14 = a5; /*0xffca96d6*/
*(_BYTE *)(v16 + v7 + 15) = 1; /*0xffca96da*/
v10 = a4; /*0xffca96df*/
KtiFunc1162(src__1, 10, 3, n6_1, n6a_1, a4, v14); /*0xffca96eb*/
if ( ProcCommonFunc2AB((int)src__1) || (LOBYTE(CpuCount) = ProcCommonFunc2BA((int)src__1), (_BYTE)CpuCount) )
{
DebugPrint( /*0xffca9723*/
(int)src__1,
2,
n6_1,
n6a_1,
v10,
a5,
255,
255,
"System configured for Lockstep or Mirroring. Mapout paired rank(s)\n");
LOBYTE(n6) = 1; /*0xffca972b*/
do
{
LOBYTE(CpuCount) = MemChipFunc4FFE( /*0xffca974c*/
(int)src__1,
n6_1,
n6a_1,
v10,
a5,
(unsigned __int8 *)&n6,
p___return_address,
p___return_address_1,
&src_);
if ( !(_BYTE)n6 ) /*0xffca9759*/
break; /*0xffca9759*/
v11 = GetCpuCount((int)src__1, n6_1, p___return_address[0]); /*0xffca976f*/
DebugPrint(
(int)src__1,
3,
n6_1,
*(int *)p___return_address,
*(int *)p___return_address_1,
(int)src_,
255,
255,
"FPT: Mapout paired rank\n\n");
v12 = v11 + 1379 * p___return_address_1[0]; /*0xffca979d*/
v10 = a4; /*0xffca979f*/
*(_BYTE *)((unsigned __int8)src_ + v12 + 15) = 1; /*0xffca97a3*/
KtiFunc1162(src__1, 10, 3, n6_1, n6a_1, v10, (int)src_); /*0xffca97b4*/
LOBYTE(CpuCount) = ProcCommonFunc2BA((int)src__1); /*0xffca97bd*/
if ( (_BYTE)CpuCount ) /*0xffca97c5*/
{
CpuCount = 7688 * p___return_address[0]; /*0xffca97d5*/
src__1[48704 * (unsigned __int8)n6_1 + 258722 + CpuCount] = 0; /*0xffca97dd*/
}
LOBYTE(n6) = n6 + 1; /*0xffca97e5*/
}
while ( (_BYTE)n6 );
}
}
return CpuCount; /*0xffca97f0*/
}
// Function: KtiFunc97F8 @ 0xffca97f8 (0x87 bytes)
// Index: 1380/2560
int __cdecl KtiFunc97F8(int a1)
{
int v1; // esi
int v2; // eax
v1 = a1; /*0xffca97fc*/
if ( (~*(_DWORD *)(a1 + 628652) & 0x2000000) == 0 /*0xffca9832*/
&& (!*(_BYTE *)(a1 + 9410) || *(_BYTE *)(a1 + 9409))
&& (*(_BYTE *)(a1 + 257312) || *(_BYTE *)(a1 + 9409))
&& !*(_DWORD *)(a1 + 246404) )
{
LOBYTE(a1) = *(_BYTE *)(a1 + 9402); /*0xffca9841*/
v2 = 48704 * (unsigned __int8)a1; /*0xffca9847*/
if ( *(_BYTE *)(v2 + v1 + 258689) ) /*0xffca984d*/
{
if ( *(_BYTE *)(v2 + v1 + 258716) ) /*0xffca9857*/
{
*(_BYTE *)(v1 + 246409) = 0; /*0xffca9864*/
DdrTrainFunc4EFA(v1, a1); /*0xffca986c*/
*(_BYTE *)(v1 + 246409) = 1; /*0xffca9873*/
}
}
}
return 0; /*0xffca987c*/
}
// Function: MemPrintFreqRatio @ 0xffca987f (0x407 bytes)
// Index: 1381/2560
int __cdecl MemPrintFreqRatio(int p_n42, int n6)
{
int v2; // ebx
int p_n42_1; // edi
unsigned __int16 n400; // ax
unsigned __int8 v5; // al
unsigned __int8 n6_3; // cl
char *v7; // esi
int v8; // eax
char n11; // al
_BYTE *CpuCount; // eax
int v11; // ecx
char v12; // al
char v13; // al
char n100; // cl
unsigned int v15; // eax
bool v16; // zf
int n6_4; // ebp
unsigned __int8 n6_2; // [esp-8h] [ebp-28h]
unsigned __int8 n6_5; // [esp+10h] [ebp-10h]
char v21; // [esp+10h] [ebp-10h]
unsigned __int8 p_n42_2; // [esp+14h] [ebp-Ch]
char v23[4]; // [esp+18h] [ebp-8h] BYREF
int n6_1; // [esp+1Ch] [ebp-4h]
v2 = 48704 * (unsigned __int8)n6; /*0xffca988c*/
p_n42_1 = p_n42; /*0xffca9893*/
n6_1 = (unsigned __int8)n6; /*0xffca9899*/
switch ( *(_BYTE *)(v2 + p_n42 + 258694) ) /*0xffca98af*/
{
case 0: /*0xffca98af*/
n400 = 400; /*0xffca98b6*/
break; /*0xffca98bb*/
case 1: /*0xffca98af*/
n400 = 500; /*0xffca98c0*/
break; /*0xffca98c5*/
case 2: /*0xffca98af*/
n400 = 533; /*0xffca98ca*/
break; /*0xffca98cf*/
case 3: /*0xffca98af*/
n400 = 600; /*0xffca98d4*/
break; /*0xffca98d9*/
case 4: /*0xffca98af*/
n400 = 667; /*0xffca98de*/
break; /*0xffca98e3*/
case 5: /*0xffca98af*/
n400 = 700; /*0xffca98e8*/
break; /*0xffca98ed*/
case 6: /*0xffca98af*/
goto LABEL_30;
case 7: /*0xffca98af*/
n400 = 900; /*0xffca98f2*/
break; /*0xffca98f7*/
case 8: /*0xffca98af*/
n400 = 933; /*0xffca98fc*/
break; /*0xffca9901*/
case 9: /*0xffca98af*/
n400 = 1000; /*0xffca9906*/
break; /*0xffca990b*/
case 0xA: /*0xffca98af*/
n400 = 1066; /*0xffca9910*/
break; /*0xffca9915*/
case 0xB: /*0xffca98af*/
n400 = 1100; /*0xffca991a*/
break; /*0xffca991f*/
case 0xC: /*0xffca98af*/
n400 = 1200; /*0xffca9924*/
break; /*0xffca9929*/
case 0xD: /*0xffca98af*/
n400 = 1300; /*0xffca992b*/
break; /*0xffca9930*/
case 0xE: /*0xffca98af*/
n400 = 1333; /*0xffca9932*/
break; /*0xffca9937*/
case 0xF: /*0xffca98af*/
n400 = 1400; /*0xffca9939*/
break; /*0xffca993e*/
case 0x10: /*0xffca98af*/
n400 = 1467; /*0xffca9940*/
break; /*0xffca9945*/
case 0x11: /*0xffca98af*/
n400 = 1500; /*0xffca9947*/
break; /*0xffca994c*/
case 0x12: /*0xffca98af*/
n400 = 1600; /*0xffca994e*/
break; /*0xffca9953*/
case 0x13: /*0xffca98af*/
n400 = 1700; /*0xffca9955*/
break; /*0xffca995a*/
case 0x14: /*0xffca98af*/
n400 = 1733; /*0xffca995c*/
break; /*0xffca9961*/
case 0x15: /*0xffca98af*/
n400 = 1800; /*0xffca9963*/
break; /*0xffca9968*/
case 0x16: /*0xffca98af*/
n400 = 1866; /*0xffca996a*/
break; /*0xffca996f*/
case 0x17: /*0xffca98af*/
n400 = 1900; /*0xffca9971*/
break; /*0xffca9976*/
case 0x18: /*0xffca98af*/
n400 = 2000; /*0xffca9978*/
break; /*0xffca997d*/
case 0x19: /*0xffca98af*/
n400 = 2100; /*0xffca997f*/
break; /*0xffca9984*/
case 0x1A: /*0xffca98af*/
n400 = 2133; /*0xffca9986*/
break; /*0xffca998b*/
case 0x1B: /*0xffca98af*/
n400 = 2200; /*0xffca998d*/
break; /*0xffca9992*/
default:
n400 = 533; /*0xffca9994*/
if ( *(_WORD *)(p_n42 + 257315) != 11 ) /*0xffca99a0*/
LABEL_30:
n400 = 800; /*0xffca99a2*/
break; /*0xffca99a2*/
}
*(_WORD *)(v2 + p_n42 + 258695) = n400; /*0xffca99ac*/
*(_WORD *)(v2 + p_n42_1 + 258697) = 0xF4240 / (2 * (unsigned int)n400); /*0xffca99bd*/
v5 = *(_BYTE *)(v2 + p_n42_1 + 258694); /*0xffca99c5*/
*(_BYTE *)(p_n42_1 + 257311) = v5; /*0xffca99cc*/
DebugPrint(p_n42_1, 2, 255, 255, 255, 255, 255, 255, "ratioIndex = %d\n", v5); /*0xffca99e9*/
n6_3 = 0; /*0xffca99f7*/
v7 = (char *)(v2 + p_n42_1 + 259042); /*0xffca99f9*/
n6_5 = 0; /*0xffca99fb*/
do /*0xffca9af9*/
{
if ( !*(v7 - 320) ) /*0xffca9a09*/
goto LABEL_55; /*0xffca9a09*/
v8 = *(unsigned __int8 *)(p_n42_1 + 257311); /*0xffca9a0f*/
if ( *(_WORD *)(p_n42_1 + 257315) == 11 ) /*0xffca9a1d*/
{
n11 = byte_FFD42EE4[v8]; /*0xffca9a1f*/
}
else
{
n6_2 = n6; /*0xffca9a31*/
*v7 = byte_FFD42F00[v8]; /*0xffca9a35*/
v7[6396] = 0; /*0xffca9a38*/
CpuCount = (_BYTE *)GetCpuCount(p_n42_1, n6_2, n6_5); /*0xffca9a3f*/
LOBYTE(v11) = *(v7 - 317); /*0xffca9a44*/
if ( (_BYTE)v11 ) /*0xffca9a4f*/
{
v11 = (unsigned __int8)v11; /*0xffca9a51*/
do /*0xffca9a6e*/
{
if ( *CpuCount && CpuCount[107] ) /*0xffca9a59*/
v7[6396] = 1; /*0xffca9a5f*/
CpuCount += 1379; /*0xffca9a66*/
--v11; /*0xffca9a6b*/
}
while ( v11 ); /*0xffca9a6e*/
}
n6_3 = n6_5; /*0xffca9a77*/
if ( !v7[6396] || (unsigned __int8)*v7 >= 0xBu ) /*0xffca9a80*/
goto LABEL_45; /*0xffca9a80*/
n11 = 11; /*0xffca9a84*/
}
*v7 = n11; /*0xffca9a87*/
LABEL_45:
*(v7 - 314) = 0; /*0xffca9a89*/
if ( *(_BYTE *)(p_n42_1 + 257313) && (unsigned __int8)*(v7 - 317) > 1u ) /*0xffca9aa0*/
*(v7 - 314) = 2; /*0xffca9aa2*/
if ( *(_BYTE *)(v2 + p_n42_1 + 258694) >= 0xAu && *(_BYTE *)(p_n42_1 + 257313) ) /*0xffca9ab3*/
*(v7 - 314) = 2; /*0xffca9abc*/
if ( (*(_DWORD *)(p_n42_1 + 130) & 0x4000000) != 0 ) /*0xffca9acd*/
{
v12 = *(_BYTE *)(p_n42_1 + 762); /*0xffca9acf*/
if ( v12 ) /*0xffca9ad7*/
{
*(v7 - 314) = v12; /*0xffca9ad9*/
if ( v12 == 1 ) /*0xffca9ae1*/
*(v7 - 314) = 0; /*0xffca9ae3*/
}
}
LABEL_55:
++n6_3; /*0xffca9aea*/
v7 += 7688; /*0xffca9aec*/
n6_5 = n6_3; /*0xffca9af2*/
}
while ( n6_3 < 6u ); /*0xffca9af9*/
if ( *(_BYTE *)(p_n42_1 + 146) )
{
n100 = *(_BYTE *)(p_n42_1 + 143); /*0xffca9b0c*/
if ( !n100 || *(unsigned __int16 *)(v2 + p_n42_1 + 258695) % 0x64u )
v13 = byte_FFD3F628[*(unsigned __int8 *)(p_n42_1 + 257311)]; /*0xffca9b3e*/
else
v13 = n100 != 100 ? -123 : 100;
}
else
{
v13 = -123; /*0xffca9b08*/
}
v21 = v13; /*0xffca9b44*/
p_n42_2 = DdrTrainFunc441F(*(_BYTE *)(p_n42_1 + 257311), v13); /*0xffca9b5d*/
*(_BYTE *)(p_n42_1 + 9401) = v21; /*0xffca9b6a*/
DdrTrainFunc4439((_BYTE *)p_n42_1, n6, (bool *)v23, (unsigned __int8 *)&p_n42); /*0xffca9b76*/
if ( v21 == -123 ) /*0xffca9b88*/
v15 = 1000000 / (int)(133 * p_n42_2 + p_n42_2 / 3u); /*0xffca9ba4*/
else
v15 = 0xF4240 / (100 * (unsigned int)p_n42_2); /*0xffca9bb6*/
v16 = *(_BYTE *)(p_n42_1 + 246400) == 0; /*0xffca9bb8*/
n6_4 = n6_1; /*0xffca9bbf*/
*(_DWORD *)(p_n42_1 + 9506) = v15; /*0xffca9bc3*/
if ( !v16 )
DebugPrint(p_n42_1, 3, 255, 255, 255, 255, 255, 255, "Reset requested: non-MRC\n");
DdrTrainFunc5D8E(p_n42_1, n6); /*0xffca9bea*/
if ( p_n42_2 != (_BYTE)p_n42 || v21 != byte_FFD5BA90[(unsigned __int8)v23[0]] ) /*0xffca9c0a*/
{
v23[0] = v21 != -123; /*0xffca9c15*/
DdrTrainFunc6DFC((_BYTE *)p_n42_1, n6, v23[0], p_n42_2); /*0xffca9c23*/
*(_BYTE *)(p_n42_1 + 246400) |= 2u; /*0xffca9c2b*/
}
if ( *(_BYTE *)(p_n42_1 + 246400) ) /*0xffca9c32*/
return 1; /*0xffca9c3d*/
if ( *(_BYTE *)(v2 + p_n42_1 + 258716) ) /*0xffca9c40*/
{
if ( ProcCommonFuncFB4A(p_n42_1, 3u) ) /*0xffca9c4c*/
{
KtiFunc8014(p_n42_1); /*0xffca9c58*/
LogDebugString((_BYTE *)p_n42_1, (int)"Memory behind processor %d running at ", n6_4); /*0xffca9c64*/
RmtFunc4330((_BYTE *)p_n42_1, n6); /*0xffca9c6e*/
KtiFunc834D(p_n42_1); /*0xffca9c74*/
}
}
return 0; /*0xffca9c7e*/
}
// Function: KtiFunc9CF7 @ 0xffca9cf7 (0xcc bytes)
// Index: 1382/2560
int __cdecl KtiFunc9CF7(unsigned __int8 *__return_address, unsigned __int8 n4, __int16 a3, unsigned __int16 a4)
{
unsigned int n7592549; // ebx
unsigned int v5; // eax
int i; // esi
char n7592549_1; // cl
unsigned __int8 n4_1; // dl
unsigned __int8 n6_1; // cl
int result; // eax
unsigned __int8 *v11; // esi
int n6; // [esp+10h] [ebp-804h]
char buf[2048]; // [esp+14h] [ebp-800h] BYREF
if ( a3 ) /*0xffca9d0a*/
{
n7592549 = 0; /*0xffca9d4e*/
}
else
{
n7592549 = 7592549; /*0xffca9d14*/
v5 = a4 >> 1; /*0xffca9d1c*/
if ( (_WORD)v5 ) /*0xffca9d22*/
{
for ( i = 0; (unsigned __int16)i < (int)(v5 % 0x17); ++i ) /*0xffca9d31*/
{
n7592549_1 = n7592549; /*0xffca9d33*/
n7592549 >>= 1; /*0xffca9d35*/
if ( (n7592549_1 & 1) != 0 ) /*0xffca9d3a*/
n7592549 |= 0x400000u; /*0xffca9d3c*/
}
n7592549 += v5 / 0x17; /*0xffca9d4a*/
}
}
n4_1 = n4; /*0xffca9d50*/
n6_1 = 0; /*0xffca9d57*/
result = 48704 * n4; /*0xffca9d63*/
LOBYTE(n6) = 0; /*0xffca9d69*/
v11 = &__return_address[result + 258722]; /*0xffca9d73*/
do /*0xffca9db6*/
{
if ( *v11 ) /*0xffca9d75*/
{
memset32(buf, n7592549, 0x10u); /*0xffca9d87*/
LOBYTE(result) = RmtFunc71F8(__return_address, n4_1, n6, buf, 0x20u, 0); /*0xffca9d94*/
n6_1 = n6; /*0xffca9d99*/
n4_1 = n4; /*0xffca9da0*/
}
++n6_1; /*0xffca9da7*/
v11 += 7688; /*0xffca9da9*/
LOBYTE(n6) = n6_1; /*0xffca9daf*/
}
while ( n6_1 < 6u ); /*0xffca9db6*/
return result; /*0xffca9db8*/
}
// Function: KtiFunc9DC3 @ 0xffca9dc3 (0x19a bytes)
// Index: 1383/2560
int __cdecl KtiFunc9DC3(
int __return_address,
unsigned __int8 n4,
unsigned __int8 n6,
unsigned __int8 n2,
unsigned __int8 CpuCount)
{
int __return_address_1; // ebp
int v7; // esi
int v8; // edi
char v9; // ah
unsigned __int8 CpuCount_1; // dl
char v11; // al
char v12; // cl
int result; // eax
char v14; // bl
int v15; // [esp+10h] [ebp-14h]
int v16; // [esp+14h] [ebp-10h]
int v17; // [esp+18h] [ebp-Ch]
int v18; // [esp+20h] [ebp-4h]
int n4a; // [esp+2Ch] [ebp+8h]
unsigned __int8 n2a; // [esp+34h] [ebp+10h]
__return_address_1 = __return_address; /*0xffca9dcc*/
v15 = 48704 * n4 + __return_address + 258722; /*0xffca9dea*/
v17 = GetCpuCount(__return_address, n4, n6); /*0xffca9dfd*/
v7 = KtiFunc91AF(__return_address, n4, n6, n2); /*0xffca9e0b*/
v16 = 7688 * n6; /*0xffca9e20*/
v18 = v15 + v16 + 3154; /*0xffca9e2c*/
v8 = 242 * CpuCount; /*0xffca9e3f*/
n2a = KtiFunc88D1(__return_address, n4, n6, n2, CpuCount); /*0xffca9e45*/
*(_BYTE *)(v8 + v7 + 1) = n2a; /*0xffca9e4c*/
if ( *(_WORD *)(__return_address + 257315) != 11 && *(_BYTE *)(v16 + v15 + 6262) != 1 /*0xffca9e8d*/
|| (__return_address_1 = __return_address, *(_WORD *)(__return_address + 257315) == 11)
&& !*(_BYTE *)(v16 + v15 + 6676)
|| CpuCount < 2u )
{
*(_BYTE *)(7 * n2a + v18) = n2; /*0xffca9e9b*/
*(_BYTE *)(7 * *(unsigned __int8 *)(v8 + v7 + 1) + v18 + 1) = CpuCount; /*0xffca9ea6*/
}
*(_BYTE *)(v8 + v7 + 2) = CpuCount + 4 * n2; /*0xffca9ebc*/
v9 = KtiFunc88D1(__return_address_1, n4, n6, n2, CpuCount); /*0xffca9ec9*/
*(_BYTE *)(v8 + v7 + 3) = v9; /*0xffca9ed7*/
n4a = 1379 * n2; /*0xffca9edb*/
if ( *(_BYTE *)(n4a + v17 + 19) > 2u && *(_WORD *)(__return_address_1 + 257315) == 11 ) /*0xffca9ef0*/
{
CpuCount_1 = CpuCount; /*0xffca9ef2*/
v11 = CpuCount >> 1; /*0xffca9ef8*/
}
else
{
CpuCount_1 = CpuCount; /*0xffca9efc*/
v11 = CpuCount & 1; /*0xffca9f02*/
}
*(_BYTE *)(v8 + v7 + 6) = v9; /*0xffca9f06*/
v12 = 2 * n2; /*0xffca9f0a*/
*(_BYTE *)(v8 + v7 + 7) = (2 * n2) | v11; /*0xffca9f0e*/
if ( *(_BYTE *)(__return_address_1 + 257313) ) /*0xffca9f12*/
*(_BYTE *)(v8 + v7 + 4) = n2 | (2 * CpuCount_1); /*0xffca9f27*/
else
*(_BYTE *)(v8 + v7 + 4) = n2; /*0xffca9f1b*/
if ( *(_BYTE *)(__return_address_1 + 257313) ) /*0xffca9f2b*/
v12 |= CpuCount_1; /*0xffca9f34*/
result = 1379 * n2; /*0xffca9f36*/
*(_BYTE *)(v8 + v7 + 5) = v12; /*0xffca9f3a*/
v14 = 4 * n2; /*0xffca9f42*/
if ( *(_BYTE *)(n4a + v17 + 126) > 1u ) /*0xffca9f4a*/
CpuCount_1 &= 1u; /*0xffca9f4c*/
*(_BYTE *)(v8 + v7 + 8) = CpuCount_1 | v14; /*0xffca9f51*/
return result; /*0xffca9f55*/
}
// Function: PostMrcPpibCleanup @ 0xffca9f5d (0x134 bytes)
// Index: 1384/2560
int __usercall PostMrcPpibCleanup@<eax>(unsigned int a1@<ebx>, int __return_address@<edi>, int buf)
{
int buf_1; // esi
int v4; // eax
int v5; // edi
int v6; // ebx
int v7; // ebp
int v8; // ebp
buf_1 = buf; /*0xffca9f60*/
KtiFunc7983(buf); /*0xffca9f66*/
v4 = MemColdBootCheck(__return_address, buf_1, buf_1); /*0xffca9f6c*/
v5 = v4; /*0xffca9f71*/
if ( v4 ) /*0xffca9f77*/
*(_DWORD *)(buf_1 + 246396) = v4; /*0xffca9f79*/
if ( !*(_BYTE *)(buf_1 + 246400) ) /*0xffca9f7f*/
RmtCoreMain((unsigned __int8 *)buf_1); /*0xffca9f89*/
ProcCommonFuncC96D(a1, (_BYTE *)buf_1); /*0xffca9f90*/
v6 = AutoGenFuncFD5B(); /*0xffca9f9a*/
(*(void (__cdecl **)(int, int, int, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v6 + 88))(v6, 1, 331781, 0, 0, 0); /*0xffca9fab*/
v7 = (*(int (__cdecl **)(int, void *))(*(_DWORD *)v6 + 24))(v6, &unk_FFD5BAA4); /*0xffca9fbc*/
if ( ProcessLibraryEntryPoint() && v7 < 0 ) /*0xffca9fc9*/
{
if ( DebugEnabled() && DebugAssertCheck(0x80000000) ) /*0xffca9fd9*/
DebugPrintDispatcher(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", v7); /*0xffca9fee*/
DebugPrintEx( /*0xffcaa005*/
(int)"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemoryInit.c",
578,
(int)"!EFI_ERROR (Status)");
}
v8 = (*(int (__cdecl **)(int, int *))(*(_DWORD *)v6 + 40))(v6, &buf); /*0xffcaa01a*/
if ( ProcessLibraryEntryPoint() && v8 < 0 ) /*0xffcaa027*/
{
if ( DebugEnabled() && DebugAssertCheck(0x80000000) ) /*0xffcaa037*/
DebugPrintDispatcher(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", v8); /*0xffcaa04c*/
DebugPrintEx( /*0xffcaa063*/
(int)"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemoryInit.c",
582,
(int)"!EFI_ERROR (Status)");
}
*(_DWORD *)(buf_1 + 246404) = buf == 17; /*0xffcaa077*/
KtiFunc793F(buf_1, v5); /*0xffcaa07d*/
return MemFuncA091(v6, buf_1); /*0xffcaa08c*/
}
// Function: MemFuncA091 @ 0xffcaa091 (0x49b bytes)
// Index: 1385/2560
int __cdecl MemFuncA091(int a1, int __return_address)
{
unsigned int v2; // ebp
int result; // eax
int __return_address_1; // ecx
char n11; // al
char n2; // dl
char v7; // bl
unsigned __int8 v8; // dh
bool v9; // ah
int v10; // edi
char v11; // al
unsigned int v12; // edx
char v13; // bl
char v14; // al
int v15; // edi
char v16; // bl
int v17; // esi
char v18; // [esp+10h] [ebp-54h]
char n10; // [esp+11h] [ebp-53h] BYREF
unsigned __int8 v20; // [esp+12h] [ebp-52h]
bool v21; // [esp+13h] [ebp-51h]
_BYTE v22[4]; // [esp+14h] [ebp-50h] BYREF
int v23; // [esp+18h] [ebp-4Ch] BYREF
unsigned int v24; // [esp+1Ch] [ebp-48h]
int v25; // [esp+20h] [ebp-44h]
__int16 v26; // [esp+24h] [ebp-40h]
_BYTE v27[12]; // [esp+28h] [ebp-3Ch] BYREF
_DWORD v28[3]; // [esp+34h] [ebp-30h] BYREF
_BYTE v29[2]; // [esp+40h] [ebp-24h] BYREF
char n2_1; // [esp+42h] [ebp-22h]
__int16 n32; // [esp+47h] [ebp-1Dh]
__int16 n3076; // [esp+49h] [ebp-1Bh]
char v33; // [esp+4Bh] [ebp-19h]
__int16 v34; // [esp+4Ch] [ebp-18h]
char v35; // [esp+4Eh] [ebp-16h]
char v36; // [esp+4Fh] [ebp-15h]
__int16 v37; // [esp+50h] [ebp-14h] BYREF
int v38; // [esp+52h] [ebp-12h]
_BYTE v39[12]; // [esp+56h] [ebp-Eh] BYREF
__int16 v40; // [esp+62h] [ebp-2h]
unsigned __int8 v41; // [esp+68h] [ebp+4h]
v28[0] = -1296981343; /*0xffcaa09a*/
v37 = 0; /*0xffcaa0a2*/
v38 = 0; /*0xffcaa0ab*/
v28[1] = -758005055; /*0xffcaa0b3*/
memset(v39, 0, sizeof(v39)); /*0xffcaa0bc*/
v2 = 0; /*0xffcaa0bd*/
v23 = 0; /*0xffcaa0c5*/
v28[2] = -219028767; /*0xffcaa0ca*/
v40 = 0; /*0xffcaa0d3*/
result = (*(int (__cdecl **)(int, void *, _DWORD, _DWORD, int *))(*(_DWORD *)a1 + 32))(a1, &unk_FFD514F4, 0, 0, &v23); /*0xffcaa0dc*/
if ( result >= 0 )
{
__return_address_1 = __return_address; /*0xffcaa0ea*/
if ( *(_DWORD *)(__return_address + 251136) )
{
while ( *(_DWORD *)(__return_address_1 + v2 + 251148) != 1 )
{
if ( *(_DWORD *)(__return_address_1 + v2 + 251148) == 2 /*0xffcaa116*/
|| *(_DWORD *)(__return_address_1 + v2 + 251148) == 3
|| (unsigned int)(*(_DWORD *)(__return_address_1 + v2 + 251148) - 4) < 2 )
{
v41 = *(_BYTE *)(__return_address_1 + v2 + 251164); /*0xffcaa136*/
LABEL_10:
v7 = *(_BYTE *)(__return_address_1 + v2 + 251162); /*0xffcaa147*/
v8 = *(_BYTE *)(__return_address_1 + v2 + 251163); /*0xffcaa14e*/
n11 = *(_BYTE *)(__return_address_1 + v2 + 251160); /*0xffcaa155*/
n2 = *(_BYTE *)(__return_address_1 + v2 + 251161); /*0xffcaa15c*/
goto LABEL_11; /*0xffcaa15c*/
}
n11 = -1; /*0xffcaa11d*/
v41 = -1; /*0xffcaa11f*/
n2 = -1; /*0xffcaa124*/
v7 = -1; /*0xffcaa127*/
v8 = -1; /*0xffcaa12a*/
LABEL_11:
v20 = v8; /*0xffcaa163*/
v18 = v7; /*0xffcaa169*/
v9 = n11 == 11; /*0xffcaa16d*/
if ( n11 == 7 && (!n2 || n2 == 2 || n2 == 9 || n2 == 5 || n2 == 8 || n2 == 4 || n2 == 10) /*0xffcaa1bd*/
|| n11 == 20 && n2 == 1
|| n11 == -19 && !n2
|| n11 == 22 && !n2
|| n11 == 31
|| n11 == 41
|| n11 == 36
|| n11 == 49 )
{
v9 = 1; /*0xffcaa1bf*/
}
if ( n11 == 1 || n11 == 2 || n11 == 3 ) /*0xffcaa1cb*/
v9 = 1; /*0xffcaa1cd*/
v21 = 0; /*0xffcaa1cf*/
if ( n11 == 23 ) /*0xffcaa1d6*/
v21 = n2 == 1; /*0xffcaa1e2*/
if ( v9 )
{
v10 = v8; /*0xffcaa1ee*/
LOBYTE(v25) = v7; /*0xffcaa1f5*/
v11 = v8 / 3u; /*0xffcaa1f9*/
v12 = v8 % 3u; /*0xffcaa1f9*/
v13 = v11; /*0xffcaa1fd*/
LOBYTE(v26) = v12; /*0xffcaa207*/
v24 = v12; /*0xffcaa20f*/
HIBYTE(v26) = v41; /*0xffcaa213*/
BYTE2(v25) = v11; /*0xffcaa21c*/
KtiFuncA52C(v23, v25, v26); /*0xffcaa22a*/
n32 = 32; /*0xffcaa23b*/
v14 = 3 * v13; /*0xffcaa24f*/
n10 = 10; /*0xffcaa257*/
v35 = 2 * v13; /*0xffcaa25c*/
v7 = v18; /*0xffcaa260*/
n2_1 = 2; /*0xffcaa264*/
n3076 = 3076; /*0xffcaa26b*/
v34 = -23441; /*0xffcaa274*/
v33 = v41 + (v18 != 0 ? -80 : -96) + 2 * (v24 + v14);
v36 = v41 | (16 * (v24 | (4 * v18))); /*0xffcaa291*/
(*(void (__cdecl **)(int, int, _DWORD, int, _BYTE *, int, _BYTE *, char *))(v23 + 12))( /*0xffcaa2b1*/
v23,
10,
0,
68,
v29,
16,
v27,
&n10);
*(_WORD *)&v39[1] = n32; /*0xffcaa2bb*/
*(_WORD *)&v39[3] = n3076; /*0xffcaa2c7*/
v39[6] = v34; /*0xffcaa2d2*/
v39[5] = v33; /*0xffcaa2e8*/
v39[10] = HIBYTE(v34); /*0xffcaa2f3*/
*(_WORD *)&v39[7] = 0; /*0xffcaa2fe*/
v39[9] = 0; /*0xffcaa306*/
LOBYTE(v38) = -33; /*0xffcaa30d*/
v39[11] = v35; /*0xffcaa312*/
LOBYTE(v40) = v36; /*0xffcaa321*/
n10 = 2; /*0xffcaa32d*/
HIBYTE(v40) = *((_BYTE *)v28 + 2 * v10 + v41); /*0xffcaa335*/
(*(void (__cdecl **)(int, int, _DWORD, int, __int16 *, int, _BYTE *, char *))(v23 + 12))( /*0xffcaa35d*/
v23,
50,
0,
204,
&v37,
20,
v22,
&n10);
__return_address_1 = __return_address; /*0xffcaa360*/
}
if ( v21 )
{
v15 = v20; /*0xffcaa378*/
LOBYTE(v25) = v7; /*0xffcaa381*/
v16 = v20 / 3u; /*0xffcaa38e*/
v26 = v20 % 3u; /*0xffcaa392*/
v24 = v20 % 3u; /*0xffcaa39b*/
BYTE2(v25) = v20 / 3u; /*0xffcaa3a5*/
v17 = v25; /*0xffcaa3a9*/
KtiFuncA52C(v23, v25, v26); /*0xffcaa3b3*/
HIBYTE(v26) = 1; /*0xffcaa3bb*/
KtiFuncA52C(v23, v17, v26); /*0xffcaa3d1*/
n32 = 32; /*0xffcaa3e6*/
n10 = 10; /*0xffcaa3fe*/
v35 = 2 * v16; /*0xffcaa403*/
n2_1 = 2; /*0xffcaa410*/
n3076 = 3076; /*0xffcaa417*/
v34 = -22673; /*0xffcaa420*/
v33 = (v18 != 0 ? -79 : -95) + 2 * (v24 + 3 * v16);
v36 = (16 * (v24 | (4 * v18))) | 0xF; /*0xffcaa432*/
(*(void (__cdecl **)(int, int, _DWORD, int, _BYTE *, int, _BYTE *, char *))(v23 + 12))( /*0xffcaa44d*/
v23,
10,
0,
68,
v29,
16,
v27,
&n10);
*(_WORD *)&v39[1] = n32; /*0xffcaa455*/
*(_WORD *)&v39[3] = n3076; /*0xffcaa461*/
v39[6] = v34; /*0xffcaa46c*/
v39[5] = v33; /*0xffcaa482*/
*(_WORD *)&v39[7] = 0; /*0xffcaa489*/
v39[9] = 0; /*0xffcaa491*/
v39[10] = HIBYTE(v34); /*0xffcaa4a0*/
v39[11] = v35; /*0xffcaa4ab*/
LOBYTE(v40) = v36; /*0xffcaa4b6*/
LOBYTE(v38) = -33; /*0xffcaa4c7*/
n10 = 2; /*0xffcaa4cc*/
HIBYTE(v40) = *((_BYTE *)v28 + 2 * v15 + v41); /*0xffcaa4d4*/
(*(void (__cdecl **)(int, int, _DWORD, int, __int16 *, int, _BYTE *, char *))(v23 + 12))( /*0xffcaa4fc*/
v23,
50,
0,
204,
&v37,
20,
v22,
&n10);
__return_address_1 = __return_address; /*0xffcaa4ff*/
}
v2 += *(unsigned __int16 *)(__return_address_1 + v2 + 251152); /*0xffcaa511*/
if ( v2 >= *(_DWORD *)(__return_address_1 + 251136) ) /*0xffcaa51c*/
return 0; /*0xffcaa51c*/
}
v41 = *(_BYTE *)(__return_address_1 + v2 + 251164); /*0xffcaa143*/
goto LABEL_10; /*0xffcaa143*/
}
return 0; /*0xffcaa522*/
}
return result; /*0xffcaa524*/
}
// Function: KtiFuncA52C @ 0xffcaa52c (0x101 bytes)
// Index: 1386/2560
int __cdecl KtiFuncA52C(int a1, int a2, __int16 a3)
{
int v3; // esi
char v5; // [esp+8h] [ebp-4h] BYREF
__int16 v6; // [esp+9h] [ebp-3h]
char v7; // [esp+Bh] [ebp-1h]
v3 = a1; /*0xffcaa534*/
v5 = 0; /*0xffcaa537*/
v6 = 0; /*0xffcaa53a*/
v7 = 0; /*0xffcaa53e*/
if ( !a1 ) /*0xffcaa543*/
return -2147483645; /*0xffcaa545*/
HIBYTE(a1) = 4; /*0xffcaa552*/
(*(void (__cdecl **)(int, int, _DWORD, int, _DWORD, _DWORD, char *, char *))(v3 + 12))( /*0xffcaa563*/
v3,
46,
0,
67,
0,
0,
&v5,
(char *)&a1 + 3);
switch ( HIBYTE(a3) + 2 * ((_BYTE)a3 + 3 * BYTE2(a2)) ) /*0xffcaa584*/
{
case 0: /*0xffcaa584*/
*((_BYTE *)&v6 + 2 * (unsigned __int8)a2) |= 1u; /*0xffcaa58f*/
break; /*0xffcaa594*/
case 1: /*0xffcaa584*/
*((_BYTE *)&v6 + 2 * (unsigned __int8)a2) |= 2u; /*0xffcaa59a*/
break; /*0xffcaa59f*/
case 2: /*0xffcaa584*/
*((_BYTE *)&v6 + 2 * (unsigned __int8)a2) |= 4u; /*0xffcaa5a5*/
break; /*0xffcaa5aa*/
case 3: /*0xffcaa584*/
*((_BYTE *)&v6 + 2 * (unsigned __int8)a2) |= 8u; /*0xffcaa5b0*/
break; /*0xffcaa5b5*/
case 4: /*0xffcaa584*/
*((_BYTE *)&v6 + 2 * (unsigned __int8)a2) |= 0x10u; /*0xffcaa5bb*/
break; /*0xffcaa5c0*/
case 5: /*0xffcaa584*/
*((_BYTE *)&v6 + 2 * (unsigned __int8)a2) |= 0x20u; /*0xffcaa5c6*/
break; /*0xffcaa5cb*/
case 6: /*0xffcaa584*/
*((_BYTE *)&v6 + 2 * (unsigned __int8)a2) |= 0x40u; /*0xffcaa5d1*/
break; /*0xffcaa5d6*/
case 7: /*0xffcaa584*/
*((_BYTE *)&v6 + 2 * (unsigned __int8)a2) |= 0x80u; /*0xffcaa5dc*/
break; /*0xffcaa5e1*/
case 8: /*0xffcaa584*/
*(&v5 + 2 * (unsigned __int8)a2) |= 1u; /*0xffcaa5e7*/
break; /*0xffcaa5ec*/
case 9: /*0xffcaa584*/
*(&v5 + 2 * (unsigned __int8)a2) |= 2u; /*0xffcaa5f2*/
break; /*0xffcaa5f7*/
case 10: /*0xffcaa584*/
*(&v5 + 2 * (unsigned __int8)a2) |= 4u; /*0xffcaa5fd*/
break; /*0xffcaa602*/
case 11: /*0xffcaa584*/
*(&v5 + 2 * (unsigned __int8)a2) |= 8u; /*0xffcaa608*/
break; /*0xffcaa608*/
default:
break;
}
HIBYTE(a1) = 0; /*0xffcaa60d*/
return (*(int (__cdecl **)(int, int, _DWORD, int, char *, int, _DWORD, char *))(v3 + 12))( /*0xffcaa627*/
v3,
46,
0,
66,
&v5,
4,
0,
(char *)&a1 + 3);
}
// Function: KtiFuncA660 @ 0xffcaa660 (0x62 bytes)
// Index: 1387/2560
int __cdecl KtiFuncA660(int __return_address)
{
int v1; // edi
char v3[4096]; // [esp+Ch] [ebp-1004h] BYREF
int p_n4096; // [esp+100Ch] [ebp-4h] BYREF
p_n4096 = 4096; /*0xffcaa679*/
v1 = IioFn_FFCF2784(__return_address, __return_address + 246875, *(_DWORD *)(__return_address + 250972), v3, &p_n4096); /*0xffcaa694*/
if ( !v1 ) /*0xffcaa69b*/
{
AutoGenFunc8E72(__return_address + 246875, v3, p_n4096); /*0xffcaa6a8*/
*(_DWORD *)(__return_address + 250972) = p_n4096; /*0xffcaa6b3*/
}
return v1; /*0xffcaa6bb*/
}
// Function: KtiFuncA6C2 @ 0xffcaa6c2 (0xc2 bytes)
// Index: 1388/2560
int __cdecl KtiFuncA6C2(int __return_address, int *p___return_address, int *a3)
{
bool v4; // zf
unsigned __int8 v5; // al
int v6; // ecx
int v7; // edx
char v8; // bl
unsigned int v9; // eax
int v10; // eax
unsigned __int8 v12; // [esp+Fh] [ebp+Bh]
v4 = *(_DWORD *)(__return_address + 251024) == 2; /*0xffcaa6c9*/
v5 = *(_BYTE *)(__return_address + 246425); /*0xffcaa6d0*/
v12 = v5; /*0xffcaa6d6*/
if ( v4 ) /*0xffcaa6d9*/
{
if ( *(_BYTE *)(__return_address + 251021) ) /*0xffcaa6df*/
{
*(_DWORD *)(48704 * v5 + __return_address + 304930) += *(_DWORD *)(__return_address + 250972); /*0xffcaa6f8*/
KtiFuncA660(__return_address); /*0xffcaa6ff*/
v5 = *(_BYTE *)(__return_address + 246425) | 0x80; /*0xffcaa70b*/
}
v6 = __return_address + 246872; /*0xffcaa713*/
v7 = *(_DWORD *)(__return_address + 250972) + 4; /*0xffcaa719*/
*(_BYTE *)(__return_address + 246872) = v5; /*0xffcaa71c*/
v8 = 0; /*0xffcaa720*/
*(_WORD *)(__return_address + 246873) = v7; /*0xffcaa722*/
v9 = 0; /*0xffcaa72c*/
if ( v7 != 1 ) /*0xffcaa730*/
{
do /*0xffcaa738*/
v8 += *(_BYTE *)(v6 + v9++); /*0xffcaa732*/
while ( v9 < v7 - 1 ); /*0xffcaa738*/
}
*(_BYTE *)(v9 + __return_address + 246872) = -v8; /*0xffcaa73c*/
*p___return_address = v6; /*0xffcaa748*/
*a3 = v7; /*0xffcaa74d*/
v10 = 48704 * v12; /*0xffcaa753*/
++*(_DWORD *)(v10 + __return_address + 304926); /*0xffcaa759*/
*(_DWORD *)(v10 + __return_address + 304934) += v7; /*0xffcaa760*/
}
else
{
*p___return_address = __return_address + 246875; /*0xffcaa772*/
*a3 = *(_DWORD *)(__return_address + 250972); /*0xffcaa77d*/
}
return 0; /*0xffcaa781*/
}
// Function: KtiFuncA784 @ 0xffcaa784 (0x55 bytes)
// Index: 1389/2560
unsigned __int8 __cdecl KtiFuncA784(int __return_address, unsigned __int8 a2)
{
if ( *(_BYTE *)(__return_address + 1494) && *(_WORD *)(__return_address + 251028) ) /*0xffcaa792*/
{
while ( (KtiFunc10A7(*(_WORD *)(__return_address + 251028) + 5) & 0x20) == 0 ) /*0xffcaa7b3*/
; /*0xffcaa79c*/
if ( (unsigned __int8)(AutoGenFunc82D7() - 2) <= 0xFCu ) /*0xffcaa7be*/
AutoGenFunc804(*(_WORD *)(__return_address + 251028), a2); /*0xffcaa7cc*/
}
return a2; /*0xffcaa7d7*/
}
// Function: UncoreLateInit @ 0xffcaa7d9 (0x1a bytes)
// Index: 1390/2560
int __cdecl UncoreLateInit(int __return_address)
{
KtiFuncA9DF(__return_address, 0); /*0xffcaa7df*/
return KtiFuncA833(__return_address, 1); /*0xffcaa7f2*/
}
// Function: KtiFuncA7F3 @ 0xffcaa7f3 (0x40 bytes)
// Index: 1391/2560
int __cdecl KtiFuncA7F3(int __return_address, unsigned __int8 a2)
{
int result; // eax
unsigned int n0xFFF; // edx
result = 1; /*0xffcaa7f9*/
if ( *(_DWORD *)(__return_address + 250984) ) /*0xffcaa7fa*/
{
n0xFFF = *(_DWORD *)(__return_address + 250972); /*0xffcaa811*/
if ( n0xFFF >= 0xFFF ) /*0xffcaa81d*/
return result; /*0xffcaa81d*/
*(_BYTE *)(n0xFFF + __return_address + 246875) = a2; /*0xffcaa823*/
++*(_DWORD *)(__return_address + 250972); /*0xffcaa82a*/
}
else
{
KtiFuncA784(__return_address, a2); /*0xffcaa808*/
}
return 0; /*0xffcaa832*/
}
// Function: KtiFuncA833 @ 0xffcaa833 (0x131 bytes)
// Index: 1392/2560
int __cdecl KtiFuncA833(_DWORD *__return_address, char a2)
{
_DWORD *__return_address_1; // esi
int v3; // ebp
_DWORD *v5; // ebx
unsigned int v6; // ebp
unsigned int v7; // edi
_DWORD *__return_address_2; // ebx
char v9; // [esp+Bh] [ebp-9h]
int v10; // [esp+10h] [ebp-4h] BYREF
__return_address_1 = __return_address; /*0xffcaa838*/
v3 = 0; /*0xffcaa83c*/
v9 = 0; /*0xffcaa842*/
if ( !__return_address ) /*0xffcaa849*/
return 1; /*0xffcaa84d*/
if ( __return_address[62746] ) /*0xffcaa853*/
{
v5 = __return_address + 62743; /*0xffcaa860*/
if ( __return_address[62743] > 0xF60u /*0xffcaa88f*/
|| (unsigned int)KtiFuncA21((int)__return_address, __return_address[62744], __return_address[62745]) > 0x124F8
|| a2 )
{
KtiFuncA6C2((int)__return_address_1, (int *)&__return_address, &v10); /*0xffcaa8a0*/
if ( *((_BYTE *)__return_address_1 + 246736) ) /*0xffcaa8a8*/
v9 = KtiFunc8014((int)__return_address_1); /*0xffcaa8b8*/
v6 = v10; /*0xffcaa8bc*/
KtiFunc7A0A((int)__return_address_1, (int)__return_address, v10); /*0xffcaa8c6*/
if ( *((_BYTE *)__return_address_1 + 246824) == 1 ) /*0xffcaa8d5*/
{
v3 = IioFunc45B8((int)__return_address_1, (int)__return_address_1 + 246875, __return_address_1 + 62743); /*0xffcaa8e8*/
}
else
{
if ( __return_address_1[61698] ) /*0xffcaa8ec*/
KtiFunc8C4((int)__return_address_1, 0xC350u); /*0xffcaa8fb*/
v7 = 0; /*0xffcaa903*/
if ( v6 ) /*0xffcaa907*/
{
__return_address_2 = __return_address; /*0xffcaa909*/
do /*0xffcaa91d*/
KtiFuncA784((int)__return_address_1, *((_BYTE *)__return_address_2 + v7++)); /*0xffcaa913*/
while ( v7 < v6 ); /*0xffcaa91d*/
v3 = 0; /*0xffcaa91f*/
v5 = __return_address_1 + 62743; /*0xffcaa923*/
}
else
{
v3 = 0; /*0xffcaa92b*/
}
}
if ( *((_BYTE *)__return_address_1 + 246736) ) /*0xffcaa92e*/
{
if ( v9 ) /*0xffcaa93c*/
KtiFunc834D((int)__return_address_1); /*0xffcaa93f*/
}
*v5 = 0; /*0xffcaa945*/
*((_QWORD *)__return_address_1 + 31372) = KtiFunc9D6(); /*0xffcaa94f*/
}
}
return v3; /*0xffcaa95e*/
}
// Function: SetupSerialDebugMessages @ 0xffcaa964 (0x7b bytes)
// Index: 1393/2560
int __cdecl SetupSerialDebugMessages(int __return_address)
{
LogDebugString((_BYTE *)__return_address, (int)"BIOSSIM: SetupSerialDebugMessages() \n");
*(_DWORD *)(__return_address + 250984) = *(unsigned __int8 *)(__return_address + 1495); /*0xffcaa97c*/
KtiFunc7818(__return_address); /*0xffcaa982*/
if ( *(_BYTE *)(__return_address + 246824) ) /*0xffcaa98a*/
LogDebugString((_BYTE *)__return_address, (int)"\nUSB Serial Debug Enabled\n"); /*0xffcaa998*/
else
LogDebugString((_BYTE *)__return_address, (int)"\nUART Serial Debug Enabled\n"); /*0xffcaa9a0*/
KtiFuncA833(__return_address, 1); /*0xffcaa9aa*/
*(_BYTE *)(__return_address + 251020) = *(_BYTE *)(__return_address + 1496); /*0xffcaa9b5*/
*(_BYTE *)(__return_address + 251021) = *(_BYTE *)(__return_address + 1497); /*0xffcaa9c7*/
LogDebugString((_BYTE *)__return_address, (int)"Status Code Available"); /*0xffcaa9cd*/
return KtiFuncA9DF(__return_address, 2); /*0xffcaa9dd*/
}
// Function: KtiFuncA9DF @ 0xffcaa9df (0xaa bytes)
// Index: 1394/2560
void __cdecl KtiFuncA9DF(_BYTE *__return_address, int n2)
{
_DWORD *__return_address_1; // esi
_BYTE *v3; // edi
int n2_1; // ebp
unsigned int i; // ebx
__return_address_1 = __return_address; /*0xffcaa9e0*/
v3 = &unk_FFD5BAD0; /*0xffcaa9e5*/
if ( __return_address[251020] ) /*0xffcaa9ea*/
{
n2_1 = n2; /*0xffcaa9f9*/
if ( n2 ) /*0xffcaaa02*/
{
if ( n2 == 1 ) /*0xffcaaa07*/
{
v3 = &unk_FFD5BAC0; /*0xffcaaa1a*/
LogDebugString(__return_address, (int)"switch to bsd pipe\n"); /*0xffcaaa24*/
}
else if ( n2 == 2 ) /*0xffcaaa0c*/
{
v3 = &unk_FFD5BAB0; /*0xffcaaa0e*/
LogDebugString(__return_address, (int)"switch to threaded pipe\n"); /*0xffcaaa18*/
}
}
else
{
LogDebugString(__return_address, (int)"switch to console pipe\n"); /*0xffcaaa2c*/
}
__return_address_1[61717] = 0; /*0xffcaaa33*/
KtiFuncA833(__return_address_1, 1); /*0xffcaaa3d*/
while ( !KtiFuncAA89((int)__return_address_1, &__return_address, 0xAu) ) /*0xffcaaa56*/
; /*0xffcaaa44*/
for ( i = 0; i < 0x10; ++i ) /*0xffcaaa58*/
KtiFuncAB35((int)__return_address_1, v3[i]); /*0xffcaaa60*/
__return_address_1[62756] = 0; /*0xffcaaa6d*/
KtiFuncA833(__return_address_1, 1); /*0xffcaaa77*/
__return_address_1[62756] = n2_1; /*0xffcaaa7e*/
}
}
// Function: KtiFuncAA89 @ 0xffcaaa89 (0xac bytes)
// Index: 1395/2560
int __cdecl KtiFuncAA89(int __return_address, _BYTE **p___return_address, unsigned int n10)
{
int v3; // ebp
int v4; // ebx
__int64 v5; // kr00_8
char v6; // cl
int v8; // [esp+0h] [ebp-14h]
char v9; // [esp+Fh] [ebp-5h] BYREF
int v10; // [esp+10h] [ebp-4h]
v3 = 0; /*0xffcaaa98*/
v10 = 0; /*0xffcaaa9a*/
v4 = IioFunc40A2(__return_address, &v9, n10); /*0xffcaaaa9*/
if ( v4 != -2147483641 ) /*0xffcaaab4*/
goto LABEL_8; /*0xffcaaab4*/
if ( n10 != -1 ) /*0xffcaaabb*/
{
v5 = KtiFunc9D6(__return_address); /*0xffcaaac6*/
v10 = HIDWORD(v5); /*0xffcaaac6*/
v3 = v5; /*0xffcaaac6*/
}
if ( *(_WORD *)(__return_address + 251028) ) /*0xffcaaacc*/
{
while ( (KtiFunc105B(__return_address, *(_WORD *)(__return_address + 251028) + 5) & 1) == 0 ) /*0xffcaaaee*/
{
if ( n10 != -1 && KtiFuncA21(__return_address, v3, v10, v8) >= n10 ) /*0xffcaab09*/
goto LABEL_8; /*0xffcaab09*/
}
v6 = KtiFunc105B(__return_address, *(_WORD *)(__return_address + 251028)); /*0xffcaab2d*/
v4 = 0; /*0xffcaab31*/
}
else
{
LABEL_8:
v6 = v9; /*0xffcaab0b*/
}
*(_BYTE *)p___return_address = v6; /*0xffcaab15*/
return v4; /*0xffcaab13*/
}
// Function: KtiFuncAB35 @ 0xffcaab35 (0x14 bytes)
// Index: 1396/2560
unsigned __int8 __cdecl KtiFuncAB35(int a1, unsigned __int8 a2)
{
KtiFuncA7F3(a1, a2); /*0xffcaab3d*/
return a2; /*0xffcaab48*/
}
// Function: KtiDiscMain @ 0xffcaab49 (0xf70 bytes)
// Index: 1397/2560
void __cdecl KtiDiscMain(unsigned __int8 *__return_address, int n4, int n4a)
{
int n1100_11; // eax
int n8_20; // esi
int v5; // ebx
int v6; // edx
unsigned __int8 n1100_1; // cl
int n18; // eax
char *v9; // eax
int n1100_2; // edi
bool v11; // zf
__int16 p_n6_1; // bp
__int16 p_n8_1; // bx
int p_n6_2; // edi
int p_n8_2; // esi
int v16; // eax
unsigned __int8 *__return_address_1; // ebp
_BYTE *SocketInfo_1; // ecx
unsigned __int8 n6_1; // al
int CpuCount; // eax
unsigned __int8 n2_2; // cl
_BYTE *v22; // esi
unsigned __int8 n0x12_2; // cl
unsigned __int8 n0x12_1; // al
__int16 p_n6_3; // di
__int16 p_n8_3; // si
int n8_2; // esi
int n8_3; // edi
int v29; // esi
unsigned int n4a_1; // ebx
unsigned __int8 n8_4; // al
unsigned __int16 n1100_3; // di
int v33; // ecx
int n18_2; // eax
int v35; // ecx
bool v36; // sf
int p_n6_4; // ecx
int n4_1; // esi
unsigned int n64_1; // edi
int SocketInfo_2; // ecx
unsigned __... [31821 chars total]
// Function: KtiFuncBAB9 @ 0xffcabab9 (0x173 bytes)
// Index: 1398/2560
int __cdecl KtiFuncBAB9(int __return_address, unsigned __int8 n4, unsigned __int8 n6, _BYTE *a4, int a5)
{
unsigned __int8 n4_1; // si
int CpuCount; // eax
_BYTE *v7; // ecx
int n72; // ebx
_BYTE *v9; // eax
int n2; // ebp
int n4_2; // edx
_BYTE *CpuCount_2; // ebp
unsigned __int8 n2_1; // bl
int result; // eax
unsigned __int8 v15; // bh
char n4_3; // al
char n6_1; // si
unsigned __int8 n0x3F; // al
int v19; // ebp
int v20; // ecx
unsigned __int8 n0x3F_1; // [esp+13h] [ebp-19h]
int v22; // [esp+14h] [ebp-18h]
unsigned __int8 n2_2; // [esp+18h] [ebp-14h]
_BYTE *CpuCount_1; // [esp+1Ch] [ebp-10h]
unsigned __int8 v25; // [esp+20h] [ebp-Ch]
int v26; // [esp+24h] [ebp-8h]
int v27; // [esp+28h] [ebp-4h]
n4_1 = n4; /*0xffcabac9*/
CpuCount = GetCpuCount(__return_address, n4, n6); /*0xffcabacf*/
v7 = a4; /*0xffcabad4*/
CpuCount_1 = (_BYTE *)CpuCount; /*0xffcabadb*/
n72 = 72; /*0xffcabae1*/
do /*0xffcabafe*/
{
v9 = v7; /*0xffcabae4*/
n2 = 2; /*0xffcabae6*/
do /*0xffcabaf8*/
{
n4_2 = 4; /*0xffcabae9*/
do /*0xffcabaf3*/
{
*v9 = 0; /*0xffcabaea*/
v9 += 72; /*0xffcabaed*/
--n4_2; /*0xffcabaf0*/
}
while ( n4_2 ); /*0xffcabaf3*/
--n2; /*0xffcabaf5*/
}
while ( n2 ); /*0xffcabaf8*/
++v7; /*0xffcabafa*/
--n72; /*0xffcabafb*/
}
while ( n72 ); /*0xffcabafe*/
CpuCount_2 = CpuCount_1; /*0xffcabb00*/
n2_1 = 0; /*0xffcabb04*/
result = 0; /*0xffcabb06*/
n2_2 = 0; /*0xffcabb08*/
v22 = 0; /*0xffcabb0c*/
do /*0xffcabc1e*/
{
if ( *CpuCount_2 ) /*0xffcabb10*/
{
v26 = KtiFunc91AF(__return_address, n4_1, n6, n2_2); /*0xffcabb29*/
v15 = 0; /*0xffcabb2d*/
n4_3 = n4; /*0xffcabb2f*/
v25 = 0; /*0xffcabb3f*/
v27 = 50813 * n4; /*0xffcabb43*/
if ( *(_BYTE *)(v27 + __return_address + 10194) ) /*0xffcabb47*/
{
n6_1 = n6; /*0xffcabb54*/
do /*0xffcabbf2*/
{
n0x3F = KtiFunc89E9(__return_address, n4_3, n6_1, n2_2, v25, 0); /*0xffcabb65*/
if ( !n0x3F ) /*0xffcabb6f*/
{
n0x3F_1 = 0; /*0xffcabb71*/
v19 = 0; /*0xffcabb75*/
do /*0xffcabbd7*/
{
if ( *(_BYTE *)(__return_address + 257312) || n0x3F <= 0x3Fu ) /*0xffcabb82*/
{
v20 = v19 + 72 * (*(unsigned __int8 *)(242 * v15 + v26 + 1) + 8 * n6); /*0xffcabba7*/
a4[72 * v15 + 72 * v22 + v19] = (char)(*(_BYTE *)(a5 + 4 * v20) + *(_BYTE *)(a5 + 4 * v20 + 2)) / 2; /*0xffcabbc7*/
n0x3F = n0x3F_1; /*0xffcabbca*/
}
++n0x3F; /*0xffcabbce*/
++v19; /*0xffcabbd0*/
n0x3F_1 = n0x3F; /*0xffcabbd1*/
}
while ( n0x3F < 0x48u ); /*0xffcabbd7*/
n6_1 = n6; /*0xffcabbd9*/
}
v25 = ++v15; /*0xffcabbe3*/
n4_3 = n4; /*0xffcabbee*/
}
while ( v15 < *(_BYTE *)(v27 + __return_address + 10194) ); /*0xffcabbf2*/
CpuCount_2 = CpuCount_1; /*0xffcabbf8*/
}
result = v22; /*0xffcabbfc*/
n4_1 = n4; /*0xffcabc00*/
}
++n2_1; /*0xffcabc04*/
CpuCount_2 += 1379; /*0xffcabc06*/
result += 4; /*0xffcabc0c*/
n2_2 = n2_1; /*0xffcabc0f*/
CpuCount_1 = CpuCount_2; /*0xffcabc13*/
v22 = result; /*0xffcabc17*/
}
while ( n2_1 < 2u ); /*0xffcabc1e*/
return result; /*0xffcabc24*/
}
// Function: KtiFuncBC2C @ 0xffcabc2c (0x56 bytes)
// Index: 1399/2560
int __usercall KtiFuncBC2C@<eax>(int n6@<ebx>, unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // esi
unsigned __int8 n6_1; // cl
int v4; // eax
__return_address_1 = __return_address; /*0xffcabc30*/
n6_1 = __return_address[9402]; /*0xffcabc39*/
v4 = ~*((_DWORD *)__return_address + 157163); /*0xffcabc3f*/
LOBYTE(__return_address) = n6_1; /*0xffcabc41*/
if ( (v4 & 0x10000000) != 0 || (*(_DWORD *)(__return_address_1 + 134) & 0x10000) == 0 ) /*0xffcabc55*/
return 0; /*0xffcabc7d*/
if ( *(_WORD *)(__return_address_1 + 257315) != 11 ) /*0xffcabc5f*/
KtiFunc9791(n6, __return_address_1, n6_1); /*0xffcabc63*/
return (unsigned __int8)DdrTrainFuncE0C1((int)__return_address_1, (int)__return_address); /*0xffcabc7f*/
}
// Function: KtiFuncBC82 @ 0xffcabc82 (0xe3 bytes)
// Index: 1400/2560
int __cdecl KtiFuncBC82(unsigned __int8 *a1, int a2, int a3, int a4)
{
int v4; // ebp
_BYTE *SocketInfo; // ebx
_BYTE *v6; // esi
int v7; // ecx
int *v8; // edi
int n6; // edx
int v10; // eax
int v11; // ebx
int v12; // edx
int v13; // edx
int v15; // [esp+10h] [ebp-84h]
_BYTE *SocketInfo_1; // [esp+14h] [ebp-80h]
int n6_1; // [esp+18h] [ebp-7Ch]
_BYTE v18[120]; // [esp+1Ch] [ebp-78h] BYREF
v4 = 0; /*0xffcabc92*/
SocketInfo = (_BYTE *)GetSocketInfo((int)a1, a2); /*0xffcabca2*/
SocketInfo_1 = SocketInfo; /*0xffcabcb0*/
MailBoxFuncD1D1(a1, a2, a3, (int)v18); /*0xffcabcbc*/
v6 = v18; /*0xffcabcc8*/
v7 = 0; /*0xffcabccf*/
v15 = 0; /*0xffcabcd1*/
v8 = (int *)(a4 + 8); /*0xffcabcd5*/
n6 = 6; /*0xffcabcda*/
n6_1 = 6; /*0xffcabcdb*/
do /*0xffcabd56*/
{
if ( *SocketInfo ) /*0xffcabcdf*/
{
v10 = 1 << v7; /*0xffcabce7*/
v7 = v15; /*0xffcabce9*/
if ( (v10 & a3) != 0 ) /*0xffcabcf4*/
{
v11 = *(_DWORD *)v6 | *((_DWORD *)v6 + 2); /*0xffcabd03*/
v12 = *((_DWORD *)v6 + 1) | *((_DWORD *)v6 + 3); /*0xffcabd05*/
*(v8 - 2) = v11; /*0xffcabd08*/
*(v8 - 1) = v12; /*0xffcabd0b*/
if ( a1[257312] ) /*0xffcabd0e*/
{
*v8 = (unsigned __int8)v6[17] | (unsigned __int8)v6[16]; /*0xffcabd21*/
v7 = v15; /*0xffcabd23*/
}
else
{
*v8 = 0; /*0xffcabd29*/
}
v13 = v11 | v12; /*0xffcabd2c*/
SocketInfo = SocketInfo_1; /*0xffcabd2e*/
v4 |= *v8 | v13; /*0xffcabd34*/
n6 = n6_1; /*0xffcabd36*/
}
}
++v7; /*0xffcabd3a*/
SocketInfo += 7688; /*0xffcabd3b*/
v6 += 20; /*0xffcabd41*/
v15 = v7; /*0xffcabd44*/
v8 += 3; /*0xffcabd48*/
SocketInfo_1 = SocketInfo; /*0xffcabd4b*/
n6_1 = --n6; /*0xffcabd52*/
}
while ( n6 ); /*0xffcabd56*/
return v4; /*0xffcabd58*/
}
// Function: KtiLibMain @ 0xffcabd65 (0xd8f bytes)
// Index: 1401/2560
int __cdecl KtiLibMain(unsigned __int8 *__return_address, int n4, int n5, char a4, int n0x3F)
{
unsigned __int8 *__return_address_1; // ebp
char n4_1; // si
_BYTE *SocketInfo; // ecx
unsigned __int8 n0x3F_1; // al
int n5a_1; // edx
_BYTE *SocketInfo_2; // ecx
unsigned __int8 n6a_1; // al
_BYTE *v12; // esi
int v13; // edx
unsigned __int8 n4_2; // cl
int v15; // eax
unsigned __int8 n2; // dl
unsigned __int8 *v17; // esi
unsigned __int8 *v18; // edi
_BYTE *v19; // eax
int v20; // ecx
int v21; // ecx
int v22; // eax
unsigned __int8 v23; // al
unsigned __int8 n5b_1; // cl
unsigned __int8 n0x12_1; // al
unsigned __int8 *v26; // edx
_BYTE *SocketInfo_3; // edx
unsigned __int8 n6a_2; // al
_BYTE *v29; // ecx
int CpuCount; // eax
unsigned __int8 n2_1; // cl
_BYTE *n0x3F_3; // eax
unsigned __int8 *n0x3F_4; // edi
_BYTE *v34; // eax
int v35; // ecx
int v36; // ecx
int v37; // eax
_BYTE *SocketInfo_5; // ecx
unsigned __int8 n6a... [33520 chars total]
// Function: j_SetMem @ 0xffcacaf4 (0x5 bytes)
// Index: 1402/2560
// attributes: thunk
int __cdecl j_SetMem(int __return_address)
{
return SetMem(__return_address);
}
// Function: KtiFuncCAF9 @ 0xffcacaf9 (0x5 bytes)
// Index: 1403/2560
// attributes: thunk
int __cdecl KtiFuncCAF9(int __return_address)
{
return IioTailFunc849(__return_address);
}
// Function: KtiFuncCAFE @ 0xffcacafe (0x5 bytes)
// Index: 1404/2560
// attributes: thunk
unsigned int __cdecl KtiFuncCAFE(int __return_address)
{
return IioTailFuncD44(__return_address);
}
// Function: KtiFuncCB03 @ 0xffcacb03 (0x5 bytes)
// Index: 1405/2560
// attributes: thunk
char __cdecl KtiFuncCB03(_BYTE *p_n42, _BYTE **a2, int *p_n80)
{
return KtiFunc78F3(p_n42, a2, p_n80);
}
// Function: KtiFuncCB08 @ 0xffcacb08 (0x5 bytes)
// Index: 1406/2560
// attributes: thunk
char __cdecl KtiFuncCB08(_BYTE *n6, int n4)
{
return KtiFunc7CB2((int)n6, n4);
}
// Function: KtiFuncCB0D @ 0xffcacb0d (0x5 bytes)
// Index: 1407/2560
// attributes: thunk
char __cdecl KtiFuncCB0D(int n6, int n6a)
{
return KtiFunc7CD4(n6, n6a);
}
// Function: KtiConfigSetup @ 0xffcacb12 (0xd6a bytes)
// Index: 1408/2560
int __cdecl KtiConfigSetup(unsigned __int8 *__return_address, int n4, int n5)
{
int n4_1; // ebx
unsigned __int8 *__return_address_1; // edi
char *v5; // ecx
char *v6; // edx
int n6_1; // esi
unsigned int n22; // esi
_BYTE *SocketInfo_1; // ecx
_BYTE *v10; // edx
unsigned __int8 n6a_1; // al
int v12; // esi
_BYTE *v13; // esi
int v14; // esi
_BYTE *SocketInfo_3; // esi
unsigned __int8 n6a_3; // al
int v17; // ecx
int v18; // ebp
int n6a_2; // ebp
unsigned __int8 n2_2; // al
int n2_3; // esi
bool v22; // zf
char v23; // al
unsigned __int8 n18; // al
unsigned __int8 n0x12_1; // dl
int v26; // eax
int v27; // ecx
int n6_2; // ecx
unsigned __int8 v29; // bl
int v30; // eax
__int16 v31; // dx
int v32; // ecx
bool v33; // cc
int v34; // esi
char v35; // al
int v36; // esi
__int16 v37; // dx
__int16 v38; // ax
unsigned __int8 *v39; // esi
int v40; // ecx
_BYTE *SocketInfo_5; // ecx
unsigned __int8 n6a_4; // al
i... [31198 chars total]
// Function: KtiFuncD87C @ 0xffcad87c (0x8d bytes)
// Index: 1409/2560
int __cdecl KtiFuncD87C(
int __return_address,
unsigned __int8 n4,
char n6,
unsigned __int8 n2,
char n4a,
char n5,
int a7)
{
unsigned __int8 v7; // bl
int v8; // eax
int result; // eax
int v10; // [esp+8h] [ebp-4h]
v7 = DdrTrainFunc45AB(__return_address, n4, n6); /*0xffcad894*/
LOBYTE(v10) = v7; /*0xffcad89a*/
v8 = KtiFunc91AF(__return_address, n4, n6, n2); /*0xffcad8a6*/
if ( (unsigned __int8)n5 < 2u ) /*0xffcad8b6*/
{
*(_DWORD *)(a7 + 4 * v7) = -1; /*0xffcad901*/
return a7; /*0xffcad8fa*/
}
else
{
result = *(_DWORD *)(a7 + 4 * v7) /*0xffcad8f0*/
| (1 << (8 * DdrTrainFunc459C(v10, n6) + *(_BYTE *)(242 * (unsigned __int8)n4a + v8 + 1)));
*(_DWORD *)(a7 + 4 * v7) = result; /*0xffcad8f3*/
}
return result; /*0xffcad905*/
}
// Function: KtiFuncD909 @ 0xffcad909 (0x225 bytes)
// Index: 1410/2560
unsigned __int8 __cdecl KtiFuncD909(int __return_address, char a2, char a3)
{
char v4; // bh
unsigned __int8 n2; // bl
int CpuCount; // ecx
unsigned __int8 n2_1; // al
int v9; // edi
int v10; // ebp
unsigned __int8 n0x12; // dl
unsigned __int8 n17; // ch
unsigned __int8 v13; // cl
char n0x12_2; // al
unsigned __int8 n17_1; // [esp+Bh] [ebp-21h]
unsigned __int8 n4; // [esp+Ch] [ebp-20h]
unsigned __int8 n2_2; // [esp+10h] [ebp-1Ch]
int CpuCount_1; // [esp+14h] [ebp-18h]
_BYTE v19[16]; // [esp+18h] [ebp-14h] BYREF
__int16 v20; // [esp+28h] [ebp-4h]
char n0x12_1; // [esp+30h] [ebp+4h]
v4 = 0; /*0xffcad912*/
n2 = 0; /*0xffcad914*/
n17_1 = 0; /*0xffcad916*/
if ( (*(_BYTE *)(__return_address + 246408) & 4) != 0 ) /*0xffcad922*/
return 0; /*0xffcad924*/
memset(v19, 255, sizeof(v19)); /*0xffcad93c*/
v20 = -1; /*0xffcad941*/
CpuCount = GetCpuCount(__return_address, a2, a3); /*0xffcad948*/
n2_1 = 0; /*0xffcad94d*/
CpuCount_1 = CpuCount; /*0xffcad94f*/
n2_2 = 0; /*0xffcad953*/
do /*0xffcadafb*/
{
if ( v4 ) /*0xffcad959*/
break; /*0xffcad959*/
v9 = 1379 * n2_1; /*0xffcad962*/
if ( *(_BYTE *)(v9 + CpuCount) ) /*0xffcad968*/
{
n4 = 0; /*0xffcad986*/
v10 = KtiFunc91AF(__return_address, a2, a3, n2_2); /*0xffcad98a*/
do /*0xffcadae5*/
{
if ( v4 ) /*0xffcad98e*/
break; /*0xffcad98e*/
if ( !KtiFunc89E9(__return_address, a2, a3, n2_2, n4, 0) ) /*0xffcad9a7*/
{
n0x12 = 0; /*0xffcad9b7*/
n0x12_1 = 0; /*0xffcad9b9*/
do /*0xffcad9bd*/
{
if ( v4 ) /*0xffcad9bf*/
break; /*0xffcad9bf*/
if ( *(_BYTE *)(n0x12 + v10 + 242 * n4 + 44) ) /*0xffcad9d5*/
{
if ( !*(_BYTE *)(__return_address + 257312) ) /*0xffcad9e5*/
{
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "EFP NO ECC\n"); /*0xffcadacd*/
goto LABEL_30; /*0xffcadacd*/
}
if ( n17_1 ) /*0xffcad9ef*/
{
if ( ProcCommonFunc2AB(__return_address) ) /*0xffcad9f2*/
{
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "EFP LOCKSTEP \n"); /*0xffcadab8*/
LABEL_30:
n2 = 2; /*0xffcadad5*/
v4 = 1; /*0xffcadad7*/
break; /*0xffcadad7*/
}
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "EFP 2 strobes failing \n"); /*0xffcada13*/
n17 = n17_1; /*0xffcada18*/
v13 = 0; /*0xffcada1f*/
while ( 1 ) /*0xffcada2c*/
{
n0x12_2 = v19[v13]; /*0xffcada2c*/
if ( n0x12_2 != -1 ) /*0xffcada32*/
{
if ( n0x12_1 != n0x12_2 ) /*0xffcada36*/
break; /*0xffcada36*/
n2 = 1; /*0xffcada42*/
if ( (*(_DWORD *)(__return_address + 134) & 0x100) == 0 ) /*0xffcada44*/
break; /*0xffcada44*/
}
if ( ++v13 >= n17_1 ) /*0xffcada4a*/
goto LABEL_25; /*0xffcada4a*/
}
n2 = 2; /*0xffcada4e*/
v4 = 1; /*0xffcada50*/
}
else
{
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "EFP ODT based eval expected\n"); /*0xffcada67*/
n2 = 1; /*0xffcada6f*/
if ( (*(_DWORD *)(__return_address + 134) & 0x100) == 0 || *(_BYTE *)(v9 + CpuCount_1 + 107) ) /*0xffcada81*/
goto LABEL_30; /*0xffcada86*/
n17 = n17_1; /*0xffcada88*/
}
LABEL_25:
n0x12 = n0x12_1; /*0xffcada8c*/
n17_1 = n17 + 1; /*0xffcada95*/
v19[n17] = n0x12_1; /*0xffcada99*/
if ( n17 == 17 ) /*0xffcadaa0*/
goto LABEL_30; /*0xffcadaa0*/
}
n0x12_1 = ++n0x12; /*0xffcadaa4*/
}
while ( n0x12 < 0x12u ); /*0xffcad9bd*/
}
++n4; /*0xffcadadf*/
}
while ( n4 < 4u ); /*0xffcadae5*/
CpuCount = CpuCount_1; /*0xffcadaeb*/
}
n2_1 = n2_2 + 1; /*0xffcadaf3*/
n2_2 = n2_1; /*0xffcadaf5*/
}
while ( n2_1 < 2u ); /*0xffcadafb*/
if ( n2 )
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "EFP status: %d\n", n2);
return n2; /*0xffcadb28*/
}
// Function: j_IIOFunc0876 @ 0xffcadb2e (0x5 bytes)
// Index: 1411/2560
// attributes: thunk
unsigned int __cdecl j_IIOFunc0876(int __return_address)
{
return IIOFunc0876(__return_address);
}
// Function: KtiFuncDB33 @ 0xffcadb33 (0x78d bytes)
// Index: 1412/2560
int __cdecl KtiFuncDB33(
unsigned __int8 *__return_address,
int n4,
int a3,
int n4a,
int n2,
char n2_2,
int a7,
_WORD *a8,
unsigned int n64,
unsigned __int8 a10,
unsigned __int8 a11,
int n4aa,
_BYTE *n1100)
{
int n4a_1; // edi
unsigned __int8 v14; // cl
int n60_1; // eax
int v16; // ecx
__int16 *buf_1; // edx
unsigned __int8 n1100_1; // al
int v19; // eax
char n4aa_2; // al
int v21; // eax
_WORD *v22; // ecx
_BYTE *SocketInfo_2; // ebp
__int16 *buf_2; // eax
unsigned __int8 n1100_2; // dl
int v26; // ecx
_BYTE *SocketInfo_3; // ebx
unsigned __int8 n1100_3; // dl
int n4b_1; // ecx
unsigned __int8 n2_3; // bh
unsigned __int8 n4_1; // bl
int n5; // [esp-4h] [ebp-60h]
int n2_1; // [esp+10h] [ebp-4Ch]
__int16 *p_n60; // [esp+14h] [ebp-48h]
int n25; // [esp+18h] [ebp-44h]
int v37; // [esp+1Ch] [ebp-40h]
int v38; // [esp+20h] [ebp-3Ch]
__i... [12411 chars total]
// Function: KtiFuncE2C0 @ 0xffcae2c0 (0x104 bytes)
// Index: 1413/2560
int __cdecl KtiFuncE2C0(int n6, int a2)
{
_BYTE *SocketInfo; // ebp
int result; // eax
int v5; // ecx
unsigned __int8 n6a_1; // bl
_BYTE *CpuCount; // eax
unsigned __int8 n2; // bh
unsigned __int8 n4; // bl
int v10; // edi
unsigned __int8 n2_1; // [esp+10h] [ebp-10h]
unsigned __int8 n4_1; // [esp+14h] [ebp-Ch]
_BYTE *CpuCount_1; // [esp+18h] [ebp-8h]
_BYTE *SocketInfo_1; // [esp+1Ch] [ebp-4h]
unsigned __int8 n6a; // [esp+24h] [ebp+4h]
SocketInfo = (_BYTE *)GetSocketInfo(n6, a2); /*0xffcae2d6*/
result = a2; /*0xffcae2d8*/
v5 = 50813 * (unsigned __int8)a2; /*0xffcae2e0*/
n6a_1 = 0; /*0xffcae2e6*/
SocketInfo_1 = SocketInfo; /*0xffcae2e8*/
n6a = 0; /*0xffcae2ec*/
*(_DWORD *)(v5 + n6 + 10235) = 84215045; /*0xffcae2f0*/
*(_WORD *)(v5 + n6 + 58783) = 1285; /*0xffcae2fb*/
do /*0xffcae3b6*/
{
if ( *SocketInfo ) /*0xffcae305*/
{
CpuCount = (_BYTE *)GetCpuCount(n6, result, n6a); /*0xffcae315*/
n2 = 0; /*0xffcae321*/
CpuCount_1 = CpuCount; /*0xffcae323*/
n2_1 = 0; /*0xffcae327*/
do /*0xffcae395*/
{
if ( *CpuCount ) /*0xffcae32b*/
{
n4 = 0; /*0xffcae342*/
n4_1 = 0; /*0xffcae344*/
v10 = KtiFunc91AF(n6, a2, n6a, n2_1) + 37; /*0xffcae348*/
do /*0xffcae37d*/
{
if ( !KtiFunc89E9(n6, a2, n6a, n2_1, n4_1, 0) ) /*0xffcae35b*/
*(_DWORD *)(v10 - 1) = 84215045; /*0xffcae367*/
++n4; /*0xffcae36e*/
v10 += 242; /*0xffcae370*/
n4_1 = n4; /*0xffcae376*/
}
while ( n4 < 4u ); /*0xffcae37d*/
CpuCount = CpuCount_1; /*0xffcae37f*/
}
++n2; /*0xffcae383*/
CpuCount += 1379; /*0xffcae385*/
n2_1 = n2; /*0xffcae38a*/
CpuCount_1 = CpuCount; /*0xffcae38e*/
}
while ( n2 < 2u ); /*0xffcae395*/
n6a_1 = n6a; /*0xffcae397*/
SocketInfo = SocketInfo_1; /*0xffcae39b*/
result = a2; /*0xffcae39f*/
}
++n6a_1; /*0xffcae3a3*/
SocketInfo += 7688; /*0xffcae3a5*/
n6a = n6a_1; /*0xffcae3ab*/
SocketInfo_1 = SocketInfo; /*0xffcae3af*/
}
while ( n6a_1 < 6u ); /*0xffcae3b6*/
return result; /*0xffcae3bc*/
}
// Function: KtiTopologyCheck @ 0xffcae3c4 (0xcf1 bytes)
// Index: 1414/2560
int __cdecl KtiTopologyCheck(unsigned __int8 *__return_address, int n4, int n5, int a4, char a5)
{
unsigned __int8 n4_1; // bl
unsigned __int8 *__return_address_1; // ebp
int v7; // esi
char *v8; // edi
unsigned __int8 *v9; // eax
unsigned __int8 v10; // al
int v11; // eax
int v12; // ebx
unsigned __int8 v13; // dl
int v14; // edi
unsigned __int8 *v15; // eax
int n4_2; // ecx
int v17; // edx
__int16 *v18; // ecx
int v19; // esi
int n18_1; // ebx
int v21; // eax
int n5_1; // esi
unsigned int n64; // edi
unsigned __int8 i_1; // al
_BYTE *v25; // ebx
char i; // dl
int n4_4; // ebx
unsigned __int8 v28; // cl
__int16 *v29; // eax
_WORD *v30; // edx
_BYTE *SocketInfo_1; // ecx
char *v32; // edx
unsigned __int8 n6_1; // al
int v34; // edi
unsigned __int8 *v35; // edi
unsigned __int8 n2_1; // al
unsigned __int8 v37; // dh
int v38; // edi
unsigned __int8 j_1; // cl
unsigned __int8 n0x12_1; // al
int v41; // ecx
int v42;... [29665 chars total]
// Function: KtiFuncF0B5 @ 0xffcaf0b5 (0x66a bytes)
// Index: 1415/2560
void __cdecl KtiFuncF0B5(unsigned __int8 *__return_address, int n4, int n38)
{
int n4_1; // ebx
int v4; // eax
unsigned __int8 *__return_address_1; // edi
char *v6; // ecx
char *v7; // edx
int n6_2; // esi
int v9; // ebp
unsigned __int8 *v10; // ecx
int v11; // edx
int n72; // ebx
int v13; // eax
unsigned int n38_1; // ebp
_BYTE *SocketInfo_1; // ecx
unsigned __int8 n6_3; // al
int CpuCount; // eax
unsigned __int8 n2_1; // cl
int v19; // edx
_BYTE *v20; // eax
unsigned __int8 n0xF; // al
int v22; // ecx
unsigned int v23; // eax
char *v24; // ebp
int v25; // ecx
unsigned __int8 v26; // bh
char v27; // bl
char *v28; // ecx
unsigned __int16 v29; // ax
int SocketInfo_3; // edx
char *v31; // ecx
int n6_4; // eax
unsigned __int8 n0xF_1; // [esp+Bh] [ebp-3A45h]
_BYTE *n6; // [esp+Ch] [ebp-3A44h]
unsigned __int8 n6a; // [esp+Ch] [ebp-3A44h]
int n2; // [esp+10h] [ebp-3A40h]
unsigned __int8 n2a; // [esp+10h] [ebp-3A40h]
int ... [14938 chars total]
// Function: KtiFuncF71F @ 0xffcaf71f (0x55 bytes)
// Index: 1416/2560
int __cdecl KtiFuncF71F(int a1)
{
int v1; // eax
if ( (~*(_DWORD *)(a1 + 628652) & 0x200) == 0 ) /*0xffcaf731*/
{
v1 = *(unsigned __int8 *)(a1 + 9402); /*0xffcaf73d*/
if ( (*(_DWORD *)(a1 + 134) & 0x4000) != 0 ) /*0xffcaf744*/
{
KtiDiscMain((_BYTE *)a1, v1, 4); /*0xffcaf74a*/
KtiDiscMain((_BYTE *)a1, *(unsigned __int8 *)(a1 + 9402), 3); /*0xffcaf75a*/
}
else
{
KtiDiscMain((_BYTE *)a1, v1, 1); /*0xffcaf768*/
}
}
return 0; /*0xffcaf772*/
}
// Function: KtiFuncF774 @ 0xffcaf774 (0x33 bytes)
// Index: 1417/2560
int __cdecl KtiFuncF774(int __return_address)
{
if ( (~*(_DWORD *)(__return_address + 628652) & 0x800000) != 0 || (*(_BYTE *)(__return_address + 134) & 2) == 0 ) /*0xffcaf78e*/
return 0; /*0xffcaf7a4*/
else
return KtiConfigSetup((unsigned __int8 *)__return_address, *(unsigned __int8 *)(__return_address + 9402), 5); /*0xffcaf79b*/
}
// Function: KtiFuncF7A7 @ 0xffcaf7a7 (0x3f bytes)
// Index: 1418/2560
int __cdecl KtiFuncF7A7(_BYTE *__return_address)
{
if ( (~*((_DWORD *)__return_address + 157163) & 0x1000000) != 0 /*0xffcaf7c9*/
|| (*(_DWORD *)(__return_address + 134) & 0x4008000) != 0x4008000 )
{
return 0; /*0xffcaf7e3*/
}
else
{
return KtiTopologyCheck(__return_address, (unsigned __int8)__return_address[9402], 5, 1, 1); /*0xffcaf7da*/
}
}
// Function: KtiFuncF7E6 @ 0xffcaf7e6 (0x35 bytes)
// Index: 1419/2560
int __usercall KtiFuncF7E6@<eax>(int esi0@<esi>, _BYTE *__return_address)
{
if ( (~*((_DWORD *)__return_address + 157163) & 0x800) != 0 || (__return_address[134] & 2) == 0 ) /*0xffcaf803*/
return 0; /*0xffcaf7f9*/
else
return KtiParamSetup(esi0, __return_address, (unsigned __int8)__return_address[9402], 0, 5); /*0xffcaf812*/
}
// Function: KtiFuncF81B @ 0xffcaf81b (0x37 bytes)
// Index: 1420/2560
int __cdecl KtiFuncF81B(_BYTE *__return_address)
{
if ( (~__return_address[628656] & 8) != 0 || (*(_DWORD *)(__return_address + 134) & 0x10000000) == 0 ) /*0xffcaf835*/
return 0; /*0xffcaf84f*/
else
return KtiTopologyCheck(__return_address, (unsigned __int8)__return_address[9402], 1, 1, 0); /*0xffcaf846*/
}
// Function: KtiFuncF852 @ 0xffcaf852 (0x3b bytes)
// Index: 1421/2560
int __cdecl KtiFuncF852(int __return_address)
{
if ( (~*(_DWORD *)(__return_address + 628652) & 0x4000) == 0 ) /*0xffcaf864*/
{
KtiFuncF0B5((unsigned __int8 *)__return_address, *(unsigned __int8 *)(__return_address + 9402), 38); /*0xffcaf871*/
KtiFuncF0B5((unsigned __int8 *)__return_address, *(unsigned __int8 *)(__return_address + 9402), 39); /*0xffcaf881*/
}
return 0; /*0xffcaf88b*/
}
// Function: KtiFuncF88D @ 0xffcaf88d (0x6f bytes)
// Index: 1422/2560
int __cdecl KtiFuncF88D(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // ecx
unsigned __int8 v2; // dl
int v3; // eax
__return_address_1 = __return_address; /*0xffcaf890*/
v2 = __return_address[9402]; /*0xffcaf899*/
v3 = ~*((_DWORD *)__return_address + 157164); /*0xffcaf89f*/
LOBYTE(__return_address) = v2; /*0xffcaf8a1*/
if ( (v3 & 8) == 0 /*0xffcaf8c5*/
&& (*(_DWORD *)(__return_address_1 + 134) & 0x8000000) != 0
&& __return_address_1[48704 * v2 + 258694] >= 0x10u )
{
return KtiTopologyCheck(__return_address_1, (int)__return_address, 22, 1, 0); /*0xffcaf8d1*/
}
DebugPrint( /*0xffcaf8f0*/
(int)__return_address_1,
10,
(int)__return_address,
255,
255,
255,
255,
255,
"Skipping LRDIMM Tx DQ Centering Backside Training\n");
return 0; /*0xffcaf8d9*/
}
// Function: KtiFuncF8FC @ 0xffcaf8fc (0x29 bytes)
// Index: 1423/2560
int __cdecl KtiFuncF8FC(int __return_address)
{
if ( (~*(_DWORD *)(__return_address + 628652) & 0x4000) == 0 ) /*0xffcaf90d*/
KtiFuncF0B5((unsigned __int8 *)__return_address, *(unsigned __int8 *)(__return_address + 9402), 25); /*0xffcaf91a*/
return 0; /*0xffcaf924*/
}
// Function: KtiParamSetup @ 0xffcaf925 (0xaad bytes)
// Index: 1424/2560
int __cdecl KtiParamSetup(unsigned __int8 *__return_address, int n4, char a3, int n5)
{
int v4; // eax
char *v5; // ecx
char *v6; // edx
int n6_1; // esi
__int16 *v8; // esi
_WORD *v9; // edx
_DWORD *v10; // ecx
_DWORD *n0x3F_1; // eax
int n72; // ebx
_DWORD *v13; // ebp
bool v14; // zf
int n18; // ebx
_DWORD *n0x3F_3; // ebp
int n4_1; // ebx
unsigned __int8 *__return_address_1; // edi
_BYTE *SocketInfo_1; // ecx
unsigned __int8 n6_3; // al
int n5_1; // ebp
int v22; // esi
int v23; // eax
_BYTE *v24; // ecx
char v25; // al
int v26; // ecx
int v27; // edx
int v28; // edx
int v29; // esi
int v30; // eax
int v31; // ecx
int v32; // ecx
_BYTE *SocketInfo_3; // ecx
unsigned __int8 n6a_1; // al
int v35; // edx
int v36; // eax
_BYTE *v37; // ecx
char v38; // al
_WORD *n0x3F_5; // esi
_BYTE *SocketInfo_5; // edx
unsigned __int8 n6a_2; // al
int v42; // ecx
int CpuCount; // eax
unsigned __int8 n2_1; // cl
_BYTE ... [23185 chars total]
// Function: KtiFunc3D2 @ 0xffcb03d2 (0x2c6 bytes)
// Index: 1425/2560
char __cdecl KtiFunc3D2(_BYTE *__return_address, int n4, int n4a, int *p_n8, int *p_n6)
{
__int16 *v5; // ecx
int n6; // edx
int n8; // eax
_BYTE *SocketInfo_1; // ecx
unsigned __int8 n6_1; // al
__int16 n255; // bx
int v11; // edx
unsigned __int8 n2; // bh
__int16 n255_2; // bp
unsigned __int8 v14; // bl
unsigned __int8 *v15; // eax
int v16; // ecx
int v17; // ecx
int v18; // ecx
int v19; // ecx
int n6_2; // [esp+Ch] [ebp-2A0h]
int v22; // [esp+10h] [ebp-29Ch]
int v23; // [esp+14h] [ebp-298h]
int v24; // [esp+18h] [ebp-294h]
int v25; // [esp+1Ch] [ebp-290h]
int v26; // [esp+20h] [ebp-28Ch]
unsigned __int8 *v27; // [esp+24h] [ebp-288h]
__int16 n255_5; // [esp+28h] [ebp-284h]
__int16 n255_3; // [esp+2Ch] [ebp-280h]
int SocketInfo; // [esp+30h] [ebp-27Ch]
__int16 n255_4; // [esp+34h] [ebp-278h]
__int16 n255_1; // [esp+38h] [ebp-274h]
__int16 v33[96]; // [esp+3Ch] [ebp-270h] BYREF
int v34[108]; // [esp+FCh] [ebp-1B0h] BYREF
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffcb03f4*/
v5 = &v33[1]; /*0xffcb03f8*/
n6 = 6; /*0xffcb03fc*/
do /*0xffcb0410*/
{
n8 = 8; /*0xffcb03ff*/
do /*0xffcb040b*/
{
*(_DWORD *)(v5 - 1) = 0; /*0xffcb0402*/
v5 += 2; /*0xffcb0405*/
--n8; /*0xffcb0408*/
}
while ( n8 ); /*0xffcb040b*/
--n6; /*0xffcb040d*/
}
while ( n6 ); /*0xffcb0410*/
RmtFunc9414((int)__return_address, n4, (int)v34); /*0xffcb041d*/
RmtExecuteTest(__return_address, n4, 0, n4a, 2, 3u, (int)v34, v33, 0x40u, 0, 0, 0, 32); /*0xffcb0446*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcb044b*/
n6_1 = 0; /*0xffcb044f*/
LOBYTE(n6_2) = 0; /*0xffcb0454*/
n255 = 255; /*0xffcb045d*/
v11 = 0; /*0xffcb0462*/
n255_4 = -255; /*0xffcb0464*/
n255_1 = 255; /*0xffcb0468*/
v24 = 0; /*0xffcb046c*/
do /*0xffcb0639*/
{
if ( *SocketInfo_1 ) /*0xffcb0470*/
{
n2 = 0; /*0xffcb0479*/
n255_2 = 255; /*0xffcb0480*/
n255_5 = -255; /*0xffcb0485*/
n255_3 = 255; /*0xffcb048f*/
LOBYTE(v23) = 0; /*0xffcb0493*/
v27 = SocketInfo_1 + 415; /*0xffcb0497*/
do /*0xffcb05c2*/
{
v22 = KtiFunc91AF((int)__return_address, n4, n6_2, v23); /*0xffcb04aa*/
v14 = 0; /*0xffcb04ae*/
v15 = v27; /*0xffcb04b0*/
for ( LOBYTE(v26) = 0; v14 < *v27; LOBYTE(v26) = v14 ) /*0xffcb04bb*/
{
if ( !KtiFunc89E9((int)__return_address, n4, n6_2, v23, v26, 0) ) /*0xffcb04d3*/
{
v25 = 242 * v14; /*0xffcb04f4*/
v16 = v24 + *(unsigned __int8 *)(v25 + v22 + 1); /*0xffcb04fd*/
if ( v33[2 * v16] <= v33[2 * v16 + 1] ) /*0xffcb0509*/
{
v17 = 242 * v14; /*0xffcb052e*/
}
else
{
v33[2 * v16] = 0; /*0xffcb050d*/
v17 = 242 * v14; /*0xffcb0512*/
v33[2 * v24 + 1 + 2 * *(unsigned __int8 *)(v25 + v22 + 1)] = 0; /*0xffcb0523*/
n255_2 = n255_3; /*0xffcb0528*/
}
v18 = v24 + *(unsigned __int8 *)(v17 + v22 + 1); /*0xffcb053b*/
DebugPrint( /*0xffcb0565*/
(int)__return_address,
2,
n4,
n6_2,
v23,
v26,
255,
255,
"High = %d - Low = %d\n",
v33[2 * v18 + 1],
v33[2 * v18]);
v19 = v24 + *(unsigned __int8 *)(v25 + v22 + 1); /*0xffcb057a*/
if ( n255_5 < v33[2 * v19] ) /*0xffcb0588*/
n255_5 = v33[2 * v19]; /*0xffcb058a*/
if ( n255_2 > v33[2 * v19 + 1] ) /*0xffcb0596*/
{
n255_2 = v33[2 * v19 + 1]; /*0xffcb0598*/
n255_3 = n255_2; /*0xffcb059a*/
}
}
v15 = v27; /*0xffcb059e*/
++v14; /*0xffcb05a2*/
}
LOBYTE(v23) = ++n2; /*0xffcb05b7*/
v27 = v15 + 1379; /*0xffcb05bb*/
}
while ( n2 < 2u ); /*0xffcb05c2*/
n255 = n255_1; /*0xffcb05d0*/
if ( n255_4 < n255_5 ) /*0xffcb05d7*/
n255_4 = n255_5; /*0xffcb05dc*/
if ( n255_1 > n255_3 ) /*0xffcb05e7*/
{
n255 = n255_3; /*0xffcb05e9*/
n255_1 = n255_3; /*0xffcb05ec*/
}
DebugPrint( /*0xffcb060c*/
(int)__return_address,
2,
n4,
n6_2,
255,
255,
255,
255,
"Composite High = %d - Composite Low = %d\n",
n255_3,
n255_5);
n6_1 = n6_2; /*0xffcb0611*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcb0618*/
v11 = v24; /*0xffcb061c*/
}
++n6_1; /*0xffcb0620*/
SocketInfo_1 += 7688; /*0xffcb0622*/
v11 += 8; /*0xffcb0628*/
LOBYTE(n6_2) = n6_1; /*0xffcb062b*/
SocketInfo = (int)SocketInfo_1; /*0xffcb062f*/
v24 = v11; /*0xffcb0633*/
}
while ( n6_1 < 6u ); /*0xffcb0639*/
if ( n4a == 23 && *(_WORD *)(__return_address + 257315) != 11 ) /*0xffcb0652*/
MailBoxFunc4E51(__return_address, n4, 0); /*0xffcb0658*/
MailBoxFunc2B5B((int)__return_address, n4); /*0xffcb0662*/
*(_WORD *)p_n8 = n255_4; /*0xffcb0674*/
*(_WORD *)p_n6 = n255; /*0xffcb067e*/
if ( n255_4 <= n255 ) /*0xffcb0684*/
return n255 - n255_4; /*0xffcb068c*/
else
return 0; /*0xffcb0686*/
}
// Function: KtiFunc698 @ 0xffcb0698 (0x29 bytes)
// Index: 1426/2560
int __cdecl KtiFunc698(int a1)
{
if ( (~*(_DWORD *)(a1 + 628652) & 0x400) == 0 ) /*0xffcb06a9*/
KtiDiscMain((_BYTE *)a1, *(unsigned __int8 *)(a1 + 9402), 22); /*0xffcb06b6*/
return 0; /*0xffcb06c0*/
}
// Function: KtiFunc6C1 @ 0xffcb06c1 (0x33 bytes)
// Index: 1427/2560
int __cdecl KtiFunc6C1(int __return_address)
{
if ( (~*(_DWORD *)(__return_address + 628652) & 0x400000) != 0 || (*(_BYTE *)(__return_address + 134) & 4) == 0 ) /*0xffcb06db*/
return 0; /*0xffcb06f1*/
else
return KtiConfigSetup((unsigned __int8 *)__return_address, *(unsigned __int8 *)(__return_address + 9402), 23); /*0xffcb06e8*/
}
// Function: KtiFunc6F4 @ 0xffcb06f4 (0x3f bytes)
// Index: 1428/2560
int __cdecl KtiFunc6F4(_BYTE *__return_address)
{
if ( (~*((_DWORD *)__return_address + 157163) & 0x20000000) != 0 /*0xffcb0716*/
|| (*(_DWORD *)(__return_address + 134) & 0x2008000) != 0x2008000 )
{
return 0; /*0xffcb0730*/
}
else
{
return KtiTopologyCheck(__return_address, (unsigned __int8)__return_address[9402], 23, 1, 1); /*0xffcb0727*/
}
}
// Function: KtiFunc733 @ 0xffcb0733 (0x35 bytes)
// Index: 1429/2560
int __cdecl KtiFunc733(unsigned __int8 *__return_address)
{
if ( (~*((_DWORD *)__return_address + 157163) & 0x1000) != 0 || (__return_address[134] & 4) == 0 ) /*0xffcb0750*/
return 0; /*0xffcb0746*/
else
return KtiParamSetup(__return_address, __return_address[9402], 0, 23); /*0xffcb075f*/
}
// Function: KtiFunc768 @ 0xffcb0768 (0x29 bytes)
// Index: 1430/2560
int __cdecl KtiFunc768(int a1)
{
int v1; // ecx
_DWORD *v2; // eax
int v3; // edx
v1 = 0; /*0xffcb076c*/
if ( BYTE2(a1) > 1u ) /*0xffcb0777*/
{
v2 = &unk_FFD5BAE0; /*0xffcb0779*/
v3 = BYTE2(a1) - 1; /*0xffcb077e*/
do /*0xffcb0787*/
{
v1 += *v2++; /*0xffcb077f*/
--v3; /*0xffcb0784*/
}
while ( v3 ); /*0xffcb0787*/
}
return v1 + HIBYTE(a1); /*0xffcb0790*/
}
// Function: KtiFunc791 @ 0xffcb0791 (0xda bytes)
// Index: 1431/2560
int __cdecl KtiFunc791(int a1, char a2)
{
unsigned __int8 v2; // bh
unsigned __int8 v3; // ah
char v4; // bh
unsigned __int8 v5; // bl
unsigned int v6; // edx
char v7; // cl
unsigned int v8; // edx
int v9; // edx
unsigned __int8 n0xC; // al
v2 = *(_BYTE *)(a1 + 4); /*0xffcb079e*/
v3 = v2 & 0x7F; /*0xffcb07a0*/
v4 = v2 >> 7; /*0xffcb07a3*/
*(_BYTE *)(a1 + 4) = v3; /*0xffcb07a6*/
if ( (a2 & 4) == 0 ) /*0xffcb07ab*/
{
v5 = *(_BYTE *)(a1 + 6); /*0xffcb07c0*/
v6 = *(unsigned __int8 *)(a1 + 2); /*0xffcb07c5*/
*(_WORD *)a1 = (unsigned __int8)(*(_BYTE *)a1 - 6 * (*(_BYTE *)a1 >> 4)); /*0xffcb07ce*/
v7 = -6 * (v6 >> 4); /*0xffcb07dd*/
v8 = *(unsigned __int8 *)(a1 + 3); /*0xffcb07df*/
*(_BYTE *)(a1 + 2) += v7; /*0xffcb07e3*/
*(_BYTE *)(a1 + 3) += -6 * (v8 >> 4); /*0xffcb07f7*/
v9 = *(unsigned __int8 *)(a1 + 5) >> 4; /*0xffcb080e*/
*(_BYTE *)(a1 + 4) = v3 - 6 * (v3 >> 4); /*0xffcb0811*/
*(_BYTE *)(a1 + 5) += -6 * v9; /*0xffcb0822*/
*(_BYTE *)(a1 + 6) = v5 - 6 * (v5 >> 4); /*0xffcb0835*/
}
if ( (a2 & 2) == 0 ) /*0xffcb083c*/
{
if ( v4 ) /*0xffcb0840*/
{
n0xC = *(_BYTE *)(a1 + 4); /*0xffcb0842*/
if ( n0xC < 0xCu ) /*0xffcb0847*/
*(_BYTE *)(a1 + 4) = n0xC + 12; /*0xffcb084b*/
}
else if ( *(_BYTE *)(a1 + 4) == 12 ) /*0xffcb0854*/
{
*(_BYTE *)(a1 + 4) = 0; /*0xffcb0856*/
}
}
*(_DWORD *)(a1 + 8) = 0; /*0xffcb085e*/
*(_WORD *)(a1 + 12) = 2047; /*0xffcb0861*/
*(_BYTE *)(a1 + 14) = 0; /*0xffcb0865*/
return 2047; /*0xffcb0868*/
}
// Function: KtiFunc86B @ 0xffcb086b (0x59 bytes)
// Index: 1432/2560
int __cdecl KtiFunc86B(int a1)
{
int v1; // esi
__int16 v2; // bp
unsigned __int16 v3; // di
unsigned __int16 v4; // bx
v1 = 0; /*0xffcb0873*/
v2 = *(_WORD *)a1; /*0xffcb0875*/
v3 = 0; /*0xffcb0879*/
v4 = *(_WORD *)a1 - 1970; /*0xffcb0888*/
do /*0xffcb08a0*/
{
if ( (unsigned __int8)KtiFuncB4F(v3 + 1970) ) /*0xffcb0891*/
++v1; /*0xffcb089b*/
++v3; /*0xffcb089c*/
}
while ( v3 <= v4 ); /*0xffcb08a0*/
if ( (unsigned __int8)KtiFuncB4F(v2) && v1 && *(_BYTE *)(a1 + 2) < 3u ) /*0xffcb08b9*/
--v1; /*0xffcb08bb*/
return v1; /*0xffcb08bc*/
}
// Function: KtiFunc8C4 @ 0xffcb08c4 (0xa3 bytes)
// Index: 1433/2560
unsigned __int8 __cdecl KtiFunc8C4(int a1, unsigned int i)
{
unsigned __int8 result; // al
unsigned int j; // eax
int v4; // eax
__int64 v5; // [esp+0h] [ebp-10h] BYREF
__int64 v6; // [esp+8h] [ebp-8h] BYREF
result = 0; /*0xffcb08ca*/
v5 = 0; /*0xffcb08cc*/
v6 = 0; /*0xffcb08d2*/
if ( i && (*(_BYTE *)(a1 + 246408) & 4) == 0 ) /*0xffcb08ec*/
{
KtiFuncF4E(&v5); /*0xffcb08f3*/
KtiFuncF4E(&v6); /*0xffcb08fc*/
for ( j = KtiFuncF75(a1, v5, SHIDWORD(v5), v6, SHIDWORD(v6), 0xF4240u); /*0xffcb0914*/
j < i;
j = KtiFuncF75(a1, v5, SHIDWORD(v5), v6, SHIDWORD(v6), 0xF4240u) )
{
KtiFuncF4E(&v6); /*0xffcb0922*/
}
v4 = KtiFuncF75(a1, v5, SHIDWORD(v5), v6, SHIDWORD(v6), 0xF4240u); /*0xffcb0950*/
return KtiFunc41B3(a1, 3u, v4); /*0xffcb0959*/
}
return result; /*0xffcb0963*/
}
// Function: KtiFunc967 @ 0xffcb0967 (0x4e bytes)
// Index: 1434/2560
unsigned int __cdecl KtiFunc967(int __return_address, unsigned int a2)
{
unsigned int result; // eax
int v3; // [esp+4h] [ebp-10h] BYREF
int v4; // [esp+8h] [ebp-Ch]
int v5; // [esp+Ch] [ebp-8h] BYREF
int v6; // [esp+10h] [ebp-4h]
v3 = 0; /*0xffcb096f*/
v4 = 0; /*0xffcb0972*/
v5 = 0; /*0xffcb0975*/
v6 = 0; /*0xffcb0978*/
KtiFuncF4E(&v3); /*0xffcb097f*/
do /*0xffcb09af*/
{
KtiFuncF4E(&v5); /*0xffcb0989*/
result = KtiFuncF75(__return_address, v3, v4, v5, v6, 1000000000); /*0xffcb09a4*/
}
while ( result < a2 ); /*0xffcb09af*/
return result; /*0xffcb09b1*/
}
// Function: KtiFunc9B5 @ 0xffcb09b5 (0x21 bytes)
// Index: 1435/2560
int __cdecl KtiFunc9B5(int a1)
{
return KtiFunc1014(a1, *(_WORD *)(a1 + 246740) + 8) & 0xFFFFFF; /*0xffcb09d5*/
}
// Function: KtiFunc9D6 @ 0xffcb09d6 (0x21 bytes)
// Index: 1436/2560
__int64 KtiFunc9D6()
{
__int64 v1; // [esp+0h] [ebp-8h] BYREF
v1 = 0; /*0xffcb09db*/
KtiFuncF4E(&v1); /*0xffcb09e7*/
return v1; /*0xffcb09f3*/
}
// Function: KtiFunc9F7 @ 0xffcb09f7 (0x2a bytes)
// Index: 1437/2560
unsigned int __cdecl KtiFunc9F7(int __return_address, unsigned int a2)
{
unsigned int v2; // eax
unsigned int v3; // ecx
v2 = KtiFunc9B5(__return_address); /*0xffcb09fb*/
v3 = a2; /*0xffcb0a01*/
if ( a2 > v2 ) /*0xffcb0a07*/
v3 = a2 | 0xFF000000; /*0xffcb0a09*/
return 1000 * (v2 - v3) / 0xDFB; /*0xffcb0a20*/
}
// Function: KtiFuncA21 @ 0xffcb0a21 (0x27 bytes)
// Index: 1438/2560
int __cdecl KtiFuncA21(int __return_address, int a2, int a3)
{
__int64 v3; // rax
v3 = KtiFunc9D6(); /*0xffcb0a25*/
return KtiFuncF75(__return_address, a2, a3, v3, HIDWORD(v3), 1000000); /*0xffcb0a47*/
}
// Function: KtiFuncA48 @ 0xffcb0a48 (0x1e bytes)
// Index: 1439/2560
int KtiFuncA48()
{
int v0; // eax
int v2; // [esp+0h] [ebp-4h] BYREF
v2 = 0; /*0xffcb0a4c*/
v0 = KtiFuncA66(&v2); /*0xffcb0a54*/
return v0 != 1 ? v2 : 0;
}
// Function: KtiFuncA66 @ 0xffcb0a66 (0x79 bytes)
// Index: 1440/2560
int __cdecl KtiFuncA66(_DWORD *a1)
{
int result; // eax
int v2; // esi
int v3; // eax
int v4; // [esp+8h] [ebp-10h] BYREF
unsigned __int8 v5; // [esp+Ch] [ebp-Ch]
unsigned __int8 v6; // [esp+Dh] [ebp-Bh]
unsigned __int8 v7; // [esp+Eh] [ebp-Ah]
result = KtiFuncB7F(&v4); /*0xffcb0a72*/
if ( result != 1 ) /*0xffcb0a7b*/
{
v2 = KtiFunc768(v4); /*0xffcb0a8e*/
v3 = KtiFunc86B((int)&v4); /*0xffcb0a94*/
*a1 = v7 - 86400 + 60 * (v6 + 60 * (v5 + 24 * (365 * (unsigned __int16)(v4 - 1970) + v3 + v2))); /*0xffcb0ad5*/
return 0; /*0xffcb0ad7*/
}
return result; /*0xffcb0ad9*/
}
// Function: UncoreInitHeap @ 0xffcb0adf (0x70 bytes)
// Index: 1441/2560
int __cdecl UncoreInitHeap(int __return_address)
{
__int16 v1; // di
int result; // eax
unsigned __int8 v3; // bl
v1 = PciCfgRead(__return_address, 0, 539992128); /*0xffcb0afc*/
result = PciCfgRead(__return_address, 0, 271556676); /*0xffcb0afe*/
v3 = result; /*0xffcb0b03*/
if ( (result & 0x80u) == 0 ) /*0xffcb0b0a*/
{
PciCfgWrite(__return_address, 0, 539992128, *(unsigned __int16 *)(__return_address + 246740) | 1); /*0xffcb0b2d*/
return PciCfgWrite(__return_address, 0, 271556676, v3 | 0x80); /*0xffcb0b42*/
}
else
{
*(_WORD *)(__return_address + 246740) = v1 & 0xFF80; /*0xffcb0b12*/
}
return result; /*0xffcb0b4a*/
}
// Function: KtiFuncB4F @ 0xffcb0b4f (0x30 bytes)
// Index: 1442/2560
bool __cdecl KtiFuncB4F(unsigned __int16 a1)
{
if ( (a1 & 3) != 0 ) /*0xffcb0b57*/
return 0; /*0xffcb0b7c*/
if ( a1 % 0x64u ) /*0xffcb0b61*/
return 1; /*0xffcb0b79*/
return a1 % 0x190u == 0; /*0xffcb0b78*/
}
// Function: KtiFuncB7F @ 0xffcb0b7f (0xb3 bytes)
// Index: 1443/2560
int __cdecl KtiFuncB7F(int a1)
{
unsigned __int8 v3; // al
char v4; // [esp+Ch] [ebp+8h]
if ( !a1 || KtiFuncCA2(100000) == 1 ) /*0xffcb0ba0*/
return 1; /*0xffcb0b8c*/
v4 = KtiFuncC32(11); /*0xffcb0bab*/
*(_BYTE *)(a1 + 6) = KtiFuncC32(0); /*0xffcb0bb5*/
*(_BYTE *)(a1 + 5) = KtiFuncC32(2); /*0xffcb0bbf*/
*(_BYTE *)(a1 + 4) = KtiFuncC32(4); /*0xffcb0bc9*/
*(_BYTE *)(a1 + 3) = KtiFuncC32(7); /*0xffcb0bd3*/
*(_BYTE *)(a1 + 2) = KtiFuncC32(8); /*0xffcb0bdd*/
*(_WORD *)a1 = (unsigned __int8)KtiFuncC32(9); /*0xffcb0bec*/
KtiFunc791(a1, v4); /*0xffcb0bef*/
if ( KtiFuncC5B() ) /*0xffcb0bf7*/
v3 = KtiFuncC32(50); /*0xffcb0c0b*/
else
v3 = KtiFuncC32(50) & 0x7F; /*0xffcb0c07*/
*(_WORD *)a1 += 100 * (unsigned __int8)(v3 - 6 * (v3 >> 4)); /*0xffcb0c2a*/
return 0; /*0xffcb0c2f*/
}
// Function: KtiFuncC32 @ 0xffcb0c32 (0x29 bytes)
// Index: 1444/2560
int __cdecl KtiFuncC32(char a1)
{
char v1; // al
v1 = KtiFunc105B(0, 112); /*0xffcb0c36*/
UncoreInitDelayUs(0, 0x70u, a1 | v1 & 0x80); /*0xffcb0c49*/
return KtiFunc105B(0, 113); /*0xffcb0c5a*/
}
// Function: KtiFuncC5B @ 0xffcb0c5b (0x47 bytes)
// Index: 1445/2560
BOOL KtiFuncC5B()
{
char n25; // bl
unsigned __int8 v2; // [esp+4h] [ebp-4h]
v2 = KtiFuncC32(50); /*0xffcb0c6b*/
KtiFuncCE9(50, 0); /*0xffcb0c6e*/
n25 = KtiFuncC32(50) & 0x7F; /*0xffcb0c81*/
KtiFuncCE9(50, v2); /*0xffcb0c84*/
return n25 != 25 && n25 != 32; /*0xffcb0c9d*/
}
// Function: KtiFuncCA2 @ 0xffcb0ca2 (0x47 bytes)
// Index: 1446/2560
BOOL __cdecl KtiFuncCA2(unsigned int n100000)
{
unsigned int i; // esi
unsigned __int8 n0x80; // al
if ( (KtiFuncC32(13) & 0x80u) == 0 ) /*0xffcb0cac*/
return 1; /*0xffcb0cac*/
for ( i = n100000 / 0xA + 1; (KtiFuncC32(10) & 0x80u) != 0 && i; --i ) /*0xffcb0cbb*/
; /*0xffcb0cc4*/
n0x80 = KtiFuncC32(13); /*0xffcb0cd2*/
return !i || n0x80 < 0x80u; /*0xffcb0ce2*/
}
// Function: KtiFuncCE9 @ 0xffcb0ce9 (0x2d bytes)
// Index: 1447/2560
unsigned __int8 __cdecl KtiFuncCE9(char n50, unsigned __int8 a2)
{
char v2; // al
v2 = KtiFunc105B(0, 112); /*0xffcb0ced*/
UncoreInitDelayUs(0, 0x70u, n50 | v2 & 0x80); /*0xffcb0d00*/
return UncoreInitDelayUs(0, 0x71u, a2); /*0xffcb0d15*/
}
// Function: AllocateHeapBuffer @ 0xffcb0d16 (0x37 bytes)
// Index: 1448/2560
int __cdecl AllocateHeapBuffer(int __return_address)
{
int v1; // esi
_DWORD *v2; // ecx
char *v3; // edx
int result; // eax
v1 = *(_DWORD *)(__return_address + 246788); /*0xffcb0d1b*/
if ( v1 ) /*0xffcb0d23*/
{
v2 = *(_DWORD **)(__return_address + 246784); /*0xffcb0d25*/
v2[2] = 0; /*0xffcb0d2b*/
*v2 = v2 + 3; /*0xffcb0d32*/
v3 = (char *)v2 + v1; /*0xffcb0d34*/
v2[1] = v1 - 24; /*0xffcb0d3a*/
*((_DWORD *)v3 - 2) = 0; /*0xffcb0d3d*/
*((_DWORD *)v3 - 3) = v3; /*0xffcb0d41*/
*((_DWORD *)v3 - 1) = 0x80000000; /*0xffcb0d44*/
return v1 - 24; /*0xffcb0d37*/
}
return result; /*0xffcb0d4b*/
}
// Function: KtiFuncD4D @ 0xffcb0d4d (0x6d bytes)
// Index: 1449/2560
int *__cdecl KtiFuncD4D(int a1, int *i)
{
int *i_1; // eax
int *i_2; // ecx
int v4; // edi
int *v5; // esi
int v6; // edx
int *j; // ecx
if ( *(_DWORD *)(a1 + 246788) ) /*0xffcb0d51*/
{
i_1 = i; /*0xffcb0d5a*/
if ( (int *)*(i_1 - 3) == i_1 ) /*0xffcb0d61*/
{
*(i - 1) &= ~1u; /*0xffcb0d63*/
i_2 = *(int **)(a1 + 246784); /*0xffcb0d67*/
do /*0xffcb0db4*/
{
while ( (i_2[2] & 1) != 0 ) /*0xffcb0d82*/
{
i_1 = (int *)(*i_2 + i_2[1]); /*0xffcb0d7a*/
i_2 = i_1; /*0xffcb0d7c*/
}
if ( i_2[2] < 0 ) /*0xffcb0d88*/
break; /*0xffcb0d88*/
v4 = *i_2; /*0xffcb0d8a*/
v5 = i_2 + 1; /*0xffcb0d8c*/
v6 = i_2[1]; /*0xffcb0d8f*/
for ( j = (int *)(*i_2 + v6); (j[2] & 0x80000001) == 0; j = i_1 ) /*0xffcb0d91*/
{
v6 += j[1] + 12; /*0xffcb0d9c*/
*v5 = v6; /*0xffcb0d9e*/
i_1 = (int *)(*j + j[1]); /*0xffcb0da3*/
}
i_2 = (int *)(v4 + *v5); /*0xffcb0dae*/
}
while ( i_2[2] >= 0 ); /*0xffcb0db4*/
}
}
return i_1; /*0xffcb0db9*/
}
// Function: KtiFuncDBA @ 0xffcb0dba (0x7a bytes)
// Index: 1450/2560
int __cdecl KtiFuncDBA(int a1, unsigned int a2)
{
int i; // esi
int v5; // eax
_DWORD *v6; // edx
int v7; // ecx
if ( !*(_DWORD *)(a1 + 246788) ) /*0xffcb0dbf*/
return 0; /*0xffcb0dc8*/
while ( (a2 & 7) != 0 ) /*0xffcb0dd7*/
++a2; /*0xffcb0dd3*/
for ( i = *(_DWORD *)(a1 + 246784); /*0xffcb0dd9*/
((*(_BYTE *)(i + 8) & 1) != 0 || *(_DWORD *)(i + 4) < a2) && *(int *)(i + 8) >= 0;
i = *(_DWORD *)i + *(_DWORD *)(i + 4) )
{
; /*0xffcb0df5*/
}
v5 = *(_DWORD *)(i + 8); /*0xffcb0df9*/
if ( v5 < 0 ) /*0xffcb0dfe*/
return 0; /*0xffcb0e00*/
*(_DWORD *)(i + 8) = v5 | 1; /*0xffcb0e07*/
if ( *(_DWORD *)(i + 4) - a2 > 0xC ) /*0xffcb0e12*/
{
v6 = (_DWORD *)(a2 + *(_DWORD *)i); /*0xffcb0e16*/
*v6 = v6 + 3; /*0xffcb0e1b*/
v7 = *(_DWORD *)(i + 4) - a2 - 12; /*0xffcb0e22*/
v6[2] = 0; /*0xffcb0e25*/
v6[1] = v7; /*0xffcb0e29*/
*(_DWORD *)(i + 4) = a2; /*0xffcb0e2c*/
}
return *(_DWORD *)i; /*0xffcb0dca*/
}
// Function: KtiFuncE34 @ 0xffcb0e34 (0x22 bytes)
// Index: 1451/2560
bool __cdecl KtiFuncE34(int a1, char a2, char a3)
{
return *(_BYTE *)(a1 + 246412) == a2 && *(_BYTE *)(a1 + 246424) == a3; /*0xffcb0e52*/
}
// Function: SocketPresentCheck @ 0xffcb0e56 (0x22 bytes)
// Index: 1452/2560
bool __cdecl SocketPresentCheck(int a1, char a2, unsigned __int8 a3)
{
return *(_BYTE *)(a1 + 246412) == a2 && *(_BYTE *)(a1 + 246424) > a3; /*0xffcb0e74*/
}
// Function: KtiFuncE78 @ 0xffcb0e78 (0x22 bytes)
// Index: 1453/2560
bool __cdecl KtiFuncE78(int a1, char a2, unsigned __int8 a3)
{
return *(_BYTE *)(a1 + 246412) == a2 && *(_BYTE *)(a1 + 246424) < a3; /*0xffcb0e96*/
}
// Function: KtiFuncE9A @ 0xffcb0e9a (0x2f bytes)
// Index: 1454/2560
void __cdecl __spoils<ecx> KtiFuncE9A(unsigned int *p_n4, unsigned int *a2, int *p_n3, _BYTE *a4)
{
_EAX = *p_n4; /*0xffcb0ea2*/
__asm { cpuid } /*0xffcb0eaa*/
*p_n4 = _EAX; /*0xffcb0eb0*/
*a2 = _EBX; /*0xffcb0eb6*/
*p_n3 = _ECX; /*0xffcb0ebc*/
*(_DWORD *)a4 = _EDX; /*0xffcb0ec2*/
}
// Function: KtiFuncEC9 @ 0xffcb0ec9 (0x22 bytes)
// Index: 1455/2560
unsigned __int64 __cdecl KtiFuncEC9(unsigned int a1)
{
return __readmsr(a1); /*0xffcb0ee7*/
}
// Function: KtiFuncEEB @ 0xffcb0eeb (0xf bytes)
// Index: 1456/2560
unsigned __int64 __cdecl KtiFuncEEB(unsigned int n128, unsigned __int64 a2)
{
unsigned __int64 result; // rax
result = a2; /*0xffcb0eeb*/
__writemsr(n128, a2); /*0xffcb0ef7*/
return result; /*0xffcb0ef9*/
}
// Function: UncoreInitPhase2 @ 0xffcb0efa (0x54 bytes)
// Index: 1457/2560
int __cdecl UncoreInitPhase2(int __return_address)
{
__int64 v1; // rax
__int64 v2; // rax
v1 = KtiFuncEC9(206); /*0xffcb0f05*/
v2 = RmtFunc6EF0(BYTE1(v1), 100000000); /*0xffcb0f1b*/
*(_DWORD *)(__return_address + 453648) = v2; /*0xffcb0f20*/
*(_QWORD *)(__return_address + 246792) = v2; /*0xffcb0f26*/
*(_DWORD *)(__return_address + 453652) = HIDWORD(v2); /*0xffcb0f3b*/
return KtiFuncF4E(__return_address + 246800); /*0xffcb0f49*/
}
// Function: KtiFuncF4E @ 0xffcb0f4e (0x27 bytes)
// Index: 1458/2560
int __cdecl KtiFuncF4E(_QWORD *a1)
{
unsigned __int64 v1; // rax
v1 = __rdtsc(); /*0xffcb0f5b*/
*a1 = v1; /*0xffcb0f69*/
return HIDWORD(v1); /*0xffcb0f71*/
}
// Function: KtiFuncF75 @ 0xffcb0f75 (0x9f bytes)
// Index: 1459/2560
int __cdecl KtiFuncF75(int a1, unsigned int a2, int a3, unsigned int a4, int a5, unsigned int a6)
{
unsigned __int64 i_1; // rdi
unsigned __int64 i; // kr00_8
unsigned __int64 i_2; // [esp+14h] [ebp-10h]
HIDWORD(i_1) = a5 - a3; /*0xffcb0f83*/
if ( a2 > a4 ) /*0xffcb0f94*/
--HIDWORD(i_1); /*0xffcb0f96*/
LODWORD(i_1) = a4 - a2; /*0xffcb0f9f*/
LODWORD(i_2) = a4 - a2; /*0xffcb0fa3*/
for ( i = *(_QWORD *)(a1 + 246792); HIDWORD(i_1) || HIDWORD(i); i = RmtFunc6E59(i) ) /*0xffcb0fad*/
{
i_1 = RmtFunc6E59(i_1); /*0xffcb0fca*/
i_2 = i_1; /*0xffcb0fd0*/
}
if ( (_DWORD)i ) /*0xffcb0ff4*/
return a6 * (unsigned __int64)(unsigned int)i_2 / (unsigned int)i; /*0xffcb100d*/
else
return 0; /*0xffcb0ff6*/
}
// Function: KtiFunc1014 @ 0xffcb1014 (0x47 bytes)
// Index: 1460/2560
unsigned __int32 __cdecl KtiFunc1014(_BYTE *a1, unsigned __int16 a2)
{
unsigned __int32 v2; // eax
unsigned __int32 v4; // [esp+0h] [ebp-4h]
v2 = __indword(a2); /*0xffcb1020*/
v4 = v2; /*0xffcb1021*/
if ( a1 && (a1[1494] & 4) != 0 ) /*0xffcb1032*/
LogDebugString(a1, (int)"*%d, 0, 0x%x, 0, %d, 0x%08x\n", (unsigned __int8)a1[246425], a2, 4, v2); /*0xffcb104c*/
return v4; /*0xffcb1057*/
}
// Function: KtiFunc105B @ 0xffcb105b (0x4c bytes)
// Index: 1461/2560
unsigned __int8 __cdecl KtiFunc105B(_BYTE *a1, unsigned __int16 a2)
{
unsigned __int8 v2; // al
unsigned __int8 v3; // bl
v2 = __inbyte(a2); /*0xffcb1068*/
v3 = v2; /*0xffcb106f*/
if ( a1 && (a1[1494] & 4) != 0 ) /*0xffcb107d*/
LogDebugString(a1, (int)"*%d, 0, 0x%x, 0, %d, 0x%02x\n", (unsigned __int8)a1[246425], a2, 1, v2); /*0xffcb1098*/
return v3; /*0xffcb10a2*/
}
// Function: KtiFunc10A7 @ 0xffcb10a7 (0x17 bytes)
// Index: 1462/2560
unsigned __int8 __cdecl KtiFunc10A7(unsigned __int16 a1)
{
return __inbyte(a1); /*0xffcb10ba*/
}
// Function: KtiFunc10BE @ 0xffcb10be (0x3e bytes)
// Index: 1463/2560
int __cdecl KtiFunc10BE(_BYTE *a1, unsigned __int16 n3320, unsigned int a3)
{
int result; // eax
result = a3; /*0xffcb10c3*/
__outdword(n3320, a3); /*0xffcb10c7*/
if ( a1 ) /*0xffcb10ce*/
{
if ( (a1[1494] & 4) != 0 ) /*0xffcb10d7*/
return LogDebugString(a1, (int)"*%d, 0, 0x%x, 1, %d, 0x%08x\n", (unsigned __int8)a1[246425], n3320, 4, a3); /*0xffcb10f3*/
}
return result; /*0xffcb10fb*/
}
// Function: UncoreInitDelayUs @ 0xffcb10fc (0x40 bytes)
// Index: 1464/2560
unsigned __int8 __cdecl UncoreInitDelayUs(_BYTE *a1, unsigned __int16 a2, unsigned __int8 a3)
{
unsigned __int8 result; // al
result = a3; /*0xffcb1101*/
__outbyte(a2, a3); /*0xffcb1105*/
if ( a1 ) /*0xffcb110c*/
{
if ( (a1[1494] & 4) != 0 ) /*0xffcb1115*/
return LogDebugString(a1, (int)"*%d, 0, 0x%x, 1, %d, 0x%02x\n", (unsigned __int8)a1[246425], a2, 1, a3); /*0xffcb1133*/
}
return result; /*0xffcb113b*/
}
// Function: KtiFunc113C @ 0xffcb113c (0x26 bytes)
// Index: 1465/2560
int __cdecl KtiFunc113C(int __return_address)
{
int v1; // esi
unsigned int v2; // edx
v1 = 0; /*0xffcb1141*/
v2 = __return_address + 251148; /*0xffcb1143*/
while ( v2 < __return_address + 251148 + *(_DWORD *)(__return_address + 251136) ) /*0xffcb115c*/
{
v2 += *(unsigned __int16 *)(v2 + 4); /*0xffcb1157*/
++v1; /*0xffcb1159*/
}
return v1; /*0xffcb1160*/
}
// Function: KtiFunc1162 @ 0xffcb1162 (0x93 bytes)
// Index: 1466/2560
int __cdecl KtiFunc1162(_BYTE *a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
int v9; // [esp+8h] [ebp-14h] BYREF
__int16 n18; // [esp+Ch] [ebp-10h]
int v11; // [esp+Eh] [ebp-Eh]
char v12; // [esp+12h] [ebp-Ah]
char v13; // [esp+13h] [ebp-9h]
char v14; // [esp+14h] [ebp-8h]
char v15; // [esp+15h] [ebp-7h]
char v16; // [esp+16h] [ebp-6h]
char v17; // [esp+17h] [ebp-5h]
char v18; // [esp+18h] [ebp-4h]
char v19; // [esp+19h] [ebp-3h]
unsigned __int8 v20; // [esp+27h] [ebp+Bh]
v20 = a1[246425]; /*0xffcb1182*/
KtiFunc7C34((int)a1, a2, a3, a4, a5, a6, a7); /*0xffcb118a*/
n18 = 18; /*0xffcb1196*/
v14 = a2; /*0xffcb119d*/
v9 = 1; /*0xffcb11a0*/
v11 = 1; /*0xffcb11a3*/
v12 = a1[4 * v20 + 244253]; /*0xffcb11ad*/
v13 = a1[4 * v20 + 244252]; /*0xffcb11b7*/
v15 = a3; /*0xffcb11bd*/
v16 = a4; /*0xffcb11c3*/
v17 = a5; /*0xffcb11c9*/
v18 = a6; /*0xffcb11cf*/
v19 = a7; /*0xffcb11d5*/
KtiFunc1972(a1, &v9); /*0xffcb11dd*/
return KtiFunc7B13((int)a1, (int)&v9); /*0xffcb11ef*/
}
// Function: KtiFunc11F5 @ 0xffcb11f5 (0xaf bytes)
// Index: 1467/2560
int __cdecl KtiFunc11F5(
_BYTE *__return_address,
int n36,
int a3,
int n4,
int n6,
int n255,
int a7,
int a8,
char a9,
char a10,
char n8,
char n9)
{
int n10; // [esp+8h] [ebp-18h] BYREF
__int16 n22; // [esp+Ch] [ebp-14h]
int v16; // [esp+Eh] [ebp-12h]
char v17; // [esp+12h] [ebp-Eh]
char v18; // [esp+13h] [ebp-Dh]
char n36_1; // [esp+14h] [ebp-Ch]
char v20; // [esp+15h] [ebp-Bh]
char n4_1; // [esp+16h] [ebp-Ah]
char n6_1; // [esp+17h] [ebp-9h]
char n255_1; // [esp+18h] [ebp-8h]
char v24; // [esp+19h] [ebp-7h]
char v25; // [esp+1Ah] [ebp-6h]
char v26; // [esp+1Bh] [ebp-5h]
char n8_1; // [esp+1Ch] [ebp-4h]
char n9_1; // [esp+1Dh] [ebp-3h]
unsigned __int8 v29; // [esp+2Bh] [ebp+Bh]
v29 = __return_address[246425]; /*0xffcb1215*/
KtiFunc7C34((int)__return_address, n36, a3, n4, n6, n255, a7); /*0xffcb121d*/
n22 = 22; /*0xffcb1229*/
v16 = a8; /*0xffcb1230*/
v17 = __return_address[4 * v29 + 244253]; /*0xffcb123a*/
v18 = __return_address[4 * v29 + 244252]; /*0xffcb1244*/
v20 = a3; /*0xffcb124a*/
n4_1 = n4; /*0xffcb1250*/
n6_1 = n6; /*0xffcb1256*/
n255_1 = n255; /*0xffcb125c*/
v24 = a7; /*0xffcb1262*/
v25 = a9; /*0xffcb1268*/
v26 = a10; /*0xffcb126e*/
n8_1 = n8; /*0xffcb1274*/
n9_1 = n9; /*0xffcb127a*/
n10 = 10; /*0xffcb1282*/
n36_1 = n36; /*0xffcb1289*/
KtiFunc1972(__return_address, &n10); /*0xffcb128c*/
return KtiFunc7B13((int)__return_address, (int)&n10); /*0xffcb129e*/
}
// Function: KtiFunc12A4 @ 0xffcb12a4 (0x9d bytes)
// Index: 1468/2560
int __cdecl KtiFunc12A4(_BYTE *__return_address, int n57, int n2, int n4, int n6, int a6, int n255, int a8, int a9)
{
int n11; // [esp+8h] [ebp-18h] BYREF
__int16 n22; // [esp+Ch] [ebp-14h]
int v13; // [esp+Eh] [ebp-12h]
char v14; // [esp+12h] [ebp-Eh]
char v15; // [esp+13h] [ebp-Dh]
char n57_1; // [esp+14h] [ebp-Ch]
char n2_1; // [esp+15h] [ebp-Bh]
char n4_1; // [esp+16h] [ebp-Ah]
char n6_1; // [esp+17h] [ebp-9h]
char v20; // [esp+18h] [ebp-8h]
char n255_1; // [esp+19h] [ebp-7h]
int v22; // [esp+1Ah] [ebp-6h]
unsigned __int8 v23; // [esp+2Bh] [ebp+Bh]
v23 = __return_address[246425]; /*0xffcb12c4*/
KtiFunc7C34((int)__return_address, n57, n2, n4, n6, a6, n255); /*0xffcb12cc*/
n22 = 22; /*0xffcb12d8*/
v13 = a8; /*0xffcb12df*/
v14 = __return_address[4 * v23 + 244253]; /*0xffcb12e9*/
v15 = __return_address[4 * v23 + 244252]; /*0xffcb12f3*/
n2_1 = n2; /*0xffcb12f9*/
n4_1 = n4; /*0xffcb12ff*/
n6_1 = n6; /*0xffcb1305*/
v20 = a6; /*0xffcb130b*/
n255_1 = n255; /*0xffcb1311*/
v22 = a9; /*0xffcb1317*/
n11 = 11; /*0xffcb131f*/
n57_1 = n57; /*0xffcb1326*/
KtiFunc1972(__return_address, &n11); /*0xffcb1329*/
return KtiFunc7B13((int)__return_address, (int)&n11); /*0xffcb133b*/
}
// Function: KtiFunc1341 @ 0xffcb1341 (0xb5 bytes)
// Index: 1469/2560
int __cdecl KtiFunc1341(
_BYTE *a1,
int a2,
int a3,
int a4,
int a5,
int a6,
int a7,
int a8,
char a9,
char a10,
int a11,
int a12,
char a13)
{
int n2; // [esp+8h] [ebp-20h] BYREF
__int16 n29; // [esp+Ch] [ebp-1Ch]
int v17; // [esp+Eh] [ebp-1Ah]
char v18; // [esp+12h] [ebp-16h]
char v19; // [esp+13h] [ebp-15h]
char v20; // [esp+14h] [ebp-14h]
char v21; // [esp+15h] [ebp-13h]
char v22; // [esp+16h] [ebp-12h]
char v23; // [esp+17h] [ebp-11h]
char v24; // [esp+18h] [ebp-10h]
char v25; // [esp+19h] [ebp-Fh]
char v26; // [esp+1Ah] [ebp-Eh]
char v27; // [esp+1Bh] [ebp-Dh]
int v28; // [esp+1Ch] [ebp-Ch]
int v29; // [esp+20h] [ebp-8h]
char v30; // [esp+24h] [ebp-4h]
unsigned __int8 v31; // [esp+33h] [ebp+Bh]
v31 = a1[246425]; /*0xffcb1361*/
KtiFunc7C34((int)a1, a2, a3, a4, a5, a6, a7); /*0xffcb1369*/
n29 = 29; /*0xffcb1375*/
v17 = a8; /*0xffcb137c*/
v18 = a1[4 * v31 + 244253]; /*0xffcb1386*/
v19 = a1[4 * v31 + 244252]; /*0xffcb1390*/
v21 = a3; /*0xffcb1396*/
v22 = a4; /*0xffcb139c*/
v23 = a5; /*0xffcb13a2*/
v24 = a6; /*0xffcb13a8*/
v25 = a7; /*0xffcb13ae*/
v28 = a12; /*0xffcb13b4*/
v29 = a11; /*0xffcb13ba*/
v26 = a9; /*0xffcb13c0*/
v27 = a10; /*0xffcb13c6*/
v30 = a13; /*0xffcb13cc*/
n2 = 2; /*0xffcb13d4*/
v20 = a2; /*0xffcb13db*/
KtiFunc1972(a1, &n2); /*0xffcb13de*/
return KtiFunc7B13((int)a1, (int)&n2); /*0xffcb13f0*/
}
// Function: KtiFunc13F6 @ 0xffcb13f6 (0x72 bytes)
// Index: 1470/2560
int __cdecl KtiFunc13F6(int __return_address, int n132, int n5, int n4, int n6, int a6, int a7, int a8)
{
int n23; // [esp+4h] [ebp-1Ch] BYREF
__int16 n26; // [esp+8h] [ebp-18h]
int v11; // [esp+Ah] [ebp-16h]
char n132_1; // [esp+10h] [ebp-10h]
char n5_1; // [esp+11h] [ebp-Fh]
char n4_1; // [esp+12h] [ebp-Eh]
char n6_1; // [esp+13h] [ebp-Dh]
char v16; // [esp+14h] [ebp-Ch]
char v17; // [esp+15h] [ebp-Bh]
int v18; // [esp+16h] [ebp-Ah]
int v19; // [esp+1Ah] [ebp-6h]
KtiFunc7C34(__return_address, n132, n5, n4, n6, a6, 0); /*0xffcb1412*/
v11 = 0; /*0xffcb1417*/
n26 = 26; /*0xffcb141e*/
n5_1 = n5; /*0xffcb1425*/
n4_1 = n4; /*0xffcb142b*/
n6_1 = n6; /*0xffcb1431*/
v16 = a6; /*0xffcb1437*/
v18 = a7; /*0xffcb143d*/
v19 = a8; /*0xffcb1443*/
n23 = 23; /*0xffcb144d*/
n132_1 = n132; /*0xffcb1454*/
v17 = 0; /*0xffcb1457*/
return KtiFunc7B13(__return_address, (int)&n23); /*0xffcb1463*/
}
// Function: KtiFunc1468 @ 0xffcb1468 (0xb4 bytes)
// Index: 1471/2560
int __cdecl KtiFunc1468(int __return_address, int n132, int n3, int n4, int n6, int a6, char *a7)
{
int v7; // eax
int n26; // [esp+4h] [ebp-34h] BYREF
__int16 n50; // [esp+8h] [ebp-30h]
int v11; // [esp+Ah] [ebp-2Eh]
char n132_1; // [esp+10h] [ebp-28h]
char n3_1; // [esp+11h] [ebp-27h]
char n4_1; // [esp+12h] [ebp-26h]
char n6_1; // [esp+13h] [ebp-25h]
char v16; // [esp+14h] [ebp-24h]
char v17; // [esp+15h] [ebp-23h]
int v18; // [esp+16h] [ebp-22h]
int v19; // [esp+1Ah] [ebp-1Eh]
int v20; // [esp+1Eh] [ebp-1Ah]
int v21; // [esp+22h] [ebp-16h]
int v22; // [esp+26h] [ebp-12h]
int v23; // [esp+2Ah] [ebp-Eh]
char v24; // [esp+2Eh] [ebp-Ah]
char v25; // [esp+2Fh] [ebp-9h]
char v26; // [esp+30h] [ebp-8h]
char v27; // [esp+31h] [ebp-7h]
__int16 v28; // [esp+32h] [ebp-6h]
__int16 v29; // [esp+34h] [ebp-4h]
KtiFunc7C34(__return_address, n132, n3, n4, n6, a6, 0); /*0xffcb1484*/
n50 = 50; /*0xffcb148f*/
n3_1 = n3; /*0xffcb1496*/
n4_1 = n4; /*0xffcb149c*/
n6_1 = n6; /*0xffcb14a2*/
v16 = a6; /*0xffcb14a8*/
v18 = *(_DWORD *)a7; /*0xffcb14ad*/
v19 = *((_DWORD *)a7 + 1); /*0xffcb14b3*/
v20 = *((_DWORD *)a7 + 2); /*0xffcb14b9*/
v21 = *((_DWORD *)a7 + 3); /*0xffcb14bf*/
v22 = *((_DWORD *)a7 + 4); /*0xffcb14c5*/
v7 = *((_DWORD *)a7 + 5); /*0xffcb14c8*/
v11 = 0; /*0xffcb14cb*/
v23 = v7; /*0xffcb14cf*/
v24 = a7[24]; /*0xffcb14d5*/
v25 = a7[25]; /*0xffcb14db*/
v26 = a7[26]; /*0xffcb14e1*/
v27 = a7[27]; /*0xffcb14e7*/
v28 = *((_WORD *)a7 + 14); /*0xffcb14ee*/
v29 = *((_WORD *)a7 + 15); /*0xffcb14f6*/
n26 = 26; /*0xffcb1501*/
n132_1 = n132; /*0xffcb1508*/
v17 = 0; /*0xffcb150b*/
return KtiFunc7B13(__return_address, (int)&n26); /*0xffcb1517*/
}
// Function: KtiFunc151C @ 0xffcb151c (0x8a bytes)
// Index: 1472/2560
int __cdecl KtiFunc151C(int __return_address, int n132, int n3, int n4, int n6, int a6, char *a7)
{
int n27; // [esp+4h] [ebp-24h] BYREF
__int16 n34; // [esp+8h] [ebp-20h]
int v10; // [esp+Ah] [ebp-1Eh]
char n132_1; // [esp+10h] [ebp-18h]
char n3_1; // [esp+11h] [ebp-17h]
char n4_1; // [esp+12h] [ebp-16h]
char n6_1; // [esp+13h] [ebp-15h]
char v15; // [esp+14h] [ebp-14h]
char v16; // [esp+15h] [ebp-13h]
int v17; // [esp+16h] [ebp-12h]
int v18; // [esp+1Ah] [ebp-Eh]
int v19; // [esp+1Eh] [ebp-Ah]
__int16 v20; // [esp+22h] [ebp-6h]
__int16 v21; // [esp+24h] [ebp-4h]
KtiFunc7C34(__return_address, n132, n3, n4, n6, a6, 0); /*0xffcb1538*/
n34 = 34; /*0xffcb1543*/
n3_1 = n3; /*0xffcb154a*/
v10 = 0; /*0xffcb1550*/
n4_1 = n4; /*0xffcb1554*/
n6_1 = n6; /*0xffcb155a*/
v15 = a6; /*0xffcb1560*/
v17 = *(_DWORD *)a7; /*0xffcb1565*/
v18 = *((_DWORD *)a7 + 1); /*0xffcb156b*/
v19 = *((_DWORD *)a7 + 2); /*0xffcb1571*/
v20 = *((_WORD *)a7 + 5); /*0xffcb1578*/
v21 = *((_WORD *)a7 + 6); /*0xffcb1580*/
n27 = 27; /*0xffcb158b*/
n132_1 = n132; /*0xffcb1592*/
v16 = 0; /*0xffcb1595*/
return KtiFunc7B13(__return_address, (int)&n27); /*0xffcb15a1*/
}
// Function: KtiFunc15A6 @ 0xffcb15a6 (0xd2 bytes)
// Index: 1473/2560
int __cdecl KtiFunc15A6(
_BYTE *n6,
int n49,
int n44,
int n4,
int n6a,
int n2,
int a7,
int a8,
int n40,
int a10,
int n23,
unsigned __int8 n0x28)
{
int n3; // [esp+Ch] [ebp-20h] BYREF
__int16 n31; // [esp+10h] [ebp-1Ch]
int v16; // [esp+12h] [ebp-1Ah]
char v17; // [esp+16h] [ebp-16h]
char v18; // [esp+17h] [ebp-15h]
char n49_1; // [esp+18h] [ebp-14h]
char n44_1; // [esp+19h] [ebp-13h]
char n4_1; // [esp+1Ah] [ebp-12h]
char n6a_1; // [esp+1Bh] [ebp-11h]
char n2_1; // [esp+1Ch] [ebp-10h]
char v24; // [esp+1Dh] [ebp-Fh]
int v25; // [esp+1Eh] [ebp-Eh]
int n40_1; // [esp+22h] [ebp-Ah]
int n23_1; // [esp+26h] [ebp-6h]
unsigned __int8 n0x28_1; // [esp+2Ah] [ebp-2h]
unsigned __int8 n6_3; // [esp+37h] [ebp+Bh]
n6_3 = n6[246425]; /*0xffcb15be*/
DebugPrint((int)n6, 2, n4, n6a, 255, 255, 255, 255, "Eye width is too small: %d\n", n0x28);
KtiFunc7C34((int)n6, n49, n44, n4, n6a, n2, a7); /*0xffcb15ee*/
n3 = 3; /*0xffcb15fa*/
n49_1 = n49; /*0xffcb1601*/
n31 = 31; /*0xffcb1607*/
v16 = a8; /*0xffcb160e*/
v17 = n6[4 * n6_3 + 244253]; /*0xffcb1618*/
v18 = n6[4 * n6_3 + 244252]; /*0xffcb1622*/
n44_1 = n44; /*0xffcb1628*/
n4_1 = n4; /*0xffcb162e*/
n6a_1 = n6a; /*0xffcb1633*/
n2_1 = n2; /*0xffcb1639*/
v24 = a7; /*0xffcb163f*/
v25 = a10; /*0xffcb1645*/
n40_1 = n40; /*0xffcb164b*/
n23_1 = n23; /*0xffcb1651*/
n0x28_1 = n0x28; /*0xffcb1657*/
KtiFunc1972(n6, &n3); /*0xffcb165f*/
return KtiFunc7B13((int)n6, (int)&n3); /*0xffcb1671*/
}
// Function: KtiFunc1678 @ 0xffcb1678 (0xec bytes)
// Index: 1474/2560
int __cdecl KtiFunc1678(
_BYTE *__return_address,
int n48,
int n45,
int buf,
int n6,
int a6,
int a7,
int a8,
int n8,
char src_,
int a11,
int a12,
int a13,
int a14,
int a15,
int a16,
int a17,
int a18,
int a19,
int a20,
int a21)
{
int n4; // [esp+10h] [ebp-48h] BYREF
__int16 n70; // [esp+14h] [ebp-44h]
int v25; // [esp+16h] [ebp-42h]
char v26; // [esp+1Ah] [ebp-3Eh]
char v27; // [esp+1Bh] [ebp-3Dh]
char n48_1; // [esp+1Ch] [ebp-3Ch]
char n45_1; // [esp+1Dh] [ebp-3Bh]
char buf_1; // [esp+1Eh] [ebp-3Ah]
char n6_1; // [esp+1Fh] [ebp-39h]
char v32; // [esp+20h] [ebp-38h]
char v33; // [esp+21h] [ebp-37h]
int n8_1; // [esp+22h] [ebp-36h]
_BYTE src[44]; // [esp+26h] [ebp-32h] BYREF
int v36; // [esp+52h] [ebp-6h]
unsigned __int8 v37; // [esp+5Ch] [ebp+4h]
v37 = __return_address[246425]; /*0xffcb1695*/
KtiFunc7C34((int)__return_address, n48, n45, buf, n6, a6, a7); /*0xffcb16a7*/
n70 = 70; /*0xffcb16bb*/
v25 = a8; /*0xffcb16cb*/
v26 = __return_address[4 * v37 + 244253]; /*0xffcb16d6*/
v27 = __return_address[4 * v37 + 244252]; /*0xffcb16e1*/
n45_1 = n45; /*0xffcb16ec*/
buf_1 = buf; /*0xffcb16f7*/
n6_1 = n6; /*0xffcb1702*/
v32 = a6; /*0xffcb170d*/
v33 = a7; /*0xffcb1718*/
n8_1 = n8; /*0xffcb1725*/
n4 = 4; /*0xffcb1731*/
n48_1 = n48; /*0xffcb1739*/
qmemcpy(src, &src_, sizeof(src)); /*0xffcb173d*/
v36 = a21; /*0xffcb173f*/
KtiFunc1972(__return_address, &n4); /*0xffcb1749*/
return KtiFunc7B13((int)__return_address, (int)&n4); /*0xffcb175c*/
}
// Function: KtiFunc1764 @ 0xffcb1764 (0xb1 bytes)
// Index: 1475/2560
int __cdecl KtiFunc1764(
_BYTE *a1,
int a2,
int a3,
int a4,
int a5,
int a6,
int a7,
int a8,
char a9,
char a10,
char *a11)
{
int n5; // [esp+8h] [ebp-20h] BYREF
__int16 n29; // [esp+Ch] [ebp-1Ch]
int v15; // [esp+Eh] [ebp-1Ah]
char v16; // [esp+12h] [ebp-16h]
char v17; // [esp+13h] [ebp-15h]
char v18; // [esp+14h] [ebp-14h]
char v19; // [esp+15h] [ebp-13h]
char v20; // [esp+16h] [ebp-12h]
char v21; // [esp+17h] [ebp-11h]
char v22; // [esp+18h] [ebp-10h]
char v23; // [esp+19h] [ebp-Fh]
char v24; // [esp+1Ah] [ebp-Eh]
char v25; // [esp+1Bh] [ebp-Dh]
int v26; // [esp+1Ch] [ebp-Ch] BYREF
unsigned __int8 v27; // [esp+33h] [ebp+Bh]
v27 = a1[246425]; /*0xffcb1784*/
KtiFunc7C34((int)a1, a2, a3, a4, a5, a6, a7); /*0xffcb178c*/
n29 = 29; /*0xffcb1798*/
v15 = a8; /*0xffcb179f*/
v16 = a1[4 * v27 + 244253]; /*0xffcb17a9*/
v17 = a1[4 * v27 + 244252]; /*0xffcb17b3*/
v19 = a3; /*0xffcb17b9*/
v20 = a4; /*0xffcb17bf*/
v21 = a5; /*0xffcb17c5*/
v22 = a6; /*0xffcb17cb*/
v23 = a7; /*0xffcb17d1*/
v24 = a9; /*0xffcb17d7*/
v25 = a10; /*0xffcb17e2*/
n5 = 5; /*0xffcb17e9*/
v18 = a2; /*0xffcb17f0*/
AutoGenFunc8E72((int)&v26, a11, 9); /*0xffcb17f3*/
KtiFunc1972(a1, &n5); /*0xffcb17fd*/
return KtiFunc7B13((int)a1, (int)&n5); /*0xffcb180f*/
}
// Function: KtiFunc1815 @ 0xffcb1815 (0xa3 bytes)
// Index: 1476/2560
unsigned int __cdecl KtiFunc1815(_BYTE *__return_address, int n192, int n2, int a4, unsigned int a5)
{
int v6; // esi
int n28; // ebx
unsigned int result; // eax
int n7; // [esp+Ch] [ebp-14h] BYREF
__int16 n19; // [esp+10h] [ebp-10h]
int v11; // [esp+12h] [ebp-Eh]
char v12; // [esp+16h] [ebp-Ah]
char v13; // [esp+17h] [ebp-9h]
char n192_1; // [esp+18h] [ebp-8h]
char n2_1; // [esp+19h] [ebp-7h]
char v16; // [esp+1Ah] [ebp-6h]
int v17; // [esp+1Bh] [ebp-5h]
unsigned __int8 v18; // [esp+2Bh] [ebp+Bh]
v18 = __return_address[246425]; /*0xffcb182a*/
KtiFunc7C34((int)__return_address, n192, n2, a4, 255, 255, 255); /*0xffcb183d*/
n192_1 = n192; /*0xffcb1849*/
v6 = 0; /*0xffcb184c*/
n7 = 7; /*0xffcb184e*/
v11 = 1; /*0xffcb1855*/
n19 = 19; /*0xffcb185f*/
v12 = __return_address[4 * v18 + 244253]; /*0xffcb186a*/
v13 = __return_address[4 * v18 + 244252]; /*0xffcb1874*/
n2_1 = n2; /*0xffcb187a*/
v16 = a4; /*0xffcb1882*/
n28 = 28; /*0xffcb1885*/
do /*0xffcb18af*/
{
result = a5 >> v6; /*0xffcb188b*/
if ( ((a5 >> v6) & 1) != 0 ) /*0xffcb188f*/
{
v17 = v6; /*0xffcb1894*/
KtiFunc1972(__return_address, &n7); /*0xffcb1899*/
result = KtiFunc7B13((int)__return_address, (int)&n7); /*0xffcb18a3*/
}
++v6; /*0xffcb18ab*/
--n28; /*0xffcb18ac*/
}
while ( n28 ); /*0xffcb18af*/
return result; /*0xffcb18b1*/
}
// Function: KtiFunc18B8 @ 0xffcb18b8 (0x48 bytes)
// Index: 1477/2560
int __cdecl KtiFunc18B8(_BYTE *a1, unsigned __int8 *a2)
{
LogDebugString(a1, (int)"\nMajor Warning Code = 0x%02X, Minor Warning Code = 0x%02X,", a2[12], a2[13]); /*0xffcb18d0*/
LogDebugString(a1, (int)"\nMajor Checkpoint: 0x%02X", a2[10]);
return LogDebugString(a1, (int)"\nMinor Checkpoint: 0x%02X", a2[11]);
}
// Function: KtiFunc1900 @ 0xffcb1900 (0x72 bytes)
// Index: 1478/2560
char __cdecl KtiFunc1900(_BYTE *a1, int a2)
{
unsigned __int8 v2; // ah
char result; // al
v2 = BYTE1(a2); /*0xffcb1903*/
if ( (_BYTE)a2 != 0xFF ) /*0xffcb1908*/
{
LogDebugString(a1, (int)"\nSocket %d", (unsigned __int8)a2); /*0xffcb1916*/
v2 = BYTE1(a2); /*0xffcb191b*/
}
if ( v2 != 0xFF ) /*0xffcb1924*/
LogDebugString(a1, (int)"\nChannel %d", v2); /*0xffcb1932*/
if ( BYTE2(a2) != 0xFF ) /*0xffcb193f*/
LogDebugString(a1, (int)"\nDimm %d", BYTE2(a2)); /*0xffcb194d*/
result = HIBYTE(a2); /*0xffcb1955*/
if ( HIBYTE(a2) != 0xFF ) /*0xffcb195a*/
return LogDebugString(a1, (int)"\nRank %d", HIBYTE(a2)); /*0xffcb1968*/
return result; /*0xffcb1970*/
}
// Function: KtiFunc1972 @ 0xffcb1972 (0x51a bytes)
// Index: 1479/2560
char __cdecl KtiFunc1972(_BYTE *a1, int *a2)
{
int v3; // ebx
unsigned __int8 v4; // al
unsigned __int8 v5; // al
unsigned __int8 v6; // al
unsigned __int8 v7; // al
unsigned __int8 v8; // al
_BYTE v10[256]; // [esp+Ch] [ebp-300h] BYREF
_BYTE v11[256]; // [esp+10Ch] [ebp-200h] BYREF
_BYTE v12[256]; // [esp+20Ch] [ebp-100h] BYREF
char v13; // [esp+31Bh] [ebp+Fh]
v3 = *a2; /*0xffcb1991*/
v13 = a1[9479]; /*0xffcb1993*/
if ( a1[1494] ) /*0xffcb1984*/
a1[9479] |= 1u; /*0xffcb199a*/
LogDebugString(a1, (int)"\nEnhanced warning of type %d logged:", v3); /*0xffcb19a7*/
KtiFunc18B8(a1, (unsigned __int8 *)a2); /*0xffcb19ae*/
switch ( v3 )
{
case 0:
LogDebugString(a1, (int)"\nEwl spec does not define type 0 warning"); /*0xffcb19cb*/
break; /*0xffcb19cb*/
case 1:
KtiFunc1900(a1, *(int *)((char *)a2 + 14)); /*0xffcb19d4*/
break; /*0xffcb19d9*/
case 2:
KtiFunc1900(a1, *(int *)((char *)a2 + 14)); /*0xffcb19e2*/
v4 =... [7976 chars total]
// Function: KtiFunc1EC6 @ 0xffcb1ec6 (0x2e bytes)
// Index: 1480/2560
int __cdecl KtiFunc1EC6(int __return_address)
{
return (*(int (**)(void))(__return_address + 246776))();
}
// Function: KtiFunc1EF9 @ 0xffcb1ef9 (0x2c bytes)
// Index: 1481/2560
int __cdecl KtiFunc1EF9(int __return_address)
{
AutoGenFuncEF58((*(_DWORD *)(__return_address + 1489) & 4) != 0); /*0xffcb1f0d*/
return KtiFunc1EC6(__return_address); /*0xffcb1f23*/
}
// Function: KtiFunc1F25 @ 0xffcb1f25 (0x58 bytes)
// Index: 1482/2560
int __cdecl KtiFunc1F25(_BYTE *__return_address, int n192, int n2, int a4, unsigned int a5)
{
KtiFunc1815(__return_address, n192, n2, a4, a5); /*0xffcb1f3c*/
KtiFunc7BCF((int)__return_address, n192, n2, a5 | ((unsigned __int8)a4 << 28)); /*0xffcb1f55*/
return LogDebugString( /*0xffcb1f78*/
__return_address,
(int)"\nAn Error logged! Error Code = 0x%X, Minor Error Code = 0x%X, Socket = 0x%X, Data = 0x%X\n",
(unsigned __int8)n192,
(unsigned __int8)n2,
(unsigned __int8)a4,
a5);
}
// Function: KtiFunc1F7D @ 0xffcb1f7d (0x110 bytes)
// Index: 1483/2560
char __cdecl KtiFunc1F7D(_BYTE *__return_address, int n192, int n2, unsigned int n255)
{
unsigned int n255_1; // edi
unsigned int n255_2; // [esp+10h] [ebp-8h]
unsigned int n255_3; // [esp+14h] [ebp-4h]
char n255a; // [esp+28h] [ebp+10h]
n255_1 = HIBYTE(n255); /*0xffcb1f9e*/
n255_3 = n255 >> 8; /*0xffcb1fa7*/
n255_2 = HIWORD(n255); /*0xffcb1fac*/
KtiFunc1162(__return_address, n192, n2, HIBYTE(n255), HIWORD(n255), n255 >> 8, n255); /*0xffcb1fb0*/
n255a = __return_address[9479]; /*0xffcb1fc5*/
if ( __return_address[1494] ) /*0xffcb1fbe*/
__return_address[9479] |= 1u; /*0xffcb1fcd*/
KtiFunc7BCF((int)__return_address, n192, n2, n255); /*0xffcb1fda*/
LogDebugString( /*0xffcb1ff6*/
__return_address,
(int)"\nAn Error logged! Error Code = 0x%X, Minor Error Code = 0x%X, Data = 0x%X\n",
(unsigned __int8)n192,
(unsigned __int8)n2,
n255);
if ( n255_1 != 255 ) /*0xffcb2005*/
LogDebugString(__return_address, (int)"S%d", n255_1); /*0xffcb200e*/
if ( (unsigned __int8)n255_2 != 255 ) /*0xffcb201f*/
LogDebugString(__return_address, (int)" Ch%d", (unsigned __int8)n255_2); /*0xffcb2028*/
if ( (unsigned __int8)n255_3 != 255 ) /*0xffcb2039*/
LogDebugString(__return_address, (int)" DIMM%d", (unsigned __int8)n255_3); /*0xffcb2042*/
if ( (unsigned __int8)n255 != 255 ) /*0xffcb204f*/
LogDebugString(__return_address, (int)" Rank%d", (unsigned __int8)n255); /*0xffcb2058*/
LogDebugString(__return_address, (int)"\n\n"); /*0xffcb2066*/
ProcMemInitCheck((int)__return_address, n192, n2); /*0xffcb2074*/
__return_address[9479] = n255a; /*0xffcb2080*/
return n255a; /*0xffcb2086*/
}
// Function: KtiFunc208D @ 0xffcb208d (0x39 bytes)
// Index: 1484/2560
int __cdecl KtiFunc208D(int a1, unsigned int a2, unsigned int a3)
{
int result; // eax
result = a2; /*0xffcb208d*/
if ( a2 >= a3 )
{
DebugPrint(a1, 3, 255, 255, 255, 255, 255, 255, "\nERROR: array out of bounds\n");
return ProcMemInitCheck(a1, 239, 4); /*0xffcb20bd*/
}
return result; /*0xffcb20c5*/
}
// Function: KtiFunc20C6 @ 0xffcb20c6 (0x58 bytes)
// Index: 1485/2560
char __cdecl KtiFunc20C6(_BYTE *a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
KtiFunc7BFD((int)a1, a2, a3, a4, a5, a6, a7); /*0xffcb20e0*/
return KtiFunc1F7D( /*0xffcb211b*/
a1,
a2,
a3,
(unsigned __int8)a7
| (((unsigned __int8)a6 | (((unsigned __int8)a5 | ((unsigned __int8)a4 << 8)) << 8)) << 8));
}
// Function: KtiFunc211E @ 0xffcb211e (0x5 bytes)
// Index: 1486/2560
// attributes: thunk
int __cdecl KtiFunc211E(int a1, int a2, int a3, int a4, int a5, int a6, int a7)
{
return KtiFunc1162(a1, a2, a3, a4, a5, a6, a7);
}
// Function: KtiFunc2123 @ 0xffcb2123 (0x53 bytes)
// Index: 1487/2560
BOOL __cdecl KtiFunc2123(int __return_address, unsigned __int8 n80, unsigned __int8 n5)
{
int n55; // edx
_WORD *i; // eax
int n55_1; // eax
n55 = 0; /*0xffcb212a*/
for ( i = (_WORD *)(__return_address + 255364); *i; ++i ) /*0xffcb212c*/
{
if ( (unsigned int)++n55 >= 0x37 ) /*0xffcb213e*/
return n55 == 55; /*0xffcb213e*/
}
*(_WORD *)(__return_address + 2 * n55 + 255364) = n5 | (n80 << 8); /*0xffcb2153*/
n55_1 = *(_DWORD *)(__return_address + 255360); /*0xffcb215b*/
if ( n55 == n55_1 ) /*0xffcb2163*/
*(_DWORD *)(__return_address + 255360) = n55_1 + 1; /*0xffcb2166*/
return n55 == 55; /*0xffcb2171*/
}
// Function: KtiFunc2176 @ 0xffcb2176 (0x9c bytes)
// Index: 1488/2560
int __cdecl KtiFunc2176(int __return_address)
{
int v1; // esi
v1 = ((int (__cdecl *)(void *))loc_FFC1FD97)(&unk_FFD5BB44); /*0xffcb2183*/
if ( ProcessLibraryEntryPoint() && v1 < 0 ) /*0xffcb2190*/
{
if ( DebugEnabled() && DebugAssertCheck(0x80000000) ) /*0xffcb21a1*/
DebugPrintDispatcher(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", v1); /*0xffcb21b2*/
DebugPrintEx( /*0xffcb21c6*/
(int)"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Common\\MrcHooksServicesPpiInstall.c",
69,
(int)"!EFI_ERROR (Status)");
}
LogDebugString((_BYTE *)__return_address, (int)"InstallPpi MrcHooksServicesPpiDesc Status = %08x\n", v1); /*0xffcb21d9*/
if ( v1 >= 0 )
{
*(_DWORD *)(__return_address + 628680) = &unk_FFD5BB10; /*0xffcb21ff*/
LogDebugString(
(_BYTE *)__return_address,
(int)"CacheMrcHooksServicesPpi in HOST: Host->MrcHooksServicesPpi = %08x\n",
&unk_FFD5BB10);
return 0; /*0xffcb220d*/
}
else
{
*(_DWORD *)(__return_address + 628680) = 0; /*0xffcb21e5*/
return -2147483642; /*0xffcb21ec*/
}
}
// Function: KtiFunc2212 @ 0xffcb2212 (0x513 bytes)
// Index: 1489/2560
int __cdecl KtiFunc2212(_BYTE *__return_address)
{
unsigned __int8 *__return_address_1; // esi
_BYTE *SocketInfo; // ebp
bool v3; // zf
unsigned __int8 n6; // bl
int v5; // ecx
int v6; // eax
int CpuCount; // edx
unsigned __int8 v8; // bh
int v9; // eax
unsigned __int8 n6_1; // bl
_BYTE *SocketInfo_2; // eax
int v12; // ebp
int v13; // ebp
unsigned __int8 v14; // bh
int v15; // edx
bool v16; // al
unsigned __int8 i; // cl
_BYTE *SocketInfo_4; // ecx
unsigned __int8 n6_2; // bl
int v20; // eax
int v21; // edx
unsigned __int8 v22; // bh
int v23; // ebp
int n4_2; // [esp+10h] [ebp-34h]
int v26; // [esp+14h] [ebp-30h]
int v27; // [esp+14h] [ebp-30h]
_BYTE *SocketInfo_1; // [esp+18h] [ebp-2Ch]
int n4; // [esp+1Ch] [ebp-28h]
int CpuCount_1; // [esp+20h] [ebp-24h]
int v31; // [esp+24h] [ebp-20h]
_BYTE *SocketInfo_3; // [esp+24h] [ebp-20h]
int v33; // [esp+24h] [ebp-20h]
int v34; // [esp+28h] [ebp-1Ch]
int n13; // [esp+2Ch] [e... [10542 chars total]
// Function: KtiFunc2725 @ 0xffcb2725 (0x22 bytes)
// Index: 1490/2560
int __cdecl KtiFunc2725(int __return_address, unsigned __int8 n4, unsigned __int8 n2)
{
return __return_address + 50813 * n4 + 8077 * n2 + 12557; /*0xffcb2746*/
}
// Function: KtiFunc2747 @ 0xffcb2747 (0x40 bytes)
// Index: 1491/2560
char __cdecl KtiFunc2747(int __return_address, unsigned __int8 n4)
{
_BYTE *v2; // eax
int v3; // eax
int n2; // ecx
LOBYTE(v2) = DdrTrainFuncB766(); /*0xffcb2753*/
if ( (_BYTE)v2 ) /*0xffcb275c*/
{
v3 = 48704 * n4; /*0xffcb2761*/
n2 = 2; /*0xffcb2769*/
*(_BYTE *)(v3 + __return_address + 258719) = 1; /*0xffcb276a*/
v2 = (_BYTE *)(__return_address + v3 + 304868); /*0xffcb2777*/
do /*0xffcb2782*/
{
*v2 = 2; /*0xffcb2779*/
v2 += 29; /*0xffcb277c*/
--n2; /*0xffcb277f*/
}
while ( n2 ); /*0xffcb2782*/
}
return (char)v2; /*0xffcb2784*/
}
// Function: KtiFunc2787 @ 0xffcb2787 (0x2a bytes)
// Index: 1492/2560
char __cdecl KtiFunc2787(_BYTE *__return_address, int a2, int n5, __int16 a4, int a5, _BYTE *a6)
{
return KtiFunc7C6B((int)__return_address, a2, n5, a4, a5, (int)a6); /*0xffcb27af*/
}
// Function: KtiFunc27B1 @ 0xffcb27b1 (0x27 bytes)
// Index: 1493/2560
char __cdecl KtiFunc27B1(_BYTE *__return_address, int n4, __int16 a3, int a4, unsigned __int8 *a5)
{
return KtiFunc7CFE((int)__return_address, n4, a3, a4, (int)a5); /*0xffcb27d6*/
}
// Function: KtiFunc27D8 @ 0xffcb27d8 (0x128 bytes)
// Index: 1494/2560
int __cdecl KtiFunc27D8(_BYTE *__return_address, int a2, int a3, char a4, unsigned __int16 n0xFF, unsigned __int8 *a6)
{
int v6; // ecx
int v7; // eax
int v8; // eax
int n4; // [esp+8h] [ebp-14h] BYREF
unsigned int v11; // [esp+Ch] [ebp-10h]
unsigned __int8 v12; // [esp+1Bh] [ebp-1h] BYREF
LOWORD(n4) = 1; /*0xffcb27e1*/
LOWORD(v11) = v11 & 0xF0F | 0xA0; /*0xffcb27f9*/
v12 = 0; /*0xffcb2804*/
DdrTrainFunc466A((int)__return_address, a2, a3, a4, (int)&n4); /*0xffcb280e*/
v6 = 48704 * (unsigned __int8)a2; /*0xffcb281c*/
if ( __return_address[v6 + 258719] ) /*0xffcb2822*/
{
if ( n0xFF <= 0xFFu ) /*0xffcb283b*/
{
v8 = v6 + 29 * ((v11 >> 8) & 0xF); /*0xffcb2894*/
if ( __return_address[v8 + 304868] ) /*0xffcb2896*/
{
__return_address[v8 + 304868] = 0; /*0xffcb289f*/
DdrTrainFunc5231(__return_address, a2, n4, v11 & 0xFF01 | 0x6C, 0, &v12); /*0xffcb28c8*/
}
}
else
{
v7 = v6 + 29 * ((v11 >> 8) & 0xF); /*0xffcb2846*/
if ( __return_address[v7 + 304868] != 1 ) /*0xffcb2850*/
{
__return_address[v7 + 304868] = 1; /*0xffcb2852*/
DdrTrainFunc5231(__return_address, a2, n4, v11 & 0xFF01 | 0x6E, 0, &v12); /*0xffcb287c*/
}
}
}
return DdrTrainFunc4A71(__return_address, a2, n4, v11, (unsigned __int8)n0xFF, a6); /*0xffcb28fa*/
}
// Function: KtiFunc2900 @ 0xffcb2900 (0x55 bytes)
// Index: 1495/2560
unsigned int __cdecl KtiFunc2900(int a1, int a2, int a3, int a4, unsigned __int16 a5, unsigned __int16 a6)
{
int v6; // esi
unsigned int v7; // esi
v6 = 10 * (a6 + 125 * a5); /*0xffcb2914*/
if ( (a6 & 0x80u) != 0 ) /*0xffcb2919*/
v6 -= 2560; /*0xffcb291b*/
v7 = 100 * (v6 + KtiFuncC0FC(a1) - 10); /*0xffcb2937*/
return (v7 / KtiFuncC0FC(a1) - 1) / 0x64; /*0xffcb2952*/
}
// Function: KtiFunc2955 @ 0xffcb2955 (0x16 bytes)
// Index: 1496/2560
bool __cdecl KtiFunc2955(int __return_address, char a2)
{
return a2 == GetSocketNumber(__return_address); /*0xffcb296a*/
}
// Function: KtiFunc296B @ 0xffcb296b (0x116 bytes)
// Index: 1497/2560
int __cdecl KtiFunc296B(int n4, unsigned __int8 n4a, _BYTE *a3, unsigned int n4b)
{
unsigned int n4b_1; // ebp
int n3; // ebx
int n4_1; // edi
unsigned __int8 n4a_1; // cl
unsigned int n4b_2; // edx
unsigned int v9; // eax
unsigned int n4b_3; // esi
unsigned int n4b_4; // ecx
_BYTE *v12; // edi
unsigned __int8 n4b_5; // dl
int n4b_7; // eax
int v16; // [esp+10h] [ebp-8h] BYREF
unsigned int n4b_6; // [esp+14h] [ebp-4h]
n4b_1 = n4b; /*0xffcb296f*/
n3 = 0; /*0xffcb2973*/
n4_1 = n4; /*0xffcb2977*/
if ( n4b ) /*0xffcb297d*/
{
n4a_1 = n4a; /*0xffcb2983*/
n4b_2 = n4b; /*0xffcb2987*/
v9 = ((n4a & 0xF) << 11) | 0x102; /*0xffcb2992*/
while ( 1 ) /*0xffcb29a5*/
{
if ( n4b_2 <= 4 ) /*0xffcb29a8*/
v9 |= 0x80u; /*0xffcb29aa*/
n4b = v9 | 1; /*0xffcb29b2*/
n3 = KtiFunc2D2F(n4_1, n4a_1, &n4b); /*0xffcb29c2*/
if ( n3 ) /*0xffcb29c9*/
break; /*0xffcb29c9*/
n4b_3 = n4b; /*0xffcb29cf*/
n4b_6 = n4b >> 15; /*0xffcb29da*/
n4b = (n4b >> 4) & 3; /*0xffcb29e9*/
n4b_1 += -1 - n4b; /*0xffcb29ed*/
KtiFunc2C5D(n4_1, n4a, &v16); /*0xffcb29f9*/
n4b_4 = n4b; /*0xffcb29fe*/
v12 = a3; /*0xffcb2a05*/
n4b_5 = 0; /*0xffcb2a09*/
n4b_7 = 0; /*0xffcb2a0b*/
do /*0xffcb2a1b*/
{
++n4b_5; /*0xffcb2a11*/
*v12++ = *((_BYTE *)&v16 + n4b_7); /*0xffcb2a13*/
n4b_7 = n4b_5; /*0xffcb2a16*/
}
while ( n4b_5 <= n4b_4 ); /*0xffcb2a1b*/
n4b_2 = n4b_6; /*0xffcb2a1d*/
a3 = v12; /*0xffcb2a25*/
n4_1 = n4; /*0xffcb2a29*/
v9 = n4b_3 & 0xFFFFFEBF | ~(_BYTE)n4b_3 & 0x40; /*0xffcb2a36*/
if ( !n4b_6 ) /*0xffcb2a3a*/
{
if ( n4b_1 ) /*0xffcb2a42*/
n3 = 3; /*0xffcb2a46*/
goto LABEL_12; /*0xffcb2a46*/
}
n4a_1 = n4a; /*0xffcb29a1*/
}
}
else
{
LABEL_12:
while ( CpuIoRead(n4_1, n4a, 0, *(_DWORD *)(n4_1 + 244289)) != 128 ) /*0xffcb2a62*/
; /*0xffcb2a4b*/
CpuIoCfgWrite(n4_1, n4a, 0, *(_DWORD *)(n4_1 + 244289), 0); /*0xffcb2a70*/
}
return n3; /*0xffcb2a78*/
}
// Function: KtiFunc2A81 @ 0xffcb2a81 (0x34 bytes)
// Index: 1498/2560
unsigned int __cdecl KtiFunc2A81(int n4, unsigned __int8 n4a, unsigned int *p_n4)
{
unsigned int result; // eax
do /*0xffcb2aab*/
{
do /*0xffcb2a9d*/
result = CpuIoRead(n4, n4a, 0, *(_DWORD *)(n4 + 244293)); /*0xffcb2a93*/
while ( (result & 1) == 0 ); /*0xffcb2a9d*/
}
while ( ((result >> 11) & 0xF) != n4a ); /*0xffcb2aab*/
*p_n4 = result; /*0xffcb2ab2*/
return result; /*0xffcb2ab1*/
}
// Function: KtiFunc2AB5 @ 0xffcb2ab5 (0x27 bytes)
// Index: 1499/2560
int __cdecl KtiFunc2AB5(int n4, unsigned __int8 a2)
{
return CpuIoCfgWrite(n4, a2, 0, *(_DWORD *)(n4 + 244293), (a2 << 11) | 0xC001); /*0xffcb2adb*/
}
// Function: KtiFunc2ADC @ 0xffcb2adc (0xc9 bytes)