// UncoreInitPeim - Part: Indices 1501-2000
// Generated from original UncoreInitPeim.c
// Total functions in this part: 25853
#include "UncoreInitPeim.h"
// Index: 1500/2560
int __cdecl KtiFunc2ADC(_DWORD *buf)
{
int n153_1; // edi
int v2; // edi
int v3; // edi
int n153; // eax
n153_1 = 0; /*0xffcb2ae4*/
if ( (*((_BYTE *)buf + 1494) & 3) != 0 ) /*0xffcb2aed*/
LogDebugString(buf, (int)"N%d Checked into Pipe\n", *((unsigned __int8 *)buf + 246425)); /*0xffcb2afd*/
do /*0xffcb2b9b*/
{
v2 = n153_1 - 1; /*0xffcb2b05*/
if ( v2 ) /*0xffcb2b08*/
{
v3 = v2 - 4; /*0xffcb2b0a*/
if ( v3 ) /*0xffcb2b0d*/
{
if ( v3 == 1 ) /*0xffcb2b12*/
{
ProcCommonFuncFDE5((int)buf, *((_BYTE *)buf + 246425), 0); /*0xffcb2b1e*/
KtiFunc2C01(buf); /*0xffcb2b24*/
}
}
else
{
ProcCommonFuncFDE5((int)buf, *((_BYTE *)buf + 246425), 0); /*0xffcb2b36*/
KtiFunc2BA5(buf); /*0xffcb2b3c*/
}
}
else
{
ProcCommonFuncFDE5((int)buf, *((_BYTE *)buf + 246425), 0); /*0xffcb2b51*/
if ( (*((_BYTE *)buf + 1494) & 3) != 0 ) /*0xffcb2b60*/
LogDebugString(buf, (int)"N%d Entering MRC\n", *((unsigned __int8 *)buf + 246425)); /*0xffcb2b70*/
MemColdBootCheck(0, (int)buf, (int)buf); /*0xffcb2b79*/
}
n153 = ProcCommonFuncFC52((int)buf, *((_BYTE *)buf + 246425)); /*0xffcb2b8c*/
n153_1 = n153; /*0xffcb2b91*/
}
while ( n153 != 153 ); /*0xffcb2b9b*/
return n153; /*0xffcb2ba1*/
}
// Function: KtiFunc2BA5 @ 0xffcb2ba5 (0x5c bytes)
// Index: 1501/2560
unsigned int __cdecl KtiFunc2BA5(_DWORD *buf)
{
_DWORD *buf_1; // esi
char v2; // bl
unsigned int result; // eax
_DWORD *buf_2; // [esp-10h] [ebp-20h]
unsigned __int8 n4a; // [esp-Ch] [ebp-1Ch]
char v6[8]; // [esp+8h] [ebp-8h] BYREF
buf_1 = buf; /*0xffcb2bac*/
v2 = *((_BYTE *)buf + 246409); /*0xffcb2bbc*/
n4a = *((_BYTE *)buf + 246425); /*0xffcb2bc2*/
buf_2 = buf; /*0xffcb2bc3*/
*((_BYTE *)buf + 246409) = 0; /*0xffcb2bc4*/
KtiFunc296B((int)buf_2, n4a, &buf, 4u); /*0xffcb2bcb*/
*(_QWORD *)v6 = KtiFuncEC9((unsigned int)buf); /*0xffcb2bd8*/
result = KtiFunc2D6B((int)buf_1, *((_BYTE *)buf_1 + 246425), v6, 8u); /*0xffcb2bed*/
*((_BYTE *)buf_1 + 246409) = v2; /*0xffcb2bf5*/
return result; /*0xffcb2bfb*/
}
// Function: KtiFunc2C01 @ 0xffcb2c01 (0x5c bytes)
// Index: 1502/2560
unsigned __int64 __cdecl KtiFunc2C01(_DWORD *buf)
{
_DWORD *buf_1; // esi
char v2; // bl
unsigned __int64 result; // rax
_DWORD *buf_2; // [esp-10h] [ebp-20h]
unsigned __int8 n4a; // [esp-Ch] [ebp-1Ch]
unsigned __int64 v6; // [esp+8h] [ebp-8h] BYREF
buf_1 = buf; /*0xffcb2c08*/
v2 = *((_BYTE *)buf + 246409); /*0xffcb2c18*/
n4a = *((_BYTE *)buf + 246425); /*0xffcb2c1e*/
buf_2 = buf; /*0xffcb2c1f*/
*((_BYTE *)buf + 246409) = 0; /*0xffcb2c20*/
KtiFunc296B((int)buf_2, n4a, &buf, 4u); /*0xffcb2c27*/
KtiFunc296B((int)buf_1, *((_BYTE *)buf_1 + 246425), &v6, 8u); /*0xffcb2c3b*/
result = KtiFuncEEB((unsigned int)buf, v6); /*0xffcb2c49*/
*((_BYTE *)buf_1 + 246409) = v2; /*0xffcb2c51*/
return result; /*0xffcb2c57*/
}
// Function: KtiFunc2C5D @ 0xffcb2c5d (0x20 bytes)
// Index: 1503/2560
int __cdecl KtiFunc2C5D(int n4, unsigned __int8 a2, int *a3)
{
int result; // eax
result = CpuIoRead(n4, a2, 0, *(_DWORD *)(n4 + 244297)); /*0xffcb2c6e*/
*a3 = result; /*0xffcb2c7a*/
return result; /*0xffcb2c7c*/
}
// Function: KtiFunc2C7D @ 0xffcb2c7d (0x3e bytes)
// Index: 1504/2560
int __cdecl KtiFunc2C7D(int a1, int a2, unsigned int a3)
{
char v3; // bl
int result; // eax
v3 = *(_BYTE *)(a1 + 246409); /*0xffcb2c8b*/
*(_BYTE *)(a1 + 246409) = 0; /*0xffcb2c91*/
if ( (_BYTE)a2 == *(_BYTE *)(a1 + 246425) ) /*0xffcb2c9e*/
result = KtiFuncEC9(a3); /*0xffcb2cac*/
else
result = KtiFunc2CBB(a1, a2, a3); /*0xffcb2ca2*/
*(_BYTE *)(a1 + 246409) = v3; /*0xffcb2cb2*/
return result; /*0xffcb2cb8*/
}
// Function: KtiFunc2CBB @ 0xffcb2cbb (0x74 bytes)
// Index: 1505/2560
__int64 KtiFunc2CBB(int a1, int a2, ...)
{
char v2; // bl
__int64 result; // rax
__int64 v4; // [esp+8h] [ebp-8h] BYREF
va_list va; // [esp+20h] [ebp+10h] BYREF
va_start(va, a2);
v2 = *(_BYTE *)(a1 + 246409); /*0xffcb2cc5*/
*(_BYTE *)(a1 + 246409) = 0; /*0xffcb2ccb*/
while ( CpuIoRead(a1, a2, 0, *(_DWORD *)(a1 + 244289)) ) /*0xffcb2cde*/
; /*0xffcb2cd2*/
CpuIoCfgWrite(a1, a2, 0, *(_DWORD *)(a1 + 244289), 5); /*0xffcb2cf7*/
KtiFunc2D6B(a1, a2, (int *)va, 4); /*0xffcb2d06*/
KtiFunc296B(a1, a2, &v4, 8u); /*0xffcb2d15*/
result = v4; /*0xffcb2d1a*/
*(_BYTE *)(a1 + 246409) = v2; /*0xffcb2d23*/
return result; /*0xffcb2d29*/
}
// Function: KtiFunc2D2F @ 0xffcb2d2f (0x3c bytes)
// Index: 1506/2560
unsigned int __cdecl KtiFunc2D2F(int n4, unsigned __int8 n4a, unsigned int *p_n4)
{
unsigned int v3; // eax
KtiFunc35AE(n4, n4a, p_n4); /*0xffcb2d3f*/
do /*0xffcb2d60*/
{
v3 = CpuIoRead(n4, n4a, 0, *(_DWORD *)(n4 + 244293)); /*0xffcb2d54*/
*p_n4 = v3; /*0xffcb2d5c*/
}
while ( (v3 & 1) != 0 ); /*0xffcb2d60*/
return (v3 >> 9) & 3; /*0xffcb2d65*/
}
// Function: KtiFunc2D6B @ 0xffcb2d6b (0x1d9 bytes)
// Index: 1507/2560
int __cdecl KtiFunc2D6B(int n4, unsigned __int8 n4a_2, char *a3, unsigned int n4a)
{
unsigned int n4a_1; // edi
unsigned int v6; // eax
__int16 v7; // ax
int n112; // esi
char v10; // [esp+12h] [ebp-Ah]
char v11; // [esp+13h] [ebp-9h]
unsigned int p_n4; // [esp+14h] [ebp-8h] BYREF
unsigned int v13; // [esp+18h] [ebp-4h]
int v14; // [esp+20h] [ebp+4h]
unsigned int v15; // [esp+20h] [ebp+4h]
n4a_1 = n4a; /*0xffcb2d7c*/
LOBYTE(v13) = 0; /*0xffcb2d85*/
v11 = 0; /*0xffcb2d89*/
v10 = 0; /*0xffcb2d8d*/
p_n4 = 0; /*0xffcb2d91*/
do
{
KtiFunc2A81(n4, n4a_2, &p_n4); /*0xffcb2d9c*/
if ( ((p_n4 >> 1) & 7) != 1 ) /*0xffcb2db2*/
{
LABEL_7:
v6 = (n4a_1 << 15) | p_n4 & 0x79CF | 0x200; /*0xffcb2dde*/
goto LABEL_21; /*0xffcb2dec*/
}
if ( (p_n4 & 0x100) != 0 )
{
if ( v10 || n4a_1 != n4a ) /*0xffcb2dc5*/
goto LABEL_7; /*0xffcb2dc5*/
v10 = 1; /*0xffcb2dd4*/
v13 = (p_n4 >> 6) & 0xFFFFFF01; /*0xffcb2dd8*/
}
else if ( !v10 || ((p_n4 & 0x40) != 0) == (_BYTE)v13 )
{
v6 = p_n4 & 0x79CF | (v10 != 0 ? 1024 : 512) | (n4a_1 << 15);
goto LABEL_21; /*0xffcb2edb*/
}
if ( (p_n4 & 0x80u) == 0 || (v11 = 1, n4a_1 <= 4) ) /*0xffcb2e1b*/
{
if ( n4a_1 <= 4 ) /*0xffcb2e38*/
{
if ( n4a_1 ) /*0xffcb2e44*/
{
v7 = ((unsigned __int8)p_n4 ^ (unsigned __int8)(16 * (n4a_1 - 1))) & 0x30 ^ p_n4 & 0xF9FF; /*0xffcb2e51*/
n4a_1 = 0; /*0xffcb2e53*/
}
else
{
v7 = p_n4 & 0xF9CF | 0x200; /*0xffcb2e5c*/
}
}
else
{
v7 = p_n4 & 0xF9CF | 0x30; /*0xffcb2e3a*/
n4a_1 -= 4; /*0xffcb2e3d*/
}
v6 = (n4a_1 << 15) | v7 & 0x7FFF; /*0xffcb2e6b*/
v14 = v6; /*0xffcb2e6f*/
LOBYTE(v13) = (v6 & 0x40) != 0; /*0xffcb2e79*/
if ( (v6 & 0x600) == 0 ) /*0xffcb2e82*/
{
p_n4 = 0; /*0xffcb2e84*/
n112 = ((v6 >> 4) & 3) + 1; /*0xffcb2e8f*/
KtiFunc7D6A(&p_n4, a3, n112); /*0xffcb2e9c*/
a3 += n112; /*0xffcb2ea5*/
KtiFunc35CE(n4, n4a_2, p_n4); /*0xffcb2eab*/
v6 = v14; /*0xffcb2eb0*/
}
}
else
{
v6 = (n4a_1 << 15) | p_n4 & 0x79CF | 0x600; /*0xffcb2e26*/
}
LABEL_21:
v15 = v6 & 0xFFFFFFFE; /*0xffcb2edd*/
p_n4 = v6 & 0xFFFFFFFE; /*0xffcb2ee4*/
KtiFunc35AE(n4, n4a_2, &p_n4); /*0xffcb2eef*/
}
while ( !v11 );
CpuIoCfgWrite(n4, n4a_2, 0, *(_DWORD *)(n4 + 244289), 128); /*0xffcb2f11*/
while ( CpuIoRead(n4, n4a_2, 0, *(_DWORD *)(n4 + 244289)) == 128 ) /*0xffcb2f30*/
; /*0xffcb2f19*/
return (v15 >> 9) & 3; /*0xffcb2f36*/
}
// Function: KtiFunc2F44 @ 0xffcb2f44 (0x5cb bytes)
// Index: 1508/2560
char __cdecl KtiFunc2F44(_BYTE *__return_address)
{
_DWORD *v2; // esi
_BYTE *v3; // edi
unsigned __int8 n4a; // cl
int v5; // ecx
char n4_1; // dl
unsigned __int8 *v7; // eax
int v8; // edx
unsigned int v9; // ecx
unsigned int v10; // esi
unsigned int v11; // ebp
unsigned int *v12; // ebp
unsigned __int8 n4a_1; // si
unsigned int v14; // ecx
char *v15; // edi
char *v16; // esi
bool v17; // al
int n4_4; // edx
int n4_7; // ecx
char *v20; // edi
char n4_2; // al
int v22; // ecx
_BYTE *v23; // edx
unsigned __int8 *v24; // edi
unsigned int v25; // esi
char result; // al
unsigned __int8 n4a_4; // [esp+10h] [ebp-20h]
char v28; // [esp+11h] [ebp-1Fh]
char v29; // [esp+12h] [ebp-1Eh]
char v30; // [esp+13h] [ebp-1Dh] BYREF
char n4[4]; // [esp+14h] [ebp-1Ch]
unsigned __int8 v32[4]; // [esp+18h] [ebp-18h]
char v33[4]; // [esp+1Ch] [ebp-14h] BYREF
int v34; // [esp+20h] [ebp-10h]
unsigned int v35; // [esp+24h] [ebp-Ch] BYREF
int... [11605 chars total]
// Function: KtiFunc350F @ 0xffcb350f (0x2e bytes)
// Index: 1509/2560
int __cdecl KtiFunc350F(int n4, unsigned __int8 a2)
{
int result; // eax
do /*0xffcb3537*/
result = CpuIoRead(n4, a2, 0, *(_DWORD *)(n4 + 244293)); /*0xffcb352d*/
while ( result != (a2 | 0x18) << 11 ); /*0xffcb3537*/
return result; /*0xffcb3539*/
}
// Function: KtiFunc353D @ 0xffcb353d (0x71 bytes)
// Index: 1510/2560
int __cdecl KtiFunc353D(int n4, unsigned __int8 a2, int n16)
{
unsigned int p_n4; // [esp+8h] [ebp-4h] BYREF
KtiFunc2A81(n4, a2, &p_n4); /*0xffcb354d*/
while ( ((1 << ((p_n4 >> 1) & 7)) & n16) == 0 ) /*0xffcb359b*/
{
p_n4 = p_n4 & 0x79CE | 0x200; /*0xffcb3567*/
KtiFunc35AE(n4, a2, &p_n4); /*0xffcb3574*/
KtiFunc2A81(n4, a2, &p_n4); /*0xffcb3583*/
}
return 1 << ((p_n4 >> 1) & 7); /*0xffcb35a6*/
}
// Function: KtiFunc35AE @ 0xffcb35ae (0x20 bytes)
// Index: 1511/2560
int __cdecl KtiFunc35AE(int n4, unsigned __int8 n4a, unsigned int *p_n4)
{
return CpuIoCfgWrite(n4, n4a, 0, *(_DWORD *)(n4 + 244293), *p_n4); /*0xffcb35cd*/
}
// Function: KtiFunc35CE @ 0xffcb35ce (0x1e bytes)
// Index: 1512/2560
int __cdecl KtiFunc35CE(int n4, unsigned __int8 n4a, unsigned int n4b)
{
return CpuIoCfgWrite(n4, n4a, 0, *(_DWORD *)(n4 + 244297), n4b); /*0xffcb35eb*/
}
// Function: KtiFunc35EC @ 0xffcb35ec (0x47 bytes)
// Index: 1513/2560
int __cdecl KtiFunc35EC(int a1, int a2, unsigned int n128, unsigned __int64 a4)
{
char v4; // bl
int result; // eax
v4 = *(_BYTE *)(a1 + 246409); /*0xffcb35fd*/
*(_BYTE *)(a1 + 246409) = 0; /*0xffcb3606*/
if ( (_BYTE)a2 == *(_BYTE *)(a1 + 246425) ) /*0xffcb3613*/
result = KtiFuncEEB(n128, a4); /*0xffcb3621*/
else
result = KtiFunc3633(a1, a2, n128, a4); /*0xffcb3617*/
*(_BYTE *)(a1 + 246409) = v4; /*0xffcb3629*/
return result; /*0xffcb362f*/
}
// Function: KtiFunc3633 @ 0xffcb3633 (0x53 bytes)
// Index: 1514/2560
int __cdecl KtiFunc3633(int a1, int a2, unsigned int n128, int a4)
{
char v4; // bl
int result; // eax
int v6; // [esp-8h] [ebp-10h]
v6 = *(_DWORD *)(a1 + 244289); /*0xffcb363d*/
v4 = *(_BYTE *)(a1 + 246409); /*0xffcb3643*/
*(_BYTE *)(a1 + 246409) = 0; /*0xffcb364e*/
CpuIoCfgWrite(a1, a2, 0, v6, 6); /*0xffcb3656*/
KtiFunc2D6B(a1, a2, (char *)&n128, 4u); /*0xffcb3665*/
result = KtiFunc2D6B(a1, a2, (char *)&a4, 8u); /*0xffcb3674*/
*(_BYTE *)(a1 + 246409) = v4; /*0xffcb367c*/
return result; /*0xffcb3682*/
}
// Function: KtiFunc3686 @ 0xffcb3686 (0xc bytes)
// Index: 1515/2560
int __cdecl KtiFunc3686(int n4)
{
*(_DWORD *)(n4 + 240266) = 0; /*0xffcb368a*/
return n4; /*0xffcb3691*/
}
// Function: KtiFunc3692 @ 0xffcb3692 (0x37 bytes)
// Index: 1516/2560
int __cdecl KtiFunc3692(unsigned __int8 *__return_address, int n183, int n10)
{
unsigned __int8 v3; // cl
int result; // eax
v3 = 0; /*0xffcb3696*/
while ( 1 ) /*0xffcb36a0*/
{
result = 12 * v3; /*0xffcb36a0*/
if ( *(_DWORD *)(result - 2879804) == n183 && *(_DWORD *)(result - 2879800) == n10 ) /*0xffcb36b1*/
break; /*0xffcb36b1*/
if ( ++v3 >= 0x3Bu ) /*0xffcb36b8*/
return result; /*0xffcb36b8*/
}
*(_DWORD *)(__return_address + 240266) = 0; /*0xffcb36c1*/
return (int)__return_address; /*0xffcb36ba*/
}
// Function: KtiFunc36C9 @ 0xffcb36c9 (0x8d0 bytes)
// Index: 1517/2560
int __cdecl KtiFunc36C9(int __return_address)
{
int v2; // edi
int n0x14; // ebx
int n0x14_1; // edi
_DWORD *v5; // ebx
int n0x14_2; // [esp+10h] [ebp+8h]
v2 = *(unsigned __int8 *)(__return_address + 9402); /*0xffcb36d1*/
if ( *(_BYTE *)(48704 * v2 + __return_address + 258689) && *(_BYTE *)(48704 * v2 + __return_address + 258716) ) /*0xffcb36ec*/
{
if ( ProcCommonFuncFB4A(__return_address, 3u) ) /*0xffcb36fd*/
{
KtiFunc8014(__return_address); /*0xffcb370e*/
LogDebugString((_BYTE *)__return_address, (int)"Performance statistics for socket %d\n", v2); /*0xffcb371a*/
LogDebugString( /*0xffcb372d*/
(_BYTE *)__return_address,
(int)"fmcMaxCached = %d\n",
*(unsigned __int8 *)(__return_address + 244272));
LogDebugString((_BYTE *)__return_address, (int)"fmcCachedReads = %d\n", *(_DWORD *)(__return_address + 244273)); /*0xffcb373e*/
LogDebugString( /*0xffcb3749*/
(_BYTE *)__return_address,
(int)"MRC Ph... [17806 chars total]
// Function: KtiFunc3F99 @ 0xffcb3f99 (0xfa bytes)
// Index: 1518/2560
bool __cdecl KtiFunc3F99(_BYTE *a1, _DWORD *a2)
{
bool result; // al
result = ProcCommonFuncFB4A((int)a1, 3u); /*0xffcb3fa1*/
if ( result ) /*0xffcb3faa*/
{
LogDebugString(a1, (int)"| %9d", *a2); /*0xffcb3fbe*/
LogDebugString(a1, (int)"| %9d ", a2[4]); /*0xffcb3fcc*/
LogDebugString(a1, (int)"| %5d", a2[2]); /*0xffcb3fda*/
if ( a2[3] <= 0x1388u ) /*0xffcb3fe9*/
LogDebugString(a1, (int)"| %6dus ", a2[3]); /*0xffcb4008*/
else
LogDebugString(a1, (int)"| %6dms ", a2[3] / 0x3E8u); /*0xffcb3ffd*/
LogDebugString(a1, (int)"| %6d ", a2[5]); /*0xffcb4019*/
LogDebugString(a1, (int)"| %7d ", a2[6]); /*0xffcb4028*/
LogDebugString(a1, (int)"| %7d ", a2[7]); /*0xffcb4032*/
LogDebugString(a1, (int)"|%8d ", a2[8]); /*0xffcb4040*/
LogDebugString(a1, (int)"| %7d ", a2[9]); /*0xffcb404a*/
LogDebugString(a1, (int)"| %8dms ", a2[10]); /*0xffcb4058*/
LogDebugString(a1, (int)"|\n"); /*0xffcb4066*/
a2[1] = 0; /*0xffcb406f*/
*a2 = 0; /*0xffcb4072*/
a2[2] = 0; /*0xffcb4074*/
a2[3] = 0; /*0xffcb4077*/
a2[4] = 0; /*0xffcb407a*/
a2[5] = 0; /*0xffcb407d*/
a2[6] = 0; /*0xffcb4080*/
a2[7] = 0; /*0xffcb4083*/
a2[8] = 0; /*0xffcb4086*/
a2[9] = 0; /*0xffcb4089*/
a2[10] = 0; /*0xffcb408c*/
return 0; /*0xffcb406b*/
}
return result; /*0xffcb4091*/
}
// Function: KtiFunc4093 @ 0xffcb4093 (0xf bytes)
// Index: 1519/2560
int __cdecl KtiFunc4093(int n4, int n16)
{
*(_DWORD *)(n4 + 240266) = n16; /*0xffcb409b*/
return n4; /*0xffcb40a1*/
}
// Function: KtiFunc40A2 @ 0xffcb40a2 (0x69 bytes)
// Index: 1520/2560
unsigned int __cdecl KtiFunc40A2(int __return_address, int n183, int n10)
{
unsigned __int8 v3; // cl
unsigned int n0x14; // eax
bool v5; // zf
unsigned __int8 v6; // cl
v3 = 0; /*0xffcb40a6*/
while ( 1 ) /*0xffcb40b0*/
{
n0x14 = 12 * v3; /*0xffcb40b0*/
if ( *(int *)((char *)&dword_FFD40EC4 + n0x14) == n183 && dword_FFD40EC8[3 * v3] == n10 ) /*0xffcb40c1*/
break; /*0xffcb40c1*/
if ( ++v3 >= 0x3Bu ) /*0xffcb40c8*/
return n0x14; /*0xffcb40c8*/
}
v5 = *(_BYTE *)(__return_address + 240271) == 0; /*0xffcb40d6*/
n0x14 = dword_FFD40ECC[3 * v3]; /*0xffcb40dd*/
*(_DWORD *)(__return_address + 240266) = n0x14; /*0xffcb40e3*/
if ( !v5 ) /*0xffcb40e9*/
{
v6 = *(_BYTE *)(__return_address + 240270); /*0xffcb40eb*/
n0x14 = v6 + 1; /*0xffcb40f4*/
*(_BYTE *)(__return_address + 240271) = 0; /*0xffcb40f5*/
if ( n0x14 < 0x14 ) /*0xffcb40ff*/
*(_BYTE *)(__return_address + 240270) = v6 + 1; /*0xffcb4103*/
}
return n0x14; /*0xffcb40ca*/
}
// Function: KtiFunc410B @ 0xffcb410b (0x80 bytes)
// Index: 1521/2560
int __cdecl KtiFunc410B(int a1, _DWORD *a2, unsigned __int8 a3, int a4)
{
int result; // eax
result = a3; /*0xffcb410e*/
switch ( a3 ) /*0xffcb4117*/
{
case 0u: /*0xffcb4117*/
*a2 += a4; /*0xffcb4124*/
result = a4; /*0xffcb4121*/
break; /*0xffcb4127*/
case 1u: /*0xffcb4117*/
a2[7] += a4; /*0xffcb4170*/
result = a4; /*0xffcb416d*/
break; /*0xffcb4174*/
case 2u: /*0xffcb4117*/
a2[2] += a4; /*0xffcb412e*/
result = a4; /*0xffcb412b*/
break; /*0xffcb4132*/
case 3u: /*0xffcb4117*/
a2[3] += a4; /*0xffcb4139*/
result = a4; /*0xffcb4136*/
break; /*0xffcb413d*/
case 4u: /*0xffcb4117*/
a2[8] += a4; /*0xffcb417b*/
result = a4; /*0xffcb4178*/
break; /*0xffcb417f*/
case 5u: /*0xffcb4117*/
a2[9] += a4; /*0xffcb4186*/
result = a4; /*0xffcb4183*/
break; /*0xffcb4183*/
case 6u: /*0xffcb4117*/
a2[4] += a4; /*0xffcb4144*/
result = a4; /*0xffcb4141*/
break; /*0xffcb4148*/
case 7u: /*0xffcb4117*/
a2[5] += a4; /*0xffcb414f*/
result = a4; /*0xffcb414c*/
break; /*0xffcb4153*/
case 8u: /*0xffcb4117*/
a2[6] += a4; /*0xffcb415a*/
result = a4; /*0xffcb4157*/
break; /*0xffcb415e*/
case 9u: /*0xffcb4117*/
a2[10] += a4; /*0xffcb4165*/
result = a4; /*0xffcb4162*/
break; /*0xffcb4169*/
default:
return result;
}
return result; /*0xffcb4126*/
}
// Function: KtiFunc41B3 @ 0xffcb41b3 (0x27c bytes)
// Index: 1522/2560
unsigned __int8 __cdecl KtiFunc41B3(int a1, unsigned __int8 a2, int a3)
{
_DWORD *v3; // eax
unsigned __int8 n0x14; // al
KtiFunc410B(a1, (_DWORD *)(a1 + 240272), a2, a3); /*0xffcb41cc*/
switch ( *(_DWORD *)(a1 + 240266) ) /*0xffcb41e4*/
{
case 1: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240316); /*0xffcb4238*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb423e*/
case 2: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240360); /*0xffcb4243*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4249*/
case 3: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240404); /*0xffcb424e*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4254*/
case 4: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240448); /*0xffcb4259*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb425f*/
case 5: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240536); /*0xffcb41eb*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb41f1*/
case 6: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240580); /*0xffcb426f*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4275*/
case 7: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240800); /*0xffcb4290*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4296*/
case 8: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240844); /*0xffcb429b*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb42a1*/
case 9: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240888); /*0xffcb42b1*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb42b7*/
case 0xA: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240932); /*0xffcb42bc*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb42c2*/
case 0xB: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241064); /*0xffcb42dd*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb42e3*/
case 0xC: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241108); /*0xffcb42e8*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb42ee*/
case 0xD: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241196); /*0xffcb42fe*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4304*/
case 0xE: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241240); /*0xffcb4309*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb430f*/
case 0xF: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241284); /*0xffcb41f6*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb41fc*/
case 0x10: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241328); /*0xffcb431f*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4325*/
case 0x11: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241372); /*0xffcb432a*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4330*/
case 0x12: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241416); /*0xffcb4335*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb433b*/
case 0x13: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240756); /*0xffcb4285*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb428b*/
case 0x14: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241460); /*0xffcb4340*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4346*/
case 0x15: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241592); /*0xffcb422d*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4233*/
case 0x16: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241548); /*0xffcb4314*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb431a*/
case 0x17: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240624); /*0xffcb4201*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4207*/
case 0x18: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241504); /*0xffcb434b*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4351*/
case 0x19: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241636); /*0xffcb4222*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4228*/
case 0x1A: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241944); /*0xffcb438d*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4393*/
case 0x1C: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240492); /*0xffcb4264*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb426a*/
case 0x1D: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240712); /*0xffcb427a*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4280*/
case 0x1E: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242384); /*0xffcb4398*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb439e*/
case 0x1F: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242428); /*0xffcb43a0*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb43a6*/
case 0x20: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241768); /*0xffcb4361*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4367*/
case 0x21: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241680); /*0xffcb4356*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb435c*/
case 0x22: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241988); /*0xffcb4217*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb421d*/
case 0x23: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242120); /*0xffcb43a8*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb43ae*/
case 0x24: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242164); /*0xffcb43b0*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb43b6*/
case 0x25: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242208); /*0xffcb43b8*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb43be*/
case 0x26: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242252); /*0xffcb43c0*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb43c6*/
case 0x27: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242296); /*0xffcb43c8*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb43ce*/
case 0x28: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242340); /*0xffcb43d0*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb43d6*/
case 0x29: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241724); /*0xffcb42a6*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb42ac*/
case 0x2A: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241020); /*0xffcb42d2*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb42d8*/
case 0x2B: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240976); /*0xffcb42c7*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb42cd*/
case 0x2C: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241812); /*0xffcb436c*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4372*/
case 0x2D: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241900); /*0xffcb4382*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4388*/
case 0x2E: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241856); /*0xffcb4377*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb437d*/
case 0x2F: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 241152); /*0xffcb42f3*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb42f9*/
case 0x30: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242472); /*0xffcb43d8*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb43de*/
case 0x31: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242516); /*0xffcb43e0*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb43e6*/
case 0x32: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242560); /*0xffcb43e8*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb43ee*/
case 0x33: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 242604); /*0xffcb43f0*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb43f6*/
case 0x34: /*0xffcb41e4*/
v3 = (_DWORD *)(a1 + 240668); /*0xffcb420c*/
return KtiFunc410B(a1, v3, a2, a3); /*0xffcb4212*/
default:
if ( !*(_BYTE *)(a1 + 240271) ) /*0xffcb43f8*/
*(_BYTE *)(a1 + 240271) = 1; /*0xffcb4401*/
n0x14 = *(_BYTE *)(a1 + 240270); /*0xffcb4408*/
if ( n0x14 >= 0x14u ) /*0xffcb4410*/
return n0x14; /*0xffcb4410*/
v3 = (_DWORD *)(a1 + 44 * n0x14 + 242648); /*0xffcb441d*/
return KtiFunc410B(a1, v3, a2, a3);
}
}
// Function: KtiFunc44FF @ 0xffcb44ff (0x42 bytes)
// Index: 1523/2560
bool __cdecl KtiFunc44FF(int a1, _DWORD *a2)
{
return a2[1] || *a2 || a2[2] || a2[3] || a2[4] || a2[5] || a2[6] || a2[7] || a2[8] || a2[9] || a2[10]; /*0xffcb453d*/
}
// Function: KtiFunc4541 @ 0xffcb4541 (0x104 bytes)
// Index: 1524/2560
unsigned int __cdecl KtiFunc4541(int __return_address, unsigned __int8 a2, unsigned __int8 a3, unsigned __int16 a4)
{
char SocketNumber_1; // al
unsigned __int8 v6; // bl
unsigned __int16 v7; // cx
int v8; // edi
int v9; // eax
unsigned int result; // eax
unsigned __int8 SocketNumber; // [esp+14h] [ebp+4h]
SocketNumber_1 = GetSocketNumber(__return_address); /*0xffcb454a*/
v6 = *(_BYTE *)(__return_address + 246425); /*0xffcb4553*/
SocketNumber = SocketNumber_1; /*0xffcb455d*/
v7 = a3 | (a2 << 8); /*0xffcb456f*/
v8 = v7; /*0xffcb4577*/
v9 = ProcCommonFuncFDBE(__return_address, v6, v7, a4); /*0xffcb4580*/
*(_DWORD *)(__return_address + 4 * v6 + 244250) = v9; /*0xffcb458b*/
if ( *(_BYTE *)(__return_address + 246425) == *(_BYTE *)(__return_address + 453660) )
{
*(_DWORD *)(__return_address + 246768) = v9; /*0xffcb45a1*/
KtiFunc7AA6(__return_address); /*0xffcb45a7*/
if ( ProcCommonFuncFB4A(__return_address, 2u) )
LogDebugString(
(_BYTE *)__return_address,
(int)"Checkpoint Code: Socket %d, 0x%02X, 0x%02X, 0x%04X\n",
*(unsigned __int8 *)(__return_address + 246425),
a2,
a3,
a4);
}
result = ProcCommonFuncFC3C(__return_address, SocketNumber); /*0xffcb45e4*/
if ( result == v8 ) /*0xffcb45ed*/
{
if ( ProcCommonFuncFB4A(__return_address, 3u) ) /*0xffcb45f2*/
{
LogDebugString( /*0xffcb460b*/
(_BYTE *)__return_address,
(int)"Breakpoint match found. S%d waiting...\n",
*(unsigned __int8 *)(__return_address + 246425));
KtiFuncA833((_DWORD *)__return_address, 1); /*0xffcb4613*/
}
for ( result = ProcCommonFuncFC3C(__return_address, SocketNumber); /*0xffcb4620*/
v8 == result;
result = ProcCommonFuncFC3C(__return_address, SocketNumber) )
{
KtiFunc4645((_BYTE *)__return_address); /*0xffcb462a*/
}
}
return result; /*0xffcb4640*/
}
// Function: KtiFunc4645 @ 0xffcb4645 (0x168 bytes)
// Index: 1525/2560
int __cdecl KtiFunc4645(_BYTE *__return_address)
{
unsigned __int8 n4_1; // bl
unsigned __int8 SocketNumber_1; // di
int v3; // eax
unsigned __int8 n4; // al
_BYTE *v5; // ebp
_BYTE *v6; // ebp
int v8; // [esp-4h] [ebp-24h]
char v9; // [esp+13h] [ebp-Dh]
int v10; // [esp+14h] [ebp-Ch] BYREF
unsigned __int8 SocketNumber[4]; // [esp+18h] [ebp-8h]
int v12; // [esp+1Ch] [ebp-4h]
n4_1 = 0; /*0xffcb464f*/
v10 = 0; /*0xffcb4653*/
SocketNumber[0] = GetSocketNumber((int)__return_address); /*0xffcb465c*/
SocketNumber_1 = SocketNumber[0]; /*0xffcb4664*/
ProcCommonFuncFC6A((int)__return_address, SocketNumber[0], 0, &v10); /*0xffcb466c*/
v3 = v10; /*0xffcb4671*/
if ( (v10 & 0x1000000) != 0 ) /*0xffcb467d*/
{
LogDebugString(__return_address, (int)"Request to run Jedec Init\n"); /*0xffcb4689*/
v12 = ProcCommonFuncFC3C((int)__return_address, SocketNumber_1); /*0xffcb4698*/
ProcCommonFuncFD90((int)__return_address, SocketNumber_1, 0); /*0xffcb469c*/
n4 = 0; /*0xffcb46a1*/
v5 = __return_address + 258716; /*0xffcb46a3*/
SocketNumber[0] = 0; /*0xffcb46ac*/
do /*0xffcb46db*/
{
if ( *(v5 - 27) && *v5 ) /*0xffcb46b5*/
{
KtiFuncD59F(__return_address, *(int *)SocketNumber, 63); /*0xffcb46c1*/
n4 = SocketNumber[0]; /*0xffcb46c6*/
}
++n4; /*0xffcb46cd*/
v5 += 48704; /*0xffcb46cf*/
SocketNumber[0] = n4; /*0xffcb46d5*/
}
while ( n4 < 4u ); /*0xffcb46db*/
ProcCommonFuncFD90((int)__return_address, SocketNumber_1, v12); /*0xffcb46e3*/
v10 &= ~0x1000000u; /*0xffcb46e8*/
ProcCommonFuncFC6A((int)__return_address, SocketNumber_1, 1, &v10); /*0xffcb46f9*/
v3 = v10; /*0xffcb46fe*/
}
if ( (v3 & 0x2000000) != 0 && (*(_DWORD *)(__return_address + 130) & 0x2000000) != 0 ) /*0xffcb4718*/
{
LogDebugString(__return_address, (int)"Request to run Rank Margin tool\n"); /*0xffcb4724*/
v12 = ProcCommonFuncFC3C((int)__return_address, SocketNumber_1); /*0xffcb4733*/
ProcCommonFuncFD90((int)__return_address, SocketNumber_1, 0); /*0xffcb4737*/
v6 = __return_address + 258716; /*0xffcb4742*/
v9 = __return_address[9402]; /*0xffcb474b*/
do /*0xffcb4773*/
{
if ( *(v6 - 27) && *v6 ) /*0xffcb4755*/
{
__return_address[9402] = n4_1; /*0xffcb475c*/
RankMarginToolMain((int)__return_address); /*0xffcb4762*/
}
++n4_1; /*0xffcb4768*/
v6 += 48704; /*0xffcb476a*/
}
while ( n4_1 < 4u ); /*0xffcb4773*/
v8 = v12; /*0xffcb4775*/
__return_address[9402] = v9; /*0xffcb477f*/
ProcCommonFuncFD90((int)__return_address, SocketNumber_1, v8); /*0xffcb4785*/
v10 &= ~0x2000000u; /*0xffcb478a*/
ProcCommonFuncFC6A((int)__return_address, SocketNumber_1, 1, &v10); /*0xffcb479b*/
}
return 0; /*0xffcb47a3*/
}
// Function: KtiFunc47AD @ 0xffcb47ad (0x32 bytes)
// Index: 1526/2560
bool __cdecl KtiFunc47AD(int n40)
{
return n40 == 40 || n40 == 71 || n40 == 72 || n40 == 73 || n40 == 74 || n40 == 75 || n40 == 76 || n40 == 53; /*0xffcb47db*/
}
// Function: KtiFunc47DF @ 0xffcb47df (0x28 bytes)
// Index: 1527/2560
bool __cdecl KtiFunc47DF(int n44)
{
return n44 == 44 || n44 == 45 || n44 == 46 || n44 == 47 || n44 == 48 || n44 == 49; /*0xffcb4803*/
}
// Function: KtiFunc4807 @ 0xffcb4807 (0x41 bytes)
// Index: 1528/2560
char __cdecl KtiFunc4807(_BYTE *n6, unsigned __int8 a2, unsigned __int8 n6a, unsigned __int8 i)
{
__ROL2__(*(_WORD *)(1379 * i + GetCpuCount((int)n6, a2, n6a) + 145), 8); /*0xffcb482c*/
return ProcCommonFunc1944(); /*0xffcb4846*/
}
// Function: KtiFunc4848 @ 0xffcb4848 (0x1d bytes)
// Index: 1529/2560
_DWORD *__cdecl KtiFunc4848(int a1)
{
_DWORD *result; // eax
int n6; // ecx
result = (_DWORD *)(a1 + 8); /*0xffcb484e*/
n6 = 6; /*0xffcb4853*/
do /*0xffcb4862*/
{
*(result - 2) = 0; /*0xffcb4854*/
*(result - 1) = 0; /*0xffcb4857*/
*result = 0; /*0xffcb485a*/
result += 3; /*0xffcb485c*/
--n6; /*0xffcb485f*/
}
while ( n6 ); /*0xffcb4862*/
return result; /*0xffcb4864*/
}
// Function: KtiFunc4865 @ 0xffcb4865 (0x3a2 bytes)
// Index: 1530/2560
int __cdecl KtiFunc4865(int n4, int n6, char a3)
{
unsigned __int8 *n4_1; // edi
_BYTE *SocketInfo; // ecx
unsigned __int8 n6_1; // al
int v6; // edx
__int16 v7; // dx
_BYTE *n6a; // ebp
unsigned __int8 *v9; // esi
int v10; // ecx
char n4_2; // al
int v12; // esi
unsigned __int8 n0x12_1; // al
unsigned __int8 v14; // bl
int n2_1; // [esp+14h] [ebp-2Ch]
unsigned __int8 i; // [esp+14h] [ebp-2Ch]
unsigned __int16 p_n60[2]; // [esp+18h] [ebp-28h] BYREF
int n0x12; // [esp+1Ch] [ebp-24h]
char n2[4]; // [esp+20h] [ebp-20h]
int n6a_1; // [esp+24h] [ebp-1Ch]
int v22; // [esp+28h] [ebp-18h]
int v23; // [esp+2Ch] [ebp-14h]
int v24; // [esp+30h] [ebp-10h] BYREF
int n255; // [esp+34h] [ebp-Ch] BYREF
int v26; // [esp+38h] [ebp-8h]
_BYTE *SocketInfo_1; // [esp+3Ch] [ebp-4h]
unsigned __int8 n4a; // [esp+44h] [ebp+4h]
n4_1 = (unsigned __int8 *)n4; /*0xffcb4869*/
if ( (*(_BYTE *)(n4 + 628656) & 4) != 0 && (*(_DWORD *)(n4 + 134) & 0x1000) != 0 ) /*0xffcb4884*/
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcb48a0*/
if ( a3 == -1 ) /*0xffcb48b1*/
DebugPrint(n4, 2, n6, 255, 255, 255, 255, 255, aDenormalizeCmd); /*0xffcb48b8*/
else
DebugPrint(n4, 2, n6, 255, 255, 255, 255, 255, aRenormalizeCmd); /*0xffcb48c8*/
SocketInfo = (_BYTE *)GetSocketInfo(n4, n6); /*0xffcb48d9*/
n6_1 = 0; /*0xffcb48db*/
v6 = 0; /*0xffcb48dd*/
SocketInfo_1 = SocketInfo; /*0xffcb48df*/
LOBYTE(n6a_1) = 0; /*0xffcb48e3*/
v26 = 0; /*0xffcb48e7*/
do /*0xffcb4b09*/
{
if ( *SocketInfo ) /*0xffcb48eb*/
{
v24 = 0; /*0xffcb48fa*/
n255 = 255; /*0xffcb48ff*/
v7 = *(_WORD *)&n4_1[12 * (unsigned __int8)n6 + 453596 + 2 * v6]; /*0xffcb4905*/
*(_DWORD *)p_n60 = (unsigned __int16)(v7 * a3); /*0xffcb491d*/
n6a = (_BYTE *)n6a_1; /*0xffcb4934*/
DebugPrint((int)n4_1, 2, n6, n6a_1, 255, 255, 255, 255, aCmdNormalizati, v7, a3); /*0xffcb493d*/
v23 = 0; /*0xffcb4947*/
v22 = 0; /*0xffcb494b*/
for ( i = 0; i < 2u; ++i ) /*0xffcb494f*/
{
n4a = 0; /*0xffcb4962*/
v9 = (unsigned __int8 *)(KtiFunc91AF((int)n4_1, n6, (unsigned __int8)n6a, i) + 4); /*0xffcb4967*/
do /*0xffcb49a4*/
{
if ( !KtiFunc89E9((int)n4_1, n6, (char)n6a, i, n4a, 0) ) /*0xffcb4977*/
{
v10 = *v9; /*0xffcb4983*/
*((_BYTE *)&v23 + v10) = v9[1]; /*0xffcb4989*/
*((_BYTE *)&v22 + v10) = 1; /*0xffcb498d*/
}
v9 += 242; /*0xffcb4996*/
++n4a; /*0xffcb499e*/
}
while ( n4a < 4u ); /*0xffcb49a4*/
}
n4_2 = 0; /*0xffcb49b4*/
v12 = 0; /*0xffcb49b6*/
n2[0] = 0; /*0xffcb49b8*/
do /*0xffcb4a08*/
{
if ( *((_BYTE *)&v22 + v12) ) /*0xffcb49bc*/
{
MailBoxFunc5B6A(n4_1, n6, (int)n6a, n2[0], 20, (__int16 *)p_n60); /*0xffcb49d1*/
MailBoxFunc6CF5( /*0xffcb49f3*/
n4_1,
n6,
(int)n6a,
*((unsigned __int8 *)&v23 + v12) + 45,
20,
(__int16 *)p_n60,
(unsigned __int16 *)&n255,
(unsigned __int16 *)&v24);
n4_2 = n2[0]; /*0xffcb49f8*/
}
++n4_2; /*0xffcb49ff*/
++v12; /*0xffcb4a01*/
n2[0] = n4_2; /*0xffcb4a02*/
}
while ( (unsigned __int8)n4_2 < 4u ); /*0xffcb4a08*/
MailBoxFunc6596( /*0xffcb4a20*/
n4_1,
n6,
(int)n6a,
40,
20,
(__int16 *)p_n60,
(unsigned __int16 *)&n255,
(unsigned __int16 *)&v24);
LOBYTE(n2_1) = 0; /*0xffcb4a28*/
do /*0xffcb4adb*/
{
KtiFunc91AF((int)n4_1, n6, (unsigned __int8)n6a, n2_1); /*0xffcb4a35*/
LOBYTE(n4) = 0; /*0xffcb4a3d*/
do /*0xffcb4ac9*/
{
n0x12_1 = KtiFunc89E9((int)n4_1, n6, (char)n6a, n2_1, n4, 0); /*0xffcb4a4c*/
if ( !n0x12_1 ) /*0xffcb4a56*/
{
LOBYTE(n0x12) = 0; /*0xffcb4a58*/
do /*0xffcb4abb*/
{
if ( n4_1[257312] || n0x12_1 != 8 && n0x12_1 != 17 ) /*0xffcb4a6b*/
{
MrcMarginGroupTrain(n4_1, n6, n6a, n2_1, n4, n0x12, 0, 0, 21, 28, p_n60); /*0xffcb4a86*/
MrcMarginGroupTrain(n4_1, n6, n6a, n2_1, n4, n0x12, 0, 0, 22, 28, p_n60); /*0xffcb4aa7*/
n0x12_1 = n0x12; /*0xffcb4aac*/
}
LOBYTE(n0x12) = ++n0x12_1; /*0xffcb4ab5*/
}
while ( n0x12_1 < 0x12u ); /*0xffcb4abb*/
}
LOBYTE(n4) = n4 + 1; /*0xffcb4ac3*/
}
while ( (unsigned __int8)n4 < 4u ); /*0xffcb4ac9*/
LOBYTE(n2_1) = n2_1 + 1; /*0xffcb4ad5*/
}
while ( (unsigned __int8)n2_1 < 2u ); /*0xffcb4adb*/
n6_1 = n6a_1; /*0xffcb4ae1*/
SocketInfo = SocketInfo_1; /*0xffcb4aea*/
v6 = v26; /*0xffcb4aee*/
}
++n6_1; /*0xffcb4af2*/
SocketInfo += 7688; /*0xffcb4af4*/
++v6; /*0xffcb4afa*/
LOBYTE(n6a_1) = n6_1; /*0xffcb4afb*/
v26 = v6; /*0xffcb4aff*/
SocketInfo_1 = SocketInfo; /*0xffcb4b03*/
}
while ( n6_1 < 6u ); /*0xffcb4b09*/
v14 = n4_1[(unsigned __int8)n6 + 214125]; /*0xffcb4b13*/
n4_1[(unsigned __int8)n6 + 214125] = 0; /*0xffcb4b1a*/
ProcCommonFuncFBF1((int)n4_1); /*0xffcb4b22*/
MailBoxFunc2B5B((int)n4_1, n6); /*0xffcb4b2d*/
KtiFuncD59F(n4_1, n6, 63); /*0xffcb4b36*/
ProcCommonFuncFBFD((int)n4_1); /*0xffcb4b3c*/
n4_1[(unsigned __int8)n6 + 214125] = v14; /*0xffcb4b46*/
DebugPrint((int)n4_1, 2, n6, 255, 255, 255, 255, 255, aReRunReceiveEn); /*0xffcb4b5d*/
ProcCommonFuncFBF1((int)n4_1); /*0xffcb4b66*/
IioMmioAccessInit((int)n4_1); /*0xffcb4b6c*/
IioFn_FFCE9779(n4_1); /*0xffcb4b72*/
ProcCommonFuncFBFD((int)n4_1); /*0xffcb4b78*/
if ( ProcCommonFuncFB4A((int)n4_1, 2u) ) /*0xffcb4b7f*/
{
DebugPrint((int)n4_1, 2, 255, 255, 255, 255, 255, 255, aShowingCurrent); /*0xffcb4b98*/
RmtFunc5B54(n4_1, n6, 0); /*0xffcb4ba1*/
if ( n4_1[9415] == 1 && n4_1[196] ) /*0xffcb4bb2*/
{
RmtFn_FFCCFAC6(n4_1); /*0xffcb4bbc*/
DebugPrint((int)n4_1, 2, 255, 255, 255, 255, 255, 255, aShowingRecende); /*0xffcb4bd0*/
RmtFunc5B54(n4_1, n6, 0); /*0xffcb4bd9*/
}
RmtFunc5B54(n4_1, n6, 0x15u); /*0xffcb4be5*/
RmtFunc5B54(n4_1, n6, 0x16u); /*0xffcb4bee*/
DataCmdCtlTrain(n4_1, n6); /*0xffcb4bf5*/
}
}
return 0; /*0xffcb4c02*/
}
// Function: KtiFunc4C07 @ 0xffcb4c07 (0x217 bytes)
// Index: 1531/2560
char __cdecl KtiFunc4C07(_BYTE *n6, int n6_1)
{
char n6_3; // al
_BYTE *SocketInfo; // ebp
int n8; // eax
_BYTE *CpuCount; // ecx
unsigned __int8 n2_2; // al
char n2_1; // al
unsigned __int8 v8; // al
int v9; // ecx
unsigned __int8 n0x10; // al
_WORD *v11; // eax
__int16 v12; // cx
unsigned __int8 v13; // [esp+4h] [ebp-34h]
int v14; // [esp+8h] [ebp-30h]
int n2; // [esp+Ch] [ebp-2Ch]
_BYTE *CpuCount_1; // [esp+10h] [ebp-28h]
int n6_2; // [esp+14h] [ebp-24h]
_BYTE *SocketInfo_1; // [esp+18h] [ebp-20h]
int v19[7]; // [esp+1Ch] [ebp-1Ch] BYREF
n6_3 = DdrTrainFuncB766(); /*0xffcb4c10*/
if ( n6_3 ) /*0xffcb4c18*/
{
SocketInfo = (_BYTE *)GetSocketInfo((int)n6, n6_1); /*0xffcb4c2c*/
SocketInfo_1 = SocketInfo; /*0xffcb4c30*/
nullsub_5(); /*0xffcb4c34*/
n6_3 = 0; /*0xffcb4c3c*/
LOBYTE(n6_2) = 0; /*0xffcb4c3e*/
do /*0xffcb4c42*/
{
if ( *SocketInfo ) /*0xffcb4c42*/
{
ProcCommonFunc487(n6, n6_1, n6_2, (int)v19); /*0xffcb4c58*/
if ( !*((_DWORD *)n6 + 61601) ) /*0xffcb4c60*/
{
n8 = *(_DWORD *)(n6 + 9405); /*0xffcb4c6d*/
if ( (n8 == 8 || n8 == 11 || n8 == 13) && *(_WORD *)(n6 + 257315) == 12 ) /*0xffcb4c8e*/
{
ProcCommonFunc2E9(n6, n6_1, n6_2, v19); /*0xffcb4c9c*/
CpuCount = (_BYTE *)GetCpuCount((int)n6, n6_1, n6_2); /*0xffcb4ca9*/
n2_2 = 0; /*0xffcb4cae*/
CpuCount_1 = CpuCount; /*0xffcb4cb0*/
LOBYTE(n2) = 0; /*0xffcb4cb4*/
while ( 1 ) /*0xffcb4cb8*/
{
if ( !*CpuCount ) /*0xffcb4cbb*/
goto LABEL_28; /*0xffcb4cbb*/
v14 = KtiFunc91DE((int)n6, n6_1, n6_2, n2); /*0xffcb4cd1*/
v13 = 0; /*0xffcb4cd5*/
do /*0xffcb4db0*/
{
if ( !KtiFunc89E9((int)n6, n6_1, n6_2, n2, v13, 0) ) /*0xffcb4ce4*/
{
n2_1 = n6[257313]; /*0xffcb4cf4*/
if ( n2_1 == 1 || n2_1 == 2 ) /*0xffcb4d00*/
{
v9 = v14 + 10; /*0xffcb4d3e*/
n0x10 = n6[48704 * (unsigned __int8)n6_1 + 258694]; /*0xffcb4d47*/
if ( n0x10 >= 0xCu ) /*0xffcb4d50*/
{
if ( n0x10 >= 0x10u ) /*0xffcb4d6d*/
{
v11 = (_WORD *)(v9 + 244 * v13); /*0xffcb4d84*/
v12 = -516; /*0xffcb4d86*/
}
else
{
v11 = (_WORD *)(v9 + 244 * v13); /*0xffcb4d75*/
v12 = -515; /*0xffcb4d77*/
}
}
else
{
v11 = (_WORD *)(v9 + 244 * v13); /*0xffcb4d5d*/
v12 = -514; /*0xffcb4d5f*/
}
*v11 &= v12; /*0xffcb4d8b*/
RmtFunc349(n6, n6_1, n6_2, n2, v13, (unsigned __int16)*v11, 5); /*0xffcb4d9c*/
}
else
{
v8 = v13; /*0xffcb4d02*/
if ( v13 ) /*0xffcb4d08*/
goto LABEL_26; /*0xffcb4d08*/
if ( CpuCount_1[107] ) /*0xffcb4d16*/
ProcCommonFunc5994(n6, n6_1, n6_2, n2, 0, 14); /*0xffcb4d20*/
else
RmtFunc765((int)n6, n6_1, n6_2, n2, 0, 0, 0xEu); /*0xffcb4d30*/
}
}
v8 = v13; /*0xffcb4da4*/
LABEL_26:
v13 = v8 + 1; /*0xffcb4da8*/
}
while ( (unsigned __int8)(v8 + 1) < 4u ); /*0xffcb4db0*/
n2_2 = n2; /*0xffcb4db6*/
CpuCount = CpuCount_1; /*0xffcb4dba*/
LABEL_28:
++n2_2; /*0xffcb4dbe*/
CpuCount += 1379; /*0xffcb4dc0*/
LOBYTE(n2) = n2_2; /*0xffcb4dc6*/
CpuCount_1 = CpuCount; /*0xffcb4dca*/
if ( n2_2 >= 2u ) /*0xffcb4dd0*/
{
ProcCommonFunc2C9(n6, n6_1, n6_2, v19); /*0xffcb4dde*/
SocketInfo = SocketInfo_1; /*0xffcb4de3*/
break; /*0xffcb4de3*/
}
}
}
}
ProcCommonFunc420(n6, n6_1, n6_2, (int)v19); /*0xffcb4dea*/
n6_3 = n6_2; /*0xffcb4df7*/
}
++n6_3; /*0xffcb4dfe*/
SocketInfo += 7688; /*0xffcb4e00*/
LOBYTE(n6_2) = n6_3; /*0xffcb4e06*/
SocketInfo_1 = SocketInfo; /*0xffcb4e0a*/
}
while ( (unsigned __int8)n6_3 < 6u ); /*0xffcb4c42*/
}
return n6_3; /*0xffcb4e19*/
}
// Function: KtiFunc4E1E @ 0xffcb4e1e (0x176 bytes)
// Index: 1532/2560
char __cdecl KtiFunc4E1E(unsigned __int8 *n6, int n4, int n2, unsigned __int8 a4)
{
int n4_1; // ebp
_BYTE *SocketInfo; // edi
int CpuCount; // eax
unsigned __int8 n6_2; // bl
int v8; // ecx
int v9; // edi
unsigned __int8 n0x10; // al
__int16 v11; // dx
int v12; // eax
int n6_1; // [esp+Ch] [ebp-10h]
int CpuCount_1; // [esp+10h] [ebp-Ch]
int v16; // [esp+14h] [ebp-8h]
_BYTE *SocketInfo_1; // [esp+18h] [ebp-4h]
n4_1 = n4; /*0xffcb4e22*/
SocketInfo = (_BYTE *)GetSocketInfo((int)n6, n4); /*0xffcb4e33*/
SocketInfo_1 = SocketInfo; /*0xffcb4e36*/
LOBYTE(CpuCount) = DdrTrainFuncB766(); /*0xffcb4e3a*/
if ( (_BYTE)CpuCount ) /*0xffcb4e44*/
{
n6_2 = 0; /*0xffcb4e4b*/
LOBYTE(n6_1) = 0; /*0xffcb4e4d*/
do /*0xffcb4f86*/
{
if ( *SocketInfo ) /*0xffcb4e51*/
{
CpuCount = GetCpuCount((int)n6, n4_1, n6_1); /*0xffcb4e60*/
v8 = 1379 * (unsigned __int8)n2; /*0xffcb4e6f*/
CpuCount_1 = CpuCount; /*0xffcb4e75*/
v16 = v8; /*0xffcb4e79*/
if ( *(_BYTE *)(v8 + CpuCount) ) /*0xffcb4e7d*/
{
if ( !*(_BYTE *)(v8 + CpuCount + 107) ) /*0xffcb4e87*/
{
v9 = KtiFunc91DE((int)n6, n4_1, n6_1, n2); /*0xffcb4ea2*/
RmtFunc765((int)n6, n4_1, n6_1, n2, 0, *(_BYTE *)(v16 + CpuCount_1 + 1225), 8u); /*0xffcb4ebf*/
RmtFunc765((int)n6, n4_1, n6_1, n2, 0, *(_BYTE *)(v16 + CpuCount_1 + 1231), 0xEu); /*0xffcb4ee3*/
RmtFunc765((int)n6, n4_1, n6_1, n2, 0, *(_BYTE *)(v16 + CpuCount_1 + 1232), 0xFu); /*0xffcb4f0a*/
n0x10 = n6[48704 * (unsigned __int8)n4 + 258694]; /*0xffcb4f1f*/
if ( n0x10 >= 0xCu ) /*0xffcb4f28*/
{
v11 = -515; /*0xffcb4f31*/
if ( n0x10 >= 0x10u ) /*0xffcb4f38*/
v11 = -516; /*0xffcb4f3a*/
}
else
{
v11 = -514; /*0xffcb4f2a*/
}
v12 = 244 * a4; /*0xffcb4f42*/
*(_WORD *)(v12 + v9 + 10) &= v11; /*0xffcb4f4a*/
LOBYTE(CpuCount) = RmtFunc349(n6, n4, n6_1, n2, a4, *(unsigned __int16 *)(v12 + v9 + 10), 5); /*0xffcb4f63*/
n4_1 = n4; /*0xffcb4f68*/
SocketInfo = SocketInfo_1; /*0xffcb4f6f*/
}
}
}
++n6_2; /*0xffcb4f73*/
SocketInfo += 7688; /*0xffcb4f75*/
LOBYTE(n6_1) = n6_2; /*0xffcb4f7b*/
SocketInfo_1 = SocketInfo; /*0xffcb4f7f*/
}
while ( n6_2 < 6u ); /*0xffcb4f86*/
}
return CpuCount; /*0xffcb4f8d*/
}
// Function: KtiFunc4F94 @ 0xffcb4f94 (0x65d bytes)
// Index: 1533/2560
int __cdecl KtiFunc4F94(unsigned __int8 *n6)
{
unsigned __int8 n6_2; // bl
int v2; // eax
int n6_4; // edi
_BYTE *SocketInfo; // ebp
int v5; // edx
int *v6; // ecx
unsigned __int8 n2_2; // bh
int n19; // eax
int n52; // ebp
unsigned __int8 n4_1; // cl
_BYTE *SocketInfo_2; // edx
unsigned __int8 n6_3; // bl
int CpuCount; // eax
unsigned __int8 n2_1; // al
char *v15; // edx
unsigned __int8 n4_2; // bl
unsigned __int8 n6ab_1; // al
_BYTE *SocketInfo_3; // ebp
int v19; // ecx
int v20; // eax
unsigned __int8 n6ac_1; // al
int v22; // edx
_BYTE *SocketInfo_4; // ecx
int v24; // edx
bool v25; // zf
_BYTE *SocketInfo_6; // ebp
_DWORD *v27; // eax
unsigned __int8 n6_5; // bl
_BYTE *SocketInfo_7; // ecx
unsigned __int8 n6_6; // bl
int v31; // eax
int n30; // [esp+0h] [ebp-28F4h]
_BYTE *n6a; // [esp+14h] [ebp-28E0h]
char n6aa; // [esp+14h] [ebp-28E0h]
unsigned __int8 n6ab; // [esp+14h] [ebp-28E0h]
unsigned __int8 n6ac; // [es... [11840 chars total]
// Function: KtiTopologyDegradeCheck @ 0xffcb55f1 (0x9f5 bytes)
// Index: 1534/2560
int __cdecl KtiTopologyDegradeCheck(unsigned __int8 *__return_address)
{
int v1; // edi
int __return_address_1; // ebp
int v3; // esi
__int16 *v4; // eax
int n6_1; // edx
int n8; // ecx
char *v7; // eax
int n2_1; // edi
_BYTE *SocketInfo_1; // esi
_BYTE *v10; // ecx
unsigned __int8 n6a_1; // al
unsigned __int8 n2_3; // cl
int v13; // esi
__int16 *v14; // ecx
int v15; // eax
int i; // eax
unsigned __int8 n6_2; // dl
__int16 *v18; // edi
int v19; // ecx
unsigned __int8 n6_3; // dl
int v21; // ecx
unsigned __int8 n4; // al
int v23; // eax
char *v24; // eax
unsigned __int8 n4_1; // al
int v26; // eax
int v27; // ecx
_BYTE *SocketInfo_3; // ecx
__int16 *v29; // esi
unsigned __int8 n6_4; // al
int v31; // eax
_BYTE *SocketInfo_5; // esi
unsigned __int8 n6_5; // al
int v34; // edi
int v35; // edi
unsigned __int8 *v36; // edi
_BYTE *SocketInfo_7; // ecx
unsigned __int8 n6_6; // al
int v39; // edx
int v40; // edi
... [25005 chars total]
// Function: KtiFunc5FE6 @ 0xffcb5fe6 (0x617 bytes)
// Index: 1535/2560
int __cdecl KtiFunc5FE6(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // ebp
unsigned __int8 n6_13; // bl
int n6_3; // esi
_BYTE *v4; // eax
int n6_1; // edi
int n8; // edx
int n16; // ecx
int v8; // ecx
int v9; // eax
_BYTE *SocketInfo_1; // edi
unsigned __int8 n6_2; // al
char n2_2; // cl
unsigned __int8 n6_7; // cl
char v14; // dl
unsigned __int8 n6_8; // al
char *v16; // edi
bool v17; // al
char n2_3; // cl
int n26; // eax
unsigned __int8 v20; // al
char n8_2; // al
_BYTE *SocketInfo_3; // edi
unsigned __int8 n6_5; // al
_BYTE *SocketInfo_4; // ecx
char *v25; // edx
int v26; // ebx
unsigned __int8 n6_6; // al
int v28; // edi
__int16 v29; // bx
__int16 v30; // di
const char *v31; // eax
int v32; // eax
int v33; // ecx
int v34; // eax
_BYTE *SocketInfo_6; // edi
unsigned __int8 n6_11; // al
int v37; // eax
bool v38; // cf
_BYTE *SocketInfo_7; // ecx
int *v40; // edi
unsigned ... [15300 chars total]
// Function: KtiFunc65FD @ 0xffcb65fd (0x221 bytes)
// Index: 1536/2560
char __cdecl KtiFunc65FD(_BYTE *n6, int n6_1)
{
_BYTE *SocketInfo; // ebp
char result; // al
unsigned __int8 n6_3; // al
int n8; // eax
_BYTE *CpuCount; // eax
unsigned __int8 n2_2; // cl
char n2_1; // al
unsigned __int8 v9; // al
int v10; // ecx
unsigned __int8 n0x10; // al
_WORD *v12; // eax
__int16 n515; // cx
unsigned __int8 n13; // [esp-Ch] [ebp-4Ch]
unsigned __int8 v15; // [esp+Ch] [ebp-34h]
int n6_2; // [esp+10h] [ebp-30h]
_BYTE *CpuCount_1; // [esp+14h] [ebp-2Ch]
int v18; // [esp+18h] [ebp-28h]
int n2; // [esp+1Ch] [ebp-24h]
_BYTE *SocketInfo_1; // [esp+20h] [ebp-20h]
int v21[7]; // [esp+24h] [ebp-1Ch] BYREF
SocketInfo = (_BYTE *)GetSocketInfo((int)n6, n6_1); /*0xffcb6612*/
SocketInfo_1 = SocketInfo; /*0xffcb6615*/
result = DdrTrainFuncB766(); /*0xffcb6619*/
if ( result ) /*0xffcb6623*/
{
n6_3 = 0; /*0xffcb6629*/
LOBYTE(n6_2) = 0; /*0xffcb662b*/
do /*0xffcb6807*/
{
if ( *SocketInfo ) /*0xffcb6630*/
{
nullsub_5(); /*0xffcb6646*/
if ( !*((_DWORD *)n6 + 61601) ) /*0xffcb664e*/
{
n8 = *(_DWORD *)(n6 + 9405); /*0xffcb665b*/
if ( (n8 == 8 || n8 == 11 || n8 == 13) && *(_WORD *)(n6 + 257315) == 12 ) /*0xffcb667c*/
{
ProcCommonFunc2E9(n6, n6_1, n6_2, v21); /*0xffcb668a*/
CpuCount = (_BYTE *)GetCpuCount((int)n6, n6_1, n6_2); /*0xffcb6692*/
CpuCount_1 = CpuCount; /*0xffcb669a*/
n2_2 = 0; /*0xffcb669e*/
LOBYTE(n2) = 0; /*0xffcb66a0*/
while ( 1 ) /*0xffcb66a4*/
{
if ( !*CpuCount ) /*0xffcb66a7*/
goto LABEL_31; /*0xffcb66a7*/
v18 = KtiFunc91DE((int)n6, n6_1, n6_2, n2); /*0xffcb66bd*/
v15 = 0; /*0xffcb66c1*/
do /*0xffcb67b7*/
{
if ( !KtiFunc89E9((int)n6, n6_1, n6_2, n2, v15, 0) ) /*0xffcb66d0*/
{
n2_1 = n6[257313]; /*0xffcb66e0*/
if ( n2_1 == 1 || n2_1 == 2 ) /*0xffcb66ec*/
{
v10 = v18 + 10; /*0xffcb6745*/
n0x10 = n6[48704 * (unsigned __int8)n6_1 + 258694]; /*0xffcb674e*/
if ( n0x10 >= 0xCu ) /*0xffcb6757*/
{
if ( n0x10 >= 0x10u ) /*0xffcb6774*/
{
v12 = (_WORD *)(v10 + 244 * v15); /*0xffcb678b*/
n515 = 515; /*0xffcb678d*/
}
else
{
v12 = (_WORD *)(v10 + 244 * v15); /*0xffcb677c*/
n515 = 514; /*0xffcb677e*/
}
}
else
{
v12 = (_WORD *)(v10 + 244 * v15); /*0xffcb6764*/
n515 = 513; /*0xffcb6766*/
}
*v12 |= n515; /*0xffcb6792*/
RmtFunc349(n6, n6_1, n6_2, n2, v15, (unsigned __int16)*v12, 5); /*0xffcb67a3*/
}
else
{
v9 = v15; /*0xffcb66ee*/
if ( v15 ) /*0xffcb66f4*/
goto LABEL_29; /*0xffcb66f4*/
if ( n6[48704 * (unsigned __int8)n6[9402] + 258699] ) /*0xffcb6709*/
n13 = 13; /*0xffcb673a*/
else
n13 = 1; /*0xffcb6717*/
if ( CpuCount_1[107] ) /*0xffcb6719*/
ProcCommonFunc5994(n6, n6_1, n6_2, n2, n13, 14); /*0xffcb6723*/
else
RmtFunc765((int)n6, n6_1, n6_2, n2, 0, n13, 0xEu); /*0xffcb6733*/
}
}
v9 = v15; /*0xffcb67ab*/
LABEL_29:
v15 = v9 + 1; /*0xffcb67af*/
}
while ( (unsigned __int8)(v9 + 1) < 4u ); /*0xffcb67b7*/
CpuCount = CpuCount_1; /*0xffcb67bd*/
n2_2 = n2; /*0xffcb67c1*/
LABEL_31:
++n2_2; /*0xffcb67c5*/
CpuCount += 1379; /*0xffcb67c7*/
LOBYTE(n2) = n2_2; /*0xffcb67cc*/
CpuCount_1 = CpuCount; /*0xffcb67d0*/
if ( n2_2 >= 2u ) /*0xffcb67d7*/
{
ProcCommonFunc2C9(n6, n6_1, n6_2, v21); /*0xffcb67e5*/
SocketInfo = SocketInfo_1; /*0xffcb67ea*/
break; /*0xffcb67ea*/
}
}
}
}
n6_3 = n6_2; /*0xffcb67f1*/
}
++n6_3; /*0xffcb67f5*/
SocketInfo += 7688; /*0xffcb67f7*/
LOBYTE(n6_2) = n6_3; /*0xffcb67fd*/
SocketInfo_1 = SocketInfo; /*0xffcb6801*/
}
while ( n6_3 < 6u ); /*0xffcb6807*/
return DdrTrainFunc36EC(n6, n6_1); /*0xffcb680f*/
}
return result; /*0xffcb6817*/
}
// Function: KtiFunc681E @ 0xffcb681e (0x17a bytes)
// Index: 1537/2560
unsigned __int8 __cdecl KtiFunc681E(unsigned __int8 *n6, int n4, int n2, unsigned __int8 a4)
{
unsigned __int8 n6_2; // al
_BYTE *SocketInfo_1; // ecx
int CpuCount; // edi
int v7; // ecx
unsigned __int8 n0x10; // al
__int16 n514; // dx
int v10; // eax
int n6_1; // [esp+8h] [ebp-14h]
int SocketInfo; // [esp+Ch] [ebp-10h]
int v13; // [esp+10h] [ebp-Ch]
int v14; // [esp+14h] [ebp-8h]
SocketInfo = GetSocketInfo((int)n6, n4); /*0xffcb6833*/
n6_2 = DdrTrainFuncB766(); /*0xffcb6837*/
if ( n6_2 ) /*0xffcb6841*/
{
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcb6847*/
n6_2 = 0; /*0xffcb684b*/
LOBYTE(n6_1) = 0; /*0xffcb684e*/
do /*0xffcb698a*/
{
if ( *SocketInfo_1 ) /*0xffcb6853*/
{
CpuCount = GetCpuCount((int)n6, n4, n6_1); /*0xffcb6868*/
v7 = 1379 * (unsigned __int8)n2; /*0xffcb6874*/
v14 = v7; /*0xffcb687e*/
if ( *(_BYTE *)(v7 + CpuCount) && !*(_BYTE *)(v7 + CpuCount + 107) ) /*0xffcb688c*/
{
v13 = KtiFunc91DE((int)n6, n4, n6_1, n2); /*0xffcb68a0*/
RmtFunc765(n6, n4, n6_1, n2, 0, *(_BYTE *)(v14 + CpuCount + 1225) & 0xFB, 8u); /*0xffcb68c2*/
if ( !KtiFunc9C66((int)n6, n4, n6_1, n2) ) /*0xffcb68cb*/
RmtFunc765(n6, n4, n6_1, n2, 0, *(_BYTE *)(v14 + CpuCount + 1225) | 8, 8u); /*0xffcb68f4*/
RmtFunc765(n6, n4, n6_1, n2, 0, 0, 0xEu); /*0xffcb6906*/
RmtFunc765(n6, n4, n6_1, n2, 0, 0, 0xFu); /*0xffcb6915*/
n0x10 = n6[48704 * (unsigned __int8)n4 + 258694]; /*0xffcb6926*/
if ( n0x10 >= 0xCu ) /*0xffcb692f*/
{
n514 = 514; /*0xffcb6938*/
if ( n0x10 >= 0x10u ) /*0xffcb693f*/
n514 = 515; /*0xffcb6941*/
}
else
{
n514 = 513; /*0xffcb6931*/
}
v10 = 244 * a4; /*0xffcb694d*/
*(_WORD *)(v10 + v13 + 10) |= n514; /*0xffcb6955*/
RmtFunc349(n6, n4, n6_1, n2, a4, *(unsigned __int16 *)(v10 + v13 + 10), 5); /*0xffcb6968*/
}
n6_2 = n6_1; /*0xffcb6970*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcb6974*/
}
++n6_2; /*0xffcb6978*/
SocketInfo_1 += 7688; /*0xffcb697a*/
LOBYTE(n6_1) = n6_2; /*0xffcb6980*/
SocketInfo = (int)SocketInfo_1; /*0xffcb6984*/
}
while ( n6_2 < 6u ); /*0xffcb698a*/
}
return n6_2; /*0xffcb6992*/
}
// Function: KtiFunc6998 @ 0xffcb6998 (0x1a bytes)
// Index: 1538/2560
int __cdecl KtiFunc6998(unsigned __int8 *__return_address, int n4, int a3)
{
MailBoxFuncDA23((int)__return_address, n4, a3); /*0xffcb69a4*/
return CpgcChannelInit(__return_address, n4, a3); /*0xffcb69ac*/
}
// Function: KtiFunc69B2 @ 0xffcb69b2 (0x3e5 bytes)
// Index: 1539/2560
char __cdecl KtiFunc69B2(unsigned __int8 *__return_address, int n4, int SocketInfo, int n2, int a5, char n4a)
{
int n2_1; // ebp
int v7; // esi
char n4a_1; // al
unsigned __int8 n6_1; // dl
_BYTE *v10; // eax
int v11; // esi
int v12; // ecx
int v13; // esi
int v14; // eax
char n8_1; // al
_BYTE *v16; // ecx
unsigned __int8 n6_2; // al
int v18; // esi
char n8a_1; // al
_BYTE *n6; // [esp+10h] [ebp-30h]
char n8; // [esp+14h] [ebp-2Ch]
char n8a; // [esp+14h] [ebp-2Ch]
_BYTE *v23; // [esp+18h] [ebp-28h]
_BYTE *v24; // [esp+1Ch] [ebp-24h]
int v25; // [esp+20h] [ebp-20h]
char v26; // [esp+24h] [ebp-1Ch]
char v27; // [esp+24h] [ebp-1Ch]
unsigned __int16 p_n60[2]; // [esp+28h] [ebp-18h] BYREF
int v29; // [esp+2Ch] [ebp-14h]
int n16843009; // [esp+30h] [ebp-10h] BYREF
__int16 n257; // [esp+34h] [ebp-Ch]
char v32; // [esp+36h] [ebp-Ah]
_BYTE v33[4]; // [esp+38h] [ebp-8h] BYREF
unsigned int v34; // [esp+3Ch] [ebp-4h]
int n4b; // [esp+58h] [ebp+18h]
n16843009 = 16843009; /*0xffcb69c3*/
n257 = 257; /*0xffcb69cb*/
v32 = 1; /*0xffcb69d2*/
n2_1 = n2; /*0xffcb69dc*/
v7 = GetSocketInfo((int)__return_address, n4); /*0xffcb69e0*/
n4a_1 = n4a; /*0xffcb69e2*/
v24 = (_BYTE *)v7; /*0xffcb69e6*/
if ( (n4a & 1) != 0 ) /*0xffcb69ee*/
{
*(_DWORD *)p_n60 = 32; /*0xffcb69f8*/
KtiFuncF849(__return_address, n4, 4u); /*0xffcb6a00*/
n6_1 = 0; /*0xffcb6a05*/
v10 = (_BYTE *)v7; /*0xffcb6a0a*/
LOBYTE(n6) = 0; /*0xffcb6a0c*/
v11 = a5; /*0xffcb6a10*/
v12 = 0; /*0xffcb6a14*/
v25 = 0; /*0xffcb6a16*/
v23 = v10; /*0xffcb6a1a*/
do /*0xffcb6bb3*/
{
if ( *v10 ) /*0xffcb6a1e*/
{
n2_1 = n2; /*0xffcb6a27*/
if ( ((1 << v12) & SocketInfo) != 0 ) /*0xffcb6a34*/
{
v29 = KtiFunc91DE((int)__return_address, n4, (unsigned __int8)n6, n2); /*0xffcb6a4e*/
if ( !KtiFunc89E9((int)__return_address, n4, (char)n6, n2, v11, 0) ) /*0xffcb6a54*/
{
v26 = KtiFunc88D1((int)__return_address, n4, (unsigned __int8)n6, n2, v11); /*0xffcb6a75*/
DdrTrainFuncE35((int)__return_address, n4, (int)n6, 1 << v26, 0, 0); /*0xffcb6a89*/
if ( *(_WORD *)(__return_address + 257315) == 12 ) /*0xffcb6a9b*/
{
v13 = 244 * (unsigned __int8)a5; /*0xffcb6aad*/
v14 = v29; /*0xffcb6ab3*/
*(_WORD *)(v13 + v29) &= ~0x100u; /*0xffcb6ab9*/
RmtFunc349(__return_address, n4, (int)n6, n2, a5, *(unsigned __int16 *)(v13 + v14 + 8) | 0x400, 4); /*0xffcb6ad0*/
*(_WORD *)(v13 + v29) |= 0x100u; /*0xffcb6ae1*/
if ( (__return_address[246408] & 7) == 0 ) /*0xffcb6aec*/
{
v34 = *(_DWORD *)(v23 + 11) | 0x80000000; /*0xffcb6afa*/
n8_1 = 0; /*0xffcb6afe*/
n8 = 0; /*0xffcb6b00*/
do /*0xffcb6b38*/
{
if ( __return_address[257312] || n8_1 != 8 && n8_1 != 17 ) /*0xffcb6b13*/
{
ProcCommonFunc15F1(__return_address, n4, (int)n6, n8, v33); /*0xffcb6b24*/
n8_1 = n8; /*0xffcb6b29*/
}
n8 = ++n8_1; /*0xffcb6b32*/
}
while ( (unsigned __int8)n8_1 < 0x12u ); /*0xffcb6b38*/
}
ProcCommonFunc1583((int)__return_address, n4, (int)n6, n2); /*0xffcb6b41*/
v11 = a5; /*0xffcb6b46*/
}
ProcCommonFunc292B(__return_address, n4, (int)n6, n2, v33); /*0xffcb6b59*/
ProcCommonFunc5153(__return_address, n4, (int)n6, n2, v11, v26); /*0xffcb6b6a*/
MrcMarginGroupTrain(__return_address, n4, n6, n2, v11, 255, 0, 0, 0, 20, p_n60); /*0xffcb6b88*/
}
v12 = v25; /*0xffcb6b90*/
n6_1 = (unsigned __int8)n6; /*0xffcb6b94*/
}
v10 = v23; /*0xffcb6b98*/
}
++n6_1; /*0xffcb6b9c*/
v10 += 7688; /*0xffcb6b9e*/
++v12; /*0xffcb6ba3*/
LOBYTE(n6) = n6_1; /*0xffcb6ba4*/
v25 = v12; /*0xffcb6ba8*/
v23 = v10; /*0xffcb6bac*/
}
while ( n6_1 < 6u ); /*0xffcb6bb3*/
MailBoxFunc4A8B(__return_address, n4, n2_1, v11, 0); /*0xffcb6bbf*/
IioFuncAC11(__return_address, n4, (_BYTE *)SocketInfo); /*0xffcb6bca*/
n4a_1 = n4a; /*0xffcb6bcf*/
}
else
{
v11 = a5; /*0xffcb6bd8*/
}
if ( (n4a_1 & 4) != 0 ) /*0xffcb6bde*/
{
DdrTrainFuncB30(__return_address, n4, SocketInfo, 0, (int)&n16843009, 1, 0); /*0xffcb6bf1*/
n4a_1 = n4a; /*0xffcb6bf6*/
}
if ( (n4a_1 & 2) != 0 ) /*0xffcb6bff*/
{
v16 = v24; /*0xffcb6c05*/
n6_2 = 0; /*0xffcb6c09*/
*(_DWORD *)p_n60 = -32; /*0xffcb6c0b*/
LOBYTE(n6) = 0; /*0xffcb6c13*/
while ( !*v16 ) /*0xffcb6c1a*/
{
LABEL_38:
++n6_2; /*0xffcb6d5d*/
v16 += 7688; /*0xffcb6d5f*/
LOBYTE(n6) = n6_2; /*0xffcb6d65*/
v24 = v16; /*0xffcb6d69*/
if ( n6_2 >= 6u ) /*0xffcb6d6f*/
{
MailBoxFunc4A8B(__return_address, n4, n2_1, v11, 255); /*0xffcb6d7e*/
return KtiFuncF849(__return_address, n4, 0); /*0xffcb6d87*/
}
}
if ( !KtiFunc89E9((int)__return_address, n4, (char)n6, n2_1, v11, 0) ) /*0xffcb6c2a*/
{
ProcCommonFuncB95(__return_address, n4, (int)n6, v33); /*0xffcb6c45*/
ProcCommonFuncCB0((int)__return_address, n4, (int)n6, n2_1); /*0xffcb6c51*/
if ( *(_WORD *)(__return_address + 257315) != 12 ) /*0xffcb6c63*/
{
LABEL_36:
v27 = KtiFunc88D1((int)__return_address, n4, (unsigned __int8)n6, n2_1, v11); /*0xffcb6d12*/
ProcCommonFunc371F(__return_address, n4, (int)n6, n2_1, v11, v27); /*0xffcb6d2f*/
MrcMarginGroupTrain(__return_address, n4, n6, n2_1, v11, 255, 0, 0, 0, 20, p_n60); /*0xffcb6d4d*/
goto LABEL_37; /*0xffcb6d4d*/
}
n4b = KtiFunc91DE((int)__return_address, n4, (unsigned __int8)n6, n2_1); /*0xffcb6c7d*/
if ( !KtiFunc89E9((int)__return_address, n4, (char)n6, n2_1, v11, 0) ) /*0xffcb6c83*/
{
v18 = 244 * (unsigned __int8)a5; /*0xffcb6c9f*/
*(_WORD *)(v18 + n4b) &= ~0x100u; /*0xffcb6cab*/
RmtFunc349(__return_address, n4, (int)n6, n2_1, a5, *(unsigned __int16 *)(v18 + n4b + 8), 4); /*0xffcb6cbd*/
*(_WORD *)(v18 + n4b) |= 0x100u; /*0xffcb6cce*/
n8a_1 = 0; /*0xffcb6cd2*/
n8a = 0; /*0xffcb6cd4*/
do /*0xffcb6d0c*/
{
if ( __return_address[257312] || n8a_1 != 8 && n8a_1 != 17 ) /*0xffcb6ce7*/
{
ProcCommonFunc1623(__return_address, n4, (int)n6, n8a); /*0xffcb6cf8*/
n8a_1 = n8a; /*0xffcb6cfd*/
}
n8a = ++n8a_1; /*0xffcb6d06*/
}
while ( (unsigned __int8)n8a_1 < 0x12u ); /*0xffcb6d0c*/
v11 = a5; /*0xffcb6d0e*/
goto LABEL_36; /*0xffcb6d0e*/
}
}
LABEL_37:
n6_2 = (unsigned __int8)n6; /*0xffcb6d55*/
v16 = v24; /*0xffcb6d59*/
goto LABEL_38; /*0xffcb6d59*/
}
return n4a_1; /*0xffcb6d8f*/
}
// Function: KtiFunc6D97 @ 0xffcb6d97 (0x97a bytes)
// Index: 1540/2560
int __cdecl KtiFunc6D97(unsigned __int8 *n6, int n4, int n2, int n4_2, int n52, _BYTE *buf, char *a7)
{
__int16 *SocketInfo; // ecx
unsigned __int8 n6_2; // bl
int v9; // ebp
int n4_1; // edi
_DWORD *v11; // eax
_BYTE *buf_2; // edx
_WORD *v13; // eax
bool v14; // zf
unsigned __int8 v15; // al
int v16; // ecx
int n256_2; // eax
unsigned __int8 n6_3; // bl
_DWORD *v19; // ebp
unsigned __int8 v20; // al
int v21; // ebp
int v22; // ebp
int v23; // ebp
__int16 *v24; // ecx
unsigned __int8 n6_4; // al
int v26; // ebp
char *v27; // ebx
__int16 n256_1; // cx
unsigned __int8 n6_5; // bl
__int16 *v30; // eax
_DWORD *v31; // ebp
_DWORD *v32; // ebp
unsigned __int8 n6_6; // bl
unsigned __int8 v34; // al
_DWORD *v35; // ebp
unsigned __int8 n6_7; // al
_BYTE *v37; // ecx
int CpuCount; // edx
int v39; // ecx
unsigned __int8 v40; // al
char v41; // dl
bool v42; // al
unsigned __int8 v43; // al
unsigned __int8 n6_8; // bl
_D... [15166 chars total]
// Function: KtiLinksConfig @ 0xffcb7711 (0xae9 bytes)
// Index: 1541/2560
char *__cdecl KtiLinksConfig(unsigned __int8 *n6, int n4, int n2, int n4_1, int n23, char *buf, char *a7)
{
unsigned __int8 *n6_1; // esi
unsigned __int8 n6_4; // bl
_BYTE *SocketInfo; // edi
char *buf_2; // edx
int v11; // ecx
_DWORD *v12; // eax
int CpuCount; // edi
int v14; // ebx
char v15; // al
char *buf_3; // eax
_BYTE *SocketInfo_3; // ecx
_DWORD *v18; // esi
int n6_3; // edx
unsigned __int8 v20; // al
int v21; // eax
int n33; // ebx
int n33_2; // eax
unsigned __int8 n6_5; // bl
char *v25; // ecx
_DWORD *v26; // edi
_BYTE *SocketInfo_4; // edi
unsigned __int8 n6_6; // bl
_WORD *v29; // eax
unsigned __int8 v30; // al
int v31; // ebx
int v32; // eax
_DWORD *v33; // edx
char *v34; // edi
unsigned __int8 n6_8; // bl
char *v36; // ecx
int v37; // edx
_DWORD *v38; // edi
unsigned __int8 n6_9; // bl
char *v40; // ecx
unsigned __int8 n6_10; // bl
_DWORD *v42; // edi
_WORD *v43; // eax
unsigned __int8 v44; // al
... [18414 chars total]
// Function: KtiFunc81FA @ 0xffcb81fa (0xb7 bytes)
// Index: 1542/2560
void __cdecl KtiFunc81FA(unsigned __int8 *__return_address, char a2, unsigned __int8 n2, unsigned __int8 a4, char *a5)
{
unsigned __int8 n6_1; // bh
_BYTE *SocketInfo; // edi
unsigned __int8 n8; // bl
unsigned __int8 v9; // [esp+10h] [ebp-Ch]
unsigned __int8 n6; // [esp+14h] [ebp-8h]
int v11; // [esp+18h] [ebp-4h] BYREF
n6_1 = 0; /*0xffcb8213*/
SocketInfo = (_BYTE *)GetSocketInfo((int)__return_address, a2); /*0xffcb8217*/
n6 = 0; /*0xffcb8219*/
do /*0xffcb82a3*/
{
if ( *SocketInfo && !KtiFunc89E9((int)__return_address, a2, n6, n2, a4, 0) ) /*0xffcb8235*/
{
*(_DWORD *)a5 = 0; /*0xffcb8241*/
n8 = 0; /*0xffcb8244*/
v9 = 0; /*0xffcb8246*/
do /*0xffcb828f*/
{
if ( __return_address[257312] || n8 != 8 && n8 != 17 ) /*0xffcb825b*/
{
ProcCommonFunc3CF3(__return_address, a2, n6, v9, &v11, (int *)a5); /*0xffcb8270*/
nullsub_5(); /*0xffcb827e*/
}
v9 = ++n8; /*0xffcb8288*/
}
while ( n8 < 0x12u ); /*0xffcb828f*/
}
++n6_1; /*0xffcb8291*/
SocketInfo += 7688; /*0xffcb8293*/
a5 += 4; /*0xffcb8299*/
n6 = n6_1; /*0xffcb829c*/
}
while ( n6_1 < 6u ); /*0xffcb82a3*/
}
// Function: KtiFunc82B1 @ 0xffcb82b1 (0x620 bytes)
// Index: 1543/2560
int __cdecl KtiFunc82B1(unsigned __int8 *__return_address, int n6, int n2, int n4, char *a5, char *a6, char *a7)
{
__int16 *v7; // edx
unsigned __int8 n6_1; // bl
int v9; // edi
unsigned __int8 *__return_address_1; // esi
_BYTE *buf_2; // ecx
_BYTE *SocketInfo_1; // eax
bool v13; // al
_WORD *v14; // eax
__int16 *buf_3; // eax
unsigned __int8 n6_2; // bl
_DWORD *v17; // edi
char *v18; // ecx
void *buf_5; // eax
unsigned __int8 n6_3; // bl
int *v21; // edi
int v22; // edx
_DWORD *v23; // eax
unsigned __int8 n6_4; // bl
__int16 *buf_6; // ecx
int v26; // edi
char v27; // bh
unsigned __int8 n6_5; // bl
char *v29; // edx
int v30; // eax
int v31; // ecx
__int16 *v32; // edi
int *v33; // eax
const char *v34; // eax
int v35; // edi
int n256; // eax
__int16 *v37; // edi
char *v38; // ecx
unsigned __int8 n6_6; // bl
char *v40; // ebp
int v41; // edi
int result; // eax
__int16 v43; // dx
__int16 v44; // bp
int n0x28_1;... [11141 chars total]
// Function: KtiFunc88D1 @ 0xffcb88d1 (0x4a bytes)
// Index: 1544/2560
char __cdecl KtiFunc88D1(int a1, unsigned __int8 a2, unsigned __int8 a3, char n2, char a5)
{
char v5; // dl
if ( ProcCommonFunc1545(a1, a2, a3) ) /*0xffcb88dd*/
{
if ( n2 == 2 ) /*0xffcb88ef*/
return (a5 & 1) + 6; /*0xffcb88f7*/
else
return (a5 & 1) + 4 * n2; /*0xffcb8904*/
}
else
{
v5 = a5 + 4 * n2; /*0xffcb890b*/
if ( n2 == 2 ) /*0xffcb8912*/
v5 -= 2; /*0xffcb8914*/
}
return v5; /*0xffcb8919*/
}
// Function: j_MemInitWrapper @ 0xffcb891b (0x5 bytes)
// Index: 1545/2560
// attributes: thunk
int __cdecl j_MemInitWrapper(_BYTE *n6)
{
return MemInitWrapper(n6);
}
// Function: KtiFunc8920 @ 0xffcb8920 (0x50a bytes)
// Index: 1546/2560
int __cdecl KtiFunc8920(unsigned __int8 *__return_address, int n6)
{
unsigned __int8 *__return_address_1; // edi
_BYTE *SocketInfo; // ebp
unsigned __int8 n6_1; // al
int v5; // ecx
_BYTE *n6a; // esi
unsigned __int8 *v7; // ebp
int v8; // ecx
int n4_1; // eax
int v10; // ebp
unsigned __int8 n0x12_1; // al
char n4_4; // al
int v13; // ebp
unsigned __int8 n0x12_2; // al
unsigned __int8 v15; // bl
int n4_3; // [esp+4h] [ebp-30h]
unsigned __int8 n4; // [esp+4h] [ebp-30h]
unsigned __int16 p_n60[2]; // [esp+8h] [ebp-2Ch] BYREF
int n0x12; // [esp+Ch] [ebp-28h]
int n255; // [esp+10h] [ebp-24h] BYREF
int v22; // [esp+14h] [ebp-20h] BYREF
int v23; // [esp+18h] [ebp-1Ch]
int v24; // [esp+1Ch] [ebp-18h]
char n2[4]; // [esp+20h] [ebp-14h]
int n6a_1; // [esp+24h] [ebp-10h]
int v27; // [esp+28h] [ebp-Ch]
int n4_2; // [esp+2Ch] [ebp-8h]
_BYTE *SocketInfo_1; // [esp+30h] [ebp-4h]
unsigned __int8 i; // [esp+38h] [ebp+4h]
*(_DWORD *)p_n60 = 0; /... [11225 chars total]
// Function: KtiFunc8E2A @ 0xffcb8e2a (0x4aa bytes)
// Index: 1547/2560
int __cdecl KtiFunc8E2A(unsigned __int8 *__return_address, int n6, __int16 a3)
{
unsigned __int8 n6_1; // bl
const char *v4; // eax
_BYTE *SocketInfo_1; // ecx
unsigned __int8 n6aa_1; // al
int v7; // ebp
int v8; // esi
int v9; // eax
int v10; // edx
unsigned __int8 *v11; // ecx
int v12; // eax
_BYTE *SocketInfo_3; // ecx
int *v14; // ebp
unsigned __int8 n6a_1; // al
_BYTE *n6a; // [esp+110h] [ebp-79Ch]
unsigned __int8 n6aa; // [esp+110h] [ebp-79Ch]
_BYTE *SocketInfo_2; // [esp+114h] [ebp-798h]
unsigned __int8 n2; // [esp+118h] [ebp-794h]
int SocketInfo; // [esp+120h] [ebp-78Ch]
int p_n4096; // [esp+12Ch] [ebp-780h] BYREF
int n40; // [esp+130h] [ebp-77Ch]
int n6_2; // [esp+134h] [ebp-778h]
unsigned int n40_1; // [esp+138h] [ebp-774h]
_WORD v26[96]; // [esp+13Ch] [ebp-770h]
int v27[32]; // [esp+1FCh] [ebp-6B0h] BYREF
int v28; // [esp+27Ch] [ebp-630h] BYREF
int v29[108]; // [esp+6FCh] [ebp-1B0h] BYREF
n6_1 = n6; /*0xffcb8e31*/
n6_2 = (unsigned __int8)n6; /*0xffcb8e3b*/
if ( __return_address[48704 * (unsigned __int8)n6 + 258689] )
{
SocketInfo = GetSocketInfo((int)__return_address, n6); /*0xffcb8e64*/
KtiFunc9791(n6, __return_address, n6); /*0xffcb8e68*/
if ( ProcCommonFuncFB4A((int)__return_address, 0xAu) ) /*0xffcb8e70*/
KtiFunc8014((int)__return_address); /*0xffcb8e7d*/
if ( a3 == 1 ) /*0xffcb8e95*/
{
DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "START_CMD_CLK_PER_GROUP_FINAL\n"); /*0xffcb8ea5*/
p_n4096 = 4096; /*0xffcb8eaa*/
}
else
{
DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "START_CMD_CLK_PER_GROUP\n"); /*0xffcb8ec2*/
p_n4096 = 2048; /*0xffcb8ec7*/
}
RmtFunc9414((int)__return_address, n6, (int)v29); /*0xffcb8edc*/
ProcCommonFuncFC((int)__return_address, &p_n4096); /*0xffcb8ee7*/
if ( ProcCommonFuncFB4A((int)__return_address, 0xAu) ) /*0xffcb8eef*/
KtiFunc834D((int)__return_address); /*0xffcb8efc*/
MailBoxFunc2B5B((int)__return_address, n6); /*0xffcb8f04*/
n40_1 = a3 == 1 ? 40 : 73;
n40 = a3 == 1 ? 40 : 71;
if ( n40 <= n40_1 )
{
v4 = MailBoxFunc5AB0(__return_address, a3 == 1 ? 40 : 71, v27);
DebugPrint((int)__return_address, 2, n6, 255, 255, 255, 255, 255, "Calling GetMargins for %s\n", v4); /*0xffcb8f61*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcb8f66*/
n6aa_1 = 0; /*0xffcb8f6a*/
n6aa = 0; /*0xffcb8f6f*/
v7 = 0; /*0xffcb8f73*/
SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffcb8f75*/
while ( 1 ) /*0xffcb8f79*/
{
if ( *SocketInfo_1 ) /*0xffcb8f79*/
{
GetCpuCount((int)__return_address, n6_1, n6aa); /*0xffcb8f84*/
n2 = 0; /*0xffcb8f8c*/
v8 = 50813 * n6_2; /*0xffcb8f99*/
do /*0xffcb8ff2*/
{
v9 = KtiFunc91AF((int)__return_address, n6_1, n6aa, n2); /*0xffcb8fa5*/
LOBYTE(v10) = __return_address[v8 + 10194]; /*0xffcb8faa*/
if ( (_BYTE)v10 ) /*0xffcb8fb6*/
{
v11 = (unsigned __int8 *)(v9 + 1); /*0xffcb8fb8*/
v10 = (unsigned __int8)v10; /*0xffcb8fbb*/
do /*0xffcb8fdd*/
{
v26[2 * v7 + 2 * *v11] = 0; /*0xffcb8fc5*/
v12 = *v11; /*0xffcb8fca*/
v11 += 242; /*0xffcb8fcd*/
v26[2 * v7 + 1 + 2 * v12] = 0; /*0xffcb8fd5*/
--v10; /*0xffcb8fda*/
}
while ( v10 ); /*0xffcb8fdd*/
n6_1 = n6; /*0xffcb8fdf*/
}
++n2; /*0xffcb8fec*/
}
while ( n2 < 2u ); /*0xffcb8ff2*/
n6aa_1 = n6aa; /*0xffcb8ff4*/
SocketInfo_1 = SocketInfo_2; /*0xffcb8ff8*/
}
++n6aa_1; /*0xffcb8ffc*/
SocketInfo_1 += 7688; /*0xffcb8ffe*/
v7 += 8; /*0xffcb9004*/
n6aa = n6aa_1; /*0xffcb9007*/
SocketInfo_2 = SocketInfo_1; /*0xffcb900b*/
if ( n6aa_1 >= 6u ) /*0xffcb9011*/
DdrTrainFunc158E((int)__return_address, n6_1); /*0xffcb9019*/
}
}
DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcb9215*/
SocketInfo_3 = (_BYTE *)SocketInfo; /*0xffcb921a*/
v14 = &v28; /*0xffcb921e*/
n6a_1 = 0; /*0xffcb9225*/
LOBYTE(n6a) = 0; /*0xffcb922c*/
do /*0xffcb927a*/
{
if ( *SocketInfo_3 ) /*0xffcb9231*/
{
if ( a3 == 1 ) /*0xffcb923f*/
PciAccessInit(__return_address, n6, n6a, 0, 32, 0, 1u, v14); /*0xffcb9242*/
else
PciAccessInit(__return_address, n6, n6a, 0, 32, 0, 3u, v14); /*0xffcb9252*/
SocketInfo_3 = (_BYTE *)SocketInfo; /*0xffcb9257*/
n6a_1 = (unsigned __int8)n6a; /*0xffcb925e*/
}
++n6a_1; /*0xffcb9262*/
SocketInfo_3 += 7688; /*0xffcb9264*/
v14 += 48; /*0xffcb926a*/
LOBYTE(n6a) = n6a_1; /*0xffcb9270*/
SocketInfo = (int)SocketInfo_3; /*0xffcb9274*/
}
while ( n6a_1 < 6u ); /*0xffcb927a*/
if ( a3 == 1 ) /*0xffcb9289*/
DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "STOP_CMD_CLK_PER_GROUP_FINAL\n"); /*0xffcb9290*/
else
DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "STOP_CMD_CLK_PER_GROUP\n"); /*0xffcb92a0*/
ProcCommonFuncFBF1((int)__return_address); /*0xffcb92a9*/
MailBoxFunc2B5B((int)__return_address, n6); /*0xffcb92b0*/
KtiFuncD59F(__return_address, n6, 63); /*0xffcb92b9*/
ProcCommonFuncFBFD((int)__return_address); /*0xffcb92bf*/
}
return 0; /*0xffcb92c9*/
}
// Function: KtiFunc92D4 @ 0xffcb92d4 (0x4bd bytes)
// Index: 1548/2560
int __cdecl KtiFunc92D4(int n6)
{
unsigned __int8 v1; // cl
int v2; // eax
int v3; // eax
int n4_1; // ebx
_BYTE *SocketInfo; // ebp
unsigned __int8 n6a_1; // al
_BYTE *SocketInfo_2; // ebp
int i; // edi
unsigned __int8 n6a_2; // al
_BYTE *SocketInfo_3; // ecx
int v11; // edx
int *v12; // eax
unsigned __int8 n4_2; // cl
unsigned __int8 n6_2; // al
int v15; // eax
unsigned __int8 n6_3; // al
_BYTE *SocketInfo_5; // ecx
int v18; // ebp
char *v19; // edx
int v20; // edx
bool v21; // zf
unsigned __int8 n6a_3; // al
int n6a; // [esp+Ch] [ebp-2754h]
unsigned __int8 n6_4; // [esp+Ch] [ebp-2754h]
unsigned __int8 n6_5; // [esp+Ch] [ebp-2754h]
int n4; // [esp+10h] [ebp-2750h]
int n2; // [esp+14h] [ebp-274Ch]
_BYTE *SocketInfo_4; // [esp+18h] [ebp-2748h]
_BYTE *SocketInfo_6; // [esp+18h] [ebp-2748h]
char *v31; // [esp+1Ch] [ebp-2744h]
int v32; // [esp+20h] [ebp-2740h]
int CpuCount; // [esp+20h] [ebp-2740h]
int n26; // [esp+20h] [eb... [9832 chars total]
// Function: KtiFunc9791 @ 0xffcb9791 (0x1f3 bytes)
// Index: 1549/2560
char __usercall KtiFunc9791@<al>(int n6@<ebx>, unsigned __int8 *__return_address, int n6a)
{
unsigned __int8 *__return_address_1; // esi
int SocketInfo; // eax
unsigned __int8 n6_2; // bl
unsigned __int8 *v6; // edi
unsigned __int8 n2_1; // cl
int v8; // esi
int v9; // eax
int v10; // eax
int n6_1; // [esp+10h] [ebp-24h]
int n2; // [esp+14h] [ebp-20h]
int v14; // [esp+18h] [ebp-1Ch]
_BYTE *SocketInfo_1; // [esp+1Ch] [ebp-18h]
int CpuCount; // [esp+20h] [ebp-14h]
int v17; // [esp+20h] [ebp-14h]
unsigned __int8 n4; // [esp+24h] [ebp-10h]
int v19[3]; // [esp+28h] [ebp-Ch] BYREF
__return_address_1 = __return_address; /*0xffcb979b*/
SocketInfo = GetSocketInfo((int)__return_address, n6a); /*0xffcb97a2*/
n6_2 = 0; /*0xffcb97a8*/
LOBYTE(n6_1) = 0; /*0xffcb97ab*/
v6 = (unsigned __int8 *)(SocketInfo + 6); /*0xffcb97af*/
do /*0xffcb9976*/
{
if ( *(v6 - 6) ) /*0xffcb97b2*/
{
CpuCount = GetCpuCount((int)__return_address_1, n6a, n6_1); /*0xffcb97c7*/
LOBYTE(SocketInfo) = ProcCommonFunc5088((int)__return_address_1, n6a, n6_1, v19); /*0xffcb97d6*/
if ( (_BYTE)SocketInfo ) /*0xffcb97e0*/
{
DebugPrint((int)__return_address_1, 10, n6a, n6_1, 255, 255, 255, 255, "Setting cmd timing to %d\n", *v6); /*0xffcb9800*/
if ( *v6 ) /*0xffcb9805*/
{
if ( *v6 == 2 ) /*0xffcb9814*/
{
LOBYTE(n6) = (v6[1] == 2) - 1; /*0xffcb9821*/
n6 &= 0xFFFFFF02; /*0xffcb9823*/
}
else
{
LOBYTE(n6) = 0; /*0xffcb9816*/
}
}
else
{
LOBYTE(n6) = v6[1] != 2; /*0xffcb982f*/
n6 = 2 * n6 + 2; /*0xffcb9832*/
}
n2_1 = 0; /*0xffcb983d*/
SocketInfo = CpuCount + 19; /*0xffcb983f*/
LOBYTE(n2) = 0; /*0xffcb9842*/
SocketInfo_1 = (_BYTE *)(CpuCount + 19); /*0xffcb9846*/
do /*0xffcb995d*/
{
if ( *(_BYTE *)(SocketInfo - 19) ) /*0xffcb984a*/
{
v17 = KtiFunc91AF((int)__return_address_1, n6a, n6_1, n2); /*0xffcb9863*/
SocketInfo = (int)SocketInfo_1; /*0xffcb986a*/
LOBYTE(v14) = 0; /*0xffcb986e*/
if ( *SocketInfo_1 ) /*0xffcb9873*/
{
do /*0xffcb9941*/
{
if ( !KtiFunc89E9((int)__return_address_1, n6a, n6_1, n2, v14, 0) ) /*0xffcb988c*/
{
n4 = KtiFunc88D1((int)__return_address_1, n6a, n6_1, n2, v14); /*0xffcb98b3*/
v8 = 242 * (unsigned __int8)v14; /*0xffcb98bc*/
v9 = 7 * *(unsigned __int8 *)(v8 + v17 + 1); /*0xffcb98c7*/
v6[v9 + 3150] -= n6; /*0xffcb98ca*/
DebugPrint( /*0xffcb9901*/
(int)__return_address,
10,
n6a,
n6_1,
n2,
v14,
255,
255,
"Setting RTL to %d\n",
v6[7 * *(unsigned __int8 *)(v8 + v17 + 1) + 3150]);
v10 = *(unsigned __int8 *)(v8 + v17 + 1); /*0xffcb990a*/
__return_address_1 = __return_address; /*0xffcb990f*/
MailBoxFunc49CA(__return_address, n6a, n6_1, n4, v6[7 * v10 + 3150]); /*0xffcb9929*/
}
SocketInfo = (int)SocketInfo_1; /*0xffcb9935*/
LOBYTE(v14) = v14 + 1; /*0xffcb993b*/
}
while ( (unsigned __int8)v14 < *SocketInfo_1 ); /*0xffcb9941*/
}
n2_1 = n2; /*0xffcb9947*/
}
++n2_1; /*0xffcb994b*/
SocketInfo += 1379; /*0xffcb994d*/
LOBYTE(n2) = n2_1; /*0xffcb9952*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcb9956*/
}
while ( n2_1 < 2u ); /*0xffcb995d*/
n6_2 = n6_1; /*0xffcb9963*/
}
}
++n6_2; /*0xffcb9967*/
v6 += 7688; /*0xffcb9969*/
LOBYTE(n6_1) = n6_2; /*0xffcb996f*/
}
while ( n6_2 < 6u ); /*0xffcb9976*/
return SocketInfo; /*0xffcb997c*/
}
// Function: KtiFunc9984 @ 0xffcb9984 (0x23 bytes)
// Index: 1550/2560
__int16 __cdecl KtiFunc9984(__int16 a1, __int16 a2, __int16 *a3, __int16 *a4)
{
__int16 result; // ax
if ( a1 > *a3 ) /*0xffcb9990*/
*a3 = a1; /*0xffcb9992*/
result = a2; /*0xffcb9999*/
if ( a2 < *a4 ) /*0xffcb99a1*/
*a4 = a2; /*0xffcb99a3*/
return result; /*0xffcb99a6*/
}
// Function: KtiFunc99A7 @ 0xffcb99a7 (0x1e bytes)
// Index: 1551/2560
__int16 __cdecl KtiFunc99A7(__int16 a1, __int16 *a2, __int16 *a3)
{
__int16 result; // ax
result = a1; /*0xffcb99ab*/
if ( a1 < *a2 ) /*0xffcb99b3*/
*a2 = a1; /*0xffcb99b5*/
if ( a1 > *a3 ) /*0xffcb99bf*/
*a3 = a1; /*0xffcb99c1*/
return result; /*0xffcb99c4*/
}
// Function: KtiFunc99C5 @ 0xffcb99c5 (0x21b bytes)
// Index: 1552/2560
int __cdecl KtiFunc99C5(
unsigned __int8 *__return_address,
unsigned __int8 n6,
unsigned __int8 n6_1,
unsigned __int8 n2,
int n51)
{
int CpuCount; // edi
unsigned __int8 n12; // bl
int v8; // ebp
int SocketInfo_1; // ecx
int n51a_1; // eax
int SocketInfo; // [esp+10h] [ebp-4h]
int n51a; // [esp+28h] [ebp+14h]
SocketInfo = GetSocketInfo((int)__return_address, n6); /*0xffcb99dc*/
CpuCount = GetCpuCount((int)__return_address, n6, n6_1); /*0xffcb99f8*/
n12 = 12; /*0xffcb99fe*/
if ( !__return_address[257313] || *(_BYTE *)(1379 * n2 + CpuCount + 107) ) /*0xffcb9a0b*/
{
switch ( n51 ) /*0xffcb9a21*/
{
case 24: /*0xffcb9a21*/
case 25: /*0xffcb9a21*/
case 28: /*0xffcb9a21*/
case 29: /*0xffcb9a21*/
case 34: /*0xffcb9a21*/
case 35: /*0xffcb9a21*/
case 36: /*0xffcb9a21*/
case 37: /*0xffcb9a21*/
case 40: /*0xffcb9a21*/
case 41: /*0xffcb9a21*/
case 42: /*0xffcb9a21*/
case 43: /*0xffcb9a21*/
n12 = 26; /*0xffcb9a28*/
break; /*0xffcb9a28*/
default:
break;
}
}
v8 = 1379 * n2; /*0xffcb9a2a*/
if ( *(_BYTE *)(CpuCount + v8 + 107) /*0xffcb9a54*/
&& n51 >= 26
&& (n51 <= 27 || n51 > 29 && (n51 <= 31 || (unsigned int)(n51 - 51) <= 2)) )
{
n12 = 12; /*0xffcb9a56*/
}
if ( !ProcCommonFunc24FA((int)__return_address, n6, n6_1, n2) && *(_BYTE *)(CpuCount + v8 + 19) != 4 ) /*0xffcb9a76*/
{
SocketInfo_1 = SocketInfo; /*0xffcb9ad4*/
goto LABEL_27; /*0xffcb9ad4*/
}
SocketInfo_1 = SocketInfo; /*0xffcb9a7d*/
if ( !*(_BYTE *)(CpuCount + v8 + 107) && *(_BYTE *)(7688 * n6_1 + SocketInfo + 6262) != 2 && n51 >= 26 )
{
if ( n51 <= 27 ) /*0xffcb9aa2*/
goto LABEL_25; /*0xffcb9aa2*/
if ( n51 > 29 )
{
if ( n51 <= 31 ) /*0xffcb9aac*/
{
n12 = 26; /*0xffcb9ac1*/
goto LABEL_27; /*0xffcb9ac3*/
}
if ( n51 > 50 )
{
if ( n51 > 52 ) /*0xffcb9ab6*/
{
if ( n51 == 53 ) /*0xffcb9abb*/
n12 = 0; /*0xffcb9abd*/
goto LABEL_27; /*0xffcb9abf*/
}
LABEL_25:
n12 = *(_BYTE *)(CpuCount + v8 + 19) == 2 ? 0 : 0x1A;
}
}
}
LABEL_27:
n51a_1 = 7688 * n6_1; /*0xffcb9ad8*/
n51a = n51a_1; /*0xffcb9ae5*/
if ( *(_BYTE *)(n51a_1 + SocketInfo_1 + 6262) == 2 && !*(_BYTE *)(CpuCount + v8 + 107) ) /*0xffcb9af3*/
{
if ( (n51 == 52 || n51 == 27 || n51 == 31) && *(_BYTE *)(n51a_1 + SocketInfo_1 + 3) == 1 ) /*0xffcb9b0e*/
n12 &= -((*(_BYTE *)(CpuCount + v8 + 125) & 2) != 0); /*0xffcb9b1a*/
if ( (n51 == 52 || n51 == 27 || n51 == 31) /*0xffcb9b3a*/
&& *(_BYTE *)(n51a_1 + SocketInfo_1 + 3) == 2
&& (*(_BYTE *)(CpuCount + 125) & 2) == 0 )
{
n12 &= -((*(_BYTE *)(CpuCount + 1504) & 2) != 0); /*0xffcb9b48*/
}
if ( n51 == 53 ) /*0xffcb9b4d*/
n12 &= -((*(_BYTE *)(CpuCount + v8 + 125) & 4) != 0); /*0xffcb9b59*/
}
if ( !ProcCommonFunc24FA((int)__return_address, n6, n6_1, n2) /*0xffcb9bb0*/
&& !*(_BYTE *)(CpuCount + v8 + 107)
&& *(_BYTE *)(n51a + SocketInfo + 6262) != 2
&& *(_BYTE *)(CpuCount + v8 + 19) < 4u
&& n51 >= 26
&& (n51 <= 27 || n51 > 29 && (n51 <= 31 || (unsigned int)(n51 - 51) <= 2)) )
{
n12 = 0; /*0xffcb9bb2*/
}
if ( n51 == 23 ) /*0xffcb9bb7*/
n12 &= -KtiFunc9BFD(__return_address, n6, n6_1, n2); /*0xffcb9bd5*/
return n12; /*0xffcb9bd7*/
}
// Function: KtiFunc9BFD @ 0xffcb9bfd (0x69 bytes)
// Index: 1553/2560
bool __cdecl KtiFunc9BFD(unsigned __int8 *__return_address, unsigned __int8 n6, unsigned __int8 a3, unsigned __int8 n2)
{
char v4; // bl
int CpuCount; // esi
_BYTE *v6; // ecx
int n2_1; // edx
bool result; // al
int v9; // eax
v4 = 0; /*0xffcb9c05*/
CpuCount = GetCpuCount((int)__return_address, n6, a3); /*0xffcb9c15*/
GetSocketInfo((int)__return_address, n6); /*0xffcb9c1a*/
v6 = (_BYTE *)(CpuCount + 104); /*0xffcb9c22*/
n2_1 = 2; /*0xffcb9c27*/
do /*0xffcb9c3e*/
{
if ( v6[14] == 6 && *v6 ) /*0xffcb9c2e*/
v4 = 1; /*0xffcb9c33*/
v6 += 1379; /*0xffcb9c35*/
--n2_1; /*0xffcb9c3b*/
}
while ( n2_1 ); /*0xffcb9c3e*/
result = 1; /*0xffcb9c44*/
if ( !v4 ) /*0xffcb9c42*/
{
v9 = 1379 * n2; /*0xffcb9c4c*/
if ( *(_BYTE *)(v9 + CpuCount + 107) != 1 || !*(_BYTE *)(v9 + CpuCount + 104) ) /*0xffcb9c59*/
return 0; /*0xffcb9c42*/
}
return result; /*0xffcb9c62*/
}
// Function: KtiFunc9C66 @ 0xffcb9c66 (0x41 bytes)
// Index: 1554/2560
bool __cdecl KtiFunc9C66(int n6, unsigned __int8 n4, char a3, unsigned __int8 n2)
{
int CpuCount; // eax
int v5; // ecx
CpuCount = GetCpuCount(n6, n4, a3); /*0xffcb9c72*/
v5 = 1379 * n2; /*0xffcb9c7f*/
return *(_BYTE *)(v5 + CpuCount + 118) == 6 && *(_BYTE *)(v5 + CpuCount + 104) /*0xffcb9c95*/
|| *(_BYTE *)(v5 + CpuCount + 107) == 1 && *(_BYTE *)(v5 + CpuCount + 104);
}
// Function: KtiFunc9CA7 @ 0xffcb9ca7 (0x2e bytes)
// Index: 1555/2560
bool __cdecl KtiFunc9CA7(unsigned __int8 *__return_address, unsigned __int8 n4, char n6, unsigned __int8 a4)
{
GetCpuCount((int)__return_address, n4, n6); /*0xffcb9cb3*/
return KtiFunc9C66((int)__return_address, n4, n6, a4 >> 2); /*0xffcb9cd3*/
}
// Function: KtiFunc9CD5 @ 0xffcb9cd5 (0x375 bytes)
// Index: 1556/2560
int __cdecl KtiFunc9CD5(unsigned __int8 *__return_address, int n6, char a3)
{
unsigned __int8 n6b_1; // bh
_BYTE *SocketInfo_1; // ebp
int n0x12_1; // eax
int CpuCount; // eax
unsigned __int8 v7; // bl
unsigned __int8 v8; // dl
int n63_1; // ecx
unsigned __int8 n4; // bl
unsigned __int8 n6a_1; // bl
unsigned __int8 *v12; // ebp
int SocketInfo_2; // eax
unsigned __int8 v14; // bh
int v15; // edx
__int16 v16; // cx
__int16 v17; // ax
int v18; // eax
unsigned __int8 n4_1; // bl
unsigned __int8 n8; // bl
_BYTE *n6a; // [esp+10h] [ebp-30h]
unsigned __int8 n6b; // [esp+10h] [ebp-30h]
int n2; // [esp+14h] [ebp-2Ch]
unsigned __int8 n2a; // [esp+14h] [ebp-2Ch]
int n4_2; // [esp+18h] [ebp-28h]
unsigned __int8 v27; // [esp+18h] [ebp-28h]
unsigned __int8 n63; // [esp+1Ch] [ebp-24h]
int n0x12; // [esp+20h] [ebp-20h]
int p_n64; // [esp+24h] [ebp-1Ch] BYREF
unsigned __int16 p_n60[2]; // [esp+28h] [ebp-18h] BYREF
__int16 v32[2]; // [esp+2Ch] [ebp-14h] BYREF
unsigned __int16 v33[2]; // [esp+30h] [ebp-10h] BYREF
unsigned __int16 v34[2]; // [esp+34h] [ebp-Ch] BYREF
int CpuCount_1; // [esp+38h] [ebp-8h]
int SocketInfo; // [esp+3Ch] [ebp-4h]
*(_DWORD *)v33 = 0; /*0xffcb9cd8*/
*(_DWORD *)v34 = 255; /*0xffcb9cee*/
n63 = 0; /*0xffcb9cf6*/
n6b_1 = 0; /*0xffcb9cff*/
SocketInfo = GetSocketInfo((int)__return_address, n6); /*0xffcb9d01*/
n0x12 = 0; /*0xffcb9d05*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcb9d0a*/
n0x12_1 = 0; /*0xffcb9d0c*/
n6b = 0; /*0xffcb9d12*/
do /*0xffcb9d75*/
{
if ( !*SocketInfo_1 ) /*0xffcb9d1a*/
goto LABEL_7; /*0xffcb9d1a*/
CpuCount = GetCpuCount((int)__return_address, n6, n6b); /*0xffcb9d22*/
v7 = SocketInfo_1[3]; /*0xffcb9d27*/
v8 = 0; /*0xffcb9d2a*/
CpuCount_1 = CpuCount; /*0xffcb9d2f*/
n2a = 0; /*0xffcb9d33*/
if ( !v7 ) /*0xffcb9d39*/
{
LABEL_6:
n0x12_1 = n0x12; /*0xffcb9d59*/
LABEL_7:
LOBYTE(n63_1) = n63; /*0xffcb9d5d*/
goto LABEL_8; /*0xffcb9d5d*/
}
while ( *(_BYTE *)(1379 * v8 + CpuCount_1 + 107) ) /*0xffcb9d4d*/
{
n2a = ++v8; /*0xffcb9d51*/
if ( v8 >= v7 ) /*0xffcb9d57*/
goto LABEL_6; /*0xffcb9d57*/
}
n4 = 0; /*0xffcb9da8*/
v27 = 0; /*0xffcb9daa*/
do /*0xffcb9dcf*/
{
KtiFunc89E9((int)__return_address, n6, n6b, n2a, v27, 0); /*0xffcb9dbe*/
v27 = ++n4; /*0xffcb9dc8*/
}
while ( n4 < 4u ); /*0xffcb9dcf*/
n0x12_1 = n0x12; /*0xffcb9dd5*/
n63_1 = n63 | (1 << n0x12); /*0xffcb9ddc*/
n63 = n63_1; /*0xffcb9ddf*/
LABEL_8:
++n6b_1; /*0xffcb9d61*/
SocketInfo_1 += 7688; /*0xffcb9d63*/
++n0x12_1; /*0xffcb9d69*/
n6b = n6b_1; /*0xffcb9d6a*/
n0x12 = n0x12_1; /*0xffcb9d6e*/
}
while ( n6b_1 < 6u ); /*0xffcb9d75*/
if ( (_BYTE)n63_1 )
{
DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcb9d92*/
if ( a3 == -1 )
DebugPrint(
(int)__return_address,
2,
n6,
255,
255,
255,
255,
255,
"DENORMALIZE: Push out backside Cmd, Ctl, Clk by trained value, to maintain Cmd - Clk = trained value \n");
else
DebugPrint(
(int)__return_address,
2,
n6,
255,
255,
255,
255,
255,
"RENORMALIZE: Pull in backside Cmd, Ctl, Clk by trained value, to maintain Cmd - Clk = trained value\n");
n6a_1 = 0; /*0xffcb9dff*/
LOBYTE(n6a) = 0; /*0xffcb9e04*/
v12 = (unsigned __int8 *)(SocketInfo + 3); /*0xffcb9e08*/
while ( 2 ) /*0xffcb9e0b*/
{
if ( *(v12 - 3) ) /*0xffcb9e0b*/
{
SocketInfo_2 = GetCpuCount((int)__return_address, n6, (unsigned __int8)n6a); /*0xffcb9e1b*/
v14 = 0; /*0xffcb9e20*/
SocketInfo = SocketInfo_2; /*0xffcb9e22*/
LOBYTE(n2) = 0; /*0xffcb9e29*/
if ( *v12 ) /*0xffcb9e2d*/
{
while ( 2 ) /*0xffcb9e36*/
{
v15 = 1379 * v14; /*0xffcb9e36*/
if ( !*(_BYTE *)(v15 + SocketInfo_2 + 107) ) /*0xffcb9e3f*/
{
v16 = *(_WORD *)(v15 + SocketInfo_2 + 1255); /*0xffcb9e4a*/
if ( v16 >= 0 ) /*0xffcb9e55*/
{
if ( a3 == -1 ) /*0xffcb9e9a*/
{
*(_DWORD *)v32 = 31; /*0xffcb9ea1*/
*(_DWORD *)p_n60 = 62; /*0xffcb9ea7*/
p_n64 = (unsigned __int16)(31 - v16); /*0xffcb9eb2*/
}
else
{
p_n64 = 0; /*0xffcb9eb8*/
v18 = *(unsigned __int16 *)(v15 + SocketInfo_2 + 1255); /*0xffcb9ebd*/
*(_DWORD *)p_n60 = -62; /*0xffcb9ec5*/
LABEL_27:
*(_DWORD *)v32 = v18; /*0xffcb9ecd*/
}
}
else
{
if ( a3 == -1 ) /*0xffcb9e5c*/
{
p_n64 = 31; /*0xffcb9e61*/
v17 = *(_WORD *)(v15 + SocketInfo_2 + 1255); /*0xffcb9e65*/
*(_DWORD *)p_n60 = 62; /*0xffcb9e70*/
v18 = (unsigned __int16)(v17 + 31); /*0xffcb9e78*/
goto LABEL_27; /*0xffcb9e7b*/
}
*(_DWORD *)p_n60 = -62; /*0xffcb9e7f*/
*(_DWORD *)v32 = 0; /*0xffcb9e87*/
p_n64 = (unsigned __int16)-v16; /*0xffcb9e8f*/
}
KtiFuncB990(__return_address, n6, (int)n6a, n2, 1, 0, 24, (__int16 *)&p_n64); /*0xffcb9ee6*/
KtiFuncBF1D(__return_address, n6, (int)n6a, n2, 1, 44, 24, (__int16 *)&p_n64, v34, v33); /*0xffcb9f0a*/
KtiFuncBB42(__return_address, n6, (int)n6a, n2, 1, 40, 24, v32, v34, v33); /*0xffcb9f31*/
n4_1 = 0; /*0xffcb9f39*/
LOBYTE(n4_2) = 0; /*0xffcb9f3b*/
do /*0xffcb9fd7*/
{
if ( !KtiFunc89E9((int)__return_address, n6, (char)n6a, n2, n4_2, 0) ) /*0xffcb9f4f*/
{
n8 = 0; /*0xffcb9f5b*/
LOBYTE(n0x12) = 0; /*0xffcb9f5d*/
do /*0xffcb9fc8*/
{
if ( __return_address[257312] || n8 != 8 && n8 != 17 ) /*0xffcb9f72*/
{
MrcMarginGroupTrain(__return_address, n6, n6a, n2, n4_2, n0x12, 0, 0, 21, 28, p_n60); /*0xffcb9f93*/
MrcMarginGroupTrain(__return_address, n6, n6a, n2, n4_2, n0x12, 0, 0, 22, 28, p_n60); /*0xffcb9fb7*/
}
LOBYTE(n0x12) = ++n8; /*0xffcb9fc1*/
}
while ( n8 < 0x12u ); /*0xffcb9fc8*/
n4_1 = n4_2; /*0xffcb9fca*/
}
LOBYTE(n4_2) = ++n4_1; /*0xffcb9fd0*/
}
while ( n4_1 < 4u ); /*0xffcb9fd7*/
SocketInfo_2 = SocketInfo; /*0xffcb9fdd*/
}
LOBYTE(n2) = ++v14; /*0xffcb9fe3*/
if ( v14 >= *v12 ) /*0xffcb9fea*/
{
n6a_1 = (unsigned __int8)n6a; /*0xffcb9ff0*/
break; /*0xffcb9ff0*/
}
continue; /*0xffcb9fea*/
}
}
}
++n6a_1; /*0xffcb9ff4*/
v12 += 7688; /*0xffcb9ff6*/
LOBYTE(n6a) = n6a_1; /*0xffcb9ffc*/
if ( n6a_1 < 6u ) /*0xffcba003*/
continue; /*0xffcba003*/
break;
}
MailBoxFunc2B5B((int)__return_address, n6); /*0xffcba00b*/
KtiFuncD59F(__return_address, n6, n63); /*0xffcba01a*/
DebugPrint((int)__return_address, 2, n6, 255, 255, 255, 255, 255, aReRunReceiveEn); /*0xffcba032*/
IioMmioAccessInit((int)__return_address); /*0xffcba038*/
}
return 0; /*0xffcba040*/
}
// Function: KtiFuncA04A @ 0xffcba04a (0x5 bytes)
// Index: 1557/2560
// attributes: thunk
char __cdecl KtiFuncA04A(_BYTE *__return_address, int n9, unsigned int *p_n4)
{
return MailBoxFunc9805(__return_address, n9, p_n4);
}
// Function: KtiFuncA04F @ 0xffcba04f (0x3e bytes)
// Index: 1558/2560
BOOL __cdecl KtiFuncA04F(char a1, __int16 a2, _BYTE *a3)
{
char v3; // dl
int n9; // ecx
v3 = 0; /*0xffcba053*/
n9 = 0; /*0xffcba05a*/
while ( word_FFD5BC6E[2 * n9] != (a2 & 0x2E00) ) /*0xffcba064*/
{
if ( (unsigned int)++n9 >= 9 ) /*0xffcba06a*/
goto LABEL_6; /*0xffcba06a*/
}
v3 = word_FFD5BC6C[2 * n9]; /*0xffcba06e*/
LABEL_6:
if ( a1 ) /*0xffcba07e*/
v3 *= 2; /*0xffcba080*/
*a3 = v3; /*0xffcba082*/
return n9 == 9; /*0xffcba08c*/
}
// Function: KtiDiscConfig @ 0xffcba08d (0xae0 bytes)
// Index: 1559/2560
char __cdecl KtiDiscConfig(unsigned __int8 *n6, int n2, int n6_1, int n2a, int a5)
{
int v6; // edx
unsigned __int8 *n6a_1; // eax
int n2_1; // esi
unsigned __int8 n16; // al
unsigned __int8 n6_2; // al
unsigned __int16 n1241; // ax
int v12; // esi
char v13; // bl
int n6_3; // ebx
char v15; // al
int n2a_1; // esi
unsigned __int8 *n6a_2; // eax
unsigned __int8 v18; // dl
int v19; // ecx
int v20; // eax
int n2_3; // eax
char n6a_3; // al
unsigned __int8 v23; // [esp-34h] [ebp-60h]
int v24; // [esp+10h] [ebp-1Ch]
int v25; // [esp+14h] [ebp-18h]
unsigned __int8 n2_2; // [esp+18h] [ebp-14h]
unsigned __int8 v27[4]; // [esp+18h] [ebp-14h]
unsigned __int8 n14; // [esp+1Ch] [ebp-10h]
unsigned __int8 i; // [esp+20h] [ebp-Ch]
unsigned __int8 v30[4]; // [esp+20h] [ebp-Ch]
unsigned __int8 v31; // [esp+20h] [ebp-Ch]
int v32; // [esp+24h] [ebp-8h]
int SocketInfo; // [esp+28h] [ebp-4h]
unsigned __int8 *n6a; // [esp+30h] [ebp+4h]
n14 = 14; /... [12186 chars total]
// Function: KtiFn_FFCBAB6D @ 0xffcbab6d (0x308 bytes)
// Index: 1560/2560
char __cdecl KtiFn_FFCBAB6D(_BYTE *n6, _BYTE **n2, _BYTE *n6_2)
{
char v3; // bl
int v4; // esi
_BYTE *n6_1; // edi
int n2_7; // eax
int CpuCount; // eax
_BYTE **n2_1; // ebp
int CpuCount_1; // edx
unsigned __int8 n2_3; // al
unsigned __int8 *v11; // ecx
_BYTE **p_n6_1; // edx
_BYTE *n6_3; // esi
unsigned int v14; // eax
_BYTE *CpuCount_3; // edx
_BYTE **p_n6_2; // ecx
char n2_5; // al
__int16 p_n6_4; // ax
char n2_4; // ah
_BYTE *CpuCount_5; // ecx
unsigned __int8 n2_6; // al
unsigned int v22; // eax
_BYTE *CpuCount_7; // edx
_BYTE **p_n6_5; // ecx
_BYTE *n6_4; // ebx
int n2_2; // [esp+14h] [ebp-28h]
char n2_8; // [esp+14h] [ebp-28h]
_BYTE *p_n6_3; // [esp+18h] [ebp-24h]
_BYTE *CpuCount_2; // [esp+1Ch] [ebp-20h]
unsigned __int8 *v31; // [esp+20h] [ebp-1Ch]
_BYTE *CpuCount_4; // [esp+20h] [ebp-1Ch]
_BYTE *CpuCount_6; // [esp+20h] [ebp-1Ch]
unsigned int v34; // [esp+24h] [ebp-18h]
int p_n6; // [esp+28h] [ebp-14h] BYREF
__int64 v36; // [esp+2Ch] [ebp-10h] BYREF
__int64 v37; // [esp+34h] [ebp-8h] BYREF
v3 = 0; /*0xffcbab7c*/
v4 = 48704 * (unsigned __int8)n2; /*0xffcbab7f*/
n6_1 = n6; /*0xffcbab8f*/
v34 = 0; /*0xffcbab93*/
n2_7 = v4 + 7688 * (unsigned __int8)n6_2; /*0xffcbab97*/
if ( !n6[n2_7 + 265395] || n6[n2_7 + 265396] || n6[v4 + 258705] ) /*0xffcbabb3*/
return n2_7; /*0xffcbabba*/
CpuCount = GetCpuCount((int)n6, (unsigned __int8)n2, (unsigned __int8)n6_2); /*0xffcbabc4*/
n2_1 = n2; /*0xffcbabc9*/
CpuCount_1 = CpuCount; /*0xffcbabd1*/
p_n6 = (int)&n6; /*0xffcbabd3*/
n2_3 = 0; /*0xffcbabd7*/
CpuCount_2 = (_BYTE *)CpuCount_1; /*0xffcbabd9*/
LOBYTE(n2_2) = 0; /*0xffcbabe0*/
v11 = (unsigned __int8 *)(CpuCount_1 + 20); /*0xffcbabe4*/
v31 = (unsigned __int8 *)(CpuCount_1 + 20); /*0xffcbabe7*/
p_n6_1 = &n6; /*0xffcbabeb*/
do /*0xffcbac6e*/
{
n6_3 = n6_2; /*0xffcbabef*/
if ( *(v11 - 20) ) /*0xffcbabf3*/
{
RmtFunc93F((int)n6_1, (int)n2_1, (int)n6_2, n2_2, 0, 0, 2u, 3u); /*0xffcbac05*/
RmtFunc93F((int)n6_1, (int)n2_1, (int)n6_3, n2_2, 0, 1u, 2u, 3u); /*0xffcbac18*/
RmtFunc93F((int)n6_1, (int)n2_1, (int)n6_3, n2_2, 0, 2u, 0, 0xCu); /*0xffcbac2d*/
v11 = v31; /*0xffcbac32*/
p_n6_1 = (_BYTE **)p_n6; /*0xffcbac39*/
v14 = 10000 * *v31; /*0xffcbac40*/
*(_BYTE *)p_n6 = 1; /*0xffcbac46*/
if ( v34 < v14 ) /*0xffcbac4d*/
v34 = v14; /*0xffcbac4f*/
n2_3 = n2_2; /*0xffcbac53*/
}
++n2_3; /*0xffcbac57*/
v11 += 1379; /*0xffcbac59*/
p_n6_1 = (_BYTE **)((char *)p_n6_1 + 1); /*0xffcbac5f*/
LOBYTE(n2_2) = n2_3; /*0xffcbac60*/
p_n6 = (int)p_n6_1; /*0xffcbac64*/
v31 = v11; /*0xffcbac68*/
}
while ( n2_3 < 2u ); /*0xffcbac6e*/
KtiFuncF4E(&v37); /*0xffcbac79*/
do /*0xffcbada2*/
{
CpuCount_3 = CpuCount_2; /*0xffcbac7f*/
p_n6_2 = &n6; /*0xffcbac83*/
p_n6_3 = &n6; /*0xffcbac89*/
n2_5 = 0; /*0xffcbac8d*/
LOBYTE(n2) = 1; /*0xffcbac8f*/
n2_8 = 0; /*0xffcbac93*/
CpuCount_4 = CpuCount_2; /*0xffcbac97*/
do /*0xffcbad20*/
{
if ( *CpuCount_3 ) /*0xffcbac9b*/
{
if ( KtiFuncF64B(n6_1, (int)n2_1, (int)n6_3, n2_8, 0x18u, &p_n6) ) /*0xffcbacad*/
{
p_n6_2 = (_BYTE **)p_n6_3; /*0xffcbacf9*/
CpuCount_3 = CpuCount_4; /*0xffcbacfd*/
}
else
{
p_n6_4 = p_n6; /*0xffcbacc0*/
if ( (n6_1[246408] & 7) != 0 ) /*0xffcbacc4*/
{
p_n6_4 = p_n6 | 0x4000; /*0xffcbacc6*/
p_n6 |= 0x4000u; /*0xffcbaccb*/
}
p_n6_2 = (_BYTE **)p_n6_3; /*0xffcbaccf*/
CpuCount_3 = CpuCount_4; /*0xffcbacd3*/
if ( (p_n6_4 & 0x4000) == 0 ) /*0xffcbacdc*/
{
n2_5 = n2_8; /*0xffcbacde*/
n2_4 = 0; /*0xffcbace2*/
LOBYTE(n2) = 0; /*0xffcbace4*/
goto LABEL_23; /*0xffcbace8*/
}
if ( (p_n6_4 & 0x2000) == 0 ) /*0xffcbacef*/
*p_n6_3 = 0; /*0xffcbacf5*/
}
n2_5 = n2_8; /*0xffcbad01*/
}
n2_4 = (char)n2; /*0xffcbad05*/
LABEL_23:
++n2_5; /*0xffcbad09*/
CpuCount_3 += 1379; /*0xffcbad0b*/
p_n6_2 = (_BYTE **)((char *)p_n6_2 + 1); /*0xffcbad11*/
n2_8 = n2_5; /*0xffcbad12*/
CpuCount_4 = CpuCount_3; /*0xffcbad16*/
p_n6_3 = p_n6_2; /*0xffcbad1a*/
}
while ( (unsigned __int8)n2_5 < 2u ); /*0xffcbad20*/
if ( n2_4 ) /*0xffcbad28*/
{
CpuCount_5 = CpuCount_2; /*0xffcbad2a*/
n2_6 = 0; /*0xffcbad2e*/
LOBYTE(n2_2) = 0; /*0xffcbad30*/
CpuCount_6 = CpuCount_2; /*0xffcbad34*/
do /*0xffcbad6a*/
{
if ( *CpuCount_5 ) /*0xffcbad38*/
{
RmtFunc93F((int)n6_1, (int)n2_1, (int)n6_3, n2_2, 0, 0, 0, 0xCu); /*0xffcbad48*/
n2_6 = n2_2; /*0xffcbad4d*/
CpuCount_5 = CpuCount_6; /*0xffcbad54*/
}
++n2_6; /*0xffcbad58*/
CpuCount_5 += 1379; /*0xffcbad5a*/
LOBYTE(n2_2) = n2_6; /*0xffcbad60*/
CpuCount_6 = CpuCount_5; /*0xffcbad64*/
}
while ( n2_6 < 2u ); /*0xffcbad6a*/
}
KtiFuncF4E(&v36); /*0xffcbad71*/
v22 = KtiFuncF75((int)n6_1, v37, SHIDWORD(v37), v36, SHIDWORD(v36), 0x3E8u); /*0xffcbad8e*/
}
while ( !(_BYTE)n2 && v22 < v34 ); /*0xffcbada2*/
if ( v22 >= v34 ) /*0xffcbadb0*/
DebugPrint((int)n6_1, 2, (int)n2_1, (int)n6_2, 255, 255, 255, 255, "LRDIMM training timeout after %d msec\n", v22); /*0xffcbadca*/
else
DebugPrint((int)n6_1, 2, (int)n2_1, (int)n6_2, 255, 255, 255, 255, "LRDIMM training completed in %d msec\n", v22); /*0xffcbadb7*/
CpuCount_7 = CpuCount_2; /*0xffcbadcf*/
p_n6_5 = &n6; /*0xffcbadd3*/
LOBYTE(n2_7) = 0; /*0xffcbadd7*/
n2 = &n6; /*0xffcbadd9*/
LOBYTE(n2_2) = 0; /*0xffcbade0*/
do /*0xffcbae4a*/
{
if ( *CpuCount_7 ) /*0xffcbade4*/
{
if ( *(_BYTE *)p_n6_5 ) /*0xffcbade9*/
{
DebugPrint((int)n6_1, 3, (int)n2_1, (int)n6_2, n2_2, 255, 255, 255, "Failed DDR3 LRDIMM MB to DRAM training\n"); /*0xffcbae02*/
v3 = 1; /*0xffcbae07*/
}
else
{
DebugPrint((int)n6_1, 2, (int)n2_1, (int)n6_2, n2_2, 255, 255, 255, "Passed DDR3 LRDIMM MB to DRAM training\n"); /*0xffcbae1f*/
}
CpuCount_7 = CpuCount_2; /*0xffcbae24*/
p_n6_5 = n2; /*0xffcbae2b*/
LOBYTE(n2_7) = n2_2; /*0xffcbae2f*/
}
LOBYTE(n2_7) = n2_7 + 1; /*0xffcbae33*/
CpuCount_7 += 1379; /*0xffcbae35*/
p_n6_5 = (_BYTE **)((char *)p_n6_5 + 1); /*0xffcbae3b*/
LOBYTE(n2_2) = n2_7; /*0xffcbae3c*/
CpuCount_2 = CpuCount_7; /*0xffcbae40*/
n2 = p_n6_5; /*0xffcbae44*/
}
while ( (unsigned __int8)n2_7 < 2u ); /*0xffcbae4a*/
if ( v3 ) /*0xffcbae4e*/
{
n6_4 = n6_2; /*0xffcbae50*/
KtiFunc8A8E(n6_1, (int)n2_1, (int)n6_2); /*0xffcbae57*/
LOBYTE(n2_7) = KtiFunc211E((int)n6_1, 49, 36, (int)n2_1, (int)n6_4, 255, 255); /*0xffcbae65*/
}
return n2_7; /*0xffcbae6e*/
}
// Function: KtiFn_FFCBAE75 @ 0xffcbae75 (0x242 bytes)
// Index: 1561/2560
char __cdecl KtiFn_FFCBAE75(_BYTE *n6, int n2, _BYTE *n6a, _BYTE *n2_1, int n2a)
{
int CpuCount; // ebp
char n2_4; // al
_BYTE *n2_2; // ecx
char n2_3; // al
int n2a_1; // ebp
char n5; // al
unsigned __int8 n8; // al
int v13; // [esp+10h] [ebp-8h]
int v14; // [esp+10h] [ebp-8h]
int SocketInfo; // [esp+14h] [ebp-4h]
_BYTE *n6b; // [esp+1Ch] [ebp+4h]
unsigned __int8 n6c; // [esp+1Ch] [ebp+4h]
CpuCount = GetCpuCount((int)n6, n2, (unsigned __int8)n6a); /*0xffcbae8f*/
n6b = (_BYTE *)CpuCount; /*0xffcbae93*/
SocketInfo = GetSocketInfo((int)n6, n2); /*0xffcbae9f*/
if ( *(_WORD *)(n6 + 257315) == 11 /*0xffcbaec1*/
&& (n2_4 = ProcCommonFunc24FA((int)n6, n2, (unsigned __int8)n6a, (unsigned __int8)n2_1)) != 0 )
{
if ( !(_BYTE)n2a ) /*0xffcbaec8*/
return MemCmdControlMain(n6, n2, (int)n6a, (int)n2_1, n2a); /*0xffcbaed6*/
}
else if ( (_BYTE)n2a != 2 /*0xffcbaf06*/
|| (n2_4 = *(_BYTE *)(1379 * (unsigned __int8)n2_1 + CpuCount + 131) & 3, (unsigned __int8)n2_4 >= 2u) )
{
RmtFunc765((int)n6, n2, (int)n6a, (int)n2_1, n2a, 2u, 0); /*0xffcbaf1b*/
n2_2 = n2_1; /*0xffcbaf20*/
v13 = 1379 * (unsigned __int8)n2_1; /*0xffcbaf30*/
n2_3 = *(_BYTE *)(v13 + CpuCount + 29) & 0x1F; /*0xffcbaf38*/
if ( !n2_3 || n2_3 == 2 || n2_3 == 9 || n2_3 == 11 ) /*0xffcbaf46*/
{
n2a_1 = n2a; /*0xffcbaf48*/
RmtFunc765((int)n6, n2, (int)n6a, (int)n2_1, n2a, 0xCu, 1u); /*0xffcbaf55*/
n2_2 = n2_1; /*0xffcbaf5a*/
}
else
{
n2a_1 = n2a; /*0xffcbaf63*/
}
RmtFunc765((int)n6, n2, (int)n6a, (int)n2_2, n2a_1, n6b[v13 + 35] >> 4, 3u); /*0xffcbaf81*/
RmtFunc765((int)n6, n2, (int)n6a, (int)n2_1, n2a_1, n6b[v13 + 36] & 0xF, 4u); /*0xffcbafa2*/
RmtFunc765((int)n6, n2, (int)n6a, (int)n2_1, n2a_1, n6b[v13 + 36] >> 4, 5u); /*0xffcbafc4*/
n5 = n6b[v13 + 29] & 0x1F; /*0xffcbafd8*/
if ( n5 == 5 || n5 == 18 || n5 == 21 ) /*0xffcbafe4*/
RmtFunc765((int)n6, n2, (int)n6a, (int)n2_1, n2a_1, 0xAu, 8u); /*0xffcbaff2*/
v14 = 48704 * (unsigned __int8)n2; /*0xffcbb003*/
n8 = n6[v14 + 258694]; /*0xffcbb007*/
if ( n8 ) /*0xffcbb010*/
{
if ( n8 > 2u ) /*0xffcbb01a*/
{
if ( n8 > 4u ) /*0xffcbb025*/
{
if ( n8 > 6u ) /*0xffcbb030*/
n6c = (n8 > 8u) + 4; /*0xffcbb040*/
else
n6c = 3; /*0xffcbb032*/
}
else
{
n6c = 2; /*0xffcbb027*/
}
}
else
{
n6c = 1; /*0xffcbb01c*/
}
}
else
{
n6c = 0; /*0xffcbb012*/
}
RmtFunc765((int)n6, n2, (int)n6a, (int)n2_1, n2a_1, n6c, 0xAu); /*0xffcbb052*/
RmtFunc765( /*0xffcbb082*/
(int)n6,
n2,
(int)n6a,
(int)n2_1,
n2a_1,
4 * (*(_BYTE *)(7688 * (unsigned __int8)n6a + SocketInfo + 3) == 1) + 9,
9u);
n2_4 = (_BYTE)n2 << 6; /*0xffcbb087*/
if ( (n6[v14 + 258700] & 2) != 0 ) /*0xffcbb096*/
return RmtFunc765((int)n6, n2, (int)n6a, (int)n2_1, n2a_1, 1u, 0xBu); /*0xffcbb0a8*/
}
return n2_4; /*0xffcbb0b0*/
}
// Function: KtiFn_FFCBB0B7 @ 0xffcbb0b7 (0x4e7 bytes)
// Index: 1562/2560
char __cdecl KtiFn_FFCBB0B7(unsigned __int8 *n2, int n4, _BYTE *n6, int n2_1, int n2_2)
{
bool v7; // al
int v8; // ebp
unsigned __int8 v9; // al
unsigned __int8 v10; // al
int v12; // eax
unsigned __int8 *n2a_1; // edx
unsigned __int8 v14; // al
int v15; // eax
char v16; // al
unsigned __int8 v17; // al
unsigned __int8 n4a_1; // al
unsigned __int8 n0x12; // al
unsigned __int16 n1241; // ax
char result; // al
int v23; // [esp+10h] [ebp-18h]
int SocketInfo; // [esp+14h] [ebp-14h]
int v25; // [esp+18h] [ebp-10h]
__int16 p_n64[2]; // [esp+1Ch] [ebp-Ch] BYREF
unsigned __int16 v27[2]; // [esp+20h] [ebp-8h] BYREF
unsigned __int16 v28[2]; // [esp+24h] [ebp-4h] BYREF
unsigned __int8 *n2a; // [esp+2Ch] [ebp+4h]
unsigned __int8 n4a; // [esp+30h] [ebp+8h]
char n4c; // [esp+30h] [ebp+8h]
unsigned __int8 n4b; // [esp+30h] [ebp+8h]
int n6a; // [esp+34h] [ebp+Ch]
unsigned __int8 v34; // [esp+38h] [ebp+10h]
int v35; // [esp+38h] [ebp+10h]
*(_DWORD *)v27 = 0; /*0xffcbb0ba*/
*(_DWORD *)v28 = 255; /*0xffcbb0cd*/
SocketInfo = GetSocketInfo((int)n2, n4); /*0xffcbb0e1*/
n2a = (unsigned __int8 *)GetCpuCount((int)n2, n4, (unsigned __int8)n6); /*0xffcbb0f4*/
nullsub_5(); /*0xffcbb0f8*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, 0, 0); /*0xffcbb109*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, 0, 1u); /*0xffcbb11d*/
v7 = KtiFunc9BFD(n2, n4, (unsigned __int8)n6, n2_1); /*0xffcbb126*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, !v7, 2u); /*0xffcbb143*/
v8 = 1379 * (unsigned __int8)n2_1; /*0xffcbb150*/
v23 = v8; /*0xffcbb15a*/
if ( n2a[v8 + 1214] < 7u ) /*0xffcbb166*/
v9 = byte_FFD5BCBE[2 * n2a[v8 + 20] + n2a[v8 + 104]]; /*0xffcbb17b*/
else
v9 = n2a[v8 + 39] >> 4; /*0xffcbb16c*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, v9, 3u); /*0xffcbb194*/
if ( n2a[v8 + 1214] < 7u ) /*0xffcbb1a8*/
v10 = byte_FFD5BCBE[2 * n2a[v8 + 20] + n2a[v8 + 104]]; /*0xffcbb1c9*/
else
v10 = ((unsigned __int8)(n2a[v8 + 39] & 0xF) >> 2) | (4 * (n2a[v8 + 39] & 3)); /*0xffcbb1bb*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, v10, 4u); /*0xffcbb1e6*/
v12 = v23; /*0xffcbb1eb*/
n2a_1 = n2a; /*0xffcbb1f4*/
if ( *(_WORD *)&n2a[v23 + 140] == 0xB304 ) /*0xffcbb203*/
{
RmtFunc765((int)n2, n4, (int)n6, n2_1, 0, 0x40u, 0x40u); /*0xffcbb20f*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, 0, 2u, 0x60u); /*0xffcbb21e*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, 0, 5u, 6u); /*0xffcbb22d*/
v12 = v23; /*0xffcbb232*/
n2a_1 = n2a; /*0xffcbb239*/
}
if ( n2a_1[v12 + 1214] < 7u ) /*0xffcbb245*/
v14 = byte_FFD5BCBE[2 * n2a_1[v12 + 20] + n2a_1[v12 + 104]]; /*0xffcbb266*/
else
v14 = ((unsigned __int8)(n2a_1[v12 + 40] & 0xF) >> 2) | (4 * (n2a_1[v12 + 40] & 3)); /*0xffcbb258*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, v14, 5u); /*0xffcbb27f*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, 0xFu, 0x40u); /*0xffcbb290*/
v15 = 7688 * (unsigned __int8)n6; /*0xffcbb2a3*/
v25 = v15; /*0xffcbb2a9*/
if ( *(_BYTE *)(v15 + SocketInfo + 6262) == 2 ) /*0xffcbb2b5*/
{
v16 = *(_BYTE *)(v15 + SocketInfo + 6263); /*0xffcbb2b7*/
if ( (v16 & 2) != 0 ) /*0xffcbb2c0*/
{
v34 = 1; /*0xffcbb2c2*/
goto LABEL_18; /*0xffcbb2c7*/
}
v17 = ((v16 & 1) == 0) | 2; /*0xffcbb2d0*/
}
else
{
v17 = 2 * (n2a[v23 + 20] != 4) + 9; /*0xffcbb2e5*/
}
v34 = v17; /*0xffcbb2ec*/
LABEL_18:
if ( KtiFunc9BFD(n2, n4, (unsigned __int8)n6, n2_1) ) /*0xffcbb2f4*/
n4a_1 = v34 & 0xF7; /*0xffcbb304*/
else
n4a_1 = v34 | 8; /*0xffcbb308*/
n4a = n4a_1; /*0xffcbb310*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, n4a_1, 8u); /*0xffcbb320*/
n6a = 50813 * (unsigned __int8)n4; /*0xffcbb335*/
if ( !n2[n6a + 58726] ) /*0xffcbb339*/
{
n0x12 = n2[48704 * (unsigned __int8)n4 + 258694]; /*0xffcbb34d*/
if ( n0x12 > 6u ) /*0xffcbb356*/
{
if ( n0x12 > 8u ) /*0xffcbb361*/
{
if ( n0x12 > 0xAu ) /*0xffcbb36c*/
{
if ( n0x12 > 0xCu ) /*0xffcbb377*/
{
if ( n0x12 > 0xEu ) /*0xffcbb382*/
{
if ( n0x12 > 0x10u ) /*0xffcbb38d*/
{
if ( n0x12 <= 0x12u ) /*0xffcbb398*/
n4a = 6; /*0xffcbb39a*/
}
else
{
n4a = 5; /*0xffcbb38f*/
}
}
else
{
n4a = 4; /*0xffcbb384*/
}
}
else
{
n4a = 3; /*0xffcbb379*/
}
}
else
{
n4a = 2; /*0xffcbb36e*/
}
}
else
{
n4a = 1; /*0xffcbb363*/
}
}
else
{
n4a = 0; /*0xffcbb358*/
}
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, n4a, 0xAu); /*0xffcbb3ad*/
n4c = AutoGenFuncF0A3((int)n2); /*0xffcbb3ba*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, n4c, 0xBu); /*0xffcbb3ca*/
}
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, 0, 0xCu); /*0xffcbb3de*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, 0, 0xEu); /*0xffcbb3ef*/
v35 = 48704 * (unsigned __int8)n4; /*0xffcbb3ff*/
if ( n2[v35 + 258694] <= 0xCu || (n4b = 1, *(_BYTE *)(v25 + SocketInfo + 6272) == 1) ) /*0xffcbb422*/
n4b = 0; /*0xffcbb424*/
if ( ProcCommonFunc24FA((int)n2, n4, (unsigned __int8)n6, n2_1) /*0xffcbb457*/
&& *(_BYTE *)(v25 + SocketInfo + 6716)
&& n2[v35 + 258694] <= 8u )
{
n4b = 1; /*0xffcbb459*/
}
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, n4b, 0xFu); /*0xffcbb46c*/
if ( (AutoGenFuncF0A3((int)n2) & 8) == 0 ) /*0xffcbb47c*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, *(_BYTE *)(v25 + v23 + SocketInfo + 1649), 0x10u); /*0xffcbb49d*/
if ( !n2[n6a + 58726] ) /*0xffcbb4a9*/
{
n1241 = 2 * *(_WORD *)&n2[v35 + 258695]; /*0xffcbb4c7*/
if ( n1241 < 0x4D9u ) /*0xffcbb4cd*/
n1241 = 1241; /*0xffcbb4cf*/
if ( n1241 > 0xC80u ) /*0xffcbb4d9*/
n1241 = 3200; /*0xffcbb4db*/
if ( *(_WORD *)&n2a[v23 + 140] != 0x9700 || n2a[v23 + 38] != 10 ) /*0xffcbb508*/
RmtFunc765((int)n2, n4, (int)n6, n2_1, n2_2, (n1241 - 1241) / 20, 0x30u); /*0xffcbb518*/
}
nullsub_5(); /*0xffcbb526*/
result = KtiFuncCB2E((int)n2, n4, (unsigned __int8)n6, n2_1); /*0xffcbb52f*/
if ( result ) /*0xffcbb539*/
{
*(_DWORD *)p_n64 = 0; /*0xffcbb53b*/
KtiFuncB990(n2, n4, (int)n6, n2_1, 1, 0, 28, p_n64); /*0xffcbb54f*/
KtiFuncBF1D(n2, n4, (int)n6, n2_1, 1, 44, 28, p_n64, v28, v27); /*0xffcbb56d*/
return KtiFuncBB42(n2, n4, (int)n6, n2_1, 1, 40, 28, p_n64, v28, v27); /*0xffcbb58e*/
}
return result; /*0xffcbb596*/
}
// Function: KtiFuncB59E @ 0xffcbb59e (0x1da bytes)
// Index: 1563/2560
char __cdecl KtiFuncB59E(_BYTE *n2, int n4, int n6, int n2a, int n2_1)
{
int CpuCount; // eax
int CpuCount_1; // esi
int v7; // edi
char n8; // al
int n0x1330; // eax
int v10; // ecx
unsigned __int8 n0x14; // dl
unsigned __int8 v13[4]; // [esp+14h] [ebp-24h] BYREF
int SocketInfo; // [esp+18h] [ebp-20h]
int v15; // [esp+1Ch] [ebp-1Ch]
char HMA84GL7MMR4N_TFT1__[24]; // [esp+20h] [ebp-18h] BYREF
strcpy(HMA84GL7MMR4N_TFT1__, "HMA84GL7MMR4N-TFT1 "); /*0xffcbb5b9*/
SocketInfo = GetSocketInfo((int)n2, n4); /*0xffcbb5cb*/
CpuCount = GetCpuCount((int)n2, n4, n6); /*0xffcbb5cf*/
CpuCount_1 = CpuCount; /*0xffcbb5d8*/
v15 = 7688 * (unsigned __int8)n6; /*0xffcbb5e9*/
v13[0] = *(_BYTE *)(v15 + SocketInfo + 3) > 1u ? 8 : 12;
v7 = 1379 * (unsigned __int8)n2a; /*0xffcbb606*/
if ( *(_BYTE *)(v7 + CpuCount + 19) == 1 && *(_DWORD *)(v7 + CpuCount + 199) == 1 ) /*0xffcbb61b*/
v13[0] |= 3u; /*0xffcbb623*/
RmtFunc765((int)n2, n4, n6, n2a, n2_1, v13[0], 9u); /*0xffcbb635*/
n8 = 0; /*0xffcbb63a*/
v13[0] = 0; /*0xffcbb63f*/
if ( *(_BYTE *)(v7 + CpuCount_1 + 37) ) /*0xffcbb643*/
{
n8 = 8; /*0xffcbb649*/
v13[0] = 8; /*0xffcbb64b*/
}
if ( *(_BYTE *)(v7 + CpuCount_1 + 19) == 4 && *(_BYTE *)(v15 + SocketInfo + 6262) != 2 ) /*0xffcbb666*/
v13[0] = n8 | 1; /*0xffcbb66a*/
if ( (*(_WORD *)(v7 + CpuCount_1 + 140) != 0xB300 || *(_BYTE *)(v7 + CpuCount_1 + 38) != 32) /*0xffcbb68e*/
&& !ProcCommonFunc24FA((int)n2, n4, n6, n2a) )
{
v13[0] |= 4u; /*0xffcbb69a*/
}
if ( ProcCommonFunc24FA((int)n2, n4, n6, n2a) && *(_BYTE *)(v15 + SocketInfo + 6262) == 1 ) /*0xffcbb6c5*/
v13[0] |= 3u; /*0xffcbb6c7*/
RmtFunc765((int)n2, n4, n6, n2a, n2_1, v13[0], 0xDu); /*0xffcbb6e0*/
LOBYTE(n0x1330) = 6; /*0xffcbb6e5*/
if ( *(_WORD *)(v7 + CpuCount_1 + 140) == 12806 ) /*0xffcbb6f5*/
{
LOBYTE(n0x1330) = ProcCommonFunc24FA((int)n2, n4, n6, n2a); /*0xffcbb701*/
if ( (_BYTE)n0x1330 ) /*0xffcbb70b*/
{
v10 = CpuCount_1 + v7 + 172; /*0xffcbb713*/
n0x14 = 0; /*0xffcbb715*/
while ( 1 ) /*0xffcbb71e*/
{
n0x1330 = HMA84GL7MMR4N_TFT1__[n0x14]; /*0xffcbb71e*/
if ( *(unsigned __int8 *)(v10 + n0x14) != n0x1330 ) /*0xffcbb725*/
break; /*0xffcbb725*/
++n0x14; /*0xffcbb727*/
v10 = v7 + 172 + CpuCount_1; /*0xffcbb72f*/
if ( n0x14 >= 0x14u ) /*0xffcbb735*/
{
LOWORD(n0x1330) = __ROL2__(*(_WORD *)(v7 + CpuCount_1 + 145), 8); /*0xffcbb744*/
if ( (unsigned __int16)n0x1330 < 0x1330u ) /*0xffcbb74b*/
{
v13[0] = 7; /*0xffcbb751*/
LOBYTE(n0x1330) = MemJedecInit(n2, n4, n6, n2a, 1, 0x3025u, v13); /*0xffcbb768*/
}
return n0x1330; /*0xffcbb768*/
}
}
}
}
return n0x1330; /*0xffcbb770*/
}
// Function: KtiFuncB778 @ 0xffcbb778 (0x1d0 bytes)
// Index: 1564/2560
int __cdecl KtiFuncB778(unsigned __int8 *n6, int n4, char a3)
{
unsigned __int8 n6b_1; // bl
_BYTE *SocketInfo_1; // edi
int v5; // ecx
int CpuCount; // eax
unsigned __int8 v7; // dh
unsigned __int8 v8; // dl
int n63_1; // eax
unsigned __int8 n6_1; // bh
unsigned __int8 *v11; // edi
int SocketInfo_2; // ecx
unsigned __int8 n4_1; // bh
unsigned __int8 v14; // bl
int n6a; // [esp+10h] [ebp-28h]
unsigned __int8 n6b; // [esp+10h] [ebp-28h]
int n2; // [esp+14h] [ebp-24h]
unsigned __int8 n2a; // [esp+14h] [ebp-24h]
unsigned __int8 n63; // [esp+18h] [ebp-20h]
int v21; // [esp+1Ch] [ebp-1Ch]
int p_n64; // [esp+20h] [ebp-18h] BYREF
int v23; // [esp+24h] [ebp-14h]
int CpuCount_1; // [esp+28h] [ebp-10h]
int SocketInfo; // [esp+2Ch] [ebp-Ch]
unsigned __int16 v26[2]; // [esp+30h] [ebp-8h] BYREF
unsigned __int16 v27[2]; // [esp+34h] [ebp-4h] BYREF
*(_DWORD *)v26 = 0; /*0xffcbb77b*/
*(_DWORD *)v27 = 255; /*0xffcbb790*/
n63 = 0; /*0xffcbb798*/
n6b_1 = 0; /*0xffcbb7a2*/
SocketInfo = GetSocketInfo((int)n6, n4); /*0xffcbb7a4*/
v21 = 0; /*0xffcbb7a8*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcbb7ad*/
v5 = 0; /*0xffcbb7b0*/
n6b = 0; /*0xffcbb7b4*/
do /*0xffcbb816*/
{
if ( !*SocketInfo_1 ) /*0xffcbb7bb*/
goto LABEL_7; /*0xffcbb7bb*/
CpuCount = GetCpuCount((int)n6, n4, n6b); /*0xffcbb7c3*/
v7 = SocketInfo_1[3]; /*0xffcbb7c8*/
v8 = 0; /*0xffcbb7cb*/
CpuCount_1 = CpuCount; /*0xffcbb7d0*/
n2a = 0; /*0xffcbb7d4*/
if ( !v7 ) /*0xffcbb7da*/
{
LABEL_6:
v5 = v21; /*0xffcbb7fa*/
LABEL_7:
LOBYTE(n63_1) = n63; /*0xffcbb7fe*/
goto LABEL_8; /*0xffcbb7fe*/
}
while ( *(_BYTE *)(1379 * v8 + CpuCount_1 + 107) ) /*0xffcbb7ee*/
{
n2a = ++v8; /*0xffcbb7f2*/
if ( v8 >= v7 ) /*0xffcbb7f8*/
goto LABEL_6; /*0xffcbb7f8*/
}
n4_1 = 0; /*0xffcbb863*/
LOBYTE(v23) = 0; /*0xffcbb865*/
do /*0xffcbb88a*/
{
KtiFunc89E9((int)n6, n4, n6b, n2a, v23, 0); /*0xffcbb879*/
LOBYTE(v23) = ++n4_1; /*0xffcbb883*/
}
while ( n4_1 < 4u ); /*0xffcbb88a*/
v5 = v21; /*0xffcbb890*/
n63_1 = n63 | (1 << v21); /*0xffcbb897*/
n63 = n63_1; /*0xffcbb89a*/
LABEL_8:
++n6b_1; /*0xffcbb802*/
SocketInfo_1 += 7688; /*0xffcbb804*/
++v5; /*0xffcbb80a*/
n6b = n6b_1; /*0xffcbb80b*/
v21 = v5; /*0xffcbb80f*/
}
while ( n6b_1 < 6u ); /*0xffcbb816*/
if ( (_BYTE)n63_1 )
{
ProcCommonFuncFBF1((int)n6); /*0xffcbb821*/
n6_1 = 0; /*0xffcbb82a*/
LOBYTE(n6a) = 0; /*0xffcbb82d*/
v11 = (unsigned __int8 *)(SocketInfo + 3); /*0xffcbb831*/
do
{
if ( *(v11 - 3) )
{
SocketInfo_2 = GetCpuCount((int)n6, n4, n6a); /*0xffcbb84c*/
SocketInfo = SocketInfo_2; /*0xffcbb853*/
p_n64 = a3 == -1 ? 31 : 0;
v14 = 0; /*0xffcbb8a8*/
for ( LOBYTE(n2) = 0; v14 < *v11; LOBYTE(n2) = v14 ) /*0xffcbb8ae*/
{
if ( !*(_BYTE *)(1379 * v14 + SocketInfo_2 + 107) ) /*0xffcbb8bb*/
{
KtiFuncB990(n6, n4, n6a, n2, 1, 0, 24, (__int16 *)&p_n64); /*0xffcbb8d7*/
KtiFuncBF1D(n6, n4, n6a, n2, 1, 44, 24, (__int16 *)&p_n64, v27, v26); /*0xffcbb8fb*/
SocketInfo_2 = SocketInfo; /*0xffcbb900*/
}
++v14; /*0xffcbb907*/
}
}
++n6_1; /*0xffcbb911*/
v11 += 7688; /*0xffcbb913*/
LOBYTE(n6a) = n6_1; /*0xffcbb919*/
}
while ( n6_1 < 6u );
KtiFuncD59F(n6, n4, n63); /*0xffcbb930*/
ProcCommonFuncFBFD((int)n6); /*0xffcbb936*/
}
return 0; /*0xffcbb93e*/
}
// Function: KtiFuncB948 @ 0xffcbb948 (0x48 bytes)
// Index: 1565/2560
BOOL __cdecl KtiFuncB948(unsigned __int8 a1, char a2, _WORD *a3, _WORD *a4)
{
unsigned __int8 v4; // cl
int n9; // edx
v4 = a1; /*0xffcbb94d*/
if ( a2 ) /*0xffcbb951*/
v4 = a1 >> 1; /*0xffcbb953*/
*a3 = 11776; /*0xffcbb95e*/
n9 = 0; /*0xffcbb961*/
while ( (unsigned __int16)word_FFD5BC6C[2 * n9] < v4 ) /*0xffcbb96e*/
{
if ( (unsigned int)++n9 >= 9 ) /*0xffcbb974*/
return n9 == 9; /*0xffcbb974*/
}
*a4 = word_FFD5BC6E[2 * n9]; /*0xffcbb984*/
return n9 == 9; /*0xffcbb98f*/
}
// Function: KtiFuncB990 @ 0xffcbb990 (0x1b2 bytes)
// Index: 1566/2560
int __cdecl KtiFuncB990(unsigned __int8 *n6, int n4, int n6a, int n2, int a5, char n2_1, char n28, __int16 *p_n64)
{
int v8; // ebx
int CpuCount; // eax
int n2_2; // edx
int v12; // esi
int n6a_1; // ecx
__int16 v15; // si
__int16 n64; // ax
unsigned __int8 *v18; // [esp+10h] [ebp-8h]
int v19; // [esp+14h] [ebp-4h]
__int16 n64_1; // [esp+1Ch] [ebp+4h]
unsigned __int8 v21; // [esp+2Ch] [ebp+14h]
v8 = 0; /*0xffcbb99a*/
v18 = &n6[48704 * (unsigned __int8)n4 + 258689]; /*0xffcbb9b5*/
if ( a5 != 1 ) /*0xffcbb9b9*/
return MailBoxFunc5B6A(n6, n4, n6a, n2_1, n28, p_n64); /*0xffcbbb2f*/
CpuCount = GetCpuCount((int)n6, n4, n6a); /*0xffcbb9c6*/
n2_2 = n2; /*0xffcbb9cb*/
v12 = 1379 * (unsigned __int8)n2; /*0xffcbb9d7*/
if ( *(_BYTE *)(v12 + CpuCount + 107) ) /*0xffcbb9dd*/
return MailBoxFunc5DCE(n6, n4, n6a, n2, n28, p_n64); /*0xffcbbb34*/
n6a_1 = n6a; /*0xffcbb9fd*/
v19 = v12 + 7688 * (unsigned __int8)n6a; /*0xffcbba15*/
v15 = v18[v19 + 1679]; /*0xffcbba19*/
if ( (n28 & 2) != 0 )
{
*p_n64 = v15; /*0xffcbba27*/
}
else
{
if ( (n28 & 4) != 0 ) /*0xffcbba34*/
n64 = v15 + *p_n64; /*0xffcbba3c*/
else
n64 = *p_n64; /*0xffcbba41*/
n64_1 = n64; /*0xffcbba44*/
if ( (unsigned __int16)n64 >= 0x20u )
{
AssertPrint(
n6,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemJedec.c",
329,
"FALSE");
ProcMemInitCheck((int)n6, 242, 73); /*0xffcbba7a*/
n64 = n64_1; /*0xffcbba7f*/
n6a_1 = n6a; /*0xffcbba86*/
n2_2 = n2; /*0xffcbba8a*/
}
if ( n64 ) /*0xffcbba91*/
v21 = n64 | 0x80; /*0xffcbba95*/
else
v21 = 0; /*0xffcbba9b*/
KtiFuncC8AB((int)n6, n4, n6a_1, n2_2, 0, v21, 1, 0x60u); /*0xffcbbab1*/
KtiFuncC8AB((int)n6, n4, n6a, n2, 0, v21, 1, 0x70u); /*0xffcbbac6*/
KtiFuncC8AB((int)n6, n4, n6a, n2, 0, v21, 1, 0x80u); /*0xffcbbae1*/
KtiFuncC8AB((int)n6, n4, n6a, n2, 0, v21, 1, 0x90u); /*0xffcbbaf9*/
if ( (n28 & 0x10) != 0 ) /*0xffcbbb06*/
v18[v19 + 1679] = n64_1; /*0xffcbbb14*/
}
return v8; /*0xffcbbb39*/
}
// Function: KtiFuncBB42 @ 0xffcbbb42 (0x202 bytes)
// Index: 1567/2560
int __cdecl KtiFuncBB42(
unsigned __int8 *__return_address,
int n4,
int n6,
int a4,
int a5,
int n53,
char a7,
__int16 *a8,
unsigned __int16 *a9,
unsigned __int16 *a10)
{
int v10; // ebx
int CpuCount; // ecx
int v15; // edx
int n6_1; // ecx
__int16 n4b_1; // ax
int v20; // [esp+10h] [ebp-Ch]
int SocketInfo; // [esp+14h] [ebp-8h]
int v22; // [esp+18h] [ebp-4h]
unsigned __int8 *v23; // [esp+20h] [ebp+4h]
int n4a; // [esp+24h] [ebp+8h]
__int16 n4b; // [esp+24h] [ebp+8h]
unsigned __int8 n53a; // [esp+34h] [ebp+18h]
v10 = 0; /*0xffcbbb4d*/
v23 = &__return_address[48704 * (unsigned __int8)n4 + 258689]; /*0xffcbbb65*/
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffcbbb79*/
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffcbbb85*/
if ( n53 == 53 ) /*0xffcbbb8c*/
return KtiFuncBD44((int)__return_address, n4, n6, a4, a5, a7, a8); /*0xffcbbd38*/
if ( a5 != 1 ) /*0xffcbbbb3*/
return MailBoxFunc6596(__return_address, n4, n6, n53, a7, a8, a9, a10); /*0xffcbbd30*/
v15 = a4; /*0xffcbbbb9*/
n4a = 1379 * (unsigned __int8)a4; /*0xffcbbbc6*/
if ( *(_BYTE *)(n4a + CpuCount + 107) ) /*0xffcbbbca*/
return MailBoxFunc6633(__return_address, n4, n6, a4, n53, a7, a8, a9, a10); /*0xffcbbbf0*/
n6_1 = n6; /*0xffcbbbf5*/
v20 = 7688 * (unsigned __int8)n6; /*0xffcbbc06*/
v22 = n4a + v20; /*0xffcbbc13*/
if ( (a7 & 2) != 0 )
{
*a8 = v23[n4a + 1680 + v20]; /*0xffcbbc29*/
}
else
{
if ( (a7 & 4) != 0 ) /*0xffcbbc37*/
n4b_1 = v23[n4a + 1680 + v20] + *a8; /*0xffcbbc42*/
else
n4b_1 = *a8; /*0xffcbbc47*/
n4b = n4b_1; /*0xffcbbc4b*/
if ( (unsigned __int16)n4b_1 >= 0x20u )
{
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemJedec.c",
237,
"FALSE");
ProcMemInitCheck((int)__return_address, 242, 72); /*0xffcbbc81*/
n6_1 = n6; /*0xffcbbc86*/
n4b_1 = n4b; /*0xffcbbc8d*/
v15 = a4; /*0xffcbbc91*/
}
if ( n4b_1 ) /*0xffcbbc98*/
n53a = n4b_1 | 0x80; /*0xffcbbc9c*/
else
n53a = 0; /*0xffcbbca2*/
KtiFuncC8AB((int)__return_address, n4, n6_1, v15, 0, n53a, 1, 0x50u); /*0xffcbbcb3*/
if ( *(_BYTE *)(v20 + SocketInfo + 6262) == 2 ) /*0xffcbbccb*/
KtiFuncC8AB((int)__return_address, n4, n6, a4, 0, n53a, 1, 0x20u); /*0xffcbbce0*/
if ( (a7 & 0x10) != 0 ) /*0xffcbbced*/
v23[v22 + 1680] = n4b; /*0xffcbbcfb*/
}
MailBoxFunc8CAD(*a8, a9, a10); /*0xffcbbd0f*/
return v10; /*0xffcbbd3a*/
}
// Function: KtiFuncBD44 @ 0xffcbbd44 (0x1d9 bytes)
// Index: 1568/2560
int __cdecl KtiFuncBD44(int a1, int a2, int a3, int a4, int a5, char a6, __int16 *a7)
{
_BYTE *v7; // edi
int CpuCount; // esi
char v9; // al
char v10; // bl
int v11; // edx
__int16 v12; // cx
int v13; // ebx
__int16 v14; // cx
unsigned __int8 v16; // [esp+10h] [ebp-Ch]
int v17; // [esp+14h] [ebp-8h]
int v18; // [esp+18h] [ebp-4h]
int v19; // [esp+18h] [ebp-4h]
v16 = 0; /*0xffcbbd4e*/
v7 = (_BYTE *)a1; /*0xffcbbd62*/
v17 = a1 + 48704 * (unsigned __int8)a2 + 258689; /*0xffcbbd70*/
CpuCount = GetCpuCount(a1, a2, a3); /*0xffcbbd7a*/
v9 = AutoGenFuncF0A3(a1); /*0xffcbbd7c*/
v10 = v9; /*0xffcbbd85*/
LOBYTE(a1) = v9; /*0xffcbbd97*/
v18 = 1379 * (unsigned __int8)a4; /*0xffcbbd9b*/
if ( *(_BYTE *)(v18 + CpuCount + 107) || a5 != 1 && (a5 || (v9 & 8) != 0 || v7[257313]) ) /*0xffcbbdc0*/
return MailBoxFunc66B8((int)v7, a2, a3, a4, a5, a6, (int)a7); /*0xffcbbf11*/
v11 = a3; /*0xffcbbdcc*/
v19 = v18 + 7688 * (unsigned __int8)a3; /*0xffcbbde4*/
v12 = (unsigned __int8)(*(_WORD *)(v19 + v17 + 1682) >> (8 * a5)); /*0xffcbbdfb*/
if ( ((*(_WORD *)(v19 + v17 + 1682) >> (8 * a5)) & 0x20) != 0 ) /*0xffcbbe01*/
v12 = ((*(_WORD *)(v19 + v17 + 1682) >> (8 * a5)) & 0x1F) - 32; /*0xffcbbe06*/
if ( (a6 & 2) != 0 )
{
*a7 = v12; /*0xffcbbe17*/
return 0; /*0xffcbbe1a*/
}
else
{
if ( (a6 & 4) != 0 ) /*0xffcbbe26*/
v14 = v12 + *a7; /*0xffcbbe2e*/
else
v14 = *a7; /*0xffcbbe33*/
if ( (unsigned __int16)(v14 + 20) > 0x28u )
{
AssertPrint(
v7,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemJedec.c",
422,
"FALSE");
ProcMemInitCheck((int)v7, 242, 74); /*0xffcbbe6d*/
v11 = a3; /*0xffcbbe72*/
}
else
{
v16 = v14 & 0x3F; /*0xffcbbe44*/
}
if ( a5 == 1 ) /*0xffcbbe80*/
LOBYTE(a1) = v10 & 9 | 2; /*0xffcbbe88*/
v13 = 0; /*0xffcbbe92*/
RmtFunc765(v7, a2, v11, a4, 0, a1, 11); /*0xffcbbe9f*/
RmtFunc765(v7, a2, a3, a4, 0, v16, 16); /*0xffcbbeb8*/
if ( (a6 & 0x10) != 0 ) /*0xffcbbec5*/
*(_WORD *)(v19 + v17 + 1682) = (v16 << (8 * a5)) | *(_WORD *)(v19 + v17 + 1682) & ~(255 << (8 * a5)); /*0xffcbbeef*/
}
return v13; /*0xffcbbf13*/
}
// Function: KtiFuncBF1D @ 0xffcbbf1d (0x1df bytes)
// Index: 1569/2560
int __cdecl KtiFuncBF1D(
unsigned __int8 *__return_address,
int n4,
int n6,
int a4,
int a5,
int n45,
char a7,
__int16 *a8,
unsigned __int16 *a9,
unsigned __int16 *a10)
{
int CpuCount; // eax
int v12; // edx
int v13; // esi
unsigned __int16 *v14; // ebx
int n6_1; // ecx
__int16 v16; // si
__int16 n0x20; // ax
int v19; // [esp+8h] [ebp-Ch]
int v20; // [esp+Ch] [ebp-8h]
unsigned __int8 *v21; // [esp+10h] [ebp-4h]
__int16 n0x20_1; // [esp+18h] [ebp+4h]
unsigned __int8 v23; // [esp+28h] [ebp+14h]
v19 = 0; /*0xffcbbf24*/
v21 = &__return_address[48704 * (unsigned __int8)n4 + 258689]; /*0xffcbbf44*/
if ( a5 != 1 ) /*0xffcbbf48*/
return MailBoxFunc6CF5(__return_address, n4, n6, n45, a7, a8, a9, a10); /*0xffcbc0ee*/
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffcbbf57*/
v12 = a4; /*0xffcbbf5c*/
v13 = 1379 * (unsigned __int8)a4; /*0xffcbbf68*/
if ( *(_BYTE *)(v13 + CpuCount + 107) )
{
v14 = (unsigned __int16 *)a8; /*0xffcbbf79*/
v19 = MailBoxFunc6B93(__return_address, n4, n6, a4, a7, a8, a9, a10); /*0xffcbbf96*/
}
else
{
n6_1 = n6; /*0xffcbbf9f*/
v20 = v13 + 7688 * (unsigned __int8)n6; /*0xffcbbfb3*/
v16 = __return_address[48704 * (unsigned __int8)n4 + 260370 + v20]; /*0xffcbbfb7*/
v14 = (unsigned __int16 *)a8; /*0xffcbbfbf*/
if ( (a7 & 2) != 0 )
{
*a8 = v16; /*0xffcbbfc5*/
}
else
{
if ( (a7 & 4) != 0 ) /*0xffcbbfd2*/
n0x20 = v16 + *a8; /*0xffcbbfda*/
else
n0x20 = *a8; /*0xffcbbfdf*/
n0x20_1 = n0x20; /*0xffcbbfe2*/
if ( (unsigned __int16)n0x20 >= 0x20u )
{
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemJedec.c",
135,
"FALSE");
ProcMemInitCheck((int)__return_address, 242, 71); /*0xffcbc018*/
n0x20 = n0x20_1; /*0xffcbc01d*/
n6_1 = n6; /*0xffcbc024*/
v12 = a4; /*0xffcbc028*/
}
if ( n0x20 ) /*0xffcbc02f*/
v23 = n0x20 | 0x80; /*0xffcbc033*/
else
v23 = 0; /*0xffcbc039*/
KtiFuncC8AB((int)__return_address, n4, n6_1, v12, 0, v23, 1, 0x10u); /*0xffcbc051*/
KtiFuncC8AB((int)__return_address, n4, n6, a4, 0, v23, 1, 0x20u); /*0xffcbc067*/
KtiFuncC8AB((int)__return_address, n4, n6, a4, 0, v23, 1, 0x30u); /*0xffcbc080*/
KtiFuncC8AB((int)__return_address, n4, n6, a4, 0, v23, 1, 0x40u); /*0xffcbc096*/
if ( (a7 & 0x10) != 0 ) /*0xffcbc0a3*/
v21[v20 + 1681] = n0x20_1; /*0xffcbc0b1*/
}
}
MailBoxFunc8CAD(*v14, a9, a10); /*0xffcbc0c4*/
return v19; /*0xffcbc0f6*/
}
// Function: KtiFuncC0FC @ 0xffcbc0fc (0x13 bytes)
// Index: 1570/2560
int __cdecl KtiFuncC0FC(int a1)
{
return dword_FFD42E74[*(unsigned __int8 *)(a1 + 257311)]; /*0xffcbc10e*/
}
// Function: KtiFuncC10F @ 0xffcbc10f (0x79 bytes)
// Index: 1571/2560
unsigned int __cdecl KtiFuncC10F(unsigned int __return_address, unsigned __int8 n2)
{
_BYTE *__return_address_1; // esi
int n50000; // edx
unsigned int v4; // ecx
__return_address_1 = (_BYTE *)__return_address; /*0xffcbc113*/
if ( *(_WORD *)(__return_address + 257315) == 11 )
n50000 = *(_WORD *)(48704 * n2 + __return_address + 258695) < 0x320u ? 56250 : 50000;
else
n50000 = 50000; /*0xffcbc147*/
v4 = dword_FFD42E74[*(unsigned __int8 *)(__return_address + 257311)]; /*0xffcbc155*/
__return_address = (unsigned __int8)((n50000 + v4 - 100) / v4); /*0xffcbc169*/
if ( __return_address < 3 ) /*0xffcbc16e*/
__return_address = 3; /*0xffcbc170*/
MailBoxFunc9805(__return_address_1, 17, &__return_address); /*0xffcbc17a*/
return __return_address; /*0xffcbc185*/
}
// Function: KtiFuncC188 @ 0xffcbc188 (0x1d bytes)
// Index: 1572/2560
unsigned int __cdecl KtiFuncC188(int __return_address)
{
unsigned int v1; // ecx
v1 = dword_FFD42E74[*(unsigned __int8 *)(__return_address + 257311)]; /*0xffcbc195*/
return (v1 + 99900) / v1; /*0xffcbc1a4*/
}
// Function: KtiFuncC1A5 @ 0xffcbc1a5 (0x3c bytes)
// Index: 1573/2560
unsigned int __cdecl KtiFuncC1A5(unsigned __int8 *__return_address, unsigned __int8 n2, unsigned __int8 n3)
{
unsigned int v3; // ecx
unsigned int v5; // [esp+0h] [ebp-4h] BYREF
v5 = v3; /*0xffcbc1a8*/
v5 = *(unsigned __int8 *)(7688 * n3 + GetSocketInfo((int)__return_address, n2) + 307); /*0xffcbc1c6*/
MailBoxFunc9805(__return_address, 4, &v5); /*0xffcbc1d2*/
return v5; /*0xffcbc1df*/
}
// Function: KtiFuncC1E1 @ 0xffcbc1e1 (0x3c bytes)
// Index: 1574/2560
unsigned int __cdecl KtiFuncC1E1(unsigned __int8 *__return_address, unsigned __int8 n2, unsigned __int8 n3)
{
unsigned int v3; // ecx
unsigned int v5; // [esp+0h] [ebp-4h] BYREF
v5 = v3; /*0xffcbc1e4*/
v5 = *(unsigned __int8 *)(7688 * n3 + GetSocketInfo((int)__return_address, n2) + 320); /*0xffcbc202*/
MailBoxFunc9805(__return_address, 3, &v5); /*0xffcbc20e*/
return v5; /*0xffcbc21b*/
}
// Function: KtiFuncC21D @ 0xffcbc21d (0x1e2 bytes)
// Index: 1575/2560
unsigned int __cdecl KtiFuncC21D(unsigned int n16, unsigned __int8 n4, char n2)
{
_BYTE *n16_1; // esi
int v4; // eax
int n11; // edi
unsigned __int16 n0x42A; // ax
int n300000; // edx
int v8; // edx
unsigned __int16 n0x640; // ax
unsigned __int16 n0x42A_1; // ax
unsigned int v11; // ecx
unsigned __int8 n16_2; // al
unsigned int n16_3; // [esp-4h] [ebp-10h]
n16_1 = (_BYTE *)n16; /*0xffcbc229*/
v4 = 48704 * n4; /*0xffcbc22d*/
n11 = *(unsigned __int16 *)(n16 + 257315); /*0xffcbc233*/
if ( n11 == 11 )
{
n0x42A = *(_WORD *)(v4 + n16 + 258695); /*0xffcbc243*/
if ( !n2 )
{
if ( n0x42A > 0x190u )
{
if ( n0x42A >= 0x29Au )
{
if ( n0x42A > 0x320u )
n300000 = n0x42A < 0x42Au ? 270000 : 250000;
else
n300000 = 300000; /*0xffcbc281*/
}
else
{
n300000 = 357000; /*0xffcbc26d*/
}
}
else
{
n300000 = 400000; /*0xffcbc259*/
}
goto LABEL_33; /*0xffcbc25e*/
}
if ( n0x42A < 0x29Au ) /*0xffcbc2ae*/
{
n300000 = 500000; /*0xffcbc2b0*/
goto LABEL_33; /*0xffcbc2b5*/
}
if ( n0x42A < 0x320u ) /*0xffcbc2c2*/
{
n300000 = 450000; /*0xffcbc2c4*/
goto LABEL_33; /*0xffcbc2c9*/
}
v8 = n0x42A != 800 ? 0 : 0xC350;
LABEL_32:
n300000 = v8 + 350000; /*0xffcbc3a5*/
goto LABEL_33; /*0xffcbc3a5*/
}
if ( n2 == 2 )
{
n0x640 = *(_WORD *)(v4 + n16 + 258695); /*0xffcbc2ec*/
if ( n0x640 > 0x320u )
{
if ( n0x640 >= 0x42Au )
{
if ( n0x640 >= 0x4B0u )
{
if ( n0x640 >= 0x535u )
{
if ( n0x640 >= 0x5BAu )
n300000 = n0x640 < 0x640u ? 102400 : 100000;
else
n300000 = 120000; /*0xffcbc346*/
}
else
{
n300000 = 130000; /*0xffcbc335*/
}
}
else
{
n300000 = 150000; /*0xffcbc321*/
}
}
else
{
n300000 = 170000; /*0xffcbc30d*/
}
}
else
{
n300000 = 200000; /*0xffcbc2f9*/
}
}
else
{
if ( n2 )
{
v8 = *(_WORD *)(v4 + n16 + 258695) > 0x320u ? 0xFFFF3CB0 : 0;
goto LABEL_32; /*0xffcbc39f*/
}
n0x42A_1 = *(_WORD *)(v4 + n16 + 258695); /*0xffcbc369*/
if ( n0x42A_1 > 0x320u )
n300000 = n0x42A_1 < 0x42Au ? 230000 : 210000;
else
n300000 = 250000; /*0xffcbc376*/
}
LABEL_33:
v11 = dword_FFD42E74[*(unsigned __int8 *)(n16 + 257311)]; /*0xffcbc3ab*/
n16_2 = (n300000 + v11 - 100) / v11; /*0xffcbc3c0*/
n16 = n16_2; /*0xffcbc3c5*/
if ( n11 == 12 ) /*0xffcbc3cb*/
{
if ( n2 == 2 ) /*0xffcbc3d0*/
{
n16_3 = 16; /*0xffcbc3d2*/
}
else if ( n2 ) /*0xffcbc3d8*/
{
n16_3 = 28; /*0xffcbc3de*/
}
else
{
n16_3 = 20; /*0xffcbc3da*/
}
if ( n16_2 < n16_3 ) /*0xffcbc3e3*/
n16 = n16_3; /*0xffcbc3e5*/
}
MailBoxFunc9805(n16_1, 18, &n16); /*0xffcbc3ef*/
return n16; /*0xffcbc3fa*/
}
// Function: KtiFuncC3FF @ 0xffcbc3ff (0x53 bytes)
// Index: 1576/2560
unsigned int __cdecl KtiFuncC3FF(unsigned int __return_address)
{
_BYTE *__return_address_1; // esi
unsigned int v2; // ecx
unsigned int n24; // eax
__return_address_1 = (_BYTE *)__return_address; /*0xffcbc403*/
if ( *(_WORD *)(__return_address + 257315) == 11 ) /*0xffcbc40e*/
{
v2 = dword_FFD42E74[*(unsigned __int8 *)(__return_address + 257311)]; /*0xffcbc419*/
n24 = (unsigned __int8)((v2 + 149900) / v2); /*0xffcbc428*/
}
else
{
n24 = 24; /*0xffcbc42f*/
}
__return_address = n24; /*0xffcbc433*/
if ( n24 < 0xC ) /*0xffcbc438*/
__return_address = 12; /*0xffcbc43a*/
MailBoxFunc9805(__return_address_1, 24, &__return_address); /*0xffcbc444*/
return __return_address; /*0xffcbc44f*/
}
// Function: KtiFuncC452 @ 0xffcbc452 (0x3c bytes)
// Index: 1577/2560
unsigned int __cdecl KtiFuncC452(unsigned __int8 *__return_address, unsigned __int8 n2, unsigned __int8 n3)
{
unsigned int v3; // ecx
unsigned int v5; // [esp+0h] [ebp-4h] BYREF
v5 = v3; /*0xffcbc455*/
v5 = *(unsigned __int8 *)(7688 * n3 + GetSocketInfo((int)__return_address, n2) + 315); /*0xffcbc473*/
MailBoxFunc9805(__return_address, 2, &v5); /*0xffcbc47f*/
return v5; /*0xffcbc48c*/
}
// Function: KtiFuncC48E @ 0xffcbc48e (0x40 bytes)
// Index: 1578/2560
unsigned int __cdecl KtiFuncC48E(_BYTE *__return_address, unsigned __int8 n2, unsigned __int8 n3)
{
unsigned int v4; // [esp+0h] [ebp-4h] BYREF
v4 = 0; /*0xffcbc495*/
v4 = *(unsigned __int8 *)(7688 * n3 + GetSocketInfo((int)__return_address, n2) + 309); /*0xffcbc4b3*/
MailBoxFunc9805(__return_address, 6, &v4); /*0xffcbc4bf*/
return v4; /*0xffcbc4cc*/
}
// Function: KtiFuncC4CE @ 0xffcbc4ce (0x8f bytes)
// Index: 1579/2560
unsigned int __cdecl KtiFuncC4CE(_BYTE *__return_address, unsigned int n2, int n3)
{
unsigned int SocketInfo_1; // ecx
bool v4; // cf
unsigned __int64 SocketInfo; // rax
unsigned int v7; // [esp+Ch] [ebp-4h] BYREF
SocketInfo = (unsigned int)GetSocketInfo((int)__return_address, n2); /*0xffcbc4dc*/
LOBYTE(SocketInfo) = *(_BYTE *)(7688 * (unsigned __int8)n3 + SocketInfo + 7631); /*0xffcbc4f8*/
SocketInfo_1 = (unsigned __int8)SocketInfo; /*0xffcbc4ff*/
v4 = (unsigned __int8)SocketInfo < 0x14u; /*0xffcbc502*/
LODWORD(SocketInfo) = 156000; /*0xffcbc504*/
if ( v4 ) /*0xffcbc509*/
LODWORD(SocketInfo) = 78000; /*0xffcbc50b*/
v7 = (unsigned __int16)(10000 /*0xffcbc524*/
* (unsigned int)(SocketInfo / SocketInfo_1)
/ dword_FFD42E74[(unsigned __int8)__return_address[257311]]);
MailBoxFunc9805(__return_address, 0, &v7); /*0xffcbc52e*/
DebugPrint((int)__return_address, 2, n2, n3, 255, 255, 255, 255, "Refresh rate = %d\n", v7); /*0xffcbc54b*/
return v7; /*0xffcbc556*/
}
// Function: KtiFuncC55D @ 0xffcbc55d (0x2f bytes)
// Index: 1580/2560
int __cdecl KtiFuncC55D(_BYTE *__return_address, int a2)
{
a2 = 9 * (unsigned __int16)a2 / 1024; /*0xffcbc573*/
MailBoxFunc9805(__return_address, 25, (unsigned int *)&a2); /*0xffcbc57f*/
return a2; /*0xffcbc58a*/
}
// Function: KtiFuncC58C @ 0xffcbc58c (0x3c bytes)
// Index: 1581/2560
unsigned int __cdecl KtiFuncC58C(_BYTE *__return_address, unsigned __int8 n2, unsigned __int8 n3)
{
unsigned int v3; // ecx
unsigned int v5; // [esp+0h] [ebp-4h] BYREF
v5 = v3; /*0xffcbc58f*/
v5 = *(unsigned __int16 *)(7688 * n3 + GetSocketInfo((int)__return_address, n2) + 324); /*0xffcbc5ad*/
MailBoxFunc9805(__return_address, 1, &v5); /*0xffcbc5b9*/
return v5; /*0xffcbc5c6*/
}
// Function: KtiFuncC5C8 @ 0xffcbc5c8 (0x3c bytes)
// Index: 1582/2560
unsigned int __cdecl KtiFuncC5C8(_BYTE *__return_address, unsigned __int8 n2, unsigned __int8 n3)
{
unsigned int v3; // ecx
unsigned int v5; // [esp+0h] [ebp-4h] BYREF
v5 = v3; /*0xffcbc5cb*/
v5 = *(unsigned __int8 *)(7688 * n3 + GetSocketInfo((int)__return_address, n2) + 311); /*0xffcbc5e9*/
MailBoxFunc9805(__return_address, 5, &v5); /*0xffcbc5f5*/
return v5; /*0xffcbc602*/
}
// Function: KtiFuncC604 @ 0xffcbc604 (0x3c bytes)
// Index: 1583/2560
unsigned int __cdecl KtiFuncC604(_BYTE *__return_address, unsigned __int8 n2, unsigned __int8 n3)
{
unsigned int v3; // ecx
unsigned int v5; // [esp+0h] [ebp-4h] BYREF
v5 = v3; /*0xffcbc607*/
v5 = *(unsigned __int8 *)(7688 * n3 + GetSocketInfo((int)__return_address, n2) + 318); /*0xffcbc625*/
MailBoxFunc9805(__return_address, 7, &v5); /*0xffcbc631*/
return v5; /*0xffcbc63e*/
}
// Function: KtiFuncC640 @ 0xffcbc640 (0x3c bytes)
// Index: 1584/2560
unsigned int __cdecl KtiFuncC640(_BYTE *__return_address, unsigned __int8 n2, unsigned __int8 n3)
{
unsigned int v3; // ecx
unsigned int v5; // [esp+0h] [ebp-4h] BYREF
v5 = v3; /*0xffcbc643*/
v5 = *(unsigned __int8 *)(7688 * n3 + GetSocketInfo((int)__return_address, n2) + 319); /*0xffcbc661*/
MailBoxFunc9805(__return_address, 9, &v5); /*0xffcbc66d*/
return v5; /*0xffcbc67a*/
}
// Function: KtiFuncC67C @ 0xffcbc67c (0x41 bytes)
// Index: 1585/2560
unsigned int __cdecl KtiFuncC67C(unsigned int __return_address)
{
_BYTE *__return_address_1; // esi
unsigned int v2; // ecx
__return_address_1 = (_BYTE *)__return_address; /*0xffcbc680*/
v2 = dword_FFD42E74[*(unsigned __int8 *)(__return_address + 257311)]; /*0xffcbc68e*/
__return_address = (v2 + 74999) / v2; /*0xffcbc69e*/
if ( __return_address < 4 ) /*0xffcbc6a3*/
__return_address = 4; /*0xffcbc6a5*/
MailBoxFunc9805(__return_address_1, 16, &__return_address); /*0xffcbc6af*/
return __return_address; /*0xffcbc6ba*/
}
// Function: KtiFuncC6BD @ 0xffcbc6bd (0x47 bytes)
// Index: 1586/2560
unsigned int __cdecl KtiFuncC6BD(unsigned int __return_address)
{
_BYTE *__return_address_1; // esi
int v2; // ecx
unsigned __int64 v3; // rax
__return_address_1 = (_BYTE *)__return_address; /*0xffcbc6c1*/
HIDWORD(v3) = 0; /*0xffcbc6c4*/
v2 = dword_FFD42E74[*(unsigned __int8 *)(__return_address + 257311)]; /*0xffcbc6d5*/
LODWORD(v3) = v2 + 59999900; /*0xffcbc6dc*/
if ( *(_WORD *)(__return_address + 257315) != 11 ) /*0xffcbc6e2*/
LODWORD(v3) = v2 + 49999900; /*0xffcbc6e4*/
__return_address = v3 / (unsigned int)v2; /*0xffcbc6ec*/
MailBoxFunc9805(__return_address_1, 23, &__return_address); /*0xffcbc6f6*/
return __return_address; /*0xffcbc701*/
}
// Function: KtiFuncC704 @ 0xffcbc704 (0x37 bytes)
// Index: 1587/2560
unsigned int __cdecl KtiFuncC704(unsigned int n6)
{
_BYTE *n6_1; // esi
unsigned int v2; // ecx
n6_1 = (_BYTE *)n6; /*0xffcbc708*/
v2 = dword_FFD42E74[*(unsigned __int8 *)(n6 + 257311)]; /*0xffcbc714*/
n6 = (v2 + 149999) / v2; /*0xffcbc723*/
MailBoxFunc9805(n6_1, 19, &n6); /*0xffcbc72d*/
return n6; /*0xffcbc738*/
}
// Function: KtiFuncC73B @ 0xffcbc73b (0x41 bytes)
// Index: 1588/2560
unsigned int __cdecl KtiFuncC73B(unsigned int n4)
{
_BYTE *n4_1; // esi
unsigned int v2; // ecx
n4_1 = (_BYTE *)n4; /*0xffcbc73f*/
v2 = dword_FFD42E74[*(unsigned __int8 *)(n4 + 257311)]; /*0xffcbc74d*/
n4 = (v2 + 74900) / v2; /*0xffcbc75d*/
if ( n4 < 4 ) /*0xffcbc762*/
n4 = 4; /*0xffcbc764*/
MailBoxFunc9805(n4_1, 10, &n4); /*0xffcbc76e*/
return n4; /*0xffcbc779*/
}
// Function: KtiFuncC77C @ 0xffcbc77c (0x41 bytes)
// Index: 1589/2560
unsigned int __cdecl KtiFuncC77C(unsigned int __return_address)
{
_BYTE *__return_address_1; // esi
unsigned int v2; // ecx
__return_address_1 = (_BYTE *)__return_address; /*0xffcbc780*/
v2 = dword_FFD42E74[*(unsigned __int8 *)(__return_address + 257311)]; /*0xffcbc78e*/
__return_address = (v2 + 74900) / v2; /*0xffcbc79e*/
if ( __return_address < 4 ) /*0xffcbc7a3*/
__return_address = 4; /*0xffcbc7a5*/
MailBoxFunc9805(__return_address_1, 12, &__return_address); /*0xffcbc7af*/
return __return_address; /*0xffcbc7ba*/
}
// Function: KtiFuncC7BD @ 0xffcbc7bd (0x41 bytes)
// Index: 1590/2560
unsigned int __cdecl KtiFuncC7BD(unsigned int __return_address)
{
_BYTE *__return_address_1; // esi
unsigned int v2; // ecx
__return_address_1 = (_BYTE *)__return_address; /*0xffcbc7c1*/
v2 = dword_FFD42E74[*(unsigned __int8 *)(__return_address + 257311)]; /*0xffcbc7cf*/
__return_address = (v2 + 24900) / v2; /*0xffcbc7df*/
if ( __return_address < 2 ) /*0xffcbc7e4*/
__return_address = 2; /*0xffcbc7e6*/
MailBoxFunc9805(__return_address_1, 11, &__return_address); /*0xffcbc7f0*/
return __return_address; /*0xffcbc7fb*/
}
// Function: KtiFuncC7FE @ 0xffcbc7fe (0x76 bytes)
// Index: 1591/2560
unsigned int __cdecl KtiFuncC7FE(unsigned int __return_address, unsigned __int8 n2)
{
_BYTE *__return_address_1; // esi
int n60000; // edx
unsigned int v4; // ecx
__return_address_1 = (_BYTE *)__return_address; /*0xffcbc802*/
if ( *(_WORD *)(__return_address + 257315) == 11 )
n60000 = *(_WORD *)(48704 * n2 + __return_address + 258695) < 0x29Au ? 75000 : 60000;
else
n60000 = 60000; /*0xffcbc836*/
v4 = dword_FFD42E74[*(unsigned __int8 *)(__return_address + 257311)]; /*0xffcbc844*/
__return_address = (n60000 + v4 - 100) / v4; /*0xffcbc855*/
if ( __return_address < 3 ) /*0xffcbc85a*/
__return_address = 3; /*0xffcbc85c*/
MailBoxFunc9805(__return_address_1, 21, &__return_address); /*0xffcbc866*/
return __return_address; /*0xffcbc871*/
}
// Function: KtiFuncC874 @ 0xffcbc874 (0x37 bytes)
// Index: 1592/2560
unsigned int __cdecl KtiFuncC874(unsigned int __return_address)
{
_BYTE *__return_address_1; // esi
unsigned int v2; // ecx
__return_address_1 = (_BYTE *)__return_address; /*0xffcbc878*/
v2 = dword_FFD42E74[*(unsigned __int8 *)(__return_address + 257311)]; /*0xffcbc884*/
__return_address = (v2 + 99900) / v2; /*0xffcbc893*/
MailBoxFunc9805(__return_address_1, 27, &__return_address); /*0xffcbc89d*/
return __return_address; /*0xffcbc8a8*/
}
// Function: KtiFuncC8AB @ 0xffcbc8ab (0x90 bytes)
// Index: 1593/2560
char __cdecl KtiFuncC8AB(
int __return_address,
int n4,
int n6,
int n2,
int a5,
unsigned __int8 a6,
char a7,
unsigned __int8 n0x10)
{
unsigned __int8 v8; // al
int n4_1; // ebx
v8 = 32 * a7; /*0xffcbc8be*/
if ( n0x10 < 0x10u ) /*0xffcbc8c6*/
{
RmtFunc765(__return_address, n4, n6, n2, 0, v8, 0x40u); /*0xffcbc8fb*/
n4_1 = n4; /*0xffcbc90a*/
RmtFunc765(__return_address, n4, n6, n2, 0, a6 | (16 * n0x10), 0x60u); /*0xffcbc91a*/
}
else
{
n4_1 = n4; /*0xffcbc8cd*/
RmtFunc765(__return_address, n4, n6, n2, 0, (n0x10 >> 4) | v8, 0x40u); /*0xffcbc8de*/
RmtFunc765(__return_address, n4, n6, n2, 0, a6, 0x60u); /*0xffcbc8e9*/
}
return RmtFunc765(__return_address, n4_1, n6, n2, 0, 5u, 6u); /*0xffcbc937*/
}
// Function: KtiFuncC93B @ 0xffcbc93b (0x119 bytes)
// Index: 1594/2560
int __cdecl KtiFuncC93B(_BYTE *__return_address, int n2, int n6a, int a4)
{
int CpuCount; // esi
int v5; // esi
int CpuCount_2; // ecx
int v8; // [esp+10h] [ebp-8h] BYREF
int CpuCount_1; // [esp+14h] [ebp-4h]
CpuCount = GetCpuCount((int)__return_address, n2, n6a); /*0xffcbc958*/
CpuCount_1 = CpuCount; /*0xffcbc95e*/
KtiFuncF64B(__return_address, n2, n6a, a4, 0, &v8); /*0xffcbc96c*/
if ( KtiFuncF64B(__return_address, n2, n6a, a4, 0, &v8) )
{
DebugPrint((int)__return_address, 3, n2, n6a, a4, 255, 255, 255, "LRDIMM SMBus Read failed\n"); /*0xffcbc9e2*/
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemJedec.c",
4243,
"FALSE");
ProcMemInitCheck((int)__return_address, 246, 3); /*0xffcbca0e*/
}
else
{
v5 = 1379 * (unsigned __int8)a4; /*0xffcbc997*/
*(_DWORD *)(v5 + CpuCount_1 + 213) = v8; /*0xffcbc9a1*/
KtiFuncF64B(__return_address, n2, n6a, a4, 4u, &v8); /*0xffcbc9b6*/
CpuCount_2 = CpuCount_1; /*0xffcbc9bb*/
*(_BYTE *)(v5 + CpuCount_1 + 217) = v8; /*0xffcbc9c6*/
CpuCount = CpuCount_2; /*0xffcbc9cd*/
}
return DebugPrint( /*0xffcbca4d*/
(int)__return_address,
2,
n2,
n6a,
a4,
255,
255,
255,
"LRDIMM Vid/Did = 0x%08x, Rid = 0x%02x\n",
*(_DWORD *)(1379 * (unsigned __int8)a4 + CpuCount + 213),
*(unsigned __int8 *)(1379 * (unsigned __int8)a4 + CpuCount + 217));
}
// Function: KtiFuncCA54 @ 0xffcbca54 (0xf bytes)
// Index: 1595/2560
unsigned int __cdecl KtiFuncCA54(int a1)
{
return (a1 ^ 0xFFFE2BF8) & 0x3FFFF; /*0xffcbca62*/
}
// Function: KtiFuncCA63 @ 0xffcbca63 (0x9 bytes)
// Index: 1596/2560
char __cdecl KtiFuncCA63(char a1)
{
return ~a1 & 0xF; /*0xffcbca6b*/
}
// Function: KtiFuncCA6C @ 0xffcbca6c (0xc2 bytes)
// Index: 1597/2560
char __cdecl KtiFuncCA6C(_BYTE *__return_address, unsigned __int8 n6)
{
unsigned __int8 n6_1; // bl
int SocketInfo; // edi
int v5; // ebp
unsigned __int8 v6; // bh
unsigned __int8 v8; // [esp+10h] [ebp-8h]
int CpuCount; // [esp+14h] [ebp-4h]
unsigned __int8 v10; // [esp+1Ch] [ebp+4h]
if ( !__return_address[193] || !__return_address[194] ) /*0xffcbca83*/
return 0; /*0xffcbcb21*/
n6_1 = 0; /*0xffcbca9b*/
SocketInfo = GetSocketInfo((int)__return_address, n6); /*0xffcbca9d*/
v10 = 0; /*0xffcbcaa0*/
while ( 1 ) /*0xffcbcaa7*/
{
v5 = 7688 * n6_1; /*0xffcbcaa7*/
if ( *(_BYTE *)(SocketInfo + v5) ) /*0xffcbcaad*/
{
v6 = 0; /*0xffcbcac1*/
CpuCount = GetCpuCount((int)__return_address, n6, v10); /*0xffcbcac3*/
v8 = 0; /*0xffcbcaca*/
if ( *(_BYTE *)(SocketInfo + v5 + 3) ) /*0xffcbcace*/
break; /*0xffcbcace*/
}
LABEL_10:
v10 = ++n6_1; /*0xffcbcb18*/
if ( n6_1 >= 6u ) /*0xffcbcb1f*/
return 0; /*0xffcbcb1f*/
}
while ( !KtiFuncCB2E((int)__return_address, n6, v10, v8) /*0xffcbcb08*/
&& (!*(_BYTE *)(1379 * v6 + CpuCount + 107) || !__return_address[195]) )
{
v8 = ++v6; /*0xffcbcb0c*/
if ( v6 >= *(_BYTE *)(SocketInfo + v5 + 3) ) /*0xffcbcb14*/
goto LABEL_10; /*0xffcbcb14*/
}
return 1; /*0xffcbcb23*/
}
// Function: KtiFuncCB2E @ 0xffcbcb2e (0x46 bytes)
// Index: 1598/2560
bool __cdecl KtiFuncCB2E(int a1, unsigned __int8 a2, unsigned __int8 a3, unsigned __int8 a4)
{
int CpuCount; // eax
CpuCount = GetCpuCount(a1, a2, a3); /*0xffcbcb3c*/
return *(_WORD *)(a1 + 257315) != 11 /*0xffcbcb6e*/
&& !*(_BYTE *)(a1 + 257313)
&& (*(_BYTE *)(1379 * a4 + CpuCount + 131) & 0x10) != 0;
}
// Function: KtiFuncCB74 @ 0xffcbcb74 (0x116 bytes)
// Index: 1599/2560
int __cdecl KtiFuncCB74(unsigned __int8 *__return_address, int n4)
{
int SocketInfo; // esi
unsigned __int8 n6_1; // bl
unsigned __int8 *v4; // esi
int CpuCount; // eax
unsigned __int8 v6; // bh
unsigned __int16 *v7; // esi
unsigned __int8 n4_1; // bl
int n6; // [esp+10h] [ebp-14h]
int n2; // [esp+14h] [ebp-10h]
unsigned __int8 n4_2; // [esp+18h] [ebp-Ch]
unsigned __int8 *v13; // [esp+1Ch] [ebp-8h]
int CpuCount_1; // [esp+20h] [ebp-4h]
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffcbcb8b*/
ProcCommonFuncFBF1((int)__return_address); /*0xffcbcb8d*/
n6_1 = 0; /*0xffcbcb92*/
v4 = (unsigned __int8 *)(SocketInfo + 3); /*0xffcbcb97*/
LOBYTE(n6) = 0; /*0xffcbcb9a*/
v13 = v4; /*0xffcbcb9e*/
do /*0xffcbcc6b*/
{
if ( *(v4 - 3) ) /*0xffcbcba2*/
{
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffcbcbb2*/
v6 = 0; /*0xffcbcbb7*/
CpuCount_1 = CpuCount; /*0xffcbcbb9*/
LOBYTE(n2) = 0; /*0xffcbcbc0*/
if ( *v4 ) /*0xffcbcbc4*/
{
do /*0xffcbcc4e*/
{
if ( *(_BYTE *)(1379 * v6 + CpuCount) ) /*0xffcbcbd5*/
{
v7 = (unsigned __int16 *)KtiFunc91DE((int)__return_address, n4, n6, n2); /*0xffcbcbed*/
n4_1 = 0; /*0xffcbcbef*/
n4_2 = 0; /*0xffcbcbf1*/
do /*0xffcbcc3c*/
{
if ( !KtiFunc89E9((int)__return_address, n4, n6, n2, n4_2, 0) ) /*0xffcbcc05*/
RmtFunc349(__return_address, n4, n6, n2, n4_2, *v7, 0); /*0xffcbcc25*/
++n4_1; /*0xffcbcc2d*/
v7 += 122; /*0xffcbcc2f*/
n4_2 = n4_1; /*0xffcbcc35*/
}
while ( n4_1 < 4u ); /*0xffcbcc3c*/
v4 = v13; /*0xffcbcc3e*/
CpuCount = CpuCount_1; /*0xffcbcc42*/
}
LOBYTE(n2) = ++v6; /*0xffcbcc48*/
}
while ( v6 < *v4 ); /*0xffcbcc4e*/
n6_1 = n6; /*0xffcbcc54*/
}
}
++n6_1; /*0xffcbcc58*/
v4 += 7688; /*0xffcbcc5a*/
LOBYTE(n6) = n6_1; /*0xffcbcc60*/
v13 = v4; /*0xffcbcc64*/
}
while ( n6_1 < 6u ); /*0xffcbcc6b*/
KtiFunc8C4((int)__return_address, 1u); /*0xffcbcc74*/
return ProcCommonFuncFBFD((int)__return_address); /*0xffcbcc82*/
}
// Function: KtiFuncCC8A @ 0xffcbcc8a (0x7a bytes)
// Index: 1600/2560
char __cdecl KtiFuncCC8A(_BYTE *n6, int n4, int n63)
{
unsigned __int8 n6_2; // bl
_BYTE *SocketInfo; // esi
char v5; // di
int v6; // eax
int n6_1; // [esp+10h] [ebp-4h]
DebugPrint((int)n6, 2, 255, 255, 255, 255, 255, 255, "JEDEC Init\n"); /*0xffcbcca5*/
n6_2 = 0; /*0xffcbccbe*/
SocketInfo = (_BYTE *)GetSocketInfo((int)n6, n4); /*0xffcbccc0*/
LOBYTE(n6_1) = 0; /*0xffcbccc2*/
v5 = 0; /*0xffcbccc6*/
do /*0xffcbccfc*/
{
v6 = 1 << v5; /*0xffcbcccd*/
if ( ((1 << v5) & n63) != 0 && *SocketInfo ) /*0xffcbccd3*/
LOBYTE(v6) = KtiFuncCD04(n6, n4, n6_1); /*0xffcbcce4*/
++n6_2; /*0xffcbccec*/
SocketInfo += 7688; /*0xffcbccee*/
++v5; /*0xffcbccf4*/
LOBYTE(n6_1) = n6_2; /*0xffcbccf5*/
}
while ( n6_2 < 6u ); /*0xffcbccfc*/
return v6; /*0xffcbccfe*/
}
// Function: KtiFuncCD04 @ 0xffcbcd04 (0x89b bytes)
// Index: 1601/2560
unsigned __int8 __cdecl KtiFuncCD04(_BYTE *n6, int n2, int n3)
{
_BYTE *n6_1; // esi
int SocketInfo; // ebp
int v5; // edi
unsigned __int8 v6; // al
bool v7; // zf
_BYTE *n3_2; // edi
int v9; // ecx
int CpuCount_1; // edx
char n3_3; // al
unsigned __int8 v12; // al
int v13; // ecx
int n8; // eax
int v15; // ecx
unsigned __int8 v16; // al
int v17; // edx
unsigned __int8 v18; // al
int v19; // eax
unsigned __int8 n6a_1; // cl
int CpuCount_2; // edx
unsigned __int8 n6_2; // cl
__int16 n12; // ax
int CpuCount_4; // eax
int v25; // ecx
int CpuCount_3; // edx
unsigned __int8 v27; // al
int v28; // eax
unsigned __int8 n6_3; // al
_BYTE *v30; // ebp
unsigned __int8 n11; // al
int v32; // ecx
int v33; // [esp+10h] [ebp-18h]
int CpuCount; // [esp+14h] [ebp-14h]
int SocketInfo_1; // [esp+18h] [ebp-10h]
unsigned __int8 v36; // [esp+1Ch] [ebp-Ch]
unsigned __int8 v37[4]; // [esp+1Ch] [ebp-Ch]
unsigned __int8 v38[4]; // [esp+1Ch]... [14762 chars total]
// Function: KtiFuncD59F @ 0xffcbd59f (0x2ea bytes)
// Index: 1602/2560
int __cdecl KtiFuncD59F(_BYTE *__return_address, int n4, int n63)
{
_BYTE *buf_1; // ebx
unsigned __int8 *p_count; // edi
int n6_1; // ebp
unsigned __int8 n4_1; // bl
unsigned __int8 *p_count_2; // edi
unsigned __int8 n6_2; // dl
int v10; // ebp
int CpuCount; // edx
unsigned __int8 i_1; // al
int v13; // ecx
int v14; // eax
unsigned __int8 n6_3; // bh
int v16; // ebp
unsigned __int8 *p_count_3; // ecx
int CpuCount_2; // eax
unsigned __int8 count; // bl
char v21; // [esp+12h] [ebp-26h]
unsigned __int8 v22; // [esp+12h] [ebp-26h]
char v23; // [esp+13h] [ebp-25h]
int n6_4; // [esp+14h] [ebp-24h]
int v25; // [esp+18h] [ebp-20h]
char i; // [esp+18h] [ebp-20h]
unsigned __int8 *p_count_1; // [esp+1Ch] [ebp-1Ch]
int v28; // [esp+20h] [ebp-18h] BYREF
int CpuCount_1; // [esp+24h] [ebp-14h]
int i_2; // [esp+28h] [ebp-10h]
_BYTE buf[12]; // [esp+2Ch] [ebp-Ch] BYREF
char n6; // [esp+3Ch] [ebp+4h]
v28 = 0; /*0xffcbd5a2*/
buf_1 = buf; /*0xffcbd5bf*/
p_count_1 = (unsigned __int8 *)(GetSocketInfo((int)__return_address, n4) + 3); /*0xffcbd5c5*/
p_count = p_count_1; /*0xffcbd5c9*/
n6_1 = 6; /*0xffcbd5cb*/
do /*0xffcbd5ed*/
{
if ( *p_count ) /*0xffcbd5cc*/
KtiFunc7D83(buf_1, 0, *p_count); /*0xffcbd5d9*/
p_count += 7688; /*0xffcbd5e1*/
buf_1 += 2; /*0xffcbd5e7*/
--n6_1; /*0xffcbd5ea*/
}
while ( n6_1 ); /*0xffcbd5ed*/
n4_1 = n4; /*0xffcbd5f5*/
n6 = 0; /*0xffcbd5f9*/
v23 = __return_address[9479]; /*0xffcbd5fe*/
do /*0xffcbd731*/
{
v21 = 0; /*0xffcbd606*/
DdrTrainFunc69F7((int)__return_address, n4_1, n63); /*0xffcbd60d*/
if ( !__return_address[257313] && *(_WORD *)(__return_address + 257315) == 12 ) /*0xffcbd62a*/
{
p_count_2 = p_count_1; /*0xffcbd630*/
n6_2 = 0; /*0xffcbd634*/
LOBYTE(n6_4) = 0; /*0xffcbd636*/
v10 = 0; /*0xffcbd63a*/
do /*0xffcbd71d*/
{
if ( ((1 << v10) & n63) != 0 && *(p_count_2 - 3) ) /*0xffcbd64d*/
{
CpuCount = GetCpuCount((int)__return_address, n4_1, n6_4); /*0xffcbd662*/
i_1 = 0; /*0xffcbd667*/
CpuCount_1 = CpuCount; /*0xffcbd669*/
for ( i = 0; i_1 < *p_count_2; i = i_1 ) /*0xffcbd671*/
{
i_2 = i_1; /*0xffcbd67c*/
v13 = 1379 * i_1; /*0xffcbd680*/
if ( *(_BYTE *)(v13 + CpuCount) ) /*0xffcbd686*/
{
n4_1 = n4; /*0xffcbd699*/
if ( *(_WORD *)(v13 + CpuCount + 140) == 0xB300 && *(_BYTE *)(v13 + CpuCount + 38) == 32 ) /*0xffcbd6a4*/
{
KtiFuncF64B(__return_address, n4, n6_4, i, 0x1010u, &v28); /*0xffcbd6ba*/
if ( (v28 & 0x200) == 0 || (v28 & 0x1000) != 0 ) /*0xffcbd6d4*/
{
v14 = i_2 + 2 * v10; /*0xffcbd6da*/
if ( ++buf[v14] >= 5u ) /*0xffcbd6e7*/
n6 = 1; /*0xffcbd6e9*/
v21 = 1; /*0xffcbd6ee*/
}
CpuCount = CpuCount_1; /*0xffcbd6f3*/
i_1 = i; /*0xffcbd6f7*/
}
}
++i_1; /*0xffcbd6fb*/
}
n6_2 = n6_4; /*0xffcbd709*/
}
++n6_2; /*0xffcbd70d*/
p_count_2 += 7688; /*0xffcbd70f*/
++v10; /*0xffcbd715*/
LOBYTE(n6_4) = n6_2; /*0xffcbd716*/
}
while ( n6_2 < 6u ); /*0xffcbd71d*/
}
}
while ( ((unsigned __int8)((n6 != 0) - 1) & (unsigned __int8)v21) != 0 ); /*0xffcbd731*/
n6_3 = 0; /*0xffcbd73b*/
LOBYTE(n6_4) = 0; /*0xffcbd73d*/
v16 = 0; /*0xffcbd741*/
do /*0xffcbd7ef*/
{
p_count_3 = p_count_1; /*0xffcbd74a*/
if ( ((1 << v16) & n63) != 0 ) /*0xffcbd752*/
{
if ( *(p_count_1 - 3) ) /*0xffcbd758*/
{
CpuCount_2 = GetCpuCount((int)__return_address, n4, n6_4); /*0xffcbd764*/
p_count_3 = p_count_1; /*0xffcbd769*/
count = 0; /*0xffcbd76d*/
CpuCount_1 = CpuCount_2; /*0xffcbd772*/
for ( LOBYTE(v25) = 0; count < *p_count_1; LOBYTE(v25) = count ) /*0xffcbd77a*/
{
if ( *(_BYTE *)(1379 * count + CpuCount_2) ) /*0xffcbd787*/
{
v22 = buf[2 * v16 + count]; /*0xffcbd794*/
if ( v22 ) /*0xffcbd79a*/
{
ProcCommonFuncFBFD((int)__return_address); /*0xffcbd79d*/
DebugPrint((int)__return_address, 3, n4, n6_4, v25, 255, 255, 255, "# PLL Lock errors=%d\n", v22); /*0xffcbd7c1*/
}
CpuCount_2 = CpuCount_1; /*0xffcbd7c9*/
}
p_count_3 = p_count_1; /*0xffcbd7cd*/
++count; /*0xffcbd7d1*/
}
}
}
++n6_3; /*0xffcbd7db*/
++v16; /*0xffcbd7e3*/
LOBYTE(n6_4) = n6_3; /*0xffcbd7e4*/
p_count_1 = p_count_3 + 7688; /*0xffcbd7e8*/
}
while ( n6_3 < 6u ); /*0xffcbd7ef*/
if ( n6 ) /*0xffcbd7fa*/
{
DebugPrint((int)__return_address, 3, 255, 255, 255, 255, 255, 255, "PLL lock errors\n"); /*0xffcbd80f*/
ProcMemInitCheck((int)__return_address, 236, 1); /*0xffcbd81c*/
}
__return_address[9479] = v23; /*0xffcbd82a*/
if ( !*((_DWORD *)__return_address + 61601) && *(_DWORD *)(__return_address + 9405) != 10 ) /*0xffcbd83f*/
KtiFuncCC8A(__return_address, n4, n63); /*0xffcbd847*/
*((_DWORD *)__return_address + 61067) = n63; /*0xffcbd853*/
__return_address[244267] = 1; /*0xffcbd860*/
if ( __return_address[(unsigned __int8)n4 + 214125] ) /*0xffcbd867*/
RmtFunc3741(__return_address, 0); /*0xffcbd872*/
__return_address[244267] = 0; /*0xffcbd87a*/
return 0; /*0xffcbd879*/
}
// Function: MemCmdControlMain @ 0xffcbd889 (0x1259 bytes)
// Index: 1603/2560
char __cdecl MemCmdControlMain(unsigned __int8 *n6, int n2, int n6a, int n2_1, int n2a)
{
int CpuCount; // esi
int SocketInfo; // eax
int n2a_1; // edx
int n2_2; // ecx
int v10; // eax
int n2_3; // esi
unsigned __int8 n8; // al
unsigned __int8 v13; // dl
char n3; // dh
int n2_4; // ebx
unsigned __int8 v16; // al
unsigned __int8 v17; // dh
char i; // dl
int CpuCount_2; // eax
int v21; // ecx
unsigned __int8 v22; // dl
char v23; // dl
char n4; // al
unsigned __int8 v25; // dl
unsigned __int8 v26; // al
int CpuCount_3; // eax
int v28; // ecx
int CpuCount_4; // edx
unsigned __int8 n6c_1; // al
int v31; // ecx
int v32; // esi
unsigned __int8 v33; // al
_BYTE *v34; // eax
unsigned __int8 n3_3; // al
unsigned __int8 n7; // al
char n24; // dl
char v38; // bl
unsigned __int8 n0x10_1; // al
bool v40; // zf
unsigned __int8 v41; // bl
unsigned __int8 v43; // [esp-40h] [ebp-74h]
unsigned __int8 v44; // [esp+13h] [ebp-21h]
i... [20927 chars total]
// Function: KtiFuncEAE2 @ 0xffcbeae2 (0x34 bytes)
// Index: 1604/2560
char __cdecl KtiFuncEAE2(int a1, unsigned __int8 a2)
{
char v2; // dl
v2 = ((a2 & 2) != 0) | (2 * (a2 & 1)); /*0xffcbeaf6*/
if ( *(_WORD *)(a1 + 257315) != 11 ) /*0xffcbeb04*/
return (a2 >> 1) & 4 | (2 * (a2 & 4)) | v2; /*0xffcbeb10*/
return v2; /*0xffcbeb14*/
}
// Function: KtiFuncEB16 @ 0xffcbeb16 (0xaf bytes)
// Index: 1605/2560
unsigned __int8 __cdecl KtiFuncEB16(
unsigned __int8 *__return_address,
int n4,
int n6,
int a4,
unsigned __int8 a5,
char a6,
__int16 a7)
{
unsigned __int8 v8; // bl
int CpuCount; // edx
int v10; // ecx
char v12; // al
unsigned int v13; // edi
char v14; // [esp+1Ch] [ebp+14h]
v8 = a4; /*0xffcbeb2a*/
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffcbeb2d*/
v10 = 1379 * (unsigned __int8)a4; /*0xffcbeb35*/
if ( *(_BYTE *)(v10 + CpuCount + 107) ) /*0xffcbeb3b*/
return ProcCommonFunc2BBD(__return_address, n4, n6, a4, a7); /*0xffcbeb4d*/
v12 = 0; /*0xffcbeb57*/
v13 = (unsigned __int8)a7; /*0xffcbeb5e*/
v14 = 0; /*0xffcbeb62*/
if ( (a5 & 1) != 0 && *(_BYTE *)(v10 + CpuCount + 37) ) /*0xffcbeb67*/
{
v13 = IioTailX_FFD059F0((int)__return_address, (unsigned __int8)a7); /*0xffcbeb77*/
v12 = KtiFuncEAE2((int)__return_address, 0); /*0xffcbeb79*/
v14 = v12; /*0xffcbeb81*/
}
if ( a6 == 1 ) /*0xffcbeb88*/
{
v13 = (v13 ^ 0xFFFE2BF8) & 0x3FFFF; /*0xffcbeb92*/
v14 = (v12 ^ 0xFC) & 0xF; /*0xffcbeb9a*/
}
DdrTrainFunc236F((int)__return_address, n4, n6, v8, a5, 4, v14, v13, 0); /*0xffcbebb0*/
return KtiFunc8C4((int)__return_address, 1u); /*0xffcbebc1*/
}
// Function: KtiFuncEBC5 @ 0xffcbebc5 (0x2a6 bytes)
// Index: 1606/2560
char __cdecl KtiFuncEBC5(unsigned __int8 *n6, int n2, _BYTE *n3, int n2a, int a5)
{
int v5; // esi
int v6; // edi
unsigned __int8 v7; // dl
unsigned __int8 v8; // dl
char p_n0xE_1; // ch
int v10; // ebp
int SocketInfo_1; // ebx
__int16 v12; // cx
char result; // al
char p_n0xE; // [esp+13h] [ebp-15h] BYREF
unsigned __int8 v15; // [esp+14h] [ebp-14h] BYREF
unsigned __int8 v16; // [esp+15h] [ebp-13h] BYREF
unsigned __int8 v17; // [esp+16h] [ebp-12h]
char v18; // [esp+17h] [ebp-11h] BYREF
int v19; // [esp+18h] [ebp-10h]
__int16 n60[2]; // [esp+1Ch] [ebp-Ch] BYREF
int v21; // [esp+20h] [ebp-8h]
int SocketInfo; // [esp+24h] [ebp-4h]
SocketInfo = GetSocketInfo((int)n6, n2); /*0xffcbebe6*/
v19 = KtiFunc91AF((int)n6, n2, (unsigned __int8)n3, n2a); /*0xffcbebf3*/
*(_DWORD *)n60 = 0; /*0xffcbebff*/
v5 = KtiFunc91DE((int)n6, n2, (unsigned __int8)n3, n2a); /*0xffcbec04*/
KtiFuncBD44((int)n6, n2, (int)n3, n2a, 0, 2, n60); /*0xffcbec16*/
v6 = 244 * (unsigned __int8)a5; /*0xffcbec28*/
v21 = (unsigned __int8)a5; /*0xffcbec2e*/
*(_WORD *)(v6 + v5) = 256; /*0xffcbec37*/
ProcCommonFunc1B0D((int)n6, n2, (char)n3, n2a, &v15, &p_n0xE); /*0xffcbec4f*/
ProcCommonFunc1BDA((int)n6, n2, (char)n3, n2a, &v16, &v18); /*0xffcbec68*/
v7 = v15; /*0xffcbec74*/
if ( v15 + (unsigned int)v16 < 0xC ) /*0xffcbec83*/
v7 = 12 - v16; /*0xffcbec87*/
v8 = v7 - 9; /*0xffcbec8d*/
v17 = v8; /*0xffcbec90*/
v15 = v8; /*0xffcbec94*/
if ( (unsigned __int8)p_n0xE >= 0xEu ) /*0xffcbec9b*/
{
v8 = v17; /*0xffcbecad*/
p_n0xE_1 = -10 - ((unsigned __int8)p_n0xE - 14) / 2 + p_n0xE; /*0xffcbecb5*/
}
else
{
p_n0xE_1 = p_n0xE - 9; /*0xffcbec9d*/
}
v10 = 242 * v21; /*0xffcbecb7*/
SocketInfo_1 = SocketInfo; /*0xffcbecbf*/
p_n0xE = p_n0xE_1; /*0xffcbecca*/
*(_WORD *)(v6 + v5) |= word_FFD5BC90[v8]; /*0xffcbecd6*/
*(_WORD *)(v6 + v5 + 2) = *(_WORD *)(v19 + v10 + 14); /*0xffcbece3*/
v12 = 8 * (unsigned __int8)p_n0xE; /*0xffcbecf6*/
*(_WORD *)(v6 + v5 + 4) = v12; /*0xffcbecfa*/
if ( *(_BYTE *)(7688 * (unsigned __int8)n3 + SocketInfo_1 + 6) == 2 ) /*0xffcbed08*/
*(_WORD *)(v6 + v5 + 4) = v12 | 0x40; /*0xffcbed0e*/
*(_WORD *)(v6 + v5 + 4) |= *(_WORD *)(v19 + v10 + 10); /*0xffcbed20*/
*(_DWORD *)(v6 + v5 + 6) = 0; /*0xffcbed27*/
if ( n6[48704 * (unsigned __int8)n2 + 258694] >= 0xCu ) /*0xffcbed3c*/
{
if ( n6[1006] == 1 ) /*0xffcbed45*/
*(_WORD *)(v6 + v5 + 8) = 4096; /*0xffcbed4c*/
if ( n6[1007] == 1 ) /*0xffcbed58*/
*(_WORD *)(v6 + v5 + 8) |= 0x800u; /*0xffcbed5f*/
}
*(_WORD *)(v6 + v5 + 10) = *(_WORD *)(v19 + v10 + 12); /*0xffcbed76*/
nullsub_5(); /*0xffcbed7b*/
RmtFunc349(n6, n2, (int)n3, n2a, a5, *(unsigned __int16 *)(v6 + v5 + 6), 3); /*0xffcbed9a*/
RmtFunc349(n6, n2, (int)n3, n2a, a5, *(unsigned __int16 *)(v6 + v5 + 10), 5); /*0xffcbedb5*/
RmtFunc349(n6, n2, (int)n3, n2a, a5, *(unsigned __int16 *)(v6 + v5 + 8), 4); /*0xffcbedd3*/
RmtFunc349(n6, n2, (int)n3, n2a, a5, *(unsigned __int16 *)(v6 + v5 + 4), 2); /*0xffcbedee*/
RmtFunc349(n6, n2, (int)n3, n2a, a5, *(unsigned __int16 *)(v6 + v5 + 2), 1); /*0xffcbee09*/
RmtFunc349(n6, n2, (int)n3, n2a, a5, *(unsigned __int16 *)(v6 + v5), 0); /*0xffcbee27*/
nullsub_5(); /*0xffcbee35*/
result = ProcCommonFunc59F5((int)n6, n2); /*0xffcbee3c*/
if ( result ) /*0xffcbee46*/
return RmtFuncEF44(n6, n2, n3, n2a, a5, n60[0], 0, 53); /*0xffcbee5b*/
return result; /*0xffcbee63*/
}
// Function: KtiFn_FFCBEE6B @ 0xffcbee6b (0x2e0 bytes)
// Index: 1607/2560
char __cdecl KtiFn_FFCBEE6B(_BYTE *n6, int n2, _BYTE *n6a, _BYTE *n2_2, unsigned __int8 n2_3)
{
int v5; // esi
int v6; // edi
unsigned __int8 n2_1; // al
unsigned __int8 v8; // al
int v9; // eax
int v10; // eax
int n2_4; // eax
__int16 n3584; // ax
__int16 n0xC; // ax
__int16 v14; // ax
_BYTE *v15; // ebp
__int16 v16; // ax
__int16 v17; // ax
int SocketInfo; // [esp+10h] [ebp-14h]
int CpuCount; // [esp+14h] [ebp-10h]
int v21; // [esp+18h] [ebp-Ch]
int v22; // [esp+1Ch] [ebp-8h]
int v23; // [esp+20h] [ebp-4h]
SocketInfo = GetSocketInfo((int)n6, n2); /*0xffcbee88*/
CpuCount = GetCpuCount((int)n6, n2, (unsigned __int8)n6a); /*0xffcbee99*/
v21 = KtiFunc91AF((int)n6, n2, (unsigned __int8)n6a, (unsigned __int8)n2_2); /*0xffcbeea6*/
v5 = KtiFunc91DE((int)n6, n2, (unsigned __int8)n6a, (unsigned __int8)n2_2); /*0xffcbeeb3*/
v6 = 244 * n2_3; /*0xffcbeebd*/
*(_WORD *)(v6 + v5) = 264; /*0xffcbeeca*/
if ( n6[154] ) /*0xffcbeece*/
{
if ( n6[154] == 1 ) /*0xffcbeedd*/
goto LABEL_9; /*0xffcbeedd*/
if ( n6[154] == 2 ) /*0xffcbeee2*/
goto LABEL_10; /*0xffcbeee2*/
if ( n6[154] != 3 ) /*0xffcbeee7*/
goto LABEL_11; /*0xffcbeee7*/
n2_1 = n6[155]; /*0xffcbeee9*/
if ( n2_1 <= 2u ) /*0xffcbeef1*/
goto LABEL_10; /*0xffcbeef1*/
if ( n2_1 == 3 ) /*0xffcbeef5*/
{
LABEL_9:
*(_WORD *)(v6 + v5) = 264; /*0xffcbeeff*/
goto LABEL_11; /*0xffcbef03*/
}
if ( n2_1 != 4 ) /*0xffcbeef9*/
{
if ( n2_1 != 5 ) /*0xffcbeefd*/
goto LABEL_11; /*0xffcbeefd*/
goto LABEL_9; /*0xffcbeefd*/
}
}
LABEL_10:
*(_WORD *)(v6 + v5) = 4360; /*0xffcbef05*/
LABEL_11:
if ( RmtFuncE6B(n6, n2, (int)n6a, (unsigned __int8)n2_2, n2_3) ) /*0xffcbef19*/
*(_WORD *)(v6 + v5) |= 0x1000u; /*0xffcbef2a*/
if ( (*(_DWORD *)(n6 + 130) & 0x200) != 0 && !n6[48704 * (unsigned __int8)n2 + 258699] ) /*0xffcbef47*/
*(_WORD *)(v6 + v5) &= ~0x1000u; /*0xffcbef56*/
v8 = KtiFunc8F12((int)n6, n2); /*0xffcbef5f*/
if ( v8 ) /*0xffcbef74*/
{
v9 = v8 - 2; /*0xffcbef76*/
if ( !v9 ) /*0xffcbef78*/
{
*(_WORD *)(v6 + v5) |= 0x800u; /*0xffcbef9b*/
goto LABEL_27; /*0xffcbef9f*/
}
v10 = v9 - 2; /*0xffcbef7a*/
if ( v10 ) /*0xffcbef7c*/
{
n2_4 = v10 - 2; /*0xffcbef7e*/
if ( n2_4 ) /*0xffcbef80*/
{
if ( n2_4 != 2 ) /*0xffcbef84*/
goto LABEL_27; /*0xffcbef84*/
n3584 = 3584; /*0xffcbef86*/
}
else
{
n3584 = 3072; /*0xffcbef8d*/
}
}
else
{
n3584 = 2560; /*0xffcbef94*/
}
}
else
{
n3584 = 1024; /*0xffcbefa1*/
}
*(_WORD *)(v6 + v5) |= n3584; /*0xffcbefa6*/
LABEL_27:
v23 = 7688 * (unsigned __int8)n6a; /*0xffcbefaa*/
n0xC = *(unsigned __int8 *)(v23 + SocketInfo + 307); /*0xffcbefc8*/
if ( (unsigned __int8)n0xC >= 0xCu ) /*0xffcbefcb*/
v14 = (16 * (n0xC - 12)) | 4; /*0xffcbefdf*/
else
v14 = 16 * (n0xC - 4); /*0xffcbefd1*/
*(_WORD *)(v6 + v5) |= v14; /*0xffcbefe3*/
v22 = 242 * n2_3; /*0xffcbeff5*/
*(_WORD *)(v6 + v5 + 2) = *(_WORD *)(v22 + v21 + 14) | 2; /*0xffcbf00b*/
if ( ProcCommonFunc24FA((int)n6, n2, (unsigned __int8)n6a, (unsigned __int8)n2_2) ) /*0xffcbf011*/
{
v15 = (_BYTE *)(CpuCount + 1379 * (unsigned __int8)n2_2); /*0xffcbf02a*/
*(_WORD *)(v6 + v5 + 2) = *(_WORD *)(v6 + v5 + 2) & 0xFFDD | (2 * (v15[51] & 1 | (8 * (v15[51] & 2)))); /*0xffcbf058*/
}
else
{
v15 = (_BYTE *)(CpuCount + 1379 * (unsigned __int8)n2_2); /*0xffcbf06c*/
if ( !v15[104] ) /*0xffcbf070*/
*(_WORD *)(v6 + v5 + 2) |= 0x800u; /*0xffcbf07b*/
}
v16 = *(_WORD *)(v22 + v21 + 10) | (8 * (*(unsigned __int8 *)(v23 + SocketInfo + 320) - 5)); /*0xffcbf0a0*/
*(_WORD *)(v6 + v5 + 4) = v16; /*0xffcbf0a5*/
if ( (v15[30] & 4) != 0 ) /*0xffcbf0ae*/
{
v17 = v16 | 0x40; /*0xffcbf0b0*/
LABEL_38:
*(_WORD *)(v6 + v5 + 4) = v17; /*0xffcbf0c6*/
goto LABEL_39; /*0xffcbf0c6*/
}
if ( (*(_BYTE *)(v23 + SocketInfo + 2) & 4) != 0 ) /*0xffcbf0bf*/
{
v17 = v16 | 0x80; /*0xffcbf0c1*/
goto LABEL_38; /*0xffcbf0c1*/
}
LABEL_39:
RmtFunc349(n6, n2, (int)n6a, (int)n2_2, n2_3, *(unsigned __int16 *)(v6 + v5 + 4), 2); /*0xffcbf0cb*/
RmtFunc349(n6, n2, (int)n6a, (int)n2_2, n2_3, 0, 3); /*0xffcbf103*/
RmtFunc349(n6, n2, (int)n6a, (int)n2_2, n2_3, *(unsigned __int16 *)(v6 + v5 + 2), 1); /*0xffcbf11e*/
return RmtFunc349(n6, n2, (int)n6a, (int)n2_2, n2_3, *(unsigned __int16 *)(v6 + v5), 0); /*0xffcbf143*/
}
// Function: KtiFn_FFCBF14B @ 0xffcbf14b (0x500 bytes)
// Index: 1608/2560
void __cdecl KtiFn_FFCBF14B(unsigned __int8 *n6, int n2, _BYTE *n3, _BYTE *n2_1, int a5)
{
unsigned __int8 *n6_1; // edi
int v6; // ebp
int v7; // esi
__int16 n2824; // ax
int CpuCount_1; // edx
int v10; // ecx
unsigned __int16 v11; // ax
unsigned __int8 n0xC; // al
__int16 v13; // ax
bool v14; // cc
unsigned __int8 v15; // al
char v16; // al
__int16 v17; // ax
unsigned __int8 v18; // dl
__int16 v19; // cx
unsigned __int8 n0xE; // cl
int v21; // ecx
_WORD *v22; // eax
int n18; // ebp
_WORD *v24; // esi
char v25; // al
int v26; // ebp
int v27; // esi
char v28; // bl
unsigned int v29; // edi
int v30; // esi
int v31; // [esp+10h] [ebp-24h]
int SocketInfo; // [esp+14h] [ebp-20h]
int v33; // [esp+18h] [ebp-1Ch]
int v34; // [esp+1Ch] [ebp-18h] BYREF
int v35; // [esp+20h] [ebp-14h] BYREF
int CpuCount; // [esp+24h] [ebp-10h]
int v37; // [esp+28h] [ebp-Ch]
int v38; // [esp+2Ch] [ebp-8h]
int v39; // [esp+30h] [ebp-4h]
n6_1 = n6; /*0xffcbf156*/
SocketInfo = GetSocketInfo((int)n6, n2); /*0xffcbf168*/
CpuCount = GetCpuCount((int)n6, n2, (unsigned __int8)n3); /*0xffcbf179*/
v33 = KtiFunc91AF((int)n6, n2, (unsigned __int8)n3, (unsigned __int8)n2_1); /*0xffcbf186*/
v6 = KtiFunc91DE((int)n6, n2, (unsigned __int8)n3, (unsigned __int8)n2_1); /*0xffcbf193*/
v7 = 244 * (unsigned __int8)a5; /*0xffcbf198*/
v38 = (unsigned __int8)a5; /*0xffcbf19e*/
v39 = v6; /*0xffcbf1a7*/
v37 = v7; /*0xffcbf1ab*/
*(_WORD *)(v7 + v6) = 264; /*0xffcbf1af*/
v31 = 7688 * (unsigned __int8)n3; /*0xffcbf1ce*/
if ( KtiFuncB948(*(_BYTE *)(v31 + SocketInfo + 316), 0, &v35, &v34) ) /*0xffcbf1dd*/
n2824 = 2824; /*0xffcbf1f8*/
else
n2824 = v34 & v35 | 0x108; /*0xffcbf1f1*/
*(_WORD *)(v7 + v6) = n2824; /*0xffcbf205*/
*(_WORD *)(v7 + v6) |= word_FFD5BC7E[*(unsigned __int8 *)(v31 + SocketInfo + 307)]; /*0xffcbf227*/
v35 = 242 * v38; /*0xffcbf233*/
*(_WORD *)(v7 + v6 + 2) |= *(_WORD *)(242 * v38 + v33 + 14); /*0xffcbf23c*/
if ( ProcCommonFunc24FA((int)n6, n2, (unsigned __int8)n3, (unsigned __int8)n2_1) ) /*0xffcbf241*/
{
CpuCount_1 = CpuCount; /*0xffcbf251*/
v10 = 1379 * (unsigned __int8)n2_1; /*0xffcbf258*/
if ( *(_BYTE *)(v10 + CpuCount + 1214) > 7u ) /*0xffcbf266*/
{
v11 = *(_WORD *)(v7 + v6 + 2) & 0xFFF9; /*0xffcbf272*/
*(_WORD *)(v7 + v6 + 2) = v11; /*0xffcbf278*/
v34 = v11; /*0xffcbf286*/
n6_1 = n6; /*0xffcbf28a*/
n0xC = n6[48704 * (unsigned __int8)n2 + 258694]; /*0xffcbf28e*/
if ( n0xC > 8u ) /*0xffcbf297*/
{
v14 = n0xC <= 0xCu; /*0xffcbf2a7*/
v15 = *(_BYTE *)(v10 + CpuCount_1 + 62); /*0xffcbf2a9*/
if ( v14 ) /*0xffcbf2ad*/
v16 = v15 >> 1; /*0xffcbf2af*/
else
v16 = v15 >> 3; /*0xffcbf2b3*/
v13 = v16 & 6; /*0xffcbf2b8*/
}
else
{
v13 = 2 * (*(_BYTE *)(v10 + CpuCount_1 + 62) & 3); /*0xffcbf2a2*/
}
*(_WORD *)(v7 + v6 + 2) = v34 | v13; /*0xffcbf2c0*/
}
}
v17 = *(_WORD *)(v7 + v6 + 2) | 1; /*0xffcbf2d5*/
*(_WORD *)(v7 + v6 + 2) = v17; /*0xffcbf2d8*/
v18 = *(_BYTE *)(v31 + SocketInfo + 310); /*0xffcbf2e8*/
v38 = *(unsigned __int8 *)(v31 + SocketInfo + 307); /*0xffcbf2ef*/
if ( v18 == v38 - 1 ) /*0xffcbf2f9*/
{
v19 = v17 | 8; /*0xffcbf2fb*/
LABEL_17:
*(_WORD *)(v7 + v6 + 2) = v19; /*0xffcbf30e*/
goto LABEL_20; /*0xffcbf313*/
}
if ( v18 == v38 - 2 ) /*0xffcbf309*/
{
v19 = v17 | 0x10; /*0xffcbf30b*/
goto LABEL_17; /*0xffcbf30b*/
}
if ( v18 ) /*0xffcbf317*/
DebugPrint((int)n6_1, 3, 255, 255, 255, 255, 255, 255, "Additive Latency invalid!\n"); /*0xffcbf32c*/
LABEL_20:
if ( (*(_BYTE *)(v31 + SocketInfo + 2) & 0x20) != 0 && !*(_BYTE *)(1379 * (unsigned __int8)n2_1 + CpuCount + 104) ) /*0xffcbf358*/
*(_WORD *)(v7 + v6 + 2) |= 0x800u; /*0xffcbf364*/
n0xE = *(_BYTE *)(v31 + SocketInfo + 320); /*0xffcbf36d*/
if ( n0xE >= 0xEu ) /*0xffcbf37a*/
*(_WORD *)(v7 + v6 + 4) = 8 * (n0xE - (unsigned __int16)((n0xE - 14) / 2) - 10); /*0xffcbf3a1*/
else
*(_WORD *)(v7 + v6 + 4) = 8 * (n0xE - 9); /*0xffcbf384*/
v21 = v35; /*0xffcbf3a6*/
*(_WORD *)(v7 + v6 + 4) |= *(_WORD *)(v35 + v33 + 10) | 0xC0; /*0xffcbf3b8*/
*(_DWORD *)(v7 + v6 + 6) = 0; /*0xffcbf3bf*/
if ( n6_1[48704 * (unsigned __int8)n2 + 258694] >= 0xCu ) /*0xffcbf3d4*/
{
if ( n6_1[1006] == 1 ) /*0xffcbf3dd*/
*(_WORD *)(v7 + v6 + 8) = 4096; /*0xffcbf3e4*/
if ( n6_1[1007] == 1 ) /*0xffcbf3f0*/
*(_WORD *)(v7 + v6 + 8) |= 0x800u; /*0xffcbf3f7*/
}
*(_WORD *)(v7 + v6 + 10) = *(_WORD *)(v21 + v33 + 12); /*0xffcbf401*/
v22 = (_WORD *)(v6 + v7 + 12); /*0xffcbf409*/
n18 = 18; /*0xffcbf40d*/
v24 = v22; /*0xffcbf40e*/
do /*0xffcbf430*/
{
*v24++ |= ((RmtFunc86C3(n6_1, n2, (char)n3) - 4) & 7) << 10; /*0xffcbf427*/
--n18; /*0xffcbf42d*/
}
while ( n18 ); /*0xffcbf430*/
CpuCount = (unsigned __int8)MailBoxFunc2B3E( /*0xffcbf461*/
(int)n6_1,
*(_BYTE *)(v31 + *(unsigned __int8 *)(v35 + v33 + 1) + SocketInfo + 6264));
v25 = ProcCommonFunc24FA((int)n6_1, n2, (unsigned __int8)n3, (unsigned __int8)n2_1); /*0xffcbf467*/
v26 = v39; /*0xffcbf46c*/
v27 = v37; /*0xffcbf473*/
if ( v25 ) /*0xffcbf479*/
CpuCount = *(unsigned __int8 *)(v35 + v33 + 80); /*0xffcbf488*/
v28 = RmtFunc86C3(n6_1, n2, (char)n3); /*0xffcbf49d*/
nullsub_5(); /*0xffcbf4a8*/
RmtFunc349(n6_1, n2, (int)n3, (int)n2_1, a5, *(unsigned __int16 *)(v27 + v26 + 6), 3); /*0xffcbf4c7*/
v29 = CpuCount | (((v28 - 4) & 7) << 10); /*0xffcbf4de*/
RmtFunc349(n6, n2, (int)n3, (int)n2_1, a5, v29, 6); /*0xffcbf4fa*/
RmtFunc349(n6, n2, (int)n3, (int)n2_1, a5, v29 | 0x80, 6); /*0xffcbf51e*/
RmtFunc349(n6, n2, (int)n3, (int)n2_1, a5, v29 | 0x80, 6); /*0xffcbf537*/
RmtFunc349(n6, n2, (int)n3, (int)n2_1, a5, v29, 6); /*0xffcbf55d*/
v30 = v37; /*0xffcbf562*/
RmtFunc349(n6, n2, (int)n3, (int)n2_1, a5, *(unsigned __int16 *)(v37 + v26 + 10), 5); /*0xffcbf57f*/
RmtFunc349(n6, n2, (int)n3, (int)n2_1, a5, *(unsigned __int16 *)(v30 + v26 + 8), 4); /*0xffcbf59a*/
RmtFunc349(n6, n2, (int)n3, (int)n2_1, a5, *(unsigned __int16 *)(v30 + v26 + 4), 2); /*0xffcbf5be*/
RmtFunc349(n6, n2, (int)n3, (int)n2_1, a5, *(unsigned __int16 *)(v30 + v26 + 2), 1); /*0xffcbf5dc*/
RmtFunc349(n6, n2, (int)n3, (int)n2_1, a5, *(unsigned __int16 *)(v30 + v26), 0); /*0xffcbf5f6*/
nullsub_5(); /*0xffcbf60d*/
if ( (n6[134] & 0x20) != 0 ) /*0xffcbf61c*/
{
if ( n6[9478] ) /*0xffcbf61e*/
RmtFuncEF44(n6, n2, n3, (int)n2_1, a5, 0, 0, 98); /*0xffcbf63b*/
}
}
// Function: KtiFuncF64B @ 0xffcbf64b (0x1fe bytes)
// Index: 1609/2560
BOOL __cdecl KtiFuncF64B(_BYTE *__return_address, int a2, int a3, char a4, unsigned __int16 a5, int *a6)
{
BOOL v6; // ebx
unsigned __int8 v8; // [esp+10h] [ebp-10h] BYREF
unsigned __int8 v9; // [esp+11h] [ebp-Fh] BYREF
unsigned __int8 v10; // [esp+12h] [ebp-Eh] BYREF
unsigned __int8 v11; // [esp+13h] [ebp-Dh] BYREF
int v12; // [esp+14h] [ebp-Ch] BYREF
int n5; // [esp+18h] [ebp-8h] BYREF
int v14; // [esp+1Ch] [ebp-4h]
v12 = -1; /*0xffcbf652*/
LOWORD(v14) = v14 & 0xF0F | 0xB0; /*0xffcbf66f*/
v6 = 1; /*0xffcbf674*/
v8 = 0; /*0xffcbf679*/
LOWORD(n5) = 1; /*0xffcbf683*/
DdrTrainFunc466A((int)__return_address, a2, a3, a4, (int)&n5); /*0xffcbf68e*/
v11 = a5; /*0xffcbf69d*/
v9 = a5 >> 12; /*0xffcbf6a5*/
v10 = HIBYTE(a5) & 0xF; /*0xffcbf6b0*/
if ( !DdrTrainFunc5231(__return_address, a2, n5, v14, 128, &v8) /*0xffcbf7ff*/
&& !DdrTrainFunc5231(__return_address, a2, n5, v14, 0, &v9)
&& !DdrTrainFunc5231(__return_address, a2, n5, v14, 0, &v10)
&& !DdrTrainFunc5231(__return_address, a2, n5, v14, 64, &v11)
&& !DdrTrainFunc4A71(__return_address, a2, n5, v14, 128, &v8)
&& !DdrTrainFunc4A71(__return_address, a2, n5, v14, 0, (unsigned __int8 *)&v12 + 3)
&& !DdrTrainFunc4A71(__return_address, a2, n5, v14, 0, (unsigned __int8 *)&v12 + 2)
&& !DdrTrainFunc4A71(__return_address, a2, n5, v14, 0, (unsigned __int8 *)&v12 + 1) )
{
v6 = DdrTrainFunc4A71(__return_address, a2, n5, v14, 64, (unsigned __int8 *)&v12) != 0; /*0xffcbf833*/
}
*a6 = v12; /*0xffcbf842*/
return v6; /*0xffcbf83f*/
}
// Function: KtiFuncF849 @ 0xffcbf849 (0x125 bytes)
// Index: 1610/2560
char __cdecl KtiFuncF849(unsigned __int8 *__return_address, int n4, unsigned __int8 n4a)
{
int SocketInfo; // eax
char n4_1; // dl
unsigned __int8 n2; // bh
_BYTE *SocketInfo_1; // ebp
int v7; // edi
int v8; // ecx
unsigned __int8 v9; // bl
int n6; // [esp+10h] [ebp-1Ch]
int v12; // [esp+14h] [ebp-18h]
int v13; // [esp+18h] [ebp-14h]
int v14; // [esp+1Ch] [ebp-10h]
_BYTE *SocketInfo_2; // [esp+20h] [ebp-Ch]
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffcbf859*/
n4_1 = n4; /*0xffcbf85e*/
n2 = 0; /*0xffcbf862*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcbf869*/
v7 = 50813 * (unsigned __int8)n4; /*0xffcbf86b*/
v8 = 0; /*0xffcbf871*/
SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffcbf873*/
LOBYTE(v13) = 0; /*0xffcbf877*/
v14 = 0; /*0xffcbf87b*/
do /*0xffcbf960*/
{
v9 = 0; /*0xffcbf883*/
for ( LOBYTE(v12) = 0; v9 < __return_address[v7 + 10194]; LOBYTE(v12) = v9 ) /*0xffcbf889*/
{
LOBYTE(SocketInfo) = 0; /*0xffcbf896*/
LOBYTE(n6) = 0; /*0xffcbf89c*/
do /*0xffcbf92c*/
{
if ( *SocketInfo_1 ) /*0xffcbf8a0*/
{
if ( !KtiFunc89E9((int)__return_address, n4_1, n6, v13, v12, 0) ) /*0xffcbf8b6*/
KtiFuncF96E(__return_address, n4, n6, v13, v12, n4a); /*0xffcbf8d7*/
v8 = v14; /*0xffcbf90c*/
LOBYTE(SocketInfo) = n6; /*0xffcbf910*/
n4_1 = n4; /*0xffcbf914*/
}
LOBYTE(SocketInfo) = SocketInfo + 1; /*0xffcbf918*/
SocketInfo_1 += 7688; /*0xffcbf91a*/
v7 += 8077; /*0xffcbf920*/
LOBYTE(n6) = SocketInfo; /*0xffcbf926*/
}
while ( (unsigned __int8)SocketInfo < 6u ); /*0xffcbf92c*/
v7 = 50813 * (unsigned __int8)n4; /*0xffcbf932*/
++v9; /*0xffcbf936*/
SocketInfo_1 = SocketInfo_2; /*0xffcbf938*/
}
++n2; /*0xffcbf94d*/
v8 += 2688; /*0xffcbf94f*/
LOBYTE(v13) = n2; /*0xffcbf955*/
v14 = v8; /*0xffcbf959*/
}
while ( n2 < 2u ); /*0xffcbf960*/
return SocketInfo; /*0xffcbf966*/
}
// Function: KtiFuncF96E @ 0xffcbf96e (0x33 bytes)
// Index: 1611/2560
void __cdecl __noreturn KtiFuncF96E(
unsigned __int8 *__return_address,
int n4,
int n6,
int a4,
int a5,
unsigned __int8 a6)
{
KtiFuncF9A6(__return_address, n4, n6, a4, a5, a6); /*0xffcbf99c*/
}
// Function: KtiFuncF9A6 @ 0xffcbf9a6 (0x1a4 bytes)
// Index: 1612/2560
void __cdecl __noreturn KtiFuncF9A6(
unsigned __int8 *__return_address,
int n4,
int n6,
int a4,
unsigned __int8 a5,
unsigned __int16 a6)
{
int CpuCount; // edx
unsigned __int8 v7; // cl
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffcbf9c1*/
if ( *(_WORD *)(__return_address + 257315) != 11 ) /*0xffcbf9cf*/
{
if ( a6 ) /*0xffcbf9f9*/
KtiFuncFB9C(__return_address, n4, n6, a4, a5, 0, 0, a6); /*0xffcbfa10*/
v7 = a4; /*0xffcbfac2*/
if ( *(_BYTE *)(1379 * (unsigned __int8)a4 + CpuCount + 107) ) /*0xffcbfad3*/
{
ProcCommonFunc4813(__return_address, n4, n6, a4, 0); /*0xffcbfadf*/
v7 = a4; /*0xffcbfae4*/
}
KtiFuncFB9C(__return_address, n4, n6, v7, a5, 0, 0, 0); /*0xffcbfaf6*/
}
RmtFunc349(__return_address, n4, n6, a4, a5, a6, 3); /*0xffcbf9e4*/
}
// Function: KtiFuncFB4A @ 0xffcbfb4a (0x52 bytes)
// Index: 1613/2560
int __cdecl KtiFuncFB4A(int __return_address, int n4, int n6, int n2, int a5, unsigned __int16 a6, __int16 n85)
{
int result; // eax
result = GetCpuCount(__return_address, n4, n6); /*0xffcbfb57*/
if ( *(_BYTE *)(1379 * (unsigned __int8)n2 + result + 107) ) /*0xffcbfb6b*/
{
ProcCommonFunc2B85(__return_address, n4, n6, n2, n85); /*0xffcbfb7f*/
return ProcCommonFunc47F0(__return_address, n4, n6, n2, a6); /*0xffcbfb91*/
}
return result; /*0xffcbfb99*/
}
// Function: KtiFuncFB9C @ 0xffcbfb9c (0x7d bytes)
// Index: 1614/2560
void __cdecl __noreturn KtiFuncFB9C(
unsigned __int8 *__return_address,
int n4,
int n6,
unsigned __int8 a4,
unsigned __int8 a5,
char a6,
unsigned __int8 a7,
__int16 a8)
{
int v8; // eax
unsigned __int16 v9; // ax
v8 = KtiFunc91DE((int)__return_address, n4, n6, a4); /*0xffcbfbae*/
if ( a8 ) /*0xffcbfbc1*/
v9 = a8 & 0x800 | *(_WORD *)(244 * a5 + v8 + 6) | a7 | 4; /*0xffcbfbe3*/
else
v9 = *(_WORD *)(244 * a5 + v8 + 6); /*0xffcbfbf1*/
RmtFunc669(__return_address, n4, n6, a4, a5, v9, 3, a6); /*0xffcbfc0c*/
}
// Function: KtiFuncFC19 @ 0xffcbfc19 (0x49 bytes)
// Index: 1615/2560
void __cdecl __noreturn KtiFuncFC19(
unsigned __int8 *__return_address,
int n4,
int n6,
int n2,
unsigned __int8 a5,
unsigned __int8 a6,
char a7,
unsigned __int8 n0x10)
{
int n0x10_1; // ecx
if ( n0x10 >= 0x10u || a7 ) /*0xffcbfc27*/
n0x10_1 = n0x10 & 0xF0; /*0xffcbfc31*/
else
n0x10_1 = n0x10; /*0xffcbfc29*/
RmtFunc349(__return_address, n4, n6, n2, a5, a6 | (16 * (n0x10_1 | 0x100)), 7); /*0xffcbfc58*/
}
// Function: KtiFuncFC62 @ 0xffcbfc62 (0x103 bytes)
// Index: 1616/2560
char __cdecl KtiFuncFC62(
unsigned __int8 *__return_address,
int n4,
int n6,
int n2,
int a5,
unsigned __int8 a6,
char a7,
unsigned __int8 n0x10)
{
char result; // al
int n6_1; // edx
int n2_1; // ecx
int v12; // ebp
char v13; // al
int v14; // edi
unsigned __int8 n4_1; // [esp-Ch] [ebp-1Ch]
int n4a; // [esp+18h] [ebp+8h]
n4_1 = n4; /*0xffcbfc81*/
n4a = (int)&__return_address[48704 * (unsigned __int8)n4 + 258722]; /*0xffcbfc8a*/
result = ProcCommonFunc24FA((int)__return_address, n4_1, n6, n2); /*0xffcbfc8e*/
if ( !result )
{
DebugPrint((int)__return_address, 2, n4, n6, n2, a5, 255, 255, "Command not supported \n"); /*0xffcbfcb0*/
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemJedec.c",
3989,
"FALSE");
result = ProcMemInitCheck((int)__return_address, 242, 0); /*0xffcbfcdc*/
}
if ( *(_WORD *)(__return_address + 257315) == 12 ) /*0xffcbfcec*/
{
n6_1 = n6; /*0xffcbfcee*/
n2_1 = n2; /*0xffcbfcf2*/
v12 = 1379 * (unsigned __int8)n2; /*0xffcbfd02*/
v13 = a7; /*0xffcbfd08*/
v14 = n4a + 7688 * (unsigned __int8)n6; /*0xffcbfd0c*/
if ( a7 != *(_BYTE *)(v14 + v12 + 466) ) /*0xffcbfd17*/
{
RmtFunc349(__return_address, n4, n6, n2, a5, (unsigned __int8)a7 | 0x1700, 7); /*0xffcbfd2c*/
v13 = a7; /*0xffcbfd31*/
n2_1 = n2; /*0xffcbfd38*/
n6_1 = n6; /*0xffcbfd3c*/
*(_BYTE *)(v14 + v12 + 466) = a7; /*0xffcbfd40*/
}
KtiFuncFC19(__return_address, n4, n6_1, n2_1, a5, a6, v13, n0x10); /*0xffcbfd58*/
}
return result; /*0xffcbfd60*/
}
// Function: KtiFuncFD65 @ 0xffcbfd65 (0x207 bytes)
// Index: 1617/2560
char __cdecl KtiFuncFD65(
unsigned __int8 *__return_address,
int n4,
int n6,
int n2,
int a5,
unsigned __int8 *a6,
unsigned __int8 a7,
unsigned __int8 n0x10,
unsigned __int8 n9)
{
int n6_1; // edi
unsigned __int8 v10; // cl
unsigned __int8 v11; // dl
char CpuCount_1; // al
int v13; // eax
int n2_1; // ecx
int v15; // ebp
int v16; // [esp+14h] [ebp-10h]
int v17; // [esp+18h] [ebp-Ch]
int CpuCount; // [esp+1Ch] [ebp-8h]
unsigned __int8 v19; // [esp+20h] [ebp-4h]
n6_1 = n6; /*0xffcbfd78*/
v16 = KtiFunc91DE((int)__return_address, n4, n6, n2); /*0xffcbfd8d*/
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffcbfd9a*/
if ( !ProcCommonFunc24FA((int)__return_address, n4, n6, n2) )
{
DebugPrint((int)__return_address, 2, n4, n6, n2, a5, 255, 255, "Command not supported \n"); /*0xffcbfdc0*/
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemJedec.c",
4052,
"FALSE");
ProcMemInitCheck((int)__return_address, 242, 0); /*0xffcbfdec*/
}
v10 = 1; /*0xffcbfdf8*/
v11 = *a6; /*0xffcbfdfa*/
while ( v11 == a6[v10] ) /*0xffcbfe0a*/
{
if ( ++v10 >= 9u ) /*0xffcbfe11*/
{
if ( n9 == 0xFF ) /*0xffcbfe18*/
return KtiFuncFC62(__return_address, n4, n6, n2, 0, v11, a7, n0x10); /*0xffcbfe31*/
break; /*0xffcbfe18*/
}
}
v13 = 244 * (unsigned __int8)a5; /*0xffcbfe36*/
v17 = v13; /*0xffcbfe47*/
if ( *(_BYTE *)(v13 + v16 + 61) == 4 ) /*0xffcbfe50*/
KtiFuncF96E(__return_address, n4, n6, n2, a5, 0); /*0xffcbfe59*/
if ( *(_BYTE *)(v13 + v16 + 60) ) /*0xffcbfe6e*/
KtiFuncFC62(__return_address, n4, n6, n2, 0, 0, 0, 0xCu); /*0xffcbfe80*/
n2_1 = n2; /*0xffcbfe88*/
v15 = 1379 * (unsigned __int8)n2; /*0xffcbfe94*/
if ( *(_WORD *)(CpuCount + v15 + 140) == 0xB304 && *(_BYTE *)(CpuCount + v15 + 217) == 1 ) /*0xffcbfeb0*/
{
KtiFuncFC62(__return_address, n4, n6, n2, 0, 2u, 0, 0xCu); /*0xffcbfebe*/
n2_1 = n2; /*0xffcbfec3*/
}
DdrTrainFunc39C4(__return_address, n4, n6, n2_1, 0, (int)a6, a7, n0x10, n9); /*0xffcbfee0*/
v19 = *(_BYTE *)(v17 + v16 + 60); /*0xffcbfef4*/
if ( v19 ) /*0xffcbfefa*/
return KtiFuncFC62(__return_address, n4, n6_1, n2, 0, v19, 0, 0xCu); /*0xffcbfefa*/
CpuCount_1 = CpuCount; /*0xffcbfefc*/
n6_1 = n6; /*0xffcbff0d*/
if ( *(_WORD *)(CpuCount + v15 + 140) == 0xB304 && *(_BYTE *)(CpuCount + v15 + 217) == 1 ) /*0xffcbff1b*/
return KtiFuncFC62(__return_address, n4, n6_1, n2, 0, v19, 0, 0xCu); /*0xffcbff2f*/
return CpuCount_1; /*0xffcbff64*/
}
// Function: MemJedecInit @ 0xffcbff6c (0x3dd bytes)
// Index: 1618/2560
BOOL __cdecl MemJedecInit(
_BYTE *n2,
unsigned __int8 n4,
int n6,
char a4,
char n2a,
unsigned __int16 n24584,
unsigned __int8 *a7)
{
int v7; // ebx
int v8; // eax
unsigned __int8 v10; // [esp+10h] [ebp-Ch] BYREF
unsigned __int8 v11; // [esp+11h] [ebp-Bh] BYREF
unsigned __int8 v12; // [esp+12h] [ebp-Ah] BYREF
unsigned __int8 n24584_1; // [esp+13h] [ebp-9h] BYREF
int n4_1; // [esp+14h] [ebp-8h] BYREF
int v15; // [esp+18h] [ebp-4h]
LOWORD(v15) = v15 & 0xF0F | 0xB0; /*0xffcbff89*/
v10 = 0; /*0xffcbff94*/
v7 = 1; /*0xffcbff9e*/
LOWORD(n4_1) = 1; /*0xffcbffa3*/
DdrTrainFunc466A((int)n2, n4, n6, a4, (int)&n4_1); /*0xffcbffaa*/
n24584_1 = n24584; /*0xffcbffb9*/
v11 = n24584 >> 12; /*0xffcbffc1*/
v12 = HIBYTE(n24584) & 0xF; /*0xffcbffcc*/
switch ( n2a )
{
case 1:
if ( !DdrTrainFunc5231(n2, n4, n4_1, v15, 132, &v10) /*0xffcc030a*/
&& !DdrTrainFunc5231(n2, n4, n4_1, v15, 4, &v11)
&& !DdrTrainFunc5231(n2, n4, n4_1, v15, 4, &v12)
&& !DdrTrainFunc5231(n2, n4, n4_1, v15, 4, &n24584_1) )
{
return DdrTrainFunc5231(n2, n4, n4_1, v15, 68, a7) != 0; /*0xffcc033d*/
}
break;
case 2:
if ( DdrTrainFunc5231(n2, n4, n4_1, v15, 136, &v10) /*0xffcc0257*/
|| DdrTrainFunc5231(n2, n4, n4_1, v15, 8, &v11)
|| DdrTrainFunc5231(n2, n4, n4_1, v15, 8, &v12)
|| DdrTrainFunc5231(n2, n4, n4_1, v15, 8, &n24584_1)
|| DdrTrainFunc5231(n2, n4, n4_1, v15, 8, a7 + 1) )
{
return v7; /*0xffcc0261*/
}
v8 = DdrTrainFunc5231(n2, n4, n4_1, v15, 72, a7); /*0xffcc026a*/
goto LABEL_13; /*0xffcc026a*/
case 4:
if ( !DdrTrainFunc5231(n2, n4, n4_1, v15, 140, &v10) /*0xffcc0146*/
&& !DdrTrainFunc5231(n2, n4, n4_1, v15, 12, &v11)
&& !DdrTrainFunc5231(n2, n4, n4_1, v15, 12, &v12)
&& !DdrTrainFunc5231(n2, n4, n4_1, v15, 12, &n24584_1)
&& !DdrTrainFunc5231(n2, n4, n4_1, v15, 12, a7 + 3)
&& !DdrTrainFunc5231(n2, n4, n4_1, v15, 12, a7 + 2)
&& !DdrTrainFunc5231(n2, n4, n4_1, v15, 12, a7 + 1) )
{
v8 = DdrTrainFunc5231(n2, n4, n4_1, v15, 76, a7); /*0xffcc016e*/
LABEL_13:
if ( !v8 ) /*0xffcc0178*/
return 0; /*0xffcc017e*/
}
break;
default:
AssertPrint(
n2,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemJedec.c",
5125,
"FALSE");
ProcMemInitCheck((int)n2, 242, 76); /*0xffcc0011*/
return v7; /*0xffcc0019*/
}
return v7; /*0xffcc033f*/
}
// Function: RmtFunc349 @ 0xffcc0349 (0x320 bytes)
// Index: 1619/2560
char __cdecl RmtFunc349(
unsigned __int8 *__return_address,
int n4,
int n6,
int n2,
unsigned __int8 a5,
unsigned int a6,
char n8)
{
unsigned int v8; // edi
int CpuCount; // ecx
int v10; // eax
int CpuCount_2; // edi
int v12; // ecx
unsigned __int8 v13; // dl
unsigned __int16 v14; // ax
char n8_2; // al
int v16; // ecx
int v17; // ecx
int v18; // eax
int CpuCount_1; // [esp+10h] [ebp-Ch]
unsigned int v21; // [esp+10h] [ebp-Ch]
int v22; // [esp+14h] [ebp-8h]
char n8_1; // [esp+20h] [ebp+4h]
char v24; // [esp+20h] [ebp+4h]
KtiFunc41B3((int)__return_address, 5u, 1); /*0xffcc0359*/
v8 = a6; /*0xffcc036a*/
n8_1 = n8; /*0xffcc0375*/
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffcc037e*/
CpuCount_1 = CpuCount; /*0xffcc0388*/
if ( n8 ) /*0xffcc038f*/
{
switch ( n8 ) /*0xffcc0395*/
{
case 2: /*0xffcc0395*/
MailBoxFuncB457((int)__return_address, n4, n6, n2, a6); /*0xffcc03c0*/
break;
case 4: /*0xffcc0395*/
MailBoxFuncB530(__return_address, n4, n6, a6); /*0xffcc03b1*/
break;
case 5: /*0xffcc0395*/
MailBoxFuncB573(__return_address, n4, n6, a6); /*0xffcc03a6*/
break;
default:
goto LABEL_10; /*0xffcc03a0*/
}
}
else
{
MailBoxFuncB40E(__return_address, n4, n6, a6 & 0xFFFFFEFF); /*0xffcc03d5*/
}
CpuCount = CpuCount_1; /*0xffcc03dd*/
LABEL_10:
if ( *(_WORD *)(__return_address + 257315) != 11 ) /*0xffcc03eb*/
{
LOBYTE(v10) = RmtFunc669(__return_address, n4, n6, n2, a5, a6, n8, 0); /*0xffcc03ff*/
if ( !__return_address[257313] && n8 != 7 ) /*0xffcc0419*/
{
v10 = 1379 * (unsigned __int8)n2; /*0xffcc042a*/
if ( !*(_BYTE *)(v10 + CpuCount_1 + 107) ) /*0xffcc0430*/
LOBYTE(v10) = RmtFunc669(__return_address, n4, n6, n2, a5, a6, n8, 1); /*0xffcc044a*/
}
return v10; /*0xffcc044f*/
}
if ( (a5 & 1) != 0 && *(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 37) ) /*0xffcc046d*/
{
v8 = IioTailX_FFD059F0((int)__return_address, a6); /*0xffcc047f*/
n8 = KtiFuncEAE2((int)__return_address, n8); /*0xffcc048a*/
}
DdrTrainFunc236F((int)__return_address, n4, n6, n2, a5, 0, n8, v8, 0); /*0xffcc04a2*/
v10 = 7688 * (unsigned __int8)n6; /*0xffcc04ba*/
if ( __return_address[48704 * (unsigned __int8)n4 + 265395 + v10] )
{
CpuCount_2 = CpuCount_1; /*0xffcc04d4*/
v10 = 1379 * (unsigned __int8)n2; /*0xffcc04db*/
v22 = v10; /*0xffcc04e1*/
if ( *(_BYTE *)(v10 + CpuCount_1 + 126) > 1u && n8_1 == 1 && *(_WORD *)(__return_address + 257315) == 11 )
{
RmtFunc93F((int)__return_address, n4, n6, n2, 0, *(_BYTE *)(v10 + CpuCount_1 + 69) | 4, 0, 0xEu); /*0xffcc051f*/
v12 = v22; /*0xffcc0524*/
v13 = 0; /*0xffcc0528*/
v24 = 0; /*0xffcc0531*/
if ( !*(_BYTE *)(v22 + CpuCount_1 + 20) ) /*0xffcc0539*/
{
LABEL_37:
LOBYTE(v10) = RmtFunc93F((int)__return_address, n4, n6, n2, 0, *(_BYTE *)(v12 + CpuCount_2 + 69), 0, 0xEu); /*0xffcc0646*/
return v10; /*0xffcc0659*/
}
while ( ((a5 ^ v13) & 1) != 0 ) /*0xffcc0547*/
{
LABEL_36:
v24 = ++v13; /*0xffcc0638*/
if ( v13 >= *(_BYTE *)(v12 + CpuCount_2 + 20) ) /*0xffcc0640*/
goto LABEL_37; /*0xffcc0640*/
}
v14 = a6; /*0xffcc054d*/
v21 = a6; /*0xffcc0551*/
if ( v13 > 1u ) /*0xffcc0558*/
{
v14 = a6 & 0xFDBB; /*0xffcc055a*/
v21 = a6 & 0xFFFFFDBB; /*0xffcc055f*/
}
if ( (a5 & 1) != 0 && *(_BYTE *)(v12 + CpuCount_2 + 37) ) /*0xffcc056a*/
{
v21 = IioTailX_FFD059F0((int)__return_address, v14); /*0xffcc057e*/
n8_2 = KtiFuncEAE2((int)__return_address, 1u); /*0xffcc0582*/
v12 = v22; /*0xffcc0587*/
v13 = v24; /*0xffcc058e*/
n8 = n8_2; /*0xffcc0592*/
}
if ( *(_BYTE *)(v12 + CpuCount_2 + 126) == 2 )
{
v17 = ((*(unsigned __int8 *)(v12 + CpuCount_2 + 123) >> 3) & 7) + 11; /*0xffcc0602*/
v18 = v13 & 2; /*0xffcc0607*/
}
else
{
if ( *(_BYTE *)(v12 + CpuCount_2 + 126) != 4 )
{
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemJedec.c",
2013,
"FALSE");
ProcMemInitCheck((int)__return_address, 237, 8); /*0xffcc05ce*/
v16 = v21; /*0xffcc05d3*/
LABEL_35:
DdrTrainFunc236F((int)__return_address, n4, n6, n2, a5, 0, n8, v16, 0); /*0xffcc0612*/
v12 = v22; /*0xffcc062b*/
v13 = v24; /*0xffcc0632*/
goto LABEL_36; /*0xffcc0632*/
}
v17 = ((*(unsigned __int8 *)(v12 + CpuCount_2 + 123) >> 3) & 7) + 11; /*0xffcc05ea*/
v18 = v13 & 6; /*0xffcc05ef*/
}
v16 = (v18 << v17) | v21; /*0xffcc0610*/
goto LABEL_35; /*0xffcc0610*/
}
}
return v10; /*0xffcc0661*/
}
// Function: RmtFunc669 @ 0xffcc0669 (0xfc bytes)
// Index: 1620/2560
unsigned __int8 __cdecl RmtFunc669(
unsigned __int8 *__return_address,
int n4,
int n6,
unsigned __int8 n2,
unsigned __int8 a5,
unsigned int a6,
char n8,
char a8)
{
int CpuCount; // edi
unsigned __int8 n2_1; // al
unsigned int v10; // edi
char n8_1; // al
if ( __return_address[50813 * (unsigned __int8)n4 + 58726] == 1 ) /*0xffcc0686*/
KtiFunc8C4((int)__return_address, 0xAu); /*0xffcc068b*/
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffcc069f*/
n2_1 = n2; /*0xffcc06a5*/
if ( a8 == 1 && *(_BYTE *)(1379 * n2 + CpuCount + 107) )
{
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemJedec.c",
2071,
"FALSE");
ProcMemInitCheck((int)__return_address, 242, 75); /*0xffcc06e1*/
n2_1 = n2; /*0xffcc06e6*/
}
if ( (a5 & 1) != 0 && *(_BYTE *)(1379 * n2_1 + CpuCount + 37) ) /*0xffcc06fb*/
{
v10 = IioTailX_FFD059F0((int)__return_address, a6); /*0xffcc070e*/
n8_1 = KtiFuncEAE2((int)__return_address, n8); /*0xffcc0711*/
n8 = n8_1; /*0xffcc0719*/
}
else
{
v10 = a6; /*0xffcc071e*/
n8_1 = n8; /*0xffcc0721*/
}
if ( a8 == 1 ) /*0xffcc0728*/
{
v10 = (v10 ^ 0xFFFE2BF8) & 0x3FFFF; /*0xffcc0732*/
n8 = ~n8_1 & 0xF; /*0xffcc073a*/
}
DdrTrainFunc236F((int)__return_address, n4, n6, n2, a5, 0, n8, v10, 0); /*0xffcc0750*/
return KtiFunc8C4((int)__return_address, 1u); /*0xffcc0760*/
}
// Function: RmtFunc765 @ 0xffcc0765 (0x1da bytes)
// Index: 1621/2560
char __cdecl RmtFunc765(
unsigned __int8 *__return_address,
int n4,
int n6,
int n2,
int n2a,
unsigned __int8 a6,
unsigned __int8 n0x10)
{
int n4_1; // ebp
char v9; // cl
unsigned __int8 v10; // cl
int v11; // eax
int n4_2; // ecx
int v13; // ebp
int v15; // [esp+10h] [ebp-4h]
int CpuCount; // [esp+2Ch] [ebp+18h]
n4_1 = n4; /*0xffcc0771*/
v15 = a6; /*0xffcc0787*/
DebugPrint((int)__return_address, 2, n4, n6, n2, n2a, 255, 255, "Write RC%02x = 0x%02x\n", n0x10, a6); /*0xffcc07a3*/
if ( *(_WORD *)(__return_address + 257315) == 11 ) /*0xffcc07b3*/
{
n4_2 = n4; /*0xffcc087a*/
v13 = 48704 * (unsigned __int8)n4; /*0xffcc0881*/
if ( (__return_address[v13 + 258717] & 2) != 0 && __return_address[7688 * (unsigned __int8)n6 + 265395 + v13] ) /*0xffcc08a0*/
{
DebugPrint( /*0xffcc08d0*/
(int)__return_address,
3,
n4,
n6,
n2,
n2a,
255,
255,
"RC Write after lockdown -> RC%x CS %x data %x\n",
n0x10,
(unsigned __int8)n2a,
a6);
KtiFunc20C6(__return_address, 239, 0, n4, n6, n2, n2a); /*0xffcc08ee*/
n4_2 = n4; /*0xffcc08f6*/
}
DdrTrainFunc236F( /*0xffcc0929*/
(int)__return_address,
n4_2,
n6,
n2,
n2a,
8,
(unsigned __int8)(n0x10 & 8 | (a6 >> 1) & 6) >> 1,
n0x10 & 7 | (8 * (a6 & 3)),
0);
LOBYTE(v11) = KtiFunc8C4((int)__return_address, 0x32u); /*0xffcc0931*/
}
else
{
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffcc07cb*/
if ( (unsigned __int8)n2a < 2u /*0xffcc07f7*/
|| (n4_1 = n4, v9 = -4, (*(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 131) & 3u) >= 2) )
{
v9 = -2; /*0xffcc07f9*/
}
v10 = n2a & v9; /*0xffcc07fb*/
if ( n0x10 < 0x10u ) /*0xffcc0804*/
{
RmtFunc349(__return_address, n4_1, n6, n2, v10, v15 | (16 * n0x10), 7); /*0xffcc0853*/
v11 = n0x10 + 1379 * (unsigned __int8)n2; /*0xffcc086c*/
*(_BYTE *)(v11 + CpuCount + 1217) = a6; /*0xffcc086e*/
}
else
{
RmtFunc349(__return_address, n4_1, n6, n2, v10, v15 | (16 * (n0x10 & 0xF0)), 7); /*0xffcc081b*/
v11 = 1379 * (unsigned __int8)n2; /*0xffcc082a*/
*(_BYTE *)(v11 + CpuCount + (n0x10 >> 4) + 1233) = a6; /*0xffcc0837*/
}
}
return v11; /*0xffcc0939*/
}
// Function: RmtFunc93F @ 0xffcc093f (0x8e bytes)
// Index: 1622/2560
char __cdecl RmtFunc93F(
int __return_address,
int n4,
int n6,
int n2,
int n2a,
unsigned __int8 a6,
unsigned __int8 a7,
unsigned __int8 n0x10)
{
int SocketInfo; // eax
int SocketInfo_1; // edx
int n2_1; // eax
int v11; // ebp
int v12; // edi
SocketInfo = GetSocketInfo(__return_address, n4); /*0xffcc0949*/
SocketInfo_1 = SocketInfo; /*0xffcc0956*/
if ( *(_WORD *)(__return_address + 257315) == 11 ) /*0xffcc095a*/
{
n2_1 = n2; /*0xffcc095c*/
v11 = 1379 * (unsigned __int8)n2; /*0xffcc0973*/
v12 = SocketInfo_1 + 7688 * (unsigned __int8)n6; /*0xffcc097d*/
if ( a7 != *(_BYTE *)(v12 + v11 + 466) ) /*0xffcc0986*/
{
RmtFunc765((unsigned __int8 *)__return_address, n4, n6, n2, n2a, a7, 7u); /*0xffcc0996*/
*(_BYTE *)(v12 + v11 + 466) = a7; /*0xffcc09a2*/
n2_1 = n2; /*0xffcc09a9*/
}
LOBYTE(SocketInfo) = RmtFunc765((unsigned __int8 *)__return_address, n4, n6, n2_1, n2a, a6, n0x10); /*0xffcc09c0*/
}
return SocketInfo; /*0xffcc09cb*/
}
// Function: RmtFunc9CD @ 0xffcc09cd (0xd5 bytes)
// Index: 1623/2560
char __cdecl RmtFunc9CD(int __return_address, int n4, int n6, int a4, int n2, unsigned __int8 a6, unsigned __int16 a7)
{
RmtFunc93F(__return_address, n4, n6, a4, n2, a7 >> 12, 0xDu, 9u); /*0xffcc09fb*/
RmtFunc93F(__return_address, n4, n6, a4, n2, a7 & 0xF, 0xDu, 0xAu); /*0xffcc0a17*/
RmtFunc93F(__return_address, n4, n6, a4, n2, (unsigned __int8)a7 >> 4, 0xDu, 0xBu); /*0xffcc0a39*/
RmtFunc93F(__return_address, n4, n6, a4, n2, HIBYTE(a7) & 0xF, 0xDu, 0xCu); /*0xffcc0a57*/
RmtFunc93F(__return_address, n4, n6, a4, n2, a6 & 0xF, 0xDu, 0xEu); /*0xffcc0a7a*/
return RmtFunc93F(__return_address, n4, n6, a4, n2, a6 >> 4, 0xDu, 0xFu); /*0xffcc0a9d*/
}
// Function: RmtFuncAA2 @ 0xffcc0aa2 (0x44 bytes)
// Index: 1624/2560
char __cdecl RmtFuncAA2(int __return_address, int n4, int n6, int a4, int n2, __int16 a6, unsigned __int16 a7)
{
RmtFunc9CD(__return_address, n4, n6, a4, n2, a6, a7); /*0xffcc0abe*/
return RmtFunc9CD(__return_address, n4, n6, a4, n2, HIBYTE(a6), a7 + 1); /*0xffcc0ae2*/
}
// Function: RmtFuncAE6 @ 0xffcc0ae6 (0x45 bytes)
// Index: 1625/2560
char __cdecl RmtFuncAE6(__int16 n48, char a2, char n9)
{
char result; // al
if ( n9 == 9 ) /*0xffcc0aed*/
return RmtFunc1232(n48, a2); /*0xffcc0b00*/
result = 0; /*0xffcc0b05*/
if ( a2 ) /*0xffcc0b0a*/
{
if ( n48 != 34 ) /*0xffcc0b21*/
return n48 == 48; /*0xffcc0b26*/
}
else
{
if ( !n48 ) /*0xffcc0b0e*/
return 34; /*0xffcc0b19*/
if ( n48 != 1 ) /*0xffcc0b13*/
return result; /*0xffcc0b13*/
return 48; /*0xffcc0b1b*/
}
return result; /*0xffcc0aff*/
}
// Function: RmtFuncB2B @ 0xffcc0b2b (0x7e bytes)
// Index: 1626/2560
int __cdecl RmtFuncB2B(unsigned __int16 n60, char a2)
{
int n60_1; // eax
if ( a2 ) /*0xffcc0b35*/
{
if ( n60 > 0x3Cu ) /*0xffcc0b64*/
{
switch ( n60 ) /*0xffcc0b91*/
{
case 0x50u: /*0xffcc0b91*/
return 6; /*0xffcc0ba7*/
case 0x78u: /*0xffcc0b91*/
return 2; /*0xffcc0ba4*/
case 0xF0u: /*0xffcc0b91*/
return 4; /*0xffcc0ba0*/
}
}
else
{
if ( n60 == 60 ) /*0xffcc0b66*/
return 1; /*0xffcc0b8d*/
if ( n60 ) /*0xffcc0b6a*/
{
switch ( n60 ) /*0xffcc0b6f*/
{
case '"': /*0xffcc0b6f*/
return 7; /*0xffcc0b86*/
case '(': /*0xffcc0b6f*/
return 3; /*0xffcc0b82*/
case '0': /*0xffcc0b6f*/
return 5; /*0xffcc0b7e*/
}
}
}
return 0; /*0xffcc0b89*/
}
switch ( n60 ) /*0xffcc0b3c*/
{
case 1u: /*0xffcc0b3c*/
n60_1 = 60; /*0xffcc0b45*/
break; /*0xffcc0b46*/
case 2u: /*0xffcc0b3c*/
n60_1 = 120; /*0xffcc0b49*/
break; /*0xffcc0b4a*/
case 3u: /*0xffcc0b3c*/
n60_1 = 40; /*0xffcc0b4d*/
break; /*0xffcc0b4e*/
case 4u: /*0xffcc0b3c*/
n60_1 = 240; /*0xffcc0b4f*/
break; /*0xffcc0b54*/
case 5u: /*0xffcc0b3c*/
n60_1 = 48; /*0xffcc0b57*/
break; /*0xffcc0b58*/
case 6u: /*0xffcc0b3c*/
n60_1 = 80; /*0xffcc0b5b*/
break; /*0xffcc0b5c*/
case 7u: /*0xffcc0b3c*/
n60_1 = 34; /*0xffcc0b5f*/
break; /*0xffcc0b60*/
default:
return 0;
}
return n60_1; /*0xffcc0b46*/
}
// Function: RmtFuncBCB @ 0xffcc0bcb (0x81 bytes)
// Index: 1627/2560
int __cdecl RmtFuncBCB(__int16 n60, char a2, char n9)
{
int result; // eax
if ( n9 == 9 ) /*0xffcc0bd2*/
return (unsigned __int16)RmtFunc1279(n60, a2); /*0xffcc0be5*/
result = 0; /*0xffcc0bea*/
if ( a2 ) /*0xffcc0bef*/
{
switch ( n60 ) /*0xffcc0c21*/
{
case 0: /*0xffcc0c21*/
return result; /*0xffcc0c21*/
case 80: /*0xffcc0c21*/
return 4; /*0xffcc0c47*/
case 120: /*0xffcc0c21*/
return 1; /*0xffcc0c46*/
case 240: /*0xffcc0c21*/
return 2; /*0xffcc0c3e*/
case 999: /*0xffcc0c21*/
return 3; /*0xffcc0c3a*/
default:
return result; /*0xffcc0c38*/
}
}
else
{
switch ( n60 ) /*0xffcc0bf3*/
{
case 0: /*0xffcc0bf3*/
return result; /*0xffcc0bf3*/
case 1: /*0xffcc0bf3*/
return 120; /*0xffcc0c1b*/
case 2: /*0xffcc0bf3*/
return 240; /*0xffcc0c1a*/
case 3: /*0xffcc0bf3*/
return 999; /*0xffcc0c13*/
case 4: /*0xffcc0bf3*/
return 80; /*0xffcc0c09*/
default:
return result; /*0xffcc0c07*/
}
}
}
// Function: RmtFuncC4C @ 0xffcc0c4c (0x77 bytes)
// Index: 1628/2560
int __cdecl RmtFuncC4C(int n6, int n33, unsigned __int16 n60, char a4, char n9)
{
int result; // eax
switch ( n33 ) /*0xffcc0c55*/
{
case 9: /*0xffcc0c55*/
LOWORD(result) = ProcCommonFuncD24F(n60, a4); /*0xffcc0cb7*/
break;
case 12: /*0xffcc0c55*/
LOBYTE(result) = RmtFuncAE6(n60, a4, n9); /*0xffcc0caa*/
break;
case 26: /*0xffcc0c55*/
LOWORD(result) = ProcCommonFuncD298(n60, a4); /*0xffcc0c9a*/
break;
case 31: /*0xffcc0c55*/
LOWORD(result) = RmtFuncBCB(n60, a4, n9); /*0xffcc0c8a*/
break;
default:
if ( (unsigned int)(n33 - 32) > 1 ) /*0xffcc0c6c*/
return n60; /*0xffcc0c80*/
LOWORD(result) = RmtFuncB2B(n60, a4); /*0xffcc0c74*/
break;
}
return (unsigned __int16)result; /*0xffcc0c7f*/
}
// Function: RmtFuncCC3 @ 0xffcc0cc3 (0x1a8 bytes)
// Index: 1629/2560
__int16 __cdecl RmtFuncCC3(_BYTE *__return_address, unsigned __int8 n4, unsigned __int8 n6a, unsigned __int8 n0x10)
{
unsigned __int8 n5; // bl
__int16 v5; // ax
__int16 v6; // si
__int16 v7; // di
unsigned __int8 n4_1; // dl
unsigned __int8 n2; // bh
_BYTE *v10; // eax
__int16 v11; // si
__int16 v12; // di
_BYTE *v14; // [esp+14h] [ebp-8h]
unsigned __int8 n2_1; // [esp+18h] [ebp-4h]
int n0x10a; // [esp+2Ch] [ebp+10h]
n5 = 0; /*0xffcc0ccc*/
v5 = ProcCommonFunc4521((int)__return_address, n4); /*0xffcc0cd5*/
v6 = v5; /*0xffcc0cde*/
v7 = v5; /*0xffcc0ce7*/
if ( (unsigned __int8)(v5 & 0x1F) > n0x10 ) /*0xffcc0cf7*/
{
v6 = v5 & 0xFFE0 | n0x10 & 0x1F; /*0xffcc0d05*/
v7 = v6; /*0xffcc0d0d*/
}
n4_1 = n4; /*0xffcc0d11*/
n2 = 0; /*0xffcc0d15*/
n0x10a = 0; /*0xffcc0d17*/
n2_1 = 0; /*0xffcc0d32*/
v10 = &__return_address[48704 * n4 + 259137 + 7688 * n6a]; /*0xffcc0d3d*/
v14 = v10; /*0xffcc0d3f*/
do
{
if ( *(v10 - 19) )
{
if ( ProcCommonFunc24FA((int)__return_address, n4_1, n6a, n2_1) )
{
n5 = 5; /*0xffcc0d5f*/
}
else
{
switch ( *v14 )
{
case 1:
n5 = 2; /*0xffcc0db3*/
break;
case 2:
n5 = 3; /*0xffcc0daf*/
break;
case 4:
n5 = 4; /*0xffcc0dab*/
break;
default:
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemODT.c",
426,
"FALSE");
ProcMemInitCheck((int)__return_address, 242, 80); /*0xffcc0da1*/
break;
}
}
}
else
{
n5 = 1; /*0xffcc0db7*/
}
if ( n0x10a )
{
if ( n0x10a == 1 )
{
v11 = (n5 & 7) << 10; /*0xffcc0e13*/
v12 = v7 & 0xE3FF; /*0xffcc0e17*/
}
else
{
if ( n0x10a != 2 )
{
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemODT.c",
443,
"FALSE");
ProcMemInitCheck((int)__return_address, 242, 81); /*0xffcc0df3*/
goto LABEL_23; /*0xffcc0dfb*/
}
v11 = n5 << 13; /*0xffcc0e00*/
v12 = v7 & 0x1FFF; /*0xffcc0e04*/
}
}
else
{
v11 = (n5 & 7) << 7; /*0xffcc0e26*/
v12 = v7 & 0xFC7F; /*0xffcc0e2a*/
}
v6 = v12 | v11; /*0xffcc0e30*/
v7 = v6; /*0xffcc0e38*/
LABEL_23:
++n2; /*0xffcc0e3c*/
++n0x10a; /*0xffcc0e42*/
v10 = v14 + 1379; /*0xffcc0e46*/
n4_1 = n4; /*0xffcc0e4b*/
n2_1 = n2; /*0xffcc0e4f*/
v14 += 1379; /*0xffcc0e53*/
}
while ( n2 < 2u );
return v6; /*0xffcc0e60*/
}
// Function: RmtFuncE6B @ 0xffcc0e6b (0x10a bytes)
// Index: 1630/2560
int __cdecl RmtFuncE6B(unsigned __int8 *n6, int n4, int n6a, unsigned __int8 n2, unsigned __int8 n2_1)
{
unsigned __int8 n2_3; // dl
unsigned __int8 n2_4; // bl
int v8; // ecx
unsigned __int8 n2_5; // bh
int v10; // ebp
_WORD *v11; // eax
int v12; // [esp+4h] [ebp-10h]
int n2_2; // [esp+8h] [ebp-Ch]
char v14; // [esp+Ch] [ebp-8h]
n2_3 = n2_1; /*0xffcc0e6b*/
if ( n2_1 < 2u ) /*0xffcc0e7a*/
{
if ( ProcCommonFunc24FA((int)n6, n4, n6a, n2) ) /*0xffcc0e89*/
return 1; /*0xffcc0e98*/
n2_3 = n2_1; /*0xffcc0e9d*/
}
n2_4 = 0; /*0xffcc0eac*/
LOBYTE(n2_2) = 0; /*0xffcc0eb2*/
v14 = n2_3 + 4 * n2; /*0xffcc0eb6*/
v8 = 7688 * (unsigned __int8)n6a + 48704 * (unsigned __int8)n4; /*0xffcc0ed5*/
while ( 2 ) /*0xffcc0edb*/
{
n2_5 = 0; /*0xffcc0edb*/
LOBYTE(v12) = 0; /*0xffcc0ee6*/
v10 = v8 + 1379 * n2_4; /*0xffcc0eea*/
do /*0xffcc0f50*/
{
if ( n6[242 * n2_5 + 259342 + v10] && (n2_4 != n2 || n2_5 != n2_3) ) /*0xffcc0f09*/
{
v11 = RmtFunc1002(n6, n4, n6a, n2_2, v12); /*0xffcc0f1c*/
if ( v11 && (((unsigned __int16)v11[1] & (1 << v14)) != 0 || ((unsigned __int16)v11[2] & (1 << v14)) != 0) ) /*0xffcc0f41*/
return 1; /*0xffcc0f69*/
n2_3 = n2_1; /*0xffcc0f43*/
}
LOBYTE(v12) = ++n2_5; /*0xffcc0f49*/
}
while ( n2_5 < 4u ); /*0xffcc0f50*/
LOBYTE(n2_2) = ++n2_4; /*0xffcc0f54*/
if ( n2_4 < 2u ) /*0xffcc0f5b*/
{
v8 = 7688 * (unsigned __int8)n6a + 48704 * (unsigned __int8)n4; /*0xffcc0f5d*/
continue; /*0xffcc0f61*/
}
break;
}
return 0; /*0xffcc0f70*/
}
// Function: RmtFuncF75 @ 0xffcc0f75 (0x8d bytes)
// Index: 1631/2560
_WORD *__cdecl RmtFuncF75(_BYTE *n6, int n2, int n6a)
{
__int16 v4; // ax
_WORD *v5; // ecx
unsigned int i; // edx
int v7; // [esp+0h] [ebp-8h] BYREF
unsigned __int16 p_i; // [esp+4h] [ebp-4h] BYREF
if ( ProcCommonFunc1ADC((int)n6, &v7, &p_i) ) /*0xffcc0f85*/
return 0; /*0xffcc0f8f*/
KtiFunc78C9((int)n6, (int)&v7, (int)&p_i); /*0xffcc0fa1*/
v4 = RmtFuncCC3(n6, n2, n6a, 0x10u); /*0xffcc0fb1*/
v5 = (_WORD *)v7; /*0xffcc0fbd*/
for ( i = 0; i < p_i; v7 = (int)v5 ) /*0xffcc0fc4*/
{
if ( *v5 == v4 ) /*0xffcc0fc9*/
break; /*0xffcc0fc9*/
v5 = (_WORD *)((char *)v5 + 29); /*0xffcc0fcb*/
++i; /*0xffcc0fce*/
}
if ( i >= p_i ) /*0xffcc0fd9*/
{
KtiFunc211E((int)n6, 239, 6, n2, n6a, 255, 255); /*0xffcc0ff2*/
return 0; /*0xffcc0f93*/
}
return v5; /*0xffcc0ffe*/
}
// Function: RmtFunc1002 @ 0xffcc1002 (0x230 bytes)
// Index: 1632/2560
_WORD *__cdecl RmtFunc1002(unsigned __int8 *__return_address, int n4, int n6, int n2, int a5)
{
unsigned __int8 n2_1; // bl
__int16 v6; // ax
unsigned __int8 n4_1; // dl
__int16 v8; // si
unsigned __int8 n2_2; // bh
unsigned __int8 *v10; // ebp
int v11; // eax
unsigned int v12; // ecx
int v13; // eax
__int16 v14; // si
__int16 v15; // ax
unsigned int v16; // eax
_WORD *v17; // edx
int v19; // [esp+10h] [ebp-14h]
__int16 v20; // [esp+14h] [ebp-10h]
_WORD *v21; // [esp+18h] [ebp-Ch] BYREF
int v22; // [esp+1Ch] [ebp-8h]
unsigned int v23; // [esp+20h] [ebp-4h] BYREF
n2_1 = 0; /*0xffcc100f*/
v21 = 0; /*0xffcc1011*/
ProcCommonFunc1FA3((int)__return_address, &v23, &v21); /*0xffcc1020*/
v6 = ProcCommonFunc4521((int)__return_address, n4); /*0xffcc102a*/
n4_1 = n4; /*0xffcc1032*/
v8 = (4 * (a5 & 3)) | n2 & 3 | v6 & 0xFF80; /*0xffcc1062*/
n2_2 = 0; /*0xffcc1067*/
v19 = 0; /*0xffcc1069*/
v20 = v8; /*0xffcc1083*/
LOBYTE(v22) = 0; /*0xffcc108a*/
v10 = &__return_address[48704 * (unsigned __int8)n4 + 259225 + 7688 * (unsigned __int8)n6]; /*0xffcc1093*/
v11 = 0; /*0xffcc1095*/
do
{
if ( *(v10 - 107) )
{
if ( ProcCommonFunc24FA((int)__return_address, n4_1, n6, v22) )
{
n2_1 = (*v10 != 0) + 5; /*0xffcc10c0*/
if ( *(_WORD *)(__return_address + 257315) == 11 ) /*0xffcc10cb*/
{
v8 &= 0xFFF3u; /*0xffcc10d2*/
v20 = v8; /*0xffcc10d5*/
}
}
else
{
switch ( *(v10 - 88) )
{
case 1u:
n2_1 = 2; /*0xffcc1129*/
break;
case 2u:
n2_1 = 3; /*0xffcc1125*/
break;
case 4u:
n2_1 = 4; /*0xffcc1121*/
break;
default:
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemODT.c",
563,
"FALSE");
ProcMemInitCheck((int)__return_address, 242, 82); /*0xffcc1117*/
break;
}
}
v11 = v19; /*0xffcc112b*/
}
else
{
n2_1 = 1; /*0xffcc1131*/
}
v12 = 0; /*0xffcc1133*/
if ( v11 )
{
v13 = v11 - 1; /*0xffcc1139*/
if ( v13 )
{
if ( v13 != 1 )
{
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemODT.c",
580,
"FALSE");
ProcMemInitCheck((int)__return_address, 242, 83); /*0xffcc116a*/
v12 = 0; /*0xffcc1172*/
goto LABEL_23; /*0xffcc1174*/
}
v14 = n2_1 << 13; /*0xffcc117d*/
v15 = v20 & 0x1FFF; /*0xffcc1181*/
}
else
{
v14 = (n2_1 & 7) << 10; /*0xffcc1193*/
v15 = v20 & 0xE3FF; /*0xffcc1197*/
}
}
else
{
v14 = (n2_1 & 7) << 7; /*0xffcc11a9*/
v15 = v20 & 0xFC7F; /*0xffcc11ad*/
}
v8 = v15 | v14; /*0xffcc11b2*/
v20 = v8; /*0xffcc11b5*/
LABEL_23:
++n2_2; /*0xffcc11ba*/
n4_1 = n4; /*0xffcc11c0*/
v11 = v19 + 1; /*0xffcc11c4*/
v10 += 1379; /*0xffcc11c5*/
LOBYTE(v22) = n2_2; /*0xffcc11cb*/
++v19; /*0xffcc11cf*/
}
while ( n2_2 < 2u );
v16 = v23 / 6; /*0xffcc11e5*/
if ( v23 / 6 ) /*0xffcc11e5*/
{
v17 = v21; /*0xffcc11eb*/
do /*0xffcc11f9*/
{
if ( *v17 == v8 ) /*0xffcc11f2*/
break; /*0xffcc11f2*/
++v12; /*0xffcc11f4*/
v17 += 3; /*0xffcc11f5*/
}
while ( v12 < v16 ); /*0xffcc11f9*/
}
if ( v12 < v16 ) /*0xffcc11fd*/
return &v21[3 * v12]; /*0xffcc1226*/
KtiFunc20C6(__return_address, 237, 2, n4, n6, n2, a5); /*0xffcc1217*/
return 0; /*0xffcc122a*/
}
// Function: RmtFunc1232 @ 0xffcc1232 (0x47 bytes)
// Index: 1633/2560
int __cdecl RmtFunc1232(__int16 n48, char a2)
{
int result; // eax
if ( !a2 ) /*0xffcc1237*/
{
result = 0; /*0xffcc123e*/
if ( !n48 ) /*0xffcc1242*/
return 40; /*0xffcc1256*/
if ( n48 == 1 ) /*0xffcc1247*/
return 34; /*0xffcc1252*/
if ( n48 != 2 ) /*0xffcc124c*/
return result; /*0xffcc124c*/
return 48; /*0xffcc1250*/
}
if ( n48 == 34 ) /*0xffcc1262*/
return 1; /*0xffcc1277*/
if ( n48 == 48 ) /*0xffcc1267*/
return 2; /*0xffcc1271*/
return 0; /*0xffcc1271*/
}
// Function: RmtFunc1279 @ 0xffcc1279 (0x78 bytes)
// Index: 1634/2560
int __cdecl RmtFunc1279(__int16 n999, char a2)
{
int result; // eax
result = 0; /*0xffcc127e*/
if ( a2 ) /*0xffcc1284*/
{
switch ( n999 ) /*0xffcc12bf*/
{
case 0: /*0xffcc12bf*/
return result; /*0xffcc12bf*/
case 60: /*0xffcc12bf*/
return 1; /*0xffcc12ef*/
case 80: /*0xffcc12bf*/
return 6; /*0xffcc12ec*/
case 120: /*0xffcc12bf*/
return 2; /*0xffcc12e5*/
case 240: /*0xffcc12bf*/
return 4; /*0xffcc12e1*/
}
if ( n999 != 999 ) /*0xffcc12db*/
return result; /*0xffcc12db*/
return 7; /*0xffcc12e8*/
}
switch ( n999 ) /*0xffcc1288*/
{
case 0: /*0xffcc1288*/
return result; /*0xffcc1288*/
case 1: /*0xffcc1288*/
return 60; /*0xffcc12bb*/
case 2: /*0xffcc1288*/
return 120; /*0xffcc12b7*/
case 4: /*0xffcc1288*/
return 240; /*0xffcc12b4*/
case 6: /*0xffcc1288*/
return 80; /*0xffcc12ad*/
case 7: /*0xffcc1288*/
return 999; /*0xffcc12a5*/
}
return result; /*0xffcc12aa*/
}
// Function: RmtFunc12F1 @ 0xffcc12f1 (0x8a4 bytes)
// Index: 1635/2560
int __cdecl RmtFunc12F1(_BYTE *__return_address, int n2, int n3)
{
_BYTE *__return_address_1; // ebx
int SocketInfo; // esi
int CpuCount; // ebp
unsigned __int8 n2_7; // dl
int n3_1; // eax
int v8; // edi
int n2_1; // eax
_WORD *v10; // ecx
unsigned __int16 v11; // si
int v12; // edx
unsigned int v13; // ecx
int v14; // eax
int v15; // ecx
int n2_2; // edx
unsigned __int8 n0xC; // al
unsigned __int8 v18; // al
int v19; // eax
__int16 *v20; // ecx
int v21; // edx
__int16 n320; // ax
int v23; // ecx
unsigned __int8 n0xC_1; // al
int v25; // ecx
char v26; // al
char v27; // al
int v28; // edx
int v29; // ecx
int v30; // ecx
int v31; // edx
unsigned __int8 v32; // al
char v33; // dl
int v34; // ecx
unsigned __int8 v35; // cl
int v36; // ecx
int v37; // eax
char v38; // cl
char n2_4; // al
char v40; // cl
char n2_5; // al
char v42; // cl
int v43; // ecx
char v44; // [esp+Dh] [ebp-57h]
char v45; // [esp+Eh]... [16702 chars total]
// Function: CpgcPointTestRun @ 0xffcc1b95 (0x981 bytes)
// Index: 1636/2560
int __cdecl CpgcPointTestRun(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // ebx
int n4_1; // ebp
int SocketInfo; // esi
int v4; // ecx
unsigned __int8 n6_1; // al
_BYTE *SocketInfo_2; // edi
int v7; // edx
int CpuCount; // esi
unsigned int v9; // edi
unsigned __int8 n6_2; // dl
char v11; // si
int *v12; // esi
unsigned __int8 n6_3; // dl
char v14; // cl
int v15; // ecx
int n107_1; // eax
_BYTE *v17; // eax
int v18; // edi
int n18; // ecx
signed int n8_1; // edx
unsigned __int8 n4_5; // al
char n8_2; // al
char v23; // cl
int n606348324; // ecx
int n606348324_1; // eax
unsigned int v26; // ecx
char v27; // dl
unsigned __int8 n8a_1; // dh
char v29; // di
unsigned int v30; // esi
int v31; // eax
int v32; // eax
int v33; // edx
unsigned __int8 n6_4; // dl
char v35; // cl
int v36; // esi
_BYTE *SocketInfo_4; // ecx
unsigned __int8 n6_5; // al
int v39; // edi
unsigned __int8 n2_1; //... [18850 chars total]
// Function: RmtFunc2516 @ 0xffcc2516 (0x277 bytes)
// Index: 1637/2560
int __cdecl RmtFunc2516(
int n6,
int n4,
int n6a,
int n2,
int a5,
int a6,
_BYTE *buf,
__int16 n128,
__int16 *a9,
__int16 *a10,
_WORD *a11)
{
_BYTE *buf_1; // edx
__int16 *v12; // ebx
unsigned __int16 n128_1; // si
__int16 *v14; // edi
unsigned __int16 n128_2; // cx
unsigned __int16 n128_5; // bp
unsigned __int16 v17; // ax
int v18; // edx
__int16 n128_4; // cx
unsigned __int16 n128_6; // ax
int n128_7; // ebp
unsigned __int16 n128_8; // ax
unsigned __int16 n128_3; // [esp+10h] [ebp-10h]
int v25; // [esp+14h] [ebp-Ch]
int v26; // [esp+18h] [ebp-8h]
buf_1 = buf; /*0xffcc2519*/
v26 = 0; /*0xffcc251f*/
v12 = a9; /*0xffcc2526*/
n128_1 = n128; /*0xffcc252c*/
v14 = a10; /*0xffcc2531*/
n128_3 = 1; /*0xffcc2539*/
n128_2 = n128; /*0xffcc253d*/
*a10 = n128; /*0xffcc2540*/
*a9 = n128; /*0xffcc2543*/
n128_5 = *buf != 0 ? n128 : 0;
v17 = 1; /*0xffcc2558*/
if ( (unsigned __int16)n128 > 1u ) /*0xffcc255c*/
{
v18 = 1; /*0xffcc2562*/
v25 = 1; /*0xffcc2564*/
while ( 1 ) /*0xffcc2568*/
{
if ( n128_5 == n128_1 ) /*0xffcc256f*/
{
if ( buf[v18] ) /*0xffcc2571*/
goto LABEL_21; /*0xffcc2571*/
if ( !buf[v18 - 1] ) /*0xffcc257b*/
goto LABEL_21; /*0xffcc257b*/
n128_5 = n128_3; /*0xffcc258a*/
if ( v18 != n128_1 - 1 ) /*0xffcc2593*/
goto LABEL_21; /*0xffcc2593*/
n128 = n128_3; /*0xffcc25a3*/
if ( (unsigned __int16)*a9 - (unsigned __int16)*a10 >= 0 ) /*0xffcc25ac*/
{
LABEL_20:
n128_2 = n128; /*0xffcc2657*/
goto LABEL_21; /*0xffcc2657*/
}
n128_4 = n128_3; /*0xffcc25b2*/
*a10 = n128_3; /*0xffcc25b6*/
}
else
{
if ( buf[v18] && !buf[v18 - 1] ) /*0xffcc25d1*/
{
if ( (unsigned __int16)*a9 - (unsigned __int16)*a10 <= (unsigned __int16)(n128_3 - 1) - n128_5 ) /*0xffcc25f6*/
{
*a10 = n128_5; /*0xffcc25fc*/
*a9 = n128_3 - 1; /*0xffcc25ff*/
}
v18 = v25; /*0xffcc2602*/
n128_2 = n128_1; /*0xffcc2606*/
n128_5 = n128_1; /*0xffcc2609*/
n128 = n128_1; /*0xffcc260c*/
}
if ( v18 != n128_1 - 1 || buf[v18] || !*buf ) /*0xffcc2622*/
goto LABEL_21; /*0xffcc2625*/
n128 = n128_3; /*0xffcc2635*/
v18 = v25; /*0xffcc2645*/
if ( (unsigned __int16)*a9 - (unsigned __int16)*a10 >= v25 - n128_5 ) /*0xffcc2649*/
goto LABEL_20; /*0xffcc2649*/
n128_4 = n128_3; /*0xffcc264b*/
*a10 = n128_5; /*0xffcc264f*/
}
*a9 = n128_4; /*0xffcc25b9*/
n128_2 = n128_1; /*0xffcc25bc*/
n128_5 = n128_1; /*0xffcc25bf*/
n128 = n128_1; /*0xffcc25c2*/
LABEL_21:
++v18; /*0xffcc265b*/
++n128_3; /*0xffcc2661*/
v25 = v18; /*0xffcc2665*/
if ( n128_3 >= n128_1 ) /*0xffcc266c*/
{
buf_1 = buf; /*0xffcc2672*/
v17 = 1; /*0xffcc2678*/
break; /*0xffcc2678*/
}
}
}
if ( n128_5 < n128_1 && n128_2 == n128_1 ) /*0xffcc2681*/
{
if ( *buf_1 ) /*0xffcc2683*/
{
n128_6 = n128_1 - 1; /*0xffcc2688*/
}
else
{
if ( n128_1 <= 1u ) /*0xffcc2692*/
goto LABEL_34; /*0xffcc2692*/
while ( 1 ) /*0xffcc269f*/
{
v14 = a10; /*0xffcc269f*/
if ( buf_1[v17] ) /*0xffcc269b*/
{
v12 = a9; /*0xffcc26ae*/
if ( !buf_1[v17 - 1] ) /*0xffcc26a9*/
break; /*0xffcc26a9*/
}
if ( ++v17 >= n128_1 ) /*0xffcc26b8*/
goto LABEL_34; /*0xffcc26b8*/
}
n128_6 = v17 - 1; /*0xffcc26bc*/
}
n128_2 = n128_6; /*0xffcc26bd*/
n128 = n128_6; /*0xffcc26c0*/
LABEL_34:
if ( (unsigned __int16)*v12 - (unsigned __int16)*v14 < n128_1 + n128_2 - n128_5 ) /*0xffcc26db*/
{
*v14 = n128_5; /*0xffcc26e1*/
*v12 = n128; /*0xffcc26e4*/
}
}
n128_7 = (unsigned __int16)*v14; /*0xffcc26e7*/
if ( (_WORD)n128_7 == n128_1 || (n128_8 = *v12, *v12 == n128_1) || (_WORD)n128_7 == n128_8 ) /*0xffcc26fa*/
{
v26 = 1; /*0xffcc2742*/
DebugPrint(n6, 2, n4, n6a, n2, a5, 255, 255, "Dq/Dqs Pi not found. Using default\n"); /*0xffcc2763*/
*a11 = 36; /*0xffcc2772*/
*v12 = 42; /*0xffcc2778*/
*v14 = 30; /*0xffcc277e*/
}
else if ( n128_8 >= (unsigned __int16)n128_7 ) /*0xffcc26ff*/
{
*a11 = n128_7 + ((unsigned __int8)(*(_BYTE *)v12 - *(_BYTE *)v14) >> 1); /*0xffcc2735*/
}
else
{
*a11 = (((unsigned __int16)(n128_1 + *(unsigned __int8 *)v12 - *(unsigned __int8 *)v14) >> 1) + n128_7) /*0xffcc2720*/
% (unsigned int)n128_1;
}
return v26; /*0xffcc2785*/
}
// Function: RmtFunc278D @ 0xffcc278d (0x4c9 bytes)
// Index: 1638/2560
int __cdecl RmtFunc278D(unsigned __int8 *n6, int n4, int n2, int n4_2, int a5)
{
int n4_1; // edi
unsigned __int8 n2_1; // bp
int v7; // eax
_BYTE *SocketInfo_1; // ecx
unsigned __int8 n6a_1; // al
int v10; // edx
char v11; // al
int v12; // ecx
int n72; // edx
int n120_1; // eax
unsigned __int8 n6_1; // bl
_BYTE *SocketInfo_3; // eax
bool v17; // al
int n2_2; // edx
int n4_3; // ecx
_BYTE *SocketInfo_4; // eax
unsigned __int8 n6_2; // bl
unsigned __int8 n4_4; // bp
_BYTE *SocketInfo_7; // ebx
_BYTE *SocketInfo_5; // ecx
int *v25; // ebp
unsigned __int8 n6b_1; // al
int v27; // edx
char v28; // cl
_BYTE *SocketInfo_6; // edi
unsigned __int8 n0x40; // dl
int v31; // ecx
int v32; // ebx
_BYTE *n6a; // [esp+10h] [ebp-70h]
unsigned __int8 n6b; // [esp+10h] [ebp-70h]
unsigned __int16 p_n60[2]; // [esp+14h] [ebp-6Ch] BYREF
int v37; // [esp+18h] [ebp-68h]
_BYTE *SocketInfo_2; // [esp+1Ch] [ebp-64h]
int SocketInfo; // [esp+20h] [ebp-60h]
int n120; // [esp+24h] [ebp-5Ch]
int v41; // [esp+28h] [ebp-58h]
int CpuCount; // [esp+2Ch] [ebp-54h]
int n16843009; // [esp+30h] [ebp-50h] BYREF
__int16 n257; // [esp+34h] [ebp-4Ch]
char v45; // [esp+36h] [ebp-4Ah]
int v46[18]; // [esp+38h] [ebp-48h] BYREF
n4_1 = n4; /*0xffcc279b*/
n16843009 = 16843009; /*0xffcc27a4*/
n257 = 257; /*0xffcc27ac*/
v45 = 1; /*0xffcc27b3*/
n2_1 = n2; /*0xffcc27c4*/
SocketInfo = GetSocketInfo((int)n6, n4); /*0xffcc27cf*/
v7 = KtiFunc8DC4((int)n6, n4, n2, n4_2); /*0xffcc27d3*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcc27d8*/
v41 = v7; /*0xffcc27df*/
n6a_1 = 0; /*0xffcc27e3*/
v37 = 0; /*0xffcc27e5*/
v10 = 0; /*0xffcc27ea*/
LOBYTE(n6a) = 0; /*0xffcc27ee*/
SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffcc27f2*/
n120 = 120; /*0xffcc27f6*/
do /*0xffcc28d8*/
{
if ( *SocketInfo_1 ) /*0xffcc27fe*/
{
CpuCount = GetCpuCount((int)n6, n4, (unsigned __int8)n6a); /*0xffcc281a*/
if ( !KtiFunc89E9((int)n6, n4, (char)n6a, n2_1, n4_2, 0) ) /*0xffcc2820*/
{
if ( (unsigned __int8)n4_2 < *(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 19) ) /*0xffcc2848*/
{
v11 = KtiFunc88D1((int)n6, n4, (unsigned __int8)n6a, n2, n4_2); /*0xffcc2856*/
DdrTrainFuncE35((int)n6, n4, (int)n6a, 1 << v11, 0, 0); /*0xffcc286e*/
v12 = v37; /*0xffcc2873*/
n72 = 72; /*0xffcc2883*/
do /*0xffcc28a7*/
{
LOWORD(n120_1) = 0; /*0xffcc2884*/
*(_DWORD *)p_n60 = 0; /*0xffcc2886*/
do /*0xffcc289f*/
{
*(_BYTE *)(v12 + (__int16)n120_1 + a5) = 0; /*0xffcc288d*/
n120_1 = *(_DWORD *)p_n60 + 1; /*0xffcc2895*/
*(_DWORD *)p_n60 = n120_1; /*0xffcc2896*/
}
while ( (__int16)n120_1 < (__int16)n120 ); /*0xffcc289f*/
v12 += 128; /*0xffcc28a1*/
--n72; /*0xffcc28a4*/
}
while ( n72 ); /*0xffcc28a7*/
}
n2_1 = n2; /*0xffcc28a9*/
}
n6a_1 = (unsigned __int8)n6a; /*0xffcc28b0*/
SocketInfo_1 = SocketInfo_2; /*0xffcc28b4*/
v10 = v37; /*0xffcc28b8*/
}
++n6a_1; /*0xffcc28bc*/
SocketInfo_1 += 7688; /*0xffcc28be*/
v10 += 9216; /*0xffcc28c4*/
LOBYTE(n6a) = n6a_1; /*0xffcc28ca*/
SocketInfo_2 = SocketInfo_1; /*0xffcc28ce*/
v37 = v10; /*0xffcc28d2*/
}
while ( n6a_1 < 6u ); /*0xffcc28d8*/
n6_1 = 0; /*0xffcc28de*/
DdrTrainFunc21E0(n6, n4, v41, 1, 0, 0, 0); /*0xffcc28eb*/
SocketInfo_3 = (_BYTE *)SocketInfo; /*0xffcc28f0*/
LOBYTE(n6a) = 0; /*0xffcc28f7*/
SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffcc28fb*/
do /*0xffcc299d*/
{
if ( *SocketInfo_3 ) /*0xffcc28ff*/
{
CpuCount = GetCpuCount((int)n6, n4, (unsigned __int8)n6a); /*0xffcc2924*/
v17 = KtiFunc89E9((int)n6, n4, (char)n6a, n2, n4_2, 0); /*0xffcc292e*/
n2_2 = n2; /*0xffcc2933*/
n4_3 = n4_2; /*0xffcc293d*/
if ( !v17 && (unsigned __int8)n4_2 < *(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 19) ) /*0xffcc2954*/
{
ProcCommonFunc406B(n6, n4, (int)n6a, 1, 1, 1, 11184810, 13421772, 15790320); /*0xffcc2971*/
n4_3 = n4_2; /*0xffcc2976*/
n2_2 = n2; /*0xffcc2980*/
}
SocketInfo_3 = SocketInfo_2; /*0xffcc2987*/
}
else
{
n4_3 = n4_2; /*0xffcc2b74*/
n2_2 = n2; /*0xffcc2b7b*/
}
++n6_1; /*0xffcc298b*/
SocketInfo_3 += 7688; /*0xffcc298d*/
LOBYTE(n6a) = n6_1; /*0xffcc2992*/
SocketInfo_2 = SocketInfo_3; /*0xffcc2996*/
}
while ( n6_1 < 6u ); /*0xffcc299d*/
DebugPrint((int)n6, 2, n4, 255, n2_2, n4_3, 255, 255, "RxDqDqs Pi Scanning...\n"); /*0xffcc29b6*/
*(_DWORD *)p_n60 = 0; /*0xffcc29be*/
do /*0xffcc2c46*/
{
SocketInfo_4 = (_BYTE *)SocketInfo; /*0xffcc29c3*/
n6_2 = 0; /*0xffcc29c7*/
n4_4 = n4_2; /*0xffcc29c9*/
LOBYTE(n6a) = 0; /*0xffcc29d0*/
SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffcc29d4*/
do /*0xffcc2a68*/
{
if ( *SocketInfo_4 ) /*0xffcc29d8*/
{
CpuCount = GetCpuCount((int)n6, n4_1, (unsigned __int8)n6a); /*0xffcc29f2*/
if ( !KtiFunc89E9((int)n6, n4_1, (char)n6a, n2, n4_4, 0) ) /*0xffcc29fc*/
{
if ( (unsigned __int8)n4_2 < *(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 19) ) /*0xffcc2a27*/
MrcMarginGroupTrain(n6, n4_1, n6a, n2, n4_2, 255, 0, 0, 19, 16, p_n60); /*0xffcc2a43*/
n4_4 = n4_2; /*0xffcc2a4b*/
}
SocketInfo_4 = SocketInfo_2; /*0xffcc2a52*/
}
++n6_2; /*0xffcc2a56*/
SocketInfo_4 += 7688; /*0xffcc2a58*/
LOBYTE(n6a) = n6_2; /*0xffcc2a5d*/
SocketInfo_2 = SocketInfo_4; /*0xffcc2a61*/
}
while ( n6_2 < 6u ); /*0xffcc2a68*/
MailBoxFunc2B5B((int)n6, n4_1); /*0xffcc2a70*/
SocketInfo_7 = 0; /*0xffcc2a75*/
DdrTrainFuncB30(n6, n4_1, v41, 0, (int)&n16843009, 1, 0); /*0xffcc2a86*/
SocketInfo_5 = (_BYTE *)SocketInfo; /*0xffcc2a8b*/
v25 = v46; /*0xffcc2a8f*/
n6b_1 = 0; /*0xffcc2a93*/
v37 = 0; /*0xffcc2a95*/
n6b = 0; /*0xffcc2a9c*/
SocketInfo_2 = 0; /*0xffcc2aa0*/
v27 = 0; /*0xffcc2aa4*/
n120 = SocketInfo; /*0xffcc2aa6*/
do /*0xffcc2c28*/
{
if ( *SocketInfo_5 ) /*0xffcc2aaa*/
{
CpuCount = GetCpuCount((int)n6, n4_1, n6b); /*0xffcc2acf*/
if ( !KtiFunc89E9((int)n6, n4_1, n6b, n2, n4_2, 0) /*0xffcc2b01*/
&& (unsigned __int8)n4_2 < *(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 19) )
{
v28 = v37; /*0xffcc2b07*/
*v25 = 0; /*0xffcc2b0d*/
v25[1] = 0; /*0xffcc2b10*/
v25[2] = 0; /*0xffcc2b13*/
KtiFuncBC82(n6, n4_1, (unsigned __int8)(1 << v28), (int)v46); /*0xffcc2b25*/
if ( ProcCommonFuncFB4A((int)n6, 2u) ) /*0xffcc2b2d*/
RmtFunc4165(n6, n4_1, n6b, n2, n4_2, v25, p_n60[0]); /*0xffcc2b4c*/
SocketInfo_6 = SocketInfo_2; /*0xffcc2b54*/
n0x40 = 0; /*0xffcc2b58*/
v31 = 0; /*0xffcc2b5a*/
do /*0xffcc2bea*/
{
if ( n6[257312] || n0x40 <= 0x3Fu ) /*0xffcc2b68*/
{
if ( n0x40 >= 0x20u ) /*0xffcc2b6d*/
{
if ( n0x40 >= 0x40u ) /*0xffcc2b8a*/
v32 = v25[2]; /*0xffcc2b91*/
else
v32 = v25[1]; /*0xffcc2b8c*/
}
else
{
v32 = *v25; /*0xffcc2b6f*/
}
CpuCount = (_DWORD)&SocketInfo_6[v31] << 7; /*0xffcc2b9a*/
*(_BYTE *)(CpuCount + (__int16)p_n60[0] % 128 + a5) = ((1 << v31) & v32) != 0; /*0xffcc2bc3*/
}
++n0x40; /*0xffcc2be4*/
++v31; /*0xffcc2be6*/
}
while ( n0x40 < 0x48u ); /*0xffcc2bea*/
n4_1 = n4; /*0xffcc2bf0*/
}
n6b_1 = n6b; /*0xffcc2bf7*/
SocketInfo_5 = (_BYTE *)n120; /*0xffcc2bfb*/
v27 = v37; /*0xffcc2bff*/
SocketInfo_7 = SocketInfo_2; /*0xffcc2c03*/
}
++n6b_1; /*0xffcc2c07*/
SocketInfo_5 += 7688; /*0xffcc2c09*/
++v27; /*0xffcc2c0f*/
n6b = n6b_1; /*0xffcc2c10*/
SocketInfo_7 += 72; /*0xffcc2c14*/
v37 = v27; /*0xffcc2c17*/
v25 += 3; /*0xffcc2c1b*/
n120 = (int)SocketInfo_5; /*0xffcc2c1e*/
SocketInfo_2 = SocketInfo_7; /*0xffcc2c22*/
}
while ( n6b_1 < 6u ); /*0xffcc2c28*/
MailBoxFunc2B5B((int)n6, n4_1); /*0xffcc2c30*/
++*(_DWORD *)p_n60; /*0xffcc2c3f*/
}
while ( (__int16)p_n60[0] < 120 ); /*0xffcc2c46*/
return 0; /*0xffcc2c4c*/
}
// Function: RmtFunc2C56 @ 0xffcc2c56 (0x1e bytes)
// Index: 1639/2560
char __cdecl RmtFunc2C56(unsigned __int8 *__return_address, unsigned __int8 n4)
{
int n1019412735; // eax
n1019412735 = DdrTrainFunc2F2((int)__return_address); /*0xffcc2c5c*/
return RmtFunc729D(__return_address, n4, n1019412735, 1u); /*0xffcc2c73*/
}
// Function: RmtFunc2C74 @ 0xffcc2c74 (0x881 bytes)
// Index: 1640/2560
int __cdecl RmtFunc2C74(unsigned __int8 *__return_address)
{
int v2; // esi
__int16 *v3; // eax
int n6_1; // edx
int n72; // ecx
int v6; // edi
int v7; // esi
unsigned __int8 n2_1; // al
int n19; // ecx
unsigned __int8 v10; // dl
unsigned __int8 n6_2; // al
_BYTE *SocketInfo_1; // esi
int v13; // ecx
bool v14; // al
int v15; // [esp+8h] [ebp-E960h]
int n2; // [esp+Ch] [ebp-E95Ch]
int n6; // [esp+10h] [ebp-E958h]
int v18; // [esp+14h] [ebp-E954h]
int CpuCount; // [esp+28h] [ebp-E940h]
int n19_1; // [esp+38h] [ebp-E930h]
int v21; // [esp+44h] [ebp-E924h]
int v22; // [esp+48h] [ebp-E920h]
int n4; // [esp+58h] [ebp-E910h]
int v24; // [esp+5Ch] [ebp-E90Ch]
int SocketInfo; // [esp+64h] [ebp-E904h]
__int16 v26; // [esp+8Ah] [ebp-E8DEh] BYREF
if ( (~__return_address[628652] & 0x10) != 0 ) /*0xffcc2c8c*/
return 0; /*0xffcc2c8e*/
v2 = __return_address[9402]; /*0xffcc2ca1*/
LOBYTE(n4) = __return_address[9402]; /*0xffcc2ca4*/
if ( !__return_address[48704 * v2 + 258689] || !__return_address[48704 * v2 + 258716] ) /*0xffcc2cc0*/
return 0; /*0xffcc34ea*/
RmtFunc2C56(__return_address, n4); /*0xffcc2cd5*/
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffcc2ce4*/
v3 = &v26; /*0xffcc2ce8*/
n6_1 = 6; /*0xffcc2cf1*/
do /*0xffcc2d06*/
{
n72 = 72; /*0xffcc2cf5*/
do /*0xffcc2d01*/
{
v6 = 0; /*0xffcc2cf6*/
*(_DWORD *)(v3 - 1) = 0; /*0xffcc2cf8*/
v3 += 2; /*0xffcc2cfb*/
--n72; /*0xffcc2cfe*/
}
while ( n72 ); /*0xffcc2d01*/
--n6_1; /*0xffcc2d03*/
}
while ( n6_1 ); /*0xffcc2d06*/
v7 = 50813 * v2; /*0xffcc2d08*/
n2_1 = 0; /*0xffcc2d0e*/
v22 = 0; /*0xffcc2d10*/
n19 = 19; /*0xffcc2d16*/
LOBYTE(n2) = 0; /*0xffcc2d17*/
v24 = v7; /*0xffcc2d1b*/
v21 = 0; /*0xffcc2d1f*/
n19_1 = 19; /*0xffcc2d23*/
do /*0xffcc3475*/
{
v10 = 0; /*0xffcc2d27*/
LOBYTE(v15) = 0; /*0xffcc2d29*/
if ( __return_address[v7 + 10194] ) /*0xffcc2d2d*/
{
do /*0xffcc3443*/
{
v18 = v7; /*0xffcc2d3a*/
n6_2 = 0; /*0xffcc2d3e*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcc2d40*/
v13 = v18; /*0xffcc2d44*/
LOBYTE(n6) = 0; /*0xffcc2d4d*/
do /*0xffcc2e33*/
{
if ( *SocketInfo_1 ) /*0xffcc2d55*/
{
KtiFunc91AF((int)__return_address, n4, n6, n2); /*0xffcc2d69*/
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffcc2d80*/
v14 = KtiFunc89E9((int)__return_address, n4, n6, n2, v15, 0); /*0xffcc2d8b*/
v10 = v15; /*0xffcc2d90*/
if ( !v14 && (unsigned __int8)v15 < *(_BYTE *)(n19_1 + CpuCount) ) /*0xffcc2da6*/
KtiFuncF96E(__return_address, n4, n6, n2, v15, 4u); /*0xffcc2dcd*/
n6_2 = n6; /*0xffcc2e0f*/
v13 = v18; /*0xffcc2e13*/
}
++n6_2; /*0xffcc2e17*/
SocketInfo_1 += 7688; /*0xffcc2e19*/
v13 += 8077; /*0xffcc2e1f*/
LOBYTE(n6) = n6_2; /*0xffcc2e25*/
v18 = v13; /*0xffcc2e2d*/
}
while ( n6_2 < 6u ); /*0xffcc2e33*/
v7 = v24; /*0xffcc3432*/
LOBYTE(v15) = ++v10; /*0xffcc3438*/
}
while ( v10 < __return_address[v24 + 10194] ); /*0xffcc3443*/
n2_1 = n2; /*0xffcc3449*/
n19 = n19_1; /*0xffcc344d*/
v6 = v21; /*0xffcc3451*/
}
++n2_1; /*0xffcc3455*/
n19 += 1379; /*0xffcc3457*/
++v22; /*0xffcc345d*/
v6 += 2688; /*0xffcc3461*/
LOBYTE(n2) = n2_1; /*0xffcc3467*/
n19_1 = n19; /*0xffcc346b*/
v21 = v6; /*0xffcc346f*/
}
while ( n2_1 < 2u ); /*0xffcc3475*/
ProcCommonFunc186E(__return_address, n4); /*0xffcc347d*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcc3485*/
{
RmtFunc5B54(__return_address, n4, 0x13u); /*0xffcc3496*/
RmtFunc5B54(__return_address, n4, 2u); /*0xffcc349f*/
RmtFunc5B54(__return_address, n4, 3u); /*0xffcc34a8*/
RmtFunc5B54(__return_address, n4, 4u); /*0xffcc34b1*/
RmtFunc5B54(__return_address, n4, 0x12u); /*0xffcc34ba*/
DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc34d2*/
}
ReadDqDqsCleanup(__return_address, n4); /*0xffcc34dc*/
return 0; /*0xffcc34ed*/
}
// Function: RmtFunc34F5 @ 0xffcc34f5 (0x106 bytes)
// Index: 1641/2560
int __cdecl RmtFunc34F5(unsigned __int8 *n6, int n4, char n2, char a4, int a5, int a6)
{
unsigned __int8 n6a_1; // dl
char v7; // bp
char v8; // al
unsigned __int8 n6a_2; // dl
char v10; // bp
int v11; // esi
int n6a; // [esp+10h] [ebp-Ch]
int n16843009; // [esp+14h] [ebp-8h] BYREF
__int16 n257; // [esp+18h] [ebp-4h]
char v16; // [esp+1Ah] [ebp-2h]
n6a_1 = 0; /*0xffcc34fd*/
v7 = 0; /*0xffcc3505*/
n16843009 = 16843009; /*0xffcc350c*/
n257 = 257; /*0xffcc3514*/
v16 = 1; /*0xffcc351b*/
LOBYTE(n6a) = 0; /*0xffcc3520*/
do /*0xffcc356f*/
{
if ( ((1 << v7) & a5) != 0 ) /*0xffcc352d*/
{
v8 = KtiFunc88D1((int)n6, n4, n6a, n2, a4); /*0xffcc3541*/
DdrTrainFuncE35((int)n6, n4, n6a, 1 << v8, 0, 0); /*0xffcc3559*/
n6a_1 = n6a; /*0xffcc355e*/
}
++n6a_1; /*0xffcc3565*/
++v7; /*0xffcc3567*/
LOBYTE(n6a) = n6a_1; /*0xffcc3568*/
}
while ( n6a_1 < 6u ); /*0xffcc356f*/
DdrTrainFunc21E0(n6, n4, a5, 1, 0, 0, 0); /*0xffcc357b*/
n6a_2 = 0; /*0xffcc3580*/
LOBYTE(n6a) = 0; /*0xffcc3585*/
v10 = 0; /*0xffcc3589*/
do /*0xffcc35bd*/
{
if ( ((1 << v10) & a5) != 0 ) /*0xffcc3594*/
{
ProcCommonFunc406B(n6, n4, n6a, 1, 1, 1, 0, 0, 0); /*0xffcc35a7*/
n6a_2 = n6a; /*0xffcc35ac*/
}
++n6a_2; /*0xffcc35b3*/
++v10; /*0xffcc35b5*/
LOBYTE(n6a) = n6a_2; /*0xffcc35b6*/
}
while ( n6a_2 < 6u ); /*0xffcc35bd*/
MailBoxFunc2B5B((int)n6, n4); /*0xffcc35c1*/
DdrTrainFuncB30(n6, n4, a5, 0, (int)&n16843009, 1, 0); /*0xffcc35d4*/
v11 = KtiFuncBC82(n6, n4, a5, a6); /*0xffcc35e7*/
MailBoxFunc2B5B((int)n6, n4); /*0xffcc35e9*/
return v11; /*0xffcc35f3*/
}
// Function: RmtFunc35FB @ 0xffcc35fb (0x17 bytes)
// Index: 1642/2560
char __cdecl RmtFunc35FB(unsigned __int8 a1)
{
return a1 - 6 * (a1 >> 4); /*0xffcc3611*/
}
// Function: CpgcPointTestMain @ 0xffcc3612 (0xb53 bytes)
// Index: 1643/2560
int __cdecl CpgcPointTestMain(unsigned __int8 *__return_address)
{
char n4_1; // dl
unsigned __int8 *v2; // ebp
int n6_6; // ebx
unsigned __int8 *v4; // ebx
int v5; // esi
int n6; // ebp
int v7; // ecx
char v8; // bh
unsigned __int8 n6_1; // bl
int CpuCount; // esi
unsigned __int8 n6_2; // bl
int v12; // esi
unsigned __int8 n6_4; // bl
int v14; // esi
int n6_3; // esi
int v16; // esi
int n4_2; // ebx
unsigned __int8 *v18; // esi
int n4_3; // ebp
int n4_4; // esi
unsigned __int8 n4_5; // cl
int v22; // eax
int v23; // ebp
int v24; // ebx
char v25; // cl
int SocketInfo; // eax
int SocketInfo_1; // esi
int v28; // eax
unsigned __int16 n0x3E8; // si
unsigned __int8 n4_6; // bl
int v31; // eax
unsigned __int8 v32; // al
int n2; // eax
int n4_7; // ebx
int n4_8; // esi
unsigned int v36; // esi
unsigned __int8 v38; // [esp+5h] [ebp-1Fh]
char v39; // [esp+5h] [ebp-1Fh]
unsigned __int8 p_n42; // [esp+6h] [ebp-1Eh] BYR... [22341 chars total]
// Function: RmtFunc4165 @ 0xffcc4165 (0xd7 bytes)
// Index: 1644/2560
void __cdecl RmtFunc4165(_BYTE *__return_address, char n4, char n6, char n2, char n4a, int *a6, __int16 a7)
{
unsigned __int8 n64; // bl
int v9; // edi
unsigned __int8 n64_2; // al
unsigned __int8 n64_1; // [esp+14h] [ebp+4h]
KtiFunc8014((int)__return_address); /*0xffcc416e*/
n64_1 = 8 * (__return_address[257312] != 0) + 64; /*0xffcc4184*/
RmtFunc479D(__return_address, n4, n6, n2, n4a, 0xFFu, 0xFFu); /*0xffcc41a0*/
LogDebugString(__return_address, (int)a3d_2, a7); /*0xffcc41b1*/
n64 = 0; /*0xffcc41bd*/
v9 = 0; /*0xffcc41bf*/
do /*0xffcc4221*/
{
n64_2 = n64; /*0xffcc41c1*/
if ( (n64 & 7) == 0 ) /*0xffcc41ca*/
{
LogDebugString(__return_address, (int)" "); /*0xffcc41d2*/
n64_2 = n64; /*0xffcc41d7*/
}
if ( n64 ) /*0xffcc41df*/
{
if ( n64 == 32 ) /*0xffcc41e4*/
{
v9 = a6[1]; /*0xffcc41f0*/
}
else if ( n64 == 64 ) /*0xffcc41e9*/
{
v9 = a6[2]; /*0xffcc41eb*/
}
}
else
{
v9 = *a6; /*0xffcc41f5*/
}
if ( ((1 << (n64_2 & 0x1F)) & v9) != 0 ) /*0xffcc4205*/
LogDebugString(__return_address, (int)"#"); /*0xffcc420c*/
else
LogDebugString(__return_address, (int)"."); /*0xffcc4214*/
++n64; /*0xffcc4219*/
}
while ( n64 < n64_1 ); /*0xffcc4221*/
LogDebugString(__return_address, (int)"\n"); /*0xffcc4229*/
KtiFunc834D((int)__return_address); /*0xffcc422f*/
}
// Function: RmtFunc423C @ 0xffcc423c (0xf4 bytes)
// Index: 1645/2560
int __cdecl RmtFunc423C(int __return_address, int n4)
{
_BYTE *SocketInfo; // edi
__int16 *v3; // ebp
unsigned __int8 n6; // bl
_BYTE *CpuCount; // eax
unsigned __int8 n2; // bh
int v8; // [esp+10h] [ebp-18h]
int v9; // [esp+14h] [ebp-14h]
_BYTE *CpuCount_1; // [esp+18h] [ebp-10h]
char v11; // [esp+1Ch] [ebp-Ch] BYREF
SocketInfo = (_BYTE *)GetSocketInfo(__return_address, n4); /*0xffcc4256*/
DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, "\nSTART_DATA_CMD_VREF\n"); /*0xffcc4266*/
v3 = (__int16 *)&v11; /*0xffcc426e*/
n6 = 0; /*0xffcc4272*/
LOBYTE(v8) = 0; /*0xffcc4274*/
do /*0xffcc4307*/
{
if ( *SocketInfo ) /*0xffcc4278*/
{
CpuCount = (_BYTE *)GetCpuCount(__return_address, n4, v8); /*0xffcc4286*/
CpuCount_1 = CpuCount; /*0xffcc428e*/
n2 = 0; /*0xffcc4292*/
LOBYTE(v9) = 0; /*0xffcc4294*/
do /*0xffcc42f3*/
{
if ( *CpuCount ) /*0xffcc4298*/
{
KtiFuncBD44(__return_address, n4, v8, v9, 0, 2, v3); /*0xffcc42af*/
DebugPrint(__return_address, 10, n4, v8, v9, 255, 255, 255, "%d\n", *v3); /*0xffcc42d5*/
CpuCount = CpuCount_1; /*0xffcc42da*/
}
++n2; /*0xffcc42e1*/
CpuCount += 1379; /*0xffcc42e3*/
LOBYTE(v9) = n2; /*0xffcc42e8*/
CpuCount_1 = CpuCount; /*0xffcc42ec*/
}
while ( n2 < 2u ); /*0xffcc42f3*/
}
++n6; /*0xffcc42f5*/
SocketInfo += 7688; /*0xffcc42f7*/
++v3; /*0xffcc42fd*/
LOBYTE(v8) = n6; /*0xffcc4300*/
}
while ( n6 < 6u ); /*0xffcc4307*/
return DebugPrint(__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc4328*/
}
// Function: RmtFunc4330 @ 0xffcc4330 (0x12e bytes)
// Index: 1646/2560
char __cdecl RmtFunc4330(_BYTE *p_n42, unsigned __int8 n6)
{
char result; // al
result = ProcCommonFuncFB4A((int)p_n42, 3u); /*0xffcc4338*/
if ( result ) /*0xffcc4341*/
{
LogDebugString(p_n42, (int)"DDR-"); /*0xffcc434d*/
result = p_n42[48704 * n6 + 258694]; /*0xffcc435f*/
switch ( result ) /*0xffcc4370*/
{
case 0: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"800\n"); /*0xffcc437c*/
break; /*0xffcc437c*/
case 1: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"1000\n"); /*0xffcc4386*/
break; /*0xffcc4386*/
case 2: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"1066\n"); /*0xffcc4390*/
break; /*0xffcc4390*/
case 3: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"1200\n"); /*0xffcc439a*/
break; /*0xffcc439a*/
case 4: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"1333\n"); /*0xffcc43a4*/
break; /*0xffcc43a4*/
case 5: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"1400\n"); /*0xffcc43ae*/
break; /*0xffcc43ae*/
case 6: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"1600\n"); /*0xffcc43b8*/
break; /*0xffcc43b8*/
case 7: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"1800\n"); /*0xffcc43c2*/
break; /*0xffcc43c2*/
case 8: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"1866\n"); /*0xffcc43cc*/
break; /*0xffcc43cc*/
case 9: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"2000\n"); /*0xffcc43d6*/
break; /*0xffcc43d6*/
case 10: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"2133\n"); /*0xffcc43dd*/
break; /*0xffcc43dd*/
case 11: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"2200\n"); /*0xffcc43e4*/
break; /*0xffcc43e4*/
case 12: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"2400\n"); /*0xffcc43eb*/
break; /*0xffcc43eb*/
case 13: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"2600\n"); /*0xffcc43f2*/
break; /*0xffcc43f2*/
case 14: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"2666\n"); /*0xffcc43f9*/
break; /*0xffcc43f9*/
case 15: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"2800\n"); /*0xffcc4400*/
break; /*0xffcc4400*/
case 16: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"2933\n"); /*0xffcc4407*/
break; /*0xffcc4407*/
case 17: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"3000\n"); /*0xffcc440e*/
break; /*0xffcc440e*/
case 18: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"3200\n"); /*0xffcc4415*/
break; /*0xffcc4415*/
case 19: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"3400\n"); /*0xffcc441c*/
break; /*0xffcc441c*/
case 20: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"3466\n"); /*0xffcc4423*/
break; /*0xffcc4423*/
case 21: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"3600\n"); /*0xffcc442a*/
break; /*0xffcc442a*/
case 22: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"3733n"); /*0xffcc4431*/
break; /*0xffcc4431*/
case 23: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"3800\n"); /*0xffcc4438*/
break; /*0xffcc4438*/
case 24: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"4000\n"); /*0xffcc443f*/
break; /*0xffcc443f*/
case 25: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"4200\n"); /*0xffcc4446*/
break; /*0xffcc4446*/
case 26: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"4266\n"); /*0xffcc444d*/
break; /*0xffcc444d*/
case 27: /*0xffcc4370*/
result = LogDebugString(p_n42, (int)"4400\n"); /*0xffcc4455*/
break; /*0xffcc4455*/
default:
return result;
}
}
return result; /*0xffcc445c*/
}
// Function: RmtFunc44D0 @ 0xffcc44d0 (0x2cd bytes)
// Index: 1647/2560
int __cdecl RmtFunc44D0(unsigned __int8 *n6, int n4, unsigned int n5)
{
unsigned __int8 n8; // bl
int v5; // ebp
_BYTE *SocketInfo; // eax
unsigned __int8 n6_1; // bh
int CpuCount; // eax
unsigned __int8 n2; // bl
unsigned __int8 *v10; // ebp
unsigned __int8 v11; // bh
unsigned __int8 n5a_1; // al
unsigned __int8 n8_1; // bl
signed __int16 p_n60_1; // ax
unsigned __int16 p_n60; // [esp+10h] [ebp-18h] BYREF
unsigned __int8 v17[4]; // [esp+14h] [ebp-14h]
unsigned __int8 v18[4]; // [esp+18h] [ebp-10h]
int v19; // [esp+1Ch] [ebp-Ch]
int n0x12; // [esp+20h] [ebp-8h]
_BYTE *SocketInfo_1; // [esp+24h] [ebp-4h]
char n5a; // [esp+34h] [ebp+Ch]
if ( n5 == 5 ) /*0xffcc44ea*/
{
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\nLRDIMM_BACKSIDE_RXVREF_TRAINING_RESULTS\n"); /*0xffcc44f1*/
}
else if ( n5 ) /*0xffcc44f5*/
{
switch ( n5 ) /*0xffcc4501*/
{
case 0x43u: /*0xffcc4501*/
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\nLRDIMM_BACKSIDE_RX_CYCLE_TRAINING_RESULTS\n"); /*0xffcc4508*/
break;
case 1u: /*0xffcc4501*/
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\nLRDIMM_BACKSIDE_RX_DQSDELAY_TRAINING_RESULTS\n"); /*0xffcc4514*/
break;
case 0x15u: /*0xffcc4501*/
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\nLRDIMM_BACKSIDE_WRITE_LEVELING_TRAINING_RESULTS\n"); /*0xffcc4520*/
break;
case 0x44u: /*0xffcc4501*/
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\nLRDIMM_BACKSIDE_WRITE_CYCLE_TRAINING_RESULTS\n"); /*0xffcc452c*/
break;
case 0x16u: /*0xffcc4501*/
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\nLRDIMM_BACKSIDE_TX_DQDELAY_TRAINING_RESULTS\n"); /*0xffcc4538*/
break;
case 0x17u: /*0xffcc4501*/
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\nLRDIMM_BACKSIDE_TXVREF_TRAINING_RESULTS\n"); /*0xffcc454c*/
break;
}
}
else
{
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\nLRDIMM_BACKSIDE_RX_RCVEN_TRAINING_RESULTS\n"); /*0xffcc44fc*/
}
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, " "); /*0xffcc4561*/
n8 = 0; /*0xffcc4569*/
v5 = 0; /*0xffcc456b*/
do /*0xffcc45a2*/
{
if ( n6[257312] || n8 != 8 && n8 != 17 ) /*0xffcc457e*/
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, " %3d", v5); /*0xffcc4594*/
++n8; /*0xffcc459c*/
++v5; /*0xffcc459e*/
}
while ( n8 < 0x12u ); /*0xffcc45a2*/
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc45b7*/
SocketInfo = (_BYTE *)GetSocketInfo((int)n6, n4); /*0xffcc45c1*/
SocketInfo_1 = SocketInfo; /*0xffcc45c9*/
n6_1 = 0; /*0xffcc45cd*/
v17[0] = 0; /*0xffcc45cf*/
do /*0xffcc4774*/
{
if ( *SocketInfo ) /*0xffcc45d3*/
{
CpuCount = GetCpuCount((int)n6, n4, v17[0]); /*0xffcc45e5*/
n2 = 0; /*0xffcc45ed*/
v18[0] = 0; /*0xffcc45ef*/
v10 = (unsigned __int8 *)(CpuCount + 20); /*0xffcc45f3*/
do /*0xffcc4754*/
{
if ( v10[1229] ) /*0xffcc45f6*/
{
v11 = 0; /*0xffcc4618*/
n5a = ProcCommonFunc1DB2((int)n6, n4, v17[0], v18[0], n5, 1); /*0xffcc461a*/
LOBYTE(v19) = 0; /*0xffcc4621*/
if ( *v10 ) /*0xffcc4625*/
{
do /*0xffcc473b*/
{
if ( !KtiFunc89E9((int)n6, n4, v17[0], v18[0], v19, 0) ) /*0xffcc4641*/
{
DebugPrint((int)n6, 10, n4, *(int *)v17, *(int *)v18, v19, 255, 255, byte_FFD25E04); /*0xffcc4670*/
n5a_1 = n5a; /*0xffcc4675*/
n8_1 = 0; /*0xffcc4679*/
for ( LOBYTE(n0x12) = 0; n8_1 < n5a_1; LOBYTE(n0x12) = n8_1 ) /*0xffcc4684*/
{
if ( n6[257312] || n8_1 != 8 && n8_1 != 17 ) /*0xffcc469b*/
{
MrcMarginGroupTrain(n6, n4, *(_BYTE **)v17, *(int *)v18, v19, n0x12, 255, 1, n5, 2, &p_n60); /*0xffcc46c1*/
if ( n5 == 1 || n5 == 22 ) /*0xffcc46d1*/
{
p_n60_1 = p_n60 - 15; /*0xffcc46df*/
p_n60 -= 15; /*0xffcc46e3*/
}
else
{
p_n60_1 = p_n60; /*0xffcc46d3*/
}
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, " %3d", p_n60_1); /*0xffcc46fd*/
n5a_1 = n5a; /*0xffcc4702*/
}
++n8_1; /*0xffcc4709*/
}
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc472a*/
}
LOBYTE(v19) = ++v11; /*0xffcc4734*/
}
while ( v11 < *v10 ); /*0xffcc473b*/
n2 = v18[0]; /*0xffcc4741*/
}
}
++n2; /*0xffcc4745*/
v10 += 1379; /*0xffcc4747*/
v18[0] = n2; /*0xffcc474d*/
}
while ( n2 < 2u ); /*0xffcc4754*/
n6_1 = v17[0]; /*0xffcc475a*/
SocketInfo = SocketInfo_1; /*0xffcc475e*/
}
++n6_1; /*0xffcc4762*/
SocketInfo += 7688; /*0xffcc4764*/
v17[0] = n6_1; /*0xffcc4769*/
SocketInfo_1 = SocketInfo; /*0xffcc476d*/
}
while ( n6_1 < 6u ); /*0xffcc4774*/
return DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc4795*/
}
// Function: RmtFunc479D @ 0xffcc479d (0x12e bytes)
// Index: 1648/2560
char __cdecl RmtFunc479D(
_BYTE *__return_address,
unsigned __int8 n4,
unsigned __int8 n6,
unsigned __int8 n2,
unsigned __int8 n4a,
unsigned __int8 n255,
unsigned __int8 n72)
{
char result; // al
result = 0; /*0xffcc47a4*/
if ( n4 != 0xFF ) /*0xffcc47ae*/
{
if ( __return_address[163] == 1 ) /*0xffcc47b7*/
LogDebugString(__return_address, (int)"%4x.", *((unsigned __int16 *)__return_address + 123385)); /*0xffcc47c7*/
LogDebugString(__return_address, (int)"N%d", n4); /*0xffcc47d9*/
result = 1; /*0xffcc47e1*/
}
if ( n6 != 0xFF ) /*0xffcc47ee*/
{
if ( result ) /*0xffcc47f2*/
LogDebugString(__return_address, (int)"."); /*0xffcc47f6*/
LogDebugString(__return_address, (int)"C%d", n6); /*0xffcc4807*/
result = 1; /*0xffcc480f*/
}
if ( n2 != 0xFF ) /*0xffcc4817*/
{
if ( result ) /*0xffcc481b*/
LogDebugString(__return_address, (int)"."); /*0xffcc481f*/
LogDebugString(__return_address, (int)"D%d", n2); /*0xffcc4830*/
result = 1; /*0xffcc4838*/
}
if ( n4a != 0xFF ) /*0xffcc4840*/
{
if ( result ) /*0xffcc4844*/
LogDebugString(__return_address, (int)"."); /*0xffcc4848*/
LogDebugString(__return_address, (int)"R%d", n4a); /*0xffcc4859*/
result = 1; /*0xffcc4861*/
}
if ( n255 != 0xFF ) /*0xffcc4869*/
{
if ( result ) /*0xffcc486d*/
LogDebugString(__return_address, (int)"."); /*0xffcc4871*/
LogDebugString(__return_address, (int)"S%02d", n255); /*0xffcc4882*/
result = 1; /*0xffcc488a*/
}
if ( n72 != 0xFF ) /*0xffcc4892*/
{
if ( result ) /*0xffcc4896*/
LogDebugString(__return_address, (int)"."); /*0xffcc489a*/
LogDebugString(__return_address, (int)"B%02d", n72); /*0xffcc48ab*/
result = 1; /*0xffcc48b3*/
}
if ( result )
return LogDebugString(__return_address, (int)": ");
return result; /*0xffcc48c6*/
}
// Function: RmtFunc48CB @ 0xffcc48cb (0x106 bytes)
// Index: 1649/2560
int __cdecl RmtFunc48CB(_BYTE *__return_address, unsigned __int8 n4, unsigned __int8 a3)
{
_BYTE *__return_address_1; // esi
unsigned __int8 n6; // bl
int v5; // edi
int CpuCount; // eax
int v7; // esi
int v8; // edx
unsigned __int8 *v9; // edi
int n4_1; // ebp
char v11; // cl
int result; // eax
unsigned __int8 v13; // [esp+10h] [ebp-18h]
unsigned __int16 v14; // [esp+18h] [ebp-10h]
unsigned __int16 v15; // [esp+24h] [ebp-4h]
__return_address_1 = __return_address; /*0xffcc48d6*/
n6 = 0; /*0xffcc48da*/
v5 = 1379 * a3; /*0xffcc48dd*/
v13 = 0; /*0xffcc48e3*/
do /*0xffcc49c3*/
{
CpuCount = GetCpuCount((int)__return_address_1, n4, v13); /*0xffcc48f4*/
if ( *(_BYTE *)(v5 + CpuCount) ) /*0xffcc4902*/
{
v7 = 0; /*0xffcc4914*/
v8 = 0; /*0xffcc4930*/
v15 = *(unsigned __int8 *)(v5 + CpuCount + 143) | (unsigned __int16)(*(_WORD *)(v5 + CpuCount + 142) << 8); /*0xffcc4932*/
v14 = *(unsigned __int8 *)(v5 + CpuCount + 146) | (unsigned __int16)(*(_WORD *)(v5 + CpuCount + 145) << 8); /*0xffcc4948*/
v9 = (unsigned __int8 *)(v5 + CpuCount + 150); /*0xffcc495a*/
n4_1 = 4; /*0xffcc495c*/
do /*0xffcc4970*/
{
v11 = 24 - v7; /*0xffcc4963*/
v7 += 8; /*0xffcc4965*/
v8 |= *v9++ << v11; /*0xffcc496a*/
--n4_1; /*0xffcc496d*/
}
while ( n4_1 ); /*0xffcc4970*/
v5 = 1379 * a3; /*0xffcc4976*/
__return_address_1 = __return_address; /*0xffcc497e*/
LogDebugString( /*0xffcc499e*/
__return_address,
(int)"0x%04x%02x%04x%08x",
v15,
*(unsigned __int8 *)(v5 + CpuCount + 144),
v14,
v8);
result = RmtFunc696A(__return_address, 0); /*0xffcc49a6*/
}
else
{
result = RmtFunc696A(__return_address_1, 0x14u); /*0xffcc49b3*/
}
v13 = ++n6; /*0xffcc49bc*/
}
while ( n6 < 6u ); /*0xffcc49c3*/
return result; /*0xffcc49c9*/
}
// Function: RmtFunc49D1 @ 0xffcc49d1 (0x1ff bytes)
// Index: 1650/2560
int __cdecl RmtFunc49D1(_BYTE *__return_address, unsigned __int8 n4, unsigned __int8 a3)
{
unsigned __int8 n6; // bl
int v4; // ebp
int CpuCount; // eax
int CpuCount_1; // edi
int result; // eax
unsigned __int8 v8; // [esp+10h] [ebp-4h]
n6 = 0; /*0xffcc49de*/
v8 = 0; /*0xffcc49e1*/
v4 = 1379 * a3; /*0xffcc49e5*/
do /*0xffcc4bc4*/
{
CpuCount = GetCpuCount((int)__return_address, n4, v8); /*0xffcc49f4*/
CpuCount_1 = CpuCount; /*0xffcc49f9*/
if ( *(_BYTE *)(CpuCount + 1379 * a3) ) /*0xffcc49fe*/
{
switch ( *(_BYTE *)(CpuCount + v4 + 105) ) /*0xffcc4a10*/
{
case 0xB: /*0xffcc4a10*/
LogDebugString(__return_address, (int)" DDR3 "); /*0xffcc4a30*/
break;
case 0xC: /*0xffcc4a10*/
LogDebugString(__return_address, (int)" DDR4 "); /*0xffcc4a28*/
break;
case 0xD: /*0xffcc4a10*/
LogDebugString(__return_address, (int)" DDRT "); /*0xffcc4a21*/
break;
}
switch ( *(_BYTE *)(CpuCount_1 + v4 + 109) ) /*0xffcc4a3f*/
{
case 1: /*0xffcc4a3f*/
LogDebugString(__return_address, (int)"RDIMM "); /*0xffcc4a7e*/
break;
case 2: /*0xffcc4a3f*/
LogDebugString(__return_address, (int)"UDIMM "); /*0xffcc4a76*/
break;
case 3: /*0xffcc4a3f*/
LogDebugString(__return_address, (int)"SODIMM "); /*0xffcc4a6f*/
break;
case 4: /*0xffcc4a3f*/
LogDebugString(__return_address, (int)"LRDIMM "); /*0xffcc4a68*/
break;
case 0xD: /*0xffcc4a3f*/
LogDebugString(__return_address, (int)"NVDIMM "); /*0xffcc4a61*/
break;
default:
LogDebugString(__return_address, (int)"Unknown "); /*0xffcc4a5a*/
break;
}
LogDebugString(__return_address, (int)"R/C-"); /*0xffcc4a8b*/
switch ( *(_BYTE *)(CpuCount_1 + v4 + 29) & 0x1F ) /*0xffcc4aa3*/
{
case 0: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"A "); /*0xffcc4aaf*/
break; /*0xffcc4aaf*/
case 1: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"B "); /*0xffcc4ab9*/
break; /*0xffcc4ab9*/
case 2: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"C "); /*0xffcc4ac3*/
break; /*0xffcc4ac3*/
case 3: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"D "); /*0xffcc4acd*/
break; /*0xffcc4acd*/
case 4: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"E "); /*0xffcc4ad7*/
break; /*0xffcc4ad7*/
case 5: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"F "); /*0xffcc4ae1*/
break; /*0xffcc4ae1*/
case 6: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"G "); /*0xffcc4aeb*/
break; /*0xffcc4aeb*/
case 7: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"H "); /*0xffcc4af5*/
break; /*0xffcc4af5*/
case 8: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"J "); /*0xffcc4aff*/
break; /*0xffcc4aff*/
case 9: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"K "); /*0xffcc4b09*/
break; /*0xffcc4b09*/
case 0xA: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"L "); /*0xffcc4b13*/
break; /*0xffcc4b13*/
case 0xB: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"M "); /*0xffcc4b1d*/
break; /*0xffcc4b1d*/
case 0xC: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"N "); /*0xffcc4b27*/
break; /*0xffcc4b27*/
case 0xD: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"P "); /*0xffcc4b2e*/
break; /*0xffcc4b2e*/
case 0xE: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"R "); /*0xffcc4b35*/
break; /*0xffcc4b35*/
case 0xF: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"T "); /*0xffcc4b3c*/
break; /*0xffcc4b3c*/
case 0x10: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"U "); /*0xffcc4b43*/
break; /*0xffcc4b43*/
case 0x12: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"W "); /*0xffcc4b4a*/
break; /*0xffcc4b4a*/
case 0x13: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"Y "); /*0xffcc4b51*/
break; /*0xffcc4b51*/
case 0x14: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"AA"); /*0xffcc4b58*/
break; /*0xffcc4b58*/
case 0x15: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"AB"); /*0xffcc4b5f*/
break; /*0xffcc4b5f*/
case 0x16: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"AC"); /*0xffcc4b66*/
break; /*0xffcc4b66*/
case 0x17: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"AD"); /*0xffcc4b6d*/
break; /*0xffcc4b6d*/
case 0x18: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"AE"); /*0xffcc4b74*/
break; /*0xffcc4b74*/
case 0x19: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"AF"); /*0xffcc4b7b*/
break; /*0xffcc4b7b*/
case 0x1A: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"AG"); /*0xffcc4b82*/
break; /*0xffcc4b82*/
case 0x1B: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"AH"); /*0xffcc4b89*/
break; /*0xffcc4b89*/
case 0x1C: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"AJ"); /*0xffcc4b90*/
break; /*0xffcc4b90*/
case 0x1D: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"AK"); /*0xffcc4b97*/
break; /*0xffcc4b97*/
case 0x1E: /*0xffcc4aa3*/
LogDebugString(__return_address, (int)"AL"); /*0xffcc4b9e*/
break; /*0xffcc4b9e*/
default:
LogDebugString(__return_address, (int)"? "); /*0xffcc4ba6*/
break; /*0xffcc4ba6*/
}
result = RmtFunc696A(__return_address, 1u); /*0xffcc4baf*/
}
else
{
result = RmtFunc696A(__return_address, 0x14u); /*0xffcc4bb4*/
}
v8 = ++n6; /*0xffcc4bbb*/
}
while ( n6 < 6u ); /*0xffcc4bc4*/
return result; /*0xffcc4bca*/
}
// Function: RmtFunc4C4D @ 0xffcc4c4d (0x95 bytes)
// Index: 1651/2560
int __cdecl RmtFunc4C4D(_BYTE *__return_address, unsigned __int8 n4, unsigned __int8 a3)
{
unsigned __int8 n6; // bl
int v4; // edi
int CpuCount; // eax
int CpuCount_1; // ebp
unsigned __int8 v7; // al
unsigned __int8 v8; // al
int result; // eax
unsigned __int8 v10; // [esp+10h] [ebp-4h]
n6 = 0; /*0xffcc4c5a*/
v10 = 0; /*0xffcc4c5d*/
v4 = 1379 * a3; /*0xffcc4c61*/
do /*0xffcc4cda*/
{
CpuCount = GetCpuCount((int)__return_address, n4, v10); /*0xffcc4c70*/
CpuCount_1 = CpuCount; /*0xffcc4c75*/
if ( *(_BYTE *)(v4 + CpuCount) ) /*0xffcc4c7a*/
{
v7 = RmtFunc35FB(*(_BYTE *)(v4 + CpuCount + 146)); /*0xffcc4c89*/
LogDebugString(__return_address, (int)" ww%02d ", v7); /*0xffcc4c98*/
v8 = RmtFunc35FB(*(_BYTE *)(v4 + CpuCount_1 + 145)); /*0xffcc4ca6*/
LogDebugString(__return_address, (int)"20%02d", v8); /*0xffcc4cb5*/
result = RmtFunc696A(__return_address, 6u); /*0xffcc4cbd*/
}
else
{
result = RmtFunc696A(__return_address, 0x14u); /*0xffcc4cca*/
}
v10 = ++n6; /*0xffcc4cd3*/
}
while ( n6 < 6u ); /*0xffcc4cda*/
return result; /*0xffcc4cdc*/
}
// Function: RmtFunc4CE2 @ 0xffcc4ce2 (0x3b0 bytes)
// Index: 1652/2560
_BYTE *__cdecl RmtFunc4CE2(_BYTE *__return_address, char n4, char n5, int a4, int a5, unsigned __int8 n48)
{
_BYTE *__return_address_1; // ebx
_BYTE *n6_1; // eax
_BYTE *n6_2; // edx
int v9; // edi
unsigned __int8 *v10; // ebp
unsigned __int8 n18_1; // al
unsigned __int8 n255_1; // dl
unsigned __int8 n72_2; // cl
int v14; // esi
int n48_1; // edi
int v16; // esi
int n48_3; // ecx
int v18; // edx
int v19; // edi
int v20; // edx
int v21; // ecx
int v22; // eax
int v23; // ecx
int v24; // ecx
int v25; // ecx
__int16 n31_2; // cx
__int16 n31_5; // ax
__int16 n31_3; // bp
__int16 n31; // si
unsigned __int8 n72_1; // [esp+12h] [ebp-42h]
char n18; // [esp+13h] [ebp-41h]
__int16 n31_4; // [esp+14h] [ebp-40h]
int n48_2; // [esp+18h] [ebp-3Ch]
__int16 n31_1; // [esp+1Ch] [ebp-38h]
int v35; // [esp+20h] [ebp-34h]
int v36; // [esp+24h] [ebp-30h]
unsigned __int8 n2; // [esp+28h] [ebp-2Ch]
char n6; // [esp+2Ch] [ebp-28h]
unsigned __... [8956 chars total]
// Function: RmtFunc5092 @ 0xffcc5092 (0x112 bytes)
// Index: 1653/2560
int __cdecl RmtFunc5092(_BYTE *__return_address, unsigned __int8 n4, unsigned __int8 a3)
{
unsigned __int8 n6; // bl
int v4; // ebp
_BYTE *__return_address_1; // esi
int CpuCount; // eax
int v7; // edx
int v8; // edi
unsigned __int8 *v9; // ebp
int n3; // esi
char v11; // cl
int result; // eax
int v13; // edi
unsigned __int8 *v14; // esi
int n8; // ebp
int n4_1; // edi
char v17; // cl
unsigned __int8 v18; // [esp+14h] [ebp-Ch]
int v19; // [esp+1Ch] [ebp-4h]
n6 = 0; /*0xffcc509c*/
v4 = 1379 * a3; /*0xffcc509e*/
__return_address_1 = __return_address; /*0xffcc50a5*/
v18 = 0; /*0xffcc50aa*/
do /*0xffcc5196*/
{
CpuCount = GetCpuCount((int)__return_address_1, n4, v18); /*0xffcc50bb*/
if ( !*(_BYTE *)(CpuCount + v4) ) /*0xffcc50c7*/
goto LABEL_12; /*0xffcc50c7*/
v7 = 0; /*0xffcc50cd*/
if ( *(_WORD *)(__return_address_1 + 257315) != 11 ) /*0xffcc50d7*/
{
v13 = *(unsigned __int8 *)(CpuCount + v4 + 219); /*0xffcc511d*/
v14 = (unsigned __int8 *)(CpuCount + v4 + 220); /*0xffcc5133*/
n8 = 8; /*0xffcc5135*/
v19 = v13; /*0xffcc513b*/
n4_1 = 4; /*0xffcc513f*/
do /*0xffcc5153*/
{
v17 = 32 - n8; /*0xffcc5146*/
n8 += 8; /*0xffcc5148*/
v7 |= *v14++ << v17; /*0xffcc514d*/
--n4_1; /*0xffcc5150*/
}
while ( n4_1 ); /*0xffcc5153*/
__return_address_1 = __return_address; /*0xffcc5159*/
v4 = 1379 * a3; /*0xffcc515d*/
if ( v19 || v7 ) /*0xffcc5167*/
{
LogDebugString(__return_address, (int)"0x%08x%08x", v19, v7); /*0xffcc5171*/
result = RmtFunc696A(__return_address, 2u); /*0xffcc5179*/
goto LABEL_13; /*0xffcc5181*/
}
LABEL_12:
result = RmtFunc696A(__return_address_1, 0x14u); /*0xffcc5183*/
goto LABEL_13; /*0xffcc5186*/
}
v8 = 0; /*0xffcc50df*/
v9 = (unsigned __int8 *)(CpuCount + v4 + 219); /*0xffcc50e3*/
n3 = 3; /*0xffcc50e5*/
do /*0xffcc50fa*/
{
v11 = 16 - v8; /*0xffcc50ed*/
v8 += 8; /*0xffcc50ef*/
v7 |= *v9++ << v11; /*0xffcc50f4*/
--n3; /*0xffcc50f7*/
}
while ( n3 ); /*0xffcc50fa*/
__return_address_1 = __return_address; /*0xffcc50fc*/
LogDebugString(__return_address, (int)" %8d", v7); /*0xffcc5107*/
result = RmtFunc696A(__return_address, 6u); /*0xffcc510f*/
v4 = 1379 * a3; /*0xffcc5114*/
LABEL_13:
v18 = ++n6; /*0xffcc518f*/
}
while ( n6 < 6u ); /*0xffcc5196*/
return result; /*0xffcc519c*/
}
// Function: RmtFn_FFCC51A4 @ 0xffcc51a4 (0x333 bytes)
// Index: 1654/2560
unsigned __int8 __cdecl RmtFn_FFCC51A4(_BYTE *__return_address, _BYTE *n2)
{
int n2_1; // ebx
int SocketInfo; // ebp
unsigned __int8 n8; // bl
int v6; // edi
unsigned __int8 n6; // al
int v8; // ecx
int n3; // edi
_BYTE *CpuCount; // ebp
unsigned __int8 n2_2; // al
unsigned __int8 v12; // bl
unsigned __int8 v13; // al
unsigned __int8 n8_1; // bl
int v15; // edi
int n2_3; // [esp+10h] [ebp-24h]
int v17; // [esp+14h] [ebp-20h]
unsigned __int8 v18[4]; // [esp+18h] [ebp-1Ch]
int v19; // [esp+1Ch] [ebp-18h]
int v20; // [esp+20h] [ebp-14h]
_BYTE *CpuCount_1; // [esp+28h] [ebp-Ch]
int SocketInfo_1; // [esp+2Ch] [ebp-8h]
int v23; // [esp+30h] [ebp-4h]
unsigned __int8 n8_2; // [esp+38h] [ebp+4h]
n2_1 = (int)n2; /*0xffcc51a8*/
SocketInfo = GetSocketInfo((int)__return_address, (unsigned __int8)n2); /*0xffcc51c4*/
SocketInfo_1 = SocketInfo; /*0xffcc51cf*/
DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\nSTART_DATA_MRS\n"); /*0xffcc51d3*/
DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, " MR0 MR1 MR2"); /*0xffcc51e6*/
if ( *(_WORD *)(__return_address + 257315) != 11 ) /*0xffcc51f6*/
{
DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, " MR3 MR4 MR5 MR6"); /*0xffcc5206*/
n8 = 0; /*0xffcc520e*/
v6 = 0; /*0xffcc5210*/
do /*0xffcc5247*/
{
if ( __return_address[257312] || n8 != 8 && n8 != 17 ) /*0xffcc5223*/
DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, " %2d ", v6); /*0xffcc5239*/
++n8; /*0xffcc5241*/
++v6; /*0xffcc5243*/
}
while ( n8 < 0x12u ); /*0xffcc5247*/
n2_1 = (int)n2; /*0xffcc5249*/
}
DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc5260*/
n6 = 0; /*0xffcc5265*/
v8 = 0; /*0xffcc526a*/
v18[0] = 0; /*0xffcc526c*/
v20 = 0; /*0xffcc5270*/
do /*0xffcc54c9*/
{
if ( *(_BYTE *)(v8 + SocketInfo) ) /*0xffcc5274*/
{
n3 = *(_DWORD *)v18; /*0xffcc527e*/
CpuCount = (_BYTE *)GetCpuCount((int)__return_address, n2_1, v18[0]); /*0xffcc528a*/
n2_2 = 0; /*0xffcc528f*/
CpuCount_1 = CpuCount; /*0xffcc5291*/
LOBYTE(n2_3) = 0; /*0xffcc5295*/
do /*0xffcc54a5*/
{
if ( *CpuCount ) /*0xffcc5299*/
{
v19 = KtiFunc91DE((int)__return_address, n2_1, n3, n2_3); /*0xffcc52bb*/
n8_2 = ProcCommonFunc1DB2( /*0xffcc52e0*/
(int)__return_address,
n2_1,
n3,
n2_3,
0x17u,
__return_address[48704 * (unsigned __int8)n2_1 + 258703] != 0);
LOBYTE(v17) = 0; /*0xffcc52e8*/
if ( CpuCount[20] ) /*0xffcc52e4*/
{
do /*0xffcc5489*/
{
if ( !KtiFunc89E9((int)__return_address, n2_1, n3, n2_3, v17, 0) ) /*0xffcc5300*/
{
DebugPrint((int)__return_address, 10, n2_1, n3, n2_3, v17, 255, 255, byte_FFD25E04); /*0xffcc5329*/
v23 = 244 * (unsigned __int8)v17; /*0xffcc5341*/
DebugPrint( /*0xffcc5369*/
(int)__return_address,
10,
255,
255,
255,
255,
255,
255,
"%5x%5x%5x",
*(unsigned __int16 *)(v23 + v19),
*(unsigned __int16 *)(v23 + v19 + 2),
*(unsigned __int16 *)(v23 + v19 + 4));
if ( *(_WORD *)(__return_address + 257315) == 12 ) /*0xffcc5379*/
{
v12 = MailBoxFunc2B3E( /*0xffcc53ab*/
(int)__return_address,
*(_BYTE *)(v20
+ (unsigned __int8)CpuCount[242 * (unsigned __int8)v17 + 225]
+ SocketInfo_1
+ 6264));
v13 = RmtFunc86C3(__return_address, (unsigned __int8)n2, n3); /*0xffcc53ae*/
DebugPrint( /*0xffcc53f8*/
(int)__return_address,
10,
255,
255,
255,
255,
255,
255,
"%5x%5x%5x%5x",
*(unsigned __int16 *)(v23 + v19 + 6),
*(unsigned __int16 *)(v23 + v19 + 8),
*(unsigned __int16 *)(v23 + v19 + 10),
v12 | ((v13 << 10) - 3073) & 0x1C00);
n8_1 = 0; /*0xffcc5407*/
if ( n8_2 ) /*0xffcc540b*/
{
v15 = 0; /*0xffcc5411*/
do /*0xffcc5453*/
{
if ( __return_address[257312] || n8_1 != 8 && n8_1 != 17 ) /*0xffcc5424*/
DebugPrint( /*0xffcc5446*/
(int)__return_address,
10,
255,
255,
255,
255,
255,
255,
"%5x",
*(unsigned __int16 *)(v19 + 2 * (v15 + 122 * (unsigned __int8)v17) + 12));
++n8_1; /*0xffcc544e*/
++v15; /*0xffcc5450*/
}
while ( n8_1 < n8_2 ); /*0xffcc5453*/
n3 = *(_DWORD *)v18; /*0xffcc5455*/
CpuCount = CpuCount_1; /*0xffcc5459*/
}
n2_1 = (int)n2; /*0xffcc545d*/
}
DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc5474*/
}
LOBYTE(v17) = v17 + 1; /*0xffcc5482*/
}
while ( (unsigned __int8)v17 < CpuCount[20] ); /*0xffcc5489*/
}
n2_2 = n2_3; /*0xffcc548f*/
}
++n2_2; /*0xffcc5493*/
CpuCount += 1379; /*0xffcc5495*/
LOBYTE(n2_3) = n2_2; /*0xffcc549b*/
CpuCount_1 = CpuCount; /*0xffcc549f*/
}
while ( n2_2 < 2u ); /*0xffcc54a5*/
n6 = v18[0]; /*0xffcc54ab*/
v8 = v20; /*0xffcc54af*/
SocketInfo = SocketInfo_1; /*0xffcc54b3*/
}
++n6; /*0xffcc54b7*/
v8 += 7688; /*0xffcc54b9*/
v18[0] = n6; /*0xffcc54bf*/
v20 = v8; /*0xffcc54c3*/
}
while ( n6 < 6u ); /*0xffcc54c9*/
return n6; /*0xffcc54cf*/
}
// Function: RmtFunc54D7 @ 0xffcc54d7 (0xee bytes)
// Index: 1655/2560
int __cdecl RmtFunc54D7(int __return_address, unsigned __int8 n4, unsigned __int8 a3)
{
unsigned __int8 n6; // bl
int v4; // ebp
int CpuCount; // eax
unsigned __int8 *v6; // edi
int n18; // ebp
int result; // eax
unsigned __int8 *v9; // edi
int n20; // ebp
unsigned __int8 v11; // [esp+14h] [ebp-4h]
n6 = 0; /*0xffcc54e0*/
v4 = 1379 * a3; /*0xffcc54e2*/
v11 = 0; /*0xffcc54ee*/
do /*0xffcc55b8*/
{
CpuCount = GetCpuCount(__return_address, n4, v11); /*0xffcc54ff*/
if ( *(_BYTE *)(CpuCount + v4) ) /*0xffcc5507*/
{
if ( *(_WORD *)(__return_address + 257315) == 11 ) /*0xffcc5519*/
{
v6 = (unsigned __int8 *)(CpuCount + v4 + 154); /*0xffcc5523*/
n18 = 18; /*0xffcc5525*/
do /*0xffcc5551*/
{
if ( *v6 ) /*0xffcc5526*/
LogDebugString((_BYTE *)__return_address, (int)"%c", *v6); /*0xffcc5536*/
else
LogDebugString((_BYTE *)__return_address, (int)" "); /*0xffcc5546*/
++v6; /*0xffcc554d*/
--n18; /*0xffcc554e*/
}
while ( n18 ); /*0xffcc5551*/
result = LogDebugString((_BYTE *)__return_address, (int)" |"); /*0xffcc5559*/
}
else
{
v9 = (unsigned __int8 *)(CpuCount + v4 + 172); /*0xffcc556c*/
n20 = 20; /*0xffcc556e*/
do /*0xffcc559a*/
{
if ( *v9 ) /*0xffcc556f*/
LogDebugString((_BYTE *)__return_address, (int)"%c", *v9); /*0xffcc557f*/
else
LogDebugString((_BYTE *)__return_address, (int)" "); /*0xffcc558f*/
++v9; /*0xffcc5596*/
--n20; /*0xffcc5597*/
}
while ( n20 ); /*0xffcc559a*/
result = RmtFunc696A((_BYTE *)__return_address, 0); /*0xffcc559e*/
}
v4 = 1379 * a3; /*0xffcc555e*/
}
else
{
result = RmtFunc696A((_BYTE *)__return_address, 0x14u); /*0xffcc55a8*/
}
v11 = ++n6; /*0xffcc55af*/
}
while ( n6 < 6u ); /*0xffcc55b8*/
return result; /*0xffcc55be*/
}
// Function: RmtFunc55C5 @ 0xffcc55c5 (0x81 bytes)
// Index: 1656/2560
int __cdecl RmtFunc55C5(_BYTE *__return_address, unsigned __int8 n4, unsigned __int8 a3)
{
unsigned __int8 n6; // bl
int v4; // edi
int CpuCount; // eax
int v6; // eax
int result; // eax
unsigned __int8 v8; // [esp+Ch] [ebp-4h]
n6 = 0; /*0xffcc55d2*/
v8 = 0; /*0xffcc55d5*/
v4 = 1379 * a3; /*0xffcc55d8*/
do /*0xffcc563d*/
{
CpuCount = GetCpuCount((int)__return_address, n4, v8); /*0xffcc55e5*/
if ( *(_BYTE *)(v4 + CpuCount) && (v6 = *(_DWORD *)(v4 + CpuCount + 199)) != 0 ) /*0xffcc55fd*/
{
if ( v6 == 1 ) /*0xffcc5602*/
{
LogDebugString(__return_address, (int)" JEDEC NVDIMM-N"); /*0xffcc5619*/
result = RmtFunc696A(__return_address, 3u); /*0xffcc5621*/
}
else
{
LogDebugString(__return_address, (int)" Legacy NVDIMM-N"); /*0xffcc560a*/
result = RmtFunc696A(__return_address, 2u); /*0xffcc5611*/
}
}
else
{
result = RmtFunc696A(__return_address, 0x14u); /*0xffcc562e*/
}
v8 = ++n6; /*0xffcc5637*/
}
while ( n6 < 6u ); /*0xffcc563d*/
return result; /*0xffcc563f*/
}
// Function: RmtFunc5646 @ 0xffcc5646 (0x50e bytes)
// Index: 1657/2560
int __cdecl RmtFunc5646(unsigned __int8 *n6, int n4, int n33)
{
unsigned __int8 n3; // bl
int n4_1; // edi
int result; // eax
unsigned int *p_n31; // ebp
unsigned __int8 n8_1; // bh
unsigned __int8 n8; // bl
int v9; // edi
_BYTE *v10; // ebp
unsigned __int8 n6_1; // bl
_BYTE *n6a; // edi
_BYTE *CpuCount; // ebp
unsigned __int8 n2_1; // bl
char n33a_1; // al
char n4_2; // dl
unsigned __int8 v17; // bh
int v18; // ebp
unsigned __int8 n33a_2; // al
unsigned __int8 n8_2; // bl
bool v21; // zf
int n2; // [esp+10h] [ebp-3Ch]
unsigned __int16 p_n60[2]; // [esp+14h] [ebp-38h] BYREF
int *p_n31_1; // [esp+18h] [ebp-34h]
unsigned __int8 v25[4]; // [esp+1Ch] [ebp-30h]
int n0x12; // [esp+20h] [ebp-2Ch]
int v27; // [esp+24h] [ebp-28h]
_BYTE *CpuCount_1; // [esp+28h] [ebp-24h]
_BYTE *v29; // [esp+2Ch] [ebp-20h]
int n3_1; // [esp+30h] [ebp-1Ch]
int v31; // [esp+34h] [ebp-18h]
int v32; // [esp+38h] [ebp-14h]
int n31; // [esp+3Ch] [ebp-10h] B... [10351 chars total]
// Function: RmtFunc5B54 @ 0xffcc5b54 (0x5b3 bytes)
// Index: 1658/2560
unsigned __int8 __cdecl RmtFunc5B54(unsigned __int8 *__return_address, int n4, unsigned int n18)
{
_BYTE *SocketInfo; // ebx
int v6; // eax
unsigned __int8 n8; // bl
int v8; // ebp
unsigned __int8 n6_2; // al
_BYTE *n6_1; // ebp
int CpuCount; // eax
unsigned __int8 n2; // cl
unsigned __int8 *v13; // ebx
unsigned __int8 v14; // bh
bool v15; // al
unsigned __int8 *v16; // edx
unsigned __int8 n8_2; // al
unsigned __int8 n8_1; // bl
int v19; // ecx
unsigned __int8 n18a_2; // bl
char n18a_1; // bh
unsigned __int8 n18a_4; // cl
char v23; // al
unsigned __int8 n18a_6; // bh
unsigned int n18a_8; // ebp
unsigned int n18a_7; // eax
unsigned __int16 p_n60[2]; // [esp+12h] [ebp-2Ah] BYREF
unsigned __int8 v28[4]; // [esp+18h] [ebp-24h]
unsigned __int8 *v29; // [esp+1Ch] [ebp-20h]
int v30; // [esp+20h] [ebp-1Ch]
int n0x12; // [esp+24h] [ebp-18h]
int n6; // [esp+28h] [ebp-14h]
_BYTE *SocketInfo_1; // [esp+2Ch] [ebp-10h]
int n18a_3; // [esp+3... [12334 chars total]
// Function: RmtFunc6107 @ 0xffcc6107 (0x191 bytes)
// Index: 1659/2560
int __cdecl RmtFunc6107(unsigned __int8 *__return_address, int n4)
{
_BYTE *SocketInfo; // edi
unsigned __int8 n8_1; // bh
unsigned __int8 n8; // bl
int v5; // edi
int result; // eax
unsigned __int8 n6; // bh
unsigned __int8 n8_3; // al
unsigned __int8 n8_2; // bl
int SocketInfo_1; // [esp+Ch] [ebp-10h]
_BYTE *n6a; // [esp+10h] [ebp-Ch]
unsigned __int16 p_n60[3]; // [esp+14h] [ebp-8h] BYREF
unsigned __int8 n8_4; // [esp+1Bh] [ebp-1h]
SocketInfo = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffcc611c*/
SocketInfo_1 = (int)SocketInfo; /*0xffcc6128*/
n8_1 = ProcCommonFunc1DB2((int)__return_address, n4, 0, 0, 5u, 0); /*0xffcc6136*/
n8_4 = n8_1; /*0xffcc6146*/
DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\nSTART_DATA_RX_VREF\n"); /*0xffcc6149*/
DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, " "); /*0xffcc6164*/
n8 = 0; /*0xffcc616c*/
if ( n8_1 ) /*0xffcc6170*/
{
v5 = 0; /*0xffcc6172*/
do /*0xffcc61a8*/
{
if ( __return_address[257312] || n8 != 8 && n8 != 17 ) /*0xffcc6185*/
DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, " %3d ", v5); /*0xffcc619b*/
++n8; /*0xffcc61a3*/
++v5; /*0xffcc61a5*/
}
while ( n8 < n8_1 ); /*0xffcc61a8*/
SocketInfo = (_BYTE *)SocketInfo_1; /*0xffcc61aa*/
}
result = DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc61c0*/
n6 = 0; /*0xffcc61c8*/
LOBYTE(n6a) = 0; /*0xffcc61ca*/
do /*0xffcc628b*/
{
if ( *SocketInfo ) /*0xffcc61cd*/
{
DebugPrint((int)__return_address, 10, n4, (int)n6a, 255, 255, 255, 255, byte_FFD25E04); /*0xffcc61ed*/
n8_3 = n8_4; /*0xffcc61f2*/
n8_2 = 0; /*0xffcc61f5*/
for ( LOBYTE(SocketInfo_1) = 0; n8_2 < n8_3; LOBYTE(SocketInfo_1) = n8_2 ) /*0xffcc61ff*/
{
if ( __return_address[257312] || n8_2 != 8 && n8_2 != 17 ) /*0xffcc6212*/
{
MrcMarginGroupTrain(__return_address, n4, n6a, 0, 0, SocketInfo_1, 255, 0, 5, 2, p_n60); /*0xffcc6231*/
DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, " %3d ", (__int16)p_n60[0]); /*0xffcc624e*/
n8_3 = n8_4; /*0xffcc6253*/
}
++n8_2; /*0xffcc6259*/
}
result = DebugPrint((int)__return_address, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc6275*/
}
++n6; /*0xffcc627d*/
SocketInfo += 7688; /*0xffcc627f*/
LOBYTE(n6a) = n6; /*0xffcc6285*/
}
while ( n6 < 6u ); /*0xffcc628b*/
return result; /*0xffcc6291*/
}
// Function: RmtFunc6298 @ 0xffcc6298 (0x16d bytes)
// Index: 1660/2560
int __cdecl RmtFunc6298(_BYTE *__return_address, unsigned __int8 n4, unsigned __int8 a3)
{
unsigned __int8 n6; // bl
int v4; // ebp
int CpuCount; // eax
int CpuCount_1; // edi
int result; // eax
int v8; // [esp+10h] [ebp-Ch]
unsigned __int8 v9; // [esp+14h] [ebp-8h]
n6 = 0; /*0xffcc62a2*/
v9 = 0; /*0xffcc62ae*/
v4 = 1379 * a3; /*0xffcc62b2*/
v8 = 0; /*0xffcc62b8*/
do /*0xffcc63f7*/
{
CpuCount = GetCpuCount((int)__return_address, n4, v9); /*0xffcc62c5*/
CpuCount_1 = CpuCount; /*0xffcc62ca*/
if ( *(_BYTE *)(CpuCount + v4 + 107) ) /*0xffcc62cf*/
{
result = LogDebugString( /*0xffcc62e8*/
__return_address,
(int)" %4dGB |",
*(unsigned __int16 *)(CpuCount + v4 + 1297) >> 4);
}
else if ( *(_BYTE *)(CpuCount + 1379 * a3) ) /*0xffcc62f5*/
{
LogDebugString( /*0xffcc632c*/
__return_address,
(int)" %2dGB(",
*(unsigned __int16 *)&__return_address[50813 * n4 + 12578 + 2688 * a3 + v8] >> 4);
LogDebugString(__return_address, (int)"%dGb", 256 << *(_BYTE *)(CpuCount_1 + v4 + 118) >> 10); /*0xffcc6346*/
LogDebugString(__return_address, (int)"x%d", 4 << (*(_BYTE *)(CpuCount_1 + v4 + 110) & 7)); /*0xffcc635f*/
if ( *(_BYTE *)(CpuCount_1 + v4 + 124) ) /*0xffcc6367*/
LogDebugString(__return_address, (int)" %dH", *(unsigned __int8 *)(CpuCount_1 + v4 + 124)); /*0xffcc637a*/
else
LogDebugString(__return_address, (int)" "); /*0xffcc638a*/
switch ( *(_BYTE *)(CpuCount_1 + v4 + 19) ) /*0xffcc6399*/
{
case 1: /*0xffcc6399*/
LogDebugString(__return_address, (int)" SR)"); /*0xffcc63d1*/
break;
case 2: /*0xffcc6399*/
LogDebugString(__return_address, (int)" DR)"); /*0xffcc63c9*/
break;
case 3: /*0xffcc6399*/
LogDebugString(__return_address, (int)" TR)"); /*0xffcc63c2*/
break;
case 4: /*0xffcc6399*/
LogDebugString(__return_address, (int)" QR)"); /*0xffcc63bb*/
break;
case 8: /*0xffcc6399*/
LogDebugString(__return_address, (int)" OR)"); /*0xffcc63b4*/
break;
}
result = RmtFunc696A(__return_address, 1u); /*0xffcc63da*/
}
else
{
result = RmtFunc696A(__return_address, 0x14u); /*0xffcc63df*/
}
v8 += 8077; /*0xffcc63e6*/
v9 = ++n6; /*0xffcc63f0*/
}
while ( n6 < 6u ); /*0xffcc63f7*/
return result; /*0xffcc63fd*/
}
// Function: RmtFunc6405 @ 0xffcc6405 (0x391 bytes)
// Index: 1661/2560
unsigned __int8 __cdecl RmtFunc6405(_BYTE *__return_address, int n4, int a3)
{
int v3; // ebx
int CpuCount; // edi
int n2500000; // ecx
unsigned __int8 v6; // al
unsigned __int8 v7; // al
unsigned __int8 v8; // al
unsigned __int8 n6; // al
int v10; // [esp+10h] [ebp-4h]
LOBYTE(v10) = 0; /*0xffcc6415*/
v3 = 1379 * (unsigned __int8)a3; /*0xffcc641a*/
do /*0xffcc678a*/
{
CpuCount = GetCpuCount((int)__return_address, n4, v10); /*0xffcc642f*/
if ( *(_BYTE *)(v3 + CpuCount) ) /*0xffcc6434*/
{
LogDebugString(__return_address, (int)" "); /*0xffcc6444*/
n2500000 = *(_DWORD *)(v3 + CpuCount + 4); /*0xffcc644b*/
if ( n2500000 > 454600 ) /*0xffcc6455*/
{
if ( n2500000 > 468900 ) /*0xffcc6467*/
{
if ( n2500000 > 476200 ) /*0xffcc6479*/
{
if ( n2500000 > 500000 ) /*0xffcc648b*/
{
if ( n2500000 > 526400 ) /*0xffcc649d*/
{
if ( n2500000 ... [12829 chars total]
// Function: RmtFunc6796 @ 0xffcc6796 (0x1d4 bytes)
// Index: 1662/2560
int __cdecl RmtFunc6796(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // esi
int v2; // ebx
char v4; // [esp+17h] [ebp-1h]
__return_address_1 = __return_address; /*0xffcc6799*/
v4 = 0; /*0xffcc679d*/
if ( __return_address[1493] && __return_address[9479] == 1 ) /*0xffcc67b2*/
{
v4 = 1; /*0xffcc67b4*/
__return_address[9479] = 2; /*0xffcc67b9*/
}
LOBYTE(__return_address) = __return_address[9402]; /*0xffcc67c6*/
v2 = 48704 * (unsigned __int8)__return_address; /*0xffcc67cd*/
if ( __return_address_1[v2 + 258689] && __return_address_1[v2 + 258716] ) /*0xffcc67e1*/
{
KtiFunc8014((int)__return_address_1); /*0xffcc67f2*/
DebugPrint( /*0xffcc6810*/
(int)__return_address_1,
10,
(int)__return_address,
255,
255,
255,
255,
255,
"START_TRAINING_REGISTER_DUMP\n");
KtiFunc5ED2((int)__return_address_1, (int)__return_address); /*0xffcc6817*/
if ( __return_address_1[195] ) /*0xffcc681f*/
KtiFunc6032((int)__return_address_1, (int)__return_address); /*0xffcc682a*/
RmtFunc5B54(__return_address_1, (int)__return_address, 0); /*0xffcc6835*/
if ( (*(_DWORD *)(__return_address_1 + 134) & 0x4000) != 0 ) /*0xffcc6847*/
{
RmtFunc5B54(__return_address_1, (int)__return_address, 3u); /*0xffcc684d*/
RmtFunc5B54(__return_address_1, (int)__return_address, 4u); /*0xffcc6856*/
}
else
{
RmtFunc5B54(__return_address_1, (int)__return_address, 1u); /*0xffcc6864*/
}
RmtFunc5B54(__return_address_1, (int)__return_address, 2u); /*0xffcc6870*/
RmtFunc5B54(__return_address_1, (int)__return_address, 0x15u); /*0xffcc6879*/
RmtFunc5B54(__return_address_1, (int)__return_address, 0x16u); /*0xffcc6882*/
RmtFunc6107(__return_address_1, (int)__return_address); /*0xffcc6889*/
RmtFunc5B54(__return_address_1, (int)__return_address, 0x17u); /*0xffcc6892*/
DataCmdCtlTrain(__return_address_1, (int)__return_address); /*0xffcc6899*/
RmtFn_FFCC51A4(__return_address_1, __return_address); /*0xffcc68a3*/
RmtFunc5B54(__return_address_1, (int)__return_address, 0x26u); /*0xffcc68ac*/
RmtFunc5B54(__return_address_1, (int)__return_address, 0x27u); /*0xffcc68b5*/
RmtFunc5B54(__return_address_1, (int)__return_address, 0x19u); /*0xffcc68be*/
if ( *(_WORD *)(__return_address_1 + 257315) == 12 && __return_address_1[v2 + 258703] ) /*0xffcc68d0*/
{
RmtFunc44D0(__return_address_1, (int)__return_address, 0); /*0xffcc68de*/
RmtFunc44D0(__return_address_1, (int)__return_address, 0x43u); /*0xffcc68e7*/
RmtFunc44D0(__return_address_1, (int)__return_address, 1u); /*0xffcc68f0*/
RmtFunc44D0(__return_address_1, (int)__return_address, 5u); /*0xffcc68f9*/
RmtFunc44D0(__return_address_1, (int)__return_address, 0x15u); /*0xffcc6902*/
RmtFunc44D0(__return_address_1, (int)__return_address, 0x44u); /*0xffcc690b*/
RmtFunc44D0(__return_address_1, (int)__return_address, 0x16u); /*0xffcc6917*/
RmtFunc44D0(__return_address_1, (int)__return_address, 0x17u); /*0xffcc6920*/
}
KtiFunc5A45(__return_address_1, (int)__return_address); /*0xffcc692a*/
DebugPrint( /*0xffcc693d*/
(int)__return_address_1,
10,
(int)__return_address,
255,
255,
255,
255,
255,
"STOP_TRAINING_REGISTER_DUMP\n");
KtiFunc834D((int)__return_address_1); /*0xffcc6943*/
if ( __return_address_1[1493] && v4 == 1 ) /*0xffcc695b*/
__return_address_1[9479] = 1; /*0xffcc695d*/
}
return 0; /*0xffcc6964*/
}
// Function: RmtFunc696A @ 0xffcc696a (0x33 bytes)
// Index: 1663/2560
int __cdecl RmtFunc696A(_BYTE *a1, unsigned __int8 a2)
{
int v2; // esi
if ( a2 ) /*0xffcc6970*/
{
v2 = a2; /*0xffcc6973*/
do /*0xffcc6989*/
{
LogDebugString(a1, (int)" "); /*0xffcc697f*/
--v2; /*0xffcc6986*/
}
while ( v2 ); /*0xffcc6989*/
}
return LogDebugString(a1, (int)"|"); /*0xffcc699c*/
}
// Function: RmtFunc699D @ 0xffcc699d (0x230 bytes)
// Index: 1664/2560
int __cdecl RmtFunc699D(
unsigned __int8 *__return_address,
int n4,
int a3,
int n4a,
int n2,
char n5,
unsigned int n64,
int a8,
int a9,
int a10)
{
char n48_1; // bl
int *v11; // eax
_WORD *v12; // ecx
int n8; // ebp
_WORD *v14; // edx
int n101; // esi
int v16; // eax
unsigned __int8 n48; // [esp+10h] [ebp-4D88h]
int n6; // [esp+14h] [ebp-4D84h]
__int64 v20; // [esp+18h] [ebp-4D80h] BYREF
__int64 v21; // [esp+20h] [ebp-4D78h] BYREF
int v22[108]; // [esp+28h] [ebp-4D70h] BYREF
_WORD v23[9696]; // [esp+1D8h] [ebp-4BC0h] BYREF
v21 = 0; /*0xffcc69b1*/
n48_1 = 0; /*0xffcc69ba*/
v20 = 0; /*0xffcc69bc*/
n48 = 0; /*0xffcc69c1*/
if ( a3 == 1 ) /*0xffcc69d0*/
LogDebugString(__return_address, (int)"\nBackside "); /*0xffcc69d7*/
else
LogDebugString(__return_address, (int)"\n"); /*0xffcc69df*/
switch ( n4a )
{
case 1:
LogDebugString(__return_address, (int)"Read Eye Diagrams\n"); /*0xffcc69f7*/
n48_1 = a3 == 1 ? 45 : 48;
break; /*0xffcc6a0e*/
case 3:
LogDebugString(__return_address, (int)"Read Eye(P) Diagrams\n"); /*0xffcc6a1b*/
LABEL_8:
n48_1 = 48; /*0xffcc6a20*/
break; /*0xffcc6a22*/
case 4:
LogDebugString(__return_address, (int)"Read Eye(N) Diagrams\n"); /*0xffcc6a2e*/
goto LABEL_8; /*0xffcc6a2e*/
case 22:
LogDebugString(__return_address, (int)"Write Eye Diagrams\n"); /*0xffcc6a3b*/
n48_1 = 50; /*0xffcc6a40*/
break;
case 40:
LogDebugString(__return_address, (int)"Cmd Eye Diagrams\n"); /*0xffcc6a4f*/
n48_1 = a3 != 1 ? 50 : 20;
break;
default:
goto LABEL_16; /*0xffcc6a47*/
}
n48 = n48_1; /*0xffcc6a66*/
LABEL_16:
if ( ProcCommonFuncFB4A((int)__return_address, 3u) ) /*0xffcc6a6f*/
KtiFuncF4E(&v21); /*0xffcc6a7f*/
v11 = v22; /*0xffcc6a85*/
n6 = 6; /*0xffcc6a89*/
v12 = &v23[1]; /*0xffcc6a91*/
do /*0xffcc6acf*/
{
n8 = 8; /*0xffcc6a9a*/
do /*0xffcc6ac8*/
{
v14 = v12; /*0xffcc6aa6*/
*v11 = *(_DWORD *)a10; /*0xffcc6aa8*/
v11[1] = *(_DWORD *)(a10 + 4); /*0xffcc6aa9*/
*((_BYTE *)v11 + 8) = *(_BYTE *)(a10 + 8); /*0xffcc6aaa*/
n101 = 101; /*0xffcc6aab*/
do /*0xffcc6abd*/
{
v14 += 96; /*0xffcc6aae*/
*(_DWORD *)(v14 - 97) = 0; /*0xffcc6ab4*/
--n101; /*0xffcc6aba*/
}
while ( n101 ); /*0xffcc6abd*/
v11 = (int *)((char *)v11 + 9); /*0xffcc6abf*/
v12 += 2; /*0xffcc6ac2*/
--n8; /*0xffcc6ac5*/
}
while ( n8 ); /*0xffcc6ac8*/
--n6; /*0xffcc6aca*/
}
while ( n6 ); /*0xffcc6acf*/
KtiFuncDB33( /*0xffcc6b1d*/
__return_address,
n4,
a3,
n4a,
n2,
n5,
(int)v22,
v23,
n64,
0,
0,
1,
(_BYTE *)(unsigned __int8)(2 * n48_1 + 1));
switch ( n4a ) /*0xffcc6b28*/
{
case 1: /*0xffcc6b28*/
LogDebugString(__return_address, (int)"\nRead Eye\n"); /*0xffcc6b2f*/
break;
case 3: /*0xffcc6b28*/
LogDebugString(__return_address, (int)"\nRead (P) Eye\n"); /*0xffcc6b3b*/
break;
case 4: /*0xffcc6b28*/
LogDebugString(__return_address, (int)"\nRead (N) Eye\n"); /*0xffcc6b47*/
break;
case 22: /*0xffcc6b28*/
LogDebugString(__return_address, (int)"\nWrite Eye\n"); /*0xffcc6b53*/
break;
case 40: /*0xffcc6b28*/
LogDebugString(__return_address, (int)"\nCmd Eye\n"); /*0xffcc6b60*/
break;
}
RmtFunc4CE2(__return_address, n4, n5, a3, (int)v23, n48); /*0xffcc6b89*/
KtiFuncF4E(&v20); /*0xffcc6b93*/
v16 = KtiFuncF75((int)__return_address, v21, SHIDWORD(v21), v20, SHIDWORD(v20), 0x3E8u); /*0xffcc6bae*/
return LogDebugString(__return_address, (int)"\nDisplayEye time %d ms\n", v16); /*0xffcc6bc2*/
}
// Function: RmtFunc6BCD @ 0xffcc6bcd (0x131 bytes)
// Index: 1665/2560
int __cdecl RmtFunc6BCD(int n4)
{
int *v1; // esi
int result; // eax
_BYTE *v3; // ebx
int n4_1; // ecx
int v5; // ebp
int v6; // [esp-4h] [ebp-24h]
int n6; // [esp+10h] [ebp-10h]
int v8; // [esp+14h] [ebp-Ch]
int *v9; // [esp+18h] [ebp-8h]
int n4_2; // [esp+1Ch] [ebp-4h]
DebugPrint( /*0xffcc6bec*/
n4,
2,
255,
255,
255,
255,
255,
255,
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "\t\tPlatform DIMM Configuration(num_chunks(chunk_size))\n"); /*0xffcc6bff*/
DebugPrint( /*0xffcc6c11*/
n4,
2,
255,
255,
255,
255,
255,
255,
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
v1 = (int *)(n4 + 10289); /*0xffcc6c19*/
result = 0; /*0xffcc6c1f*/
v9 = (int *)(n4 + 10289); /*0xffcc6c21*/
v8 = 0; /*0xffcc6c25*/
v3 = (_BYTE *)(n4 + 258689); /*0xffcc6c29*/
n4_1 = 4; /*0xffcc6c31*/
n4_2 = 4; /*0xffcc6c32*/
do
{
if ( *v3 )
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "Socket : %d\n", result);
n6 = 6; /*0xffcc6c56*/
v5 = 0; /*0xffcc6c5e*/
do
{
v6 = *v1; /*0xffcc6c6c*/
if ( *(_BYTE *)(n4 + 244358) )
DebugPrint(
n4,
2,
255,
255,
255,
255,
255,
255,
"\tChannel : %d DDR4 Size : %d(64MB) NVMDIMM volatile Size : %d(64MB) NVMDIMM non volatile Size : %d(64"
"MB) NVmemSize (Type01 or batterybacked) : %d(64MB)\n"
"\n",
v5,
*(v1 - 12),
*(v1 - 10),
*(v1 - 9),
v6);
else
DebugPrint(
n4,
2,
255,
255,
255,
255,
255,
255,
"\tChannel : %d DDR4 Size : %d(64MB) NVMDIMM volatile Size : %d(64MB) NVMDIMM persistent Size : %d(64MB"
") NVMDIMM block Size : %d(64MB), NVmemSize (Type01 or batterybacked) : %d(64MB)\n"
"\n",
v5,
*(v1 - 12),
*(v1 - 10),
*(v1 - 7),
*(v1 - 5),
v6);
++v5; /*0xffcc6cb5*/
v1 = (int *)((char *)v1 + 8077); /*0xffcc6cb6*/
--n6; /*0xffcc6cbc*/
}
while ( n6 );
result = v8; /*0xffcc6cc3*/
v1 = v9; /*0xffcc6ccc*/
n4_1 = n4_2; /*0xffcc6cd0*/
}
++result; /*0xffcc6cd4*/
v1 = (int *)((char *)v1 + 50813); /*0xffcc6cd5*/
v3 += 48704; /*0xffcc6cdb*/
v8 = result; /*0xffcc6ce1*/
--n4_1; /*0xffcc6ce5*/
v9 = v1; /*0xffcc6ce8*/
n4_2 = n4_1; /*0xffcc6cec*/
}
while ( n4_1 );
return result; /*0xffcc6cf6*/
}
// Function: RmtFunc6CFE @ 0xffcc6cfe (0x65 bytes)
// Index: 1666/2560
unsigned __int16 __cdecl RmtFunc6CFE(_BYTE *a1, unsigned __int16 a2, char a3, char a4, char a5)
{
unsigned __int16 result; // ax
int v6; // edi
if ( a4 ) /*0xffcc6d09*/
LogDebugString(a1, (int)"\n"); /*0xffcc6d10*/
result = a2; /*0xffcc6d17*/
if ( a2 ) /*0xffcc6d21*/
{
v6 = a2; /*0xffcc6d29*/
do /*0xffcc6d4a*/
{
if ( a3 ) /*0xffcc6d2e*/
result = LogDebugString(a1, (int)"="); /*0xffcc6d35*/
else
result = LogDebugString(a1, (int)"-"); /*0xffcc6d40*/
--v6; /*0xffcc6d47*/
}
while ( v6 ); /*0xffcc6d4a*/
}
if ( a5 ) /*0xffcc6d53*/
return LogDebugString(a1, (int)"\n"); /*0xffcc6d5a*/
return result; /*0xffcc6d61*/
}
// Function: RmtFunc6D63 @ 0xffcc6d63 (0x27 bytes)
// Index: 1667/2560
__int64 __cdecl RmtFunc6D63(__int64 a1, __int64 a2)
{
return a2 + a1; /*0xffcc6d85*/
}
// Function: RmtFunc6D8A @ 0xffcc6d8a (0x25 bytes)
// Index: 1668/2560
__int64 __cdecl RmtFunc6D8A(__int64 a1, unsigned int a2)
{
return a1 + a2; /*0xffcc6daa*/
}
// Function: RmtFunc6DAF @ 0xffcc6daf (0x5a bytes)
// Index: 1669/2560
__int16 __cdecl RmtFunc6DAF(char *a1, int a2)
{
int i; // ecx
int n8; // edi
__int16 j_2; // dx
int j; // eax
int j_1; // [esp+0h] [ebp-4h]
j_1 = 0; /*0xffcc6db6*/
for ( i = a2 - 1; i >= 0; --i ) /*0xffcc6dbd*/
{
n8 = 8; /*0xffcc6dce*/
j_2 = (*a1++ << 8) ^ j_1; /*0xffcc6dd3*/
LOWORD(j_1) = j_2; /*0xffcc6dd7*/
for ( j = j_1; ; j_2 = j ) /*0xffcc6ddb*/
{
j *= 2; /*0xffcc6dde*/
if ( j_2 < 0 ) /*0xffcc6de3*/
j = (unsigned __int16)j ^ 0x1021; /*0xffcc6dea*/
j_1 = j; /*0xffcc6ded*/
if ( !--n8 ) /*0xffcc6df3*/
break; /*0xffcc6df3*/
}
}
return j_1; /*0xffcc6e05*/
}
// Function: RmtFunc6E09 @ 0xffcc6e09 (0x50 bytes)
// Index: 1670/2560
__int16 __cdecl RmtFunc6E09(unsigned __int16 n8288, unsigned __int16 n60)
{
__int16 v2; // bx
char v3; // si
int n16; // edi
char v6; // [esp+13h] [ebp-1h]
v2 = 0; /*0xffcc6e11*/
v6 = 0; /*0xffcc6e17*/
v3 = 0; /*0xffcc6e1b*/
n16 = 16; /*0xffcc6e1d*/
do /*0xffcc6e4e*/
{
if ( ((1 << v3) & n8288) != 0 ) /*0xffcc6e27*/
{
if ( ((1 << v6) & n60) != 0 ) /*0xffcc6e39*/
v2 |= 1 << v3; /*0xffcc6e41*/
++v6; /*0xffcc6e46*/
}
++v3; /*0xffcc6e4a*/
--n16; /*0xffcc6e4b*/
}
while ( n16 ); /*0xffcc6e4e*/
return v2; /*0xffcc6e50*/
}
// Function: RmtFunc6E59 @ 0xffcc6e59 (0x1f bytes)
// Index: 1671/2560
unsigned __int64 __cdecl RmtFunc6E59(unsigned __int64 i)
{
return i >> 1; /*0xffcc6e74*/
}
// Function: RmtFunc6E78 @ 0xffcc6e78 (0x1b bytes)
// Index: 1672/2560
unsigned int __cdecl RmtFunc6E78(int a1)
{
unsigned int result; // eax
char v2; // cl
bool v3; // sf
result = a1; /*0xffcc6e78*/
v2 = 0; /*0xffcc6e7c*/
if ( a1 ) /*0xffcc6e80*/
{
if ( a1 >= 0 ) /*0xffcc6e83*/
{
do /*0xffcc6e89*/
{
++v2; /*0xffcc6e85*/
v3 = (result & 0x40000000) != 0; /*0xffcc6e87*/
result *= 2; /*0xffcc6e87*/
}
while ( !v3 ); /*0xffcc6e89*/
}
return 0x80000000 >> v2; /*0xffcc6e90*/
}
return result; /*0xffcc6e82*/
}
// Function: RmtFunc6E93 @ 0xffcc6e93 (0x15 bytes)
// Index: 1673/2560
bool __cdecl RmtFunc6E93(int a1)
{
return a1 && ((a1 - 1) & a1) == 0; /*0xffcc6ea4*/
}
// Function: RmtFunc6EA8 @ 0xffcc6ea8 (0x31 bytes)
// Index: 1674/2560
int __cdecl RmtFunc6EA8(__int64 a1, char a2)
{
__int64 v2; // rax
v2 = a1 << (a2 & 0x1F); /*0xffcc6ebd*/
if ( (a2 & 0x3Fu) >= 0x20 ) /*0xffcc6ec2*/
LODWORD(v2) = 0; /*0xffcc6ec6*/
return v2; /*0xffcc6ed5*/
}
// Function: RmtFunc6ED9 @ 0xffcc6ed9 (0x17 bytes)
// Index: 1675/2560
char __cdecl RmtFunc6ED9(int a1)
{
unsigned int v1; // eax
char v2; // cl
v1 = a1; /*0xffcc6ed9*/
v2 = -1; /*0xffcc6edd*/
if ( a1 <= 0 ) /*0xffcc6ee2*/
return 0; /*0xffcc6ee4*/
do /*0xffcc6eeb*/
{
++v2; /*0xffcc6ee7*/
v1 >>= 1; /*0xffcc6ee9*/
}
while ( v1 ); /*0xffcc6eeb*/
return v2; /*0xffcc6ee6*/
}
// Function: RmtFunc6EF0 @ 0xffcc6ef0 (0x1d bytes)
// Index: 1676/2560
unsigned __int64 __cdecl RmtFunc6EF0(unsigned int a1, int n100000000)
{
return (unsigned int)n100000000 * (unsigned __int64)a1; /*0xffcc6f09*/
}
// Function: RmtFunc6F0D @ 0xffcc6f0d (0x27 bytes)
// Index: 1677/2560
__int64 __cdecl RmtFunc6F0D(__int64 n0x40000000, int n32)
{
return n0x40000000 * (unsigned int)n32; /*0xffcc6f30*/
}
// Function: RmtFunc6F34 @ 0xffcc6f34 (0x31 bytes)
// Index: 1678/2560
unsigned __int64 __cdecl RmtFunc6F34(unsigned __int64 a1, char a2)
{
unsigned __int64 result; // rax
result = a1 >> (a2 & 0x1F); /*0xffcc6f49*/
if ( (a2 & 0x3Fu) >= 0x20 ) /*0xffcc6f4e*/
return HIDWORD(result); /*0xffcc6f52*/
return result; /*0xffcc6f61*/
}
// Function: RmtFunc6F65 @ 0xffcc6f65 (0x47 bytes)
// Index: 1679/2560
__int16 __cdecl RmtFunc6F65(unsigned __int16 n0x2060, unsigned __int16 a2)
{
int n0x2060_1; // eax
__int16 v3; // dx
char v4; // bl
char v5; // di
int n16; // ebp
n0x2060_1 = n0x2060; /*0xffcc6f65*/
v3 = 0; /*0xffcc6f6a*/
v4 = 0; /*0xffcc6f72*/
v5 = 0; /*0xffcc6f74*/
n16 = 16; /*0xffcc6f76*/
do /*0xffcc6fa2*/
{
if ( ((1 << v5) & n0x2060_1) != 0 ) /*0xffcc6f80*/
{
if ( (a2 & (1 << v5)) != 0 ) /*0xffcc6f89*/
v3 |= 1 << v4; /*0xffcc6f94*/
n0x2060_1 = n0x2060; /*0xffcc6f97*/
++v4; /*0xffcc6f9c*/
}
++v5; /*0xffcc6f9e*/
--n16; /*0xffcc6f9f*/
}
while ( n16 ); /*0xffcc6fa2*/
return v3; /*0xffcc6fa4*/
}
// Function: RmtFunc6FAC @ 0xffcc6fac (0x30 bytes)
// Index: 1680/2560
int __cdecl RmtFunc6FAC(__int64 a1, int i)
{
__int64 v2; // rax
int j; // edi
v2 = a1; /*0xffcc6fb0*/
for ( j = i; j; --j ) /*0xffcc6fbb*/
LODWORD(v2) = (HIDWORD(v2) >> 31) | RmtFunc6EA8(v2, 1) & 0xFFFFFFFE; /*0xffcc6fd2*/
return v2; /*0xffcc6fda*/
}
// Function: RmtFunc6FDC @ 0xffcc6fdc (0x3a bytes)
// Index: 1681/2560
int __cdecl RmtFunc6FDC(int a1, unsigned int a2, int i)
{
unsigned __int64 v4; // rax
int j; // edi
int v6; // esi
LODWORD(v4) = a1; /*0xffcc6fe0*/
for ( j = i; j; --j ) /*0xffcc6feb*/
{
v6 = v4 & 1; /*0xffcc6ff4*/
v4 = RmtFunc6F34(__PAIR64__(a2, v4), 1); /*0xffcc6ff7*/
a2 = HIDWORD(v4) & 0x7FFFFFFF | (v6 << 31); /*0xffcc700a*/
}
return v4; /*0xffcc7014*/
}
// Function: RmtFunc7016 @ 0xffcc7016 (0xf bytes)
// Index: 1682/2560
unsigned int __cdecl RmtFunc7016(unsigned int n31, unsigned int n31_2)
{
unsigned int n31_1; // eax
n31_1 = n31; /*0xffcc7016*/
if ( n31 >= n31_2 ) /*0xffcc701e*/
return n31_2; /*0xffcc7020*/
return n31_1; /*0xffcc7024*/
}
// Function: RmtFunc7025 @ 0xffcc7025 (0x27 bytes)
// Index: 1683/2560
__int64 __cdecl RmtFunc7025(__int64 a1, __int64 a2)
{
return a1 - a2; /*0xffcc7047*/
}
// Function: RmtFunc704C @ 0xffcc704c (0x25 bytes)
// Index: 1684/2560
__int64 __cdecl RmtFunc704C(__int64 a1, unsigned int a2)
{
return a1 - a2; /*0xffcc706c*/
}
// Function: RmtFunc7071 @ 0xffcc7071 (0xd0 bytes)
// Index: 1685/2560
bool __cdecl RmtFunc7071(int p_n42, unsigned __int8 n4, char n6)
{
char v3; // cl
int v4; // ecx
v3 = 0; /*0xffcc707a*/
switch ( n6 ) /*0xffcc707f*/
{
case 0: /*0xffcc707f*/
return (*(_BYTE *)(48704 * n4 + p_n42 + 304938) & 1) == 0; /*0xffcc713b*/
case 1: /*0xffcc707f*/
v4 = *(_DWORD *)(48704 * n4 + p_n42 + 304938) >> 1; /*0xffcc7115*/
return (v4 & 1) == 0; /*0xffcc7115*/
case 2: /*0xffcc707f*/
v4 = *(_DWORD *)(48704 * n4 + p_n42 + 304938) >> 2; /*0xffcc70fc*/
return (v4 & 1) == 0; /*0xffcc70ff*/
case 3: /*0xffcc707f*/
v4 = *(_DWORD *)(48704 * n4 + p_n42 + 304938) >> 3; /*0xffcc70e3*/
return (v4 & 1) == 0; /*0xffcc70e6*/
case 4: /*0xffcc707f*/
v4 = *(_DWORD *)(48704 * n4 + p_n42 + 304938) >> 4; /*0xffcc70ca*/
return (v4 & 1) == 0; /*0xffcc70cd*/
case 5: /*0xffcc707f*/
v4 = *(_DWORD *)(48704 * n4 + p_n42 + 304938) >> 5; /*0xffcc70b1*/
return (v4 & 1) == 0; /*0xffcc7117*/
}
return v3; /*0xffcc713f*/
}
// Function: RmtFunc7141 @ 0xffcc7141 (0xb7 bytes)
// Index: 1686/2560
int __cdecl RmtFunc7141(int p_n42, unsigned __int8 n4, unsigned __int8 n5)
{
int result; // eax
if ( n5 ) /*0xffcc714b*/
{
switch ( n5 ) /*0xffcc7154*/
{
case 1u: /*0xffcc7154*/
*(_DWORD *)(48704 * n4 + p_n42 + 304938) &= ~2u; /*0xffcc71d7*/
return p_n42; /*0xffcc71d4*/
case 2u: /*0xffcc7154*/
*(_DWORD *)(48704 * n4 + p_n42 + 304938) &= ~4u; /*0xffcc71c0*/
return p_n42; /*0xffcc71bd*/
case 3u: /*0xffcc7154*/
*(_DWORD *)(48704 * n4 + p_n42 + 304938) &= ~8u; /*0xffcc71a9*/
return p_n42; /*0xffcc71a6*/
case 4u: /*0xffcc7154*/
*(_DWORD *)(48704 * n4 + p_n42 + 304938) &= ~0x10u; /*0xffcc7192*/
return p_n42; /*0xffcc718f*/
default:
result = n5 - 5; /*0xffcc7165*/
if ( n5 == 5 ) /*0xffcc7168*/
{
*(_DWORD *)(48704 * n4 + p_n42 + 304938) &= ~0x20u; /*0xffcc717b*/
return p_n42; /*0xffcc7178*/
}
break;
}
}
else
{
*(_DWORD *)(48704 * n4 + p_n42 + 304938) &= ~1u; /*0xffcc71ee*/
return p_n42; /*0xffcc71eb*/
}
return result; /*0xffcc7183*/
}
// Function: RmtFunc71F8 @ 0xffcc71f8 (0xa5 bytes)
// Index: 1687/2560
char __cdecl RmtFunc71F8(unsigned __int8 *p_n42, unsigned __int8 n4, int n6, char *a4, char n31, unsigned __int8 n0x20)
{
unsigned __int8 n31_1; // al
int v7; // edi
unsigned __int8 *v8; // ebp
char result; // al
n31_1 = n31; /*0xffcc7210*/
if ( (unsigned __int8)n31 > 0x20u ) /*0xffcc7216*/
{
n31_1 = 32; /*0xffcc7218*/
n31 = 32; /*0xffcc721a*/
}
v7 = n31_1 << 6; /*0xffcc7235*/
v8 = &p_n42[50813 * n4 + 10301 + 8077 * (unsigned __int8)n6 + 64 * n0x20]; /*0xffcc7247*/
if ( AutoGenFunc8E45((int)v8, a4, v7) || (result = RmtFunc7071((int)p_n42, n4, n6)) == 0 ) /*0xffcc7266*/
{
KtiFunc63FE(p_n42, n4, n6, n31, (int)a4, n0x20); /*0xffcc727a*/
AutoGenFunc8E72((int)v8, a4, v7); /*0xffcc7285*/
return RmtFunc7141((int)p_n42, n4, n6); /*0xffcc7290*/
}
return result; /*0xffcc7298*/
}
// Function: RmtFunc729D @ 0xffcc729d (0xd5 bytes)
// Index: 1688/2560
char __cdecl RmtFunc729D(unsigned __int8 *__return_address, unsigned __int8 n4, int n1019412735, char n4a)
{
unsigned int v4; // esi
int v5; // edi
char v6; // bl
unsigned __int8 n0x10; // cl
unsigned __int8 n0x10_1; // ch
char *v9; // eax
int SocketInfo; // eax
unsigned __int8 n6_1; // bl
_BYTE *SocketInfo_1; // esi
int n6; // [esp+8h] [ebp-804h]
char v15[2048]; // [esp+Ch] [ebp-800h] BYREF
if ( 8 * n4a ) /*0xffcc72a7*/
{
v4 = 0; /*0xffcc72b2*/
v5 = (unsigned __int8)(8 * n4a); /*0xffcc72b4*/
v6 = 0; /*0xffcc72b7*/
do /*0xffcc730a*/
{
n0x10 = v6 & 0xF; /*0xffcc72d3*/
n0x10_1 = (v6 & 0xF) + 2; /*0xffcc72de*/
if ( (unsigned __int8)(v6 & 0xF) < n0x10_1 ) /*0xffcc72e5*/
{
v9 = &v15[64 * (v4 >> 3) + 4 * n0x10]; /*0xffcc72f1*/
do /*0xffcc7301*/
{
if ( n0x10 < 0x10u ) /*0xffcc72f6*/
*(_DWORD *)v9 = -((n1019412735 & (1 << v4)) != 0); /*0xffcc72f8*/
++n0x10; /*0xffcc72fa*/
v9 += 4; /*0xffcc72fc*/
}
while ( n0x10 < n0x10_1 ); /*0xffcc7301*/
}
++v4; /*0xffcc7303*/
v6 += 2; /*0xffcc7304*/
--v5; /*0xffcc7307*/
}
while ( v5 ); /*0xffcc730a*/
}
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffcc731c*/
n6_1 = 0; /*0xffcc7322*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcc7324*/
LOBYTE(n6) = 0; /*0xffcc7327*/
do /*0xffcc7367*/
{
if ( *SocketInfo_1 ) /*0xffcc732b*/
LOBYTE(SocketInfo) = RmtFunc71F8(__return_address, n4, n6, v15, n4a, 0); /*0xffcc7350*/
++n6_1; /*0xffcc7358*/
SocketInfo_1 += 7688; /*0xffcc735a*/
LOBYTE(n6) = n6_1; /*0xffcc7360*/
}
while ( n6_1 < 6u ); /*0xffcc7367*/
return SocketInfo; /*0xffcc7369*/
}
// Function: RmtFunc7372 @ 0xffcc7372 (0x86 bytes)
// Index: 1689/2560
char __cdecl RmtFunc7372(
unsigned __int8 *__return_address,
unsigned __int8 n4,
int n6,
int a4,
unsigned __int8 n8,
unsigned __int8 a6)
{
unsigned int v6; // edi
unsigned __int8 v7; // cl
int v8; // eax
char *v9; // esi
int n16; // ebp
char v12[2048]; // [esp+8h] [ebp-800h] BYREF
v6 = n8 + a6; /*0xffcc738b*/
v7 = 0; /*0xffcc738d*/
if ( v6 )
{
v8 = 0; /*0xffcc7394*/
do
{
v9 = &v12[64 * v8]; /*0xffcc73a0*/
n16 = 16; /*0xffcc73a2*/
do
{
*(_DWORD *)v9 = v7 >= a6 ? a4 : 0;
v9 += 4; /*0xffcc73b2*/
--n16; /*0xffcc73b5*/
}
while ( n16 );
v8 = ++v7; /*0xffcc73bc*/
}
while ( v7 < v6 );
}
return RmtFunc71F8(__return_address, n4, n6, v12, a6 + n8, 0); /*0xffcc73ef*/
}
// Function: RmtFunc73F8 @ 0xffcc73f8 (0x4a bytes)
// Index: 1690/2560
char __cdecl RmtFunc73F8(int __return_address, unsigned int n2, int n3, _BYTE *a4)
{
_BYTE *v4; // ecx
v4 = a4; /*0xffcc73fb*/
HIBYTE(a4) = a4[2]; /*0xffcc7401*/
MailBoxFunc9D02(__return_address, n2, n3, v4, (_BYTE *)&a4 + 3); /*0xffcc7412*/
DebugPrint(__return_address, 2, n2, n3, 255, 255, 255, 255, " tRWDD = %d\n", HIBYTE(a4)); /*0xffcc7435*/
return HIBYTE(a4); /*0xffcc7440*/
}
// Function: RmtFunc7442 @ 0xffcc7442 (0x99 bytes)
// Index: 1691/2560
unsigned __int8 __cdecl RmtFunc7442(int __return_address, unsigned int n2, unsigned int n3, unsigned int a4, _BYTE *a5)
{
int SocketInfo; // esi
bool v6; // cc
unsigned __int8 v7; // cl
unsigned __int8 v8; // cl
unsigned __int8 v10; // [esp+Bh] [ebp-1h] BYREF
SocketInfo = GetSocketInfo(__return_address, n2); /*0xffcc7456*/
v6 = a5[8] <= 1u; /*0xffcc745a*/
v7 = a5[1]; /*0xffcc745e*/
v10 = v7; /*0xffcc7461*/
if ( !v6 || a5[9] > 1u ) /*0xffcc746a*/
v10 = v7 + 1; /*0xffcc746e*/
MailBoxFunc9D99(__return_address, n2, n3, (int)a5, &v10); /*0xffcc7480*/
v8 = v10; /*0xffcc7485*/
if ( *(_BYTE *)(7688 * (unsigned __int8)n3 + SocketInfo + 6673) && v10 < a4 ) /*0xffcc74a4*/
{
v8 = a4; /*0xffcc74a6*/
v10 = a4; /*0xffcc74a9*/
}
DebugPrint(__return_address, 2, n2, n3, 255, 255, 255, 255, "specMin = %d, tRWDR = %d\n", a4, v8); /*0xffcc74ca*/
return v10; /*0xffcc74d5*/
}
// Function: RmtFunc74DB @ 0xffcc74db (0x91 bytes)
// Index: 1692/2560
unsigned __int8 __cdecl RmtFunc74DB(
int __return_address,
unsigned int n2,
unsigned int n3,
unsigned int a4,
unsigned __int8 *a5)
{
int SocketInfo; // esi
unsigned __int8 v6; // cl
int v7; // edx
unsigned __int8 v9; // [esp+Bh] [ebp-1h] BYREF
SocketInfo = GetSocketInfo(__return_address, n2); /*0xffcc74ef*/
v9 = *a5; /*0xffcc74ff*/
MailBoxFunc9E7B(__return_address, n2, n3, (int)a5, &v9); /*0xffcc7505*/
v6 = v9; /*0xffcc750a*/
v7 = 7688 * (unsigned __int8)n3; /*0xffcc7513*/
if ( *(_BYTE *)(v7 + SocketInfo + 6673) ) /*0xffcc7519*/
{
if ( v9 < a4 ) /*0xffcc7529*/
{
v6 = a4; /*0xffcc752b*/
v9 = a4; /*0xffcc752e*/
}
if ( *(_BYTE *)(v7 + SocketInfo + 6673) ) /*0xffcc7531*/
{
DebugPrint(__return_address, 2, n2, n3, 255, 255, 255, 255, "specMin = %d, tRWSR = %d\n", a4, v6); /*0xffcc7559*/
return v9; /*0xffcc755e*/
}
}
return v6; /*0xffcc7564*/
}
// Function: RmtFunc756C @ 0xffcc756c (0x46 bytes)
// Index: 1693/2560
unsigned __int8 __cdecl RmtFunc756C(int __return_address, unsigned int n2, int n3, _BYTE *a4)
{
int v4; // ecx
unsigned __int8 v6; // [esp+1h] [ebp-1h] BYREF
v6 = HIBYTE(v4); /*0xffcc756f*/
MailBoxFunc9EEC(__return_address, n2, n3, a4, &v6); /*0xffcc7580*/
DebugPrint(__return_address, 2, n2, n3, 255, 255, 255, 255, "tWRDD = %d\n", v6); /*0xffcc75a3*/
return v6; /*0xffcc75b0*/
}
// Function: RmtFunc75B2 @ 0xffcc75b2 (0x46 bytes)
// Index: 1694/2560
unsigned __int8 __cdecl RmtFunc75B2(int __return_address, unsigned int n2, unsigned int n3, _BYTE *a4)
{
int v4; // ecx
unsigned __int8 v6; // [esp+1h] [ebp-1h] BYREF
v6 = HIBYTE(v4); /*0xffcc75b5*/
MailBoxFunc9F5F(__return_address, n2, n3, a4, (char *)&v6); /*0xffcc75c6*/
DebugPrint(__return_address, 2, n2, n3, 255, 255, 255, 255, "tWRDR = %d\n", v6); /*0xffcc75e9*/
return v6; /*0xffcc75f6*/
}
// Function: RmtFunc75F8 @ 0xffcc75f8 (0x8c bytes)
// Index: 1695/2560
char __cdecl RmtFunc75F8(int __return_address, int n2, unsigned int n3, unsigned __int8 n2a, _BYTE *a5)
{
_BYTE *v5; // ecx
unsigned __int8 n3_1; // cl
v5 = a5; /*0xffcc75fb*/
HIBYTE(a5) = a5[6]; /*0xffcc7606*/
MailBoxFuncA080(__return_address, n2, n3, v5, (_BYTE *)&a5 + 3); /*0xffcc7615*/
if ( HIBYTE(a5) < n2a ) /*0xffcc7623*/
HIBYTE(a5) = n2a; /*0xffcc7625*/
ProcCommonFunc1843(__return_address, n3, (_BYTE *)&a5 + 3); /*0xffcc7630*/
n3_1 = HIBYTE(a5); /*0xffcc7635*/
if ( (*(_DWORD *)(__return_address + 134) & 0x800000) != 0 ) /*0xffcc7645*/
n3_1 = ++HIBYTE(a5); /*0xffcc7647*/
if ( n3_1 < 3u ) /*0xffcc764f*/
{
n3_1 = 3; /*0xffcc7651*/
HIBYTE(a5) = 3; /*0xffcc7653*/
}
DebugPrint(__return_address, 2, n2, n3, 255, 255, 255, 255, "tWWDD = %d, minWWDD = %d\n", n3_1, n2a); /*0xffcc7675*/
return HIBYTE(a5); /*0xffcc7680*/
}
// Function: RmtFunc7684 @ 0xffcc7684 (0x88 bytes)
// Index: 1696/2560
unsigned __int8 __cdecl RmtFunc7684(int __return_address, int n2, unsigned int n3, unsigned __int8 n2a, _BYTE *a5)
{
unsigned __int8 p_n2a_1; // cl
unsigned __int8 p_n2a; // [esp+Bh] [ebp-1h] BYREF
MailBoxFuncA0F7(__return_address, n2, n3, a5, &p_n2a); /*0xffcc769b*/
if ( p_n2a < n2a ) /*0xffcc76a9*/
p_n2a = n2a; /*0xffcc76ab*/
ProcCommonFunc1843(__return_address, n3, &p_n2a); /*0xffcc76b6*/
p_n2a_1 = p_n2a; /*0xffcc76bb*/
if ( (*(_DWORD *)(__return_address + 134) & 0x800000) != 0 ) /*0xffcc76cb*/
p_n2a_1 = ++p_n2a; /*0xffcc76cd*/
if ( p_n2a_1 < 3u ) /*0xffcc76d5*/
{
p_n2a_1 = 3; /*0xffcc76d7*/
p_n2a = 3; /*0xffcc76d9*/
}
DebugPrint(__return_address, 2, n2, n3, 255, 255, 255, 255, "tWWDR = %d, minWWDR = %d\n", p_n2a_1, n2a); /*0xffcc76fb*/
return p_n2a; /*0xffcc7706*/
}
// Function: RmtFunc770C @ 0xffcc770c (0x2f5 bytes)
// Index: 1697/2560
int __cdecl RmtFunc770C(unsigned __int8 *__return_address, int n2, _BYTE *n3, char n2a, char a5)
{
int SocketInfo; // esi
int CpuCount; // eax
char n2a_1; // dl
int CpuCount_1; // ebx
unsigned __int8 n2_2; // cl
unsigned __int16 v10; // si
int v11; // edi
int v12; // eax
unsigned __int8 n8; // bl
int v14; // eax
int CpuCount_3; // ecx
unsigned __int8 v16; // bh
unsigned __int16 v17; // dx
int v18; // esi
int n18; // ebx
unsigned __int16 v20; // ax
unsigned __int16 v21; // dx
int v22; // esi
int n18_1; // ebp
unsigned __int16 v24; // ax
unsigned __int16 v25; // dx
int v28; // [esp+10h] [ebp-70h]
unsigned __int16 v29; // [esp+10h] [ebp-70h]
int CpuCount_2; // [esp+14h] [ebp-6Ch]
int n2_1; // [esp+18h] [ebp-68h]
int v32; // [esp+1Ch] [ebp-64h]
int v33; // [esp+20h] [ebp-60h]
int n0x12; // [esp+28h] [ebp-58h]
int v35; // [esp+2Ch] [ebp-54h]
unsigned __int16 p_n60[2]; // [esp+30h] [ebp-50h] BYREF
int SocketInfo_1; // [esp+34h] [ebp-4Ch]
_WORD buf_1[18]; // [esp+38h] [ebp-48h] BYREF
_WORD buf[18]; // [esp+5Ch] [ebp-24h] BYREF
v32 = 0; /*0xffcc770f*/
SocketInfo = GetSocketInfo((int)__return_address, n2); /*0xffcc7734*/
SocketInfo_1 = SocketInfo; /*0xffcc773d*/
CpuCount = GetCpuCount((int)__return_address, n2, (unsigned __int8)n3); /*0xffcc7742*/
n2a_1 = n2a; /*0xffcc7747*/
CpuCount_1 = CpuCount; /*0xffcc7751*/
CpuCount_2 = CpuCount; /*0xffcc7753*/
if ( n2a == 2 ) /*0xffcc775a*/
{
memset(buf, 0, sizeof(buf)); /*0xffcc7765*/
memset(buf_1, 0xFFu, sizeof(buf_1)); /*0xffcc7771*/
}
n2_2 = 0; /*0xffcc777a*/
LOBYTE(n2_1) = 0; /*0xffcc7785*/
if ( *(_BYTE *)(7688 * (unsigned __int8)n3 + SocketInfo + 3) ) /*0xffcc778d*/
{
v10 = 0; /*0xffcc7797*/
v11 = 7688 * (unsigned __int8)n3; /*0xffcc779c*/
do /*0xffcc7990*/
{
v12 = 1379 * n2_2; /*0xffcc77a1*/
v35 = v12; /*0xffcc77a7*/
if ( *(_BYTE *)(v12 + CpuCount_1) && (*(_BYTE *)(v12 + CpuCount_1 + 107) != 1 || a5) ) /*0xffcc77c4*/
{
if ( n2a_1 == 1 ) /*0xffcc77cd*/
{
v10 = 0; /*0xffcc77d8*/
memset(buf, 0, sizeof(buf)); /*0xffcc77e2*/
memset(buf_1, 0xFFu, sizeof(buf_1)); /*0xffcc77ee*/
}
n8 = 0; /*0xffcc77f7*/
v14 = 0; /*0xffcc77fd*/
CpuCount_3 = CpuCount_2; /*0xffcc77ff*/
LOBYTE(n0x12) = 0; /*0xffcc7803*/
v28 = 0; /*0xffcc7807*/
do /*0xffcc78d5*/
{
if ( __return_address[257312] || n8 != 8 && n8 != 17 ) /*0xffcc7820*/
{
v16 = 0; /*0xffcc7826*/
LOBYTE(v33) = 0; /*0xffcc7828*/
if ( *(_BYTE *)(CpuCount_3 + v35 + 19) ) /*0xffcc782c*/
{
do /*0xffcc78b7*/
{
if ( !KtiFunc89E9((int)__return_address, n2, (char)n3, n2_1, v33, 0) ) /*0xffcc784f*/
{
MrcMarginGroupTrain(__return_address, n2, n3, n2_1, v33, n0x12, 0, 0, 21, 2, p_n60); /*0xffcc7883*/
MailBoxFunc8CAD(p_n60[0], (_WORD *)((char *)buf_1 + v28), (_WORD *)((char *)buf + v28)); /*0xffcc78a1*/
}
LOBYTE(v33) = ++v16; /*0xffcc78af*/
}
while ( v16 < *(_BYTE *)(CpuCount_2 + v35 + 19) ); /*0xffcc78b7*/
v14 = v28; /*0xffcc78bd*/
CpuCount_3 = CpuCount_2; /*0xffcc78c1*/
}
}
++n8; /*0xffcc78c5*/
v14 += 2; /*0xffcc78c7*/
LOBYTE(n0x12) = n8; /*0xffcc78ca*/
v28 = v14; /*0xffcc78ce*/
}
while ( n8 < 0x12u ); /*0xffcc78d5*/
n2a_1 = n2a; /*0xffcc78db*/
if ( n2a == 1 ) /*0xffcc78e9*/
{
v17 = 0; /*0xffcc78ed*/
v18 = 0; /*0xffcc78ef*/
n18 = 18; /*0xffcc78f1*/
do /*0xffcc7917*/
{
if ( v17 < (unsigned __int16)buf[v18] - (unsigned __int16)buf_1[v18] ) /*0xffcc7905*/
v17 = buf[v18] - buf_1[v18]; /*0xffcc790e*/
++v18; /*0xffcc7911*/
--n18; /*0xffcc7914*/
}
while ( n18 ); /*0xffcc7917*/
v20 = *(_WORD *)(__return_address + 244283); /*0xffcc7920*/
if ( v17 < v20 ) /*0xffcc792a*/
v29 = 0; /*0xffcc7937*/
else
v29 = v17 - v20; /*0xffcc7931*/
n2a_1 = 1; /*0xffcc7941*/
if ( (v29 & 0x7F) != 0 ) /*0xffcc7948*/
v10 = (v29 >> 7) + 1; /*0xffcc795c*/
else
v10 = v29 >> 7; /*0xffcc7966*/
}
n2_2 = n2_1; /*0xffcc796a*/
CpuCount_1 = CpuCount_2; /*0xffcc796e*/
v11 = 7688 * (unsigned __int8)n3; /*0xffcc7972*/
if ( (unsigned __int16)v32 < v10 ) /*0xffcc7979*/
v32 = v10; /*0xffcc797e*/
}
LOBYTE(n2_1) = ++n2_2; /*0xffcc7988*/
}
while ( n2_2 < *(_BYTE *)(v11 + SocketInfo_1 + 3) ); /*0xffcc7990*/
}
if ( n2a_1 != 2 ) /*0xffcc7999*/
return v32; /*0xffcc79f5*/
v21 = 0; /*0xffcc799d*/
v22 = 0; /*0xffcc799f*/
n18_1 = 18; /*0xffcc79a1*/
do /*0xffcc79c4*/
{
if ( v21 < (unsigned __int16)buf[v22] - (unsigned __int16)buf_1[v22] ) /*0xffcc79b7*/
v21 = buf[v22] - buf_1[v22]; /*0xffcc79bb*/
++v22; /*0xffcc79be*/
--n18_1; /*0xffcc79c1*/
}
while ( n18_1 ); /*0xffcc79c4*/
v24 = *(_WORD *)(__return_address + 244283); /*0xffcc79cd*/
if ( v21 < v24 ) /*0xffcc79d7*/
v25 = 0; /*0xffcc79dd*/
else
v25 = v21 - v24; /*0xffcc79d9*/
if ( (v25 & 0x7F) != 0 ) /*0xffcc79e2*/
return (unsigned __int16)((v25 >> 7) + 1); /*0xffcc79e8*/
else
return v25 >> 7; /*0xffcc79ef*/
}
// Function: RmtFunc7A01 @ 0xffcc7a01 (0x322 bytes)
// Index: 1698/2560
char __cdecl RmtFunc7A01(unsigned __int8 *__return_address, int n2, _BYTE *n3, char n2a, char a5)
{
unsigned __int16 n0x10; // bx
int CpuCount; // eax
char n2a_1; // ch
int CpuCount_1; // esi
char v9; // dl
unsigned __int8 v10; // cl
int v11; // edi
unsigned __int8 n0x12_1; // al
int v13; // esi
__int16 v14; // si
unsigned __int8 v15; // al
unsigned __int16 v16; // cx
unsigned __int16 v17; // bp
unsigned __int16 n0x27; // si
int v19; // edx
int n18; // ebp
unsigned __int16 v21; // ax
unsigned __int16 v22; // ax
int v23; // edx
int n18_1; // ebp
unsigned __int16 p_n60; // [esp+10h] [ebp-74h] BYREF
char v27[4]; // [esp+14h] [ebp-70h]
char v28[4]; // [esp+18h] [ebp-6Ch]
int v29; // [esp+1Ch] [ebp-68h]
int CpuCount_2; // [esp+20h] [ebp-64h]
int v31; // [esp+24h] [ebp-60h] BYREF
int n0x12; // [esp+28h] [ebp-5Ch]
unsigned __int8 n4[4]; // [esp+2Ch] [ebp-58h]
int v34; // [esp+30h] [ebp-54h]
int SocketInfo; // [esp+34h] [ebp-50h]
int v36; // [esp+38h] [ebp-4Ch]
_WORD buf_1[18]; // [esp+3Ch] [ebp-48h] BYREF
_WORD buf[18]; // [esp+60h] [ebp-24h] BYREF
n0x10 = 0; /*0xffcc7a0e*/
v29 = 0; /*0xffcc7a1b*/
SocketInfo = GetSocketInfo((int)__return_address, n2); /*0xffcc7a2b*/
CpuCount = GetCpuCount((int)__return_address, n2, (unsigned __int8)n3); /*0xffcc7a37*/
n2a_1 = n2a; /*0xffcc7a3c*/
CpuCount_1 = CpuCount; /*0xffcc7a46*/
v9 = 0; /*0xffcc7a48*/
CpuCount_2 = CpuCount; /*0xffcc7a4a*/
v31 = 0; /*0xffcc7a4e*/
if ( n2a == 2 ) /*0xffcc7a55*/
{
memset(buf, 0, sizeof(buf)); /*0xffcc7a60*/
memset(buf_1, 0xFFu, sizeof(buf_1)); /*0xffcc7a6c*/
n2a_1 = 2; /*0xffcc7a6e*/
}
v10 = 0; /*0xffcc7a7c*/
v27[0] = 0; /*0xffcc7a8b*/
v36 = 7688 * (unsigned __int8)n3; /*0xffcc7a8f*/
if ( *(_BYTE *)(v36 + SocketInfo + 3) )
{
while ( 1 )
{
v11 = 1379 * v10; /*0xffcc7aa9*/
v34 = v11; /*0xffcc7aaf*/
if ( *(_BYTE *)(v11 + CpuCount_1) && (*(_BYTE *)(v11 + CpuCount_1 + 107) != 1 || a5) )
{
if ( n2a_1 == 1 ) /*0xffcc7ad3*/
{
memset(buf, 0, sizeof(buf)); /*0xffcc7ade*/
memset(buf_1, 0xFFu, sizeof(buf_1)); /*0xffcc7aec*/
v11 = v34; /*0xffcc7aee*/
v29 = 0; /*0xffcc7af2*/
}
n0x12_1 = 0; /*0xffcc7afd*/
v13 = 0; /*0xffcc7aff*/
LOBYTE(n0x12) = 0; /*0xffcc7b01*/
v34 = 0; /*0xffcc7b05*/
do /*0xffcc7c36*/
{
if ( __return_address[257312] || n0x12_1 != 8 && n0x12_1 != 17 ) /*0xffcc7b1b*/
{
v28[0] = 0; /*0xffcc7b25*/
if ( *(_BYTE *)(v11 + CpuCount_2 + 19) ) /*0xffcc7b29*/
{
do /*0xffcc7c1d*/
{
if ( !KtiFunc89E9((int)__return_address, n2, (char)n3, v27[0], v28[0], 0) ) /*0xffcc7b4b*/
{
n4[0] = KtiFunc88D1((int)__return_address, n2, (unsigned __int8)n3, v27[0], v28[0]); /*0xffcc7b77*/
MrcMarginGroupTrain(__return_address, n2, n3, *(int *)v27, *(int *)v28, n0x12, 0, 0, 0, 2, &p_n60); /*0xffcc7ba0*/
v14 = (unsigned __int8)ProcCommonFuncD799(__return_address, n2, (unsigned __int8)n3, n4[0]); /*0xffcc7bc4*/
v15 = ProcCommonFuncD73A(__return_address, n2, (unsigned __int8)n3, n4[0]); /*0xffcc7bd6*/
v16 = p_n60 + ((v14 - v15) << 6); /*0xffcc7bf1*/
v13 = v34; /*0xffcc7bf4*/
MailBoxFunc8CAD(v16, (_WORD *)((char *)buf_1 + v34), (_WORD *)((char *)buf + v34)); /*0xffcc7c03*/
}
++v28[0]; /*0xffcc7c15*/
}
while ( v28[0] < *(_BYTE *)(v11 + CpuCount_2 + 19) ); /*0xffcc7c1d*/
n0x12_1 = n0x12; /*0xffcc7c23*/
}
}
++n0x12_1; /*0xffcc7c27*/
v13 += 2; /*0xffcc7c29*/
LOBYTE(n0x12) = n0x12_1; /*0xffcc7c2c*/
v34 = v13; /*0xffcc7c30*/
}
while ( n0x12_1 < 0x12u ); /*0xffcc7c36*/
v17 = v29; /*0xffcc7c44*/
if ( n2a == 1 )
{
n0x27 = 0; /*0xffcc7c4c*/
v19 = 0; /*0xffcc7c4e*/
n18 = 18; /*0xffcc7c50*/
do /*0xffcc7c76*/
{
if ( n0x27 < (unsigned __int16)buf[v19] - (unsigned __int16)buf_1[v19] ) /*0xffcc7c64*/
n0x27 = buf[v19] - buf_1[v19]; /*0xffcc7c6d*/
++v19; /*0xffcc7c70*/
--n18; /*0xffcc7c73*/
}
while ( n18 ); /*0xffcc7c76*/
v21 = n0x27 >= 0x27u ? n0x27 - 39 : 0;
if ( ((unsigned __int8)(n0x27 - 39) & (unsigned __int8)-(n0x27 >= 0x27u) & 0x7F) != 0 ) /*0xffcc7c8a*/
v22 = (v21 >> 7) + 1; /*0xffcc7c90*/
else
v22 = v21 >> 7; /*0xffcc7c94*/
v17 = v22; /*0xffcc7c98*/
v29 = v22; /*0xffcc7c9b*/
}
v9 = v31; /*0xffcc7c9f*/
v10 = v27[0]; /*0xffcc7ca3*/
CpuCount_1 = CpuCount_2; /*0xffcc7ca7*/
if ( (unsigned __int16)v31 < v17 ) /*0xffcc7cae*/
{
v9 = v17; /*0xffcc7cb0*/
v31 = v17; /*0xffcc7cb3*/
}
}
v27[0] = ++v10; /*0xffcc7cc1*/
if ( v10 >= *(_BYTE *)(v36 + SocketInfo + 3) ) /*0xffcc7cc9*/
break; /*0xffcc7cc9*/
n2a_1 = n2a; /*0xffcc7a9f*/
}
}
if ( n2a == 2 ) /*0xffcc7cd7*/
{
v23 = 0; /*0xffcc7cdb*/
n18_1 = 18; /*0xffcc7cdd*/
do /*0xffcc7d00*/
{
if ( n0x10 < (unsigned __int16)buf[v23] - (unsigned __int16)buf_1[v23] ) /*0xffcc7cf3*/
n0x10 = buf[v23] - buf_1[v23]; /*0xffcc7cf7*/
++v23; /*0xffcc7cfa*/
--n18_1; /*0xffcc7cfd*/
}
while ( n18_1 ); /*0xffcc7d00*/
MailBoxFunc90CB(&v31, n0x10); /*0xffcc7d0d*/
return v31; /*0xffcc7d12*/
}
return v9; /*0xffcc7d19*/
}
// Function: RmtFunc7D23 @ 0xffcc7d23 (0x20 bytes)
// Index: 1699/2560
bool __cdecl RmtFunc7D23(int __return_address, int n2, int n3, char a4)
{
return (unsigned __int16)RmtFunc843D(__return_address, n2, n3, a4) > 0x27u; /*0xffcc7d42*/
}
// Function: RmtFunc7D43 @ 0xffcc7d43 (0x6fa bytes)
// Index: 1700/2560
unsigned int __cdecl RmtFunc7D43(
unsigned __int8 *__return_address,
int n2,
_BYTE *n3,
unsigned int *a4,
unsigned int *a5,
unsigned int *a6,
char a7)
{
char n2_1; // di
char n3_1; // bl
int SocketInfo; // esi
int v10; // eax
unsigned int v11; // ecx
char v12; // al
int v13; // ecx
unsigned __int8 n2a_1; // al
_BYTE *v15; // esi
int v16; // eax
unsigned __int8 v17; // bl
int v18; // ecx
unsigned __int8 v19; // al
unsigned __int8 n0x12_1; // cl
int v21; // eax
int v22; // edx
int v23; // ecx
int v24; // eax
int v25; // ecx
int v26; // eax
int v27; // ecx
_BYTE *CpuCount_1; // esi
unsigned __int8 n2_2; // al
int v30; // ecx
char v31; // ah
unsigned __int8 *v32; // esi
unsigned __int8 n8; // cl
int v34; // edi
int v35; // eax
unsigned int v36; // edx
_BYTE *CpuCount_3; // ecx
unsigned __int8 n2_3; // al
int v39; // edx
unsigned __int8 n8_1; // al
int v41; // ecx
... [14699 chars total]
// Function: RmtFunc843D @ 0xffcc843d (0x1b4 bytes)
// Index: 1701/2560
__int16 __cdecl RmtFunc843D(unsigned __int8 *__return_address, int n2, int n3, char a4)
{
unsigned __int8 *__return_address_1; // ebp
int n2_1; // edi
int CpuCount; // edx
unsigned __int8 n3_1; // cl
unsigned __int8 v9; // bl
int v10; // esi
int v11; // eax
unsigned __int8 v12; // bh
char n3_2; // si
unsigned __int8 v14; // bl
__int16 v15; // di
__int16 *v16; // esi
int v17; // ebp
__int16 v18; // cx
unsigned __int16 v19; // dx
char v20; // [esp+13h] [ebp-35h]
unsigned __int8 v21; // [esp+14h] [ebp-34h]
int v22; // [esp+18h] [ebp-30h]
int v23; // [esp+1Ch] [ebp-2Ch]
unsigned __int8 v24; // [esp+20h] [ebp-28h]
int CpuCount_1; // [esp+24h] [ebp-24h]
int v26; // [esp+28h] [ebp-20h]
int v27; // [esp+2Ch] [ebp-1Ch]
int SocketInfo; // [esp+30h] [ebp-18h]
int v29; // [esp+34h] [ebp-14h]
__int16 v30[8]; // [esp+38h] [ebp-10h] BYREF
v22 = 0; /*0xffcc8440*/
__return_address_1 = __return_address; /*0xffcc8447*/
n2_1 = n2; /*0xffcc844d*/
v20 = 0; /*0xffcc8453*/
SocketInfo = GetSocketInfo((int)__return_address, n2); /*0xffcc8466*/
CpuCount = GetCpuCount((int)__return_address, n2, n3); /*0xffcc846f*/
n3_1 = n3; /*0xffcc8471*/
CpuCount_1 = CpuCount; /*0xffcc847f*/
v29 = 7688 * (unsigned __int8)n3; /*0xffcc8483*/
if ( *(_BYTE *)(v29 + SocketInfo + 3) < 2u ) /*0xffcc848d*/
return 0; /*0xffcc848f*/
v9 = 0; /*0xffcc8496*/
v21 = 0; /*0xffcc8498*/
do
{
v10 = 1379 * v9; /*0xffcc84a7*/
v27 = v10; /*0xffcc84ad*/
if ( *(_BYTE *)(v10 + CpuCount) )
{
v11 = KtiFunc91AF((int)__return_address_1, n2_1, n3_1, v21); /*0xffcc84c2*/
CpuCount = CpuCount_1; /*0xffcc84c7*/
v12 = 0; /*0xffcc84cb*/
v26 = v11; /*0xffcc84d0*/
v24 = 0; /*0xffcc84d9*/
v20 = a4 == 1 ? 0 : v20;
if ( *(_BYTE *)(v10 + CpuCount_1 + 19) ) /*0xffcc84e6*/
{
n3_2 = n3; /*0xffcc84f0*/
v14 = v20; /*0xffcc84f4*/
do /*0xffcc85ba*/
{
if ( !KtiFunc89E9((int)__return_address_1, n2_1, n3_2, v21, v24, 0) ) /*0xffcc8505*/
{
v23 = v14; /*0xffcc8520*/
MailBoxFunc5B6A(__return_address_1, n2_1, n3, *(_BYTE *)(242 * v12 + v26 + 4), 2, &v30[v14]); /*0xffcc853f*/
if ( v14 ) /*0xffcc8549*/
{
v15 = v30[v14]; /*0xffcc854b*/
v16 = v30; /*0xffcc854e*/
v17 = v22; /*0xffcc8552*/
do /*0xffcc8594*/
{
v18 = *v16; /*0xffcc8556*/
if ( v15 <= *v16 ) /*0xffcc855c*/
v19 = v18 - v15; /*0xffcc8569*/
else
v19 = v15 - v18; /*0xffcc8562*/
if ( v19 > 128 - v19 ) /*0xffcc8578*/
v19 = 128 - v19; /*0xffcc8581*/
if ( v19 > (unsigned __int16)v17 ) /*0xffcc8587*/
v17 = v19; /*0xffcc8589*/
++v16; /*0xffcc858c*/
--v23; /*0xffcc858f*/
}
while ( v23 ); /*0xffcc8594*/
n2_1 = n2; /*0xffcc8596*/
v22 = v17; /*0xffcc859a*/
__return_address_1 = __return_address; /*0xffcc859e*/
}
n3_2 = n3; /*0xffcc85a2*/
++v14; /*0xffcc85a6*/
}
++v12; /*0xffcc85ac*/
CpuCount = CpuCount_1; /*0xffcc85ae*/
v24 = v12; /*0xffcc85b2*/
}
while ( v12 < *(_BYTE *)(v27 + CpuCount_1 + 19) ); /*0xffcc85ba*/
v20 = v14; /*0xffcc85c0*/
v9 = v21; /*0xffcc85c4*/
}
n3_1 = n3; /*0xffcc85c8*/
}
v21 = ++v9; /*0xffcc85d6*/
}
while ( v9 < *(_BYTE *)(v29 + SocketInfo + 3) );
return v22; /*0xffcc85e9*/
}
// Function: RmtFunc85F1 @ 0xffcc85f1 (0xd2 bytes)
// Index: 1702/2560
bool __cdecl RmtFunc85F1(unsigned __int8 *__return_address, unsigned int n2, unsigned int n3, _BYTE *a4, char a5)
{
char v5; // ah
char v6; // al
bool result; // al
_BYTE v8[4]; // [esp+10h] [ebp-10h] BYREF
unsigned int v9; // [esp+14h] [ebp-Ch] BYREF
unsigned int v10; // [esp+18h] [ebp-8h] BYREF
unsigned int v11; // [esp+1Ch] [ebp-4h] BYREF
RmtFunc7D43(__return_address, n2, n3, &v9, &v10, &v11, a5); /*0xffcc861a*/
*a4 = v9; /*0xffcc862b*/
a4[1] = v10; /*0xffcc8632*/
a4[2] = v11; /*0xffcc863b*/
a4[3] = RmtFunc7A01(__return_address, n2, n3, 1, 0); /*0xffcc864a*/
a4[4] = RmtFunc7A01(__return_address, n2, n3, 2, 1); /*0xffcc8655*/
a4[5] = RmtFunc770C((int)__return_address, n2, n3, 1, 0); /*0xffcc866b*/
a4[6] = RmtFunc770C((int)__return_address, n2, n3, 2, 1); /*0xffcc8673*/
MailBoxFuncA2EA(__return_address, n2, n3, v8); /*0xffcc867e*/
v5 = v8[1]; /*0xffcc8683*/
a4[7] = v8[0]; /*0xffcc8689*/
a4[9] = v8[2]; /*0xffcc8691*/
v6 = v8[3]; /*0xffcc8694*/
a4[8] = v5; /*0xffcc869a*/
a4[10] = v6; /*0xffcc869d*/
a4[11] = RmtFunc7D23((int)__return_address, n2, n3, 1); /*0xffcc86a8*/
result = RmtFunc7D23((int)__return_address, n2, n3, 2); /*0xffcc86b0*/
a4[12] = result; /*0xffcc86b8*/
return result; /*0xffcc86bb*/
}
// Function: RmtFunc86C3 @ 0xffcc86c3 (0xbd bytes)
// Index: 1703/2560
char __cdecl RmtFunc86C3(_BYTE *__return_address, unsigned __int8 n2, unsigned __int8 n3)
{
int SocketInfo; // ebp
unsigned __int16 n0x4B0; // cx
int n62400; // esi
unsigned int v6; // esi
unsigned int p_n4_1; // ecx
unsigned int p_n4; // [esp+Ch] [ebp-4h] BYREF
p_n4 = 4; /*0xffcc86d1*/
SocketInfo = GetSocketInfo((int)__return_address, n2); /*0xffcc86e6*/
if ( *(_WORD *)(__return_address + 257315) == 11 )
{
p_n4_1 = p_n4; /*0xffcc874a*/
}
else
{
n0x4B0 = *(_WORD *)&__return_address[48704 * n2 + 258695]; /*0xffcc86fb*/
if ( n0x4B0 > 0x320u )
n62400 = n0x4B0 < 0x4B0u ? 53450 : 49900;
else
n62400 = 62400; /*0xffcc8708*/
v6 = KtiFuncC0FC((int)__return_address) + n62400; /*0xffcc872e*/
p_n4_1 = (unsigned __int8)(v6 / KtiFuncC0FC((int)__return_address)); /*0xffcc8741*/
p_n4 = p_n4_1; /*0xffcc8744*/
}
p_n4 = *(unsigned __int8 *)(7688 * n3 + SocketInfo + 7389) + p_n4_1; /*0xffcc876b*/
KtiFuncA04A(__return_address, 13, &p_n4); /*0xffcc876f*/
return p_n4; /*0xffcc877b*/
}
// Function: RmtFunc8780 @ 0xffcc8780 (0x3d0 bytes)
// Index: 1704/2560
int __cdecl RmtFunc8780(unsigned __int8 *n6, int n4, int n6a)
{
unsigned __int8 *n6_1; // esi
int n4_1; // edi
int n6a_1; // ebx
int n45; // ebp
unsigned __int8 v7; // al
int SocketInfo_1; // ecx
int v9; // edx
int CpuCount_1; // ebp
int n2_1; // ebp
unsigned __int8 n8_1; // al
int v13; // ecx
int v14; // edx
int v15; // ebp
int v16; // ecx
int v17; // edi
int v18; // esi
char v19; // al
int v20; // edi
int v21; // esi
int v22; // eax
int v23; // ecx
int SocketInfo_2; // edx
int v25; // ecx
int v26; // ebx
int v27; // esi
char v28; // al
int v29; // ecx
int v30; // edx
char v32[4]; // [esp+10h] [ebp-48h] BYREF
char v33[4]; // [esp+14h] [ebp-44h] BYREF
char v34[4]; // [esp+18h] [ebp-40h] BYREF
char v35[4]; // [esp+1Ch] [ebp-3Ch] BYREF
int n8; // [esp+20h] [ebp-38h]
unsigned __int8 v37[4]; // [esp+24h] [ebp-34h]
unsigned __int16 p_n60[2]; // [esp+28h] [ebp-30h] BYREF
int SocketInfo; // [esp+2Ch] [ebp-2Ch]
int v40; // [esp+30h] [ebp-28h]
int v41; // [esp+34h] [ebp-24h]
int CpuCount; // [esp+38h] [ebp-20h]
int n4a; // [esp+3Ch] [ebp-1Ch]
int v44; // [esp+40h] [ebp-18h]
int v45; // [esp+44h] [ebp-14h]
int v46; // [esp+48h] [ebp-10h]
char n2[4]; // [esp+4Ch] [ebp-Ch]
int v48; // [esp+50h] [ebp-8h]
int n6a_2; // [esp+54h] [ebp-4h]
*(_DWORD *)p_n60 = 0; /*0xffcc8783*/
n6_1 = n6; /*0xffcc878b*/
n4_1 = n4; /*0xffcc8790*/
n6a_1 = n6a; /*0xffcc879b*/
SocketInfo = GetSocketInfo((int)n6, n4); /*0xffcc87a2*/
CpuCount = GetCpuCount((int)n6, n4, n6a); /*0xffcc87b0*/
DebugPrint((int)n6, 2, n4, n6a, 255, 255, 255, 255, "Restore Timings\n"); /*0xffcc87c2*/
MailBoxFuncB782(n6, n4, n6a); /*0xffcc87ca*/
MailBoxFunc6596(n6, n4, n6a, 40, 12, (__int16 *)p_n60, (unsigned __int16 *)v33, (unsigned __int16 *)v32); /*0xffcc87e8*/
*(_DWORD *)n2 = 4; /*0xffcc87f0*/
n45 = 45; /*0xffcc87fa*/
do /*0xffcc881e*/
{
MailBoxFunc6CF5(n6, n4, n6a, n45++, 12, (__int16 *)p_n60, (unsigned __int16 *)v35, (unsigned __int16 *)v34); /*0xffcc8810*/
--*(_DWORD *)n2; /*0xffcc8819*/
}
while ( *(_DWORD *)n2 ); /*0xffcc881e*/
n2[0] = 0; /*0xffcc8820*/
do /*0xffcc8847*/
MailBoxFunc5B6A(n6, n4, n6a, n2[0]++, 12, (__int16 *)p_n60); /*0xffcc8833*/
while ( n2[0] < 4u ); /*0xffcc8847*/
v7 = 0; /*0xffcc884c*/
n6a_2 = (unsigned __int8)n6a; /*0xffcc884e*/
n2[0] = 0; /*0xffcc8858*/
v46 = 7688 * (unsigned __int8)n6a; /*0xffcc885c*/
SocketInfo_1 = SocketInfo; /*0xffcc8860*/
v9 = v46; /*0xffcc8864*/
if ( *(_BYTE *)(v46 + SocketInfo + 3) ) /*0xffcc8868*/
{
CpuCount_1 = CpuCount; /*0xffcc8872*/
do /*0xffcc887f*/
{
v45 = 1379 * v7; /*0xffcc887f*/
if ( *(_BYTE *)(v45 + CpuCount_1) ) /*0xffcc8883*/
{
n2_1 = *(_DWORD *)n2; /*0xffcc888d*/
v41 = KtiFunc91DE((int)n6_1, n4_1, n6a_1, n2[0]); /*0xffcc88a1*/
v37[0] = 0; /*0xffcc88a9*/
if ( *(_BYTE *)(v45 + CpuCount + 19) ) /*0xffcc88ae*/
{
while ( 1 ) /*0xffcc88c3*/
{
n8_1 = KtiFunc89E9((int)n6_1, n4_1, n6a_1, n2_1, v37[0], 0); /*0xffcc88c3*/
if ( !n8_1 ) /*0xffcc88cd*/
break; /*0xffcc88cd*/
LABEL_22:
if ( ++v37[0] >= *(_BYTE *)(v45 + CpuCount + 19) ) /*0xffcc8b17*/
goto LABEL_23; /*0xffcc8b17*/
}
v13 = 0; /*0xffcc88d3*/
LOBYTE(n8) = 0; /*0xffcc88d5*/
v40 = 0; /*0xffcc88d9*/
while ( 2 ) /*0xffcc88f0*/
{
if ( n6_1[257312] || n8_1 != 8 && n8_1 != 17 ) /*0xffcc88f0*/
{
SmbusInit(n6_1, n4_1, n6a_1, n2_1, *(int *)v37, n8, 0, 0, 22, 12, p_n60); /*0xffcc890f*/
MrcHooksChipServices(n6_1, n4_1, n6a_1, n2_1, *(int *)v37, n8, 0, 0, 1, 12, p_n60); /*0xffcc892d*/
MailBoxFunc71F(n6_1, n4_1, n6a_1, n2_1, *(int *)v37, n8, 0, 0, 5, 12, p_n60); /*0xffcc894e*/
LOBYTE(n4a) = 0; /*0xffcc8956*/
do /*0xffcc89ad*/
{
ProcCommonFuncFB38(n6_1, n4_1, n6a_1, n2_1, *(int *)v37, n8, n4a, 0, 38, 12, p_n60); /*0xffcc8976*/
ProcCommonFuncFB38(n6_1, n4_1, n6a_1, n2_1, *(int *)v37, n8, n4a, 0, 39, 12, p_n60); /*0xffcc8996*/
LOBYTE(n4a) = n4a + 1; /*0xffcc89a7*/
}
while ( (unsigned __int8)n4a < 4u ); /*0xffcc89ad*/
nullsub_5(); /*0xffcc89c0*/
MailBoxFuncC3AF(n6_1, n4_1, n6a_1, n2_1, v37[0], n8); /*0xffcc89d1*/
if ( ProcCommonFunc24FA((int)n6_1, n4_1, n6a_1, n2_1) ) /*0xffcc89da*/
{
v14 = v37[0]; /*0xffcc89ea*/
v15 = v41; /*0xffcc89f3*/
v16 = 242 * v37[0]; /*0xffcc89f7*/
v48 = v46 + v45 + v40 + v16; /*0xffcc8a0e*/
v17 = v48; /*0xffcc8a12*/
v44 = v40 + 244 * v37[0]; /*0xffcc8a1c*/
v18 = v44; /*0xffcc8a20*/
*(_BYTE *)(v44 + v41 + 154) = *(_BYTE *)(v48 + SocketInfo + 772); /*0xffcc8a2d*/
*(_BYTE *)(v18 + v15 + 172) = *(_BYTE *)(v17 + SocketInfo + 790); /*0xffcc8a3f*/
*(_BYTE *)(v18 + v15 + 190) = *(_BYTE *)(v17 + SocketInfo + 808); /*0xffcc8a51*/
v19 = *(_BYTE *)(v17 + SocketInfo + 826); /*0xffcc8a5c*/
v20 = v18; /*0xffcc8a63*/
v21 = v15; /*0xffcc8a65*/
n2_1 = *(_DWORD *)n2; /*0xffcc8a67*/
*(_BYTE *)(v20 + v21 + 208) = v19; /*0xffcc8a6b*/
n4_1 = n4; /*0xffcc8a7a*/
v22 = v16 + 700 + 4 * (v40 + 1922 * n6a_2); /*0xffcc8a82*/
v23 = 61 * v14; /*0xffcc8a85*/
SocketInfo_2 = SocketInfo; /*0xffcc8a8c*/
*(_DWORD *)(v21 + 4 * (v40 + v23) + 82) = *(_DWORD *)(v45 + v22 + SocketInfo); /*0xffcc8a97*/
n8_1 = n8; /*0xffcc8a9b*/
n6_1 = n6; /*0xffcc8a9f*/
if ( (unsigned __int8)n8 < 9u ) /*0xffcc8aa5*/
{
v25 = v48; /*0xffcc8aa7*/
v26 = v44; /*0xffcc8aab*/
v27 = v41; /*0xffcc8aaf*/
*(_BYTE *)(v44 + v41 + 226) = *(_BYTE *)(v48 + SocketInfo_2 + 844); /*0xffcc8aba*/
*(_BYTE *)(v26 + v27 + 235) = *(_BYTE *)(v25 + SocketInfo_2 + 853); /*0xffcc8ac8*/
v28 = *(_BYTE *)(v25 + SocketInfo_2 + 682); /*0xffcc8acf*/
v29 = v26; /*0xffcc8ad6*/
n6a_1 = n6a; /*0xffcc8ad8*/
v30 = v27; /*0xffcc8adc*/
n6_1 = n6; /*0xffcc8ade*/
*(_BYTE *)(v29 + v30 + 64) = v28; /*0xffcc8ae2*/
goto LABEL_19; /*0xffcc8ae2*/
}
}
else
{
LABEL_19:
n8_1 = n8; /*0xffcc8ae6*/
}
v13 = v40; /*0xffcc8aea*/
}
++n8_1; /*0xffcc8aee*/
++v13; /*0xffcc8af0*/
LOBYTE(n8) = n8_1; /*0xffcc8af1*/
v40 = v13; /*0xffcc8af5*/
if ( n8_1 >= 0x12u ) /*0xffcc8afb*/
goto LABEL_22; /*0xffcc8afb*/
continue; /*0xffcc8afb*/
}
}
LABEL_23:
CpuCount_1 = CpuCount; /*0xffcc8b1d*/
v9 = v46; /*0xffcc8b21*/
SocketInfo_1 = SocketInfo; /*0xffcc8b25*/
}
v7 = n2[0] + 1; /*0xffcc8b2d*/
n2[0] = v7; /*0xffcc8b2f*/
}
while ( v7 < *(_BYTE *)(v9 + SocketInfo_1 + 3) ); /*0xffcc887f*/
}
return MailBoxFuncB2FE(n6_1, n4_1, n6a_1); /*0xffcc8b48*/
}
// Function: RmtFunc8B50 @ 0xffcc8b50 (0x1e bytes)
// Index: 1705/2560
_BYTE *__cdecl RmtFunc8B50(_BYTE *a1, char *a2)
{
_BYTE *result; // eax
char i; // dl
result = a1; /*0xffcc8b54*/
for ( i = *a2; i; i = result[a2 - a1] ) /*0xffcc8b58*/
*result++ = i; /*0xffcc8b60*/
*result = 0; /*0xffcc8b6a*/
return result; /*0xffcc8b6d*/
}
// Function: RmtFunc8B6E @ 0xffcc8b6e (0x12 bytes)
// Index: 1706/2560
int __cdecl RmtFunc8B6E(_BYTE *a1)
{
int result; // eax
result = 0; /*0xffcc8b72*/
if ( *a1 ) /*0xffcc8b74*/
{
do /*0xffcc8b79*/
++result; /*0xffcc8b78*/
while ( a1[result] ); /*0xffcc8b79*/
}
return result; /*0xffcc8b7f*/
}
// Function: RmtFunc8B80 @ 0xffcc8b80 (0x1c bytes)
// Index: 1707/2560
char __cdecl RmtFunc8B80(int a1)
{
unsigned __int8 v1; // cl
v1 = 0; /*0xffcc8b84*/
while ( *(_DWORD *)(a1 + 4 * v1) == -1 ) /*0xffcc8b8d*/
{
if ( ++v1 >= 2u ) /*0xffcc8b94*/
return 1; /*0xffcc8b98*/
}
return 0; /*0xffcc8b98*/
}
// Function: RmtFunc8B9C @ 0xffcc8b9c (0x32 bytes)
// Index: 1708/2560
char __cdecl RmtFunc8B9C(int __return_address, _BYTE *a2)
{
unsigned __int8 n8; // cl
n8 = 0; /*0xffcc8ba0*/
while ( !*(_BYTE *)(__return_address + 257312) && n8 == 8 || a2[n8] == 0xFF ) /*0xffcc8bbd*/
{
if ( ++n8 >= 9u ) /*0xffcc8bc4*/
return 0; /*0xffcc8bc9*/
}
return 1; /*0xffcc8bc8*/
}
// Function: RmtFunc8BCE @ 0xffcc8bce (0x6dd bytes)
// Index: 1709/2560
_BYTE *__cdecl RmtFunc8BCE(
unsigned __int8 *__return_address,
int n4,
_BYTE *n6,
int n2,
int n4a,
int a6,
char a7,
int a8,
int n40,
_BYTE *a10,
_BYTE *a11,
char n2_1,
int a13,
_WORD *a14,
_BYTE *a15)
{
_BYTE *v15; // edi
int n31; // edx
int v17; // ecx
unsigned int v18; // ebp
_BYTE *v19; // ecx
unsigned __int8 n9_3; // bl
_BYTE *v21; // edx
int CpuCount; // edx
int v24; // eax
unsigned int v25; // ebp
unsigned __int8 n9_1; // bl
_BYTE *v27; // ecx
unsigned int v28; // edx
_BYTE *v29; // ebp
unsigned int v30; // ecx
unsigned int v31; // eax
char n2_2; // dl
int n4_1; // eax
int v34; // eax
char v35; // cl
int n15; // eax
char n9_2; // al
unsigned __int8 n18_1; // cl
_BYTE *v39; // eax
_BYTE *v40; // ecx
int n127; // [esp-4h] [ebp-50h]
int n9; // [esp+10h] [ebp-3Ch]
unsigned __int8 n9a; // [esp+10h] [ebp-3Ch]
u... [11137 chars total]
// Function: RmtFunc92AB @ 0xffcc92ab (0xb8 bytes)
// Index: 1710/2560
char __cdecl RmtFunc92AB(__int16 __return_address, char n255, char n8, unsigned __int8 n255a, _BYTE *a5)
{
unsigned __int8 n255_1; // cl
int n255aa_1; // eax
unsigned __int8 n8_1; // bl
unsigned __int8 n8_2; // dl
unsigned __int8 n255a_1; // bh
int v10; // esi
int n8_4; // edi
int v12; // ebp
unsigned __int8 n8_3; // [esp+1h] [ebp-1h]
unsigned __int8 n255b; // [esp+Ah] [ebp+8h]
int n255aa; // [esp+12h] [ebp+10h]
n255_1 = n255; /*0xffcc92ac*/
if ( n255 == -1 ) /*0xffcc92b3*/
{
n255_1 = 0; /*0xffcc92b5*/
LOBYTE(n255aa_1) = 6; /*0xffcc92b7*/
}
else
{
LOBYTE(n255aa_1) = n255 + 1; /*0xffcc92bd*/
}
n8_1 = n8; /*0xffcc92c0*/
if ( n8 == -1 ) /*0xffcc92c7*/
{
n8_1 = 0; /*0xffcc92c9*/
n8_2 = 8; /*0xffcc92cb*/
n8 = 0; /*0xffcc92cd*/
}
else
{
n8_2 = n8 + 1; /*0xffcc92d3*/
}
n255a_1 = n255a; /*0xffcc92d6*/
n8_3 = n8_2; /*0xffcc92da*/
if ( n255a == 0xFF ) /*0xffcc92e1*/
{
n255a_1 = 0; /*0xffcc92e3*/
BYTE1(n255aa_1) = 9; /*0xffcc92e5*/
}
else
{
BYTE1(n255aa_1) = n255a + 1; /*0xffcc92eb*/
}
n255b = BYTE1(n255aa_1); /*0xffcc92ed*/
if ( n255_1 < (unsigned __int8)n255aa_1 ) /*0xffcc92f3*/
{
v10 = 8 * n255_1; /*0xffcc92fa*/
n255aa_1 = (unsigned __int8)(n255aa_1 - n255_1); /*0xffcc92ff*/
n255aa = (unsigned __int8)n255aa_1; /*0xffcc9303*/
do /*0xffcc935b*/
{
if ( n8_1 < n8_2 ) /*0xffcc9309*/
{
n8_4 = n8_1; /*0xffcc930d*/
v12 = (unsigned __int8)(n8_2 - n8_1); /*0xffcc9316*/
do /*0xffcc9343*/
{
if ( n255a_1 < n255b ) /*0xffcc931b*/
KtiFunc7D83(&a5[9 * v10 + 9 * n8_4 + n255a_1], 0, (unsigned __int8)(n255b - n255a_1)); /*0xffcc9337*/
++n8_4; /*0xffcc933f*/
--v12; /*0xffcc9340*/
}
while ( v12 ); /*0xffcc9343*/
n8_1 = n8; /*0xffcc9345*/
n8_2 = n8_3; /*0xffcc9349*/
n255aa_1 = n255aa; /*0xffcc934d*/
}
v10 += 8; /*0xffcc9351*/
n255aa = --n255aa_1; /*0xffcc9357*/
}
while ( n255aa_1 ); /*0xffcc935b*/
}
return n255aa_1; /*0xffcc9362*/
}
// Function: RmtFunc9363 @ 0xffcc9363 (0xb1 bytes)
// Index: 1711/2560
int __cdecl RmtFunc9363(int a1, unsigned __int8 a2, int a3)
{
unsigned __int8 n6; // bh
int v4; // esi
unsigned __int8 n2; // bl
int v6; // eax
unsigned __int8 n4; // cl
unsigned __int8 *v8; // edx
int v9; // edi
int result; // eax
bool v11; // zf
int v12; // [esp+10h] [ebp-10h]
int n72; // [esp+14h] [ebp-Ch]
unsigned __int8 v14; // [esp+18h] [ebp-8h]
unsigned __int8 n6_1; // [esp+1Ch] [ebp-4h]
n6 = 0; /*0xffcc9369*/
v4 = 0; /*0xffcc936b*/
n6_1 = 0; /*0xffcc936e*/
v12 = 0; /*0xffcc9372*/
do /*0xffcc9406*/
{
n2 = 0; /*0xffcc9376*/
v14 = 0; /*0xffcc9378*/
do /*0xffcc93f4*/
{
v6 = KtiFunc91AF(a1, a2, n6_1, v14); /*0xffcc938c*/
n4 = 0; /*0xffcc9394*/
v8 = (unsigned __int8 *)(v6 + 1); /*0xffcc9396*/
do /*0xffcc93e9*/
{
v9 = 0; /*0xffcc93a6*/
n72 = 72; /*0xffcc93a8*/
do /*0xffcc93dc*/
{
*(_WORD *)(a3 + 4 * (v9 + 72 * (v4 + *v8))) = 0; /*0xffcc93bc*/
result = v9 + 72 * (v12 + *v8); /*0xffcc93cb*/
++v9; /*0xffcc93cd*/
v11 = n72-- == 1; /*0xffcc93ce*/
*(_WORD *)(a3 + 4 * result + 2) = 0; /*0xffcc93d3*/
v4 = v12; /*0xffcc93d8*/
}
while ( !v11 ); /*0xffcc93dc*/
++n4; /*0xffcc93de*/
v8 += 242; /*0xffcc93e0*/
}
while ( n4 < 4u ); /*0xffcc93e9*/
v14 = ++n2; /*0xffcc93ed*/
}
while ( n2 < 2u ); /*0xffcc93f4*/
++n6; /*0xffcc93f6*/
v4 = v12 + 8; /*0xffcc93f8*/
n6_1 = n6; /*0xffcc93fb*/
v12 += 8; /*0xffcc93ff*/
}
while ( n6 < 6u ); /*0xffcc9406*/
return result; /*0xffcc940c*/
}
// Function: RmtFunc9414 @ 0xffcc9414 (0x93 bytes)
// Index: 1712/2560
int __cdecl RmtFunc9414(int a1, unsigned __int8 a2, int a3)
{
unsigned __int8 n6; // bh
int v4; // esi
unsigned __int8 n2; // bl
int v6; // eax
unsigned __int8 n4; // cl
unsigned __int8 *v8; // edx
int v9; // edi
int n9; // ebp
int result; // eax
unsigned __int8 v12; // [esp+10h] [ebp-Ch]
unsigned __int8 n6_1; // [esp+14h] [ebp-8h]
int v14; // [esp+18h] [ebp-4h]
n6 = 0; /*0xffcc941a*/
v4 = 0; /*0xffcc941c*/
n6_1 = 0; /*0xffcc941f*/
v14 = 0; /*0xffcc9423*/
do /*0xffcc949d*/
{
n2 = 0; /*0xffcc9427*/
v12 = 0; /*0xffcc9429*/
do /*0xffcc948b*/
{
v6 = KtiFunc91AF(a1, a2, n6_1, v12); /*0xffcc943d*/
n4 = 0; /*0xffcc9445*/
v8 = (unsigned __int8 *)(v6 + 1); /*0xffcc9447*/
do /*0xffcc9480*/
{
v9 = 0; /*0xffcc9456*/
n9 = 9; /*0xffcc9458*/
do /*0xffcc9473*/
{
result = v9 + 9 * (v4 + *v8); /*0xffcc9465*/
++v9; /*0xffcc9467*/
*(_BYTE *)(result + a3) = 0; /*0xffcc9468*/
v4 = v14; /*0xffcc946c*/
--n9; /*0xffcc9470*/
}
while ( n9 ); /*0xffcc9473*/
++n4; /*0xffcc9475*/
v8 += 242; /*0xffcc9477*/
}
while ( n4 < 4u ); /*0xffcc9480*/
v12 = ++n2; /*0xffcc9484*/
}
while ( n2 < 2u ); /*0xffcc948b*/
++n6; /*0xffcc948d*/
v4 = v14 + 8; /*0xffcc948f*/
n6_1 = n6; /*0xffcc9492*/
v14 += 8; /*0xffcc9496*/
}
while ( n6 < 6u ); /*0xffcc949d*/
return result; /*0xffcc949f*/
}
// Function: RmtFunc94A7 @ 0xffcc94a7 (0x652 bytes)
// Index: 1713/2560
unsigned __int8 __cdecl RmtFunc94A7(_BYTE *a1, int a2, int a3, int n23, int a5)
{
__int16 n47_1; // di
unsigned __int8 n6; // al
int n23_1; // ebp
int SocketInfo; // ecx
int CpuCount; // eax
unsigned __int8 n2; // cl
_BYTE *v11; // ebx
int v12; // ebx
char v13; // cl
int v14; // eax
int n47_3; // ebp
unsigned __int8 i; // dl
int v17; // ecx
unsigned __int8 n0x3F; // al
int v19; // ebx
int v20; // eax
unsigned __int8 v21; // bh
unsigned __int8 v22; // cl
int v23; // ebp
unsigned int v24; // eax
unsigned __int8 v25; // bl
unsigned __int8 v26; // bl
__int16 n47; // [esp-Ch] [ebp-4Ch]
const char *Rx_DqsP_n; // [esp-Ch] [ebp-4Ch]
unsigned __int8 n0x3F_1; // [esp+Bh] [ebp-35h]
int n2_1; // [esp+Ch] [ebp-34h]
int v31; // [esp+10h] [ebp-30h]
__int16 n47_5; // [esp+14h] [ebp-2Ch]
__int16 n47_2; // [esp+18h] [ebp-28h]
int v34; // [esp+1Ch] [ebp-24h]
unsigned __int8 v35[4]; // [esp+20h] [ebp-20h]
unsigned __int8 v36; // [esp+24h] [eb... [13332 chars total]
// Function: RmtFunc9AF9 @ 0xffcc9af9 (0x250 bytes)
// Index: 1714/2560
char __cdecl RmtFunc9AF9(_BYTE *n6, int n4, int n6a, int n2, int a5, __int16 *a6, int n22)
{
int CpuCount; // eax
unsigned __int8 v8; // cl
unsigned __int8 v9; // bl
int v10; // ebp
unsigned int v11; // eax
unsigned __int8 v12; // bh
unsigned __int8 v13; // bh
int v15; // [esp+8h] [ebp-10h]
unsigned __int8 v16; // [esp+Ch] [ebp-Ch]
int v17; // [esp+10h] [ebp-8h]
int v18; // [esp+14h] [ebp-4h]
LOBYTE(CpuCount) = ProcCommonFuncFB4A((int)n6, 0xAu); /*0xffcc9b04*/
if ( (_BYTE)CpuCount ) /*0xffcc9b0d*/
{
CpuCount = GetCpuCount((int)n6, n4, n6a); /*0xffcc9b20*/
if ( *(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount) ) /*0xffcc9b35*/
{
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc9b53*/
switch ( n22 ) /*0xffcc9b62*/
{
case 1: /*0xffcc9b62*/
DebugPrint((int)n6, 10, n4, n6a, n2, a5, 255, 255, "RxDqs"); /*0xffcc9b69*/
break;
case 3: /*0xffcc9b62*/
DebugPrint((int)n6, 10, n4, n6a, n2, a5, 255, 255, "RxDqsP"); /*0xffcc9b75*/
break;
case 4: /*0xffcc9b62*/
DebugPrint((int)n6, 10, n4, n6a, n2, a5, 255, 255, "RxDqsN"); /*0xffcc9b81*/
break;
case 22: /*0xffcc9b62*/
DebugPrint((int)n6, 10, n4, n6a, n2, a5, 255, 255, "TxDq"); /*0xffcc9b8d*/
break;
case 5: /*0xffcc9b62*/
DebugPrint((int)n6, 10, n4, n6a, n2, a5, 255, 255, "RxVref"); /*0xffcc9b99*/
break;
case 23: /*0xffcc9b62*/
DebugPrint((int)n6, 10, n4, n6a, n2, a5, 255, 255, "TxVref"); /*0xffcc9bb4*/
break;
}
LogDebugString(n6, (int)" - Per bit margins\n"); /*0xffcc9bc2*/
v8 = 8 * (n6[257312] != 0) + 64; /*0xffcc9bd8*/
v17 = v8; /*0xffcc9be4*/
v9 = 0; /*0xffcc9beb*/
v10 = v8 >> 1; /*0xffcc9bef*/
v16 = v8; /*0xffcc9bf4*/
v18 = v10; /*0xffcc9bf8*/
v15 = 72 * (unsigned __int8)n6a; /*0xffcc9bfc*/
do /*0xffcc9d25*/
{
if ( !v9 || v9 == v8 >> 1 ) /*0xffcc9c0a*/
{
v11 = v9; /*0xffcc9c0c*/
v12 = v9; /*0xffcc9c0f*/
while ( v11 < (unsigned int)v9 + v10 ) /*0xffcc9c39*/
{
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, " %2d", v11); /*0xffcc9c2a*/
v11 = ++v12; /*0xffcc9c34*/
}
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc9c4e*/
}
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, " %3d", a6[2 * v9 + 1 + 2 * v15]); /*0xffcc9c7c*/
if ( v9 == v10 - 1 || v9 == v17 - 1 ) /*0xffcc9c92*/
{
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc9cab*/
v13 = v9 - (v16 >> 1) + 1; /*0xffcc9cbd*/
if ( v13 <= v9 ) /*0xffcc9cc1*/
{
do /*0xffcc9cf5*/
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, " %3d", a6[2 * v15 + 2 * v13++]); /*0xffcc9ce9*/
while ( v13 <= v9 ); /*0xffcc9cf5*/
v10 = v18; /*0xffcc9cf7*/
}
DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\n\n"); /*0xffcc9d0e*/
}
v8 = v16; /*0xffcc9d1d*/
++v9; /*0xffcc9d21*/
}
while ( v9 < v16 ); /*0xffcc9d25*/
LOBYTE(CpuCount) = DebugPrint((int)n6, 10, 255, 255, 255, 255, 255, 255, "\n"); /*0xffcc9d39*/
}
}
return CpuCount; /*0xffcc9d44*/
}
// Function: RmtPatternGen @ 0xffcc9d49 (0xa7e bytes)
// Index: 1715/2560
int RmtPatternGen(
_BYTE *__return_address,
char n4,
char n2,
unsigned __int8 n4a,
char a5,
unsigned __int16 *a6,
int a7,
char n5,
unsigned int n23,
int a10,
int a11,
unsigned __int8 *n6,
unsigned int *a13,
int a14,
int a15,
_WORD *a16,
int a17,
unsigned __int8 n2_7,
...)
{
_BYTE *__return_address_1; // ebp
int v19; // ebx
char n4_1; // si
int n2_6; // eax
unsigned int *n2_8; // ecx
_BYTE *n2_10; // edi
int n6_1; // eax
char v25; // cl
unsigned int *v26; // edx
unsigned __int8 n6_5; // dl
unsigned int *v28; // edi
_BYTE *n2_11; // ecx
int v30; // ecx
unsigned int *v31; // edx
unsigned __int8 n6_7; // al
int v33; // edi
int v34; // eax
unsigned __int16 *v35; // edi
int v36; // edx
int v37; // ecx
unsigned int *v38; // edx
unsigned __int8 n6_11; // al
int *v40; // edi
int v41; // eax
unsig... [20085 chars total]
// Function: RmtFuncA7C7 @ 0xffcca7c7 (0x3e4 bytes)
// Index: 1716/2560
char __cdecl RmtFuncA7C7(
int __return_address,
unsigned __int8 a2,
unsigned __int8 n6,
unsigned __int8 n2,
unsigned __int8 n4,
unsigned __int8 n8,
_DWORD *SocketInfo,
int a8,
__int16 a9,
char a10,
char a11,
int a12,
int a13,
_WORD *a14,
char n2a)
{
unsigned __int8 n6_1; // bl
int n6_6; // eax
unsigned __int8 n6_2; // ch
unsigned __int8 n2_1; // bh
unsigned __int8 n2_2; // dh
unsigned __int8 n8_1; // cl
int v21; // esi
unsigned __int8 n8_4; // bl
int v23; // ebp
unsigned __int8 *p_n8; // edi
int n8_5; // edx
unsigned __int8 n6_4; // bp
unsigned __int8 n2_4; // di
_WORD *v28; // eax
int n6_5; // ecx
__int16 v30; // dx
__int16 v31; // dx
int v32; // eax
int v33; // esi
int n8_6; // eax
int v35; // ecx
int v36; // esi
char v37; // cl
unsigned __int8 i; // dl
unsigned __int8 n2_5; // cl
unsigned __int8 n4_2; // bl
int v41; // eax
int v42; // edi
unsigned __int8 *p_n8_1; // esi
unsigned __int8 n2_3; // [esp+10h] [ebp-10h]
unsigned __int8 n6_3; // [esp+11h] [ebp-Fh]
unsigned __int8 n8_2; // [esp+12h] [ebp-Eh]
unsigned __int8 n4_1; // [esp+13h] [ebp-Dh]
unsigned __int8 n8_3; // [esp+14h] [ebp-Ch]
int v50; // [esp+18h] [ebp-8h]
int v51; // [esp+18h] [ebp-8h]
unsigned __int8 n8_7; // [esp+40h] [ebp+20h]
n6_1 = n6; /*0xffcca7cb*/
LOBYTE(n6_6) = 0; /*0xffcca7cf*/
n8_2 = 0; /*0xffcca7d1*/
if ( n6 == 0xFF ) /*0xffcca7db*/
{
n6_1 = 0; /*0xffcca7dd*/
n6_2 = 6; /*0xffcca7df*/
n6 = 0; /*0xffcca7e1*/
}
else
{
n6_2 = n6 + 1; /*0xffcca7e9*/
}
n2_1 = n2; /*0xffcca7eb*/
n6_3 = n6_2; /*0xffcca7ef*/
if ( n2 == 0xFF ) /*0xffcca7f6*/
{
n2_1 = 0; /*0xffcca7f8*/
n2_2 = 2; /*0xffcca7fa*/
n2 = 0; /*0xffcca7fc*/
}
else
{
n2_2 = n2 + 1; /*0xffcca804*/
}
n2_3 = n2_2; /*0xffcca80a*/
if ( n4 == 0xFF ) /*0xffcca811*/
{
n4 = 0; /*0xffcca813*/
n4_1 = 4; /*0xffcca817*/
}
else
{
n4_1 = n4 + 1; /*0xffcca820*/
}
n8_1 = n8; /*0xffcca824*/
if ( n8 == 0xFF ) /*0xffcca82b*/
{
n8 = 0; /*0xffcca82d*/
n8_3 = -1; /*0xffcca831*/
}
else
{
n8_2 = n8; /*0xffcca837*/
if ( n8 > 8u ) /*0xffcca83e*/
{
n8_1 = n8 - 9; /*0xffcca840*/
n8 -= 9; /*0xffcca843*/
}
n8_3 = n8_1; /*0xffcca847*/
}
if ( a8 ) /*0xffcca84f*/
{
if ( n6_1 < n6_2 ) /*0xffcca857*/
{
v21 = 8 * n6_1; /*0xffcca860*/
v50 = v21; /*0xffcca863*/
do /*0xffcca949*/
{
if ( n2_1 < n2_2 ) /*0xffcca869*/
{
n8_4 = n8; /*0xffcca86f*/
do /*0xffcca92c*/
{
n6_6 = KtiFunc91AF(__return_address, a2, n6, n2); /*0xffcca883*/
if ( n4 < n4_1 ) /*0xffcca895*/
{
v23 = (unsigned __int8)(n4_1 - n4); /*0xffcca8bd*/
p_n8 = (unsigned __int8 *)(242 * n4 + n6_6 + 1); /*0xffcca8bf*/
n4 = n4_1; /*0xffcca8c3*/
n8_5 = n8_4; /*0xffcca8c7*/
do /*0xffcca91a*/
{
n6_6 = n8_5 + 9 * (v21 + *p_n8); /*0xffcca8d9*/
v21 = v50; /*0xffcca8e2*/
n8_5 = n8_4; /*0xffcca8e6*/
if ( ((unsigned __int8)SocketInfo & *(_BYTE *)(n6_6 + a12)) != 0 && a11 ) /*0xffcca8ee*/
{
LOBYTE(n6_6) = RmtFuncF3CA(__return_address, n6, *p_n8, n8_3, SocketInfo, a13); /*0xffcca905*/
n8_5 = n8_4; /*0xffcca90a*/
}
p_n8 += 242; /*0xffcca911*/
--v23; /*0xffcca917*/
}
while ( v23 ); /*0xffcca91a*/
n8_4 = n8; /*0xffcca91c*/
}
n2_2 = n2_3; /*0xffcca920*/
n2 = ++n2_1; /*0xffcca926*/
}
while ( n2_1 < n2_3 ); /*0xffcca92c*/
n6_1 = n6; /*0xffcca932*/
n6_2 = n6_3; /*0xffcca936*/
}
++n6_1; /*0xffcca93a*/
v21 += 8; /*0xffcca93c*/
n6 = n6_1; /*0xffcca93f*/
v50 = v21; /*0xffcca943*/
}
while ( n6_1 < n6_2 ); /*0xffcca949*/
}
return n6_6; /*0xffcca949*/
}
n6_4 = n6; /*0xffcca95b*/
n2_4 = n2; /*0xffcca95f*/
if ( n2a ) /*0xffcca965*/
{
if ( n2a == 1 ) /*0xffcca98b*/
{
v28 = a14; /*0xffcca996*/
n6_5 = n6_1; /*0xffcca99a*/
if ( a10 ) /*0xffcca99d*/
{
v30 = a9 - 1; /*0xffcca99f*/
LABEL_55:
v28[2 * n6_5] = v30; /*0xffccaae7*/
goto LABEL_59; /*0xffccaaeb*/
}
v31 = a9 + 1; /*0xffcca9a5*/
LABEL_58:
v28[2 * n6_5 + 1] = v31; /*0xffccaaf4*/
goto LABEL_59; /*0xffccaaf4*/
}
if ( n2a == 2 ) /*0xffcca9ad*/
goto LABEL_59; /*0xffcca9ad*/
if ( n2a == 3 ) /*0xffcca9b5*/
{
v32 = KtiFunc91AF(__return_address, a2, n6, n2); /*0xffcca9c1*/
if ( a10 ) /*0xffcca9d4*/
{
v30 = a9 - 1; /*0xffcca9db*/
n6_5 = *(unsigned __int8 *)(242 * n4 + v32 + 1) + 8 * n6_1; /*0xffcca9ea*/
LABEL_54:
v28 = a14; /*0xffccaae3*/
goto LABEL_55; /*0xffccaae3*/
}
v31 = a9 + 1; /*0xffcca9f7*/
n6_5 = *(unsigned __int8 *)(242 * n4 + v32 + 1) + 8 * n6_1; /*0xffccaa06*/
}
else
{
if ( n2a == 4 ) /*0xffccaa10*/
{
v33 = *(unsigned __int8 *)(242 * n4 + KtiFunc91AF(__return_address, a2, n6, n2) + 1) + 8 * n6_1; /*0xffccaa3b*/
if ( ((unsigned __int8)SocketInfo & *(_BYTE *)(n8 + a13 + 9 * v33)) != 0 ) /*0xffccaa4d*/
goto LABEL_59; /*0xffccaa4d*/
n8_6 = n8_2; /*0xffccaa53*/
v35 = 18 * v33; /*0xffccaa58*/
}
else
{
if ( n2a != 5 ) /*0xffccaa5f*/
goto LABEL_59; /*0xffccaa5f*/
v36 = KtiFunc91AF(__return_address, a2, n6, n2); /*0xffccaa74*/
v37 = 0; /*0xffccaa7d*/
for ( i = (unsigned __int8)SocketInfo; i != 1; ++v37 ) /*0xffccaa83*/
i >>= 1; /*0xffccaa85*/
n8_7 = v37 + 8 * n8; /*0xffccaa97*/
v51 = *(unsigned __int8 *)(242 * n4 + v36 + 1) + 8 * n6_1; /*0xffccaab9*/
if ( ((unsigned __int8)(1 << v37) & *(_BYTE *)(n8 + a13 + 9 * v51)) != 0 ) /*0xffccaac9*/
goto LABEL_59; /*0xffccaac9*/
v35 = 72 * v51; /*0xffccaacb*/
n8_6 = n8_7; /*0xffccaad0*/
}
if ( a10 ) /*0xffccaade*/
{
v30 = a9 - 1; /*0xffccaae0*/
n6_5 = n8_6 + v35; /*0xffccaae1*/
goto LABEL_54; /*0xffccaae1*/
}
v31 = a9 + 1; /*0xffccaaed*/
n6_5 = n8_6 + v35; /*0xffccaaee*/
}
v28 = a14; /*0xffccaaf0*/
goto LABEL_58; /*0xffccaaf0*/
}
if ( a10 ) /*0xffcca974*/
*a14 = a9 - 1; /*0xffcca977*/
else
a14[1] = a9 + 1; /*0xffcca980*/
LABEL_59:
LOBYTE(n6_6) = n6_3; /*0xffccaaf9*/
if ( n6_1 < n6_3 ) /*0xffccaaff*/
{
n2_5 = n2_3; /*0xffccab05*/
while ( 1 ) /*0xffccab09*/
{
if ( n2_1 < n2_5 ) /*0xffccab0b*/
{
n4_2 = n4; /*0xffccab11*/
do /*0xffccab82*/
{
v41 = KtiFunc91AF(__return_address, a2, n6_4, n2_4); /*0xffccab1f*/
if ( n4_2 < n4_1 ) /*0xffccab2d*/
{
v42 = (unsigned __int8)(n4_1 - n4_2); /*0xffccab46*/
p_n8_1 = (unsigned __int8 *)(242 * n4_2 + v41 + 1); /*0xffccab48*/
n4_2 = n4_1; /*0xffccab4a*/
do /*0xffccab72*/
{
RmtFuncF3CA(__return_address, n6_4, *p_n8_1, n8_3, SocketInfo, a12); /*0xffccab61*/
p_n8_1 += 242; /*0xffccab69*/
--v42; /*0xffccab6f*/
}
while ( v42 ); /*0xffccab72*/
}
n2_4 = ++n2_1; /*0xffccab7a*/
}
while ( n2_1 < n2_3 ); /*0xffccab82*/
LOBYTE(n6_6) = n6_3; /*0xffccab84*/
n2_5 = n2_3; /*0xffccab88*/
n4 = n4_2; /*0xffccab8c*/
n6_1 = n6; /*0xffccab90*/
}
n6 = ++n6_1; /*0xffccab96*/
if ( n6_1 >= (unsigned __int8)n6_6 ) /*0xffccab9c*/
break; /*0xffccab9c*/
n6_4 = n6_1; /*0xffccaba2*/
}
}
return n6_6; /*0xffcca94f*/
}
// Function: RmtFuncABAB @ 0xffccabab (0x247 bytes)
// Index: 1717/2560
int __cdecl RmtFuncABAB(int __return_address, int n6, int n6a, int n2, int n4, int n40, __int16 a7, unsigned int a8)
{
int v8; // ebx
int n6a_1; // ebp
unsigned __int8 n6a_2; // dl
int v11; // ecx
int CpuCount; // ecx
int v13; // eax
char n4_1; // al
unsigned __int8 n6a_3; // al
int v16; // ecx
unsigned __int8 v17; // al
char v18; // al
char v19; // al
unsigned __int8 v20; // al
int v22; // [esp+14h] [ebp-14h]
int v23; // [esp+14h] [ebp-14h]
_BYTE *v24; // [esp+18h] [ebp-10h]
char v25; // [esp+1Ch] [ebp-Ch]
int v26; // [esp+20h] [ebp-8h]
int SocketInfo; // [esp+24h] [ebp-4h]
int v28; // [esp+24h] [ebp-4h]
v8 = 0; /*0xffccabb5*/
v25 = 0; /*0xffccabbe*/
n6a_1 = n6a; /*0xffccabc7*/
SocketInfo = GetSocketInfo(__return_address, n6); /*0xffccabcb*/
if ( n6a ) /*0xffccabd3*/
{
if ( *(_WORD *)(__return_address + 257315) == 11 ) /*0xffccabe1*/
{
n6a_2 = 0; /*0xffccabe7*/
v11 = 0; /*0xffccabe9*/
LOBYTE(n6a) = 0; /*0xffccabeb*/
v22 = 0; /*0xffccabf1*/
do /*0xffccac75*/
{
if ( ((1 << v11) & n6a_1) != 0 ) /*0xffccabfc*/
{
CpuCount = GetCpuCount(__return_address, n6, n6a); /*0xffccac0d*/
v13 = 1379 * (unsigned __int8)n2; /*0xffccac15*/
if ( *(_BYTE *)(v13 + CpuCount + 126) >= 2u ) /*0xffccac20*/
{
n4_1 = *(_BYTE *)(v13 + CpuCount + 121) & 7; /*0xffccac26*/
if ( n4_1 == 3 ) /*0xffccac2a*/
{
LOBYTE(v8) = 1; /*0xffccac2c*/
}
else if ( n4_1 == 4 || n4_1 == 5 ) /*0xffccac36*/
{
LOBYTE(v8) = 2; /*0xffccac38*/
}
DebugPrint(__return_address, 2, n6, n6a, n2, n4, 255, 255, "LRDIMM Device Size %d\n", (unsigned __int8)v8); /*0xffccac57*/
}
v11 = v22; /*0xffccac5f*/
n6a_2 = n6a; /*0xffccac63*/
}
++n6a_2; /*0xffccac67*/
++v11; /*0xffccac69*/
LOBYTE(n6a) = n6a_2; /*0xffccac6a*/
v22 = v11; /*0xffccac6e*/
}
while ( n6a_2 < 6u ); /*0xffccac75*/
}
n6a_3 = 0; /*0xffccac81*/
v16 = 0; /*0xffccac83*/
LOBYTE(n6a) = 0; /*0xffccac85*/
v23 = 0; /*0xffccac8f*/
v24 = (_BYTE *)(SocketInfo + 6262); /*0xffccac93*/
do /*0xffccadb7*/
{
v28 = 1 << v16; /*0xffccac9c*/
if ( ((1 << v16) & n6a_1) != 0 ) /*0xffccaca2*/
{
LOBYTE(v26) = KtiFunc88D1(__return_address, n6, n6a, n2, n4); /*0xffccacbb*/
if ( *v24 ) /*0xffccacc6*/
v25 = (unsigned __int8)n4 >> 1; /*0xffccacd1*/
if ( KtiFunc47AD(n40) || KtiFunc47DF(n40) ) /*0xffccace7*/
{
v19 = DdrTrainFunc338(a8); /*0xffccad4a*/
MailBoxFuncD4C5((unsigned __int8 *)__return_address, n6, v28, v26, 0, n40, 1, v19); /*0xffccad64*/
v20 = DdrTrainFunc338(a8); /*0xffccad6d*/
DebugPrint(__return_address, 2, 255, n6a, n2, n4, 255, 255, "CMD/CTL patternlength = %d\n", v20); /*0xffccad92*/
}
else
{
v17 = DdrTrainFunc338(a8); /*0xffccacf5*/
DebugPrint(__return_address, 2, 255, n6a, n2, n4, 255, 255, "RMT patternlength = %d\n", v17); /*0xffccad1a*/
v18 = DdrTrainFunc338(a8); /*0xffccad23*/
MailBoxFuncD4C5((unsigned __int8 *)__return_address, n6, v28, v26, v25, n40, 0, v18); /*0xffccad3f*/
}
v16 = v23; /*0xffccad97*/
n6a_3 = n6a; /*0xffccad9e*/
}
v24 += 7688; /*0xffccada2*/
++n6a_3; /*0xffccadaa*/
++v16; /*0xffccadac*/
LOBYTE(n6a) = n6a_3; /*0xffccadad*/
v23 = v16; /*0xffccadb1*/
}
while ( n6a_3 < 6u ); /*0xffccadb7*/
if ( (a7 & 0x1800) != 0 ) /*0xffccadc5*/
MailBoxFuncFB60(__return_address, n6, n6a_1, a7); /*0xffccadce*/
return MailBoxFuncD4AE(n6, __return_address, n6, n6a_1); /*0xffccade6*/
}
return v8; /*0xffccade8*/
}
// Function: RmtExecuteTest @ 0xffccadf2 (0x2013 bytes)
// Index: 1718/2560
int RmtExecuteTest(
unsigned __int8 *__return_address,
int n6,
int a3,
int n40,
int a5,
char n2,
int a7,
_WORD *a8,
unsigned int a9,
char a10,
unsigned __int8 a11,
unsigned __int8 a12,
int a13,
...)
{
unsigned __int8 *__return_address_1; // ebp
int n6_1; // ebx
unsigned __int8 *SocketInfo_9; // esi
char n2_8; // cl
int n40_1; // edi
unsigned __int8 n6a_1; // dl
int n107_2; // ecx
unsigned __int8 n2_4; // al
unsigned __int8 n6a_3; // dl
int v22; // ecx
_BYTE *n6a_2; // esi
bool v24; // al
int v25; // ecx
char v26; // al
unsigned __int8 *v27; // edx
unsigned __int8 n9_1; // cl
int v29; // eax
_BYTE *n107_3; // eax
char v31; // al
unsigned __int8 n9_2; // al
unsigned __int8 n8; // bl
_DWORD *v34; // esi
unsigned __int8 n6aa_1; // dl
int n107_4; // ecx
unsigned __int8 *SocketInfo_11; // eax
int n107_5; // ecx
unsigned __int8 *... [62723 chars total]
// Function: RmtFuncCE05 @ 0xffccce05 (0x506 bytes)
// Index: 1719/2560
char __cdecl RmtFuncCE05(
int __return_address,
unsigned __int8 n6,
unsigned __int8 n6a,
unsigned __int8 n2,
unsigned __int8 n4,
int a6,
int n40,
char a8,
_WORD *a9,
unsigned __int8 **p_SocketInfo)
{
int v10; // esi
int CpuCount; // ebp
char result; // al
int v13; // ecx
_WORD *v14; // eax
__int16 v15; // dx
unsigned __int8 n15_5; // cl
int v17; // ecx
__int16 v18; // si
int v19; // eax
unsigned __int8 n0x30; // al
__int16 n7_1; // dx
unsigned __int8 n0x30_1; // al
int v23; // eax
unsigned __int8 n0x30_2; // al
__int16 n7_3; // dx
unsigned __int8 n0x30_3; // al
int v27; // ecx
char v28; // al
int v29; // ecx
int v30; // eax
int v31; // eax
unsigned __int8 n15_6; // al
__int16 n15_3; // dx
unsigned __int8 n15_4; // al
__int16 n7_5; // [esp-4h] [ebp-18h]
__int16 n7_4; // [esp-4h] [ebp-18h]
__int16 n7; // [esp-4h] [ebp-18h]
__int16 n7_2; // [esp-4h] [ebp-18h]
__int16 n15; // [esp-4h] [ebp-18h]
__int16 n5; // [esp-4h] [ebp-18h]
__int16 n15_2; // [esp-4h] [ebp-18h]
__int16 n15_1; // [esp-4h] [ebp-18h]
v10 = KtiFunc91AF(__return_address, n6, n6a, n2); /*0xffccce25*/
CpuCount = GetCpuCount(__return_address, n6, n6a); /*0xffccce2c*/
result = 1; /*0xffccce37*/
if ( a6 != 1 )
{
switch ( n40 )
{
case 5:
v19 = 50813 * n6; /*0xffcccfb6*/
if ( a8 ) /*0xffcccfc1*/
{
n0x30 = *(_BYTE *)(v19 + __return_address + 10235); /*0xffcccfc3*/
if ( n0x30 && n0x30 < 0x30u ) /*0xffcccfd0*/
{
n7_1 = -(char)n0x30; /*0xffcccfd6*/
LABEL_39:
a9[8 * n6a + *(unsigned __int8 *)(242 * n4 + v10 + 1)] = n7_1; /*0xffcccff7*/
*(_BYTE *)p_SocketInfo = 48; /*0xffccd019*/
return (char)p_SocketInfo; /*0xffccd01c*/
}
n7 = -7; /*0xffcccfdb*/
}
else
{
n0x30_1 = *(_BYTE *)(v19 + __return_address + 10236); /*0xffcccfdf*/
if ( n0x30_1 && n0x30_1 < 0x30u ) /*0xffcccfec*/
{
n7_1 = (char)n0x30_1; /*0xffcccfee*/
goto LABEL_39; /*0xffcccff2*/
}
n7 = 7; /*0xffcccff4*/
}
n7_1 = n7; /*0xffcccff6*/
goto LABEL_39; /*0xffcccff6*/
case 23:
v23 = 50813 * n6; /*0xffccd031*/
if ( a8 )
{
n0x30_2 = *(_BYTE *)(v23 + __return_address + 10237); /*0xffccd03e*/
if ( n0x30_2 && n0x30_2 < 0x30u )
{
n7_3 = -(char)n0x30_2; /*0xffccd051*/
LABEL_51:
a9[8 * n6a + *(unsigned __int8 *)(242 * n4 + v10 + 1)] = n7_3; /*0xffccd072*/
n15_5 = (*(_DWORD *)(__return_address + 134) & 0x8000) != 0 ? 50 : 31;
LABEL_92:
*(_BYTE *)p_SocketInfo = n15_5; /*0xffccd25d*/
return (char)p_SocketInfo; /*0xffccd263*/
}
n7_2 = -7; /*0xffccd056*/
}
else
{
n0x30_3 = *(_BYTE *)(v23 + __return_address + 10238); /*0xffccd05a*/
if ( n0x30_3 && n0x30_3 < 0x30u ) /*0xffccd067*/
{
n7_3 = (char)n0x30_3; /*0xffccd069*/
goto LABEL_51; /*0xffccd06d*/
}
n7_2 = 7; /*0xffccd06f*/
}
n7_3 = n7_2; /*0xffccd071*/
goto LABEL_51; /*0xffccd071*/
case 1:
case 3:
case 4:
if ( a8 ) /*0xffccd2b6*/
{
v27 = 242 * n4; /*0xffccd2b8*/
if ( *(_BYTE *)(v27 + v10 + 36) >= 0x1Fu ) /*0xffccd2c3*/
*(_BYTE *)(v27 + v10 + 36) = 26; /*0xffccd2c5*/
v28 = *(_BYTE *)(v27 + v10 + 36); /*0xffccd2ca*/
goto LABEL_60; /*0xffccd2ce*/
}
v30 = 242 * n4; /*0xffccd2d3*/
if ( *(_BYTE *)(v30 + v10 + 37) >= 0x1Fu ) /*0xffccd2de*/
*(_BYTE *)(v30 + v10 + 37) = 26; /*0xffccd2e0*/
v15 = *(char *)(v30 + v10 + 37); /*0xffccd2e5*/
LABEL_105:
v29 = *(unsigned __int8 *)(v30 + v10 + 1); /*0xffccd2eb*/
goto LABEL_106; /*0xffccd2eb*/
case 22:
if ( a8 ) /*0xffccd0d4*/
{
v27 = 242 * n4; /*0xffccd0d6*/
if ( *(_BYTE *)(v27 + v10 + 38) >= 0x1Fu ) /*0xffccd0e1*/
*(_BYTE *)(v27 + v10 + 38) = 26; /*0xffccd0e3*/
v28 = *(_BYTE *)(v27 + v10 + 38); /*0xffccd0e8*/
LABEL_60:
v29 = *(unsigned __int8 *)(v27 + v10 + 1); /*0xffccd0ec*/
v15 = (char)-v28; /*0xffccd0f3*/
LABEL_106:
v13 = v29 + 8 * n6a; /*0xffccd2f0*/
v14 = a9; /*0xffccd2f6*/
goto LABEL_107; /*0xffccd2f6*/
}
v30 = 242 * n4; /*0xffccd0fc*/
if ( *(_BYTE *)(v30 + v10 + 39) >= 0x1Fu ) /*0xffccd107*/
*(_BYTE *)(v30 + v10 + 39) = 26; /*0xffccd109*/
v15 = *(char *)(v30 + v10 + 39); /*0xffccd10e*/
goto LABEL_105; /*0xffccd114*/
}
if ( KtiFunc47AD(n40) ) /*0xffccd11a*/
{
if ( n40 != 53 ) /*0xffccd127*/
{
if ( a8 ) /*0xffccd148*/
n15 = -15; /*0xffccd14a*/
else
n15 = 15; /*0xffccd14e*/
a9[8 * n6a + *(unsigned __int8 *)(242 * n4 + v10 + 1)] = n15; /*0xffccd151*/
*(_BYTE *)p_SocketInfo = -1; /*0xffccd159*/
return (char)p_SocketInfo; /*0xffccd15c*/
}
}
else if ( n40 != 53 ) /*0xffccd164*/
{
result = KtiFunc47DF(n40); /*0xffccd269*/
if ( result ) /*0xffccd271*/
{
if ( a8 ) /*0xffccd296*/
n15_1 = -15; /*0xffccd298*/
else
n15_1 = 15; /*0xffccd29c*/
a9[8 * n6a + *(unsigned __int8 *)(242 * n4 + v10 + 1)] = n15_1; /*0xffccd29f*/
*(_BYTE *)p_SocketInfo = 127; /*0xffccd2a7*/
return (char)p_SocketInfo; /*0xffccd2a3*/
}
return result; /*0xffccd2aa*/
}
if ( (AutoGenFuncF0A3(__return_address) & 8) == 0 /*0xffccd18f*/
&& !*(_BYTE *)(__return_address + 257313)
&& !*(_BYTE *)(1379 * n2 + CpuCount + 107) )
{
if ( a8 ) /*0xffccd1b5*/
n5 = -5; /*0xffccd1b7*/
else
n5 = 5; /*0xffccd1bb*/
a9[8 * n6a + *(unsigned __int8 *)(242 * n4 + v10 + 1)] = n5; /*0xffccd1be*/
n15_5 = *(_BYTE *)(__return_address + 244280); /*0xffccd1c2*/
goto LABEL_92; /*0xffccd1c8*/
}
if ( *(_BYTE *)(1379 * n2 + CpuCount + 107) ) /*0xffccd1da*/
n15_5 = *(_BYTE *)(__return_address + 244281); /*0xffccd1e1*/
else
n15_5 = *(_BYTE *)(__return_address + 244280); /*0xffccd1e9*/
v31 = 50813 * n6; /*0xffccd1f6*/
if ( a8 ) /*0xffccd205*/
{
n15_6 = *(_BYTE *)(v31 + __return_address + 58783); /*0xffccd207*/
if ( n15_6 && n15_6 < n15_5 ) /*0xffccd214*/
{
n15_3 = -(char)n15_6; /*0xffccd21a*/
LABEL_91:
a9[8 * n6a + *(unsigned __int8 *)(242 * n4 + v10 + 1)] = n15_3; /*0xffccd23b*/
goto LABEL_92; /*0xffccd255*/
}
n15_2 = -15; /*0xffccd21f*/
}
else
{
n15_4 = *(_BYTE *)(v31 + __return_address + 58784); /*0xffccd223*/
if ( n15_4 && n15_4 < n15_5 ) /*0xffccd230*/
{
n15_3 = (char)n15_4; /*0xffccd232*/
goto LABEL_91; /*0xffccd236*/
}
n15_2 = 15; /*0xffccd238*/
}
n15_3 = n15_2; /*0xffccd23a*/
goto LABEL_91; /*0xffccd23a*/
}
if ( n40 > 23 )
{
if ( n40 == 40 || n40 == 44 || n40 == 53 )
{
v17 = *(unsigned __int8 *)(242 * n4 + v10 + 1) + 8 * n6a; /*0xffcccf5a*/
v18 = a8 ? -1 : 1;
a9[v17] = v18; /*0xffcccf6b*/
result = *(_BYTE *)(1379 * n2 + CpuCount + 107) == 0 ? -1 : 127;
*(_BYTE *)p_SocketInfo = result; /*0xffcccf8e*/
if ( n40 == 53 ) /*0xffcccf93*/
{
result = *(_BYTE *)(__return_address + 244280); /*0xffcccf99*/
*(_BYTE *)p_SocketInfo = result; /*0xffcccf9f*/
}
}
return result; /*0xffcccfa1*/
}
if ( n40 == 23 )
{
if ( a8 ) /*0xffcccf00*/
n7_4 = -7; /*0xffcccf02*/
else
n7_4 = 7; /*0xffcccf06*/
a9[8 * n6a + *(unsigned __int8 *)(242 * n4 + v10 + 1)] = n7_4; /*0xffcccf09*/
n15_5 = *(_BYTE *)(1379 * n2 + CpuCount + 107) != 1 ? 50 : 63;
goto LABEL_92; /*0xffcccf2a*/
}
if ( n40 == 1 ) /*0xffccce5a*/
goto LABEL_9; /*0xffccce5a*/
if ( n40 <= 2 ) /*0xffccce5f*/
return result; /*0xffccce5f*/
if ( n40 <= 4 ) /*0xffccce68*/
{
LABEL_9:
v13 = *(unsigned __int8 *)(242 * n4 + v10 + 1) + 8 * n6a; /*0xffccce77*/
v14 = a9; /*0xffccce92*/
if ( !a8 ) /*0xffccce96*/
{
a9[v13] = 5; /*0xffccced8*/
LABEL_108:
*(_BYTE *)p_SocketInfo = 31; /*0xffccd2fe*/
return (char)p_SocketInfo; /*0xffccd2fe*/
}
v15 = -5; /*0xffccce9a*/
LABEL_107:
v14[v13] = v15; /*0xffccd2fa*/
goto LABEL_108; /*0xffccd2fa*/
}
if ( n40 != 5 ) /*0xffccce6c*/
{
if ( n40 != 22 ) /*0xffccce71*/
return result; /*0xffccce71*/
goto LABEL_9; /*0xffccce71*/
}
if ( a8 ) /*0xffcccebf*/
n7_5 = -7; /*0xffcccec1*/
else
n7_5 = 7; /*0xffcccec5*/
a9[8 * n6a + *(unsigned __int8 *)(242 * n4 + v10 + 1)] = n7_5; /*0xffcccec8*/
*(_BYTE *)p_SocketInfo = 45; /*0xffccced0*/
return (char)p_SocketInfo; /*0xffccd305*/
}
// Function: RankMarginToolMain @ 0xffccd30b (0x1c39 bytes)
// Index: 1720/2560
int __cdecl RankMarginToolMain(int __return_address)
{
bool v1; // zf
int n10; // eax
int v3; // esi
int n6_2; // ebp
unsigned __int8 v5; // al
int v6; // eax
int v7; // edi
int v8; // eax
unsigned __int8 n4; // cl
unsigned __int8 *v10; // esi
unsigned __int8 v11; // al
int v12; // eax
int v13; // ecx
int v14; // eax
char v15; // al
_BYTE *v16; // edx
int v17; // ecx
int v18; // eax
int v19; // esi
int CpuCount; // edi
int v21; // eax
int v22; // edx
int v23; // ecx
unsigned __int8 j_1; // al
unsigned __int8 k_1; // al
unsigned __int8 m_1; // al
unsigned __int8 n_1; // al
char v28; // al
int v30; // [esp-10h] [ebp-47E4h]
int v31; // [esp-Ch] [ebp-47E0h]
unsigned __int8 n4_1; // [esp+Ah] [ebp-47CAh]
unsigned __int8 j; // [esp+Ah] [ebp-47CAh]
unsigned __int8 k; // [esp+Ah] [ebp-47CAh]
unsigned __int8 n9; // [esp+Bh] [ebp-47C9h]
unsigned __int8 m; // [esp+Bh] [ebp-47C9h]
unsigned __int8 n; // [esp+Bh] [ebp-47C9h]
un... [16687 chars total]
// Function: RmtFuncEF44 @ 0xffccef44 (0x21a bytes)
// Index: 1721/2560
int __cdecl RmtFuncEF44(unsigned __int8 *n6, int n4, _BYTE *n6a, int n2, int a5, __int16 n60, int a7, int n25)
{
int n25_1; // esi
int result; // eax
unsigned __int16 p_n60[2]; // [esp+10h] [ebp-Ch] BYREF
unsigned __int16 v11[2]; // [esp+14h] [ebp-8h] BYREF
unsigned __int16 v12[2]; // [esp+18h] [ebp-4h] BYREF
*(_DWORD *)p_n60 = 0; /*0xffccef49*/
*(_DWORD *)v11 = 0; /*0xffccef53*/
*(_DWORD *)v12 = 255; /*0xffccef6c*/
DebugPrint((int)n6, 2, 255, 255, 255, 255, 255, 255, "RestoreOffset\n"); /*0xffccef70*/
n25_1 = n25; /*0xffccef84*/
if ( *(_WORD *)(n6 + 257315) == 11 && n25 == 23 ) /*0xffccef8d*/
{
MrcMarginGroupTrain(n6, n4, n6a, n2, a5, 255, 255, a7, 23, 24, (unsigned __int16 *)&n60); /*0xffccef97*/
goto LABEL_25; /*0xffccef97*/
}
if ( n25 > 40 ) /*0xffccef9c*/
{
if ( n25 < 44 ) /*0xffccefda*/
goto LABEL_25; /*0xffccefda*/
if ( n25 <= 50 ) /*0xffccefe3*/
{
KtiFuncBF1D(n6, n4, (int)n6a, n2, a7, n25, 2, (__int16 *)p_n60, v12, v11); /*0xffccf0fc*/
*(_DWORD *)p_n60 = (unsigned __int16)(n60 - p_n60[0]); /*0xffccf10e*/
KtiFuncBF1D(n6, n4, (int)n6a, n2, a7, n25_1, 28, (__int16 *)p_n60, v12, v11); /*0xffccf132*/
goto LABEL_25; /*0xffccf132*/
}
if ( n25 == 53 ) /*0xffccefec*/
{
KtiFuncBD44((int)n6, n4, (int)n6a, n2, a7, 2, (__int16 *)p_n60); /*0xffccf0a7*/
*(_DWORD *)p_n60 = (unsigned __int16)(n60 - p_n60[0]); /*0xffccf0b9*/
KtiFuncBD44((int)n6, n4, (int)n6a, n2, a7, 28, (__int16 *)p_n60); /*0xffccf0d2*/
goto LABEL_25; /*0xffccf0da*/
}
if ( n25 <= 70 ) /*0xffcceff5*/
goto LABEL_25; /*0xffcceff5*/
if ( n25 > 76 ) /*0xffcceffe*/
{
if ( n25 != 98 ) /*0xffccf003*/
goto LABEL_25; /*0xffccf003*/
goto LABEL_20; /*0xffccf003*/
}
LABEL_22:
KtiFuncBB42(n6, n4, (int)n6a, n2, a7, n25, 2, (__int16 *)p_n60, v12, v11); /*0xffccf032*/
*(_DWORD *)p_n60 = (unsigned __int16)(n60 - p_n60[0]); /*0xffccf064*/
KtiFuncBB42(n6, n4, (int)n6a, n2, a7, n25_1, 28, (__int16 *)p_n60, v12, v11); /*0xffccf088*/
goto LABEL_25; /*0xffccf08d*/
}
if ( n25 == 40 ) /*0xffccef9e*/
goto LABEL_22; /*0xffccef9e*/
if ( n25 < 0 || n25 > 1 && (n25 <= 2 || n25 > 5 && n25 != 20 && (n25 <= 21 || n25 > 23)) ) /*0xffccefd0*/
goto LABEL_25; /*0xffccefd0*/
LABEL_20:
MrcMarginGroupTrain(n6, n4, n6a, n2, a5, 255, 255, a7, n25, 12, p_n60); /*0xffccf009*/
LABEL_25:
result = 50813 * (unsigned __int8)n4; /*0xffccf13a*/
if ( !n6[result + 58726] ) /*0xffccf143*/
return MailBoxFunc2B5B((int)n6, n4); /*0xffccf14f*/
return result; /*0xffccf156*/
}
// Function: RmtFn_FFCCF15E @ 0xffccf15e (0x26c bytes)
// Index: 1722/2560
char __cdecl RmtFn_FFCCF15E(
int __return_address,
unsigned __int8 n4,
unsigned __int8 n6,
unsigned __int8 n2,
unsigned __int8 n4a,
unsigned __int8 n9,
unsigned __int8 n18,
__int16 a8,
char a9,
char n2_1,
int a11,
int a12,
_WORD *a13)
{
int v13; // eax
int v14; // edx
int v15; // eax
int v16; // esi
int v17; // edi
int v18; // esi
int v19; // edi
int v20; // ebp
unsigned __int8 v21; // bl
signed int v22; // ecx
int v23; // edx
int v24; // esi
int v26; // [esp+28h] [ebp+28h]
LOBYTE(v13) = n2_1; /*0xffccf15e*/
if ( n2_1 ) /*0xffccf164*/
{
if ( n2_1 == 1 ) /*0xffccf181*/
{
LOBYTE(v13) = a8; /*0xffccf191*/
if ( a9 ) /*0xffccf196*/
a13[2 * n6] = a8; /*0xffccf198*/
else
a13[2 * n6 + 1] = a8; /*0xffccf19d*/
}
else if ( n2_1 != 2 ) /*0xffccf1a5*/
{
switch ( n2_1 ) /*0xffccf1ae*/
{
case 3: /*0xffccf1ae*/
v14 = KtiFunc91AF(__return_address, n4, n6, n2); /*0xffccf1c9*/
if ( a9 ) /*0xffccf1d0*/
a13[16 * n6 + 2 * *(unsigned __int8 *)(242 * n4a + v14 + 1)] = a8; /*0xffccf1f2*/
else
a13[16 * n6 + 1 + 2 * *(unsigned __int8 *)(242 * n4a + v14 + 1)] = a8; /*0xffccf217*/
LOBYTE(v13) = a8; /*0xffccf1ed*/
break;
case 4: /*0xffccf1ae*/
v15 = KtiFunc91AF(__return_address, n4, n6, n2); /*0xffccf239*/
v26 = v15; /*0xffccf24d*/
if ( a9 ) /*0xffccf251*/
{
v16 = 242 * n4a; /*0xffccf258*/
v17 = 8 * n6; /*0xffccf267*/
v13 = n9 + 18 * (v17 + *(unsigned __int8 *)(v16 + v15 + 1)); /*0xffccf27b*/
a13[2 * v13] = a8; /*0xffccf282*/
if ( n18 <= 9u && n9 < 9u ) /*0xffccf293*/
{
v13 = n9 + 18 * (v17 + *(unsigned __int8 *)(v16 + v26 + 1)); /*0xffccf2a7*/
a13[2 * v13 + 18] = a8; /*0xffccf2a9*/
}
}
else
{
v18 = 242 * n4a; /*0xffccf2bc*/
v19 = 8 * n6; /*0xffccf2c5*/
v13 = n9 + 18 * (v19 + *(unsigned __int8 *)(v18 + v15 + 1)); /*0xffccf2d9*/
a13[2 * v13 + 1] = a8; /*0xffccf2e0*/
if ( n18 <= 9u && n9 < 9u ) /*0xffccf2f2*/
{
v13 = n9 + 18 * (v19 + *(unsigned __int8 *)(v18 + v26 + 1)); /*0xffccf306*/
a13[2 * v13 + 19] = a8; /*0xffccf308*/
}
}
break;
case 5: /*0xffccf1ae*/
v20 = KtiFunc91AF(__return_address, n4, n6, n2); /*0xffccf332*/
v21 = 4 * (n9 / 9u + 2 * (n9 % 9u)); /*0xffccf357*/
v22 = n18 / 9u; /*0xffccf35a*/
LOBYTE(v13) = v21 + 8 / v22; /*0xffccf360*/
if ( v21 < (unsigned __int8)v13 ) /*0xffccf364*/
{
v23 = v21; /*0xffccf368*/
v24 = (unsigned __int8)(8 / v22); /*0xffccf370*/
do /*0xffccf3c3*/
{
v13 = 1 << (v23 & 7); /*0xffccf37f*/
if ( ((unsigned __int8)v13 & *(_BYTE *)(n9 % 9u + a11)) == 0 ) /*0xffccf38c*/
{
v13 = v23 + 72 * (*(unsigned __int8 *)(242 * n4a + v20 + 1) + 8 * n6); /*0xffccf3ab*/
if ( a9 ) /*0xffccf3b2*/
a13[2 * v13] = a8; /*0xffccf3b4*/
else
a13[2 * v13 + 1] = a8; /*0xffccf3ba*/
}
++v23; /*0xffccf3bf*/
--v24; /*0xffccf3c0*/
}
while ( v24 ); /*0xffccf3c3*/
}
break;
}
}
}
else
{
LOBYTE(v13) = a8; /*0xffccf16f*/
if ( a9 ) /*0xffccf174*/
*a13 = a8; /*0xffccf176*/
else
a13[1] = a8; /*0xffccf17a*/
}
return v13; /*0xffccf179*/
}
// Function: RmtFuncF3CA @ 0xffccf3ca (0xb5 bytes)
// Index: 1723/2560
char __cdecl RmtFuncF3CA(
int __return_address,
unsigned __int8 n6,
unsigned __int8 n8,
unsigned __int8 n9,
_DWORD *SocketInfo,
int a6)
{
unsigned __int8 n6_1; // cl
int n8a_1; // eax
unsigned __int8 n8_1; // bl
unsigned __int8 n8_2; // dh
unsigned __int8 n9_1; // dl
int v11; // edi
int n8_3; // ebp
int n6a_1; // eax
_BYTE *v14; // esi
int v15; // eax
unsigned __int8 n9_2; // [esp-4h] [ebp-4h]
int n6a; // [esp+8h] [ebp+8h]
int n8a; // [esp+Ch] [ebp+Ch]
n6_1 = n6; /*0xffccf3cb*/
n9_2 = 0; /*0xffccf3d1*/
if ( n6 == 0xFF ) /*0xffccf3d7*/
{
n6_1 = 0; /*0xffccf3d9*/
LOBYTE(n8a_1) = 6; /*0xffccf3db*/
}
else
{
LOBYTE(n8a_1) = n6 + 1; /*0xffccf3df*/
}
n8_1 = n8; /*0xffccf3e3*/
if ( n8 == 0xFF ) /*0xffccf3ea*/
{
n8_1 = 0; /*0xffccf3ec*/
n8_2 = 8; /*0xffccf3ee*/
}
else
{
n8_2 = n8 + 1; /*0xffccf3f4*/
}
if ( n9 == 0xFF ) /*0xffccf3fd*/
{
n9_1 = 9; /*0xffccf3ff*/
}
else
{
n9_2 = n9; /*0xffccf403*/
n9_1 = n9 + 1; /*0xffccf407*/
}
if ( n6_1 < (unsigned __int8)n8a_1 ) /*0xffccf40b*/
{
v11 = 8 * n6_1; /*0xffccf417*/
n8a_1 = (unsigned __int8)(n8a_1 - n6_1); /*0xffccf41c*/
n8a = (unsigned __int8)n8a_1; /*0xffccf41f*/
do /*0xffccf477*/
{
if ( n8_1 < n8_2 ) /*0xffccf425*/
{
n8_3 = n8_1; /*0xffccf42f*/
n6a_1 = (unsigned __int8)(n8_2 - n8_1); /*0xffccf432*/
n6a = n6a_1; /*0xffccf435*/
do /*0xffccf467*/
{
if ( n9_2 < n9_1 ) /*0xffccf43b*/
{
v14 = (_BYTE *)(a6 + 9 * (v11 + n8_3) + n9_2); /*0xffccf44a*/
v15 = (unsigned __int8)(n9_1 - n9_2); /*0xffccf450*/
do /*0xffccf459*/
{
*v14++ |= (unsigned __int8)SocketInfo; /*0xffccf453*/
--v15; /*0xffccf456*/
}
while ( v15 ); /*0xffccf459*/
n6a_1 = n6a; /*0xffccf45b*/
}
++n8_3; /*0xffccf45f*/
n6a = --n6a_1; /*0xffccf463*/
}
while ( n6a_1 ); /*0xffccf467*/
n8a_1 = n8a; /*0xffccf469*/
}
v11 += 8; /*0xffccf46d*/
n8a = --n8a_1; /*0xffccf473*/
}
while ( n8a_1 ); /*0xffccf477*/
}
return n8a_1; /*0xffccf47e*/
}
// Function: RmtFuncF47F @ 0xffccf47f (0x191 bytes)
// Index: 1724/2560
int __cdecl RmtFuncF47F(
int __return_address,
int n4,
_BYTE *n6,
int n2,
int n4a,
__int16 n60,
int a7,
int n40,
__int16 a9)
{
int __return_address_1; // esi
int v10; // edi
int n4_1; // ebx
int v12; // eax
unsigned __int16 v14[2]; // [esp+10h] [ebp-8h] BYREF
unsigned __int16 v15[2]; // [esp+14h] [ebp-4h] BYREF
__return_address_1 = __return_address; /*0xffccf484*/
v10 = 0; /*0xffccf49b*/
*(_DWORD *)v15 = 255; /*0xffccf49d*/
*(_DWORD *)v14 = 0; /*0xffccf4a2*/
DebugPrint(__return_address, 2, 255, 255, 255, 255, 255, 255, "SetOffset\n"); /*0xffccf4a6*/
n4_1 = n4; /*0xffccf4ab*/
if ( *(_WORD *)(__return_address_1 + 257315) == 11 && n40 == 23 ) /*0xffccf4c3*/
{
__return_address = (unsigned __int16)(n60 - a9); /*0xffccf4d2*/
v12 = MrcMarginGroupTrain( /*0xffccf4f2*/
(unsigned __int8 *)__return_address_1,
n4,
n6,
n2,
n4a,
255,
255,
a7,
23,
28,
(unsigned __int16 *)&__return_address);
LABEL_20:
v10 = v12; /*0xffccf5fc*/
goto LABEL_21; /*0xffccf5fc*/
}
if ( n40 > 40 ) /*0xffccf502*/
{
if ( n40 < 44 ) /*0xffccf53f*/
goto LABEL_21; /*0xffccf53f*/
if ( n40 <= 50 ) /*0xffccf548*/
{
__return_address = (unsigned __int16)(n60 - a9); /*0xffccf5d0*/
v12 = KtiFuncBF1D( /*0xffccf5f4*/
(unsigned __int8 *)__return_address_1,
n4,
(int)n6,
n2,
a7,
n40,
28,
(__int16 *)&__return_address,
v15,
v14);
goto LABEL_20; /*0xffccf5f4*/
}
if ( n40 == 53 ) /*0xffccf54d*/
{
__return_address = (unsigned __int16)(n60 - a9); /*0xffccf5a0*/
v12 = KtiFuncBD44(__return_address_1, n4, (int)n6, n2, a7, 28, (__int16 *)&__return_address); /*0xffccf5b9*/
goto LABEL_20; /*0xffccf5c1*/
}
if ( (unsigned int)(n40 - 71) > 5 ) /*0xffccf555*/
goto LABEL_21; /*0xffccf555*/
LABEL_17:
__return_address = (unsigned __int16)(n60 - a9); /*0xffccf55b*/
v12 = KtiFuncBB42( /*0xffccf58c*/
(unsigned __int8 *)__return_address_1,
n4,
(int)n6,
n2,
a7,
n40,
28,
(__int16 *)&__return_address,
v15,
v14);
goto LABEL_20; /*0xffccf591*/
}
if ( n40 == 40 ) /*0xffccf504*/
goto LABEL_17; /*0xffccf504*/
if ( n40 >= 0 && (n40 <= 1 || n40 > 2 && (n40 <= 5 || n40 == 20 || (unsigned int)(n40 - 22) <= 1)) ) /*0xffccf52c*/
{
v12 = MrcMarginGroupTrain( /*0xffccf53a*/
(unsigned __int8 *)__return_address_1,
n4,
n6,
n2,
n4a,
255,
255,
a7,
n40,
12,
(unsigned __int16 *)&n60);
goto LABEL_20; /*0xffccf53a*/
}
LABEL_21:
MailBoxFunc2B5B(__return_address_1, n4_1); /*0xffccf5fe*/
return v10; /*0xffccf609*/
}
// Function: RmtStartOsOffset @ 0xffccf610 (0x3db bytes)
// Index: 1725/2560
int __cdecl RmtStartOsOffset(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // esi
int v2; // eax
unsigned __int8 *__return_address_2; // ebp
int SocketInfo; // eax
__int16 n100; // di
__int16 n100_1; // cx
__int16 v7; // ax
__int16 n100_2; // cx
__int16 v9; // ax
__int16 n100_3; // cx
__int16 v11; // ax
__int16 n100_4; // cx
__int16 v13; // ax
__int16 n100_5; // cx
__int16 v15; // ax
__int16 n100_6; // ax
_BYTE *SocketInfo_2; // eax
unsigned __int8 n6; // bl
_BYTE *CpuCount; // ecx
unsigned __int8 n2_1; // al
unsigned __int8 n4; // bh
_BYTE *SocketInfo_4; // eax
unsigned __int8 n6_1; // bl
int n2; // [esp+4h] [ebp-14h]
_BYTE *SocketInfo_1; // [esp+8h] [ebp-10h]
int v27; // [esp+Ch] [ebp-Ch]
_BYTE *CpuCount_1; // [esp+10h] [ebp-8h]
_BYTE *SocketInfo_3; // [esp+14h] [ebp-4h]
__return_address_1 = __return_address; /*0xffccf614*/
LOBYTE(__return_address) = __return_address[9402]; /*0xffccf61e*/
v2 = ... [9565 chars total]
// Function: DdrRmtMarginTrainDispatch @ 0xffccf9eb (0xdb bytes)
// Index: 1726/2560
int __cdecl DdrRmtMarginTrainDispatch(
unsigned __int8 *n6,
int n4,
_BYTE *n6_1,
int n2,
int a5,
unsigned __int16 p_n60,
int a7,
int n25)
{
unsigned __int16 v9[2]; // [esp+8h] [ebp-8h] BYREF
unsigned __int16 v10[2]; // [esp+Ch] [ebp-4h] BYREF
*(_DWORD *)v10 = 0; /*0xffccf9f0*/
*(_DWORD *)v9 = 255; /*0xffccf9fc*/
if ( n25 > 40 ) /*0xffccfa0a*/
{
if ( n25 == 44 ) /*0xffccfa72*/
{
KtiFuncBF1D(n6, n4, (int)n6_1, n2, a7, 44, 28, (__int16 *)&p_n60, v9, v10); /*0xffccfaaf*/
}
else if ( n25 == 53 ) /*0xffccfa77*/
{
KtiFuncBD44((int)n6, n4, (int)n6_1, n2, a7, 28, (__int16 *)&p_n60); /*0xffccfa8a*/
}
}
else if ( n25 == 40 ) /*0xffccfa0c*/
{
KtiFuncBB42(n6, n4, (int)n6_1, n2, a7, 40, 28, (__int16 *)&p_n60, v9, v10); /*0xffccfa68*/
}
else if ( n25 >= 0 && (n25 <= 1 || n25 == 5 || (unsigned int)(n25 - 22) <= 1) ) /*0xffccfa26*/
{
MrcMarginGroupTrain(n6, n4, n6_1, n2, a5, 255, 255, a7, n25, 28, &p_n60); /*0xffccfa43*/
}
return MailBoxFunc2B5B((int)n6, n4); /*0xffccfac0*/
}
// Function: RmtFn_FFCCFAC6 @ 0xffccfac6 (0x11b bytes)
// Index: 1727/2560
int __cdecl RmtFn_FFCCFAC6(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // esi
int v2; // eax
int SocketInfo; // eax
__int16 n100; // dx
_BYTE *SocketInfo_1; // edi
unsigned __int8 __return_address_2; // bl
_BYTE *CpuCount; // eax
unsigned __int8 n2_1; // bh
unsigned __int8 n4_1; // bl
_BYTE *CpuCount_1; // [esp+4h] [ebp-10h]
int n2; // [esp+8h] [ebp-Ch]
int v13; // [esp+Ch] [ebp-8h]
int n4; // [esp+10h] [ebp-4h]
__return_address_1 = __return_address; /*0xffccfacd*/
LOBYTE(n4) = __return_address[9402]; /*0xffccfad6*/
v2 = 48704 * (unsigned __int8)n4; /*0xffccfadc*/
if ( __return_address[v2 + 258689] && __return_address[v2 + 258716] ) /*0xffccfaf0*/
{
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffccfb04*/
n100 = *(_WORD *)(__return_address + 211); /*0xffccfb09*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffccfb10*/
if ( n100 >= 100 ) /*0xffccfb1a*/
*(_WORD *)(__return_address + 211) = 100 - n100; /*0xffccfb1e*/
__return_address_2 = 0; /*0xffccfb25*/
LOBYTE(__return_address) = 0; /*0xffccfb27*/
do /*0xffccfbbc*/
{
if ( *SocketInfo_1 ) /*0xffccfb2a*/
{
CpuCount = (_BYTE *)GetCpuCount((int)__return_address_1, n4, (unsigned __int8)__return_address); /*0xffccfb36*/
CpuCount_1 = CpuCount; /*0xffccfb3e*/
n2_1 = 0; /*0xffccfb41*/
LOBYTE(n2) = 0; /*0xffccfb43*/
do /*0xffccfba9*/
{
if ( *CpuCount ) /*0xffccfb46*/
{
n4_1 = 0; /*0xffccfb4b*/
LOBYTE(v13) = 0; /*0xffccfb4d*/
do /*0xffccfb94*/
{
if ( !KtiFunc89E9((int)__return_address_1, n4, (char)__return_address, n2, v13, 0) ) /*0xffccfb5f*/
DdrRmtMarginTrainDispatch( /*0xffccfb84*/
__return_address_1,
n4,
__return_address,
n2,
v13,
*(_WORD *)(__return_address_1 + 211),
0,
0);
LOBYTE(v13) = ++n4_1; /*0xffccfb8e*/
}
while ( n4_1 < 4u ); /*0xffccfb94*/
CpuCount = CpuCount_1; /*0xffccfb96*/
}
++n2_1; /*0xffccfb99*/
CpuCount += 1379; /*0xffccfb9b*/
LOBYTE(n2) = n2_1; /*0xffccfba0*/
CpuCount_1 = CpuCount; /*0xffccfba3*/
}
while ( n2_1 < 2u ); /*0xffccfba9*/
__return_address_2 = (unsigned __int8)__return_address; /*0xffccfbab*/
}
++__return_address_2; /*0xffccfbae*/
SocketInfo_1 += 7688; /*0xffccfbb0*/
LOBYTE(__return_address) = __return_address_2; /*0xffccfbb6*/
}
while ( __return_address_2 < 6u ); /*0xffccfbbc*/
LogDebugString(__return_address_1, (int)"offsetRecEn = %d\n", *(__int16 *)(__return_address_1 + 211)); /*0xffccfbd0*/
}
return 0; /*0xffccfbdc*/
}
// Function: RmtFuncFBE1 @ 0xffccfbe1 (0x3eb bytes)
// Index: 1728/2560
unsigned __int8 __cdecl RmtFuncFBE1(
int __return_address,
unsigned __int8 n6,
unsigned int n40,
int a4,
char n2,
int a6)
{
unsigned __int8 n6_1; // bl
int __return_address_1; // edi
_BYTE *SocketInfo; // ecx
unsigned __int8 n6_2; // al
int v10; // ebp
_BYTE *CpuCount; // ecx
unsigned __int8 n2_1; // al
int v13; // esi
__int16 n127; // bp
__int16 v15; // bx
int v16; // edx
int v17; // ecx
__int16 n13; // ax
__int16 n10; // bp
__int16 v20; // ax
unsigned __int8 n8_2; // cl
unsigned __int8 n8; // al
int __return_address_2; // edx
int v24; // edi
int v25; // ecx
__int16 n127_2; // bp
int v27; // esi
__int16 n13_1; // dx
__int16 n10_1; // bp
__int16 v30; // dx
unsigned __int8 n0x3F; // cl
char v32; // al
int v33; // edi
int v34; // esi
__int16 n13_2; // dx
__int16 v36; // dx
int v37; // eax
int v38; // eax
char n8_3; // [esp+12h] [ebp-26h]
unsigned __int8 n0x3F_1; // [esp+1... [9821 chars total]
// Function: RmtCoreMain @ 0xffccffcc (0x15a3 bytes)
// Index: 1729/2560
int __cdecl RmtCoreMain(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // ebx
unsigned __int8 n4_5; // al
int n4_6; // esi
int v4; // ebp
int v5; // edi
unsigned __int8 *v6; // esi
unsigned __int8 n6a_1; // cl
__int16 v8; // ax
int v9; // ebp
unsigned __int8 *v10; // esi
_BYTE *SocketInfo_1; // edx
int v12; // eax
int CpuCount; // eax
_BYTE *v14; // ebp
unsigned __int8 n2_3; // dl
unsigned __int8 *v16; // ecx
_BYTE *v17; // edi
_BYTE *v18; // eax
char v19; // cl
char v20; // al
char v21; // al
char v22; // al
char v23; // al
char v24; // cl
char v25; // al
char v26; // al
char v27; // al
char v28; // al
char v29; // al
char v30; // al
unsigned __int16 *p_n60_1; // eax
unsigned int n128; // edi
char v33; // al
_BYTE *v34; // edx
bool v35; // zf
_BYTE *v36; // edi
unsigned int n122; // ebx
char v38; // al
_BYTE *v39; // edx
char v40; // al
char v41; // cl
char v42; // al
char ... [51728 chars total]
// Function: RmtFn_FFCD156F @ 0xffcd156f (0x22 bytes)
// Index: 1730/2560
int __cdecl RmtFn_FFCD156F(int __return_address, char a2)
{
if ( *(char *)(__return_address + 130) < 0 ) /*0xffcd157a*/
{
if ( (a2 & 2) == 0 ) /*0xffcd158b*/
return 0; /*0xffcd158b*/
}
else if ( (a2 & 1) == 0 ) /*0xffcd1581*/
{
return 0; /*0xffcd1585*/
}
return 1; /*0xffcd1585*/
}
// Function: RmtFunc1591 @ 0xffcd1591 (0x47 bytes)
// Index: 1731/2560
BOOL __cdecl RmtFunc1591(int __return_address, char a2)
{
int v2; // edx
int n10; // eax
BOOL result; // eax
v2 = *(_DWORD *)(__return_address + 246404); /*0xffcd1599*/
result = v2 == 1 && (a2 & 8) != 0 /*0xffcd15d6*/
|| ((n10 = *(_DWORD *)(__return_address + 9405), n10 == 10) || n10 == 11) && (a2 & 2) != 0
|| n10 == 13
|| !v2 && n10 == 8 && (a2 & 1) != 0;
return result; /*0xffcd15d3*/
}
// Function: RmtPrintMargins @ 0xffcd15d8 (0xc bytes)
// Index: 1732/2560
int __cdecl RmtPrintMargins(int a1)
{
return *(unsigned __int8 *)(a1 + 246400); /*0xffcd15e3*/
}
// Function: RmtGetMargins @ 0xffcd15e4 (0xf0 bytes)
// Index: 1733/2560
int __cdecl RmtGetMargins(int n4)
{
unsigned __int8 n4_1; // bl
int v2; // ecx
int v3; // ebp
unsigned int p_n4; // [esp+Ch] [ebp-Ch] BYREF
unsigned __int8 n4a[4]; // [esp+10h] [ebp-8h]
int v7; // [esp+14h] [ebp-4h]
p_n4 = 0; /*0xffcd15e7*/
n4_1 = 0; /*0xffcd15f2*/
v2 = 0; /*0xffcd15f4*/
n4a[0] = 0; /*0xffcd15f6*/
v7 = 0; /*0xffcd15fa*/
v3 = n4 + 10192; /*0xffcd15fe*/
do /*0xffcd16c5*/
{
*(_WORD *)(v3 - 1) = 0; /*0xffcd1606*/
*(_BYTE *)(v3 + 1) = 0; /*0xffcd160d*/
if ( ((1 << v2) & *(_DWORD *)(n4 + 246468)) != 0 && n4_1 != *(_BYTE *)(n4 + 246425) ) /*0xffcd1625*/
{
KtiFunc2AB5(n4, n4a[0]); /*0xffcd1630*/
DebugPrint(n4, 3, 255, 255, 255, 255, 255, 255, "Dispatch N%d for MemInit\n", v7); /*0xffcd164c*/
CpuIoCfgWrite(n4, n4a[0], 0, *(_DWORD *)(n4 + 244289), 1); /*0xffcd1660*/
p_n4 = p_n4 & 0xFFFFFFF1 | 8; /*0xffcd1672*/
KtiFunc350F(n4, n4a[0]); /*0xffcd167b*/
p_n4 = p_n4 ^ ((unsigned __int16)p_n4 ^ (unsigned __int16)((_WORD)v7 << 11)) & 0x7800 | 1; /*0xffcd1697*/
KtiFunc2D2F(n4, n4a[0], &p_n4); /*0xffcd16a5*/
v2 = v7; /*0xffcd16aa*/
}
++n4_1; /*0xffcd16b1*/
v3 += 50813; /*0xffcd16b3*/
++v2; /*0xffcd16b9*/
n4a[0] = n4_1; /*0xffcd16ba*/
v7 = v2; /*0xffcd16be*/
}
while ( n4_1 < 4u ); /*0xffcd16c5*/
return 0; /*0xffcd16cb*/
}
// Function: RmtFunc16D4 @ 0xffcd16d4 (0x93 bytes)
// Index: 1734/2560
int __cdecl RmtFunc16D4(int n4)
{
_BYTE *n4_1; // esi
unsigned __int8 SocketNumber; // al
int v3; // ecx
n4_1 = (_BYTE *)n4; /*0xffcd16d8*/
SocketNumber = GetSocketNumber(n4); /*0xffcd16dc*/
v3 = (unsigned __int8)n4_1[246425]; /*0xffcd16e1*/
n4 = 0; /*0xffcd16e8*/
DebugPrint((int)n4_1, 2, 255, 255, 255, 255, 255, 255, "GetData S%d -> S%d\n", SocketNumber, v3); /*0xffcd1704*/
IioFunc477B((int)n4_1, (unsigned __int8)n4_1[246425]); /*0xffcd1712*/
IioFunc4651((int)n4_1, (unsigned __int8)n4_1[246425]); /*0xffcd1720*/
IioFunc46B5(n4_1, (unsigned __int8)n4_1[246425]); /*0xffcd1731*/
KtiFunc353D((int)n4_1, n4_1[246425], 16); /*0xffcd1741*/
n4 &= 0x79CEu; /*0xffcd1746*/
KtiFunc35AE((int)n4_1, n4_1[246425], (unsigned int *)&n4); /*0xffcd175a*/
return 0; /*0xffcd1764*/
}
// Function: RmtFunc1767 @ 0xffcd1767 (0x21 bytes)
// Index: 1735/2560
int __cdecl RmtFunc1767(int a1)
{
KtiFunc296B(a1, *(unsigned __int8 *)(a1 + 246425), (_BYTE *)(a1 + 244313), 1u); /*0xffcd177d*/
return 0; /*0xffcd1787*/
}
// Function: RmtFunc1788 @ 0xffcd1788 (0x83 bytes)
// Index: 1736/2560
int __cdecl RmtFunc1788(int n4)
{
unsigned __int8 n4_1; // bl
unsigned __int8 SocketNumber; // dl
int v3; // edi
unsigned __int8 SocketNumber_1; // [esp+13h] [ebp-5h]
int v6; // [esp+14h] [ebp-4h]
n4_1 = 0; /*0xffcd1798*/
SocketNumber = GetSocketNumber(n4); /*0xffcd179a*/
SocketNumber_1 = SocketNumber; /*0xffcd179d*/
v3 = 0; /*0xffcd17a1*/
LOBYTE(v6) = 0; /*0xffcd17a3*/
do /*0xffcd1800*/
{
if ( ((1 << v3) & *(_DWORD *)(n4 + 246468)) != 0 && n4_1 != *(_BYTE *)(n4 + 246425) ) /*0xffcd17c1*/
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "GetNvramData S%d -> S%d\n", v3, SocketNumber); /*0xffcd17d6*/
IioFunc477B(n4, v6); /*0xffcd17e0*/
IioFunc4651(n4, v6); /*0xffcd17ea*/
SocketNumber = SocketNumber_1; /*0xffcd17ef*/
}
++n4_1; /*0xffcd17f6*/
++v3; /*0xffcd17f8*/
LOBYTE(v6) = n4_1; /*0xffcd17f9*/
}
while ( n4_1 < 4u ); /*0xffcd1800*/
return 0; /*0xffcd1802*/
}
// Function: RmtFunc180B @ 0xffcd180b (0x7c bytes)
// Index: 1737/2560
int __cdecl RmtFunc180B(int n4)
{
unsigned __int8 n4_1; // bl
int SocketNumber; // ebp
int v3; // edi
int v5; // [esp+10h] [ebp-4h]
n4_1 = 0; /*0xffcd181a*/
SocketNumber = (unsigned __int8)GetSocketNumber(n4); /*0xffcd181c*/
LOBYTE(v5) = 0; /*0xffcd1820*/
v3 = 0; /*0xffcd1824*/
do /*0xffcd187d*/
{
if ( ((1 << v3) & *(_DWORD *)(n4 + 246468)) != 0 && n4_1 != *(_BYTE *)(n4 + 246425) ) /*0xffcd1840*/
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "GetSlaveData S%d -> S%d\n", v3, SocketNumber); /*0xffcd1852*/
IioFunc477B(n4, v5); /*0xffcd185c*/
IioFunc4651(n4, v5); /*0xffcd1866*/
}
++n4_1; /*0xffcd1873*/
++v3; /*0xffcd1875*/
LOBYTE(v5) = n4_1; /*0xffcd1876*/
}
while ( n4_1 < 4u ); /*0xffcd187d*/
return 0; /*0xffcd187f*/
}
// Function: RmtFunc1887 @ 0xffcd1887 (0x86 bytes)
// Index: 1738/2560
int __cdecl RmtFunc1887(int n4)
{
unsigned __int8 n4_1; // bl
int SocketNumber; // ebp
int v3; // edi
int v5; // [esp+10h] [ebp-4h]
n4_1 = 0; /*0xffcd1896*/
SocketNumber = (unsigned __int8)GetSocketNumber(n4); /*0xffcd1898*/
LOBYTE(v5) = 0; /*0xffcd189c*/
v3 = 0; /*0xffcd18a0*/
do /*0xffcd1903*/
{
if ( ((1 << v3) & *(_DWORD *)(n4 + 246468)) != 0 && n4_1 != *(_BYTE *)(n4 + 246425) ) /*0xffcd18bc*/
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "GetSlaveSsaData S%d -> S%d\n", v3, SocketNumber); /*0xffcd18ce*/
IioFunc477B(n4, v5); /*0xffcd18d8*/
IioFunc4651(n4, v5); /*0xffcd18e2*/
IioFunc46B5((_BYTE *)n4, v5); /*0xffcd18ec*/
}
++n4_1; /*0xffcd18f9*/
++v3; /*0xffcd18fb*/
LOBYTE(v5) = n4_1; /*0xffcd18fc*/
}
while ( n4_1 < 4u ); /*0xffcd1903*/
return 0; /*0xffcd1905*/
}
// Function: RmtFunc190D @ 0xffcd190d (0x58 bytes)
// Index: 1739/2560
int __cdecl RmtFunc190D(int n4)
{
unsigned __int8 n4a_1; // bl
char v2; // bp
_BYTE *v3; // edi
unsigned __int8 n4a; // [esp+10h] [ebp-4h]
n4a_1 = 0; /*0xffcd1915*/
n4a = 0; /*0xffcd1918*/
v2 = 0; /*0xffcd191c*/
v3 = (_BYTE *)(n4 + 58725); /*0xffcd191e*/
do /*0xffcd195b*/
{
if ( ((1 << v2) & *(_DWORD *)(n4 + 246468)) != 0 && n4a_1 != *(_BYTE *)(n4 + 246425) ) /*0xffcd1939*/
KtiFunc296B(n4, n4a, v3, 4u); /*0xffcd1943*/
++n4a_1; /*0xffcd194b*/
v3 += 50813; /*0xffcd194d*/
++v2; /*0xffcd1953*/
n4a = n4a_1; /*0xffcd1954*/
}
while ( n4a_1 < 4u ); /*0xffcd195b*/
return 0; /*0xffcd195d*/
}
// Function: RmtFunc1965 @ 0xffcd1965 (0x21 bytes)
// Index: 1740/2560
int __cdecl RmtFunc1965(int a1)
{
KtiFunc296B(a1, *(unsigned __int8 *)(a1 + 246425), (_BYTE *)(a1 + 246392), 4u); /*0xffcd197b*/
return 0; /*0xffcd1985*/
}
// Function: RmtFunc1986 @ 0xffcd1986 (0x24 bytes)
// Index: 1741/2560
int __cdecl RmtFunc1986(int a1)
{
KtiFunc296B(a1, *(unsigned __int8 *)(a1 + 246425), (_BYTE *)(a1 + 246400), 4u); /*0xffcd199d*/
return *(unsigned __int8 *)(a1 + 246400); /*0xffcd19a8*/
}
// Function: RmtFunc19AA @ 0xffcd19aa (0x44 bytes)
// Index: 1742/2560
int __cdecl RmtFunc19AA(int n4)
{
unsigned __int8 SocketNumber; // al
SocketNumber = GetSocketNumber(n4); /*0xffcd19b0*/
DebugPrint( /*0xffcd19d4*/
n4,
2,
255,
255,
255,
255,
255,
255,
"SendNvramData S%d -> S%d\n",
*(unsigned __int8 *)(n4 + 246425),
SocketNumber);
IioFunc477B(n4, *(unsigned __int8 *)(n4 + 246425)); /*0xffcd19e2*/
return 0; /*0xffcd19ec*/
}
// Function: RmtFunc19EE @ 0xffcd19ee (0x3b bytes)
// Index: 1743/2560
int __cdecl RmtFunc19EE(int a1)
{
KtiFunc296B(a1, *(unsigned __int8 *)(a1 + 246425), (_BYTE *)(a1 + 9405), 4u); /*0xffcd1a06*/
*(_BYTE *)(50813 * *(unsigned __int8 *)(a1 + 246425) + a1 + 58725) = *(_BYTE *)(a1 + 9405); /*0xffcd1a1d*/
return 0; /*0xffcd1a26*/
}
// Function: RmtFunc1A29 @ 0xffcd1a29 (0x27d bytes)
// Index: 1744/2560
int __cdecl RmtFunc1A29(unsigned __int8 *__return_address, int a2, char a3)
{
unsigned int v3; // ecx
unsigned __int8 v4; // al
int n2; // ebx
unsigned __int8 v7; // cl
int v8; // ebp
int v9; // edi
unsigned __int8 n183; // cl
unsigned __int8 n4_1; // bl
unsigned __int8 n4_2; // dl
unsigned __int8 n4_4; // bp
int v14; // eax
int v15; // eax
int v16; // eax
int v17; // eax
unsigned __int8 n4; // [esp+Ah] [ebp-1Ah]
unsigned __int8 v20; // [esp+Bh] [ebp-19h]
__int64 v21; // [esp+Ch] [ebp-18h]
__int64 v22; // [esp+14h] [ebp-10h] BYREF
__int64 v23; // [esp+1Ch] [ebp-8h] BYREF
unsigned __int8 n4_3; // [esp+28h] [ebp+4h]
v22 = 0; /*0xffcd1a2c*/
v3 = 0; /*0xffcd1a31*/
v4 = 0; /*0xffcd1a38*/
v23 = 0; /*0xffcd1a3e*/
n2 = 1; /*0xffcd1a4e*/
v21 = 0; /*0xffcd1a4f*/
v20 = 0; /*0xffcd1a53*/
__return_address[246409] = 1; /*0xffcd1a57*/
if ( !a3 ) /*0xffcd1a61*/
goto LABEL_31; /*0xffcd1a61*/
v7 = a3; /*0xffcd1a67*/
while ( 1 ) /*0xffcd1a6d*/
{
v8 = v4; /*0xffcd1a6d*/
v9 = a2 + 12 * v4; /*0xffcd1a73*/
if ( *(_DWORD *)v9 ) /*0xffcd1a77*/
break; /*0xffcd1a77*/
LABEL_27:
v20 = ++v4; /*0xffcd1c48*/
if ( v4 >= v7 ) /*0xffcd1c4e*/
goto LABEL_30; /*0xffcd1c4e*/
}
if ( !RmtFunc1591((int)__return_address, *(_BYTE *)(v9 + 6)) /*0xffcd1a9b*/
|| !RmtFn_FFCD156F((int)__return_address, *(_BYTE *)(v9 + 7)) )
{
DebugPrint((int)__return_address, 2, 255, 255, 255, 255, 255, 255, "mrcTask skipped; Index = %d\n", v8); /*0xffcd1c36*/
goto LABEL_26; /*0xffcd1c36*/
}
KtiFunc8014((int)__return_address); /*0xffcd1aab*/
LogDebugString(__return_address, *(_DWORD *)(v9 + 8)); /*0xffcd1ab4*/
LogDebugString(__return_address, (int)" -- Started\n"); /*0xffcd1abf*/
KtiFunc834D((int)__return_address); /*0xffcd1ac5*/
n183 = *(_BYTE *)(v9 + 4); /*0xffcd1aca*/
if ( n183 && n183 != 0xFF ) /*0xffcd1ad7*/
{
KtiFunc40A2((int)__return_address, n183, *(unsigned __int8 *)(v9 + 5)); /*0xffcd1ae3*/
KtiFunc4541((int)__return_address, *(_BYTE *)(v9 + 4), *(_BYTE *)(v9 + 5), 0); /*0xffcd1af5*/
}
if ( (__return_address[130] & 0x80u) == 0 ) /*0xffcd1b04*/
{
if ( (*(_BYTE *)(v9 + 7) & 4) != 0 ) /*0xffcd1b18*/
{
n4 = 4; /*0xffcd1b1c*/
n4_3 = 0; /*0xffcd1b21*/
goto LABEL_15; /*0xffcd1b25*/
}
n4_3 = __return_address[246425]; /*0xffcd1b2d*/
n4_1 = n4_3 + 1; /*0xffcd1b31*/
}
else
{
n4_3 = __return_address[246425]; /*0xffcd1b0c*/
n4_1 = n4_3 + 1; /*0xffcd1b10*/
}
n4 = n4_1; /*0xffcd1b34*/
LABEL_15:
KtiFuncF4E(&v22); /*0xffcd1b38*/
if ( !v21 ) /*0xffcd1b48*/
v21 = v22; /*0xffcd1b5d*/
n4_2 = n4_3; /*0xffcd1b61*/
n2 = 0; /*0xffcd1b65*/
if ( n4_3 < n4 ) /*0xffcd1b6b*/
{
n4_4 = n4_3; /*0xffcd1b6d*/
do /*0xffcd1b9a*/
{
if ( ((1 << n4_4) & *((_DWORD *)__return_address + 61617)) != 0 ) /*0xffcd1b7d*/
{
__return_address[9402] = n4_2; /*0xffcd1b80*/
v14 = (*(int (__cdecl **)(unsigned __int8 *))v9)(__return_address); /*0xffcd1b86*/
n4_2 = n4_3; /*0xffcd1b88*/
n2 |= v14; /*0xffcd1b8c*/
}
++n4_2; /*0xffcd1b8f*/
++n4_4; /*0xffcd1b91*/
n4_3 = n4_2; /*0xffcd1b92*/
}
while ( n4_2 < n4 ); /*0xffcd1b9a*/
}
KtiFuncF4E(&v23); /*0xffcd1ba1*/
v15 = KtiFuncF75((int)__return_address, v22, SHIDWORD(v22), v23, SHIDWORD(v23), 0x3E8u); /*0xffcd1bbd*/
KtiFunc41B3((int)__return_address, 9u, v15); /*0xffcd1bc6*/
KtiFunc3692(__return_address, *(unsigned __int8 *)(v9 + 4), *(unsigned __int8 *)(v9 + 5)); /*0xffcd1bd6*/
KtiFunc8014((int)__return_address); /*0xffcd1bdc*/
LogDebugString(__return_address, *(_DWORD *)(v9 + 8)); /*0xffcd1be5*/
if ( n2 != 2 && n2 != 4 ) /*0xffcd1bf5*/
{
v16 = KtiFuncF75((int)__return_address, v22, SHIDWORD(v22), v23, SHIDWORD(v23), 0x3E8u); /*0xffcd1c09*/
LogDebugString(__return_address, (int)" - %dms\n", v16); /*0xffcd1c15*/
KtiFunc834D((int)__return_address); /*0xffcd1c1b*/
LABEL_26:
v7 = a3; /*0xffcd1c3b*/
v4 = v20; /*0xffcd1c42*/
goto LABEL_27; /*0xffcd1c42*/
}
LogDebugString(__return_address, (int)" -- EXIT, status = %Xh\n", n2); /*0xffcd1c5d*/
KtiFunc834D((int)__return_address); /*0xffcd1c63*/
LABEL_30:
v3 = v21; /*0xffcd1c6b*/
LABEL_31:
v17 = KtiFuncF75((int)__return_address, v3, SHIDWORD(v21), v23, SHIDWORD(v23), 0x3E8u); /*0xffcd1c71*/
LogDebugString(__return_address, (int)"Total MRC time = %dms\n", v17); /*0xffcd1c90*/
KtiFunc834D((int)__return_address); /*0xffcd1c96*/
return n2; /*0xffcd1ca0*/
}
// Function: RmtCmdMargin @ 0xffcd1ca6 (0x146 bytes)
// Index: 1745/2560
int __cdecl RmtCmdMargin(_BYTE *a1)
{
int v1; // edi
int v2; // eax
v1 = 0; /*0xffcd1cad*/
KtiFunc2F44(a1); /*0xffcd1caf*/
if ( a1[9402] == a1[453660] )
{
switch ( a1[9403] )
{
case 0:
v2 = RmtFunc190D(a1); /*0xffcd1cdb*/
goto LABEL_16; /*0xffcd1ce0*/
case 1:
v2 = RmtFunc219C(a1); /*0xffcd1ce6*/
goto LABEL_16; /*0xffcd1ceb*/
case 2:
v2 = RmtFunc180B(a1); /*0xffcd1cee*/
goto LABEL_16; /*0xffcd1cf3*/
case 3:
v2 = RmtFunc20CD(a1); /*0xffcd1cf6*/
goto LABEL_16; /*0xffcd1cfb*/
case 4:
v2 = RmtFunc1E46(a1); /*0xffcd1cfe*/
goto LABEL_16; /*0xffcd1d03*/
case 5:
v2 = RmtFunc1887(a1); /*0xffcd1d06*/
goto LABEL_16; /*0xffcd1d0b*/
case 6:
v2 = RmtFunc207C(a1); /*0xffcd1d0e*/
goto LABEL_16; /*0xffcd1d13*/
case 7:
v2 = RmtFunc1788(a1); /*0xffcd1d16*/
goto LABEL_16; /*0xffcd1d1b*/
case 8:
v2 = RmtFunc1EFB(a1); /*0xffcd1d1e*/
goto LABEL_16; /*0xffcd1d23*/
case 9:
v2 = RmtFunc2123(a1); /*0xffcd1d26*/
goto LABEL_16; /*0xffcd1d2b*/
case 0xA:
break;
default:
AssertPrint(
a1,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemMain.c",
382,
"FALSE");
ProcMemInitCheck((int)a1, 242, 78); /*0xffcd1d4e*/
break; /*0xffcd1d4e*/
}
}
else
{
switch ( a1[9403] )
{
case 0:
v2 = RmtFunc2052(a1); /*0xffcd1d60*/
goto LABEL_16; /*0xffcd1d60*/
case 1:
v2 = RmtFunc19EE(a1); /*0xffcd1d6b*/
goto LABEL_16; /*0xffcd1d70*/
case 2:
v2 = RmtFunc1F9E(a1); /*0xffcd1d73*/
goto LABEL_16; /*0xffcd1d78*/
case 3:
v2 = RmtFunc1986(a1); /*0xffcd1d7b*/
goto LABEL_16; /*0xffcd1d80*/
case 4:
v2 = RmtFunc16D4(a1); /*0xffcd1d83*/
goto LABEL_16; /*0xffcd1d88*/
case 5:
v2 = RmtFunc1FF0(a1); /*0xffcd1d8b*/
goto LABEL_16; /*0xffcd1d90*/
case 6:
v2 = RmtFunc1965(a1); /*0xffcd1d93*/
goto LABEL_16; /*0xffcd1d98*/
case 7:
v2 = RmtFunc1F4C(a1); /*0xffcd1d9b*/
goto LABEL_16; /*0xffcd1da0*/
case 8:
v2 = RmtFunc1767(a1); /*0xffcd1da3*/
goto LABEL_16; /*0xffcd1da8*/
case 9:
v2 = RmtFunc19AA(a1); /*0xffcd1dab*/
LABEL_16:
v1 = v2; /*0xffcd1d65*/
break; /*0xffcd1d68*/
case 0xA:
break;
default:
AssertPrint(
a1,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemMain.c",
422,
"FALSE");
ProcMemInitCheck((int)a1, 242, 79); /*0xffcd1dd9*/
break; /*0xffcd1dd9*/
}
}
++a1[9403]; /*0xffcd1de1*/
return v1; /*0xffcd1de9*/
}
// Function: RmtFunc1E46 @ 0xffcd1e46 (0xb5 bytes)
// Index: 1746/2560
int __cdecl RmtFunc1E46(int n4)
{
unsigned __int8 n4a_1; // bl
int v2; // ebp
unsigned __int8 n4a_2; // al
unsigned __int8 n4a; // [esp+Ch] [ebp-8h]
unsigned int p_n4; // [esp+10h] [ebp-4h] BYREF
n4a_1 = 0; /*0xffcd1e4a*/
v2 = 0; /*0xffcd1e56*/
p_n4 = 0; /*0xffcd1e58*/
n4a = 0; /*0xffcd1e5c*/
do /*0xffcd1eed*/
{
if ( ((1 << v2) & *(_DWORD *)(n4 + 246468)) != 0 ) /*0xffcd1e6d*/
{
n4a_2 = *(_BYTE *)(n4 + 246425); /*0xffcd1e6f*/
if ( n4a_1 != n4a_2 ) /*0xffcd1e77*/
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "SendData S%d -> S%d\n", n4a_2, v2); /*0xffcd1e8c*/
IioFunc48E5(n4, n4a); /*0xffcd1e96*/
IioFunc47BB(n4, n4a); /*0xffcd1ea0*/
IioFunc481F((char *)n4, n4a); /*0xffcd1eaa*/
p_n4 = p_n4 & 0xFFFF87F9 | ((v2 & 0xF) << 11) | 9; /*0xffcd1ed1*/
KtiFunc2D2F(n4, n4a, &p_n4); /*0xffcd1ed6*/
}
}
++n4a_1; /*0xffcd1ee3*/
++v2; /*0xffcd1ee5*/
n4a = n4a_1; /*0xffcd1ee6*/
}
while ( n4a_1 < 4u ); /*0xffcd1eed*/
return 0; /*0xffcd1ef3*/
}
// Function: RmtFunc1EFB @ 0xffcd1efb (0x51 bytes)
// Index: 1747/2560
int __cdecl RmtFunc1EFB(int n4)
{
unsigned __int8 n4a_1; // bl
char v2; // di
unsigned __int8 n4a; // [esp+Ch] [ebp-4h]
n4a_1 = 0; /*0xffcd1f04*/
n4a = 0; /*0xffcd1f07*/
v2 = 0; /*0xffcd1f0a*/
do /*0xffcd1f41*/
{
if ( ((1 << v2) & *(_DWORD *)(n4 + 246468)) != 0 && n4a_1 != *(_BYTE *)(n4 + 246425) ) /*0xffcd1f21*/
KtiFunc2D6B(n4, n4a, (char *)(n4 + 244313), 1u); /*0xffcd1f30*/
++n4a_1; /*0xffcd1f38*/
++v2; /*0xffcd1f3a*/
n4a = n4a_1; /*0xffcd1f3b*/
}
while ( n4a_1 < 4u ); /*0xffcd1f41*/
return 0; /*0xffcd1f43*/
}
// Function: RmtFunc1F4C @ 0xffcd1f4c (0x52 bytes)
// Index: 1748/2560
int __cdecl RmtFunc1F4C(int a1)
{
unsigned __int8 SocketNumber; // al
SocketNumber = GetSocketNumber(a1); /*0xffcd1f52*/
DebugPrint( /*0xffcd1f76*/
a1,
2,
255,
255,
255,
255,
255,
255,
"SendNvramData S%d -> S%d\n",
*(unsigned __int8 *)(a1 + 246425),
SocketNumber);
IioFunc48E5(a1, *(unsigned __int8 *)(a1 + 246425)); /*0xffcd1f84*/
IioFunc47BB(a1, *(unsigned __int8 *)(a1 + 246425)); /*0xffcd1f92*/
return 0; /*0xffcd1f9c*/
}
// Function: RmtFunc1F9E @ 0xffcd1f9e (0x52 bytes)
// Index: 1749/2560
int __cdecl RmtFunc1F9E(int a1)
{
unsigned __int8 SocketNumber; // al
SocketNumber = GetSocketNumber(a1); /*0xffcd1fa4*/
DebugPrint( /*0xffcd1fc8*/
a1,
2,
255,
255,
255,
255,
255,
255,
"SendSlaveData S%d -> S%d\n",
*(unsigned __int8 *)(a1 + 246425),
SocketNumber);
IioFunc48E5(a1, *(unsigned __int8 *)(a1 + 246425)); /*0xffcd1fd6*/
IioFunc47BB(a1, *(unsigned __int8 *)(a1 + 246425)); /*0xffcd1fe4*/
return 0; /*0xffcd1fee*/
}
// Function: RmtFunc1FF0 @ 0xffcd1ff0 (0x62 bytes)
// Index: 1750/2560
int __cdecl RmtFunc1FF0(int a1)
{
unsigned __int8 SocketNumber; // al
SocketNumber = GetSocketNumber(a1); /*0xffcd1ff6*/
DebugPrint( /*0xffcd201a*/
a1,
2,
255,
255,
255,
255,
255,
255,
"SendSlaveSsaData S%d -> S%d\n",
*(unsigned __int8 *)(a1 + 246425),
SocketNumber);
IioFunc48E5(a1, *(unsigned __int8 *)(a1 + 246425)); /*0xffcd2028*/
IioFunc47BB(a1, *(unsigned __int8 *)(a1 + 246425)); /*0xffcd2036*/
IioFunc481F(a1, *(unsigned __int8 *)(a1 + 246425)); /*0xffcd2047*/
return 0; /*0xffcd2050*/
}
// Function: RmtFunc2052 @ 0xffcd2052 (0x2a bytes)
// Index: 1751/2560
int __cdecl RmtFunc2052(int a1)
{
KtiFunc2D6B(a1, *(_BYTE *)(a1 + 246425), (char *)(a1 + 50813 * *(unsigned __int8 *)(a1 + 246425) + 58725), 4u); /*0xffcd2071*/
return 0; /*0xffcd207b*/
}
// Function: RmtFunc207C @ 0xffcd207c (0x51 bytes)
// Index: 1752/2560
int __cdecl RmtFunc207C(int n4)
{
unsigned __int8 n4a_1; // bl
char v2; // di
unsigned __int8 n4a; // [esp+Ch] [ebp-4h]
n4a_1 = 0; /*0xffcd2085*/
n4a = 0; /*0xffcd2088*/
v2 = 0; /*0xffcd208b*/
do /*0xffcd20c2*/
{
if ( ((1 << v2) & *(_DWORD *)(n4 + 246468)) != 0 && n4a_1 != *(_BYTE *)(n4 + 246425) ) /*0xffcd20a2*/
KtiFunc2D6B(n4, n4a, (char *)(n4 + 246392), 4u); /*0xffcd20b1*/
++n4a_1; /*0xffcd20b9*/
++v2; /*0xffcd20bb*/
n4a = n4a_1; /*0xffcd20bc*/
}
while ( n4a_1 < 4u ); /*0xffcd20c2*/
return 0; /*0xffcd20c4*/
}
// Function: RmtFunc20CD @ 0xffcd20cd (0x56 bytes)
// Index: 1753/2560
int __cdecl RmtFunc20CD(int n4)
{
unsigned __int8 n4a_1; // bl
char v2; // di
unsigned __int8 n4a; // [esp+Ch] [ebp-4h]
n4a_1 = 0; /*0xffcd20d6*/
n4a = 0; /*0xffcd20d9*/
v2 = 0; /*0xffcd20dc*/
do /*0xffcd2113*/
{
if ( ((1 << v2) & *(_DWORD *)(n4 + 246468)) != 0 && n4a_1 != *(_BYTE *)(n4 + 246425) ) /*0xffcd20f3*/
KtiFunc2D6B(n4, n4a, (char *)(n4 + 246400), 4u); /*0xffcd2102*/
++n4a_1; /*0xffcd210a*/
++v2; /*0xffcd210c*/
n4a = n4a_1; /*0xffcd210d*/
}
while ( n4a_1 < 4u ); /*0xffcd2113*/
return *(unsigned __int8 *)(n4 + 246400); /*0xffcd211c*/
}
// Function: RmtFunc2123 @ 0xffcd2123 (0x79 bytes)
// Index: 1754/2560
int __cdecl RmtFunc2123(int n4)
{
unsigned __int8 n4a_1; // bl
unsigned __int8 SocketNumber; // dl
int v3; // edi
unsigned __int8 SocketNumber_1; // [esp+13h] [ebp-5h]
unsigned __int8 n4a; // [esp+14h] [ebp-4h]
n4a_1 = 0; /*0xffcd2133*/
SocketNumber = GetSocketNumber(n4); /*0xffcd2135*/
SocketNumber_1 = SocketNumber; /*0xffcd2138*/
v3 = 0; /*0xffcd213c*/
n4a = 0; /*0xffcd213e*/
do /*0xffcd2191*/
{
if ( ((1 << v3) & *(_DWORD *)(n4 + 246468)) != 0 && n4a_1 != *(_BYTE *)(n4 + 246425) ) /*0xffcd215c*/
{
DebugPrint(n4, 2, 255, 255, 255, 255, 255, 255, "SendVarData S%d -> S%d\n", v3, SocketNumber); /*0xffcd2171*/
IioFunc48E5(n4, n4a); /*0xffcd217b*/
SocketNumber = SocketNumber_1; /*0xffcd2180*/
}
++n4a_1; /*0xffcd2187*/
++v3; /*0xffcd2189*/
n4a = n4a_1; /*0xffcd218a*/
}
while ( n4a_1 < 4u ); /*0xffcd2191*/
return 0; /*0xffcd2193*/
}
// Function: RmtFunc219C @ 0xffcd219c (0x70 bytes)
// Index: 1755/2560
int __cdecl RmtFunc219C(int n4)
{
unsigned __int8 n4a_1; // bl
char v2; // bp
_BYTE *v3; // edx
unsigned __int8 n4a; // [esp+10h] [ebp-8h]
_BYTE *v6; // [esp+14h] [ebp-4h]
n4a_1 = 0; /*0xffcd21a6*/
n4a = 0; /*0xffcd21a8*/
v2 = 0; /*0xffcd21ac*/
v3 = (_BYTE *)(n4 + 58725); /*0xffcd21ae*/
v6 = (_BYTE *)(n4 + 58725); /*0xffcd21b4*/
do /*0xffcd2201*/
{
if ( ((1 << v2) & *(_DWORD *)(n4 + 246468)) != 0 && n4a_1 != *(_BYTE *)(n4 + 246425) ) /*0xffcd21cd*/
{
KtiFunc2D6B(n4, n4a, (char *)(n4 + 9405), 4u); /*0xffcd21dd*/
v3 = v6; /*0xffcd21e2*/
*v6 = *(_BYTE *)(n4 + 9405); /*0xffcd21eb*/
}
++n4a_1; /*0xffcd21ed*/
v3 += 50813; /*0xffcd21ef*/
++v2; /*0xffcd21f5*/
n4a = n4a_1; /*0xffcd21f6*/
v6 = v3; /*0xffcd21fa*/
}
while ( n4a_1 < 4u ); /*0xffcd2201*/
return 0; /*0xffcd2203*/
}
// Function: RmtCtlMargin @ 0xffcd220c (0x4d bytes)
// Index: 1756/2560
int __cdecl RmtCtlMargin(int a1)
{
int v3; // [esp+4h] [ebp-4h] BYREF
v3 = 0; /*0xffcd2210*/
((void (__cdecl *)(int, _DWORD))loc_FFCB34EA)(a1, *(unsigned __int8 *)(a1 + 246425)); /*0xffcd2221*/
KtiFunc353D(a1, *(unsigned __int8 *)(a1 + 246425), 16); /*0xffcd2231*/
v3 = 0; /*0xffcd2236*/
KtiFunc35AE(a1, *(unsigned __int8 *)(a1 + 246425), &v3); /*0xffcd224a*/
return 0; /*0xffcd2254*/
}
// Function: MemPointTest @ 0xffcd2259 (0xa8b bytes)
// Index: 1757/2560
int __cdecl MemPointTest(unsigned __int8 *__return_address, int n4, int n63, unsigned __int8 *n0x12, int a5, int *a6)
{
int v6; // edi
int v7; // esi
bool v8; // al
unsigned __int8 *n0x12_1; // esi
unsigned __int8 n6_1; // dl
int v11; // ecx
unsigned __int8 *v12; // esi
unsigned __int8 n6_2; // dl
int v14; // ecx
unsigned __int8 *v15; // esi
unsigned __int8 n6_3; // dl
int v17; // ecx
unsigned __int8 *v18; // esi
unsigned __int8 v19; // al
char *v20; // esi
unsigned __int8 n6_4; // dl
int v22; // ecx
int v23; // eax
unsigned __int16 v24; // ax
unsigned __int8 n2a; // al
char v26; // al
char v27; // al
char v28; // al
char v29; // al
char v30; // al
unsigned __int8 *v31; // esi
unsigned __int8 n6_5; // dl
int v33; // ecx
unsigned __int8 v34; // al
unsigned __int8 *v35; // esi
unsigned __int8 n6_6; // dl
int v37; // ecx
int v38; // esi
char v39; // al
int v40; // ecx
int v41; // eax
unsigned __int8 *n0x12_2; // esi... [17783 chars total]
// Function: RmtFunc2CE4 @ 0xffcd2ce4 (0x130 bytes)
// Index: 1758/2560
int __cdecl RmtFunc2CE4(int a1, int a2, int a3, 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( /*0xffcd2d18*/
a1,
32,
a2,
a3,
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(a1, a2, a3); /*0xffcd2d29*/
v6 = 0; /*0xffcd2d31*/
CpuCount_1 = CpuCount; /*0xffcd2d36*/
v8 = *a5; /*0xffcd2d38*/
n9 = 1; /*0xffcd2d3b*/
v10 = 1379 * (unsigned __int8)a4; /*0xffcd2d3d*/
v11 = 0; /*0xffcd2d46*/
v19 = a5[1]; /*0xffcd2d48*/
v12 = 0; /*0xffcd2d4c*/
v13 = 0; /*0xffcd2d52*/
do /*0xffcd2ddc*/
{
v14 = v8 >> v12; /*0xffcd2d54*/
if ( (_BYTE)v14 ) /*0xffcd2d5c*/
{
if ( *(_BYTE *)(v10 + CpuCount_1 + 104) ) /*0xffcd2d5e*/
{
if ( (v14 & 0xF) != 0 ) /*0xffcd2d67*/
v6 |= 1 << (n9 - 1); /*0xffcd2d6f*/
if ( (v14 & 0xF0) != 0 ) /*0xffcd2d78*/
v6 |= 1 << n9; /*0xffcd2d82*/
}
else if ( v13 != -1 ) /*0xffcd2d8a*/
{
v6 |= 1 << v11; /*0xffcd2d8c*/
}
}
v15 = v19 >> v12; /*0xffcd2d93*/
if ( (unsigned __int8)(v19 >> v12) ) /*0xffcd2d93*/
{
if ( !*(_BYTE *)(v10 + CpuCount_1 + 104) ) /*0xffcd2da2*/
{
v16 = v13 + 4; /*0xffcd2dc0*/
LABEL_17:
if ( v16 != -1 ) /*0xffcd2dc4*/
v6 |= 1 << v16; /*0xffcd2dc9*/
goto LABEL_19; /*0xffcd2dc9*/
}
if ( (v15 & 0xF) != 0 ) /*0xffcd2da6*/
{
v6 |= 1 << (n9 + 7); /*0xffcd2dae*/
v15 = v19 >> v12; /*0xffcd2db1*/
}
if ( (v15 & 0xF0) != 0 ) /*0xffcd2db7*/
{
v16 = n9 + 8; /*0xffcd2db9*/
goto LABEL_17; /*0xffcd2dbc*/
}
}
LABEL_19:
v8 = *a5; /*0xffcd2dcc*/
++v13; /*0xffcd2dd0*/
n9 += 2; /*0xffcd2dd2*/
++v11; /*0xffcd2dd5*/
v12 += 8; /*0xffcd2dd6*/
}
while ( (unsigned __int8)n9 < 9u ); /*0xffcd2ddc*/
v17 = a5[2]; /*0xffcd2de6*/
if ( (_BYTE)v17 ) /*0xffcd2deb*/
{
if ( *(_BYTE *)(v10 + CpuCount_1 + 104) ) /*0xffcd2ded*/
{
if ( (v17 & 0xF) != 0 ) /*0xffcd2df6*/
v6 |= 0x10000u; /*0xffcd2df8*/
if ( (v17 & 0xF0) != 0 ) /*0xffcd2dfe*/
return v6 | 0x20000; /*0xffcd2e00*/
}
else
{
return v6 | 0x100; /*0xffcd2e06*/
}
}
return v6; /*0xffcd2e0a*/
}
// Function: DdrTrainResultMatch @ 0xffcd2e14 (0x15e bytes)
// Index: 1759/2560
char __cdecl DdrTrainResultMatch(
unsigned __int8 *__return_address,
_BYTE *n4,
char k,
unsigned __int8 j,
unsigned int ja,
_BYTE *buf,
int *p_n63,
_DWORD *a8)
{
unsigned __int8 ja_1; // bl
int j_1; // esi
char v10; // cl
int v12; // esi
int CpuCount; // edx
unsigned __int8 n2; // bh
int v15; // eax
_DWORD *v17; // esi
char v18; // [esp+13h] [ebp-15h]
int v19; // [esp+14h] [ebp-14h]
unsigned __int8 v20; // [esp+18h] [ebp-10h]
int v21; // [esp+1Ch] [ebp-Ch]
int CpuCount_1; // [esp+20h] [ebp-8h]
char ka; // [esp+34h] [ebp+Ch]
if ( ((1 << k) & *p_n63) != 0 /*0xffcd2e67*/
&& (LOBYTE(v19) = DdrTrainFunc45AB((int)__return_address, (unsigned __int8)n4, k),
ja_1 = j,
j_1 = j,
v10 = DdrTrainFunc459C(v19, k),
v18 = v10,
j < ja) )
{
while ( 1 ) /*0xffcd2e75*/
{
v12 = 2 * j_1; /*0xffcd2e75*/
if ( (buf[8 * v12] & 1) != 0 /*0xffcd2ea1*/
&& (_BYTE)v19 == buf[8 * v12 + 2]
&& (_BYTE)n4 == buf[8 * v12 + 1]
&& v10 == buf[8 * v12 + 3] )
{
break; /*0xffcd2ea1*/
}
LABEL_16:
j_1 = ++ja_1; /*0xffcd2f34*/
if ( ja_1 >= ja ) /*0xffcd2f3b*/
goto LABEL_17; /*0xffcd2f3b*/
}
CpuCount = GetCpuCount((int)__return_address, (unsigned __int8)n4, k); /*0xffcd2eb5*/
n2 = 0; /*0xffcd2eb7*/
CpuCount_1 = CpuCount; /*0xffcd2eb9*/
v20 = 0; /*0xffcd2ebd*/
while ( 1 ) /*0xffcd2ec4*/
{
v15 = 1379 * n2; /*0xffcd2ec4*/
v21 = v15; /*0xffcd2eca*/
if ( *(_BYTE *)(v15 + CpuCount) ) /*0xffcd2ece*/
{
if ( buf[8 * v12 + 4] == n2 ) /*0xffcd2ed8*/
{
ka = 0; /*0xffcd2edf*/
if ( *(_BYTE *)(v15 + CpuCount + 19) ) /*0xffcd2eda*/
break; /*0xffcd2eda*/
}
}
LABEL_14:
v20 = ++n2; /*0xffcd2f25*/
if ( n2 >= 2u ) /*0xffcd2f2c*/
{
v10 = v18; /*0xffcd2f2e*/
goto LABEL_16; /*0xffcd2f2e*/
}
}
while ( KtiFunc89E9((int)__return_address, (char)n4, k, v20, ka, 0) || buf[8 * v12 + 5] != ka ) /*0xffcd2f0d*/
{
CpuCount = CpuCount_1; /*0xffcd2f15*/
if ( (unsigned __int8)++ka >= *(_BYTE *)(v21 + CpuCount_1 + 19) ) /*0xffcd2f21*/
goto LABEL_14; /*0xffcd2f21*/
}
v17 = &buf[16 * ja_1 + 4]; /*0xffcd2f67*/
*a8 = *v17++; /*0xffcd2f6d*/
a8[1] = *v17; /*0xffcd2f6e*/
a8[2] = v17[1]; /*0xffcd2f6f*/
return ja_1 + 1; /*0xffcd2f6b*/
}
else
{
LABEL_17:
*p_n63 &= ~(1 << k); /*0xffcd2f41*/
return -1; /*0xffcd2f50*/
}
}
// Function: RmtFn_FFCD2F72 @ 0xffcd2f72 (0x13c bytes)
// Index: 1760/2560
char __cdecl RmtFn_FFCD2F72(
_BYTE *src_,
_BYTE *__return_address,
int n6,
int a4,
int a5,
unsigned __int8 a6,
int n0x12,
unsigned __int8 a8)
{
unsigned __int8 n0x10; // bl
if ( *(_BYTE *)(7688 * (unsigned __int8)n6 + GetSocketInfo((int)src_, (unsigned __int8)__return_address) + 6262) == 2 ) /*0xffcd2f9b*/
n0x10 = a6 + 2 * (a4 + 2 * a5); /*0xffcd2fa9*/
else
n0x10 = a5 + 4 * a4; /*0xffcd2fb6*/
if ( (unsigned __int8)n6 >= 6u )
{
AssertPrint(
src_,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemPPR.c",
927,
"Ch < MAX_CH");
ProcMemInitCheck((int)src_, 242, 91); /*0xffcd2fe7*/
}
if ( n0x10 >= 0x10u )
{
AssertPrint(
src_,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemPPR.c",
928,
"DramRankOnCh < (MAX_DIMM * MAX_RANK_DIMM_3DS * MAX_SUBRANK_3DS)");
ProcMemInitCheck((int)src_, 242, 91); /*0xffcd3017*/
}
if ( (unsigned __int8)n0x12 >= 0x12u )
{
AssertPrint(
src_,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemPPR.c",
929,
"Strobe < MAX_STROBE");
ProcMemInitCheck((int)src_, 242, 91); /*0xffcd3049*/
}
if ( ((unsigned __int8)(1 << a8) & src_[288 * (unsigned __int8)n6 + 229662 + 18 * n0x10 + (unsigned __int8)n0x12]) == 0 ) /*0xffcd3078*/
return 1; /*0xffcd30a7*/
DebugPrint(
(int)src_,
3,
(int)__return_address,
n6,
a4,
a5,
n0x12,
255,
"GetPprResourceAvailable: Warning - Subrank %d, BankGroup %d PPR resource not available.\n",
a6,
a8);
return 0; /*0xffcd30a9*/
}
// Function: RmtFn_FFCD30AE @ 0xffcd30ae (0x59 bytes)
// Index: 1761/2560
bool __cdecl RmtFn_FFCD30AE(_BYTE *__return_address, _BYTE *a2)
{
unsigned __int8 v2; // bl
ProcCommonFuncFAA4((int)__return_address, 1, 1); /*0xffcd30bb*/
AutoGenFunc804(0x70u, 0x47u); /*0xffcd30c4*/
v2 = AutoGenFunc7FD(0x71u); /*0xffcd30d7*/
ProcCommonFuncFAA4((int)__return_address, 1, 0); /*0xffcd30d9*/
LogDebugString(
__return_address,
(int)"IsPprDataConsumed: Socket = %d, Getting CMOS Value = %x\n",
(unsigned __int8)a2,
v2);
return ((1 << (char)a2) & v2) != 0; /*0xffcd30ff*/
}
// Function: RmtFunc3107 @ 0xffcd3107 (0xbc bytes)
// Index: 1762/2560
int __cdecl RmtFunc3107(
_BYTE *__return_address,
int buf,
int n6,
int a4,
int a5,
int n45,
unsigned __int8 n8,
int src_,
int a9,
int a10,
int a11,
int a12,
int a13,
int a14,
int a15,
int a16,
int a17,
int a18,
int a19)
{
int result; // eax
int src[11]; // [esp-30h] [ebp-6Ch] BYREF
_DWORD src_1[11]; // [esp+Ch] [ebp-30h] BYREF
int v22; // [esp+38h] [ebp-4h] BYREF
qmemcpy(src, &src_, sizeof(src)); /*0xffcd3126*/
if ( RmtFn_FFCD31C3( /*0xffcd3134*/
(int)__return_address,
buf,
n6,
a4,
a5,
n8,
src[0],
src[1],
src[2],
src[3],
src[4],
src[5],
src[6],
src[7],
src[8],
src[9],
src[10],
(unsigned int *)&v22) )
{
result = v22; /*0xffcd3140*/
++*(_DWORD *)(v22 + 66); /*0xffcd3143*/
}
else
{
src_1[0] = src_; /*0xffcd3151*/
src_1[1] = a9; /*0xffcd315a*/
src_1[2] = a10; /*0xffcd3160*/
src_1[3] = a11; /*0xffcd3166*/
src_1[4] = a12; /*0xffcd316c*/
src_1[5] = a13; /*0xffcd3172*/
src_1[6] = a14; /*0xffcd3178*/
src_1[7] = a15; /*0xffcd317e*/
src_1[8] = a16; /*0xffcd3187*/
src_1[9] = a17; /*0xffcd318f*/
src_1[10] = a18; /*0xffcd3195*/
qmemcpy(src, src_1, sizeof(src)); /*0xffcd31a1*/
return KtiFunc1678( /*0xffcd31b4*/
__return_address,
48,
n45,
buf,
n6,
a4,
a5,
1,
n8,
src[0],
src[1],
src[2],
src[3],
src[4],
src[5],
src[6],
src[7],
src[8],
src[9],
src[10],
a19);
}
return result; /*0xffcd31bc*/
}
// Function: RmtFn_FFCD31C3 @ 0xffcd31c3 (0x91 bytes)
// Index: 1763/2560
char __cdecl RmtFn_FFCD31C3(
int __return_address,
int buf,
char n6,
char a4,
char a5,
unsigned __int8 n255,
char a7,
int a8,
int a9,
int a10,
int a11,
int a12,
int a13,
int a14,
int a15,
int a16,
int a17,
unsigned int *a18)
{
unsigned int v18; // edi
unsigned int v19; // esi
BYTE1(buf) = n6; /*0xffcd31d3*/
BYTE2(buf) = a4; /*0xffcd31db*/
v18 = 0; /*0xffcd31de*/
HIBYTE(buf) = a5; /*0xffcd31e3*/
if ( *(_DWORD *)(__return_address + 251136) ) /*0xffcd31e6*/
{
while ( 1 ) /*0xffcd31f4*/
{
v19 = v18 + __return_address + 251148; /*0xffcd31f4*/
if ( *(_DWORD *)v19 == 4 /*0xffcd322e*/
&& !AutoGenFunc8E45(v19 + 22, &a7, 44)
&& !AutoGenFunc8E45(v19 + 14, (char *)&buf, 4)
&& *(_DWORD *)(v19 + 18) == n255 )
{
break; /*0xffcd322e*/
}
v18 += *(unsigned __int16 *)(v19 + 4); /*0xffcd3234*/
if ( v18 >= *(_DWORD *)(__return_address + 251136) ) /*0xffcd323c*/
goto LABEL_7; /*0xffcd323c*/
}
*a18 = v19; /*0xffcd324e*/
return 1; /*0xffcd3250*/
}
else
{
LABEL_7:
*a18 = 0; /*0xffcd323e*/
return 0; /*0xffcd3244*/
}
}
// Function: RmtFn_FFCD3254 @ 0xffcd3254 (0x4ed bytes)
// Index: 1764/2560
int __cdecl RmtFn_FFCD3254(
unsigned __int8 *__return_address,
_BYTE *n4,
int n63,
char a4,
_BYTE *a5,
unsigned int j,
_BYTE *buf,
_DWORD *a8)
{
_BYTE *n4_1; // ebx
int SocketInfo; // edx
int v10; // ecx
unsigned __int8 *p_n63_1; // ebp
int n63_1; // edx
unsigned __int8 n6; // bh
unsigned __int8 n63_2; // bl
int CpuCount; // ecx
int v16; // eax
int n63_3; // edi
int v18; // ebp
unsigned __int8 n; // al
char v20; // al
int n63_5; // ebp
char v22; // di
unsigned __int8 *v23; // eax
int v24; // edx
char v25; // cl
int v26; // ebp
unsigned __int8 *v27; // eax
int v28; // eax
int i; // [esp+4h] [ebp-90h]
char *v31; // [esp+4h] [ebp-90h]
unsigned __int8 *v32; // [esp+4h] [ebp-90h]
unsigned __int8 *v33; // [esp+4h] [ebp-90h]
int k; // [esp+8h] [ebp-8Ch]
int v35; // [esp+Ch] [ebp-88h]
_BYTE *SocketInfo_2; // [esp+Ch] [ebp-88h]
int n63_4; // [esp+Ch] [ebp-88h]
int *v38; //... [8753 chars total]
// Function: RmtFunc3741 @ 0xffcd3741 (0x114 bytes)
// Index: 1765/2560
int __cdecl RmtFunc3741(unsigned __int8 *__return_address, char a2)
{
unsigned __int8 *__return_address_1; // ebx
int v3; // ebp
_DWORD *v4; // ecx
int n20; // edx
unsigned __int8 *v6; // edi
unsigned __int8 *__return_address_2; // [esp-8h] [ebp-1Ch]
int n63; // [esp+10h] [ebp-4h]
__return_address_1 = __return_address; /*0xffcd3743*/
v3 = 0; /*0xffcd3750*/
__return_address_2 = __return_address; /*0xffcd3757*/
LOBYTE(__return_address) = __return_address[9402]; /*0xffcd3758*/
LogDebugString(__return_address_2, (int)"calling PostPackageRepair\n"); /*0xffcd375c*/
if ( __return_address_1[244267] ) /*0xffcd3761*/
{
n63 = *((_DWORD *)__return_address_1 + 61067); /*0xffcd37b7*/
}
else
{
n63 = 63; /*0xffcd376c*/
if ( !*(_DWORD *)(__return_address_1 + 213441) ) /*0xffcd3774*/
{
v4 = __return_address_1 + 1044; /*0xffcd377e*/
n20 = 20; /*0xffcd3784*/
do /*0xffcd37ad*/
{
if ( *(_BYTE *)v4 == 1 ) /*0xffcd3788*/
{
v6 = &__return_address_1[16 * *(_DWORD *)(__return_address_1 + 213441) + 213445]; /*0xffcd379b*/
*(_DWORD *)v6 = *v4; /*0xffcd379d*/
v6 += 4; /*0xffcd379d*/
*(_DWORD *)v6 = v4[1]; /*0xffcd379e*/
v6 += 4; /*0xffcd379e*/
*(_DWORD *)v6 = v4[2]; /*0xffcd379f*/
*((_DWORD *)v6 + 1) = v4[3]; /*0xffcd37a0*/
++*(_DWORD *)(__return_address_1 + 213441); /*0xffcd37a1*/
}
v4 += 4; /*0xffcd37a7*/
--n20; /*0xffcd37aa*/
}
while ( n20 ); /*0xffcd37ad*/
}
}
if ( !RmtFn_FFCD30AE(__return_address_1, __return_address) || __return_address_1[1043] == 2 ) /*0xffcd37d3*/
{
LogDebugString(__return_address_1, (int)"calling PostPackageRepair\n"); /*0xffcd37db*/
v3 = RmtFn_FFCD3254( /*0xffcd3817*/
__return_address_1,
__return_address,
n63,
__return_address_1[1043],
&__return_address_1[(unsigned __int8)__return_address + 214125],
*(_DWORD *)(__return_address_1 + 213441),
__return_address_1 + 213445,
__return_address_1 + 214085);
if ( a2 == 1 ) /*0xffcd381e*/
RmtFunc3863( /*0xffcd3830*/
__return_address_1,
__return_address,
(int)(__return_address_1 + 213445),
*(_DWORD *)(__return_address_1 + 213441),
(int)(__return_address_1 + 214085));
LogDebugString(__return_address_1, (int)"Setting PPR Data Consumed\n"); /*0xffcd383e*/
RmtFunc3C09(__return_address_1, __return_address); /*0xffcd3845*/
}
return v3; /*0xffcd384d*/
}
// Function: RmtCtlVrefMargin @ 0xffcd3855 (0xe bytes)
// Index: 1766/2560
int __cdecl RmtCtlVrefMargin(int a1)
{
return RmtFunc3741(a1, 1); /*0xffcd3862*/
}
// Function: RmtFunc3863 @ 0xffcd3863 (0x2b0 bytes)
// Index: 1767/2560
char __cdecl RmtFunc3863(_BYTE *__return_address, _BYTE *buf, int a3, unsigned int j, int a5)
{
char v5; // cl
unsigned int j_1; // ebp
unsigned __int8 *v7; // ebx
_BYTE *__return_address_1; // edi
int CpuCount; // eax
bool v10; // zf
unsigned __int8 v11; // si
int v12; // eax
char n2; // cl
int v15; // [esp-40h] [ebp-A0h]
char v16; // [esp-3Ch] [ebp-9Ch]
char v17; // [esp-38h] [ebp-98h]
int dst[11]; // [esp-30h] [ebp-90h] BYREF
int v19; // [esp-4h] [ebp-64h]
char v20; // [esp+12h] [ebp-4Eh]
char v21; // [esp+13h] [ebp-4Dh]
unsigned __int8 n6[4]; // [esp+14h] [ebp-4Ch]
unsigned __int8 n0x12[4]; // [esp+18h] [ebp-48h]
int v24; // [esp+1Ch] [ebp-44h]
unsigned int v25; // [esp+20h] [ebp-40h] BYREF
signed int v26; // [esp+24h] [ebp-3Ch]
int bufa; // [esp+28h] [ebp-38h] BYREF
int v28; // [esp+2Ch] [ebp-34h]
int v29; // [esp+30h] [ebp-30h]
_DWORD src[11]; // [esp+34h] [ebp-2Ch] BYREF
v5 = 0; /*0xffcd3868*/
j_1 = 0; /*0xffcd386a*/
v20 = 0; /*0xffcd386e*/
if ( j )
{
v7 = (unsigned __int8 *)(a3 + 11); /*0xffcd3880*/
do
{
if ( *(v7 - 11) == 1 && *(v7 - 10) == (_BYTE)buf && !*(_BYTE *)(a5 + j_1) )
{
__return_address_1 = __return_address; /*0xffcd38ac*/
n6[0] = *(v7 - 8) + 3 * *(v7 - 9); /*0xffcd38b6*/
CpuCount = GetCpuCount((int)__return_address, (unsigned __int8)buf, n6[0]); /*0xffcd38c0*/
n0x12[0] = 0; /*0xffcd38c7*/
v10 = *(_BYTE *)(1379 * *(v7 - 7) + CpuCount + 104) == 0; /*0xffcd38e1*/
v24 = *(_BYTE *)(1379 * *(v7 - 7) + CpuCount + 104) != 0 ? 15 : 255;
v21 = v10 + 1; /*0xffcd38fd*/
v11 = 0; /*0xffcd3907*/
v26 = 0x12u / (unsigned __int8)(v10 + 1); /*0xffcd3909*/
do
{
memset_save_flags(&bufa, 0, 0xCu); /*0xffcd3916*/
if ( ((1 << v11) & *((_DWORD *)v7 - 1)) != 0 )
{
src[5] = 0; /*0xffcd393f*/
src[6] = 0; /*0xffcd3944*/
v20 = 1; /*0xffcd3949*/
*(&bufa + ((unsigned __int8)(n0x12[0] * v21) >> 3)) |= v24 << (4 * ((n0x12[0] * v21) & 7)); /*0xffcd395e*/
src[1] = v28; /*0xffcd396a*/
src[3] = v28; /*0xffcd396e*/
src[4] = v29 | (v29 << 8); /*0xffcd397d*/
src[7] = *(_DWORD *)(v7 + 1); /*0xffcd3984*/
src[8] = *v7; /*0xffcd398b*/
v19 = *(v7 - 6); /*0xffcd3993*/
LOBYTE(dst[10]) = *(v7 - 7); /*0xffcd3998*/
src[0] = bufa; /*0xffcd399d*/
src[2] = bufa; /*0xffcd39a5*/
src[9] = (unsigned __int8)KtiFunc88D1((int)__return_address_1, (unsigned __int8)buf, n6[0], dst[10], v19); /*0xffcd39b5*/
src[10] = *(v7 - 5); /*0xffcd39c1*/
v12 = *(v7 - 6); /*0xffcd39c5*/
v19 = 1; /*0xffcd39c9*/
v15 = *(v7 - 7); /*0xffcd39df*/
qmemcpy(dst, src, sizeof(dst)); /*0xffcd39e4*/
RmtFunc3107( /*0xffcd39f4*/
__return_address,
(int)buf,
*(int *)n6,
v15,
v12,
46,
0xFFu,
dst[0],
dst[1],
dst[2],
dst[3],
dst[4],
dst[5],
dst[6],
dst[7],
dst[8],
dst[9],
dst[10],
1);
v19 = (int)&v25; /*0xffcd3a04*/
v17 = *(v7 - 6); /*0xffcd3a16*/
v16 = *(v7 - 7); /*0xffcd3a1b*/
qmemcpy(dst, src, sizeof(dst)); /*0xffcd3a20*/
__return_address_1 = __return_address; /*0xffcd3a29*/
if ( RmtFn_FFCD31C3(
(int)__return_address,
(int)buf,
n6[0],
v16,
v17,
0xFFu,
dst[0],
dst[1],
dst[2],
dst[3],
dst[4],
dst[5],
dst[6],
dst[7],
dst[8],
dst[9],
dst[10],
&v25) )
{
n2 = __return_address[1043]; /*0xffcd3a3e*/
if ( n2 == 1 && *(_DWORD *)(v25 + 66) >= 3u || n2 == 2 && *(_DWORD *)(v25 + 66) ) /*0xffcd3a5c*/
RmtFunc3C66(__return_address, buf, n6[0], *(v7 - 7), *(v7 - 6), *(v7 - 5), n0x12[0], *v7 >> 2, 0); /*0xffcd3a86*/
}
else
{
RmtFunc3C66(__return_address, buf, n6[0], *(v7 - 7), *(v7 - 6), *(v7 - 5), n0x12[0], *v7 >> 2, 0); /*0xffcd3ab4*/
DebugPrint(
(int)__return_address,
2,
(int)buf,
*(int *)n6,
*(v7 - 7),
*(v7 - 6),
255,
255,
"PostPackageRepairStatus: PPR entry(%d) not found in EWL, so limiting repairs to one per BG!\n",
j_1);
}
}
v11 = ++n0x12[0]; /*0xffcd3ae6*/
}
while ( n0x12[0] < v26 );
}
++j_1; /*0xffcd3af7*/
v7 += 16; /*0xffcd3af8*/
}
while ( j_1 < j );
return v20; /*0xffcd3b05*/
}
return v5; /*0xffcd3b09*/
}
// Function: RmtFunc3B13 @ 0xffcd3b13 (0xf6 bytes)
// Index: 1768/2560
unsigned int __cdecl RmtFunc3B13(int __return_address, char n4, char n6, char a4)
{
unsigned __int8 n20_3; // dl
unsigned __int8 n20; // bl
unsigned int n20_1; // eax
unsigned int n20_2; // edi
int v8; // ecx
int v9; // ebp
n20_3 = 0; /*0xffcd3b17*/
n20 = 20; /*0xffcd3b1e*/
do /*0xffcd3bfe*/
{
n20_1 = 16 * n20_3; /*0xffcd3b2c*/
if ( (*(_BYTE *)(n20_1 + __return_address + 1044) & 1) != 0 /*0xffcd3b6a*/
&& *(_BYTE *)(n20_1 + __return_address + 1048) == a4
&& *(_BYTE *)(n20_1 + __return_address + 1045) == n4
&& *(_BYTE *)(n20_1 + __return_address + 1047) == n6
&& n20_3 < n20 )
{
n20_2 = n20_3 + 1; /*0xffcd3b73*/
v8 = n20_1 + __return_address + 1061; /*0xffcd3b7e*/
v9 = (unsigned __int8)(n20 - n20_3); /*0xffcd3b84*/
n20_1 = n20; /*0xffcd3b87*/
do /*0xffcd3bf4*/
{
if ( n20_2 >= n20_1 ) /*0xffcd3b8d*/
{
*(_DWORD *)(v8 - 5) = 0; /*0xffcd3bd0*/
*(_DWORD *)(v8 - 10) = 0; /*0xffcd3bd4*/
*(_DWORD *)(v8 - 17) = 0; /*0xffcd3bd8*/
*(_WORD *)(v8 - 13) = 0; /*0xffcd3bdf*/
*(_BYTE *)(v8 - 6) = 0; /*0xffcd3be5*/
*(_BYTE *)(v8 - 11) = 0; /*0xffcd3be9*/
}
else
{
*(_BYTE *)(v8 - 17) = *(_BYTE *)(v8 - 1); /*0xffcd3b92*/
*(_BYTE *)(v8 - 16) = *(_BYTE *)v8; /*0xffcd3b97*/
*(_BYTE *)(v8 - 15) = *(_BYTE *)(v8 + 1); /*0xffcd3b9d*/
*(_BYTE *)(v8 - 14) = *(_BYTE *)(v8 + 2); /*0xffcd3ba3*/
*(_BYTE *)(v8 - 13) = *(_BYTE *)(v8 + 3); /*0xffcd3ba9*/
*(_BYTE *)(v8 - 12) = *(_BYTE *)(v8 + 4); /*0xffcd3baf*/
*(_BYTE *)(v8 - 6) = *(_BYTE *)(v8 + 10); /*0xffcd3bb5*/
*(_DWORD *)(v8 - 5) = *(_DWORD *)(v8 + 11); /*0xffcd3bbb*/
*(_BYTE *)(v8 - 11) = *(_BYTE *)(v8 + 5); /*0xffcd3bc1*/
*(_DWORD *)(v8 - 10) = *(_DWORD *)(v8 + 6); /*0xffcd3bc7*/
n20_1 = n20; /*0xffcd3bca*/
}
++n20_2; /*0xffcd3bed*/
v8 += 16; /*0xffcd3bee*/
--v9; /*0xffcd3bf1*/
}
while ( v9 ); /*0xffcd3bf4*/
--n20_3; /*0xffcd3bf6*/
--n20; /*0xffcd3bf8*/
}
++n20_3; /*0xffcd3bfa*/
}
while ( n20_3 < n20 ); /*0xffcd3bfe*/
return n20_1; /*0xffcd3c04*/
}
// Function: RmtFunc3C09 @ 0xffcd3c09 (0x5d bytes)
// Index: 1769/2560
int __cdecl RmtFunc3C09(_BYTE *__return_address, _BYTE *a2)
{
unsigned __int8 v2; // al
int v3; // ebx
ProcCommonFuncFAA4((int)__return_address, 1, 1); /*0xffcd3c15*/
AutoGenFunc804(0x70u, 0x47u); /*0xffcd3c1e*/
v2 = AutoGenFunc7FD(0x71u); /*0xffcd3c29*/
v3 = v2 | (1 << (char)a2); /*0xffcd3c31*/
AutoGenFunc804(0x71u, v2 | (1 << (char)a2)); /*0xffcd3c3c*/
ProcCommonFuncFAA4((int)__return_address, 1, 0); /*0xffcd3c48*/
return LogDebugString(
__return_address,
(int)"SetPprDataConsumed: Socket = %d, Setting CMOS Value = %x\n",
(unsigned __int8)a2,
(unsigned __int8)v3);
}
// Function: RmtFunc3C66 @ 0xffcd3c66 (0x117 bytes)
// Index: 1770/2560
int __cdecl RmtFunc3C66(
_BYTE *__return_address,
_BYTE *buf,
unsigned __int8 n6,
char a4,
char a5,
char a6,
unsigned __int8 n0x12,
unsigned __int8 a8,
char a9)
{
unsigned __int8 n0x10; // bl
int result; // eax
_BYTE *v11; // esi
int v12; // ecx
int v13; // ecx
if ( *(_BYTE *)(7688 * n6 + GetSocketInfo((int)__return_address, (unsigned __int8)buf) + 6262) == 2 ) /*0xffcd3c8e*/
n0x10 = a6 + 2 * (a4 + 2 * a5); /*0xffcd3c9c*/
else
n0x10 = a5 + 4 * a4; /*0xffcd3ca9*/
if ( n6 >= 6u )
{
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemPPR.c",
983,
"Ch < MAX_CH");
ProcMemInitCheck((int)__return_address, 242, 91); /*0xffcd3cdb*/
}
if ( n0x10 >= 0x10u )
{
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemPPR.c",
984,
"DramRankOnCh < (MAX_DIMM * MAX_RANK_DIMM_3DS * MAX_SUBRANK_3DS)");
ProcMemInitCheck((int)__return_address, 242, 91); /*0xffcd3d0b*/
}
if ( n0x12 >= 0x12u )
{
AssertPrint(
__return_address,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Mem\\MemPPR.c",
985,
"Strobe < MAX_STROBE");
ProcMemInitCheck((int)__return_address, 242, 91); /*0xffcd3d3f*/
}
result = a8; /*0xffcd3d5b*/
v11 = &__return_address[288 * n6 + 229662 + 18 * n0x10]; /*0xffcd3d61*/
v12 = (unsigned __int8)v11[n0x12]; /*0xffcd3d68*/
if ( a9 ) /*0xffcd3d6c*/
v13 = v12 & ~(1 << a8); /*0xffcd3d6e*/
else
v13 = v12 | (1 << a8); /*0xffcd3d73*/
v11[n0x12] = v13; /*0xffcd3d77*/
return result; /*0xffcd3d76*/
}
// Function: RmtCmdVrefMargin @ 0xffcd3d7d (0x8e1 bytes)
// Index: 1771/2560
int __cdecl RmtCmdVrefMargin(unsigned __int8 *__return_address)
{
int v1; // eax
int v2; // eax
int n4_2; // ebp
_BYTE *SocketInfo; // ecx
int n107_1; // esi
unsigned __int8 n6_1; // al
int CpuCount; // edi
unsigned __int8 n6_2; // al
_BYTE *SocketInfo_3; // ecx
int v10; // esi
char v11; // al
int v12; // esi
unsigned __int8 n8_1; // al
int n0x80_1; // ecx
__int16 v15; // ax
int v16; // edx
int v17; // esi
int v18; // ecx
int v19; // esi
unsigned __int8 *v20; // edi
unsigned __int8 n6_3; // dl
int v22; // esi
int v23; // esi
_BYTE *SocketInfo_4; // ecx
int v25; // edi
unsigned __int8 n6b_1; // al
int v27; // edx
bool v28; // al
unsigned __int8 n6_4; // dl
char v30; // si
_BYTE *n4b_2; // esi
unsigned __int8 n6_5; // al
int v33; // ecx
_WORD *v34; // ecx
int v35; // edx
_BYTE *SocketInfo_6; // edx
unsigned __int16 *n4c_2; // ecx
unsigned __int8 n6_6; // al
int v39; // esi
int n6; // [esp+17h] [ebp-81h]
uns... [16869 chars total]
// Function: RmtFunc465E @ 0xffcd465e (0x5b0 bytes)
// Index: 1772/2560
int __cdecl RmtFunc465E(
unsigned __int8 *__return_address,
int n4,
int a3,
unsigned __int8 n2,
char a5,
_WORD *a6,
_BYTE *n4b,
_BYTE *a8,
_BYTE *n4c)
{
int v9; // esi
int v10; // esi
int n6_2; // ecx
int v12; // edx
int CpuCount; // eax
char v14; // si
char v15; // cl
unsigned int i_1; // esi
unsigned __int8 v17; // al
char v18; // cl
char v19; // al
unsigned __int8 v20; // cl
int v21; // edx
int v22; // eax
char v23; // cl
_WORD *v24; // edi
int v25; // esi
_BYTE *n4ca_1; // edx
unsigned __int16 n6_3; // cx
unsigned int i_2; // eax
unsigned __int8 *__return_address_1; // ebp
unsigned int v30; // eax
int v31; // eax
unsigned int v32; // eax
unsigned int v33; // eax
int v34; // ecx
int v35; // eax
int n2a; // esi
int v37; // eax
unsigned __int8 v39; // [esp-8h] [ebp-11Ch]
unsigned __int8 v40; // [esp+12h] [ebp-102h] BYREF
char v41; // [esp+13h] [ebp-10... [10552 chars total]
// Function: RmtFunc4C0E @ 0xffcd4c0e (0x290 bytes)
// Index: 1773/2560
__int16 __cdecl RmtFunc4C0E(int n6, int n4, int a3, unsigned __int8 a4, unsigned __int8 n4a)
{
int v5; // esi
__int16 v6; // bx
int v7; // eax
int v8; // ecx
unsigned __int8 n4a_1; // dh
unsigned int *v10; // ecx
int v11; // eax
unsigned __int8 n4a_2; // dl
int v13; // edi
int v14; // eax
unsigned int v15; // ebp
unsigned int v16; // eax
int v17; // edi
int v18; // ecx
unsigned int v19; // esi
unsigned int *v20; // edx
__int16 *v21; // edi
_DWORD *v22; // ebp
unsigned __int8 n4a_3; // al
char n4a_6; // ah
unsigned int v25; // edi
int v26; // edx
int v27; // eax
int v28; // ecx
_DWORD *v29; // ebp
__int16 v30; // bp
unsigned int n100_1; // ecx
char n4a_7; // [esp+12h] [ebp-3DEh]
unsigned __int8 n4a_5; // [esp+13h] [ebp-3DDh]
unsigned int *v35; // [esp+14h] [ebp-3DCh]
int v36; // [esp+14h] [ebp-3DCh]
int n4a_4; // [esp+14h] [ebp-3DCh]
int v38; // [esp+18h] [ebp-3D8h]
int v39; // [esp+18h] [ebp-3D8h]
unsigned int n100; // [esp+1Ch] [ebp-3D4h]
_BYTE v41[976]; // [esp+20h] [ebp-3D0h] BYREF
v5 = a4; /*0xffcd4c17*/
v6 = 0; /*0xffcd4c1f*/
v7 = 0; /*0xffcd4c28*/
if ( a4 ) /*0xffcd4c2d*/
{
v8 = 0; /*0xffcd4c2f*/
do /*0xffcd4c3e*/
{
++v7; /*0xffcd4c31*/
*(_DWORD *)&v41[4 * v8 + 176] = -1; /*0xffcd4c32*/
v8 = (__int16)v7; /*0xffcd4c39*/
}
while ( (__int16)v7 < (int)a4 ); /*0xffcd4c3e*/
}
n4a_1 = n4a; /*0xffcd4c40*/
v10 = (unsigned int *)v41; /*0xffcd4c47*/
v11 = 0; /*0xffcd4c4b*/
v35 = (unsigned int *)v41; /*0xffcd4c4d*/
n4a_2 = 0; /*0xffcd4c51*/
v38 = 0; /*0xffcd4c53*/
do /*0xffcd4cad*/
{
*v10 = 0; /*0xffcd4c57*/
if ( n4a_2 < n4a ) /*0xffcd4c5b*/
{
v13 = 0; /*0xffcd4c65*/
if ( a4 ) /*0xffcd4c69*/
{
v14 = 0; /*0xffcd4c72*/
v15 = 0; /*0xffcd4c74*/
do /*0xffcd4c8c*/
{
v16 = *(__int16 *)(a3 + 2 * (v38 + v14)); /*0xffcd4c7c*/
if ( v15 < v16 ) /*0xffcd4c82*/
v15 = v16; /*0xffcd4c84*/
v14 = (__int16)++v13; /*0xffcd4c87*/
}
while ( (__int16)v13 < (int)a4 ); /*0xffcd4c8c*/
v10 = v35; /*0xffcd4c8e*/
v6 = 0; /*0xffcd4c92*/
v11 = v38; /*0xffcd4c94*/
*v35 = v15; /*0xffcd4c98*/
}
}
else
{
*v10 = 1; /*0xffcd4c5d*/
}
++n4a_2; /*0xffcd4c9a*/
v11 += 40; /*0xffcd4c9c*/
++v10; /*0xffcd4c9f*/
v38 = v11; /*0xffcd4ca2*/
v35 = v10; /*0xffcd4ca6*/
}
while ( n4a_2 < 4u ); /*0xffcd4cad*/
v17 = 0; /*0xffcd4caf*/
v36 = 0; /*0xffcd4cb1*/
if ( a4 ) /*0xffcd4cb7*/
{
v18 = 0; /*0xffcd4cbd*/
v39 = 0; /*0xffcd4cbf*/
do /*0xffcd4d66*/
{
n4a_7 = 0; /*0xffcd4cc3*/
if ( n4a_1 ) /*0xffcd4cc9*/
{
v19 = *(_DWORD *)&v41[4 * v18 + 176]; /*0xffcd4cdd*/
v20 = (unsigned int *)&v41[4 * v18 + 336]; /*0xffcd4ce4*/
v21 = (__int16 *)(a3 + 2 * v18); /*0xffcd4ce7*/
do /*0xffcd4d3c*/
{
v22 = v41; /*0xffcd4cf4*/
*v20 = *v21; /*0xffcd4cf8*/
n4a_3 = 0; /*0xffcd4cfa*/
n4a_6 = n4a_7; /*0xffcd4cfc*/
n4a_5 = 0; /*0xffcd4d00*/
do /*0xffcd4d23*/
{
if ( n4a_6 != n4a_3 ) /*0xffcd4d06*/
{
*v20 *= *v22; /*0xffcd4d0e*/
n4a_3 = n4a_5; /*0xffcd4d10*/
n4a_6 = n4a_7; /*0xffcd4d14*/
}
++n4a_3; /*0xffcd4d18*/
++v22; /*0xffcd4d1a*/
n4a_5 = n4a_3; /*0xffcd4d1d*/
}
while ( n4a_3 < n4a ); /*0xffcd4d23*/
if ( v19 > *v20 ) /*0xffcd4d27*/
v19 = *v20; /*0xffcd4d29*/
v21 += 40; /*0xffcd4d2d*/
v20 += 40; /*0xffcd4d30*/
n4a_7 = n4a_6 + 1; /*0xffcd4d36*/
}
while ( (unsigned __int8)(n4a_6 + 1) < n4a ); /*0xffcd4d3c*/
n4a_1 = n4a; /*0xffcd4d42*/
v17 = v36; /*0xffcd4d49*/
*(_DWORD *)&v41[4 * v39 + 176] = v19; /*0xffcd4d4d*/
v5 = a4; /*0xffcd4d54*/
}
v18 = (__int16)++v17; /*0xffcd4d59*/
v36 = v17; /*0xffcd4d5c*/
v39 = (__int16)v17; /*0xffcd4d60*/
}
while ( (__int16)v17 < v5 ); /*0xffcd4d66*/
}
v25 = 0; /*0xffcd4d6c*/
v26 = 0; /*0xffcd4d6e*/
if ( v5 ) /*0xffcd4d72*/
{
v27 = 0; /*0xffcd4d74*/
do /*0xffcd4dc6*/
{
v28 = *(_DWORD *)&v41[4 * v27 + 176]; /*0xffcd4d7d*/
*(_DWORD *)&v41[4 * v27 + 16] = v28; /*0xffcd4d84*/
if ( n4a ) /*0xffcd4d8a*/
{
n4a_4 = n4a; /*0xffcd4d96*/
v29 = &v41[4 * v27 + 336]; /*0xffcd4d9a*/
v5 = a4; /*0xffcd4d9e*/
do /*0xffcd4db0*/
{
v28 += *v29; /*0xffcd4da2*/
v29 += 40; /*0xffcd4da5*/
--n4a_4; /*0xffcd4dab*/
}
while ( n4a_4 ); /*0xffcd4db0*/
*(_DWORD *)&v41[4 * v27 + 16] = v28; /*0xffcd4db2*/
}
if ( *(_DWORD *)&v41[4 * v27 + 16] > v25 ) /*0xffcd4dba*/
v25 = *(_DWORD *)&v41[4 * v27 + 16]; /*0xffcd4dbc*/
v27 = (__int16)++v26; /*0xffcd4dc1*/
}
while ( (__int16)v26 < v5 ); /*0xffcd4dc6*/
v6 = 0; /*0xffcd4dc8*/
}
v30 = 0; /*0xffcd4dca*/
n100 = 100; /*0xffcd4dcf*/
if ( !v5 ) /*0xffcd4dda*/
return -1; /*0xffcd4e98*/
do /*0xffcd4e47*/
{
if ( v25 ) /*0xffcd4de2*/
{
n100_1 = n100; /*0xffcd4e20*/
if ( *(_DWORD *)&v41[4 * v30 + 16] / (v25 / 0x64) < n100 ) /*0xffcd4e26*/
{
n100_1 = *(_DWORD *)&v41[4 * v30 + 16] / (v25 / 0x64); /*0xffcd4e28*/
n100 = n100_1; /*0xffcd4e2a*/
}
if ( n100_1 >= 0x5F && v30 == v5 - 1 ) /*0xffcd4e3a*/
return -1; /*0xffcd4e3a*/
}
else
{
DebugPrint(n6, 2, 255, 255, 255, 255, 255, 255, "maxValue is 0...Divide by 0!!\n"); /*0xffcd4df8*/
}
++v30; /*0xffcd4e3c*/
}
while ( v30 < v5 ); /*0xffcd4e47*/
while ( !v25 ) /*0xffcd4e4f*/
{
DebugPrint(n6, 2, 255, 255, 255, 255, 255, 255, "maxValue is 0...Divide by 0!!\n"); /*0xffcd4e65*/
LABEL_48:
if ( ++v6 >= v5 ) /*0xffcd4e89*/
return -1; /*0xffcd4e89*/
}
if ( !(*(_DWORD *)&v41[4 * v6 + 16] / v25) ) /*0xffcd4e78*/
goto LABEL_48; /*0xffcd4e7c*/
return v6; /*0xffcd4e8e*/
}
// Function: RmtFunc4E9E @ 0xffcd4e9e (0x58 bytes)
// Index: 1774/2560
bool __cdecl RmtFunc4E9E(int n6, unsigned __int8 n4, unsigned __int8 n6a, unsigned __int8 n2, char n31, __int16 n60)
{
return !ProcCommonFunc24FA(n6, n4, n6a, n2) && n31 == 31 && n60 == 60 /*0xffcd4ef3*/
|| !ProcCommonFunc24FA(n6, n4, n6a, n2) && n31 == 12 && n60 == 40;
}
// Function: RmtInitCacheValues @ 0xffcd4ef6 (0x3c0 bytes)
// Index: 1775/2560
int __cdecl RmtInitCacheValues(unsigned __int8 *n6)
{
int v1; // ecx
int n4_23; // [esp+10h] [ebp-1B8h]
char n4; // [esp+14h] [ebp-1B4h]
char p_n31[4]; // [esp+18h] [ebp-1B0h] BYREF
int n6_13; // [esp+1Ch] [ebp-1ACh]
int n37; // [esp+20h] [ebp-1A8h]
int n36; // [esp+24h] [ebp-1A4h]
int n262148; // [esp+28h] [ebp-1A0h] BYREF
__int16 v10; // [esp+2Ch] [ebp-19Ch]
__int16 v11; // [esp+2Eh] [ebp-19Ah]
__int16 n4_1; // [esp+30h] [ebp-198h]
__int16 n4_2; // [esp+32h] [ebp-196h]
__int16 v14; // [esp+34h] [ebp-194h]
__int16 v15; // [esp+36h] [ebp-192h]
__int16 n4_3; // [esp+38h] [ebp-190h]
__int16 n4_4; // [esp+3Ah] [ebp-18Eh]
__int16 v18; // [esp+3Ch] [ebp-18Ch]
__int16 n2; // [esp+3Eh] [ebp-18Ah]
__int16 n4_5; // [esp+40h] [ebp-188h]
__int16 n4_6; // [esp+42h] [ebp-186h]
__int16 n2_1; // [esp+44h] [ebp-184h]
__int16 v23; // [esp+46h] [ebp-182h]
__int16 n4_7; // [esp+48h] [ebp-180h]
__int16 n4_8; // [esp+4Ah] [ebp-17Eh]
__int16 n2_2; // [esp+4Ch] [ebp-17Ch]
__int16 v27; // [esp+4Eh] [ebp-17Ah]
__int16 n4_9; // [esp+50h] [ebp-178h]
__int16 n4_10; // [esp+52h] [ebp-176h]
__int16 n2_3; // [esp+54h] [ebp-174h]
__int16 n2_4; // [esp+56h] [ebp-172h]
__int16 n4_11; // [esp+58h] [ebp-170h]
__int16 n5; // [esp+5Ah] [ebp-16Eh]
__int16 v34; // [esp+5Ch] [ebp-16Ch]
__int16 v35; // [esp+5Eh] [ebp-16Ah]
__int16 n4_12; // [esp+60h] [ebp-168h]
__int16 n5_1; // [esp+62h] [ebp-166h]
__int16 v38; // [esp+64h] [ebp-164h]
__int16 v39; // [esp+66h] [ebp-162h]
__int16 n4_13; // [esp+68h] [ebp-160h]
__int16 n5_2; // [esp+6Ah] [ebp-15Eh]
__int16 v42; // [esp+6Ch] [ebp-15Ch]
__int16 n2_5; // [esp+6Eh] [ebp-15Ah]
__int16 n4_14; // [esp+70h] [ebp-158h]
__int16 n5_3; // [esp+72h] [ebp-156h]
__int16 n2_6; // [esp+74h] [ebp-154h]
__int16 v47; // [esp+76h] [ebp-152h]
__int16 n4_15; // [esp+78h] [ebp-150h]
__int16 n5_4; // [esp+7Ah] [ebp-14Eh]
__int16 n2_7; // [esp+7Ch] [ebp-14Ch]
__int16 v51; // [esp+7Eh] [ebp-14Ah]
__int16 n4_16; // [esp+80h] [ebp-148h]
__int16 n5_5; // [esp+82h] [ebp-146h]
__int16 n2_8; // [esp+84h] [ebp-144h]
__int16 n2_9; // [esp+86h] [ebp-142h]
__int16 n6_1; // [esp+88h] [ebp-140h]
__int16 n4_17; // [esp+8Ah] [ebp-13Eh]
__int16 v58; // [esp+8Ch] [ebp-13Ch]
__int16 v59; // [esp+8Eh] [ebp-13Ah]
__int16 n6_2; // [esp+90h] [ebp-138h]
__int16 n4_18; // [esp+92h] [ebp-136h]
__int16 v62; // [esp+94h] [ebp-134h]
__int16 v63; // [esp+96h] [ebp-132h]
__int16 n6_3; // [esp+98h] [ebp-130h]
__int16 n4_19; // [esp+9Ah] [ebp-12Eh]
__int16 v66; // [esp+9Ch] [ebp-12Ch]
__int16 n2_10; // [esp+9Eh] [ebp-12Ah]
__int16 n6_4; // [esp+A0h] [ebp-128h]
__int16 n4_20; // [esp+A2h] [ebp-126h]
__int16 n2_11; // [esp+A4h] [ebp-124h]
__int16 v71; // [esp+A6h] [ebp-122h]
__int16 n6_5; // [esp+A8h] [ebp-120h]
__int16 n4_21; // [esp+AAh] [ebp-11Eh]
__int16 n2_12; // [esp+ACh] [ebp-11Ch]
__int16 v75; // [esp+AEh] [ebp-11Ah]
__int16 n6_6; // [esp+B0h] [ebp-118h]
__int16 n4_22; // [esp+B2h] [ebp-116h]
__int16 n2_13; // [esp+B4h] [ebp-114h]
__int16 n2_14; // [esp+B6h] [ebp-112h]
__int16 n6_7; // [esp+B8h] [ebp-110h]
__int16 n5_6; // [esp+BAh] [ebp-10Eh]
__int16 v82; // [esp+BCh] [ebp-10Ch]
__int16 v83; // [esp+BEh] [ebp-10Ah]
__int16 n6_8; // [esp+C0h] [ebp-108h]
__int16 n5_7; // [esp+C2h] [ebp-106h]
__int16 v86; // [esp+C4h] [ebp-104h]
__int16 v87; // [esp+C6h] [ebp-102h]
__int16 n6_9; // [esp+C8h] [ebp-100h]
__int16 n5_8; // [esp+CAh] [ebp-FEh]
__int16 v90; // [esp+CCh] [ebp-FCh]
__int16 n2_15; // [esp+CEh] [ebp-FAh]
__int16 n6_10; // [esp+D0h] [ebp-F8h]
__int16 n5_9; // [esp+D2h] [ebp-F6h]
__int16 n2_16; // [esp+D4h] [ebp-F4h]
__int16 v95; // [esp+D6h] [ebp-F2h]
__int16 n6_11; // [esp+D8h] [ebp-F0h]
__int16 n5_10; // [esp+DAh] [ebp-EEh]
__int16 n2_17; // [esp+DCh] [ebp-ECh]
__int16 v99; // [esp+DEh] [ebp-EAh]
__int16 n6_12; // [esp+E0h] [ebp-E8h]
__int16 n5_11; // [esp+E2h] [ebp-E6h]
__int16 n2_18; // [esp+E4h] [ebp-E4h]
__int16 n2_19; // [esp+E6h] [ebp-E2h]
_BYTE buf[128]; // [esp+E8h] [ebp-E0h] BYREF
int v105[4]; // [esp+168h] [ebp-60h] BYREF
int v106[20]; // [esp+178h] [ebp-50h] BYREF
n262148 = 262148; /*0xffcd4f0b*/
v10 = 1; /*0xffcd4f18*/
v11 = 0; /*0xffcd4f20*/
n4_1 = 4; /*0xffcd4f25*/
n4_2 = 4; /*0xffcd4f2a*/
v14 = 1; /*0xffcd4f2f*/
v15 = 1; /*0xffcd4f34*/
n4_3 = 4; /*0xffcd4f39*/
n4_4 = 4; /*0xffcd4f3e*/
v18 = 1; /*0xffcd4f43*/
n2 = 2; /*0xffcd4f48*/
n4_5 = 4; /*0xffcd4f4d*/
n4_6 = 4; /*0xffcd4f52*/
n2_1 = 2; /*0xffcd4f57*/
v23 = 0; /*0xffcd4f5c*/
n4_7 = 4; /*0xffcd4f61*/
n4_8 = 4; /*0xffcd4f66*/
n2_2 = 2; /*0xffcd4f6b*/
v27 = 1; /*0xffcd4f70*/
n4_9 = 4; /*0xffcd4f75*/
n4_10 = 4; /*0xffcd4f7a*/
n2_3 = 2; /*0xffcd4f7f*/
n2_4 = 2; /*0xffcd4f84*/
n4_11 = 4; /*0xffcd4f89*/
n5 = 5; /*0xffcd4f8e*/
v34 = 1; /*0xffcd4f93*/
v35 = 0; /*0xffcd4f98*/
n4_12 = 4; /*0xffcd4f9d*/
n5_1 = 5; /*0xffcd4fa2*/
v38 = 1; /*0xffcd4fa7*/
v39 = 1; /*0xffcd4fac*/
n4_13 = 4; /*0xffcd4fb1*/
n5_2 = 5; /*0xffcd4fb6*/
v42 = 1; /*0xffcd4fbb*/
n2_5 = 2; /*0xffcd4fc0*/
n4_14 = 4; /*0xffcd4fc5*/
n5_3 = 5; /*0xffcd4fca*/
n2_6 = 2; /*0xffcd4fcf*/
v47 = 0; /*0xffcd4fd4*/
n4_15 = 4; /*0xffcd4fd9*/
n5_4 = 5; /*0xffcd4fde*/
n2_7 = 2; /*0xffcd4fe3*/
v51 = 1; /*0xffcd4fe8*/
n4_16 = 4; /*0xffcd4fed*/
n5_5 = 5; /*0xffcd4ff5*/
n2_8 = 2; /*0xffcd4ffd*/
n2_9 = 2; /*0xffcd5005*/
n6_1 = 6; /*0xffcd500d*/
n4_17 = 4; /*0xffcd5015*/
v58 = 1; /*0xffcd501d*/
v59 = 0; /*0xffcd5025*/
n6_2 = 6; /*0xffcd502d*/
n4_18 = 4; /*0xffcd5035*/
v62 = 1; /*0xffcd503d*/
v63 = 1; /*0xffcd5045*/
n6_3 = 6; /*0xffcd504d*/
n4_19 = 4; /*0xffcd5055*/
v66 = 1; /*0xffcd505d*/
n2_10 = 2; /*0xffcd5065*/
n6_4 = 6; /*0xffcd506d*/
n4_20 = 4; /*0xffcd5075*/
n2_11 = 2; /*0xffcd507d*/
v71 = 0; /*0xffcd5085*/
n6_5 = 6; /*0xffcd508d*/
n4_21 = 4; /*0xffcd5095*/
v83 = 0; /*0xffcd50a3*/
v95 = 0; /*0xffcd50ab*/
n2_12 = 2; /*0xffcd50bb*/
v75 = 1; /*0xffcd50c3*/
n6_6 = 6; /*0xffcd50cb*/
n4_22 = 4; /*0xffcd50d3*/
n2_13 = 2; /*0xffcd50db*/
n2_14 = 2; /*0xffcd50e3*/
n6_7 = 6; /*0xffcd50eb*/
n5_6 = 5; /*0xffcd50f3*/
v82 = 1; /*0xffcd50fb*/
n6_8 = 6; /*0xffcd5103*/
n5_7 = 5; /*0xffcd510b*/
v86 = 1; /*0xffcd5113*/
v87 = 1; /*0xffcd511b*/
n6_9 = 6; /*0xffcd5123*/
n5_8 = 5; /*0xffcd512b*/
v90 = 1; /*0xffcd5133*/
n2_15 = 2; /*0xffcd513b*/
n6_10 = 6; /*0xffcd5143*/
n5_9 = 5; /*0xffcd514b*/
n2_16 = 2; /*0xffcd5153*/
n6_11 = 6; /*0xffcd515b*/
n5_10 = 5; /*0xffcd5163*/
n2_17 = 2; /*0xffcd516b*/
v99 = 1; /*0xffcd5173*/
n6_12 = 6; /*0xffcd517b*/
n5_11 = 5; /*0xffcd5183*/
n2_18 = 2; /*0xffcd518b*/
n2_19 = 2; /*0xffcd5193*/
KtiFunc7D83(buf, 0, 0x80u); /*0xffcd519b*/
LOBYTE(n4_23) = n6[9402]; /*0xffcd51b0*/
v1 = 48704 * (unsigned __int8)n4_23; /*0xffcd51b7*/
if ( n6[v1 + 258689] /*0xffcd51f4*/
&& n6[v1 + 258716]
&& *(_WORD *)(n6 + 257315) != 11
&& (~*((_DWORD *)n6 + 157164) & 0x1000000) == 0 )
{
if ( *(int *)(n6 + 134) >= 0 || n6[v1 + 258694] < 0x10u ) /*0xffcd5212*/
{
DebugPrint((int)n6, 10, n4_23, 255, 255, 255, 255, 255, "Skipping Modified Rx CTLE Training\n"); /*0xffcd52a1*/
}
else
{
v105[0] = 5; /*0xffcd5217*/
v105[1] = 1; /*0xffcd5222*/
*(_DWORD *)p_n31 = 103; /*0xffcd5229*/
n6_13 = 6; /*0xffcd5231*/
n37 = 37; /*0xffcd5239*/
n36 = 36; /*0xffcd5241*/
n4 = ProcCommonFunc197D((int)n6, 7); /*0xffcd524f*/
RmtMarginTool(n6, n4_23, 2, 0x7FFFu, (int)v105, 2u, 0, (int)&n262148, (int)v106, 0x19u, p_n31, n4, 4u); /*0xffcd5281*/
}
}
return 0; /*0xffcd52a9*/
}
// Function: RmtFunc52B6 @ 0xffcd52b6 (0xa3 bytes)
// Index: 1776/2560
char __cdecl RmtFunc52B6(unsigned __int8 *n6, int n4, _BYTE *n6a, int n2, int a5, __int16 n32)
{
int SocketInfo; // esi
int CpuCount; // eax
if ( (_BYTE)n32 == 31 ) /*0xffcd52bf*/
{
MrcMarginGroupTrain(n6, n4, n6a, n2, a5, 0, 255, 0, 31, 3, (unsigned __int16 *)&n32); /*0xffcd52e1*/
if ( !n32 ) /*0xffcd52ee*/
return 1; /*0xffcd52f2*/
}
else if ( (_BYTE)n32 == 32 || (_BYTE)n32 == 33 ) /*0xffcd52fa*/
{
SocketInfo = GetSocketInfo((int)n6, n4); /*0xffcd530b*/
CpuCount = GetCpuCount((int)n6, n4, (unsigned __int8)n6a); /*0xffcd5314*/
if ( *(_BYTE *)(7688 * (unsigned __int8)n6a + SocketInfo + 3) == 1 /*0xffcd5348*/
&& (*(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 19) == 1
|| ProcCommonFunc24FA((int)n6, n4, (unsigned __int8)n6a, n2)) )
{
return 1; /*0xffcd5352*/
}
}
return 0; /*0xffcd5356*/
}
// Function: RmtGetCacheValues @ 0xffcd5359 (0x1d9 bytes)
// Index: 1777/2560
int __cdecl RmtGetCacheValues(unsigned __int8 *n6)
{
unsigned __int8 *n6_1; // esi
int v2; // eax
int v4[20]; // [esp+Ch] [ebp-1B8h] BYREF
__int16 p_n4; // [esp+5Ch] [ebp-168h] BYREF
int v6; // [esp+5Eh] [ebp-166h]
__int16 v7; // [esp+62h] [ebp-162h]
__int16 n4_1; // [esp+64h] [ebp-160h]
__int16 v9; // [esp+66h] [ebp-15Eh]
__int16 v10; // [esp+68h] [ebp-15Ch]
__int16 v11; // [esp+6Ah] [ebp-15Ah]
__int16 n4_2; // [esp+6Ch] [ebp-158h]
__int16 v13; // [esp+6Eh] [ebp-156h]
__int16 n2; // [esp+70h] [ebp-154h]
__int16 v15; // [esp+72h] [ebp-152h]
__int16 n4_3; // [esp+74h] [ebp-150h]
__int16 v17; // [esp+76h] [ebp-14Eh]
int v18; // [esp+78h] [ebp-14Ch]
__int16 n4_4; // [esp+7Ch] [ebp-148h]
__int16 v20; // [esp+7Eh] [ebp-146h]
__int16 v21; // [esp+80h] [ebp-144h]
__int16 v22; // [esp+82h] [ebp-142h]
__int16 n4_5; // [esp+84h] [ebp-140h]
__int16 v24; // [esp+86h] [ebp-13Eh]
__int16 n2_1; // [esp+88h] [ebp-13Ch]
__int16 v26; // [esp+8Ah] [ebp-13Ah]
__int16 n4_6; // [esp+8Ch] [ebp-138h]
__int16 n2_2; // [esp+8Eh] [ebp-136h]
int v29; // [esp+90h] [ebp-134h]
__int16 n4_7; // [esp+94h] [ebp-130h]
__int16 n2_3; // [esp+96h] [ebp-12Eh]
__int16 v32; // [esp+98h] [ebp-12Ch]
__int16 v33; // [esp+9Ah] [ebp-12Ah]
__int16 n4_8; // [esp+9Ch] [ebp-128h]
__int16 n2_4; // [esp+9Eh] [ebp-126h]
__int16 n2_5; // [esp+A0h] [ebp-124h]
_BYTE buf[250]; // [esp+A2h] [ebp-122h] BYREF
int v38[4]; // [esp+19Ch] [ebp-28h] BYREF
char p_n31[4]; // [esp+1ACh] [ebp-18h] BYREF
int n37; // [esp+1B0h] [ebp-14h]
int n36; // [esp+1B4h] [ebp-10h]
unsigned __int8 v42[4]; // [esp+1BCh] [ebp-8h]
char n4[4]; // [esp+1C0h] [ebp-4h]
p_n4 = 4; /*0xffcd536a*/
v6 = 0; /*0xffcd537a*/
v7 = 0; /*0xffcd5383*/
v9 = 0; /*0xffcd538a*/
v11 = 0; /*0xffcd5391*/
v13 = 0; /*0xffcd5398*/
v15 = 0; /*0xffcd539f*/
v18 = 0; /*0xffcd53a6*/
v22 = 0; /*0xffcd53ac*/
v26 = 0; /*0xffcd53b3*/
v29 = 0; /*0xffcd53ba*/
v33 = 0; /*0xffcd53c0*/
n4_1 = 4; /*0xffcd53ce*/
v10 = 1; /*0xffcd53d5*/
n4_2 = 4; /*0xffcd53dc*/
n2 = 2; /*0xffcd53e3*/
n4_3 = 4; /*0xffcd53ea*/
v17 = 1; /*0xffcd53f1*/
n4_4 = 4; /*0xffcd53f8*/
v20 = 1; /*0xffcd53ff*/
v21 = 1; /*0xffcd5406*/
n4_5 = 4; /*0xffcd540d*/
v24 = 1; /*0xffcd5414*/
n2_1 = 2; /*0xffcd541b*/
n4_6 = 4; /*0xffcd5422*/
n2_2 = 2; /*0xffcd5429*/
n4_7 = 4; /*0xffcd5430*/
n2_3 = 2; /*0xffcd5437*/
v32 = 1; /*0xffcd543e*/
n4_8 = 4; /*0xffcd5445*/
n2_4 = 2; /*0xffcd544c*/
n2_5 = 2; /*0xffcd5453*/
KtiFunc7D83(buf, 0, 0xFAu); /*0xffcd545a*/
n6_1 = n6; /*0xffcd545f*/
LOBYTE(n6) = n6[9402]; /*0xffcd546b*/
v2 = 48704 * (unsigned __int8)n6; /*0xffcd5471*/
if ( n6_1[v2 + 258689] /*0xffcd54ba*/
&& n6_1[v2 + 258716]
&& *(_WORD *)(n6_1 + 257315) != 11
&& (n6_1[628656] & 1) != 0
&& (~*(_DWORD *)(n6_1 + 134) & 0x400000) == 0 )
{
v38[0] = 5; /*0xffcd54bf*/
v38[1] = 1; /*0xffcd54c6*/
*(_DWORD *)p_n31 = 6; /*0xffcd54c9*/
n37 = 37; /*0xffcd54d0*/
n36 = 36; /*0xffcd54d7*/
n4[0] = ProcCommonFunc197D((int)n6_1, 7); /*0xffcd54e3*/
v42[0] = ProcCommonFunc1A6C((int)n6_1, (int)n6, &p_n4); /*0xffcd54fb*/
RmtMarginTool(n6_1, (int)n6, 2, 0x40u, (int)v38, 2u, 0, (int)&p_n4, (int)v4, v42[0], p_n31, n4[0], 3u); /*0xffcd5521*/
}
return 0; /*0xffcd5529*/
}
// Function: RmtMarginTool @ 0xffcd5532 (0x361f bytes)
// Index: 1778/2560
int __cdecl RmtMarginTool(
unsigned __int8 *n6,
int n4,
int a3,
unsigned int a4,
int a5,
unsigned __int8 n4_7,
char a7,
int a8,
int a9,
unsigned __int8 a10,
char *p_n31,
char n4a,
unsigned __int8 n2)
{
unsigned __int8 *n6_1; // ebx
int n4_1; // ebp
_BYTE *v15; // edx
_BYTE *SocketInfo_1; // edi
int n6_3; // esi
_BYTE *v18; // ecx
int n4_9; // edx
unsigned __int8 n2_4; // al
int n2_17; // ebp
unsigned int n0x20; // eax
unsigned int v23; // eax
unsigned int v24; // eax
unsigned int v25; // eax
unsigned int v26; // eax
unsigned int v27; // eax
unsigned int v28; // eax
unsigned int v29; // eax
unsigned int v30; // eax
unsigned int v31; // eax
unsigned int v32; // eax
unsigned int n5; // eax
unsigned __int8 n6a_1; // al
unsigned __int16 *p_n60_1; // esi
unsigned __int8 n6a_2; // al
unsigned __int16 *p_n60_2; // esi
unsigned __int8 n6a_6;... [120548 chars total]
// Function: ChkSystemInfoMain @ 0xffcd8b51 (0x104 bytes)
// Index: 1779/2560
int __cdecl ChkSystemInfoMain(int n4)
{
int v1; // eax
char n4_2; // al
int v4[20]; // [esp+8h] [ebp-1B4h] BYREF
_WORD __[5]; // [esp+58h] [ebp-164h] BYREF
int v6; // [esp+62h] [ebp-15Ah]
__int16 v7; // [esp+66h] [ebp-156h]
__int16 n48; // [esp+68h] [ebp-154h]
char buf[302]; // [esp+6Ah] [ebp-152h] BYREF
char p_n31[16]; // [esp+198h] [ebp-24h] BYREF
int v11[4]; // [esp+1A8h] [ebp-14h] BYREF
int n4_1; // [esp+1B8h] [ebp-4h]
strcpy((char *)__, "\""); /*0xffcd8b61*/
__[4] = 40; /*0xffcd8b6d*/
n48 = 48; /*0xffcd8b7a*/
*(_DWORD *)&__[1] = 0; /*0xffcd8b89*/
__[3] = 0; /*0xffcd8b8f*/
v6 = 0; /*0xffcd8b96*/
v7 = 0; /*0xffcd8b9c*/
KtiFunc7D83(buf, 0, 0x12Eu); /*0xffcd8ba3*/
LOBYTE(n4_1) = *(_BYTE *)(n4 + 9402); /*0xffcd8bb4*/
v1 = 48704 * (unsigned __int8)n4_1; /*0xffcd8bba*/
if ( *(_BYTE *)(v1 + n4 + 258689) /*0xffcd8bfc*/
&& *(_BYTE *)(v1 + n4 + 258716)
&& *(_WORD *)(n4 + 257315) != 11
&& (~*(_DWORD *)(n4 + 134) & 0x80000) == 0
&& (~*(_DWORD *)(n4 + 628656) & 0x10000) == 0 )
{
v11[0] = 5; /*0xffcd8c00*/
v11[1] = 1; /*0xffcd8c07*/
*(_DWORD *)p_n31 = 12; /*0xffcd8c0e*/
n4_2 = ProcCommonFunc197D(n4, 0); /*0xffcd8c15*/
RmtMarginTool((unsigned __int8 *)n4, n4_1, 2, 0x40u, (int)v11, 2u, 0, (int)__, (int)v4, 3u, p_n31, n4_2, 1u); /*0xffcd8c45*/
}
return 0; /*0xffcd8c4d*/
}
// Function: RmtDebugPrint @ 0xffcd8c55 (0x127 bytes)
// Index: 1780/2560
int __cdecl RmtDebugPrint(int n4)
{
int n4_1; // edi
int v2; // ecx
int v4[80]; // [esp+4h] [ebp-1B8h] BYREF
int v5[20]; // [esp+144h] [ebp-78h] BYREF
char p_n31[16]; // [esp+194h] [ebp-28h] BYREF
int v7[4]; // [esp+1A4h] [ebp-18h] BYREF
unsigned __int8 v8[4]; // [esp+1B4h] [ebp-8h]
char n4a[4]; // [esp+1B8h] [ebp-4h]
n4_1 = n4; /*0xffcd8c5f*/
LOBYTE(n4) = *(_BYTE *)(n4 + 9402); /*0xffcd8c68*/
v2 = 48704 * (unsigned __int8)n4; /*0xffcd8c6e*/
if ( !*(_BYTE *)(v2 + n4_1 + 258703) ) /*0xffcd8c74*/
{
if ( (~*(_DWORD *)(n4_1 + 628656) & 0x200000) != 0 || *(_BYTE *)(v2 + n4_1 + 258694) < 0x10u ) /*0xffcd8c9d*/
{
DebugPrint(n4_1, 10, n4, 255, 255, 255, 255, 255, "Skipping DRAM Rx EQ Training\n"); /*0xffcd8d6d*/
}
else if ( *(_BYTE *)(v2 + n4_1 + 258689) /*0xffcd8cd7*/
&& *(_BYTE *)(v2 + n4_1 + 258716)
&& (~*(_BYTE *)(n4_1 + 134) & 8) == 0
&& *(_WORD *)(n4_1 + 257315) != 11 )
{
v7[0] = 23; /*0xffcd8ce0*/
v7[1] = 22; /*0xffcd8ce7*/
*(_DWORD *)p_n31 = 98; /*0xffcd8cee*/
n4a[0] = ProcCommonFunc197D(n4_1, 9); /*0xffcd8cfa*/
v8[0] = ProcCommonFunc1CC9(n4_1, n4, v4); /*0xffcd8d12*/
RmtMarginTool((unsigned __int8 *)n4_1, n4, 2, 0x40u, (int)v7, 2u, 0, (int)v4, (int)v5, v8[0], p_n31, n4a[0], 1u); /*0xffcd8d37*/
MailBoxFunc2B5B(n4_1, n4); /*0xffcd8d43*/
KtiFuncD59F((_BYTE *)n4_1, n4, 63); /*0xffcd8d4e*/
}
}
return 0; /*0xffcd8d77*/
}
// Function: RmtReadRegisters @ 0xffcd8d7c (0xfa bytes)
// Index: 1781/2560
int __cdecl RmtReadRegisters(int n6)
{
int n6_1; // esi
int v2; // eax
unsigned __int8 n6_2; // bl
int v5[80]; // [esp+4h] [ebp-1B8h] BYREF
int v6[20]; // [esp+144h] [ebp-78h] BYREF
char p_n31[16]; // [esp+194h] [ebp-28h] BYREF
int v8[4]; // [esp+1A4h] [ebp-18h] BYREF
unsigned __int8 v9[4]; // [esp+1B4h] [ebp-8h]
char n4[4]; // [esp+1B8h] [ebp-4h]
n6_1 = n6; /*0xffcd8d86*/
LOBYTE(n6) = *(_BYTE *)(n6 + 9402); /*0xffcd8d8f*/
v2 = 48704 * (unsigned __int8)n6; /*0xffcd8d95*/
if ( *(_BYTE *)(v2 + n6_1 + 258689) /*0xffcd8de2*/
&& *(_BYTE *)(v2 + n6_1 + 258716)
&& (~*(_DWORD *)(n6_1 + 628652) & 0x10000) == 0
&& (*(_DWORD *)(n6_1 + 134) & 0x800) != 0
&& *(_WORD *)(n6_1 + 257315) != 11 )
{
v9[0] = ProcCommonFunc1D0B(n6_1, n6, v5); /*0xffcd8dfc*/
n6_2 = 0; /*0xffcd8dff*/
n4[0] = 0; /*0xffcd8e01*/
do /*0xffcd8e1d*/
{
DdrTrainFuncF282((unsigned __int8 *)n6_1, n6, *(int *)n4, 1); /*0xffcd8e0d*/
n4[0] = ++n6_2; /*0xffcd8e17*/
}
while ( n6_2 < 6u ); /*0xffcd8e1d*/
v8[0] = 23; /*0xffcd8e22*/
v8[1] = 22; /*0xffcd8e29*/
*(_DWORD *)p_n31 = 30; /*0xffcd8e30*/
n4[0] = ProcCommonFunc197D(n6_1, 6); /*0xffcd8e3e*/
RmtMarginTool((unsigned __int8 *)n6_1, n6, 2, 0x40u, (int)v8, 2u, 0, (int)v5, (int)v6, v9[0], p_n31, n4[0], 1u); /*0xffcd8e66*/
}
return 0; /*0xffcd8e71*/
}
// Function: RmtWriteRegisters @ 0xffcd8e76 (0x11b bytes)
// Index: 1782/2560
int __cdecl RmtWriteRegisters(int n4)
{
int v1; // eax
char n4_2; // al
int v4[20]; // [esp+8h] [ebp-1B4h] BYREF
_WORD _[5]; // [esp+58h] [ebp-164h] BYREF
int v6; // [esp+62h] [ebp-15Ah]
__int16 v7; // [esp+66h] [ebp-156h]
__int16 n55; // [esp+68h] [ebp-154h]
int v9; // [esp+6Ah] [ebp-152h]
__int16 v10; // [esp+6Eh] [ebp-14Eh]
__int16 n100; // [esp+70h] [ebp-14Ch]
char buf[294]; // [esp+72h] [ebp-14Ah] BYREF
char p_n31[16]; // [esp+198h] [ebp-24h] BYREF
int v14[4]; // [esp+1A8h] [ebp-14h] BYREF
int n4_1; // [esp+1B8h] [ebp-4h]
strcpy((char *)_, "-"); /*0xffcd8e86*/
_[4] = 50; /*0xffcd8e92*/
n55 = 55; /*0xffcd8e9c*/
n100 = 100; /*0xffcd8ea9*/
*(_DWORD *)&_[1] = 0; /*0xffcd8eb8*/
_[3] = 0; /*0xffcd8ebe*/
v6 = 0; /*0xffcd8ec5*/
v7 = 0; /*0xffcd8ecb*/
v9 = 0; /*0xffcd8ed2*/
v10 = 0; /*0xffcd8ed8*/
KtiFunc7D83(buf, 0, 0x126u); /*0xffcd8edf*/
LOBYTE(n4_1) = *(_BYTE *)(n4 + 9402); /*0xffcd8ef0*/
v1 = 48704 * (unsigned __int8)n4_1; /*0xffcd8ef6*/
if ( *(_BYTE *)(v1 + n4 + 258689) /*0xffcd8f38*/
&& *(_BYTE *)(v1 + n4 + 258716)
&& *(_WORD *)(n4 + 257315) != 11
&& (~*(_DWORD *)(n4 + 134) & 0x100000) == 0
&& (~*(_DWORD *)(n4 + 628656) & 0x4000) == 0 )
{
v14[0] = 5; /*0xffcd8f3d*/
*(_DWORD *)p_n31 = 9; /*0xffcd8f45*/
v14[1] = 1; /*0xffcd8f4e*/
n4_2 = ProcCommonFunc197D(n4, 1); /*0xffcd8f51*/
RmtMarginTool((unsigned __int8 *)n4, n4_1, 2, 0x40u, (int)v14, 2u, 0, (int)_, (int)v4, 4u, p_n31, n4_2, 1u); /*0xffcd8f80*/
}
return 0; /*0xffcd8f89*/
}
// Function: RmtCompareMargins @ 0xffcd8f91 (0xd0 bytes)
// Index: 1783/2560
int __cdecl RmtCompareMargins(int n4)
{
int n4_1; // esi
int v2; // eax
int v4[80]; // [esp+4h] [ebp-1B8h] BYREF
int v5[20]; // [esp+144h] [ebp-78h] BYREF
char p_n31[16]; // [esp+194h] [ebp-28h] BYREF
int v7[4]; // [esp+1A4h] [ebp-18h] BYREF
unsigned __int8 v8[4]; // [esp+1B4h] [ebp-8h]
char n4a[4]; // [esp+1B8h] [ebp-4h]
n4_1 = n4; /*0xffcd8f9b*/
LOBYTE(n4) = *(_BYTE *)(n4 + 9402); /*0xffcd8fa4*/
v2 = 48704 * (unsigned __int8)n4; /*0xffcd8faa*/
if ( *(_BYTE *)(v2 + n4_1 + 258689) /*0xffcd8ff6*/
&& *(_BYTE *)(v2 + n4_1 + 258716)
&& *(_WORD *)(n4_1 + 257315) != 11
&& (~*(_DWORD *)(n4_1 + 134) & 0x40000) == 0
&& (~*(_DWORD *)(n4_1 + 628656) & 0x8000) == 0 )
{
v7[0] = 23; /*0xffcd8ffb*/
v7[1] = 22; /*0xffcd9002*/
*(_DWORD *)p_n31 = 26; /*0xffcd9009*/
n4a[0] = ProcCommonFunc197D(n4_1, 4); /*0xffcd9015*/
v8[0] = ProcCommonFunc1F31(n4_1, n4, (int)v4); /*0xffcd902d*/
RmtMarginTool((unsigned __int8 *)n4_1, n4, 2, 0x40u, (int)v7, 2u, 0, (int)v4, (int)v5, v8[0], p_n31, n4a[0], 1u); /*0xffcd9052*/
}
return 0; /*0xffcd905c*/
}
// Function: RmtAnalyzeResults @ 0xffcd9061 (0xeb bytes)
// Index: 1784/2560
int __cdecl RmtAnalyzeResults(int n4)
{
int n4_1; // edi
unsigned __int8 v2; // cl
int v3; // eax
int v4; // eax
int v6[80]; // [esp+4h] [ebp-1B8h] BYREF
int v7[20]; // [esp+144h] [ebp-78h] BYREF
char p_n31[16]; // [esp+194h] [ebp-28h] BYREF
int v9[4]; // [esp+1A4h] [ebp-18h] BYREF
unsigned __int8 v10[4]; // [esp+1B4h] [ebp-8h]
char n4a[4]; // [esp+1B8h] [ebp-4h]
n4_1 = n4; /*0xffcd906b*/
v2 = *(_BYTE *)(n4 + 9402); /*0xffcd9074*/
v3 = ~*(_DWORD *)(n4 + 628652); /*0xffcd907a*/
LOBYTE(n4) = v2; /*0xffcd907c*/
if ( (v3 & 0x8000) == 0 ) /*0xffcd9084*/
{
v4 = 48704 * v2; /*0xffcd908d*/
if ( *(_BYTE *)(v4 + n4_1 + 258689) ) /*0xffcd9093*/
{
if ( *(_BYTE *)(v4 + n4_1 + 258716) && *(_WORD *)(n4_1 + 257315) != 11 && (~*(_DWORD *)(n4_1 + 134) & 0x400) == 0 ) /*0xffcd90ca*/
{
v9[0] = 23; /*0xffcd90cf*/
v9[1] = 22; /*0xffcd90d6*/
*(_DWORD *)p_n31 = 24; /*0xffcd90dd*/
n4a[0] = ProcCommonFunc197D(n4_1, 5); /*0xffcd90e9*/
v10[0] = ProcCommonFunc22AF(n4_1, n4, v6); /*0xffcd9101*/
RmtMarginTool( /*0xffcd9126*/
(unsigned __int8 *)n4_1,
n4,
2,
0x40u,
(int)v9,
2u,
0,
(int)v6,
(int)v7,
v10[0],
p_n31,
n4a[0],
1u);
MailBoxFunc2B5B(n4_1, n4); /*0xffcd9132*/
KtiFuncD59F((_BYTE *)n4_1, n4, 63); /*0xffcd913d*/
}
}
}
return 0; /*0xffcd9147*/
}
// Function: RmtFunc914C @ 0xffcd914c (0x351 bytes)
// Index: 1785/2560
unsigned __int8 __cdecl RmtFunc914C(_BYTE *__return_address, int n4)
{
int n4_1; // ebx
_BYTE *__return_address_1; // esi
_BYTE *v4; // ebp
int n6_1; // edi
bool v6; // zf
int v7; // ebp
int v8; // eax
char v9; // cl
unsigned __int8 v10; // bl
char *v11; // ecx
int n4_2; // edx
char v13; // al
unsigned __int16 v14; // cx
int v15; // edx
unsigned __int8 p_n11[7]; // [esp+11h] [ebp-27h] BYREF
int v18; // [esp+18h] [ebp-20h]
char v19[4]; // [esp+1Ch] [ebp-1Ch]
int v20; // [esp+20h] [ebp-18h]
unsigned __int8 n4a[4]; // [esp+24h] [ebp-14h]
char n6[4]; // [esp+28h] [ebp-10h]
int v23; // [esp+2Ch] [ebp-Ch]
_BYTE *v24; // [esp+30h] [ebp-8h]
int v25; // [esp+34h] [ebp-4h]
v23 = 0; /*0xffcd914f*/
n4_1 = n4; /*0xffcd9157*/
p_n11[1] = 0; /*0xffcd915c*/
n6[0] = 0; /*0xffcd9160*/
__return_address_1 = __return_address; /*0xffcd9165*/
v4 = &__return_address[119 * (unsigned __int8)n4 + 279]; /*0xffcd9176*/
v25 = 119 * (unsigned __int8)n4; /*0xffcd9178*/
v24 = v4; /*0xffcd917c*/
do /*0xffcd948b*/
{
n6_1 = *(_DWORD *)n6; /*0xffcd9180*/
*(_DWORD *)&p_n11[3] = GetCpuCount((int)__return_address_1, n4_1, n6[0]); /*0xffcd918f*/
v6 = *v4 == 0; /*0xffcd9193*/
v19[0] = 0; /*0xffcd9197*/
if ( !v6 ) /*0xffcd919c*/
{
while ( 1 ) /*0xffcd91a2*/
{
v7 = *(_DWORD *)v19; /*0xffcd91a2*/
p_n11[2] = 1; /*0xffcd91b1*/
v8 = KtiFunc27D8(__return_address_1, n4_1, n6_1, v19[0], 2u, p_n11); /*0xffcd91b6*/
v18 = 1379 * (unsigned __int8)v19[0]; /*0xffcd91cd*/
v9 = *(_BYTE *)(v18 + *(_DWORD *)&p_n11[3]); /*0xffcd91d1*/
__return_address_1 = __return_address; /*0xffcd91d4*/
if ( !v9 && !v8 ) /*0xffcd91de*/
break; /*0xffcd91de*/
if ( v9 == 1 ) /*0xffcd91e3*/
{
if ( v8 ) /*0xffcd91e7*/
break; /*0xffcd91e7*/
}
else if ( v8 ) /*0xffcd9219*/
{
DebugPrint((int)__return_address, 2, n4_1, n6_1, v7, 255, 255, 255, "No Dimm\n"); /*0xffcd9454*/
goto LABEL_34; /*0xffcd9454*/
}
v10 = p_n11[2]; /*0xffcd9229*/
v11 = &__return_address[4 * (unsigned __int8)v19[0] + 282 + v25 + v23]; /*0xffcd9236*/
n4_2 = 4; /*0xffcd9238*/
do /*0xffcd9248*/
{
v13 = *v11++; /*0xffcd9239*/
v10 &= (v13 == 0) - 1; /*0xffcd9243*/
--n4_2; /*0xffcd9245*/
}
while ( n4_2 ); /*0xffcd9248*/
v6 = v10 == 0; /*0xffcd924a*/
n4_1 = n4; /*0xffcd924c*/
if ( !v6 ) /*0xffcd9250*/
goto LABEL_34; /*0xffcd9250*/
DebugPrint((int)__return_address, 2, n4, n6_1, v7, 255, 255, 255, "DIMM found check SN\n"); /*0xffcd9269*/
if ( p_n11[0] == 11 ) /*0xffcd927b*/
{
KtiFunc27D8(__return_address, n4, n6_1, v7, 0x76u, p_n11); /*0xffcd9283*/
v20 = (unsigned __int16)(p_n11[0] << 8); /*0xffcd9294*/
KtiFunc27D8(__return_address, n4, n6_1, v7, 0x75u, p_n11); /*0xffcd929f*/
}
else
{
KtiFunc27D8(__return_address, n4, n6_1, v7, 0x141u, p_n11); /*0xffcd92aa*/
v20 = (unsigned __int16)(p_n11[0] << 8); /*0xffcd92bb*/
KtiFunc27D8(__return_address, n4, n6_1, v7, 0x140u, p_n11); /*0xffcd92cd*/
}
v14 = p_n11[0] & 0x7F | v20; /*0xffcd92ed*/
v15 = *(unsigned __int16 *)(v18 + *(_DWORD *)&p_n11[3] + 142); /*0xffcd92f4*/
if ( (_WORD)v15 != v14 ) /*0xffcd92ff*/
{
DebugPrint( /*0xffcd9319*/
(int)__return_address,
2,
n4,
n6_1,
v7,
255,
255,
255,
"DIMM Mfg ID mismatch found %x %x\n",
v15,
v14);
p_n11[1] = 1; /*0xffcd9322*/
RmtFunc3B13((int)__return_address, n4, n6_1, v7); /*0xffcd9327*/
goto LABEL_34; /*0xffcd932f*/
}
if ( p_n11[0] == 11 ) /*0xffcd933e*/
KtiFunc27D8(__return_address, n4, n6_1, v7, 0x77u, p_n11); /*0xffcd9342*/
else
KtiFunc27D8(__return_address, n4, n6_1, v7, 0x142u, p_n11); /*0xffcd934d*/
if ( *(_BYTE *)(v18 + *(_DWORD *)&p_n11[3] + 144) == p_n11[0] ) /*0xffcd9368*/
{
if ( p_n11[0] == 11 ) /*0xffcd937b*/
{
KtiFunc27D8(__return_address, n4, n6_1, v7, 0x78u, p_n11); /*0xffcd9383*/
v20 = p_n11[0]; /*0xffcd938d*/
KtiFunc27D8(__return_address, n4, n6_1, v7, 0x79u, p_n11); /*0xffcd9398*/
}
else
{
KtiFunc27D8(__return_address, n4, n6_1, v7, 0x143u, p_n11); /*0xffcd93a3*/
v20 = p_n11[0]; /*0xffcd93ad*/
KtiFunc27D8(__return_address, n4, n6_1, v7, 0x144u, p_n11); /*0xffcd93bf*/
}
if ( *(_WORD *)(v18 + *(_DWORD *)&p_n11[3] + 145) == ((unsigned __int16)(p_n11[0] << 8) | (unsigned __int16)v20) ) /*0xffcd93e8*/
{
n4a[0] = 0; /*0xffcd93f4*/
while ( 1 ) /*0xffcd9406*/
{
DdrTrainFuncB7D3(__return_address, n4, n6_1, v7, n4a[0], p_n11); /*0xffcd9406*/
if ( *(_BYTE *)(v18 + n4a[0] + *(_DWORD *)&p_n11[3] + 150) != p_n11[0] ) /*0xffcd9428*/
break; /*0xffcd9428*/
if ( ++n4a[0] >= 4u ) /*0xffcd9433*/
goto LABEL_34; /*0xffcd9433*/
}
DebugPrint((int)__return_address, 2, n4, n6_1, v7, 255, 255, 255, "DIMM SN mismatch found\n"); /*0xffcd943c*/
}
else
{
DebugPrint((int)__return_address, 2, n4, n6_1, v7, 255, 255, 255, "DIMM Module date mismatch found\n"); /*0xffcd93ef*/
}
}
else
{
DebugPrint((int)__return_address, 2, n4, n6_1, v7, 255, 255, 255, "DIMM Mfg Location mismatch found\n"); /*0xffcd936f*/
}
LABEL_8:
p_n11[1] = 1; /*0xffcd9201*/
RmtFunc3B13((int)__return_address, n4_1, n6_1, v7); /*0xffcd920a*/
LABEL_34:
v4 = v24; /*0xffcd945c*/
if ( ++v19[0] >= *v24 ) /*0xffcd946d*/
goto LABEL_35; /*0xffcd946d*/
}
DebugPrint((int)__return_address, 2, n4_1, n6_1, v7, 255, 255, 255, "DIMM mismatch found\n"); /*0xffcd91e9*/
goto LABEL_8; /*0xffcd91fc*/
}
LABEL_35:
v4 += 19; /*0xffcd9473*/
v23 += 19; /*0xffcd947a*/
++n6[0]; /*0xffcd9481*/
v24 = v4; /*0xffcd9485*/
}
while ( n6[0] < 6u ); /*0xffcd948b*/
return p_n11[1]; /*0xffcd9495*/
}
// Function: RmtFunc949D @ 0xffcd949d (0x153 bytes)
// Index: 1786/2560
char __cdecl RmtFunc949D(int __return_address, int n4)
{
unsigned __int8 n4_1; // di
unsigned __int8 n6; // bl
unsigned __int8 v4; // bh
int v5; // esi
int v6; // edx
int v7; // esi
int v9; // [esp+10h] [ebp-14h]
int v10; // [esp+14h] [ebp-10h]
int SocketInfo; // [esp+18h] [ebp-Ch]
int CpuCount; // [esp+1Ch] [ebp-8h]
int v13; // [esp+20h] [ebp-4h]
n4_1 = n4; /*0xffcd94a8*/
n6 = 0; /*0xffcd94b4*/
SocketInfo = GetSocketInfo(__return_address, n4); /*0xffcd94b6*/
LOBYTE(v9) = 0; /*0xffcd94bb*/
while ( 1 ) /*0xffcd94cd*/
{
v4 = 0; /*0xffcd94cd*/
v5 = 7688 * n6; /*0xffcd94cf*/
CpuCount = GetCpuCount(__return_address, n4_1, v9); /*0xffcd94d8*/
LOBYTE(v10) = 0; /*0xffcd94e0*/
v13 = v5; /*0xffcd94e4*/
if ( *(_BYTE *)(v5 + SocketInfo + 3) ) /*0xffcd94e8*/
break; /*0xffcd94e8*/
LABEL_9:
LOBYTE(v9) = ++n6; /*0xffcd9580*/
if ( n6 >= 6u ) /*0xffcd9587*/
return 0; /*0xffcd9596*/
}
while ( 1 ) /*0xffcd94f5*/
{
v6 = 1379 * v4; /*0xffcd94f5*/
if ( !*(_BYTE *)(v6 + CpuCount) || !*(_BYTE *)(v6 + CpuCount + 107) ) /*0xffcd9505*/
goto LABEL_8; /*0xffcd950a*/
if ( *(_BYTE *)(v5 + v6 + 48704 * (unsigned __int8)n4 + __return_address + 259226) != 1 ) /*0xffcd9525*/
{
n4_1 = n4; /*0xffcd9597*/
goto LABEL_8; /*0xffcd959b*/
}
n4_1 = n4; /*0xffcd9536*/
v7 = ((int (__cdecl *)(int, int, _BYTE, _BYTE))loc_FFC3E340)(__return_address, n4, v9, v10); /*0xffcd953a*/
DebugPrint( /*0xffcd9556*/
__return_address,
3,
n4,
v9,
v10,
255,
255,
255,
"Read Media Disable BSR for disabled NVMDimm, Bsr=0x%x\n",
v7);
if ( (v7 & 0x1000000) == 0 ) /*0xffcd9564*/
break; /*0xffcd9564*/
v5 = v13; /*0xffcd9566*/
LABEL_8:
LOBYTE(v10) = ++v4; /*0xffcd9570*/
if ( v4 >= *(_BYTE *)(v5 + SocketInfo + 3) ) /*0xffcd9578*/
goto LABEL_9; /*0xffcd9578*/
}
*(_BYTE *)(1379 * v4 + 48704 * (unsigned __int8)n4 + __return_address + 7688 * n6 + 259226) = 0; /*0xffcd95c5*/
DebugPrint(__return_address, 3, n4, v9, v10, 255, 255, 255, "Media is enabled, re-train Dimm\n"); /*0xffcd95e4*/
return 1; /*0xffcd958f*/
}
// Function: RmtPrintResults @ 0xffcd95f0 (0x98 bytes)
// Index: 1787/2560
int __cdecl RmtPrintResults(_DWORD *a1)
{
char v1; // bl
unsigned __int8 v2; // bh
char n11; // al
char v5; // [esp+Ah] [ebp-2h]
char v6; // [esp+Bh] [ebp-1h]
v1 = 0; /*0xffcd95fb*/
v6 = 0; /*0xffcd95fd*/
v2 = 0; /*0xffcd9607*/
v5 = 0; /*0xffcd9609*/
while ( 1 ) /*0xffcd9611*/
{
if ( ((1 << v2) & a1[61617]) != 0 ) /*0xffcd9616*/
{
if ( *((_BYTE *)a1 + 119 * v2 + 274) ) /*0xffcd961b*/
{
++v1; /*0xffcd9625*/
if ( !a1[61601] ) /*0xffcd9627*/
break; /*0xffcd9627*/
}
}
LABEL_10:
if ( ++v2 >= 4u ) /*0xffcd9654*/
goto LABEL_13; /*0xffcd9654*/
}
n11 = *((_BYTE *)a1 + 50813 * v2 + 58725); /*0xffcd9636*/
if ( n11 != 8 ) /*0xffcd963f*/
{
if ( n11 == 11 ) /*0xffcd9643*/
++v6; /*0xffcd9645*/
if ( n11 == 10 ) /*0xffcd964a*/
++v5; /*0xffcd964c*/
goto LABEL_10; /*0xffcd964c*/
}
*(_DWORD *)((char *)a1 + 9405) = 8; /*0xffcd9658*/
LABEL_13:
if ( v6 == v1 ) /*0xffcd9665*/
*(_DWORD *)((char *)a1 + 9405) = 11; /*0xffcd9667*/
if ( v5 == v1 ) /*0xffcd9676*/
*(_DWORD *)((char *)a1 + 9405) = 10; /*0xffcd9678*/
return 0; /*0xffcd9674*/
}
// Function: RmtFunc9688 @ 0xffcd9688 (0x22 bytes)
// Index: 1788/2560
int __cdecl RmtFunc9688(_DWORD *p_n42, int n4)
{
DdrTrainFunc4746(p_n42, n4); /*0xffcd9691*/
KtiFunc2747((int)p_n42, n4); /*0xffcd969c*/
return DdrTrainFuncBCBD((int)p_n42, n4);
}
// Function: MemPointTestMain @ 0xffcd96aa (0xd5d bytes)
// Index: 1789/2560
int __cdecl MemPointTestMain(int __return_address, int n4)
{
int v3; // eax
bool v4; // zf
int v5; // ecx
int n6_1; // esi
_BYTE *v7; // ebx
int v8; // eax
int v9; // esi
int v10; // ebx
bool n6_2; // bh
int v12; // esi
unsigned __int8 n6_3; // bl
int v14; // esi
int n2; // ebp
unsigned __int8 v16; // dl
int n4_1; // ebp
int v18; // esi
unsigned __int8 n4_2; // bl
char v20; // bl
char n4_3; // al
int v22; // eax
__int16 v23; // si
__int16 v24; // ax
int n8; // eax
int n4_4; // ecx
int v27; // esi
int v28; // edx
int v29; // eax
unsigned __int8 n4_5; // bp
unsigned __int8 n4_7; // bl
int v32; // eax
int v33; // ebp
_BYTE *v34; // esi
_BYTE *v35; // ebx
int v37; // [esp+Ch] [ebp-18h]
int n4_6; // [esp+10h] [ebp-14h]
unsigned __int8 n6_4; // [esp+10h] [ebp-14h]
int v40; // [esp+1Ch] [ebp-8h] BYREF
int v41; // [esp+20h] [ebp-4h]
char n6; // [esp+28h] [ebp+4h]
nullsub_5(); /*0xffcd96b9*/
v3 = 50813 * (unsigne... [22016 chars total]
// Function: MemProjectSpecificTrain @ 0xffcda407 (0x282 bytes)
// Index: 1790/2560
int __cdecl MemProjectSpecificTrain(int a1)
{
unsigned __int8 v2; // bl
int v3; // ecx
unsigned __int8 n6; // bh
_BYTE *v5; // ecx
unsigned __int8 *v6; // ebp
_BYTE *v7; // eax
int v8; // esi
unsigned __int8 v9; // bl
int v10; // esi
int v11; // ecx
int v12; // eax
_BYTE *v13; // esi
_BYTE *v14; // ebp
int v15; // eax
unsigned __int8 n9; // cl
_BYTE *v17; // eax
unsigned __int8 n6_1; // [esp+8h] [ebp-3Ch]
int v20; // [esp+Ch] [ebp-38h]
unsigned __int8 v21; // [esp+10h] [ebp-34h]
int v22; // [esp+14h] [ebp-30h]
int v23; // [esp+18h] [ebp-2Ch]
int n4; // [esp+1Ch] [ebp-28h]
_BYTE *v25; // [esp+20h] [ebp-24h]
_BYTE *v26; // [esp+24h] [ebp-20h]
unsigned __int8 *v27; // [esp+28h] [ebp-1Ch]
int v28; // [esp+2Ch] [ebp-18h]
int v29; // [esp+30h] [ebp-14h]
int v30; // [esp+34h] [ebp-10h]
int CpuCount; // [esp+38h] [ebp-Ch]
int v32; // [esp+3Ch] [ebp-8h]
unsigned __int8 v33; // [esp+48h] [ebp+4h]
v2 = *(_BYTE *)(a1 + 9402); /*0xffcda410*/
v3 = *(_DWORD *)(a1 + 246404); /*0xffcda416*/
v33 = v2; /*0xffcda41c*/
*(_BYTE *)(a1 + 9410) = v3 == 1 || *(_DWORD *)(a1 + 9405) == 10; /*0xffcda425*/
if ( !v3 && *(_DWORD *)(a1 + 9405) == 8 ) /*0xffcda44c*/
{
if ( *(_BYTE *)(a1 + 243528) ) /*0xffcda452*/
{
LogDebugString((_BYTE *)a1, (int)"Clearing the MRC NVRAM structure for ColdBoot.\n"); /*0xffcda460*/
*(_BYTE *)(a1 + 243528) = 0; /*0xffcda470*/
memset_save_flags((void *)(a1 + 257308), 0, 0x2FEF4u); /*0xffcda47a*/
}
IioTailFunc1928(a1, v2); /*0xffcda489*/
v22 = 0; /*0xffcda48e*/
v23 = 0; /*0xffcda499*/
n6 = 0; /*0xffcda49e*/
v30 = v2; /*0xffcda4ae*/
n6_1 = 0; /*0xffcda4b8*/
v32 = 119 * v2; /*0xffcda4bc*/
v29 = 48704 * v2; /*0xffcda4c0*/
v5 = (_BYTE *)(a1 + v29 + 258722); /*0xffcda4ca*/
v6 = (unsigned __int8 *)(50813 * v2 + a1 + 10240); /*0xffcda4cc*/
v28 = 50813 * v2; /*0xffcda4ce*/
v27 = v6; /*0xffcda4d8*/
v7 = (_BYTE *)(v32 + a1 + 277); /*0xffcda4dc*/
v25 = v5; /*0xffcda4de*/
v26 = v7; /*0xffcda4e2*/
do /*0xffcda656*/
{
*v5 = *v7; /*0xffcda4f0*/
v8 = v28 + (unsigned __int8)DdrTrainFunc45AB(a1, v33, n6_1); /*0xffcda503*/
*(_BYTE *)(v29 + 29 * (unsigned __int8)DdrTrainFunc45AB(a1, v33, n6_1) + a1 + 304850) = *(_BYTE *)(v8 + a1 + 10189); /*0xffcda527*/
v9 = 0; /*0xffcda533*/
CpuCount = GetCpuCount(a1, v33, n6_1); /*0xffcda535*/
v21 = 0; /*0xffcda53c*/
if ( *v6 ) /*0xffcda540*/
{
v10 = 2 * (v22 + 6 * v30); /*0xffcda552*/
do /*0xffcda61b*/
{
v20 = 0; /*0xffcda55c*/
v11 = 1379 * v9; /*0xffcda564*/
n4 = 4; /*0xffcda56a*/
v12 = *(_DWORD *)(a1 + 4 * (v9 + v10) + 777); /*0xffcda575*/
v13 = (_BYTE *)(v11 + CpuCount + 15); /*0xffcda57f*/
*(_DWORD *)(v11 + CpuCount + 100) = v12; /*0xffcda581*/
v14 = (_BYTE *)(v23 + v32 + 4 * v9 + a1 + 282); /*0xffcda596*/
do /*0xffcda608*/
{
*v13 = *v14; /*0xffcda5a3*/
if ( ProcCommonFunc24FA(a1, v33, n6_1, v21) ) /*0xffcda5aa*/
{
v15 = KtiFunc91AF(a1, v33, n6_1, v21); /*0xffcda5c3*/
n9 = 0; /*0xffcda5d5*/
v17 = (_BYTE *)(v20 + 170 + v15); /*0xffcda5d7*/
do /*0xffcda5f7*/
{
*(v17 - 18) = 0; /*0xffcda5db*/
*v17 = 0; /*0xffcda5de*/
v17[18] = 0; /*0xffcda5e0*/
v17[36] = 0; /*0xffcda5e3*/
if ( n9 < 9u ) /*0xffcda5e9*/
{
v17[54] = 0; /*0xffcda5eb*/
v17[63] = 0; /*0xffcda5ee*/
}
++n9; /*0xffcda5f1*/
++v17; /*0xffcda5f3*/
}
while ( n9 < 0x12u ); /*0xffcda5f7*/
}
v20 += 242; /*0xffcda5f9*/
++v14; /*0xffcda601*/
++v13; /*0xffcda602*/
--n4; /*0xffcda603*/
}
while ( n4 ); /*0xffcda608*/
v6 = v27; /*0xffcda60a*/
++v9; /*0xffcda60e*/
v10 = 2 * (v22 + 6 * v30); /*0xffcda610*/
v21 = v9; /*0xffcda614*/
}
while ( v9 < *v27 ); /*0xffcda61b*/
}
++n6; /*0xffcda625*/
v5 = v25 + 7688; /*0xffcda62b*/
++v22; /*0xffcda631*/
v7 = v26 + 19; /*0xffcda635*/
v23 += 19; /*0xffcda638*/
v6 += 8077; /*0xffcda63d*/
n6_1 = n6; /*0xffcda643*/
v25 += 7688; /*0xffcda647*/
v26 += 19; /*0xffcda64b*/
v27 = v6; /*0xffcda64f*/
}
while ( n6 < 6u ); /*0xffcda656*/
}
*(_WORD *)(a1 + 453589) = 0; /*0xffcda660*/
*(_WORD *)(a1 + 453589) = RmtFunc6DAF((char *)(a1 + 257308), 196340); /*0xffcda67a*/
return 0; /*0xffcda683*/
}
// Function: RmtFuncA689 @ 0xffcda689 (0xc5 bytes)
// Index: 1791/2560
__int16 __cdecl RmtFuncA689(_BYTE *__return_address)
{
__int16 v1; // di
unsigned __int8 v2; // al
__int16 v3; // bp
unsigned __int8 v4; // al
__int16 v5; // bx
unsigned __int8 v6; // al
unsigned int n0x63; // ecx
v1 = 0; /*0xffcda692*/
do /*0xffcda6ae*/
UncoreInitDelayUs(__return_address, 0x70u, 0x8Au); /*0xffcda69c*/
while ( (KtiFunc105B(__return_address, 0x71u) & 0x80u) != 0 ); /*0xffcda6ae*/
UncoreInitDelayUs(__return_address, 0x70u, 0x87u); /*0xffcda6b8*/
v2 = KtiFunc105B(__return_address, 0x71u); /*0xffcda6c0*/
v3 = (unsigned __int8)RmtFunc35FB(v2); /*0xffcda6d3*/
UncoreInitDelayUs(__return_address, 0x70u, 0x88u); /*0xffcda6dd*/
v4 = KtiFunc105B(__return_address, 0x71u); /*0xffcda6e5*/
v5 = (unsigned __int8)RmtFunc35FB(v4); /*0xffcda6fb*/
UncoreInitDelayUs(__return_address, 0x70u, 0x89u); /*0xffcda6fe*/
v6 = KtiFunc105B(__return_address, 0x71u); /*0xffcda706*/
n0x63 = (unsigned __int8)RmtFunc35FB(v6); /*0xffcda718*/
if ( n0x63 < 0x63 && (unsigned __int16)(v5 - 1) <= 0xBu && (unsigned __int16)(v3 - 1) <= 0x1Eu ) /*0xffcda730*/
return v3 + 365 * n0x63 + 30 * v5 - 30; /*0xffcda742*/
return v1; /*0xffcda748*/
}
// Function: MemColdBootCheck @ 0xffcda74e (0x451 bytes)
// Index: 1792/2560
int __usercall MemColdBootCheck@<eax>(int __return_address@<edi>, int buf@<esi>, int __return_address_1)
{
unsigned int v3; // kr00_4
int result; // eax
_DWORD v5[3]; // [esp-10h] [ebp-598h] BYREF
unsigned int v6; // [esp-4h] [ebp-58Ch]
_BYTE dst[1361]; // [esp+8h] [ebp-580h] BYREF
int v8; // [esp+55Ch] [ebp-2Ch] BYREF
char v9[4]; // [esp+560h] [ebp-28h] BYREF
int v10; // [esp+564h] [ebp-24h] BYREF
char v11[4]; // [esp+568h] [ebp-20h] BYREF
int SocketNumber; // [esp+56Ch] [ebp-1Ch]
int v13; // [esp+570h] [ebp-18h]
void *v14; // [esp+574h] [ebp-14h]
_DWORD *v15; // [esp+578h] [ebp-10h]
int v16; // [esp+57Ch] [ebp-Ch]
int n4; // [esp+582h] [ebp-6h]
unsigned __int8 n4_1; // [esp+586h] [ebp-2h]
bool v19; // [esp+587h] [ebp-1h]
int savedregs; // [esp+588h] [ebp+0h] BYREF
LOBYTE(SocketNumber) = GetSocketNumber(__return_address_1); /*0xffcda762*/
v19 = 0; /*0xffcda76d*/
v3 = __readeflags(); /*0xffcda771*/
v6 = v3; /*0xffcda771*/
v5[2] = buf; /*0xffcda772*/
v5[1] = __return_address; /*0xffcda773*/
v5[0] = &savedregs; /*0xffcda774*/
v15 = v5; /*0xffcda779*/
v14 = &loc_FFCDAB8F; /*0xffcda77d*/
*(_DWORD *)(__return_address_1 + 246772) = v5; /*0xffcda78b*/
*(_DWORD *)(__return_address_1 + 246776) = v14; /*0xffcda797*/
LOBYTE(n4) = *(_BYTE *)(__return_address_1 + 246425); /*0xffcda7a6*/
IioTailFunc194B(__return_address_1); /*0xffcda7ac*/
if ( !*(_BYTE *)(__return_address_1 + 9400) ) /*0xffcda7b5*/
*(_BYTE *)(__return_address_1 + 9479) = *(_BYTE *)(__return_address_1 + 1494); /*0xffcda7cc*/
if ( (*(_BYTE *)(__return_address_1 + 1494) & 2) != 0 ) /*0xffcda7df*/
PrintStructSizes(__return_address_1, n4); /*0xffcda7e7*/
qmemcpy(dst, (const void *)(__return_address_1 + 128), sizeof(dst)); /*0xffcda802*/
*(_BYTE *)(__return_address_1 + 243528) = 1; /*0xffcda808*/
if ( (*(_DWORD *)(__return_address_1 + 130) & 0x80) != 0 ) /*0xffcda81d*/
{
n4_1 = n4 + 1; /*0xffcda824*/
}
else
{
n4_1 = 4; /*0xffcda829*/
LOBYTE(n4) = 0; /*0xffcda82d*/
}
*(_BYTE *)(__return_address_1 + 243534) = 0; /*0xffcda834*/
while ( (unsigned __int8)n4 < (int)n4_1 ) /*0xffcda84f*/
{
if ( (*(_DWORD *)(__return_address_1 + 246468) & (1 << n4)) != 0 ) /*0xffcda863*/
{
KtiFunc7BAD(__return_address_1, n4); /*0xffcda86d*/
MemPointTestMain(__return_address_1, n4); /*0xffcda87a*/
}
LOBYTE(n4) = n4 + 1; /*0xffcda842*/
}
if ( (*(_BYTE *)(__return_address_1 + 9479) & 2) != 0 ) /*0xffcda890*/
LogDebugString((_BYTE *)__return_address_1, (int)"\nsizeof sysNvram = %d\n\n", 196679); /*0xffcda89f*/
if ( *(_BYTE *)(__return_address_1 + 243533) ) /*0xffcda8aa*/
LogDebugString((_BYTE *)__return_address_1, (int)"Previous error(s); forcing Cold Boot\n"); /*0xffcda8bd*/
if ( *(_DWORD *)(__return_address_1 + 246404) ) /*0xffcda8c7*/
{
if ( *(_DWORD *)(__return_address_1 + 246404) == 1 ) /*0xffcda967*/
{
LogDebugString((_BYTE *)__return_address_1, (int)"bootMode = S3Resume\n"); /*0xffcda971*/
if ( *(_DWORD *)(__return_address_1 + 9405) == 12 ) /*0xffcda982*/
LogDebugString((_BYTE *)__return_address_1, (int)"subBootMode = AdrResume.\n"); /*0xffcda98c*/
}
else if ( *(_DWORD *)(__return_address_1 + 9405) == 13 ) /*0xffcda99f*/
{
LogDebugString((_BYTE *)__return_address_1, (int)"subBootMode = NvDimmResume\n"); /*0xffcda9a9*/
}
else
{
LogDebugString((_BYTE *)__return_address_1, (int)"bootMode is unknown.\n"); /*0xffcda9ba*/
ProcMemInitCheck(__return_address_1, 239, 1); /*0xffcda9cb*/
}
}
else
{
LogDebugString((_BYTE *)__return_address_1, (int)"bootMode = NormalBoot\n"); /*0xffcda8dc*/
switch ( *(_DWORD *)(__return_address_1 + 9405) ) /*0xffcda8ed*/
{
case 0xA: /*0xffcda8ed*/
LogDebugString((_BYTE *)__return_address_1, (int)"subBootMode = WarmBootFast\n"); /*0xffcda8f7*/
break;
case 8: /*0xffcda8ed*/
LogDebugString((_BYTE *)__return_address_1, (int)"subBootMode = ColdBoot\n"); /*0xffcda914*/
break;
case 0xB: /*0xffcda8ed*/
LogDebugString((_BYTE *)__return_address_1, (int)"subBootMode = ColdBootFast\n"); /*0xffcda931*/
break;
default:
LogDebugString((_BYTE *)__return_address_1, (int)"subBootMode = unknown.\n"); /*0xffcda942*/
ProcMemInitCheck(__return_address_1, 239, 2); /*0xffcda953*/
break;
}
}
v19 = *(_DWORD *)(__return_address_1 + 9405) == 12; /*0xffcda9dd*/
if ( (*(_BYTE *)(__return_address_1 + 246400) & 4) != 0 ) /*0xffcda9f6*/
{
v16 = 1; /*0xffcdaa57*/
}
else
{
DdrTrainFunc43D5(__return_address_1, &v10, v11, &v8, v9); /*0xffcdaa0b*/
if ( *(unsigned __int8 *)(__return_address_1 + 246425) == *(unsigned __int8 *)(__return_address_1 + 453660) ) /*0xffcdaa29*/
v16 = RmtFunc1A29((unsigned __int8 *)__return_address_1, v10, v11[0]); /*0xffcdaa3c*/
else
v16 = RmtFunc1A29((unsigned __int8 *)__return_address_1, v8, v9[0]); /*0xffcdaa52*/
}
if ( v19 ) /*0xffcdaa64*/
*(_DWORD *)(__return_address_1 + 9405) = 12; /*0xffcdaa69*/
if ( KtiFunc2955(__return_address_1, *(_BYTE *)(__return_address_1 + 246425)) ) /*0xffcdaa81*/
{
v13 = ProcCommonFunc226E(__return_address_1, SocketNumber, 7u); /*0xffcdaaa3*/
if ( (v13 & 0x10000000) != 0 ) /*0xffcdaaae*/
ProcCommonFunc4CD7(__return_address_1, SocketNumber, 7, v13 & 0xEFFFFFFF); /*0xffcdaac1*/
if ( !*(_DWORD *)(__return_address_1 + 246404) /*0xffcdaaeb*/
&& (*(_DWORD *)(__return_address_1 + 9405) == 8 || *(_DWORD *)(__return_address_1 + 9405) == 13) )
{
*(_WORD *)(__return_address_1 + 257321) = RmtFuncA689((_BYTE *)__return_address_1); /*0xffcdaaf9*/
DebugPrint( /*0xffcdab33*/
__return_address_1,
2,
255,
255,
255,
255,
255,
255,
"Setting Last Boot Date = %u days\n",
*(unsigned __int16 *)(__return_address_1 + 257321));
qmemcpy((void *)(__return_address_1 + 257328), dst, 0x550u); /*0xffcdab4f*/
*(_BYTE *)(__return_address_1 + 258688) = dst[1360]; /*0xffcdab51*/
}
LogDebugString((_BYTE *)__return_address_1, (int)"STOP_MRC_RUN\n"); /*0xffcdab5a*/
if ( !*(_BYTE *)(__return_address_1 + 246400) ) /*0xffcdab64*/
{
KtiFunc4541(__return_address_1, 0xBFu, 0, 0); /*0xffcdab7b*/
DdrTrainFunc6F7E(__return_address_1); /*0xffcdab86*/
}
}
result = v16; /*0xffcdab8c*/
__writeeflags(v6); /*0xffcdab92*/
return result; /*0xffcdab99*/
}
// Function: PrintStructSizes @ 0xffcdab9f (0x1690 bytes)
// Index: 1793/2560
void __cdecl PrintStructSizes(int __return_address, unsigned __int8 n4)
{
int v3; // ebx
unsigned __int8 *v4; // edi
int n20; // ebp
char n2; // al
int v7; // edx
int v8; // ebx
unsigned __int8 *v9; // edi
int v10; // ebp
int v11; // ebx
int n4_1; // ebp
bool v13; // zf
int v14; // [esp+14h] [ebp-1Ch]
_DWORD *v15; // [esp+18h] [ebp-18h]
int n2_1; // [esp+1Ch] [ebp-14h]
int v17; // [esp+20h] [ebp-10h]
int v18; // [esp+24h] [ebp-Ch]
unsigned __int8 *v19; // [esp+28h] [ebp-8h]
int n6; // [esp+2Ch] [ebp-4h]
int v21; // [esp+34h] [ebp+4h]
if ( !*(_BYTE *)(__return_address + 246425) ) /*0xffcdaba8*/
KtiFuncF4E((_QWORD *)(__return_address + 9481)); /*0xffcdabb8*/
KtiFunc8014(__return_address); /*0xffcdabc1*/
LogDebugString((_BYTE *)__return_address, (int)"\nsizeof sysHost = %d\n", 679616); /*0xffcdabd3*/
LogDebugString((_BYTE *)__return_address, (int)"\nsizeof BDAT = %d ", 174258); /*0xffcdabe3*/
LogDebugString((_BYTE *)__ret... [47290 chars total]
// Function: RmtFuncC22F @ 0xffcdc22f (0xd1 bytes)
// Index: 1794/2560
int __cdecl RmtFuncC22F(int __return_address, int n4)
{
int v2; // edi
__int64 v3; // rax
if ( ((1 << n4) & *(_DWORD *)(__return_address + 246468)) != 0 )
{
v2 = 50813 * (unsigned __int8)n4; /*0xffcdc253*/
v3 = IioTailFuncE63(__return_address, n4); /*0xffcdc259*/
*(_QWORD *)(v2 + __return_address + 58728) = v3; /*0xffcdc25e*/
if ( !v3 ) /*0xffcdc270*/
{
LogDebugString((_BYTE *)__return_address, (int)"Cold fast boot not capable\n"); /*0xffcdc27c*/
return 1; /*0xffcdc286*/
}
LogDebugString((_BYTE *)__return_address, (int)"Checking PPIN\n"); /*0xffcdc28e*/
LogDebugString(
(_BYTE *)__return_address,
(int)"nvram[%d].ppin.hi: 0x%x, var[%d].ppin.hi: 0x%x \n",
(unsigned __int8)n4,
*(_DWORD *)(__return_address + 48704 * (unsigned __int8)n4 + 304912),
(unsigned __int8)n4,
*(_DWORD *)(v2 + __return_address + 58732));
LogDebugString(
(_BYTE *)__return_address,
(int)"nvram[%d].ppin.lo: 0x%x, var[%d].ppin.lo: 0x%x \n",
(unsigned __int8)n4,
*(_DWORD *)(__return_address + 48704 * (unsigned __int8)n4 + 304908),
(unsigned __int8)n4,
*(_DWORD *)(v2 + __return_address + 58728));
if ( *(_DWORD *)(__return_address + 48704 * (unsigned __int8)n4 + 304912) != *(_DWORD *)(v2 /*0xffcdc2f0*/
+ __return_address
+ 58732)
|| *(_DWORD *)(__return_address + 48704 * (unsigned __int8)n4 + 304908) != *(_DWORD *)(v2
+ __return_address
+ 58728) )
{
LogDebugString((_BYTE *)__return_address, (int)"PPIN Changed\n"); /*0xffcdc2f7*/
return 1; /*0xffcdc2f7*/
}
}
return 0; /*0xffcdc2fb*/
}
// Function: RmtFuncC300 @ 0xffcdc300 (0x434 bytes)
// Index: 1795/2560
int __cdecl RmtFuncC300(unsigned __int8 *__return_address, int n4)
{
unsigned __int8 n4_1; // bl
unsigned __int8 *__return_address_1; // edi
int SocketInfo; // eax
unsigned __int8 n6_1; // dl
int v6; // ecx
_BYTE *v7; // esi
int v8; // ebp
int CpuCount; // esi
int v10; // ebp
unsigned __int8 v11; // al
int v12; // edx
unsigned __int8 *v13; // ecx
unsigned __int8 *v14; // esi
int v15; // ebx
unsigned __int8 *v16; // edi
unsigned __int8 n9; // ah
int v18; // ecx
unsigned __int8 v19; // al
int v20; // ecx
unsigned __int8 v21; // al
unsigned __int8 v23; // [esp+12h] [ebp-4Eh]
int n6; // [esp+14h] [ebp-4Ch]
int n2; // [esp+18h] [ebp-48h]
int v26; // [esp+1Ch] [ebp-44h]
unsigned __int8 *v27; // [esp+20h] [ebp-40h]
unsigned __int8 *v28; // [esp+24h] [ebp-3Ch]
int v29; // [esp+28h] [ebp-38h]
unsigned __int8 v30; // [esp+2Ch] [ebp-34h]
int v31; // [esp+30h] [ebp-30h]
int v32; // [esp+34h] [ebp-2Ch]
unsigned __int8 *v33; // [esp+38h] [ebp-28h]
int v34; // [esp+3Ch] [ebp-24h]
int v35; // [esp+40h] [ebp-20h]
_BYTE *v36; // [esp+44h] [ebp-1Ch]
int v37; // [esp+48h] [ebp-18h]
int v38; // [esp+4Ch] [ebp-14h]
int v39; // [esp+54h] [ebp-Ch]
unsigned __int8 *v40; // [esp+58h] [ebp-8h]
int CpuCount_1; // [esp+5Ch] [ebp-4h]
n4_1 = n4; /*0xffcdc304*/
LOBYTE(n2) = 0; /*0xffcdc30c*/
v29 = 0; /*0xffcdc311*/
__return_address_1 = __return_address; /*0xffcdc316*/
v32 = 0; /*0xffcdc31a*/
do /*0xffcdc724*/
{
v37 = KtiFunc8E67((int)__return_address_1, n4_1, n2, 0); /*0xffcdc32d*/
SocketInfo = GetSocketInfo((int)__return_address_1, n4_1); /*0xffcdc331*/
n6_1 = 0; /*0xffcdc336*/
v6 = 0; /*0xffcdc338*/
LOBYTE(n6) = 0; /*0xffcdc33d*/
v31 = 0; /*0xffcdc341*/
v7 = (_BYTE *)(SocketInfo + 6675); /*0xffcdc345*/
v35 = 0; /*0xffcdc34b*/
v36 = (_BYTE *)(SocketInfo + 6675); /*0xffcdc34f*/
do /*0xffcdc700*/
{
v8 = v32; /*0xffcdc353*/
if ( ((1 << v6) & v37) != 0 && *v7 ) /*0xffcdc366*/
{
v27 = &__return_address_1[50813 * n4_1 + 12557 + v31]; /*0xffcdc389*/
CpuCount = GetCpuCount((int)__return_address_1, n4_1, n6); /*0xffcdc396*/
CpuCount_1 = CpuCount; /*0xffcdc39c*/
v34 = KtiFunc91AF((int)__return_address_1, n4_1, n6, n2); /*0xffcdc3a7*/
if ( *(_WORD *)(CpuCount + v32 + 140) == 0xB304 ) /*0xffcdc3bb*/
v23 = *(_BYTE *)(CpuCount + v32 + 20) - 1; /*0xffcdc3c3*/
else
v23 = 0; /*0xffcdc3c9*/
v10 = v34; /*0xffcdc3dd*/
v38 = KtiFunc91DE((int)__return_address_1, n4_1, n6, n2); /*0xffcdc3e4*/
v11 = 0; /*0xffcdc3e8*/
v30 = 0; /*0xffcdc3ea*/
do /*0xffcdc6a4*/
{
v12 = v29; /*0xffcdc3f8*/
v39 = v11; /*0xffcdc41a*/
v26 = 242 * v11; /*0xffcdc423*/
v13 = (unsigned __int8 *)(v10 + 170 + v26); /*0xffcdc42d*/
v40 = v13; /*0xffcdc42f*/
v28 = v13; /*0xffcdc436*/
v14 = &v27[18 * v11 + 1221 + v29]; /*0xffcdc43c*/
v15 = 0; /*0xffcdc444*/
v16 = (unsigned __int8 *)(244 * v11 + v38 + 172); /*0xffcdc448*/
n9 = 0; /*0xffcdc44a*/
v33 = v16; /*0xffcdc44e*/
do /*0xffcdc4f5*/
{
*(v16 - 18) = *(v14 - 72); /*0xffcdc455*/
*v16 = *v14; /*0xffcdc45a*/
v16[18] = v14[72]; /*0xffcdc45f*/
v16[36] = v14[144]; /*0xffcdc468*/
if ( n9 < 9u ) /*0xffcdc46e*/
{
v18 = v15 + v12 + 9 * v39; /*0xffcdc479*/
v16[54] = v27[v18 + 1437]; /*0xffcdc482*/
v19 = v27[v18 + 1473]; /*0xffcdc485*/
v12 = v29; /*0xffcdc48c*/
v13 = v28; /*0xffcdc490*/
v16[63] = v19; /*0xffcdc494*/
}
*(v13 - 18) = *(v14 - 72); /*0xffcdc49a*/
*v13 = *v14; /*0xffcdc49f*/
v13[18] = v14[72]; /*0xffcdc4a4*/
v13[36] = v14[144]; /*0xffcdc4ad*/
if ( n9 < 9u ) /*0xffcdc4b3*/
{
v20 = v15 + v12 + 9 * v39; /*0xffcdc4be*/
v28[54] = v27[v20 + 1437]; /*0xffcdc4cb*/
v21 = v27[v20 + 1473]; /*0xffcdc4d2*/
v13 = v28; /*0xffcdc4d9*/
v16 = v33; /*0xffcdc4dd*/
v28[63] = v21; /*0xffcdc4e1*/
}
++n9; /*0xffcdc4e4*/
++v15; /*0xffcdc4e6*/
++v16; /*0xffcdc4e7*/
++v14; /*0xffcdc4e8*/
++v13; /*0xffcdc4e9*/
v33 = v16; /*0xffcdc4ea*/
v28 = v13; /*0xffcdc4ee*/
}
while ( n9 < 0x12u ); /*0xffcdc4f5*/
v10 = v34; /*0xffcdc508*/
n4_1 = n4; /*0xffcdc50e*/
__return_address_1 = __return_address; /*0xffcdc512*/
KtiFuncFD65(__return_address, n4, n6, n2, 0, (unsigned __int8 *)(v34 + v26 + 152), v30, 0x20u, 0xFFu); /*0xffcdc52b*/
KtiFuncFD65(__return_address, n4, n6, n2, 0, (unsigned __int8 *)(v34 + v26 + 161), v30, 0x30u, 0xFFu); /*0xffcdc550*/
KtiFuncFD65(__return_address, n4, n6, n2, 0, v40, v30, 0x40u, 0xFFu); /*0xffcdc570*/
KtiFuncFD65(__return_address, n4, n6, n2, 0, (unsigned __int8 *)(v34 + v26 + 179), v30, 0x50u, 0xFFu); /*0xffcdc595*/
KtiFuncFD65(__return_address, n4, n6, n2, 0, (unsigned __int8 *)(v34 + v26 + 224), v30, 0xC0u, 0xFFu); /*0xffcdc5c0*/
KtiFuncFD65(__return_address, n4, n6, n2, 0, (unsigned __int8 *)(v34 + v26 + 188), v30, 0x80u, 0xFFu); /*0xffcdc5e8*/
KtiFuncFD65(__return_address, n4, n6, n2, 0, (unsigned __int8 *)(v34 + v26 + 197), v30, 0x90u, 0xFFu); /*0xffcdc613*/
KtiFuncFD65(__return_address, n4, n6, n2, 0, (unsigned __int8 *)(v34 + v26 + 206), v30, 0xA0u, 0xFFu); /*0xffcdc63b*/
KtiFuncFD65(__return_address, n4, n6, n2, 0, (unsigned __int8 *)(v34 + v26 + 215), v30, 0xB0u, 0xFFu); /*0xffcdc666*/
KtiFuncFD65(__return_address, n4, n6, n2, 0, (unsigned __int8 *)(v34 + v26 + 233), v30, 0xD0u, 0xFFu); /*0xffcdc68e*/
v11 = v30 + 1; /*0xffcdc69a*/
v30 = v11; /*0xffcdc69c*/
}
while ( v11 <= v23 ); /*0xffcdc6a4*/
v8 = v32; /*0xffcdc6ae*/
*(_BYTE *)(CpuCount_1 + v32 + 78) &= ~8u; /*0xffcdc6b6*/
KtiFuncFC62(__return_address, n4, n6, n2, 0, *(_BYTE *)(CpuCount_1 + v32 + 78), 0, 0x10u); /*0xffcdc6cc*/
n6_1 = n6; /*0xffcdc6d1*/
v7 = v36; /*0xffcdc6d8*/
v6 = v35; /*0xffcdc6dc*/
}
v31 += 8077; /*0xffcdc6e0*/
++n6_1; /*0xffcdc6e8*/
++v6; /*0xffcdc6ea*/
LOBYTE(n6) = n6_1; /*0xffcdc6eb*/
v7 += 7688; /*0xffcdc6ef*/
v35 = v6; /*0xffcdc6f5*/
v36 = v7; /*0xffcdc6f9*/
}
while ( n6_1 < 6u ); /*0xffcdc700*/
v29 += 2688; /*0xffcdc710*/
LOBYTE(n2) = n2 + 1; /*0xffcdc71a*/
v32 = v8 + 1379; /*0xffcdc71e*/
}
while ( (unsigned __int8)n2 < 2u ); /*0xffcdc724*/
return 0; /*0xffcdc72a*/
}
// Function: RmtMarginCalc @ 0xffcdc734 (0x11a bytes)
// Index: 1796/2560
BOOL __cdecl RmtMarginCalc(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // esi
unsigned __int8 v2; // bl
int v3; // eax
unsigned __int8 n2; // bl
int v5; // ebp
unsigned __int8 n6_1; // bh
int v7; // edi
int SocketInfo; // [esp+8h] [ebp-10h]
int n6; // [esp+Ch] [ebp-Ch]
int v11; // [esp+10h] [ebp-8h]
BOOL v12; // [esp+14h] [ebp-4h]
__return_address_1 = __return_address; /*0xffcdc73e*/
v2 = __return_address[9402]; /*0xffcdc742*/
LOBYTE(__return_address) = v2; /*0xffcdc748*/
SocketInfo = GetSocketInfo((int)__return_address_1, v2); /*0xffcdc756*/
if ( (~*((_DWORD *)__return_address_1 + 157163) & 0x80000) != 0 ) /*0xffcdc769*/
return 0; /*0xffcdc769*/
v3 = 48704 * v2; /*0xffcdc772*/
if ( !__return_address_1[v3 + 258689] /*0xffcdc7a2*/
|| !__return_address_1[v3 + 258716]
|| *(_WORD *)(__return_address_1 + 257315) == 11
|| !__return_address_1[v3 + 258703] )
{
return 0; /*0xffcdc846*/
}
v12 = IioDmiInitMain(__return_address_1, (int)__return_address) == 1; /*0xffcdc7c3*/
n2 = 0; /*0xffcdc7c8*/
v5 = 0; /*0xffcdc7ca*/
LOBYTE(v11) = 0; /*0xffcdc7cd*/
do /*0xffcdc83c*/
{
n6_1 = 0; /*0xffcdc7d5*/
LOBYTE(n6) = 0; /*0xffcdc7d7*/
v7 = 0; /*0xffcdc7db*/
do /*0xffcdc82b*/
{
if ( *(_BYTE *)(v7 + SocketInfo) ) /*0xffcdc7dd*/
{
if ( *(_BYTE *)(v7 + v5 + SocketInfo + 466) ) /*0xffcdc7e6*/
KtiFuncFC19(__return_address_1, (int)__return_address, n6, v11, 0, 0, 0, 0x70u); /*0xffcdc805*/
}
++n6_1; /*0xffcdc81c*/
v7 += 7688; /*0xffcdc81e*/
LOBYTE(n6) = n6_1; /*0xffcdc824*/
}
while ( n6_1 < 6u ); /*0xffcdc82b*/
++n2; /*0xffcdc82d*/
v5 += 1379; /*0xffcdc82f*/
LOBYTE(v11) = n2; /*0xffcdc835*/
}
while ( n2 < 2u ); /*0xffcdc83c*/
return v12; /*0xffcdc848*/
}
// Function: RmtMarginToolOutput @ 0xffcdc84e (0x135 bytes)
// Index: 1797/2560
BOOL __cdecl RmtMarginToolOutput(unsigned __int8 *n4)
{
unsigned __int8 *n4_1; // esi
unsigned __int8 v2; // bl
int v3; // eax
BOOL v4; // edi
unsigned __int8 n2; // bl
int v6; // eax
unsigned __int8 n6_1; // bh
int v8; // ebp
int SocketInfo; // [esp+Ch] [ebp-14h]
int n6; // [esp+10h] [ebp-10h]
int v12; // [esp+14h] [ebp-Ch]
n4_1 = n4; /*0xffcdc853*/
v2 = n4[9402]; /*0xffcdc85a*/
LOBYTE(n4) = v2; /*0xffcdc860*/
SocketInfo = GetSocketInfo((int)n4_1, v2); /*0xffcdc86e*/
if ( (~*((_DWORD *)n4_1 + 157163) & 0x80000) != 0 ) /*0xffcdc881*/
return 0; /*0xffcdc881*/
v3 = 48704 * v2; /*0xffcdc88a*/
if ( !n4_1[v3 + 258689] || !n4_1[v3 + 258716] || *(_WORD *)(n4_1 + 257315) == 11 || !n4_1[v3 + 258703] ) /*0xffcdc8ba*/
return 0; /*0xffcdc97a*/
v4 = RmtFuncF9AB(n4_1, (int)n4) == 1; /*0xffcdc8db*/
if ( RmtFuncC983(n4_1, (int)n4) == 1 ) /*0xffcdc8eb*/
v4 = 1; /*0xffcdc8ed*/
n2 = 0; /*0xffcdc8ef*/
v6 = 0; /*0xffcdc8f1*/
LOBYTE(v12) = 0; /*0xffcdc8f3*/
do /*0xffcdc973*/
{
n6_1 = 0; /*0xffcdc900*/
LOBYTE(n6) = 0; /*0xffcdc902*/
v8 = 0; /*0xffcdc906*/
do /*0xffcdc95f*/
{
if ( *(_BYTE *)(SocketInfo + v8) ) /*0xffcdc908*/
{
if ( *(_BYTE *)(v6 + v8 + SocketInfo + 466) ) /*0xffcdc911*/
KtiFuncFC19(n4_1, (int)n4, n6, v12, 0, 0, 0, 0x70u); /*0xffcdc934*/
}
++n6_1; /*0xffcdc950*/
v8 += 7688; /*0xffcdc952*/
LOBYTE(n6) = n6_1; /*0xffcdc958*/
}
while ( n6_1 < 6u ); /*0xffcdc95f*/
++n2; /*0xffcdc961*/
v6 += 1379; /*0xffcdc963*/
LOBYTE(v12) = n2; /*0xffcdc968*/
}
while ( n2 < 2u ); /*0xffcdc973*/
return v4; /*0xffcdc97c*/
}
// Function: RmtFuncC983 @ 0xffcdc983 (0x68b bytes)
// Index: 1798/2560
int __cdecl RmtFuncC983(unsigned __int8 *__return_address, int n4)
{
unsigned __int8 n4_1; // bl
unsigned __int8 *__return_address_1; // edi
int SocketInfo; // esi
int v5; // ebp
char v6; // cl
_BYTE *v7; // edx
int n6_1; // esi
int n218; // esi
int v10; // ebp
char v11; // cl
_BYTE *v12; // eax
int CpuCount; // ebp
bool v14; // zf
bool v15; // cf
unsigned __int8 *v16; // esi
int v17; // eax
_BYTE *v18; // esi
int v19; // ecx
unsigned __int8 n6_2; // al
int n20_1; // ebp
int v22; // esi
unsigned __int8 v23; // bl
unsigned __int8 v24; // bh
unsigned __int8 n9; // cl
int v26; // edi
int v27; // ebp
unsigned __int8 *v28; // esi
unsigned __int8 *v29; // edx
unsigned int v30; // esi
int n20_2; // ebp
int v32; // edi
unsigned __int8 v33; // cl
__int16 v34; // ax
__int16 v35; // bx
int v36; // ebp
unsigned int v37; // eax
unsigned int v38; // edx
__int16 v39; // di
unsigned __int8 *v40; // esi
_BYTE *v41; // edx
... [12828 chars total]
// Function: RmtMarginToolCmd @ 0xffcdd00e (0x139 bytes)
// Index: 1799/2560
BOOL __cdecl RmtMarginToolCmd(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // esi
unsigned __int8 v2; // bl
unsigned __int8 *__return_address_2; // edi
int v4; // eax
unsigned __int8 n2; // bl
int v6; // eax
unsigned __int8 n6_1; // bh
int v8; // ebp
int n6; // [esp+Ch] [ebp-14h]
int v11; // [esp+10h] [ebp-10h]
BOOL v12; // [esp+18h] [ebp-8h]
unsigned __int8 *SocketInfo; // [esp+24h] [ebp+4h]
__return_address_1 = __return_address; /*0xffcdd018*/
v2 = __return_address[9402]; /*0xffcdd01d*/
LOBYTE(__return_address) = v2; /*0xffcdd023*/
__return_address_2 = __return_address; /*0xffcdd027*/
SocketInfo = (unsigned __int8 *)GetSocketInfo((int)__return_address_1, v2); /*0xffcdd032*/
if ( (~*((_DWORD *)__return_address_1 + 157163) & 0x80000) != 0 ) /*0xffcdd045*/
return 0; /*0xffcdd045*/
v4 = 48704 * v2; /*0xffcdd04e*/
if ( !__return_address_1[v4 + 258689] /*0xffcdd07e*/
|| !__return_address_1[v4 + 258716]
|| *(_WORD *)(__return_address_1 + 257315) == 11
|| !__return_address_1[v4 + 258703] )
{
return 0; /*0xffcdd13e*/
}
ProcCommonFunc412D(__return_address_1, (unsigned __int8)__return_address_2, 0); /*0xffcdd090*/
v12 = IioFuncD06(__return_address_1, (int)__return_address_2) == 1; /*0xffcdd0a6*/
ProcCommonFunc412D(__return_address_1, (unsigned __int8)__return_address_2, 1); /*0xffcdd0ad*/
n2 = 0; /*0xffcdd0b5*/
v6 = 0; /*0xffcdd0b7*/
LOBYTE(v11) = 0; /*0xffcdd0b9*/
do /*0xffcdd135*/
{
n6_1 = 0; /*0xffcdd0c6*/
LOBYTE(n6) = 0; /*0xffcdd0c8*/
v8 = 0; /*0xffcdd0cc*/
do /*0xffcdd121*/
{
if ( SocketInfo[v8] ) /*0xffcdd0ce*/
{
if ( SocketInfo[v6 + 466 + v8] ) /*0xffcdd0d7*/
KtiFuncFC19(__return_address_1, (int)__return_address_2, n6, v11, 0, 0, 0, 0x70u); /*0xffcdd0f6*/
}
++n6_1; /*0xffcdd112*/
v8 += 7688; /*0xffcdd114*/
LOBYTE(n6) = n6_1; /*0xffcdd11a*/
}
while ( n6_1 < 6u ); /*0xffcdd121*/
++n2; /*0xffcdd123*/
v6 += 1379; /*0xffcdd125*/
LOBYTE(v11) = n2; /*0xffcdd12a*/
}
while ( n2 < 2u ); /*0xffcdd135*/
return v12; /*0xffcdd140*/
}
// Function: RmtMarginToolCtl @ 0xffcdd147 (0x116 bytes)
// Index: 1800/2560
BOOL __cdecl RmtMarginToolCtl(unsigned __int8 *n4)
{
unsigned __int8 *n4_1; // esi
unsigned __int8 v2; // cl
int v3; // eax
int v4; // eax
int SocketInfo; // eax
unsigned __int8 n2; // bl
int v7; // ebp
unsigned __int8 n6_1; // bh
int v9; // edi
int n6; // [esp+4h] [ebp-10h]
int v12; // [esp+8h] [ebp-Ch]
BOOL v13; // [esp+Ch] [ebp-8h]
n4_1 = n4; /*0xffcdd150*/
v2 = n4[9402]; /*0xffcdd15a*/
v3 = ~*((_DWORD *)n4 + 157163); /*0xffcdd160*/
LOBYTE(n4) = v2; /*0xffcdd162*/
if ( (v3 & 0x100000) != 0 ) /*0xffcdd16b*/
return 0; /*0xffcdd16b*/
v4 = 48704 * v2; /*0xffcdd174*/
if ( !n4_1[v4 + 258689] || !n4_1[v4 + 258716] || *(_WORD *)(n4_1 + 257315) == 11 || !n4_1[v4 + 258703] ) /*0xffcdd1a4*/
return 0; /*0xffcdd256*/
v13 = RmtFuncF059(n4_1, (int)n4) == 1; /*0xffcdd1c5*/
SocketInfo = GetSocketInfo((int)n4_1, (unsigned __int8)n4); /*0xffcdd1d1*/
n2 = 0; /*0xffcdd1d6*/
LOBYTE(v12) = 0; /*0xffcdd1de*/
v7 = 0; /*0xffcdd1e2*/
do /*0xffcdd24b*/
{
n6_1 = 0; /*0xffcdd1e4*/
v9 = 0; /*0xffcdd1e6*/
LOBYTE(n6) = 0; /*0xffcdd1e8*/
do /*0xffcdd23a*/
{
if ( *(_BYTE *)(v9 + SocketInfo) ) /*0xffcdd1ec*/
{
if ( *(_BYTE *)(v9 + v7 + SocketInfo + 466) ) /*0xffcdd1f5*/
KtiFuncFC19(n4_1, (int)n4, n6, v12, 0, 0, 0, 0x70u); /*0xffcdd214*/
}
++n6_1; /*0xffcdd22b*/
v9 += 7688; /*0xffcdd22d*/
LOBYTE(n6) = n6_1; /*0xffcdd233*/
}
while ( n6_1 < 6u ); /*0xffcdd23a*/
++n2; /*0xffcdd23c*/
v7 += 1379; /*0xffcdd23e*/
LOBYTE(v12) = n2; /*0xffcdd244*/
}
while ( n2 < 2u ); /*0xffcdd24b*/
return v13; /*0xffcdd258*/
}
// Function: RmtMarginToolDqs @ 0xffcdd25d (0x1a6 bytes)
// Index: 1801/2560
BOOL __cdecl RmtMarginToolDqs(int n6)
{
int n6_1; // esi
unsigned __int8 v2; // cl
int v3; // eax
int v4; // eax
int n6_2; // edi
unsigned __int8 n2; // bh
int v7; // ebp
int v8; // edx
unsigned __int8 v9; // bl
unsigned __int8 n6_3; // al
int v11; // ecx
bool v12; // al
int v14; // [esp+8h] [ebp-20h]
int v15; // [esp+Ch] [ebp-1Ch]
int v16; // [esp+10h] [ebp-18h]
BOOL v17; // [esp+14h] [ebp-14h]
int v18; // [esp+18h] [ebp-10h]
unsigned __int8 v19; // [esp+18h] [ebp-10h]
int SocketInfo; // [esp+1Ch] [ebp-Ch]
int v21; // [esp+24h] [ebp-4h]
n6_1 = n6; /*0xffcdd262*/
v2 = *(_BYTE *)(n6 + 9402); /*0xffcdd272*/
v3 = ~*(_DWORD *)(n6 + 628652); /*0xffcdd278*/
LOBYTE(n6) = v2; /*0xffcdd27a*/
if ( (v3 & 0x100000) != 0 ) /*0xffcdd283*/
return 0; /*0xffcdd283*/
v18 = v2; /*0xffcdd28c*/
v4 = 48704 * v2; /*0xffcdd290*/
if ( !*(_BYTE *)(v4 + n6_1 + 258689) /*0xffcdd2c0*/
|| !*(_BYTE *)(v4 + n6_1 + 258716)
|| *(_WORD *)(n6_1 + 257315) == 11
|| !*(_BYTE *)(v4 + n6_1 + 258703) )
{
return 0; /*0xffcdd3fb*/
}
n6_2 = n6; /*0xffcdd2d0*/
v17 = IioFunc15E8((unsigned __int8 *)n6_1, n6) == 1; /*0xffcdd2e4*/
if ( RmtFuncD541((unsigned __int8 *)n6_1, n6) == 1 ) /*0xffcdd2f3*/
v17 = 1; /*0xffcdd2f5*/
SocketInfo = GetSocketInfo(n6_1, n6); /*0xffcdd300*/
n2 = 0; /*0xffcdd304*/
v7 = 50813 * v18; /*0xffcdd30a*/
v8 = 0; /*0xffcdd310*/
LOBYTE(v16) = 0; /*0xffcdd314*/
v15 = 0; /*0xffcdd318*/
v21 = 50813 * v18; /*0xffcdd31c*/
do /*0xffcdd3ed*/
{
v9 = 0; /*0xffcdd320*/
v19 = 0; /*0xffcdd322*/
if ( *(_BYTE *)(n6_1 + v7 + 10194) ) /*0xffcdd326*/
{
do /*0xffcdd3d4*/
{
n6_3 = 0; /*0xffcdd337*/
v11 = 0; /*0xffcdd339*/
LOBYTE(n6) = 0; /*0xffcdd33b*/
v14 = 0; /*0xffcdd33f*/
do /*0xffcdd3c1*/
{
if ( *(_BYTE *)(v11 + SocketInfo) ) /*0xffcdd343*/
{
v12 = KtiFunc89E9(n6_1, n6_2, n6, v16, v19, 0); /*0xffcdd359*/
v11 = v14; /*0xffcdd35e*/
v8 = v15; /*0xffcdd365*/
if ( !v12 ) /*0xffcdd36b*/
{
if ( *(_BYTE *)(v15 + v14 + SocketInfo + 466) ) /*0xffcdd370*/
KtiFuncFC19((unsigned __int8 *)n6_1, n6_2, n6, v16, 0, 0, 0, 0x70u); /*0xffcdd38f*/
}
n6_3 = n6; /*0xffcdd3ab*/
}
++n6_3; /*0xffcdd3af*/
v11 += 7688; /*0xffcdd3b1*/
LOBYTE(n6) = n6_3; /*0xffcdd3b7*/
v14 = v11; /*0xffcdd3bb*/
}
while ( n6_3 < 6u ); /*0xffcdd3c1*/
v7 = v21; /*0xffcdd3c3*/
v19 = ++v9; /*0xffcdd3c9*/
}
while ( v9 < *(_BYTE *)(n6_1 + v21 + 10194) ); /*0xffcdd3d4*/
}
++n2; /*0xffcdd3da*/
v8 += 1379; /*0xffcdd3dc*/
LOBYTE(v16) = n2; /*0xffcdd3e2*/
v15 = v8; /*0xffcdd3e6*/
}
while ( n2 < 2u ); /*0xffcdd3ed*/
return v17; /*0xffcdd3fd*/
}
// Function: RmtMarginToolDq @ 0xffcdd403 (0x13e bytes)
// Index: 1802/2560
BOOL __cdecl RmtMarginToolDq(int n4)
{
int n4_1; // esi
BOOL v2; // ebp
unsigned __int8 v3; // bl
int v4; // eax
unsigned __int8 n2; // bl
int v6; // eax
unsigned __int8 n6_1; // bh
int v8; // edi
int SocketInfo; // [esp+Ch] [ebp-14h]
int n6; // [esp+10h] [ebp-10h]
int v12; // [esp+14h] [ebp-Ch]
n4_1 = n4; /*0xffcdd409*/
v2 = 0; /*0xffcdd40d*/
v3 = *(_BYTE *)(n4 + 9402); /*0xffcdd40f*/
LOBYTE(n4) = v3; /*0xffcdd415*/
SocketInfo = GetSocketInfo(n4_1, v3); /*0xffcdd423*/
if ( (~*(_DWORD *)(n4_1 + 628652) & 0x100000) != 0 ) /*0xffcdd436*/
return 0; /*0xffcdd436*/
v4 = 48704 * v3; /*0xffcdd43f*/
if ( !*(_BYTE *)(v4 + n4_1 + 258689) /*0xffcdd46f*/
|| !*(_BYTE *)(v4 + n4_1 + 258716)
|| *(_WORD *)(n4_1 + 257315) == 11
|| !*(_BYTE *)(v4 + n4_1 + 258703) )
{
return 0; /*0xffcdd538*/
}
if ( *(_BYTE *)(n4_1 + 1365) ) /*0xffcdd481*/
v2 = RmtFuncC300((unsigned __int8 *)n4_1, n4) == 1; /*0xffcdd49a*/
if ( RmtFuncDB59((unsigned __int8 *)n4_1, n4) == 1 ) /*0xffcdd4aa*/
v2 = 1; /*0xffcdd4ac*/
n2 = 0; /*0xffcdd4ae*/
v6 = 0; /*0xffcdd4b0*/
LOBYTE(v12) = 0; /*0xffcdd4b2*/
do /*0xffcdd531*/
{
n6_1 = 0; /*0xffcdd4be*/
LOBYTE(n6) = 0; /*0xffcdd4c0*/
v8 = 0; /*0xffcdd4c4*/
do /*0xffcdd51d*/
{
if ( *(_BYTE *)(v8 + SocketInfo) ) /*0xffcdd4c6*/
{
if ( *(_BYTE *)(v6 + v8 + SocketInfo + 466) ) /*0xffcdd4cf*/
KtiFuncFC19((unsigned __int8 *)n4_1, n4, n6, v12, 0, 0, 0, 0x70u); /*0xffcdd4f2*/
}
++n6_1; /*0xffcdd50e*/
v8 += 7688; /*0xffcdd510*/
LOBYTE(n6) = n6_1; /*0xffcdd516*/
}
while ( n6_1 < 6u ); /*0xffcdd51d*/
++n2; /*0xffcdd51f*/
v6 += 1379; /*0xffcdd521*/
LOBYTE(v12) = n2; /*0xffcdd526*/
}
while ( n2 < 2u ); /*0xffcdd531*/
return v2; /*0xffcdd53a*/
}
// Function: RmtFuncD541 @ 0xffcdd541 (0x618 bytes)
// Index: 1803/2560
int __cdecl RmtFuncD541(unsigned __int8 *n6, int n4)
{
int n4_1; // ebx
unsigned __int8 *n6_1; // edi
_BYTE *v4; // esi
int v5; // ecx
unsigned __int8 n6_3; // al
int n20_1; // ebp
int v8; // esi
unsigned __int8 v9; // bl
unsigned __int8 v10; // bh
unsigned __int8 n9; // cl
int v12; // ebp
unsigned __int8 *v13; // edi
int v14; // edx
int v15; // esi
unsigned __int8 *v16; // edx
unsigned int v17; // ecx
int n20_2; // ebp
unsigned __int8 v19; // al
__int16 v20; // bx
__int16 v21; // bp
unsigned __int8 *v22; // edi
_BYTE *v23; // edx
unsigned __int16 n2; // ax
unsigned int n0xF; // ecx
int v26; // ecx
unsigned __int8 v27; // al
bool v28; // zf
unsigned __int8 v29; // al
unsigned __int8 *v30; // edx
unsigned __int8 *v31; // esi
unsigned __int8 *v32; // ecx
unsigned __int8 n9_2; // ah
unsigned __int8 v35; // [esp+12h] [ebp-52h]
unsigned __int8 n9_1; // [esp+12h] [ebp-52h]
unsigned __int8 v37; // [esp+12h] [ebp-52h]
unsi... [10414 chars total]
// Function: RmtFuncDB59 @ 0xffcddb59 (0x8c1 bytes)
// Index: 1804/2560
int __cdecl RmtFuncDB59(unsigned __int8 *__return_address, int n4)
{
int n4_1; // ebx
unsigned __int8 *__return_address_1; // ebp
int v4; // esi
int v5; // eax
int n2_1; // edi
int v7; // eax
int v8; // esi
unsigned __int8 n6_1; // dl
int v10; // ecx
int v11; // esi
unsigned __int8 n6_2; // dl
char v13; // si
unsigned __int8 n0x80; // dh
int v15; // esi
unsigned __int8 n6_3; // dl
int v17; // ecx
unsigned __int8 v18; // bl
int CpuCount; // ecx
int v20; // eax
unsigned __int8 n6_4; // dl
int v22; // ecx
int v23; // esi
_BYTE *SocketInfo_1; // ecx
unsigned __int8 n6a_1; // al
_DWORD *v26; // esi
int v27; // esi
int v28; // ecx
unsigned __int8 n6_6; // dl
int n6_5; // esi
unsigned __int8 n8_1; // al
int v32; // ecx
unsigned __int8 v33; // al
unsigned __int8 n9; // cl
char *v35; // edx
unsigned __int8 v36; // al
_BYTE *v37; // edi
char v38; // al
unsigned __int8 v40; // [esp-2Ch] [ebp-3FCh]
int n6; // [esp+13h] [... [16096 chars total]
// Function: RmtFuncE41A @ 0xffcde41a (0x180 bytes)
// Index: 1805/2560
int __cdecl RmtFuncE41A(unsigned __int8 *__return_address, char n4, unsigned __int8 n2, char a4, char a5)
{
unsigned __int8 n2_1; // bp
_BYTE *SocketInfo_1; // eax
unsigned __int8 n6_1; // bl
int v8; // ecx
unsigned __int8 n2_2; // cl
unsigned __int8 n8_1; // bh
unsigned __int8 n6; // [esp+10h] [ebp-20h]
int v13; // [esp+14h] [ebp-1Ch]
int SocketInfo; // [esp+18h] [ebp-18h]
int v15; // [esp+1Ch] [ebp-14h]
unsigned __int8 n8; // [esp+20h] [ebp-10h]
int CpuCount; // [esp+24h] [ebp-Ch]
int v18; // [esp+28h] [ebp-8h]
char i; // [esp+2Ch] [ebp-4h]
n2_1 = n2; /*0xffcde430*/
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffcde43a*/
MailBoxFunc4A8B(__return_address, n4, n2, a4, 11); /*0xffcde44b*/
KtiFunc8C4((int)__return_address, 1u); /*0xffcde453*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcde458*/
n6_1 = 0; /*0xffcde45c*/
n6 = 0; /*0xffcde461*/
v13 = 0; /*0xffcde465*/
v8 = 0; /*0xffcde46a*/
do /*0xffcde57b*/
{
if ( *SocketInfo_1 ) /*0xffcde46e*/
{
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffcde488*/
if ( !KtiFunc89E9((int)__return_address, n4, n6, n2_1, a4, 0) ) /*0xffcde493*/
{
n2_2 = n2; /*0xffcde4a3*/
n8_1 = 0; /*0xffcde4a7*/
v15 = 0; /*0xffcde4ba*/
n8 = 0; /*0xffcde4bf*/
v18 = 1379 * n2; /*0xffcde4c3*/
do /*0xffcde54e*/
{
i = AutoGenFuncF87F((int)__return_address, n4, n6, n2_2, n8); /*0xffcde4e0*/
if ( (*(_WORD *)(v18 + CpuCount + 140) != 12806 || *(_BYTE *)(v18 + CpuCount + 217) != 0xA1 || a5 != -2) /*0xffcde520*/
&& ProcCommonFunc2638(__return_address, n4, n6, i, 255) == 15 )
{
__return_address[v13 + 236697 + v15] |= 1 << (a5 + 2); /*0xffcde536*/
}
n2_2 = n2; /*0xffcde53d*/
++n8_1; /*0xffcde541*/
++v15; /*0xffcde543*/
n8 = n8_1; /*0xffcde547*/
}
while ( n8_1 < 0x12u ); /*0xffcde54e*/
n6_1 = n6; /*0xffcde554*/
n2_1 = n2; /*0xffcde558*/
}
v8 = v13; /*0xffcde55a*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcde55e*/
}
++n6_1; /*0xffcde562*/
SocketInfo_1 += 7688; /*0xffcde564*/
v8 += 18; /*0xffcde569*/
n6 = n6_1; /*0xffcde56c*/
SocketInfo = (int)SocketInfo_1; /*0xffcde570*/
v13 = v8; /*0xffcde574*/
}
while ( n6_1 < 6u ); /*0xffcde57b*/
return MailBoxFunc4A8B(__return_address, n4, n2_1, a4, 25); /*0xffcde592*/
}
// Function: RmtFuncE59A @ 0xffcde59a (0x133 bytes)
// Index: 1806/2560
int __cdecl RmtFuncE59A(
unsigned __int8 *__return_address,
char n4,
unsigned __int8 n2,
unsigned __int8 a4,
unsigned __int8 n0x10,
char n6)
{
_BYTE *SocketInfo; // ebp
unsigned __int8 v7; // cl
unsigned __int8 n0x10a_1; // bl
int result; // eax
unsigned __int8 n8_1; // bh
int v11; // ebp
int v12; // [esp+Ch] [ebp-18h]
unsigned __int8 n8; // [esp+10h] [ebp-14h]
_BYTE *SocketInfo_1; // [esp+14h] [ebp-10h]
char i; // [esp+18h] [ebp-Ch]
char v16; // [esp+1Ch] [ebp-8h]
unsigned __int8 *v17; // [esp+20h] [ebp-4h]
unsigned __int8 n0x10a; // [esp+38h] [ebp+14h]
unsigned __int8 n6a; // [esp+3Ch] [ebp+18h]
v17 = &__return_address[n6 != 6 ? 236805 : 233241];
SocketInfo = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffcde5cf*/
SocketInfo_1 = SocketInfo; /*0xffcde5d1*/
if ( n0x10 >= 0x10u ) /*0xffcde5d8*/
v7 = n0x10 ^ 0x1F; /*0xffcde5df*/
else
v7 = n0x10 + 15; /*0xffcde5da*/
n0x10a_1 = 0; /*0xffcde5e4*/
n6a = v7 >> 3; /*0xffcde5e9*/
n0x10a = 0; /*0xffcde5f3*/
v16 = 4 * (v7 & 7); /*0xffcde5fa*/
result = 0; /*0xffcde5fe*/
v12 = 0; /*0xffcde600*/
do /*0xffcde6c0*/
{
if ( *SocketInfo ) /*0xffcde604*/
{
if ( !KtiFunc89E9((int)__return_address, n4, n0x10a, n2, a4, 0) ) /*0xffcde621*/
{
n8_1 = 0; /*0xffcde631*/
n8 = 0; /*0xffcde633*/
v11 = 0; /*0xffcde637*/
do /*0xffcde698*/
{
i = AutoGenFuncF87F((int)__return_address, n4, n0x10a, n2, n8); /*0xffcde654*/
if ( ProcCommonFunc2638(__return_address, n4, n0x10a, i, 255) == 15 ) /*0xffcde670*/
*(_DWORD *)&v17[16 * v11 + 16 * v12 + 4 * n6a] |= 15 << v16; /*0xffcde68b*/
++n8_1; /*0xffcde68e*/
++v11; /*0xffcde690*/
n8 = n8_1; /*0xffcde691*/
}
while ( n8_1 < 0x12u ); /*0xffcde698*/
n0x10a_1 = n0x10a; /*0xffcde69a*/
SocketInfo = SocketInfo_1; /*0xffcde69e*/
}
result = v12; /*0xffcde6a2*/
}
++n0x10a_1; /*0xffcde6a6*/
SocketInfo += 7688; /*0xffcde6a8*/
result += 18; /*0xffcde6ae*/
n0x10a = n0x10a_1; /*0xffcde6b1*/
SocketInfo_1 = SocketInfo; /*0xffcde6b5*/
v12 = result; /*0xffcde6b9*/
}
while ( n0x10a_1 < 6u ); /*0xffcde6c0*/
return result; /*0xffcde6c6*/
}
// Function: RmtFuncE6CD @ 0xffcde6cd (0x1d0 bytes)
// Index: 1807/2560
int __cdecl RmtFuncE6CD(unsigned __int8 *__return_address, int n4, int n2, int a4, __int16 a5)
{
int n2_1; // ebx
unsigned __int8 *__return_address_1; // esi
int n4_1; // edi
unsigned __int8 __return_address_2; // dl
int v9; // ebp
int CpuCount; // eax
int v11; // ecx
char v12; // dl
unsigned __int8 n8_1; // bl
int v15; // [esp+10h] [ebp-28h]
int v16; // [esp+14h] [ebp-24h]
int CpuCount_1; // [esp+18h] [ebp-20h]
int v18; // [esp+1Ch] [ebp-1Ch]
unsigned __int8 n8; // [esp+20h] [ebp-18h]
int v20; // [esp+24h] [ebp-14h]
int v21; // [esp+28h] [ebp-10h]
char i; // [esp+2Ch] [ebp-Ch]
int n16843009; // [esp+30h] [ebp-8h] BYREF
__int16 n257; // [esp+34h] [ebp-4h]
char v25; // [esp+36h] [ebp-2h]
n2_1 = n2; /*0xffcde6d1*/
__return_address_1 = __return_address; /*0xffcde6d7*/
n4_1 = n4; /*0xffcde6e0*/
n16843009 = 16843009; /*0xffcde6e7*/
n257 = 257; /*0xffcde6ef*/
v25 = 1; /*0xffcde6f6*/
v21 = KtiFunc8E67((int)__return_address, n4, n2, a4); /*0xffcde70b*/
MailBoxFunc4A8B(__return_address, n4, n2, a4, 11); /*0xffcde70f*/
DdrTrainFuncB30(__return_address, n4, v21, 0, (int)&n16843009, 1, 0); /*0xffcde722*/
__return_address_2 = 0; /*0xffcde727*/
v9 = 0; /*0xffcde729*/
LOBYTE(__return_address) = 0; /*0xffcde72e*/
v16 = 0; /*0xffcde732*/
v20 = 0; /*0xffcde736*/
do /*0xffcde87e*/
{
if ( ((1 << v9) & v21) != 0 ) /*0xffcde745*/
{
CpuCount = GetCpuCount((int)__return_address_1, n4_1, (unsigned __int8)__return_address); /*0xffcde751*/
v11 = 1379 * (unsigned __int8)n2_1; /*0xffcde75e*/
CpuCount_1 = CpuCount; /*0xffcde767*/
v18 = v11; /*0xffcde76b*/
v12 = a5; /*0xffcde777*/
if ( *(_WORD *)(v11 + CpuCount + 140) == 12806 && *(_BYTE *)(v11 + CpuCount + 217) == 0xA1 && (char)a5 > -2 ) /*0xffcde78a*/
{
IioFunc1BB4(__return_address_1, n4_1, __return_address, n2_1, a4, a5); /*0xffcde798*/
}
else
{
n8_1 = 0; /*0xffcde7a9*/
v15 = 0; /*0xffcde7ab*/
n8 = 0; /*0xffcde7b0*/
do /*0xffcde859*/
{
if ( __return_address_1[257312] || n8_1 != 8 && n8_1 != 17 ) /*0xffcde7c9*/
{
n4_1 = n4; /*0xffcde7d8*/
if ( *(_WORD *)(v11 + CpuCount + 140) != 12806 || *(_BYTE *)(v11 + CpuCount + 217) != 0xA1 || v12 != -2 ) /*0xffcde7eb*/
{
i = AutoGenFuncF87F((int)__return_address_1, n4, (unsigned __int8)__return_address, n2, n8); /*0xffcde802*/
if ( ProcCommonFunc2638(__return_address_1, n4, (unsigned __int8)__return_address, i, 255) ) /*0xffcde810*/
__return_address_1[v15 + 233133 + v16] |= 1 << (a5 + 2); /*0xffcde839*/
v11 = v18; /*0xffcde840*/
CpuCount = CpuCount_1; /*0xffcde844*/
}
}
v12 = a5; /*0xffcde848*/
++n8_1; /*0xffcde84c*/
++v15; /*0xffcde84e*/
n8 = n8_1; /*0xffcde852*/
}
while ( n8_1 < 0x12u ); /*0xffcde859*/
n2_1 = n2; /*0xffcde85f*/
v9 = v20; /*0xffcde863*/
}
__return_address_2 = (unsigned __int8)__return_address; /*0xffcde867*/
}
v16 += 18; /*0xffcde86b*/
++__return_address_2; /*0xffcde870*/
++v9; /*0xffcde872*/
LOBYTE(__return_address) = __return_address_2; /*0xffcde873*/
v20 = v9; /*0xffcde877*/
}
while ( __return_address_2 < 6u ); /*0xffcde87e*/
return MailBoxFunc4A8B(__return_address_1, n4_1, n2_1, a4, 25); /*0xffcde895*/
}
// Function: RmtFuncE89D @ 0xffcde89d (0x14c bytes)
// Index: 1808/2560
int __cdecl RmtFuncE89D(
unsigned __int8 *__return_address,
int n4,
unsigned __int8 n2,
char a4,
unsigned int n0x80,
char n4a)
{
int v6; // eax
unsigned __int8 n6_1; // bl
int v8; // edx
int v9; // ecx
int result; // eax
unsigned __int8 n0x12; // bh
int v12; // [esp+Ch] [ebp-28h] BYREF
__int16 v13; // [esp+10h] [ebp-24h]
char v14; // [esp+12h] [ebp-22h]
unsigned __int8 *v15; // [esp+14h] [ebp-20h]
unsigned int v16; // [esp+18h] [ebp-1Ch]
char i[4]; // [esp+1Ch] [ebp-18h]
int v18; // [esp+20h] [ebp-14h]
unsigned __int8 n8[4]; // [esp+24h] [ebp-10h]
int v20; // [esp+28h] [ebp-Ch]
unsigned __int8 n6[4]; // [esp+2Ch] [ebp-8h]
int v22; // [esp+30h] [ebp-4h]
char n0x80a; // [esp+4Ch] [ebp+18h]
int n4b; // [esp+50h] [ebp+1Ch]
v12 = 0; /*0xffcde8b4*/
v13 = 0; /*0xffcde8b9*/
v14 = 0; /*0xffcde8bd*/
v6 = KtiFunc8E67((int)__return_address, n4, n2, a4); /*0xffcde8c0*/
v22 = v6; /*0xffcde8cd*/
v15 = &__return_address[n4a != 1 ? 234969 : 231405];
v16 = n0x80 >> 5; /*0xffcde8ee*/
if ( n4a == 1 ) /*0xffcde8f4*/
{
DdrTrainFuncB30(__return_address, n4, v6, 0, (int)&v12, 1, 0); /*0xffcde903*/
KtiFunc8C4((int)__return_address, 1u); /*0xffcde90b*/
}
MailBoxFunc4A8B(__return_address, n4, n2, a4, 11); /*0xffcde91d*/
KtiFunc8C4((int)__return_address, 1u); /*0xffcde925*/
MailBoxFunc4A8B(__return_address, n4, n2, a4, 25); /*0xffcde934*/
if ( n4a == 1 ) /*0xffcde93f*/
MailBoxFuncDADC((int)__return_address, n4, v22); /*0xffcde946*/
n0x80a = n0x80 & 0x1F; /*0xffcde94e*/
n6_1 = 0; /*0xffcde952*/
v8 = v22; /*0xffcde954*/
v9 = 0; /*0xffcde957*/
v20 = 0; /*0xffcde959*/
n6[0] = 0; /*0xffcde95c*/
v18 = 0; /*0xffcde95f*/
do /*0xffcde9e0*/
{
result = 1 << v9; /*0xffcde965*/
if ( ((1 << v9) & v8) != 0 ) /*0xffcde969*/
{
n0x12 = 0; /*0xffcde96b*/
n4b = 0; /*0xffcde96d*/
n8[0] = 0; /*0xffcde971*/
do /*0xffcde9c8*/
{
i[0] = AutoGenFuncF87F((int)__return_address, n4, n6[0], n2, n8[0]); /*0xffcde989*/
result = ProcCommonFunc2638(__return_address, n4, n6[0], i[0], 255); /*0xffcde994*/
if ( result ) /*0xffcde99e*/
{
result = 3 << n0x80a; /*0xffcde9b5*/
*(_DWORD *)&v15[16 * n4b + 16 * v20 + 4 * (unsigned __int8)v16] |= 3 << n0x80a; /*0xffcde9ba*/
}
++n0x12; /*0xffcde9bd*/
++n4b; /*0xffcde9bf*/
n8[0] = n0x12; /*0xffcde9c2*/
}
while ( n0x12 < 0x12u ); /*0xffcde9c8*/
v9 = v18; /*0xffcde9ca*/
v8 = v22; /*0xffcde9cd*/
}
v20 += 18; /*0xffcde9d0*/
++n6_1; /*0xffcde9d4*/
++v9; /*0xffcde9d6*/
n6[0] = n6_1; /*0xffcde9d7*/
v18 = v9; /*0xffcde9da*/
}
while ( n6_1 < 6u ); /*0xffcde9e0*/
return result; /*0xffcde9e2*/
}
// Function: RmtFuncE9E9 @ 0xffcde9e9 (0x8c bytes)
// Index: 1809/2560
unsigned __int8 __cdecl RmtFuncE9E9(_BYTE *__return_address, int n2, int n6, int n2a)
{
KtiFunc8C4((int)__return_address, 1u); /*0xffcde9f1*/
KtiFuncFC62((int)__return_address, n2, n6, n2a, 0, 3u, 7u, 0x40u); /*0xffcdea0b*/
KtiFuncFC62((int)__return_address, n2, n6, n2a, 0, 3u, 0, 0x80u); /*0xffcdea28*/
KtiFuncFC62((int)__return_address, n2, n6, n2a, 0, 0, 0, 0x80u); /*0xffcdea47*/
KtiFuncFC62((int)__return_address, n2, n6, n2a, 0, 0, 7u, 0x40u); /*0xffcdea61*/
return KtiFunc8C4((int)__return_address, 1u); /*0xffcdea73*/
}
// Function: RmtFuncEA75 @ 0xffcdea75 (0x15f bytes)
// Index: 1810/2560
char __cdecl RmtFuncEA75(unsigned __int8 *__return_address, int n4, int a3, int n2, int a5, unsigned __int8 n6)
{
unsigned __int8 n6_2; // bl
int n4_1; // edi
int SocketInfo; // eax
int v9; // edx
_BYTE *SocketInfo_1; // esi
int v11; // ecx
int v12; // eax
int n6_1; // [esp+10h] [ebp-18h]
int v15; // [esp+14h] [ebp-14h]
int v16; // [esp+18h] [ebp-10h]
_BYTE *SocketInfo_2; // [esp+1Ch] [ebp-Ch]
_DWORD v18[2]; // [esp+20h] [ebp-8h] BYREF
n6_2 = 0; /*0xffcdea7e*/
n4_1 = n4; /*0xffcdea82*/
v18[0] = 16711680; /*0xffcdea88*/
v18[1] = -65281; /*0xffcdea90*/
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffcdea98*/
v9 = a3; /*0xffcdea9d*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcdeaa1*/
v11 = 0; /*0xffcdeaa5*/
SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffcdeaa7*/
v16 = 0; /*0xffcdeaab*/
LOBYTE(n6_1) = 0; /*0xffcdeaaf*/
v15 = 0; /*0xffcdeab3*/
do /*0xffcdebc6*/
{
v12 = 1 << v11; /*0xffcdeaba*/
if ( ((1 << v11) & v9) != 0 && *SocketInfo_1 ) /*0xffcdeac4*/
{
LOBYTE(v12) = KtiFunc89E9((int)__return_address, n4_1, n6_1, n2, a5, 0); /*0xffcdeadd*/
if ( !(_BYTE)v12 ) /*0xffcdeae7*/
{
KtiFuncFC62(__return_address, n4_1, n6_1, n2, 0, a5, 0, 8u); /*0xffcdeb01*/
KtiFuncFC62(__return_address, n4_1, n6_1, n2, 0, ~(1 << a5) & 0xF, 0, 7u); /*0xffcdeb24*/
KtiFuncFC62(__return_address, n4_1, n6_1, n2, 0, n6, 0, 0xCu); /*0xffcdeb40*/
__return_address[50813 * (unsigned __int8)n4 /*0xffcdeb71*/
+ 12646
+ 2688 * (unsigned __int8)n2
+ 244 * (unsigned __int8)a5
+ v16] = n6;
LOBYTE(v12) = IioFunc236E((int)__return_address, n4, n6_1, n2, a5, (unsigned __int8 *)v18); /*0xffcdeb8e*/
n4_1 = n4; /*0xffcdeb93*/
SocketInfo_1 = SocketInfo_2; /*0xffcdeb9a*/
}
v9 = a3; /*0xffcdeb9e*/
v11 = v15; /*0xffcdeba2*/
}
v16 += 8077; /*0xffcdeba6*/
++n6_2; /*0xffcdebae*/
++v11; /*0xffcdebb0*/
LOBYTE(n6_1) = n6_2; /*0xffcdebb1*/
SocketInfo_1 += 7688; /*0xffcdebb5*/
v15 = v11; /*0xffcdebbb*/
SocketInfo_2 = SocketInfo_1; /*0xffcdebbf*/
}
while ( n6_2 < 6u ); /*0xffcdebc6*/
return v12; /*0xffcdebcc*/
}
// Function: RmtFuncEBD4 @ 0xffcdebd4 (0x162 bytes)
// Index: 1811/2560
char __cdecl RmtFuncEBD4(unsigned __int8 *__return_address, int n4, int a3, int n2, int a5)
{
_BYTE *SocketInfo; // ebp
unsigned __int8 n6_1; // dl
int v7; // ecx
int v8; // eax
int n6; // [esp+10h] [ebp-18h]
int v11; // [esp+14h] [ebp-14h]
_BYTE *SocketInfo_1; // [esp+18h] [ebp-10h]
SocketInfo = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffcdebee*/
SocketInfo_1 = SocketInfo; /*0xffcdebf9*/
MailBoxFunc4A8B(__return_address, n4, n2, a5, 255); /*0xffcdec00*/
n6_1 = 0; /*0xffcdec05*/
v7 = 0; /*0xffcdec0a*/
LOBYTE(n6) = 0; /*0xffcdec0c*/
v11 = 0; /*0xffcdec10*/
do /*0xffcded28*/
{
v8 = 1 << v7; /*0xffcdec1b*/
if ( ((1 << v7) & a3) != 0 && *SocketInfo ) /*0xffcdec27*/
{
GetCpuCount((int)__return_address, n4, n6); /*0xffcdec38*/
KtiFunc91DE((int)__return_address, n4, n6, n2); /*0xffcdec45*/
LOBYTE(v8) = KtiFunc89E9((int)__return_address, n4, n6, n2, a5, 0); /*0xffcdec58*/
if ( !(_BYTE)v8 ) /*0xffcdec62*/
KtiFuncF96E(__return_address, n4, n6, n2, a5, 0); /*0xffcdec72*/
v7 = v11; /*0xffcded04*/
SocketInfo = SocketInfo_1; /*0xffcded08*/
n6_1 = n6; /*0xffcded0c*/
}
++n6_1; /*0xffcded10*/
SocketInfo += 7688; /*0xffcded12*/
++v7; /*0xffcded18*/
LOBYTE(n6) = n6_1; /*0xffcded19*/
v11 = v7; /*0xffcded1d*/
SocketInfo_1 = SocketInfo; /*0xffcded21*/
}
while ( n6_1 < 6u ); /*0xffcded28*/
return v8; /*0xffcded2e*/
}
// Function: RmtFuncED36 @ 0xffcded36 (0x1a0 bytes)
// Index: 1812/2560
char __cdecl RmtFuncED36(unsigned __int8 *__return_address, int n4, int a3, int n2, unsigned __int8 a5)
{
int SocketInfo; // eax
int v6; // ebp
unsigned __int8 n6_1; // dl
_BYTE *SocketInfo_1; // esi
int v9; // ecx
int v10; // eax
unsigned __int8 *v11; // esi
unsigned __int8 n4_1; // al
char n4_2; // al
unsigned __int8 *v14; // esi
unsigned __int8 n4_4; // [esp+13h] [ebp-1Dh]
char n4_3; // [esp+13h] [ebp-1Dh]
int n6; // [esp+14h] [ebp-1Ch]
int v19; // [esp+18h] [ebp-18h]
int v20; // [esp+1Ch] [ebp-14h]
int v21; // [esp+28h] [ebp-8h] BYREF
int v22; // [esp+2Ch] [ebp-4h] BYREF
v21 = -16711936; /*0xffcded47*/
v22 = -16711936; /*0xffcded4f*/
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffcded57*/
v6 = a3; /*0xffcded5c*/
n6_1 = 0; /*0xffcded60*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcded64*/
LOBYTE(n6) = 0; /*0xffcded66*/
v9 = 0; /*0xffcded6a*/
v19 = 0; /*0xffcded70*/
do /*0xffcdeec8*/
{
v10 = 1 << v9; /*0xffcded77*/
if ( ((1 << v9) & v6) != 0 && *SocketInfo_1 ) /*0xffcded81*/
{
v20 = KtiFunc91DE((int)__return_address, n4, n6, n2); /*0xffcdeda0*/
LOBYTE(v10) = KtiFunc89E9((int)__return_address, n4, n6, n2, a5, 0); /*0xffcdedab*/
if ( !(_BYTE)v10 ) /*0xffcdedb5*/
{
KtiFuncFC62(__return_address, n4, n6, n2, 0, ~(1 << a5) & 0xF, 0, 7u); /*0xffcdedd6*/
KtiFuncFC62(__return_address, n4, n6, n2, 0, 6u, 0, 0xCu); /*0xffcdedea*/
v11 = (unsigned __int8 *)&v21; /*0xffcdedfc*/
*(_BYTE *)(244 * a5 + v20 + 60) = 6; /*0xffcdee04*/
n4_1 = 0; /*0xffcdee09*/
n4_4 = 0; /*0xffcdee0b*/
do /*0xffcdee3a*/
{
KtiFuncFC62(__return_address, n4, n6, n2, 0, *v11, 5, 16 * n4_1); /*0xffcdee25*/
n4_1 = n4_4 + 1; /*0xffcdee31*/
++v11; /*0xffcdee33*/
n4_4 = n4_1; /*0xffcdee34*/
}
while ( n4_1 < 4u ); /*0xffcdee3a*/
n4_2 = 4; /*0xffcdee3c*/
v14 = (unsigned __int8 *)&v22; /*0xffcdee3e*/
n4_3 = 4; /*0xffcdee42*/
do /*0xffcdee73*/
{
KtiFuncFC62(__return_address, n4, n6, n2, 0, *v14, 6, 16 * (n4_2 - 4)); /*0xffcdee5e*/
n4_2 = n4_3 + 1; /*0xffcdee6a*/
++v14; /*0xffcdee6c*/
n4_3 = n4_2; /*0xffcdee6d*/
}
while ( (unsigned __int8)n4_2 < 8u ); /*0xffcdee73*/
KtiFuncF9A6(__return_address, n4, n6, n2, a5, 4u); /*0xffcdee86*/
}
v6 = a3; /*0xffcdeea4*/
v9 = v19; /*0xffcdeea8*/
n6_1 = n6; /*0xffcdeeac*/
}
++n6_1; /*0xffcdeeb0*/
SocketInfo_1 += 7688; /*0xffcdeeb2*/
++v9; /*0xffcdeeb8*/
LOBYTE(n6) = n6_1; /*0xffcdeeb9*/
v19 = v9; /*0xffcdeebd*/
}
while ( n6_1 < 6u ); /*0xffcdeec8*/
return v10; /*0xffcdeece*/
}
// Function: RmtFuncEED6 @ 0xffcdeed6 (0x183 bytes)
// Index: 1813/2560
char __cdecl RmtFuncEED6(unsigned __int8 *n6, int n4, int a3, int n2, unsigned __int8 a5)
{
unsigned __int8 n6_2; // bl
int SocketInfo; // eax
int v7; // edx
_BYTE *SocketInfo_1; // esi
int v9; // ecx
int v10; // eax
unsigned __int8 n4_1; // bh
unsigned __int8 *v12; // esi
char n4_2; // bh
unsigned __int8 *v14; // esi
int n6_1; // [esp+10h] [ebp-18h]
int v17; // [esp+14h] [ebp-14h]
_BYTE *SocketInfo_2; // [esp+18h] [ebp-10h]
int v19; // [esp+1Ch] [ebp-Ch]
int v20; // [esp+20h] [ebp-8h] BYREF
int v21; // [esp+24h] [ebp-4h] BYREF
n6_2 = 0; /*0xffcdeedf*/
v20 = -16711936; /*0xffcdeee9*/
v21 = -16711936; /*0xffcdeef1*/
SocketInfo = GetSocketInfo((int)n6, n4); /*0xffcdeef9*/
v7 = a3; /*0xffcdeefe*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffcdef02*/
v9 = 0; /*0xffcdef06*/
SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffcdef08*/
LOBYTE(n6_1) = 0; /*0xffcdef0c*/
v17 = 0; /*0xffcdef10*/
do /*0xffcdf04b*/
{
v10 = 1 << v9; /*0xffcdef17*/
if ( ((1 << v9) & v7) != 0 && *SocketInfo_1 ) /*0xffcdef21*/
{
v19 = KtiFunc91DE((int)n6, n4, n6_1, n2); /*0xffcdef3f*/
LOBYTE(v10) = KtiFunc89E9((int)n6, n4, n6_1, n2, a5, 0); /*0xffcdef4d*/
if ( !(_BYTE)v10 ) /*0xffcdef57*/
{
KtiFuncFC62(n6, n4, n6_1, n2, 0, ~(1 << a5) & 0xF, 0, 7u); /*0xffcdef7b*/
KtiFuncFC62(n6, n4, n6_1, n2, 0, 1u, 6, 0x40u); /*0xffcdef92*/
KtiFuncFC62(n6, n4, n6_1, n2, 0, 7u, 0, 0xCu); /*0xffcdefac*/
n4_1 = 0; /*0xffcdefbe*/
v12 = (unsigned __int8 *)&v20; /*0xffcdefc0*/
*(_BYTE *)(244 * a5 + v19 + 60) = 7; /*0xffcdefc4*/
do /*0xffcdeff2*/
KtiFuncFC62(n6, n4, n6_1, n2, 0, *v12++, 5, 16 * n4_1++); /*0xffcdefe4*/
while ( n4_1 < 4u ); /*0xffcdeff2*/
n4_2 = 4; /*0xffcdeff4*/
v14 = (unsigned __int8 *)&v21; /*0xffcdeff6*/
do /*0xffcdf025*/
{
LOBYTE(v10) = KtiFuncFC62(n6, n4, n6_1, n2, 0, *v14, 6, 16 * (n4_2 - 4)); /*0xffcdf017*/
++n4_2; /*0xffcdf01f*/
++v14; /*0xffcdf021*/
}
while ( (unsigned __int8)n4_2 < 8u ); /*0xffcdf025*/
SocketInfo_1 = SocketInfo_2; /*0xffcdf027*/
}
v7 = a3; /*0xffcdf02b*/
v9 = v17; /*0xffcdf02f*/
}
++n6_2; /*0xffcdf033*/
SocketInfo_1 += 7688; /*0xffcdf035*/
++v9; /*0xffcdf03b*/
LOBYTE(n6_1) = n6_2; /*0xffcdf03c*/
v17 = v9; /*0xffcdf040*/
SocketInfo_2 = SocketInfo_1; /*0xffcdf044*/
}
while ( n6_2 < 6u ); /*0xffcdf04b*/
return v10; /*0xffcdf051*/
}
// Function: RmtFuncF059 @ 0xffcdf059 (0x952 bytes)
// Index: 1814/2560
int __cdecl RmtFuncF059(unsigned __int8 *__return_address, int n4)
{
int n4_1; // ebx
int n217; // esi
int v5; // eax
int n2_1; // edi
int v7; // esi
unsigned __int8 n6_1; // dl
int v9; // ecx
unsigned __int8 *v10; // esi
char v11; // cl
char n2_2; // al
char n2_4; // cl
int v14; // esi
unsigned __int8 n6_2; // dl
unsigned __int8 v16; // al
unsigned __int8 *v17; // ecx
unsigned __int8 n8_3; // al
unsigned __int8 n6_3; // dl
char v20; // si
int v21; // esi
unsigned __int8 n6_4; // dl
unsigned __int8 *v23; // ecx
int v24; // esi
int v25; // ecx
int v26; // edx
int n6_5; // esi
unsigned __int8 n8_2; // al
unsigned int v29; // ecx
unsigned __int8 v30; // al
unsigned int v31; // eax
char n6_6; // dl
unsigned int v33; // esi
char v34; // dl
unsigned __int8 i_1; // bl
unsigned __int8 i; // bh
char v37; // cl
unsigned __int8 v38; // dl
int v39; // eax
unsigned __int8 n2_5; // al
int v41; // edi
bool v42; // cf
in... [16739 chars total]
// Function: RmtFuncF9AB @ 0xffcdf9ab (0x65f bytes)
// Index: 1815/2560
int __cdecl RmtFuncF9AB(unsigned __int8 *__return_address, int n4)
{
int v2; // esi
int n4_1; // eax
int v4; // ecx
int v5; // ebp
int n2_1; // edi
unsigned __int8 n6; // dl
char v8; // si
int v9; // esi
unsigned __int8 n6_2; // dl
int v11; // ecx
int v12; // esi
char n0x10_1; // al
unsigned __int8 n6_3; // dl
char v15; // si
int v16; // ecx
unsigned __int8 n6_4; // dl
int v18; // ecx
unsigned __int8 *v19; // esi
int v20; // eax
int v21; // ecx
unsigned __int8 n6_5; // dl
int v23; // esi
unsigned __int8 n8_1; // al
int v25; // ecx
unsigned __int8 v26; // al
bool v27; // cf
int n6_1; // [esp+13h] [ebp-3B1h]
unsigned __int8 n6_6; // [esp+13h] [ebp-3B1h]
char v31; // [esp+17h] [ebp-3ADh]
char n0x10_2; // [esp+17h] [ebp-3ADh]
unsigned __int8 *v33; // [esp+18h] [ebp-3ACh]
_BYTE *v34; // [esp+1Ch] [ebp-3A8h]
int v35; // [esp+1Ch] [ebp-3A8h]
int v36; // [esp+1Ch] [ebp-3A8h]
int n8; // [esp+20h] [ebp-3A4h]
int v38; // [esp... [13522 chars total]
// Function: IioDmiInitMain @ 0xffce000a (0xcfc bytes)
// Index: 1816/2560
int __cdecl IioDmiInitMain(unsigned __int8 *__return_address, int n4)
{
int n4_1; // ebx
unsigned __int8 *__return_address_1; // ebp
unsigned __int8 *v4; // edi
int v5; // eax
int n2_1; // esi
unsigned __int8 n6_1; // dl
int v8; // ecx
_BYTE *v9; // edi
int CpuCount; // ecx
int v11; // eax
char v12; // cl
unsigned __int8 n6_2; // dl
char v14; // cl
int v15; // esi
char n2_2; // cl
unsigned __int8 n6_3; // dl
char v18; // di
int v19; // ecx
int v20; // ecx
int v21; // eax
char n8_1; // al
unsigned __int8 n6_4; // dl
char v24; // di
unsigned __int8 n6_6; // dl
int v26; // ecx
int v27; // edi
int n6_5; // edi
unsigned __int8 n8_2; // al
unsigned int v30; // edx
unsigned __int8 v31; // al
unsigned __int8 v32; // al
char v33; // al
char n2_4; // al
char v35; // cl
unsigned int v36; // esi
char v37; // dl
char v38; // al
int v39; // ecx
char v40; // dl
unsigned __int8 n6_7; // dl
int v42; // ecx
int v43; // e... [23537 chars total]
// Function: IioFuncD06 @ 0xffce0d06 (0x8e2 bytes)
// Index: 1817/2560
int __cdecl IioFuncD06(unsigned __int8 *__return_address, int n4)
{
int n4_1; // ebx
unsigned __int8 *__return_address_1; // ebp
int SocketInfo; // edi
unsigned __int8 n2_2; // al
int v6; // ecx
int n2_1; // esi
unsigned __int8 n6_1; // dl
int v9; // ecx
_BYTE *v10; // edi
char v11; // dl
int v12; // edi
unsigned __int8 n6_2; // dl
int v14; // ecx
int CpuCount; // ebx
int v16; // edi
bool v17; // zf
unsigned __int8 n0x80_1; // dh
unsigned __int8 n6_3; // dl
int v20; // ecx
unsigned __int8 v21; // bl
unsigned __int8 n6_4; // dl
int v23; // ecx
unsigned __int8 v24; // al
int v25; // edx
unsigned __int8 *v26; // edi
int v27; // ecx
int v28; // edi
int v29; // ecx
int v30; // edx
unsigned __int8 n8_1; // al
int v32; // ecx
unsigned __int8 v33; // al
unsigned __int8 n9; // dl
int v35; // eax
_BYTE *v36; // ecx
int n6_5; // edi
unsigned __int8 v38; // al
char v39; // al
unsigned __int8 v40; // al
unsigned __int8 ... [16886 chars total]
// Function: IioFunc15E8 @ 0xffce15e8 (0x5cc bytes)
// Index: 1818/2560
int __cdecl IioFunc15E8(unsigned __int8 *n6, int n4)
{
int v2; // esi
int n4_1; // eax
int v4; // ecx
int v5; // ebp
int n2_1; // edi
unsigned __int8 n6_1; // dl
int v8; // ecx
int n2_2; // edi
char v10; // cl
char n0x10_1; // al
unsigned __int8 n6_3; // dl
int v13; // ecx
unsigned __int8 n6_4; // dl
int v15; // ecx
unsigned __int8 *v16; // esi
int CpuCount; // eax
char v18; // cl
unsigned __int8 n6_5; // dl
int v20; // esi
unsigned __int8 n8_1; // al
int v22; // ecx
unsigned __int8 v23; // al
int v24; // eax
bool v25; // cf
int n6_2; // [esp+10h] [ebp-3B4h]
unsigned __int8 n6_6; // [esp+10h] [ebp-3B4h]
_BYTE *v29; // [esp+14h] [ebp-3B0h]
int v30; // [esp+14h] [ebp-3B0h]
int v31; // [esp+14h] [ebp-3B0h]
char n0x10_2; // [esp+1Bh] [ebp-3A9h]
int v33; // [esp+1Ch] [ebp-3A8h]
int v34; // [esp+1Ch] [ebp-3A8h]
int v35; // [esp+1Ch] [ebp-3A8h]
int n8; // [esp+20h] [ebp-3A4h]
int v37; // [esp+24h] [ebp-3A0h]
int v38; // [... [11476 chars total]
// Function: IioFunc1BB4 @ 0xffce1bb4 (0x358 bytes)
// Index: 1819/2560
void __cdecl IioFunc1BB4(unsigned __int8 *__return_address, int n4, unsigned __int8 *n6, int n2, int a5, char a6)
{
unsigned __int8 n3; // al
_BYTE *v7; // ecx
unsigned __int8 n9; // ah
int v9; // edx
int v10; // ecx
char *v11; // esi
char v12; // al
unsigned __int8 *v13; // eax
int n9_1; // ecx
int v15; // edi
int n9_2; // ecx
unsigned __int8 *v17; // ecx
int n9_4; // edx
int v19; // edi
int n9_5; // ebp
unsigned __int8 n3_1; // [esp+13h] [ebp-8Dh]
_BYTE *v22; // [esp+14h] [ebp-8Ch]
int n8; // [esp+14h] [ebp-8Ch]
int n9_3; // [esp+14h] [ebp-8Ch]
unsigned __int8 v25; // [esp+18h] [ebp-88h]
char n5; // [esp+20h] [ebp-80h]
int v27; // [esp+24h] [ebp-7Ch]
int v28; // [esp+28h] [ebp-78h]
unsigned __int8 v29[12]; // [esp+2Ch] [ebp-74h] BYREF
_BYTE v30[32]; // [esp+38h] [ebp-68h] BYREF
_BYTE v31[72]; // [esp+58h] [ebp-48h] BYREF
v27 = KtiFunc91DE((int)__return_address, n4, (unsigned __int8)n6, n2); /*0xffce1bf3*/
v28 = 244 * (unsigned __int8)a5; /*0xffce1bf9*/
v25 = *(_BYTE *)(v28 + v27 + 60); /*0xffce1c01*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0, 0, 0xCu); /*0xffce1c0e*/
*(_BYTE *)(v28 + v27 + 60) = 0; /*0xffce1c1e*/
n3 = 0; /*0xffce1c23*/
v7 = v31; /*0xffce1c25*/
n3_1 = 0; /*0xffce1c29*/
v22 = v31; /*0xffce1c2d*/
do /*0xffce1c78*/
{
if ( n3 <= 3u ) /*0xffce1c33*/
{
n5 = 5; /*0xffce1c3e*/
}
else
{
n5 = 6; /*0xffce1c35*/
n3 -= 4; /*0xffce1c3a*/
}
IioFunc201B(__return_address, n4, n6, n2, 0, v7, n5, 16 * n3); /*0xffce1c59*/
n3 = n3_1 + 1; /*0xffce1c69*/
v7 = v22 + 9; /*0xffce1c6b*/
n3_1 = n3; /*0xffce1c6e*/
v22 += 9; /*0xffce1c72*/
}
while ( n3 < 8u ); /*0xffce1c78*/
n9 = 0; /*0xffce1c7a*/
v9 = 0; /*0xffce1c7c*/
do /*0xffce1cbb*/
{
v30[v9 + 12] = 0; /*0xffce1c82*/
v10 = 0; /*0xffce1c87*/
n8 = 8; /*0xffce1c89*/
v11 = &v31[v9]; /*0xffce1c91*/
do /*0xffce1cb3*/
{
if ( n9 >= 9u ) /*0xffce1c96*/
v12 = (unsigned __int8)*(v11 - 9) >> 4; /*0xffce1c9f*/
else
v12 = *v11; /*0xffce1c98*/
v11 += 9; /*0xffce1ca4*/
v30[v9 + 12] |= (v12 & 1) << v10++; /*0xffce1ca9*/
--n8; /*0xffce1cae*/
}
while ( n8 ); /*0xffce1cb3*/
++n9; /*0xffce1cb5*/
++v9; /*0xffce1cb7*/
}
while ( n9 < 0x12u ); /*0xffce1cbb*/
nullsub_5(); /*0xffce1cca*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xACu, 7, 0x50u); /*0xffce1cde*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0x68u, 7, 0x60u); /*0xffce1cef*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCDu, 7, 0x40u); /*0xffce1d06*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCCu, 7, 0x40u); /*0xffce1d1a*/
nullsub_5(); /*0xffce1d28*/
IioFunc201B(__return_address, n4, n6, n2, 0, v29, 6, 0x40u); /*0xffce1d3c*/
v13 = v29; /*0xffce1d44*/
n9_1 = 9; /*0xffce1d4a*/
do /*0xffce1d52*/
{
*v13++ &= 0x1Fu; /*0xffce1d4b*/
--n9_1; /*0xffce1d4f*/
}
while ( n9_1 ); /*0xffce1d52*/
KtiFuncFD65(__return_address, n4, (int)n6, n2, a5, v29, 6u, 0x40u, 0xFFu); /*0xffce1d6d*/
IioFunc201B(__return_address, n4, n6, n2, 0, v30, 6, 0x50u); /*0xffce1d81*/
v15 = 0; /*0xffce1d89*/
n9_2 = 9; /*0xffce1d8d*/
n9_3 = 9; /*0xffce1d8e*/
do /*0xffce1dcd*/
{
if ( v30[v15] == v30[v15 + 12] ) /*0xffce1d9a*/
{
__return_address[18 * (unsigned __int8)n6 + 233133 + v15] |= 1 << (a6 + 2); /*0xffce1dba*/
n9_2 = n9_3; /*0xffce1dc1*/
}
++v15; /*0xffce1dc5*/
n9_3 = --n9_2; /*0xffce1dc9*/
}
while ( n9_2 ); /*0xffce1dcd*/
v17 = v29; /*0xffce1dd6*/
n9_4 = 9; /*0xffce1ddc*/
do /*0xffce1de9*/
{
*v17 = *v17 & 0x1F | 0x80; /*0xffce1de3*/
++v17; /*0xffce1de5*/
--n9_4; /*0xffce1de6*/
}
while ( n9_4 ); /*0xffce1de9*/
KtiFuncFD65(__return_address, n4, (int)n6, n2, a5, v29, 6u, 0x40u, 0xFFu); /*0xffce1e04*/
IioFunc201B(__return_address, n4, n6, n2, 0, v30, 6, 0x50u); /*0xffce1e18*/
v19 = 0; /*0xffce1e20*/
n9_5 = 9; /*0xffce1e24*/
do /*0xffce1e58*/
{
if ( v30[v19] == v30[v19 + 21] ) /*0xffce1e2d*/
__return_address[18 * (unsigned __int8)n6 + 233142 + v19] |= 1 << (a6 + 2); /*0xffce1e4d*/
++v19; /*0xffce1e54*/
--n9_5; /*0xffce1e55*/
}
while ( n9_5 ); /*0xffce1e58*/
nullsub_5(); /*0xffce1e6e*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xACu, 7, 0x50u); /*0xffce1e82*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 8u, 7, 0x60u); /*0xffce1e93*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCDu, 7, 0x40u); /*0xffce1eaa*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCCu, 7, 0x40u); /*0xffce1ebe*/
nullsub_5(); /*0xffce1ecc*/
if ( v25 ) /*0xffce1ed9*/
{
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, v25, 0, 0xCu); /*0xffce1ee9*/
*(_BYTE *)(v28 + v27 + 60) = v25; /*0xffce1efd*/
}
}
// Function: IioFunc1F0C @ 0xffce1f0c (0x10f bytes)
// Index: 1820/2560
int __cdecl IioFunc1F0C(_BYTE *__return_address, unsigned __int8 n4, unsigned __int8 n6, unsigned __int8 n2, char a5)
{
_BYTE *v6; // edi
int CpuCount; // eax
unsigned __int8 n18; // cl
_BYTE *v9; // ebx
int v10; // edi
_BYTE *n18_2; // ebp
int result; // eax
_BYTE *v13; // [esp+14h] [ebp-4h]
_BYTE *n18_1; // [esp+1Ch] [ebp+4h]
int n5; // [esp+2Ch] [ebp+14h]
v6 = __return_address + 233133; /*0xffce1f1a*/
if ( a5 == 1 ) /*0xffce1f23*/
v6 = __return_address + 236697; /*0xffce1f25*/
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffce1f34*/
if ( a5 || *(_BYTE *)(1379 * n2 + CpuCount + 104) ) /*0xffce1f4b*/
{
RmtFunc6CFE(__return_address, 0x55u, 0, 0, 1); /*0xffce1f77*/
LogDebugString( /*0xffce1f82*/
__return_address,
(int)" 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17\n");
n18 = 18; /*0xffce1f87*/
}
else
{
RmtFunc6CFE(__return_address, 0x27u, 0, 0, 1); /*0xffce1f5a*/
LogDebugString(__return_address, (int)" 0 1 2 3 4 5 6 7 8\n"); /*0xffce1f65*/
n18 = 9; /*0xffce1f6a*/
}
n18_1 = (_BYTE *)n18; /*0xffce1f9b*/
v9 = &v6[18 * n6]; /*0xffce1f9f*/
v10 = -2; /*0xffce1fa1*/
v13 = v9; /*0xffce1fa5*/
n5 = 5; /*0xffce1fa9*/
do /*0xffce2012*/
{
LogDebugString(__return_address, (int)"%2d ", v10); /*0xffce1fb4*/
n18_2 = n18_1; /*0xffce1fb9*/
do /*0xffce1ff9*/
{
LogDebugString(__return_address, (int)" "); /*0xffce1fd2*/
if ( ((unsigned __int8)(1 << (v10 + 2)) & *v9) != 0 ) /*0xffce1fdf*/
LogDebugString(__return_address, (int)"1"); /*0xffce1fe6*/
else
LogDebugString(__return_address, (int)"0"); /*0xffce1fee*/
++v9; /*0xffce1ff4*/
--n18_2; /*0xffce1ff6*/
}
while ( n18_2 ); /*0xffce1ff9*/
result = LogDebugString(__return_address, (int)"\n"); /*0xffce2001*/
v9 = v13; /*0xffce2006*/
++v10; /*0xffce200a*/
--n5; /*0xffce200b*/
}
while ( n5 ); /*0xffce2012*/
return result; /*0xffce2014*/
}
// Function: IioFunc201B @ 0xffce201b (0x259 bytes)
// Index: 1821/2560
void __cdecl IioFunc201B(
unsigned __int8 *__return_address,
int n4,
unsigned __int8 *n6,
int n2,
int a5,
_BYTE *a6,
unsigned __int8 n5,
unsigned __int8 n64)
{
int n2_1; // ebp
char n255_1; // cl
unsigned __int8 v10; // al
_BYTE *v11; // ebp
char i; // [esp+10h] [ebp-8h]
char n255; // [esp+14h] [ebp-4h]
n2_1 = n2; /*0xffce2025*/
*(_DWORD *)a6 = 0; /*0xffce2036*/
*((_DWORD *)a6 + 1) = 0; /*0xffce2037*/
a6[8] = 0; /*0xffce2038*/
nullsub_5(); /*0xffce2040*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCCu, 7, 0x40u); /*0xffce2054*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0x37u, 7, 0x50u); /*0xffce2065*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 2u, 7, 0x60u); /*0xffce2079*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCDu, 7, 0x40u); /*0xffce208d*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCCu, 7, 0x40u); /*0xffce20a4*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xB7u, 7, 0x50u); /*0xffce20b8*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 2u, 7, 0x60u); /*0xffce20cc*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCDu, 7, 0x40u); /*0xffce20e0*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCCu, 7, 0x40u); /*0xffce20f7*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, n64, 7, 0x50u); /*0xffce210a*/
nullsub_5(); /*0xffce2118*/
n255_1 = 0; /*0xffce2120*/
n255 = 0; /*0xffce2122*/
do /*0xffce219e*/
{
if ( n5 <= 7u ) /*0xffce2130*/
v10 = (2 * (n255_1 | (16 * n5))) | 1; /*0xffce2141*/
else
v10 = (2 * n255_1) | 0x11; /*0xffce2136*/
KtiFuncFC62(__return_address, n4, (int)n6, n2_1, 0, v10, 6, 0x60u); /*0xffce214d*/
KtiFunc8C4((int)__return_address, 0xAu); /*0xffce2158*/
v11 = a6; /*0xffce215d*/
for ( i = 0; (unsigned __int8)i < 9u; ++i ) /*0xffce2163*/
*v11++ |= ProcCommonFunc2638(__return_address, n4, (unsigned __int8)n6, i, n255); /*0xffce2178*/
n2_1 = n2; /*0xffce2191*/
n255_1 = n255 + 1; /*0xffce2195*/
n255 = n255_1; /*0xffce2197*/
}
while ( (unsigned __int8)n255_1 < 8u ); /*0xffce219e*/
nullsub_5(); /*0xffce21a6*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0, 6, 0x60u); /*0xffce21b7*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0x37u, 7, 0x50u); /*0xffce21c8*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0, 7, 0x60u); /*0xffce21dc*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCDu, 7, 0x40u); /*0xffce21f0*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCCu, 7, 0x40u); /*0xffce2207*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xB7u, 7, 0x50u); /*0xffce221b*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0, 7, 0x60u); /*0xffce222f*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCDu, 7, 0x40u); /*0xffce2243*/
KtiFuncFC62(__return_address, n4, (int)n6, n2, 0, 0xCCu, 7, 0x40u); /*0xffce225a*/
nullsub_5(); /*0xffce2265*/
}
// Function: IioFunc2274 @ 0xffce2274 (0xfa bytes)
// Index: 1822/2560
int __cdecl IioFunc2274(unsigned __int8 *__return_address, int n4, int n2)
{
unsigned __int8 n2_1; // cl
unsigned __int8 n6_1; // bl
char v5; // bp
int CpuCount; // eax
int CpuCount_1; // edx
int v8; // eax
int v9; // edx
int n6; // [esp+8h] [ebp-Ch]
int v12; // [esp+10h] [ebp-4h]
n2_1 = n2; /*0xffce2277*/
n6_1 = 0; /*0xffce227e*/
v12 = 0; /*0xffce2280*/
LOBYTE(n6) = 0; /*0xffce2285*/
v5 = 0; /*0xffce2289*/
do
{
if ( (KtiFunc8E67((int)__return_address, n4, n2_1, 0) & (1 << v5)) != 0 )
{
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffce22b9*/
n2_1 = n2; /*0xffce22be*/
CpuCount_1 = CpuCount; /*0xffce22c2*/
v8 = 1379 * (unsigned __int8)n2; /*0xffce22ca*/
if ( !*(_BYTE *)(v8 + CpuCount_1) ) /*0xffce22d4*/
goto LABEL_12; /*0xffce22d4*/
v9 = *(unsigned __int8 *)(v8 + CpuCount_1 + 20); /*0xffce22da*/
switch ( v9 )
{
case 1:
KtiFuncFC62(__return_address, n4, n6, n2, 0, 0xEu, 0, 7u); /*0xffce2348*/
break;
case 2:
KtiFuncFC62(__return_address, n4, n6, n2, 0, 0xCu, 0, 7u); /*0xffce232a*/
break;
case 4:
KtiFuncFC62(__return_address, n4, n6, n2, 0, 0, 0, 7u); /*0xffce2323*/
break;
default:
v12 = 1; /*0xffce22fa*/
DebugPrint(
(int)__return_address,
2,
n4,
n6,
n2,
255,
255,
255,
"ERROR: Invalid number of NV DIMM ranks: %u. Keeping current settings.\n",
v9);
break;
}
}
n2_1 = n2; /*0xffce2350*/
LABEL_12:
++n6_1; /*0xffce2354*/
++v5; /*0xffce2356*/
LOBYTE(n6) = n6_1; /*0xffce2357*/
}
while ( n6_1 < 6u );
return v12; /*0xffce2368*/
}
// Function: IioFunc236E @ 0xffce236e (0x72 bytes)
// Index: 1823/2560
char __cdecl IioFunc236E(unsigned __int8 *__return_address, int n4, int n6, int n2, int a5, unsigned __int8 *a6)
{
unsigned __int8 n4_1; // bl
unsigned __int8 *v7; // esi
char n4_2; // bl
unsigned __int8 *v9; // esi
char result; // al
n4_1 = 0; /*0xffce2377*/
v7 = a6; /*0xffce2379*/
do /*0xffce23a6*/
KtiFuncFC62(__return_address, n4, n6, n2, 0, *v7++, 5, 16 * n4_1++); /*0xffce2398*/
while ( n4_1 < 4u ); /*0xffce23a6*/
n4_2 = 4; /*0xffce23a8*/
v9 = a6 + 4; /*0xffce23aa*/
do /*0xffce23d9*/
{
result = KtiFuncFC62(__return_address, n4, n6, n2, 0, *v9, 6, 16 * (n4_2 - 4)); /*0xffce23cb*/
++n4_2; /*0xffce23d3*/
++v9; /*0xffce23d5*/
}
while ( (unsigned __int8)n4_2 < 8u ); /*0xffce23d9*/
return result; /*0xffce23db*/
}
// Function: IioFunc23E0 @ 0xffce23e0 (0xd2 bytes)
// Index: 1824/2560
int __cdecl IioFunc23E0(unsigned __int8 *__return_address, int n4, int n6, int n2, unsigned __int8 *a5, _BYTE *a6)
{
int n18; // edi
unsigned __int8 *v9; // ecx
unsigned __int8 *v10; // edx
unsigned __int16 n0xF; // ax
char v12; // al
unsigned __int8 v13; // al
int v15; // [esp+Ch] [ebp-8h]
int v16; // [esp+10h] [ebp-4h]
unsigned __int8 *v17; // [esp+2Ch] [ebp+18h]
v16 = KtiFunc91AF((int)__return_address, n4, n6, n2); /*0xffce23fe*/
n18 = 18; /*0xffce2426*/
v9 = (unsigned __int8 *)(KtiFunc91DE((int)__return_address, n4, n6, n2) + 244 * (unsigned __int8)a5 + 172); /*0xffce242d*/
v15 = 242 * (unsigned __int8)a5; /*0xffce242f*/
v17 = (unsigned __int8 *)(v15 + v16 + 170); /*0xffce243c*/
v10 = v17; /*0xffce243f*/
do /*0xffce2462*/
{
n0xF = *(_WORD *)a6 >> 2; /*0xffce2444*/
if ( n0xF >= 0xFu ) /*0xffce244c*/
v12 = n0xF - 15; /*0xffce2452*/
else
v12 = ~(_BYTE)n0xF; /*0xffce244e*/
v13 = v12 & 0x1F; /*0xffce2454*/
a6 += 2; /*0xffce2456*/
*v10++ = v13; /*0xffce2459*/
*v9++ = v13; /*0xffce245c*/
--n18; /*0xffce245f*/
}
while ( n18 ); /*0xffce2462*/
KtiFuncFD65(__return_address, n4, n6, n2, (int)a5, v17, (unsigned __int8)a5, 0x40u, 0xFFu); /*0xffce247e*/
KtiFuncFD65( /*0xffce24a1*/
__return_address,
n4,
n6,
n2,
(int)a5,
(unsigned __int8 *)(v15 + 179 + v16),
(unsigned __int8)a5,
0x50u,
0xFFu);
return 0; /*0xffce24ab*/
}
// Function: IioFunc24B2 @ 0xffce24b2 (0xd8 bytes)
// Index: 1825/2560
int __cdecl IioFunc24B2(unsigned __int8 *n6, int n4, int n6_1, int n2, unsigned __int8 *a5, _BYTE *a6)
{
int n18; // edi
unsigned __int8 *v9; // ecx
unsigned __int8 *v10; // edx
unsigned __int16 n0xF; // ax
char v12; // al
unsigned __int8 v13; // al
int v15; // [esp+Ch] [ebp-8h]
int v16; // [esp+10h] [ebp-4h]
unsigned __int8 *v17; // [esp+2Ch] [ebp+18h]
v16 = KtiFunc91AF((int)n6, n4, n6_1, n2); /*0xffce24d0*/
n18 = 18; /*0xffce24f8*/
v9 = (unsigned __int8 *)(KtiFunc91DE((int)n6, n4, n6_1, n2) + 244 * (unsigned __int8)a5 + 190); /*0xffce24ff*/
v15 = 242 * (unsigned __int8)a5; /*0xffce2501*/
v17 = (unsigned __int8 *)(v15 + v16 + 188); /*0xffce250e*/
v10 = v17; /*0xffce2511*/
do /*0xffce2534*/
{
n0xF = *(_WORD *)a6 >> 2; /*0xffce2516*/
if ( n0xF >= 0xFu ) /*0xffce251e*/
v12 = n0xF - 15; /*0xffce2524*/
else
v12 = ~(_BYTE)n0xF; /*0xffce2520*/
v13 = v12 & 0x1F; /*0xffce2526*/
a6 += 2; /*0xffce2528*/
*v10++ = v13; /*0xffce252b*/
*v9++ = v13; /*0xffce252e*/
--n18; /*0xffce2531*/
}
while ( n18 ); /*0xffce2534*/
KtiFuncFD65(n6, n4, n6_1, n2, (int)a5, v17, (unsigned __int8)a5, 0x80u, 0xFFu); /*0xffce2553*/
KtiFuncFD65(n6, n4, n6_1, n2, (int)a5, (unsigned __int8 *)(v15 + 197 + v16), (unsigned __int8)a5, 0x90u, 0xFFu); /*0xffce2579*/
return 0; /*0xffce2583*/
}
// Function: IioFunc258A @ 0xffce258a (0x81 bytes)
// Index: 1826/2560
unsigned __int8 __cdecl IioFunc258A(unsigned __int8 *__return_address, int n4, int a3, unsigned __int8 a4, int a5)
{
int v6[13]; // [esp+0h] [ebp-4Ch] BYREF
__int16 v7; // [esp+34h] [ebp-18h]
__int16 n4_1; // [esp+36h] [ebp-16h]
__int16 v9; // [esp+38h] [ebp-14h]
__int16 v10; // [esp+3Ah] [ebp-12h]
unsigned __int16 v11; // [esp+3Ch] [ebp-10h] BYREF
int v12; // [esp+40h] [ebp-Ch]
int v13; // [esp+44h] [ebp-8h]
char v14; // [esp+48h] [ebp-4h]
v6[7] = 31; /*0xffce2592*/
memset(v6, 0, 20); /*0xffce259f*/
v7 = 0; /*0xffce25a4*/
v9 = 0; /*0xffce25a8*/
v10 = 1; /*0xffce25ad*/
v11 = 1; /*0xffce25b1*/
v6[5] = 4; /*0xffce25dd*/
v6[6] = 0; /*0xffce25e0*/
memset(&v6[8], 0, 20); /*0xffce25e3*/
n4_1 = 4; /*0xffce25f2*/
v12 = 0; /*0xffce25f6*/
v13 = 0; /*0xffce25f9*/
v14 = 0; /*0xffce25fc*/
return DdrTrainFunc191D(__return_address, n4, a3, 2, a4, a5, (int)v6, 0, &v11, 0, 0, 0); /*0xffce2607*/
}
// Function: IioFunc260B @ 0xffce260b (0xb4 bytes)
// Index: 1827/2560
unsigned __int8 __cdecl IioFunc260B(unsigned __int8 *__return_address, int n4, int a3, unsigned __int8 a4, int a5)
{
int SocketInfo; // eax
unsigned __int8 v6; // dl
int v7; // ecx
int n255; // eax
int v10[14]; // [esp+4h] [ebp-4Ch] BYREF
__int16 v11; // [esp+3Ch] [ebp-14h]
__int16 v12; // [esp+3Eh] [ebp-12h]
unsigned __int16 v13; // [esp+40h] [ebp-10h] BYREF
int v14; // [esp+44h] [ebp-Ch]
int v15; // [esp+48h] [ebp-8h]
char v16; // [esp+4Ch] [ebp-4h]
v10[5] = 7; /*0xffce2617*/
memset(v10, 0, 20); /*0xffce2623*/
v10[6] = 0; /*0xffce2635*/
v10[7] = 31; /*0xffce2638*/
memset(&v10[8], 0, 24); /*0xffce263f*/
v11 = 0; /*0xffce2651*/
v12 = 1; /*0xffce2655*/
v13 = 0; /*0xffce2659*/
v14 = 0; /*0xffce265d*/
v15 = 1; /*0xffce2660*/
v16 = 0; /*0xffce2663*/
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffce2666*/
v6 = 0; /*0xffce266d*/
while ( 1 ) /*0xffce2672*/
{
v7 = 7688 * v6; /*0xffce2672*/
if ( *(_BYTE *)(v7 + SocketInfo) ) /*0xffce2678*/
{
if ( *(_BYTE *)(v7 + SocketInfo + 6716) ) /*0xffce267d*/
break; /*0xffce267d*/
}
if ( ++v6 >= 6u ) /*0xffce268b*/
{
n255 = 0; /*0xffce268d*/
return DdrTrainFunc191D(__return_address, n4, a3, 0, a4, a5, (int)v10, 0, &v13, 0, 0, n255); /*0xffce268d*/
}
}
n255 = 100; /*0xffce26bc*/
return DdrTrainFunc191D(__return_address, n4, a3, 0, a4, a5, (int)v10, 0, &v13, 0, 0, n255); /*0xffce26b5*/
}
// Function: IioFunc26BF @ 0xffce26bf (0x34b bytes)
// Index: 1828/2560
unsigned __int8 __cdecl IioFunc26BF(unsigned __int8 *__return_address, int n4, int n2, int a4)
{
int n4_1; // ebx
unsigned __int8 *__return_address_1; // esi
int SocketInfo; // eax
int n2_1; // ebp
unsigned __int8 n6_2; // dl
int SocketInfo_1; // ecx
int v10; // eax
int n6_1; // edi
int v12; // ebp
unsigned __int8 v13; // al
__int16 v14; // ax
int v15; // eax
int v16; // edx
unsigned __int8 n4_5; // al
int v18; // ecx
int v19; // edi
int v20; // eax
unsigned __int8 n4_3; // cl
unsigned __int8 *v22; // eax
unsigned __int8 n4_4; // [esp+13h] [ebp-29h]
int SocketInfo_2; // [esp+14h] [ebp-28h]
int v26; // [esp+18h] [ebp-24h]
int n2_2; // [esp+1Ch] [ebp-20h]
int n6; // [esp+20h] [ebp-1Ch]
int v29; // [esp+24h] [ebp-18h]
char v30[4]; // [esp+24h] [ebp-18h]
unsigned __int8 *v31; // [esp+24h] [ebp-18h]
unsigned __int8 v32; // [esp+28h] [ebp-14h]
int v33; // [esp+2Ch] [ebp-10h]
int v34; // [esp+30h] [ebp-Ch]
int v35; // [esp+30h] [ebp-Ch]
int n4_2; // [esp+34h] [ebp-8h]
_WORD *v37; // [esp+38h] [ebp-4h]
n4_1 = n4; /*0xffce26c3*/
__return_address_1 = __return_address; /*0xffce26c9*/
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffce26d0*/
n2_1 = n2; /*0xffce26d5*/
n6_2 = 0; /*0xffce26d9*/
SocketInfo_1 = SocketInfo; /*0xffce26dd*/
LOBYTE(n6) = 0; /*0xffce26df*/
v10 = 0; /*0xffce26e3*/
SocketInfo_2 = SocketInfo_1; /*0xffce26e5*/
v26 = 0; /*0xffce26e9*/
do
{
if ( *(_BYTE *)(SocketInfo_1 + v10) )
{
n6_1 = n6; /*0xffce26f7*/
v29 = KtiFunc91DE((int)__return_address_1, n4_1, n6, n2_1); /*0xffce270a*/
if ( !KtiFunc89E9((int)__return_address_1, n4_1, n6, n2_1, a4, 0) )
{
if ( !ProcCommonFunc506A((int)__return_address_1, n4_1, n6, n2_1) /*0xffce275a*/
|| (v34 = 244 * (unsigned __int8)a4, *(_BYTE *)(v34 + v29 + 60) == 4)
|| __return_address_1[238535] )
{
ProcCommonFunc3D80((int)__return_address_1, n4_1, n6, n2, a4); /*0xffce2859*/
if ( !__return_address_1[238535] ) /*0xffce2861*/
{
v14 = *(_WORD *)(244 * (unsigned __int8)a4 + v29 + 2) | 0x80; /*0xffce2887*/
if ( *(_WORD *)(__return_address_1 + 257315) == 12 ) /*0xffce2892*/
v14 = *(_WORD *)(244 * (unsigned __int8)a4 + v29 + 2) | 0x81; /*0xffce2894*/
RmtFunc349(__return_address_1, n4_1, n6, n2, a4, v14 & 0xFFF9, 1); /*0xffce28a7*/
}
v12 = v26; /*0xffce28af*/
}
else
{
KtiFuncFC62(__return_address_1, n4_1, n6, n2_1, 0, a4, 0, 8u); /*0xffce2772*/
v12 = v26; /*0xffce2777*/
LOBYTE(n2_2) = 0; /*0xffce2782*/
if ( *(_BYTE *)(SocketInfo_2 + v26 + 3) ) /*0xffce2787*/
{
do /*0xffce27f6*/
{
if ( ProcCommonFunc24FA((int)__return_address_1, n4_1, n6, n2_2) ) /*0xffce2795*/
{
v32 = *(_BYTE *)(v26 + 1379 * (unsigned __int8)n2_2 + SocketInfo_2 + 470); /*0xffce27bb*/
if ( (_BYTE)n2_2 != (_BYTE)n2 ) /*0xffce27c3*/
v32 = *(_BYTE *)(v26 + 1379 * (unsigned __int8)n2_2 + SocketInfo_2 + 470) | 8; /*0xffce27c7*/
KtiFuncFC62(__return_address_1, n4_1, n6, n2_2, 0, v32, 0, 3u); /*0xffce27dc*/
}
LOBYTE(n2_2) = n2_2 + 1; /*0xffce27ee*/
}
while ( (unsigned __int8)n2_2 < *(_BYTE *)(SocketInfo_2 + v26 + 3) ); /*0xffce27f6*/
}
KtiFuncFC62(__return_address_1, n4_1, n6, n2, 0, 5u, 0, 0xCu); /*0xffce2809*/
*(_BYTE *)(v34 + v29 + 60) = 5; /*0xffce281d*/
v13 = *(_BYTE *)(v26 + 1379 * (unsigned __int8)n2 + SocketInfo_2 + 468); /*0xffce2831*/
if ( v13 ) /*0xffce283a*/
KtiFuncFC62(__return_address_1, n4_1, n6, n2, 0, v13, 0, 2u); /*0xffce2847*/
}
v37 = RmtFunc1002(__return_address_1, n4_1, n6, n2, a4); /*0xffce28ca*/
v15 = 0; /*0xffce28ce*/
*(_DWORD *)v30 = 0; /*0xffce28d0*/
LOBYTE(v16) = *(_BYTE *)(SocketInfo_2 + v12 + 3); /*0xffce28d4*/
if ( (_BYTE)v16 ) /*0xffce28da*/
{
BYTE1(n4_1) = 0; /*0xffce28e3*/
n4_2 = (unsigned __int8)n4_1; /*0xffce28eb*/
v16 = (unsigned __int8)v16; /*0xffce28ef*/
v35 = (unsigned __int8)v16; /*0xffce28f2*/
n4_5 = __return_address_1[50813 * (unsigned __int8)n4_1 + 10194]; /*0xffce28f6*/
v18 = 0; /*0xffce28fd*/
n4_4 = n4_5; /*0xffce28ff*/
v19 = 0; /*0xffce2903*/
v33 = 0; /*0xffce2905*/
do /*0xffce2993*/
{
LOBYTE(n4_1) = 0; /*0xffce2909*/
if ( n4_5 ) /*0xffce290d*/
{
v20 = v18 + v12 + 48704 * n4_2; /*0xffce291f*/
n4_3 = n4_4; /*0xffce2921*/
v22 = &__return_address_1[v20 + 259349]; /*0xffce2925*/
v31 = v22; /*0xffce292b*/
do /*0xffce2969*/
{
if ( *(v22 - 7) ) /*0xffce292f*/
{
if ( v37 ) /*0xffce2937*/
{
n4_3 = n4_4; /*0xffce2946*/
v22 = v31; /*0xffce294c*/
if ( ((1 << (n4_1 + BYTE1(n4_1))) & (unsigned __int16)v37[2]) != 0 ) /*0xffce2950*/
{
v19 |= 1 << *v31; /*0xffce2955*/
v22 = v31; /*0xffce2958*/
}
}
}
LOBYTE(n4_1) = n4_1 + 1; /*0xffce295c*/
v22 += 242; /*0xffce295e*/
v31 = v22; /*0xffce2963*/
}
while ( (unsigned __int8)n4_1 < n4_3 ); /*0xffce2969*/
__return_address_1 = __return_address; /*0xffce296b*/
v18 = v33; /*0xffce296f*/
n4_5 = n4_4; /*0xffce2973*/
v16 = v35; /*0xffce2977*/
*(_DWORD *)v30 = v19; /*0xffce297b*/
}
v18 += 1379; /*0xffce297f*/
BYTE1(n4_1) += 4; /*0xffce2985*/
--v16; /*0xffce2988*/
v33 = v18; /*0xffce298b*/
v35 = v16; /*0xffce298f*/
}
while ( v16 ); /*0xffce2993*/
n4_1 = n4; /*0xffce2999*/
n6_1 = n6; /*0xffce299d*/
v15 = *(_DWORD *)v30; /*0xffce29a1*/
}
DebugPrint((int)__return_address_1, 2, n4_1, n6_1, 255, 255, 255, 255, "ODT Override: 0x%x\n", v15);
AutoGenFuncF010(__return_address_1, n4_1, n6_1, v30[0]); /*0xffce29c5*/
n2_1 = n2; /*0xffce29ca*/
}
n6_2 = n6; /*0xffce29d4*/
SocketInfo_1 = SocketInfo_2; /*0xffce29d8*/
v10 = v26; /*0xffce29dc*/
}
++n6_2; /*0xffce29e0*/
v10 += 7688; /*0xffce29e2*/
LOBYTE(n6) = n6_2; /*0xffce29e7*/
v26 = v10; /*0xffce29eb*/
}
while ( n6_2 < 6u );
return KtiFunc8C4((int)__return_address_1, 1u); /*0xffce2a02*/
}
// Function: IioFunc2A0A @ 0xffce2a0a (0x22a bytes)
// Index: 1829/2560
unsigned __int8 __cdecl IioFunc2A0A(unsigned __int8 *__return_address, int n4, int n2, int a4)
{
int SocketInfo; // ecx
unsigned __int8 n6_1; // al
int v6; // esi
int n2_1; // esi
int SocketInfo_2; // eax
int v9; // eax
int n2_3; // eax
int v11; // esi
unsigned int v12; // eax
int SocketInfo_1; // [esp+10h] [ebp-18h]
int n2_2; // [esp+14h] [ebp-14h]
int n6; // [esp+18h] [ebp-10h]
unsigned __int8 n14; // [esp+1Ch] [ebp-Ch]
int v17; // [esp+20h] [ebp-8h]
int v18; // [esp+24h] [ebp-4h]
int v19; // [esp+24h] [ebp-4h]
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffce2a22*/
n6_1 = 0; /*0xffce2a24*/
v6 = 0; /*0xffce2a26*/
SocketInfo_1 = SocketInfo; /*0xffce2a28*/
LOBYTE(n6) = 0; /*0xffce2a2c*/
v17 = 0; /*0xffce2a30*/
do /*0xffce2c26*/
{
if ( !*(_BYTE *)(SocketInfo + v6) ) /*0xffce2a38*/
goto LABEL_23; /*0xffce2a38*/
n2_1 = n2; /*0xffce2a3e*/
v18 = KtiFunc91DE((int)__return_address, n4, n6, n2); /*0xffce2a55*/
if ( KtiFunc89E9((int)__return_address, n4, n6, n2, a4, 0) ) /*0xffce2a5d*/
goto LABEL_21; /*0xffce2a67*/
ProcCommonFuncA5E(__return_address, n4, n6); /*0xffce2a70*/
KtiFunc8C4((int)__return_address, 1u); /*0xffce2a78*/
if ( !ProcCommonFunc5017((int)__return_address, n4, n6, n2, a4) ) /*0xffce2a8f*/
{
if ( !__return_address[238535] ) /*0xffce2ba4*/
{
v11 = 244 * (unsigned __int8)a4; /*0xffce2bb8*/
RmtFunc349(__return_address, n4, n6, n2, a4, *(unsigned __int16 *)(v11 + v18 + 2) | 0x80, 1); /*0xffce2bd3*/
v12 = *(unsigned __int16 *)(v11 + v18 + 2); /*0xffce2bde*/
n2_1 = n2; /*0xffce2be3*/
RmtFunc349(__return_address, n4, n6, n2, a4, v12, 1); /*0xffce2bf0*/
}
ProcCommonFunc1486((int)__return_address, n4, n6, n2_1, a4); /*0xffce2c00*/
LABEL_21:
v6 = v17; /*0xffce2c08*/
goto LABEL_22; /*0xffce2c08*/
}
KtiFuncFC62(__return_address, n4, n6, n2, 0, 0, 0, 0xCu); /*0xffce2aa0*/
v6 = v17; /*0xffce2aaf*/
*(_BYTE *)(244 * (unsigned __int8)a4 + v18 + 60) = 0; /*0xffce2ac0*/
v19 = v17 + 1379 * (unsigned __int8)n2; /*0xffce2ad4*/
KtiFuncFC62(__return_address, n4, n6, n2, 0, *(_BYTE *)(v19 + SocketInfo_1 + 469), 0, 2u); /*0xffce2ae7*/
SocketInfo_2 = SocketInfo_1; /*0xffce2aec*/
LOBYTE(n2_2) = 0; /*0xffce2af5*/
if ( *(_BYTE *)(SocketInfo_1 + v17 + 3) ) /*0xffce2af9*/
{
do /*0xffce2b53*/
{
if ( ProcCommonFunc24FA((int)__return_address, n4, n6, n2_2) ) /*0xffce2b06*/
KtiFuncFC62( /*0xffce2b39*/
__return_address,
n4,
n6,
n2_2,
0,
*(_BYTE *)(v17 + 1379 * (unsigned __int8)n2_2 + SocketInfo_1 + 470),
0,
3u);
LOBYTE(n2_2) = n2_2 + 1; /*0xffce2b4b*/
}
while ( (unsigned __int8)n2_2 < *(_BYTE *)(SocketInfo_1 + v17 + 3) ); /*0xffce2b53*/
SocketInfo_2 = SocketInfo_1; /*0xffce2b55*/
}
n14 = 0; /*0xffce2b5d*/
v9 = *(unsigned __int8 *)(v19 + SocketInfo_2 + 416) - 1; /*0xffce2b69*/
if ( !v9 ) /*0xffce2b6c*/
{
n14 = 14; /*0xffce2b86*/
LABEL_16:
KtiFuncFC62(__return_address, n4, n6, n2, 0, n14, 0, 7u); /*0xffce2b8b*/
goto LABEL_22; /*0xffce2b9a*/
}
n2_3 = v9 - 1; /*0xffce2b6e*/
if ( n2_3 ) /*0xffce2b71*/
{
if ( n2_3 != 2 ) /*0xffce2b77*/
goto LABEL_16; /*0xffce2b77*/
KtiFuncFC62(__return_address, n4, n6, n2, 0, 0, 0, 7u); /*0xffce2b7d*/
}
else
{
KtiFuncFC62(__return_address, n4, n6, n2, 0, 0xCu, 0, 7u); /*0xffce2b84*/
}
LABEL_22:
n6_1 = n6; /*0xffce2c0c*/
SocketInfo = SocketInfo_1; /*0xffce2c10*/
LABEL_23:
++n6_1; /*0xffce2c14*/
v6 += 7688; /*0xffce2c16*/
LOBYTE(n6) = n6_1; /*0xffce2c1c*/
v17 = v6; /*0xffce2c20*/
}
while ( n6_1 < 6u ); /*0xffce2c26*/
return n6_1; /*0xffce2c2c*/
}
// Function: IioFunc2C34 @ 0xffce2c34 (0x1fe bytes)
// Index: 1830/2560
int __cdecl IioFunc2C34(unsigned __int8 *n6, int n4, int n2, int a4)
{
int n4_1; // ebx
unsigned __int8 *n6_1; // esi
unsigned __int8 *buf; // edi
char v7; // bp
int CpuCount; // eax
int n2_1; // edx
int result; // eax
unsigned __int8 n2_2; // di
unsigned __int8 n6_2; // dl
char v13; // bp
int v14; // eax
unsigned __int16 v15; // [esp+10h] [ebp-1Ch] BYREF
unsigned __int16 v16[2]; // [esp+14h] [ebp-18h] BYREF
unsigned __int8 *buf_1; // [esp+18h] [ebp-14h]
int v18; // [esp+1Ch] [ebp-10h]
int v19[3]; // [esp+20h] [ebp-Ch] BYREF
ProcCommonFunc566B(v19); /*0xffce2c40*/
n4_1 = n4; /*0xffce2c4d*/
n6_1 = n6; /*0xffce2c51*/
buf = n6 + 238538; /*0xffce2c5d*/
v18 = KtiFunc8DC4((int)n6, n4, n2, a4); /*0xffce2c63*/
LOBYTE(n6) = 0; /*0xffce2c6a*/
v7 = 0; /*0xffce2c6f*/
buf_1 = buf; /*0xffce2c71*/
do /*0xffce2cf9*/
{
if ( ((1 << v7) & v18) != 0 ) /*0xffce2c80*/
{
CpuCount = GetCpuCount((int)n6_1, n4_1, (unsigned __int8)n6); /*0xffce2c88*/
n2_1 = n2; /*0xffce2c8d*/
n4_1 = n4; /*0xffce2ca5*/
if ( (unsigned __int8)a4 >= *(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 19) ) /*0xffce2ca9*/
goto LABEL_6; /*0xffce2ca9*/
ProcCommonFunc1947((int)n6_1, n4, (unsigned __int8)n6, n2, a4, v19); /*0xffce2cbb*/
memset(buf, 0, 0x120u); /*0xffce2cc5*/
ProcCommonFunc3E76(n6_1, n4, (int)n6, v19); /*0xffce2cd2*/
buf = buf_1; /*0xffce2cd7*/
}
n2_1 = n2; /*0xffce2cde*/
LABEL_6:
buf += 288; /*0xffce2ce2*/
buf_1 = buf; /*0xffce2cee*/
++v7; /*0xffce2cf2*/
LOBYTE(n6) = (_BYTE)n6 + 1; /*0xffce2cf3*/
}
while ( (unsigned __int8)n6 < 6u ); /*0xffce2cf9*/
DebugPrint((int)n6_1, 2, n4_1, 255, n2_1, a4, 255, 255, "Write Leveling Pi Scanning...\n"); /*0xffce2d15*/
ProcCommonFunc19F5((int)n6_1, n4_1, v16, &v15); /*0xffce2d26*/
result = v15; /*0xffce2d33*/
if ( (__int16)v16[0] < (int)v15 ) /*0xffce2d3a*/
{
n2_2 = n2; /*0xffce2d40*/
do /*0xffce2e24*/
{
n6_2 = 0; /*0xffce2d44*/
v13 = 0; /*0xffce2d46*/
LOBYTE(n6) = 0; /*0xffce2d48*/
do /*0xffce2dde*/
{
if ( ((1 << v13) & v18) != 0 ) /*0xffce2d57*/
{
v14 = GetCpuCount((int)n6_1, n4_1, (unsigned __int8)n6); /*0xffce2d5f*/
n4_1 = n4; /*0xffce2d7c*/
if ( (unsigned __int8)a4 >= *(_BYTE *)(1379 * (unsigned __int8)n2 + v14 + 19) ) /*0xffce2d80*/
{
n2_2 = n2; /*0xffce2dcc*/
}
else
{
ProcCommonFunc3F44(n6_1, n4, n6, n2, a4, v16[0], (int)v19); /*0xffce2d96*/
KtiFunc8C4((int)n6_1, 1u); /*0xffce2d9e*/
MailBoxFunc2B5B((int)n6_1, n4); /*0xffce2da5*/
KtiFunc8C4((int)n6_1, 1u); /*0xffce2dad*/
n2_2 = n2; /*0xffce2db2*/
ProcCommonFunc3FED(n6_1, n4, (int)n6, n2, v19); /*0xffce2dc2*/
}
n6_2 = (unsigned __int8)n6; /*0xffce2dd0*/
}
++n6_2; /*0xffce2dd4*/
++v13; /*0xffce2dd6*/
LOBYTE(n6) = n6_2; /*0xffce2dd7*/
}
while ( n6_2 < 6u ); /*0xffce2dde*/
KtiFunc8C4((int)n6_1, 1u); /*0xffce2de7*/
MailBoxFunc2B5B((int)n6_1, n4_1); /*0xffce2dee*/
KtiFunc8C4((int)n6_1, 1u); /*0xffce2df6*/
ProcCommonFunc1FB8(n6_1, n4_1, n2_2, a4, v16[0]++); /*0xffce2e06*/
result = v15; /*0xffce2e1d*/
}
while ( (__int16)v16[0] < (int)v15 ); /*0xffce2e24*/
}
return result; /*0xffce2e2a*/
}
// Function: WriteDqsTrainingInit @ 0xffce2e32 (0x911 bytes)
// Index: 1831/2560
int __cdecl WriteDqsTrainingInit(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // edi
int v2; // eax
int n4_2; // ebx
int SocketInfo; // ecx
unsigned __int8 n6_1; // al
_BYTE *SocketInfo_2; // ebp
int CpuCount; // ecx
unsigned __int8 n2_1; // al
_BYTE *v9; // ebp
int n4_3; // edx
unsigned __int8 n2_3; // cl
_BYTE *SocketInfo_7; // ebp
int v13; // eax
int n2_2; // ebp
int *v15; // esi
_BYTE *SocketInfo_4; // ecx
char v17; // dl
unsigned __int8 n6a_1; // al
int v19; // eax
int v20; // eax
unsigned __int8 n6_2; // cl
unsigned __int8 *v22; // esi
int v23; // eax
_BYTE *v24; // edx
unsigned __int8 n8_2; // cl
unsigned __int8 n8_1; // al
int v27; // edx
unsigned __int16 v28; // ax
unsigned __int8 v29; // al
unsigned __int8 n0x12_3; // cl
unsigned __int8 n0x12_2; // al
_BYTE *SocketInfo_8; // ecx
unsigned __int8 n6_3; // al
int v34; // eax
unsigned __int8 n2_4; // cl
_BYTE *v36; // esi
int n4... [19400 chars total]
// Function: WriteDqsFlybyTraining @ 0xffce3743 (0x161c bytes)
// Index: 1832/2560
int __cdecl WriteDqsFlybyTraining(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // ebx
int n4_2; // ebp
unsigned __int8 v3; // dl
int v4; // ecx
unsigned __int8 n2_1; // al
_BYTE *SocketInfo_1; // ecx
unsigned __int8 n6_2; // al
unsigned int v8; // esi
int n6_1; // edi
bool v10; // al
unsigned __int8 n8_1; // ch
int v12; // edx
unsigned __int8 n8; // cl
unsigned __int8 v14; // al
int buf_8; // ebp
int v16; // eax
unsigned __int8 n9_2; // cl
int v18; // eax
__int16 *buf_3; // edi
int n0xB_5; // ecx
int v21; // esi
unsigned __int8 n6_4; // al
_BYTE *n6_3; // esi
unsigned __int8 n9_1; // cl
unsigned __int8 n0x12_2; // al
int n0x12_1; // edi
unsigned __int16 v27; // ax
unsigned __int8 n0xB; // al
char v29; // di
_BYTE *n6_5; // esi
unsigned __int8 n9_4; // cl
unsigned __int8 n0x12_3; // al
unsigned __int16 v33; // ax
_DWORD *SocketInfo_4; // edi
unsigned __int8 n6_6; // dl
int v36; // esi
... [44316 chars total]
// Function: WriteDqsTxPiScan @ 0xffce4d5f (0x47c bytes)
// Index: 1833/2560
int __cdecl WriteDqsTxPiScan(unsigned __int8 *n6, int n4, int n2, int n4a, _BYTE *n8)
{
int n4_1; // edi
unsigned __int8 n2_1; // bp
unsigned __int8 n6_1; // bl
_BYTE *n8_1; // eax
bool v9; // al
int n4a_1; // ecx
int n2_2; // ebx
_BYTE *SocketInfo_2; // ecx
unsigned __int8 n6a_1; // al
unsigned __int8 buf_2; // cl
unsigned __int8 buf_1; // al
int *v16; // ebp
_BYTE *SocketInfo_4; // ecx
unsigned __int8 n6_3; // al
int v19; // edx
unsigned __int8 n0x40; // al
int v21; // ebx
int v22; // eax
char buf_3; // [esp+13h] [ebp-81h]
unsigned __int8 n0x40_1; // [esp+13h] [ebp-81h]
_BYTE *n6a; // [esp+14h] [ebp-80h]
unsigned __int8 n6_4; // [esp+14h] [ebp-80h]
unsigned __int8 n6_2; // [esp+14h] [ebp-80h]
_BYTE *buf; // [esp+18h] [ebp-7Ch]
_BYTE *SocketInfo_3; // [esp+1Ch] [ebp-78h]
int v31; // [esp+1Ch] [ebp-78h]
_BYTE *SocketInfo_1; // [esp+20h] [ebp-74h]
_BYTE *SocketInfo_5; // [esp+20h] [ebp-74h]
int CpuCount; // [esp+24h] [ebp-70h]
int v35; // [esp+24h] [ebp-70h]
int v36; // [esp+24h] [ebp-70h]
int v37; // [esp+28h] [ebp-6Ch]
int v38; // [esp+28h] [ebp-6Ch]
__int16 i; // [esp+2Ch] [ebp-68h]
int n16843009; // [esp+30h] [ebp-64h] BYREF
__int16 n257; // [esp+34h] [ebp-60h]
char v42; // [esp+36h] [ebp-5Eh]
unsigned __int16 p_n60; // [esp+38h] [ebp-5Ch] BYREF
int SocketInfo; // [esp+3Ch] [ebp-58h]
unsigned __int16 p_n60_1[2]; // [esp+40h] [ebp-54h] BYREF
int v46; // [esp+44h] [ebp-50h]
int v47; // [esp+48h] [ebp-4Ch]
_BYTE v48[8]; // [esp+4Ch] [ebp-48h] BYREF
char v49; // [esp+54h] [ebp-40h] BYREF
n4_1 = n4; /*0xffce4d72*/
n16843009 = 16843009; /*0xffce4d7b*/
n257 = 257; /*0xffce4d83*/
v42 = 1; /*0xffce4d8a*/
v46 = 0; /*0xffce4d8f*/
n2_1 = n2; /*0xffce4d9f*/
SocketInfo = GetSocketInfo((int)n6, n4); /*0xffce4daa*/
v47 = KtiFunc8DC4((int)n6, n4, n2, n4a); /*0xffce4db3*/
n6_1 = 0; /*0xffce4dc1*/
buf = n8; /*0xffce4dc3*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffce4dcb*/
n8_1 = n8; /*0xffce4dcf*/
n6_4 = 0; /*0xffce4dd3*/
do /*0xffce4e73*/
{
if ( !*SocketInfo_1 ) /*0xffce4dde*/
goto LABEL_6; /*0xffce4dde*/
CpuCount = GetCpuCount((int)n6, n4, n6_4); /*0xffce4df4*/
v9 = KtiFunc89E9((int)n6, n4, n6_4, n2_1, n4a, 0); /*0xffce4dff*/
n4a_1 = n4a; /*0xffce4e04*/
if ( !v9 ) /*0xffce4e10*/
{
if ( (unsigned __int8)n4a < *(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 19) ) /*0xffce4e2e*/
{
KtiFunc7D83(buf, 0, 0x2400u); /*0xffce4e3f*/
n2_1 = n2; /*0xffce4e44*/
n8_1 = buf; /*0xffce4e4e*/
LABEL_6:
n4a_1 = n4a; /*0xffce4e52*/
goto LABEL_7; /*0xffce4e52*/
}
n2_1 = n2; /*0xffce5113*/
}
n8_1 = buf; /*0xffce511a*/
LABEL_7:
SocketInfo_1 += 7688; /*0xffce4e59*/
++n6_1; /*0xffce4e61*/
n8_1 += 9216; /*0xffce4e63*/
n6_4 = n6_1; /*0xffce4e68*/
buf = n8_1; /*0xffce4e6c*/
}
while ( n6_1 < 6u ); /*0xffce4e73*/
n2_2 = n2; /*0xffce4e79*/
DebugPrint((int)n6, 2, n4, 255, n2, n4a_1, 255, 255, "TxDqDqs Pi Scanning...\n"); /*0xffce4e93*/
for ( i = 0; i < 128; ++i ) /*0xffce4e9b*/
{
SocketInfo_2 = (_BYTE *)SocketInfo; /*0xffce4ea0*/
n6a_1 = 0; /*0xffce4ea4*/
LOBYTE(n6a) = 0; /*0xffce4ea6*/
SocketInfo_3 = (_BYTE *)SocketInfo; /*0xffce4eaa*/
do /*0xffce5008*/
{
if ( *SocketInfo_2 ) /*0xffce4eae*/
{
v35 = GetCpuCount((int)n6, n4_1, (unsigned __int8)n6a); /*0xffce4ecc*/
if ( !KtiFunc89E9((int)n6, n4_1, (char)n6a, n2_2, n4a, 0) ) /*0xffce4ed4*/
{
v37 = 1379 * (unsigned __int8)n2_2; /*0xffce4ef8*/
if ( (unsigned __int8)n4a < *(_BYTE *)(v37 + v35 + 19) ) /*0xffce4f00*/
{
buf_3 = ProcCommonFunc1DB2((int)n6, n4_1, (unsigned __int8)n6a, n2_2, 0x14u, 0); /*0xffce4f13*/
buf_2 = buf_3; /*0xffce4f1a*/
buf_1 = 0; /*0xffce4f1e*/
for ( LOBYTE(buf) = 0; buf_1 < buf_2; LOBYTE(buf) = buf_1 ) /*0xffce4f26*/
{
if ( n6[257312] || buf_1 != 8 && buf_1 != 17 ) /*0xffce4f3f*/
{
MrcMarginGroupTrain(n6, n4_1, n6a, n2_2, n4a, (int)buf, 0, 0, 21, 2, &p_n60); /*0xffce4f61*/
*(_DWORD *)p_n60_1 = (unsigned __int16)(i + p_n60 - 32); /*0xffce4f77*/
MrcMarginGroupTrain(n6, n4_1, n6a, n2_2, n4a, (int)buf, 0, 0, 22, 16, p_n60_1); /*0xffce4f97*/
if ( !*(_BYTE *)(v37 + v35 + 104) ) /*0xffce4fa7*/
MrcMarginGroupTrain( /*0xffce4fd0*/
n6,
n4_1,
n6a,
n2_2,
n4a,
(unsigned __int8)((_BYTE)buf + 9),
0,
0,
22,
16,
p_n60_1);
buf_2 = buf_3; /*0xffce4fd8*/
buf_1 = (unsigned __int8)buf; /*0xffce4fdc*/
}
++buf_1; /*0xffce4fe0*/
}
}
}
SocketInfo_2 = SocketInfo_3; /*0xffce4fee*/
n6a_1 = (unsigned __int8)n6a; /*0xffce4ff2*/
}
++n6a_1; /*0xffce4ff6*/
SocketInfo_2 += 7688; /*0xffce4ff8*/
LOBYTE(n6a) = n6a_1; /*0xffce4ffe*/
SocketInfo_3 = SocketInfo_2; /*0xffce5002*/
}
while ( n6a_1 < 6u ); /*0xffce5008*/
DdrTrainFuncB30(n6, n4_1, v47, 0, (int)&n16843009, 1, 0); /*0xffce501f*/
v31 = 0; /*0xffce5024*/
v16 = (int *)&v49; /*0xffce5029*/
SocketInfo_4 = (_BYTE *)SocketInfo; /*0xffce502d*/
n6_3 = 0; /*0xffce5031*/
v19 = 0; /*0xffce5033*/
v36 = 0; /*0xffce503a*/
n6_2 = 0; /*0xffce503f*/
SocketInfo_5 = (_BYTE *)SocketInfo; /*0xffce5043*/
do /*0xffce51af*/
{
if ( *SocketInfo_4 ) /*0xffce5047*/
{
v38 = GetCpuCount((int)n6, n4_1, n6_2); /*0xffce5064*/
if ( !KtiFunc89E9((int)n6, n4_1, n6_2, n2_2, n4a, 0) /*0xffce5097*/
&& (unsigned __int8)n4a < *(_BYTE *)(1379 * (unsigned __int8)n2_2 + v38 + 19) )
{
*(v16 - 2) = 0; /*0xffce50a4*/
*(v16 - 1) = 0; /*0xffce50a9*/
*v16 = 0; /*0xffce50ac*/
v46 = KtiFuncBC82(n6, n4_1, (unsigned __int8)(1 << v31), (int)v48); /*0xffce50c3*/
if ( ProcCommonFuncFB4A((int)n6, 2u) ) /*0xffce50c7*/
RmtFunc4165(n6, n4_1, n6_2, n2_2, n4a, v16 - 2, i); /*0xffce50e9*/
n0x40 = 0; /*0xffce50f5*/
n0x40_1 = 0; /*0xffce50f7*/
v21 = 0; /*0xffce50fb*/
do /*0xffce5174*/
{
if ( n6[257312] || n0x40 <= 0x3Fu ) /*0xffce5108*/
{
if ( n0x40 >= 0x20u ) /*0xffce510c*/
{
if ( n0x40 >= 0x40u ) /*0xffce5125*/
v22 = *v16; /*0xffce512c*/
else
v22 = *(v16 - 1); /*0xffce5127*/
}
else
{
v22 = *(v16 - 2); /*0xffce510e*/
}
n8[128 * (v36 + v21) + i % 128] = ((1 << v21) & v22) != 0; /*0xffce5164*/
n0x40 = n0x40_1; /*0xffce5167*/
}
++n0x40; /*0xffce516b*/
++v21; /*0xffce516d*/
n0x40_1 = n0x40; /*0xffce516e*/
}
while ( n0x40 < 0x48u ); /*0xffce5174*/
n4_1 = n4; /*0xffce5176*/
n2_2 = n2; /*0xffce517d*/
}
n6_3 = n6_2; /*0xffce5184*/
SocketInfo_4 = SocketInfo_5; /*0xffce5188*/
v19 = v31; /*0xffce518c*/
}
v36 += 72; /*0xffce5190*/
++n6_3; /*0xffce5195*/
++v19; /*0xffce5197*/
n6_2 = n6_3; /*0xffce5198*/
SocketInfo_4 += 7688; /*0xffce519c*/
v31 = v19; /*0xffce51a2*/
v16 += 3; /*0xffce51a6*/
SocketInfo_5 = SocketInfo_4; /*0xffce51a9*/
}
while ( n6_3 < 6u ); /*0xffce51af*/
}
return v46; /*0xffce51d0*/
}
// Function: IioFunc51DB @ 0xffce51db (0xce bytes)
// Index: 1834/2560
char __cdecl IioFunc51DB(unsigned __int8 *n6, unsigned __int8 n4)
{
unsigned __int8 n8; // dl
unsigned int v3; // ebx
int n6_3; // ecx
int SocketInfo; // eax
unsigned __int8 n6_2; // bl
_BYTE *SocketInfo_1; // esi
int n6_1; // [esp+14h] [ebp-804h]
char v10[2048]; // [esp+18h] [ebp-800h] BYREF
n8 = 0; /*0xffce51e3*/
v3 = 0; /*0xffce51e5*/
n6_3 = 0; /*0xffce51e8*/
n6_1 = 0; /*0xffce51ef*/
do
{
if ( (unsigned __int8)(n6_3 & 0xF) < (unsigned __int8)((n6_3 & 0xF) + 2) )
{
memset32(&v10[64 * (v3 >> 3) + 4 * (n6_3 & 0xF)], (n8 & 1) != 0 ? -1431655766 : 1431655765, 2u);
n6_3 = n6_1; /*0xffce5235*/
}
++n8; /*0xffce5239*/
n6_3 += 2; /*0xffce523b*/
++v3; /*0xffce523e*/
n6_1 = n6_3; /*0xffce523f*/
}
while ( n8 < 8u );
SocketInfo = GetSocketInfo((int)n6, n4); /*0xffce5256*/
n6_2 = 0; /*0xffce525d*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffce525f*/
LOBYTE(n6_1) = 0; /*0xffce5261*/
do /*0xffce529d*/
{
if ( *SocketInfo_1 ) /*0xffce5266*/
LOBYTE(SocketInfo) = RmtFunc71F8(n6, n4, n6_1, v10, 1, 0); /*0xffce5286*/
++n6_2; /*0xffce528e*/
SocketInfo_1 += 7688; /*0xffce5290*/
LOBYTE(n6_1) = n6_2; /*0xffce5296*/
}
while ( n6_2 < 6u ); /*0xffce529d*/
return SocketInfo; /*0xffce5265*/
}
// Function: WriteDqsTraining @ 0xffce52a9 (0x97d bytes)
// Index: 1835/2560
int __cdecl WriteDqsTraining(unsigned __int8 *n6)
{
int v1; // eax
int v3; // ebx
_WORD *v4; // eax
int n6_1; // edx
int n72; // ecx
int n4_2; // edi
int v8; // ebx
unsigned __int8 n2_2; // al
int v10; // edx
int n19; // ecx
int n2_1; // ebp
_BYTE *SocketInfo_1; // eax
char v14; // bh
unsigned __int8 n6_2; // bl
char v16; // al
int v17; // edx
unsigned __int8 n6_3; // bl
int v19; // ecx
int v20; // eax
_BYTE *SocketInfo_3; // edx
int v22; // ebx
unsigned __int8 n6a_1; // al
int v24; // ecx
unsigned __int8 n4_4; // ch
unsigned __int8 n0x3F; // cl
unsigned int v27; // eax
unsigned __int16 p_n60_1; // dx
__int16 v29; // cx
__int16 v30; // ax
int v31; // edx
unsigned __int8 v32; // al
unsigned __int8 n0xF; // al
int v34; // ecx
unsigned int v35; // eax
signed __int16 *v36; // edi
unsigned __int8 v37; // bl
signed __int16 v38; // dx
__int16 v39; // dx
_WORD *v40; // eax
unsigned __int8 n4_6; // cl
int v42; // ... [17492 chars total]
// Function: IioFunc5C26 @ 0xffce5c26 (0x19b bytes)
// Index: 1836/2560
void __cdecl IioFunc5C26(_BYTE *__return_address, int n4, int n6, _BYTE *a4, _BYTE *a5, char *a6, _BYTE *a7, char n8)
{
unsigned __int8 n8_5; // bl
unsigned __int8 n8_1; // al
unsigned __int8 i_1; // cl
unsigned __int8 n8_2; // al
unsigned __int8 j_1; // cl
unsigned __int8 n8_3; // al
unsigned __int8 k_1; // cl
unsigned __int8 n8_4; // al
unsigned __int8 i; // [esp+Bh] [ebp-1h]
unsigned __int8 j; // [esp+Bh] [ebp-1h]
unsigned __int8 k; // [esp+Bh] [ebp-1h]
if ( ProcCommonFuncFB4A((int)__return_address, 2u) )
{
KtiFunc8014((int)__return_address); /*0xffce5c44*/
n8_5 = 0; /*0xffce5c4b*/
RmtFunc6CFE(__return_address, 0x4Cu, 0, 0, 1); /*0xffce5c52*/
LogDebugString(__return_address, (int)"RE: ");
n8_1 = n8; /*0xffce5c62*/
i_1 = 0; /*0xffce5c69*/
for ( i = 0; i_1 < n8_1; i = i_1 ) /*0xffce5c71*/
{
if ( __return_address[257312] || i_1 != 8 && i_1 != 17 ) /*0xffce5c87*/
{
LogDebugString(__return_address, (int)" %3d", *(unsigned __int16 *)a6); /*0xffce5c93*/
n8_1 = n8; /*0xffce5c98*/
i_1 = i; /*0xffce5c9f*/
}
++i_1; /*0xffce5ca3*/
a6 += 2; /*0xffce5ca5*/
}
LogDebugString(__return_address, (int)"\nCP: ");
n8_2 = n8; /*0xffce5cba*/
j_1 = 0; /*0xffce5cc0*/
for ( j = 0; j_1 < n8_2; j = j_1 ) /*0xffce5cc8*/
{
if ( __return_address[257312] || j_1 != 8 && j_1 != 17 ) /*0xffce5cde*/
{
LogDebugString(__return_address, (int)" %3d", *(unsigned __int16 *)a7); /*0xffce5cea*/
n8_2 = n8; /*0xffce5cef*/
j_1 = j; /*0xffce5cf6*/
}
++j_1; /*0xffce5cfa*/
a7 += 2; /*0xffce5cfc*/
}
LogDebugString(__return_address, (int)"\nFE: ");
n8_3 = n8; /*0xffce5d11*/
k_1 = 0; /*0xffce5d17*/
for ( k = 0; k_1 < n8_3; k = k_1 ) /*0xffce5d1f*/
{
if ( __return_address[257312] || k_1 != 8 && k_1 != 17 ) /*0xffce5d35*/
{
LogDebugString(__return_address, (int)" %3d", *(unsigned __int16 *)a5); /*0xffce5d41*/
n8_3 = n8; /*0xffce5d46*/
k_1 = k; /*0xffce5d4d*/
}
++k_1; /*0xffce5d51*/
a5 += 2; /*0xffce5d53*/
}
LogDebugString(__return_address, (int)"\nPW: ");
n8_4 = n8; /*0xffce5d68*/
if ( n8 ) /*0xffce5d70*/
{
do /*0xffce5da5*/
{
if ( __return_address[257312] || n8_5 != 8 && n8_5 != 17 ) /*0xffce5d87*/
{
LogDebugString(__return_address, (int)" %3d", *(unsigned __int16 *)a4); /*0xffce5d93*/
n8_4 = n8; /*0xffce5d98*/
}
++n8_5; /*0xffce5d9f*/
a4 += 2; /*0xffce5da1*/
}
while ( n8_5 < n8_4 ); /*0xffce5da5*/
}
LogDebugString(__return_address, (int)"\n\n"); /*0xffce5dad*/
KtiFunc834D((int)__return_address); /*0xffce5db3*/
}
}
// Function: IioFunc5DC1 @ 0xffce5dc1 (0x129 bytes)
// Index: 1837/2560
void __cdecl IioFunc5DC1(
unsigned __int8 *__return_address,
int n4,
int n6,
_BYTE *a4,
_BYTE *a5,
_BYTE *a6,
_BYTE *a7,
unsigned __int8 n18)
{
int n18_1; // ebp
int n18_2; // ebp
int n18_3; // ebp
int n18_4; // ebx
if ( ProcCommonFuncFB4A((int)__return_address, 2u) )
{
KtiFunc8014((int)__return_address); /*0xffce5ddc*/
RmtFunc6CFE(__return_address, 0x4Cu, 0, 0, 1); /*0xffce5dea*/
LogDebugString(__return_address, (int)"RE: ");
if ( n18 ) /*0xffce5e03*/
{
n18_1 = n18; /*0xffce5e09*/
do /*0xffce5e2a*/
{
LogDebugString(__return_address, (int)" %3d", (*(unsigned __int16 *)a6 >> 2) - 15); /*0xffce5e1c*/
a6 += 2; /*0xffce5e24*/
--n18_1; /*0xffce5e27*/
}
while ( n18_1 ); /*0xffce5e2a*/
}
LogDebugString(__return_address, (int)"\nCP: ");
if ( n18 ) /*0xffce5e3b*/
{
n18_2 = n18; /*0xffce5e41*/
do /*0xffce5e62*/
{
LogDebugString(__return_address, (int)" %3d", (*(unsigned __int16 *)a7 >> 2) - 15); /*0xffce5e54*/
a7 += 2; /*0xffce5e5c*/
--n18_2; /*0xffce5e5f*/
}
while ( n18_2 ); /*0xffce5e62*/
}
LogDebugString(__return_address, (int)"\nFE: ");
if ( n18 ) /*0xffce5e73*/
{
n18_3 = n18; /*0xffce5e79*/
do /*0xffce5e9a*/
{
LogDebugString(__return_address, (int)" %3d", (*(unsigned __int16 *)a5 >> 2) - 15); /*0xffce5e8c*/
a5 += 2; /*0xffce5e94*/
--n18_3; /*0xffce5e97*/
}
while ( n18_3 ); /*0xffce5e9a*/
}
LogDebugString(__return_address, (int)"\nPW: ");
if ( n18 ) /*0xffce5eab*/
{
n18_4 = n18; /*0xffce5eb1*/
do /*0xffce5ecf*/
{
LogDebugString(__return_address, (int)" %3d", *(unsigned __int16 *)a4 >> 2); /*0xffce5ec1*/
a4 += 2; /*0xffce5ec9*/
--n18_4; /*0xffce5ecc*/
}
while ( n18_4 ); /*0xffce5ecf*/
}
LogDebugString(__return_address, (int)"\n\n"); /*0xffce5ed7*/
KtiFunc834D((int)__return_address); /*0xffce5edd*/
}
}
// Function: IioFunc5EEA @ 0xffce5eea (0x579 bytes)
// Index: 1838/2560
int __cdecl IioFunc5EEA(int a1, int a2, int a3, int a4, int a5, int n8, int a7, int a8, int a9, int a10, char n32)
{
int v11; // esi
int v12; // ebx
int v13; // edi
unsigned __int16 v14; // bp
unsigned __int8 v15; // al
int v16; // eax
int v17; // ecx
bool v18; // zf
__int16 v19; // ax
unsigned __int16 v20; // cx
unsigned __int16 v21; // ax
unsigned __int16 v22; // cx
unsigned __int16 v23; // ax
__int16 v24; // ax
unsigned __int16 v25; // cx
unsigned __int16 v26; // ax
int v27; // edx
int v28; // eax
unsigned __int16 v29; // ax
int v30; // ebx
int n8_2; // edi
int result; // eax
int v33; // ecx
int v34; // edx
int v35; // ebp
unsigned __int8 v36; // bp
unsigned __int8 n8_3; // al
int v38; // edx
int v39; // ebp
unsigned __int8 v40; // bp
int n8_4; // edx
int v42; // ebp
int v43; // [esp-18h] [ebp-68h]
int v44; // [esp-18h] [ebp-68h]
int v45; // [esp-14h] [ebp-64h]
int v46; // [esp-14h] [ebp-64h]
int v47; // [esp-... [10610 chars total]
// Function: IioFunc6463 @ 0xffce6463 (0x6a bytes)
// Index: 1839/2560
void __cdecl IioFunc6463(
unsigned __int8 *__return_address,
int n4,
_BYTE *n6,
int n2,
int a5,
unsigned __int16 n18,
char *n0x12,
unsigned __int8 *p_n2)
{
unsigned __int8 n18_1; // bh
unsigned __int8 n18_3; // bl
char *n0x12_1; // esi
unsigned __int8 *p_n2_1; // edi
unsigned __int16 n18_2; // ax
n18_1 = n18; /*0xffce6467*/
n18_3 = 0; /*0xffce646a*/
n0x12_1 = n0x12; /*0xffce646d*/
LOBYTE(n0x12) = 0; /*0xffce6470*/
p_n2_1 = p_n2; /*0xffce6474*/
*n0x12_1 = 0; /*0xffce6477*/
for ( *p_n2_1 = 16; n18_3 < n18_1; LOBYTE(n0x12) = n18_3 ) /*0xffce647f*/
{
MrcMarginGroupTrain(__return_address, n4, n6, n2, a5, (int)n0x12, 0, 0, 0, 2, &n18); /*0xffce649f*/
n18_2 = n18 >> 6; /*0xffce64ab*/
n18 = n18_2; /*0xffce64af*/
if ( (unsigned __int8)n18_2 < *p_n2_1 ) /*0xffce64b5*/
*p_n2_1 = n18_2; /*0xffce64b7*/
if ( (unsigned __int8)*n0x12_1 < (unsigned __int8)n18_2 ) /*0xffce64bb*/
*n0x12_1 = n18_2; /*0xffce64bd*/
++n18_3; /*0xffce64bf*/
}
}
// Function: IioFunc64CD @ 0xffce64cd (0x382 bytes)
// Index: 1840/2560
int *__cdecl IioFunc64CD(
unsigned __int8 *__return_address,
int n4,
int n2,
int a4,
int *a5,
char *a6,
int *a7,
int *a8)
{
char *SocketInfo; // eax
unsigned __int8 n6a_1; // bl
unsigned __int8 *v10; // edi
int CpuCount; // eax
int n2_1; // edx
int *result; // eax
unsigned __int8 n6_1; // cl
unsigned __int8 n2_2; // di
int v16; // ebp
char *SocketInfo_3; // edx
unsigned __int8 n8_1; // al
int v19; // edi
unsigned __int8 v20; // al
int n8; // [esp+10h] [ebp-2Ch]
int n6; // [esp+14h] [ebp-28h]
unsigned __int8 n6a; // [esp+14h] [ebp-28h]
int v24; // [esp+18h] [ebp-24h]
int v25; // [esp+18h] [ebp-24h]
char *SocketInfo_2; // [esp+1Ch] [ebp-20h]
int *v27; // [esp+1Ch] [ebp-20h]
char *SocketInfo_1; // [esp+20h] [ebp-1Ch]
int CpuCount_1; // [esp+24h] [ebp-18h]
int v30; // [esp+24h] [ebp-18h]
unsigned __int8 *v31; // [esp+28h] [ebp-14h]
int v32; // [esp+2Ch] [ebp-10h]
SocketInfo = (char *)GetSocketInfo((int)__return_address, n4); /*0xffce64de*/
SocketInfo_1 = SocketInfo; /*0xffce64eb*/
n6a_1 = 0; /*0xffce64ef*/
SocketInfo_2 = SocketInfo; /*0xffce64f1*/
n6a = 0; /*0xffce64f5*/
v10 = __return_address + 10018; /*0xffce64f9*/
v31 = __return_address + 10018; /*0xffce64fb*/
do
{
if ( *SocketInfo )
{
CpuCount = GetCpuCount((int)__return_address, n4, n6a); /*0xffce650a*/
n2_1 = n2; /*0xffce650f*/
CpuCount_1 = CpuCount; /*0xffce651f*/
v24 = 1379 * (unsigned __int8)n2; /*0xffce6523*/
if ( !*(_BYTE *)(v24 + CpuCount) ) /*0xffce6527*/
{
*(_DWORD *)v10 = 0; /*0xffce652d*/
SocketInfo = SocketInfo_2; /*0xffce6530*/
goto LABEL_11; /*0xffce6534*/
}
if ( KtiFunc89E9((int)__return_address, n4, n6a, n2, a4, 0)
|| (unsigned __int8)a4 >= *(_BYTE *)(v24 + CpuCount_1 + 19) )
{
*(_DWORD *)v10 = 0; /*0xffce657b*/
}
else
{
*(_DWORD *)v10 = __return_address[257312] == 0 ? 130815 : 0x3FFFF;
}
SocketInfo = SocketInfo_2; /*0xffce657e*/
}
n2_1 = n2; /*0xffce6582*/
LABEL_11:
++n6a_1; /*0xffce6586*/
SocketInfo += 7688; /*0xffce6588*/
v10 += 4; /*0xffce658d*/
n6a = n6a_1; /*0xffce6590*/
SocketInfo_2 = SocketInfo; /*0xffce6594*/
}
while ( n6a_1 < 6u );
IioFn_FFCE7036(__return_address, n4, n2_1, a4); /*0xffce65ac*/
result = a5; /*0xffce65b1*/
n6_1 = 0; /*0xffce65b5*/
v25 = 0; /*0xffce65be*/
v30 = 0; /*0xffce65c5*/
n2_2 = n2; /*0xffce65ca*/
v16 = 0; /*0xffce65ce*/
LOBYTE(n6) = 0; /*0xffce65dc*/
v27 = a5; /*0xffce65ea*/
SocketInfo_3 = SocketInfo_1; /*0xffce65f2*/
do
{
if ( *SocketInfo_3 )
{
v32 = GetCpuCount((int)__return_address, n4, n6); /*0xffce6611*/
if ( !KtiFunc89E9((int)__return_address, n4, n6, n2_2, a4, 0) )
{
if ( (unsigned __int8)a4 < *(_BYTE *)(1379 * (unsigned __int8)n2 + v32 + 19) )
{
if ( ProcCommonFuncFB4A((int)__return_address, 2u) )
{
KtiFunc8014((int)__return_address); /*0xffce6657*/
if ( __return_address[9480] )
LogDebugString(
__return_address,
(int)"\nSummary: Early Ctl Clk Receive Enable Pi\nS%d, Ch%d, DIMM%d, Rank%d\n",
(unsigned __int8)n4,
v25,
(unsigned __int8)n2,
(unsigned __int8)a4);
else
LogDebugString(
__return_address,
(int)"\nSummary: Receive Enable Pi\nS%d, Ch%d, DIMM%d, Rank%d\n",
(unsigned __int8)n4,
v25,
(unsigned __int8)n2,
(unsigned __int8)a4);
IioFunc723C(__return_address, n4, n6, n2, 1u); /*0xffce6695*/
KtiFunc834D((int)__return_address); /*0xffce669b*/
}
n8_1 = 0; /*0xffce66a3*/
v19 = 0; /*0xffce66a5*/
LOBYTE(n8) = 0; /*0xffce66a7*/
do /*0xffce67d7*/
{
if ( __return_address[257312] || n8_1 != 8 && n8_1 != 17 ) /*0xffce66be*/
{
IioFunc5EEA((int)__return_address, n4, n6, n2, a4, n8, (int)a5, (int)a6, (int)a7, (int)a8, 1); /*0xffce66e5*/
if ( ((1 << v19) & *(_DWORD *)&__return_address[24 * (unsigned __int8)n4 + 10042 + 4 * v25]) != 0 ) /*0xffce6705*/
{
v20 = KtiFuncD909((int)__return_address, n4, n6); /*0xffce670e*/
if ( v20 ) /*0xffce6718*/
{
if ( v20 == 1 ) /*0xffce6720*/
{
KtiFunc1341( /*0xffce674f*/
__return_address,
48,
20,
n4,
n6,
n2,
a4,
1,
n8,
255,
0,
0,
*((_BYTE *)a8 + 2 * v19 + 2 * v30));
}
else
{
DebugPrint((int)__return_address, 3, n4, n6, n2, a4, n8, 255, "RecEn training failure!!!\n"); /*0xffce6774*/
*(_DWORD *)v31 |= 1 << v19; /*0xffce6785*/
KtiFunc8A8E(__return_address, n4, n6); /*0xffce6787*/
KtiFunc1341( /*0xffce67c2*/
__return_address,
49,
20,
n4,
n6,
n2,
a4,
1,
n8,
255,
0,
0,
*((_BYTE *)a8 + 2 * v19 + 2 * v30));
}
}
}
n8_1 = n8; /*0xffce67ca*/
}
++n8_1; /*0xffce67ce*/
++v19; /*0xffce67d0*/
LOBYTE(n8) = n8_1; /*0xffce67d1*/
}
while ( n8_1 < 0x12u ); /*0xffce67d7*/
IioFunc5C26( /*0xffce67fc*/
__return_address,
n4,
n6,
(_BYTE *)v27 + (char *)a8 - (char *)a5,
(_BYTE *)v27 + (char *)a7 - (char *)a5,
(char *)v27,
(_BYTE *)v27 + a6 - (char *)a5,
18);
}
n2_2 = n2; /*0xffce6804*/
}
result = v27; /*0xffce6808*/
n6_1 = n6; /*0xffce680c*/
SocketInfo_3 = SocketInfo_1; /*0xffce6810*/
v16 = v25; /*0xffce6814*/
}
v31 += 4; /*0xffce6818*/
++n6_1; /*0xffce681d*/
v30 += 18; /*0xffce681f*/
++v16; /*0xffce6824*/
SocketInfo_3 += 7688; /*0xffce6825*/
LOBYTE(n6) = n6_1; /*0xffce682b*/
result += 9; /*0xffce682f*/
v25 = v16; /*0xffce6832*/
SocketInfo_1 = SocketInfo_3; /*0xffce6836*/
v27 = result; /*0xffce683a*/
}
while ( n6_1 < 6u );
return result; /*0xffce6847*/
}
// Function: IioFunc684F @ 0xffce684f (0x728 bytes)
// Index: 1841/2560
unsigned __int8 __cdecl IioFunc684F(unsigned __int8 *__return_address, int n4, int n2, int a4, int a5)
{
int n4_1; // ebx
unsigned __int8 *__return_address_1; // edi
_BYTE *SocketInfo; // ecx
_DWORD *v8; // ebp
unsigned __int8 n6; // al
bool v10; // al
unsigned __int8 v11; // cl
unsigned __int8 n2_1; // dl
char n4_3; // al
int v14; // ebp
unsigned __int8 n2_2; // si
int v16; // esi
unsigned __int8 n0x12_1; // al
int v18; // ecx
int v19; // eax
char CpuCount_1; // cl
int v21; // esi
int v22; // edx
int v23; // esi
int v24; // eax
unsigned __int8 n0x12_2; // dl
int v26; // ecx
unsigned __int16 v27; // cx
unsigned __int8 SocketInfo_2; // al
_BYTE *CpuCount_2; // ecx
int v30; // edx
int v31; // esi
_BYTE *v32; // ecx
int v33; // eax
unsigned __int8 n6_2; // al
char v35; // [esp+12h] [ebp-6Ah]
char v36; // [esp+13h] [ebp-69h]
_BYTE *n6_1; // [esp+14h] [ebp-68h]
unsigned __int8 n6_3; // [esp+14h] [ebp-68h]
int n0x12; // [e... [12626 chars total]
// Function: KtiSocketInitLoop @ 0xffce6f77 (0xbf bytes)
// Index: 1842/2560
char __cdecl KtiSocketInitLoop(
unsigned __int8 *__return_address,
int n4,
unsigned __int8 n2,
unsigned __int8 a4,
unsigned int n60)
{
int SocketInfo; // eax
unsigned __int8 n6_1; // bl
_BYTE *SocketInfo_1; // esi
unsigned __int8 n0x12_1; // bh
__int16 v9; // ax
unsigned __int8 n6; // [esp+10h] [ebp-Ch]
char n0x12; // [esp+14h] [ebp-8h]
int CpuCount; // [esp+18h] [ebp-4h]
SocketInfo = GetSocketInfo((int)__return_address, n4); /*0xffce6f88*/
n6_1 = 0; /*0xffce6f8e*/
SocketInfo_1 = (_BYTE *)SocketInfo; /*0xffce6f90*/
n6 = 0; /*0xffce6f93*/
do /*0xffce7028*/
{
if ( *SocketInfo_1 ) /*0xffce6f97*/
{
CpuCount = GetCpuCount((int)__return_address, n4, n6); /*0xffce6fad*/
LOBYTE(SocketInfo) = KtiFunc89E9((int)__return_address, n4, n6, n2, a4, 0); /*0xffce6fbb*/
if ( !(_BYTE)SocketInfo ) /*0xffce6fc5*/
{
SocketInfo = 1379 * n2; /*0xffce6fd6*/
if ( a4 < *(_BYTE *)(SocketInfo + CpuCount + 19) ) /*0xffce6fe0*/
{
n0x12_1 = 0; /*0xffce6fe2*/
n0x12 = 0; /*0xffce6fe4*/
do /*0xffce7017*/
{
v9 = ProcCommonFunc318E(__return_address, n4, n6, n0x12); /*0xffce6ff2*/
LOBYTE(SocketInfo) = ProcCommonFunc31BA((int)__return_address, n4, n6, n0x12, v9, n60); /*0xffce7006*/
n0x12 = ++n0x12_1; /*0xffce7010*/
}
while ( n0x12_1 < 0x12u ); /*0xffce7017*/
}
}
}
++n6_1; /*0xffce7019*/
SocketInfo_1 += 7688; /*0xffce701b*/
n6 = n6_1; /*0xffce7021*/
}
while ( n6_1 < 6u ); /*0xffce7028*/
return SocketInfo; /*0xffce702e*/
}
// Function: IioFn_FFCE7036 @ 0xffce7036 (0x206 bytes)
// Index: 1843/2560
int __cdecl IioFn_FFCE7036(unsigned __int8 *__return_address, int n4, int n2, int a4)
{
unsigned __int8 *__return_address_1; // esi
unsigned __int8 *SocketInfo; // ecx
unsigned __int8 n6_1; // al
unsigned __int8 *buf_1; // edi
bool v8; // al
unsigned __int8 n2_1; // cl
unsigned __int8 v10; // dl
unsigned __int8 v11; // bp
unsigned __int8 n2_2; // di
unsigned __int8 *SocketInfo_3; // ecx
unsigned __int8 __return_address_2; // al
int n0x80; // eax
unsigned __int8 *buf; // [esp+10h] [ebp-1Ch]
unsigned __int8 *SocketInfo_4; // [esp+10h] [ebp-1Ch]
unsigned __int16 p_n60[2]; // [esp+14h] [ebp-18h] BYREF
int SocketInfo_2; // [esp+18h] [ebp-14h]
int CpuCount; // [esp+1Ch] [ebp-10h]
unsigned __int8 *SocketInfo_1; // [esp+20h] [ebp-Ch]
int n16843009; // [esp+24h] [ebp-8h] BYREF
__int16 n257; // [esp+28h] [ebp-4h]
char v24; // [esp+2Ah] [ebp-2h]
unsigned __int8 n6; // [esp+30h] [ebp+4h]
__return_address_1 = __return_address; /*0xffce7040*/
n16843009 = 16843009; /*0xffce7047*/
n257 = 257; /*0xffce704f*/
v24 = 1; /*0xffce7056*/
SocketInfo = (unsigned __int8 *)GetSocketInfo((int)__return_address, n4); /*0xffce7062*/
n6_1 = 0; /*0xffce706a*/
SocketInfo_1 = SocketInfo; /*0xffce706c*/
n6 = 0; /*0xffce7070*/
buf_1 = __return_address_1 + 238538; /*0xffce7074*/
SocketInfo_2 = (int)SocketInfo; /*0xffce707a*/
buf = __return_address_1 + 238538; /*0xffce707e*/
while ( 1 ) /*0xffce708b*/
{
if ( *SocketInfo ) /*0xffce7088*/
{
CpuCount = GetCpuCount((int)__return_address_1, n4, n6); /*0xffce70a8*/
v8 = KtiFunc89E9((int)__return_address_1, n4, n6, n2, a4, 0); /*0xffce70ae*/
n2_1 = n2; /*0xffce70b6*/
v10 = a4; /*0xffce70b8*/
if ( v8 ) /*0xffce70bc*/
{
n6_1 = n6; /*0xffce70e6*/
buf_1 = buf; /*0xffce70ea*/
goto LABEL_11; /*0xffce70ee*/
}
buf_1 = buf; /*0xffce70cf*/
if ( (unsigned __int8)a4 >= *(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 19) ) /*0xffce70d3*/
{
n6_1 = n6; /*0xffce70f0*/
goto LABEL_11; /*0xffce70f4*/
}
memset(buf, 0, 0x120u); /*0xffce70da*/
n6_1 = n6; /*0xffce70dc*/
buf_1 = buf; /*0xffce70e0*/
}
else
{
v10 = a4; /*0xffce70f6*/
}
n2_1 = n2; /*0xffce70fa*/
LABEL_11:
SocketInfo_2 += 7688; /*0xffce70fe*/
++n6_1; /*0xffce7106*/
buf_1 += 288; /*0xffce7108*/
n6 = n6_1; /*0xffce710e*/
buf = buf_1; /*0xffce7112*/
if ( n6_1 >= 6u ) /*0xffce7118*/
break; /*0xffce7118*/
SocketInfo = (unsigned __int8 *)SocketInfo_2; /*0xffce7084*/
}
SocketInfo_2 = KtiFunc8DC4((int)__return_address_1, n4, n2_1, v10); /*0xffce712a*/
IioFuncAC11(__return_address_1, n4, (_BYTE *)SocketInfo_2); /*0xffce712e*/
v11 = a4; /*0xffce7133*/
n2_2 = n2; /*0xffce713c*/
DebugPrint((int)__return_address_1, 2, n4, 255, n2, a4, 255, 255, "RecEn Pi Scanning:\n"); /*0xffce714e*/
*(_DWORD *)p_n60 = 0; /*0xffce7156*/
do /*0xffce722e*/
{
SocketInfo_3 = SocketInfo_1; /*0xffce715b*/
__return_address_2 = 0; /*0xffce715f*/
LOBYTE(__return_address) = 0; /*0xffce7161*/
SocketInfo_4 = SocketInfo_1; /*0xffce7165*/
do /*0xffce71f1*/
{
if ( *SocketInfo_3 ) /*0xffce7169*/
{
CpuCount = GetCpuCount((int)__return_address_1, n4, (unsigned __int8)__return_address); /*0xffce7181*/
if ( !KtiFunc89E9((int)__return_address_1, n4, (char)__return_address, n2_2, v11, 0) ) /*0xffce7187*/
{
if ( (unsigned __int8)a4 < *(_BYTE *)(1379 * (unsigned __int8)n2 + CpuCount + 19) ) /*0xffce71ac*/
MrcMarginGroupTrain(__return_address_1, n4, __return_address, n2, a4, 255, 0, 0, 0, 16, p_n60); /*0xffce71c7*/
v11 = a4; /*0xffce71cf*/
n2_2 = n2; /*0xffce71d3*/
}
__return_address_2 = (unsigned __int8)__return_address; /*0xffce71d7*/
SocketInfo_3 = SocketInfo_4; /*0xffce71db*/
}
++__return_address_2; /*0xffce71df*/
SocketInfo_3 += 7688; /*0xffce71e1*/
LOBYTE(__return_address) = __return_address_2; /*0xffce71e7*/
SocketInfo_4 = SocketInfo_3; /*0xffce71eb*/
}
while ( __return_address_2 < 6u ); /*0xffce71f1*/
DdrTrainFuncB30(__return_address_1, n4, SocketInfo_2, 0, (int)&n16843009, 1, 0); /*0xffce7208*/
KtiSocketInitLoop(__return_address_1, n4, n2_2, v11, *(unsigned int *)p_n60); /*0xffce7215*/
n0x80 = *(_DWORD *)p_n60 + 1; /*0xffce7221*/
*(_DWORD *)p_n60 = n0x80; /*0xffce7227*/
}
while ( (unsigned __int16)n0x80 < 0x80u ); /*0xffce722e*/
return n0x80; /*0xffce7234*/
}
// Function: IioFunc723C @ 0xffce723c (0x223 bytes)
// Index: 1844/2560
int __cdecl IioFunc723C(_BYTE *a1, unsigned __int8 a2, unsigned __int8 a3, unsigned __int8 a4, unsigned __int8 n5)
{
_BYTE *v7; // ebp
int CpuCount; // eax
int n0xA_1; // eax
unsigned int n0xA_2; // edi
int n9; // edi
unsigned __int8 n5a_1; // al
unsigned __int8 n8; // bh
int v14; // edx
int v15; // [esp+10h] [ebp-4h]
unsigned int n0xA; // [esp+18h] [ebp+4h]
unsigned __int8 n5a; // [esp+28h] [ebp+14h]
v7 = a1 + 238538; /*0xffce7249*/
if ( n5 == 5 ) /*0xffce7252*/
v7 = a1 + 236805; /*0xffce7254*/
if ( n5 == 4 ) /*0xffce725d*/
v7 = a1 + 233241; /*0xffce725f*/
if ( n5 == 3 ) /*0xffce7268*/
v7 = a1 + 231405; /*0xffce726a*/
if ( n5 == 2 ) /*0xffce7273*/
v7 = a1 + 234969; /*0xffce7275*/
CpuCount = GetCpuCount((int)a1, a2, a3); /*0xffce7284*/
if ( n5 || *(_BYTE *)(1379 * a4 + CpuCount + 104) ) /*0xffce729b*/
{
RmtFunc6CFE(a1, 0x55u, 0, 0, 1); /*0xffce72dc*/
if ( a1[257312] ) /*0xffce72e4*/
LogDebugString(a1, (int)" 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17\n"); /*0xffce72f2*/
else
LogDebugString(a1, (int)" 0 1 2 3 4 5 6 7 9 10 11 12 13 14 15 16\n"); /*0xffce72fa*/
n5a = 18; /*0xffce72ff*/
}
else
{
RmtFunc6CFE(a1, 0x27u, 0, 0, 1); /*0xffce72aa*/
if ( a1[257312] ) /*0xffce72b2*/
LogDebugString(a1, (int)" 0 1 2 3 4 5 6 7 8\n"); /*0xffce72bf*/
else
LogDebugString(a1, (int)" 0 1 2 3 4 5 6 7\n"); /*0xffce72c7*/
n5a = 9; /*0xffce72cc*/
}
n0xA_1 = 0; /*0xffce7305*/
n0xA = 0; /*0xffce7308*/
do /*0xffce7453*/
{
if ( (n5 <= 1u || (n0xA_1 & 1) == 0) && (n5 != 4 && n5 != 5 || (n0xA_1 & 3) == 0) ) /*0xffce7325*/
{
if ( n5 == 4 || n5 == 5 ) /*0xffce7333*/
{
n9 = (n0xA_1 >> 2) - 15; /*0xffce737d*/
LogDebugString(a1, (int)"%d ", n9); /*0xffce7387*/
if ( (unsigned int)n9 <= 9 ) /*0xffce7392*/
LogDebugString(a1, (int)" "); /*0xffce739a*/
if ( n9 < 100 && n9 > 9 ) /*0xffce73a9*/
LogDebugString(a1, (int)" "); /*0xffce73b1*/
if ( (unsigned int)(n9 + 9) <= 8 ) /*0xffce73be*/
LogDebugString(a1, (int)" "); /*0xffce73c6*/
n0xA_2 = n0xA; /*0xffce73cd*/
}
else
{
LogDebugString(a1, (int)"%d ", n0xA_1); /*0xffce733c*/
n0xA_2 = n0xA; /*0xffce7341*/
if ( n0xA < 0xA ) /*0xffce734b*/
LogDebugString(a1, (int)" "); /*0xffce7353*/
if ( n0xA - 10 <= 0x59 ) /*0xffce7360*/
LogDebugString(a1, (int)" "); /*0xffce7368*/
}
n5a_1 = n5a; /*0xffce73d1*/
n8 = 0; /*0xffce73d5*/
v14 = 0; /*0xffce73d7*/
v15 = 0; /*0xffce73d9*/
do /*0xffce7436*/
{
if ( a1[257312] || n8 != 8 && n8 != 17 ) /*0xffce73ee*/
{
if ( ((1 << n0xA_2) & *(_DWORD *)&v7[288 * a3 + 16 * v14 + 4 * (n0xA_2 >> 5)]) != 0 ) /*0xffce740f*/
LogDebugString(a1, (int)" 1"); /*0xffce7416*/
else
LogDebugString(a1, (int)" 0"); /*0xffce741e*/
n5a_1 = n5a; /*0xffce7423*/
v14 = v15; /*0xffce7427*/
}
++n8; /*0xffce742d*/
v15 = ++v14; /*0xffce7430*/
}
while ( n8 < n5a_1 ); /*0xffce7436*/
LogDebugString(a1, (int)"\n"); /*0xffce743e*/
n0xA_1 = n0xA; /*0xffce7443*/
}
n0xA = ++n0xA_1; /*0xffce744a*/
}
while ( (unsigned int)n0xA_1 < 0x80 ); /*0xffce7453*/
return n0xA_1; /*0xffce7459*/
}
// Function: IioMmioAccessInit @ 0xffce745f (0xb3e bytes)
// Index: 1845/2560
int __cdecl IioMmioAccessInit(int __return_address)
{
unsigned __int8 v1; // cl
int v2; // esi
int v3; // eax
int __return_address_1; // edi
int v5; // eax
int n19; // ebx
char v7; // al
unsigned __int8 v8; // dl
int n2_1; // esi
_BYTE *SocketInfo_1; // ecx
unsigned __int8 n6_1; // al
bool v12; // al
char v13; // bl
int n19_2; // ecx
_BYTE *SocketInfo_3; // ecx
unsigned __int8 n6_2; // al
int v17; // edx
unsigned __int8 n0x12_2; // al
int v19; // ecx
unsigned __int16 *p_n60_1; // esi
int n60; // eax
int v22; // ecx
_BYTE *SocketInfo_5; // ecx
unsigned __int8 n6_3; // al
int v25; // edx
unsigned __int8 n0x12_3; // al
int v27; // ecx
int v28; // eax
int n19_3; // ecx
unsigned __int8 n0x12_4; // al
_BYTE *SocketInfo_7; // eax
unsigned __int8 n6_4; // bl
_BYTE *SocketInfo_9; // eax
unsigned __int8 n6_5; // bl
unsigned __int8 n2_2; // bl
unsigned __int8 v36; // bh
unsigned __int8 *v37; // eax
unsigned __int8 v38; //... [30866 chars total]
// Function: IioVDataInit @ 0xffce7f9d (0x9e4 bytes)
// Index: 1846/2560
int __cdecl IioVDataInit(unsigned __int8 *__return_address, int n4)
{
unsigned __int8 *__return_address_1; // ebp
int n2_1; // eax
int n4_1; // edi
unsigned __int8 n6; // cl
int v6; // esi
_BYTE *n6a; // ebx
int CpuCount; // ecx
char n2_3; // al
_BYTE *v10; // esi
bool v11; // zf
int v12; // ecx
_BYTE *p_n60_6; // esi
char n2_4; // al
unsigned __int8 v15; // al
int v16; // ecx
char v17; // dl
int v18; // esi
char v19; // al
char n2_5; // al
_BYTE *p_n60_7; // esi
char v22; // al
int n0xFFFF_1; // esi
unsigned __int8 n0x12_1; // al
_BYTE *p_n60_9; // esi
char n2_6; // al
int v27; // edx
_BYTE *p_n60_10; // esi
char v29; // cl
char n2_7; // al
unsigned __int8 v31; // cl
unsigned __int8 v32; // al
unsigned __int8 n8; // al
int v34; // edx
_BYTE *p_n60_4; // esi
char n2_8; // al
int p_n60_11; // eax
char v38; // dl
int v39; // esi
unsigned __int8 v40; // cl
char v41; // bl
int v42; // eax
int v43; // esi
... [21751 chars total]
// Function: IioUniphyInit @ 0xffce8981 (0xa23 bytes)
// Index: 1847/2560
char __cdecl IioUniphyInit(unsigned __int8 *__return_address, int n6)
{
int v2; // eax
int n6_1; // ebx
int SocketInfo; // edx
unsigned __int8 n6_3; // al
_BYTE *n6_2; // ebp
int CpuCount; // edi
int v8; // edx
int n18; // edi
int v10; // eax
int n2_1; // ecx
unsigned __int8 n2_2; // cl
_BYTE *v13; // edi
int v14; // eax
unsigned __int8 n0x12_1; // al
int v16; // edi
unsigned __int16 v17; // ax
int v18; // ecx
_BYTE *CpuCount_3; // edi
unsigned __int8 n2_3; // al
_BYTE *v21; // ecx
unsigned __int8 n8; // al
int v23; // ecx
unsigned __int16 v24; // di
unsigned int v25; // ecx
__int16 v26; // cx
__int16 v27; // ax
int n0x10_5; // eax
unsigned int v29; // ecx
unsigned __int16 v30; // cx
int v31; // eax
int n0x10_6; // eax
unsigned __int8 n8_3; // al
int v34; // edi
_BYTE *CpuCount_5; // edi
unsigned __int8 n2_5; // al
unsigned __int8 n0x12_3; // al
int n0x10_4; // ecx
unsigned int v39; // edi
unsigned __int16 v4... [21213 chars total]
// Function: IioFn_FFCE93A4 @ 0xffce93a4 (0x3d5 bytes)
// Index: 1848/2560
void __cdecl IioFn_FFCE93A4(unsigned __int8 *__return_address, int n6, _BYTE *n6a, __int16 *p_n60)
{
int SocketInfo; // edi
int CpuCount; // eax
_BYTE *v6; // edi
unsigned __int8 n2_1; // al
unsigned __int8 n0x12_1; // al
int v9; // edi
unsigned __int16 n60_2; // cx
_BYTE *v11; // edi
unsigned __int8 n2_2; // al
unsigned __int8 n8; // al
int v14; // edi
int v15; // ecx
unsigned __int16 n60_3; // dx
int v17; // eax
unsigned int v18; // ecx
__int16 v19; // cx
__int16 v20; // ax
int n0xFFFF_3; // eax
unsigned __int16 n0xFFFF_1; // dx
int v23; // eax
__int16 v24; // di
__int16 n60_4; // cx
__int16 v26; // ax
unsigned __int16 n60_1; // [esp+4h] [ebp-78h] BYREF
int n2; // [esp+8h] [ebp-74h]
int n0x12; // [esp+Ch] [ebp-70h]
int v30; // [esp+10h] [ebp-6Ch]
int v31; // [esp+14h] [ebp-68h]
int n60; // [esp+18h] [ebp-64h]
int n0xFFFF_2; // [esp+1Ch] [ebp-60h]
int v34; // [esp+20h] [ebp-5Ch]
_BYTE *v35; // [esp+24h] [ebp-58h]
_BYTE ... [9244 chars total]
// Function: IioFn_FFCE9779 @ 0xffce9779 (0x1498 bytes)
// Index: 1849/2560
int __cdecl IioFn_FFCE9779(unsigned __int8 *__return_address)
{
unsigned __int8 *__return_address_1; // edi
int v2; // eax
int n4_1; // ebx
unsigned __int8 v4; // al
unsigned __int16 *SocketInfo; // edx
__int16 *buf_1; // ebp
unsigned __int8 n6a_1; // al
int v8; // ecx
int CpuCount; // eax
unsigned __int8 n2a_1; // cl
int v11; // eax
unsigned __int8 *v12; // ebp
int SocketInfo_15; // ebp
int n4_13; // edx
int v15; // ecx
int n18; // edi
int v17; // eax
char v18; // al
char v19; // al
int v20; // ecx
int v21; // edx
unsigned __int8 *v22; // ebp
int v23; // ecx
int SocketInfo_16; // eax
int n4_3; // ecx
unsigned __int8 n0x12_1; // al
char n4_7; // al
int n4_6; // ecx
unsigned __int8 n0x12_2; // al
unsigned __int16 *SocketInfo_3; // ecx
unsigned __int8 n6a_2; // al
unsigned __int16 *buf_4; // ebp
int v33; // eax
unsigned __int8 n2_1; // cl
_BYTE *n4_8; // esi
char *v36; // ecx
unsigned __int16 *buf_3; // ebx
unsig... [50618 chars total]
// Function: IioFuncAC11 @ 0xffceac11 (0xa4 bytes)
// Index: 1850/2560
unsigned __int8 __cdecl IioFuncAC11(unsigned __int8 *__return_address, int n4, _BYTE *SocketInfo)
{
int v4[13]; // [esp+8h] [ebp-54h] BYREF
__int16 v5; // [esp+3Ch] [ebp-20h]
__int16 n4_1; // [esp+3Eh] [ebp-1Eh]
__int16 v7; // [esp+40h] [ebp-1Ch]
__int16 v8; // [esp+42h] [ebp-1Ah]
unsigned __int16 n32; // [esp+44h] [ebp-18h] BYREF
int v10; // [esp+48h] [ebp-14h]
int n9; // [esp+4Ch] [ebp-10h]
char v12; // [esp+50h] [ebp-Ch]
int v13; // [esp+57h] [ebp-5h] BYREF
unsigned __int8 v14; // [esp+5Bh] [ebp-1h] BYREF
v4[7] = 1023; /*0xffceac1b*/
v5 = 0; /*0xffceac25*/
v7 = 0; /*0xffceac2b*/
v8 = 1; /*0xffceac32*/
n32 = 32; /*0xffceac37*/
memset(v4, 0, 20); /*0xffceac42*/
v4[5] = 4; /*0xffceac5d*/
v4[6] = 0; /*0xffceac60*/
memset(&v4[8], 0, 20); /*0xffceac63*/
n4_1 = 4; /*0xffceac72*/
v10 = 0; /*0xffceac76*/
n9 = 9; /*0xffceac79*/
v12 = 0; /*0xffceac80*/
ProcCommonFunc4FE9((int)__return_address, (int)v4, (int)&n32, &v13, &v14); /*0xffceac83*/
return DdrTrainFunc191D(__return_address, n4, (int)SocketInfo, 2, v14, v13, (int)v4, 0, &n32, 0, 0, 4); /*0xffceacaf*/
}
// Function: IioPcieNtbInit @ 0xffceacb5 (0x43b bytes)
// Index: 1851/2560
int __cdecl IioPcieNtbInit(_BYTE *__return_address)
{
_BYTE *__return_address_1; // edi
unsigned __int8 n4_1; // bl
char v3; // si
unsigned __int8 n4_2; // al
_BYTE *v5; // ecx
int v6; // esi
int v7; // ebx
_BYTE *SocketInfo; // ecx
unsigned __int8 n6; // al
int v10; // edx
int n6_2; // ebp
int CpuCount; // eax
bool v13; // zf
unsigned __int16 v14; // si
unsigned __int8 *v15; // esi
unsigned __int8 *v16; // esi
unsigned __int16 v17; // si
unsigned __int8 *v18; // esi
unsigned __int8 n4_3; // bl
char v20; // si
unsigned __int8 v22; // [esp-10h] [ebp-40h]
char v23; // [esp+7h] [ebp-29h] BYREF
char v24[4]; // [esp+8h] [ebp-28h]
unsigned __int8 n4[4]; // [esp+Ch] [ebp-24h]
int CpuCount_1; // [esp+10h] [ebp-20h]
int n6_1; // [esp+14h] [ebp-1Ch]
_BYTE *SocketInfo_1; // [esp+18h] [ebp-18h]
int v29; // [esp+1Ch] [ebp-14h]
_BYTE *v30; // [esp+20h] [ebp-10h]
int v31; // [esp+24h] [ebp-Ch]
int v32; // [esp+28h] [ebp-8h]
int v33; // [esp+2Ch] [ebp-4h]
__return_address_1 = __return_address; /*0xffceacb9*/
if ( __return_address[257308] == 1 && *((_DWORD *)__return_address + 61601) ) /*0xffceacc6*/
return 0; /*0xffceaccd*/
if ( (char)__return_address[130] < 0 ) /*0xffceacdc*/
{
n4_1 = 0; /*0xffceacde*/
v3 = 0; /*0xffceace0*/
n4[0] = 0; /*0xffceace2*/
do /*0xffcead1b*/
{
if ( ((1 << v3) & *((_DWORD *)__return_address_1 + 61617)) != 0 && n4_1 != __return_address_1[246425] ) /*0xffceacfb*/
KtiFunc296B((int)__return_address_1, n4[0], &v23, 1u); /*0xffcead09*/
++n4_1; /*0xffcead11*/
++v3; /*0xffcead13*/
n4[0] = n4_1; /*0xffcead14*/
}
while ( n4_1 < 4u ); /*0xffcead1b*/
}
n4_2 = 0; /*0xffcead1d*/
v5 = __return_address_1 + 258716; /*0xffcead1f*/
v6 = 0; /*0xffcead25*/
n4[0] = 0; /*0xffcead27*/
v31 = 0; /*0xffcead2b*/
v30 = __return_address_1 + 258716; /*0xffcead2f*/
do
{
if ( *(v5 - 27) && *v5 )
{
v7 = *(_DWORD *)n4; /*0xffcead47*/
v22 = n4[0]; /*0xffcead4b*/
*(_WORD *)(__return_address_1 + 453505) = -253; /*0xffcead4d*/
SocketInfo = (_BYTE *)GetSocketInfo((int)__return_address_1, v22); /*0xffcead5d*/
n6 = 0; /*0xffcead5f*/
v10 = 0; /*0xffcead61*/
SocketInfo_1 = SocketInfo; /*0xffcead63*/
LOBYTE(n6_1) = 0; /*0xffcead67*/
v29 = 0; /*0xffcead6b*/
while ( 1 )
{
if ( !*SocketInfo ) /*0xffcead72*/
goto LABEL_31; /*0xffcead72*/
n6_2 = n6_1; /*0xffcead78*/
CpuCount = GetCpuCount((int)__return_address_1, v7, n6_1); /*0xffcead7f*/
v10 = v29; /*0xffcead84*/
CpuCount_1 = CpuCount; /*0xffcead8b*/
v24[0] = 0; /*0xffcead8f*/
v13 = __return_address_1[v6 + 10240 + v29] == 0; /*0xffcead97*/
v33 = v6 + v29; /*0xffcead9f*/
if ( v13 ) /*0xffceada3*/
goto LABEL_30; /*0xffceada3*/
do
{
if ( *(_WORD *)(__return_address_1 + 257315) == 11 )
{
if ( !KtiFunc27D8(__return_address_1, v7, n6_2, v24[0], 0xB0u, (unsigned __int8 *)&__return_address) )
{
v14 = (unsigned __int8)__return_address << 8; /*0xffceade3*/
KtiFunc27D8(__return_address_1, v7, n6_2, v24[0], 0xB1u, (unsigned __int8 *)&__return_address); /*0xffceadf7*/
if ( (v14 | (unsigned __int8)__return_address) == 3146 )
{
v15 = (unsigned __int8 *)(1379 * (unsigned __int8)v24[0] + CpuCount_1 + 98); /*0xffceae27*/
v32 = 1379 * (unsigned __int8)v24[0]; /*0xffceae29*/
KtiFunc27D8(__return_address_1, v7, n6_2, v24[0], 0xB3u, v15); /*0xffceae3a*/
if ( __return_address_1[453506] > *v15 )
{
__return_address_1[453506] = *v15; /*0xffceae4c*/
DebugPrint(
(int)__return_address_1,
2,
v7,
n6_2,
*(int *)v24,
255,
255,
255,
"XMP Revision: %d.%d\n",
*v15 >> 4,
*v15);
}
v16 = (unsigned __int8 *)(v32 + 97 + CpuCount_1); /*0xffceae83*/
KtiFunc27D8(__return_address_1, v7, n6_2, v24[0], 0xB2u, v16); /*0xffceae8b*/
LABEL_26:
__return_address_1[453505] &= *v16 & 3; /*0xffceaf69*/
goto LABEL_28; /*0xffceaf76*/
}
}
}
else if ( !KtiFunc27D8(__return_address_1, v7, n6_2, v24[0], 0x180u, (unsigned __int8 *)&__return_address) )
{
v17 = (unsigned __int8)__return_address << 8; /*0xffceaeb5*/
KtiFunc27D8(__return_address_1, v7, n6_2, v24[0], 0x181u, (unsigned __int8 *)&__return_address); /*0xffceaec9*/
if ( (v17 | (unsigned __int8)__return_address) == 3146 )
{
v18 = (unsigned __int8 *)(1379 * (unsigned __int8)v24[0] + CpuCount_1 + 98); /*0xffceaef9*/
v32 = 1379 * (unsigned __int8)v24[0]; /*0xffceaefb*/
KtiFunc27D8(__return_address_1, v7, n6_2, v24[0], 0x183u, v18); /*0xffceaf0c*/
if ( __return_address_1[453506] > *v18 )
{
__return_address_1[453506] = *v18; /*0xffceaf1e*/
DebugPrint(
(int)__return_address_1,
2,
v7,
n6_2,
*(int *)v24,
255,
255,
255,
"XMP Revision: %d.%d\n",
*v18 >> 4,
*v18);
}
v16 = (unsigned __int8 *)(v32 + 97 + CpuCount_1); /*0xffceaf55*/
KtiFunc27D8(__return_address_1, v7, n6_2, v24[0], 0x182u, v16); /*0xffceaf64*/
goto LABEL_26; /*0xffceaf64*/
}
}
__return_address_1[453505] = 0; /*0xffceaf78*/
LABEL_28:
++v24[0]; /*0xffceaf7f*/
}
while ( v24[0] < __return_address_1[v33 + 10240] );
v6 = v31; /*0xffceaf9a*/
v10 = v29; /*0xffceaf9e*/
LABEL_30:
SocketInfo = SocketInfo_1; /*0xffceafa2*/
n6 = n6_1; /*0xffceafa6*/
LABEL_31:
++n6; /*0xffceafaa*/
SocketInfo += 7688; /*0xffceafac*/
v10 += 8077; /*0xffceafb2*/
LOBYTE(n6_1) = n6; /*0xffceafb8*/
SocketInfo_1 = SocketInfo; /*0xffceafbc*/
v29 = v10; /*0xffceafc0*/
if ( n6 >= 6u ) /*0xffceafc6*/
{
n4_2 = n4[0]; /*0xffceafcc*/
v5 = v30; /*0xffceafd0*/
break; /*0xffceafd0*/
}
}
}
++n4_2; /*0xffceafd4*/
v5 += 48704; /*0xffceafd6*/
v6 += 50813; /*0xffceafdc*/
n4[0] = n4_2; /*0xffceafe2*/
v30 = v5; /*0xffceafe6*/
v31 = v6; /*0xffceafea*/
}
while ( n4_2 < 4u );
if ( !ProcCommonFuncFB4A((int)__return_address_1, 3u) ) /*0xffceb003*/
goto LABEL_41; /*0xffceb003*/
if ( __return_address_1[453505] )
{
LogDebugString(__return_address_1, (int)"Supported XMP Profile(s): ");
if ( (__return_address_1[453505] & 1) != 0 ) /*0xffceb026*/
LogDebugString(__return_address_1, (int)"1"); /*0xffceb02e*/
if ( (__return_address_1[453505] & 2) != 0 ) /*0xffceb03c*/
LogDebugString(__return_address_1, (int)", 2"); /*0xffceb044*/
LogDebugString(__return_address_1, (int)"\n"); /*0xffceb051*/
LogDebugString(
__return_address_1,
(int)"Supported XMP Revision: %d.%d\n",
(unsigned __int8)__return_address_1[453506] >> 4,
__return_address_1[453506] & 0xF);
LABEL_41:
if ( __return_address_1[453505] ) /*0xffceb075*/
{
if ( *(_WORD *)(__return_address_1 + 257315) == 11 ) /*0xffceb089*/
IioEarlyInitialize(__return_address_1); /*0xffceb08b*/
else
IioInitPeiMain(__return_address_1); /*0xffceb092*/
}
}
if ( (char)__return_address_1[130] < 0 ) /*0xffceb09f*/
{
n4_3 = 0; /*0xffceb0a1*/
v20 = 0; /*0xffceb0a3*/
n4[0] = 0; /*0xffceb0a5*/
do /*0xffceb0e5*/
{
if ( ((1 << v20) & *((_DWORD *)__return_address_1 + 61617)) != 0 && n4_3 != __return_address_1[246425] ) /*0xffceb0be*/
{
__return_address_1[246409] = 0; /*0xffceb0c6*/
KtiFunc2D6B((int)__return_address_1, n4[0], &v23, 1u); /*0xffceb0d3*/
}
++n4_3; /*0xffceb0db*/
++v20; /*0xffceb0dd*/
n4[0] = n4_3; /*0xffceb0de*/
}
while ( n4_3 < 4u ); /*0xffceb0e5*/
}
return 0; /*0xffceb0eb*/
}
// Function: IioFuncB0F0 @ 0xffceb0f0 (0x6a bytes)
// Index: 1852/2560
unsigned int __cdecl IioFuncB0F0(
_BYTE *__return_address,
int a2,
int a3,
char a4,
unsigned __int16 n0xFF,
unsigned __int16 n0xFF_1,
unsigned int a7)
{
unsigned __int8 v8; // [esp+2h] [ebp-2h] BYREF
unsigned __int8 v9; // [esp+3h] [ebp-1h] BYREF
v9 = 0; /*0xffceb0f7*/
KtiFunc27D8(__return_address, a2, a3, a4, n0xFF, &v8); /*0xffceb10b*/
if ( n0xFF_1 ) /*0xffceb118*/
KtiFunc27D8(__return_address, a2, a3, a4, n0xFF_1, &v9); /*0xffceb12d*/
return IioFuncCEBF((int)__return_address, a2, a3, a4, v8, v9, a7); /*0xffceb156*/
}
// Function: IioEarlyInitialize @ 0xffceb15a (0xf2e bytes)
// Index: 1853/2560
unsigned __int8 __cdecl IioEarlyInitialize(_BYTE *__return_address)
{
unsigned __int8 n2; // al
int v2; // ebx
_BYTE *v3; // ecx
int v4; // eax
unsigned __int8 n4; // al
int v6; // edx
int SocketInfo; // eax
unsigned __int8 n6; // cl
unsigned __int8 *v9; // esi
_BYTE *v10; // ebp
int CpuCount; // ecx
unsigned __int8 v12; // al
int v13; // ebp
int v14; // esi
int CpuCount_2; // ecx
int v16; // eax
int v17; // esi
int v18; // ecx
unsigned int v19; // esi
unsigned __int16 v20; // bp
unsigned __int16 n0x3E8; // ax
_BYTE *v22; // edx
unsigned __int8 n4_1; // al
int v24; // ecx
int n4_3; // esi
int v26; // eax
unsigned __int8 n6_1; // cl
unsigned __int8 *v28; // ebp
int v29; // eax
int CpuCount_3; // ecx
unsigned __int8 v31; // al
__int16 v32; // bp
unsigned __int16 v33; // cx
int v34; // ebp
unsigned __int16 v35; // cx
unsigned __int16 v36; // cx
__int16 v37; // cx
unsigned __int16 v38; // cx
unsigned __int16 v39;... [31695 chars total]
// Function: IioInitPeiMain @ 0xffcec088 (0xe37 bytes)
// Index: 1854/2560
unsigned __int8 __cdecl IioInitPeiMain(_BYTE *__return_address)
{
unsigned __int8 n2; // al
int v2; // ebx
_BYTE *v3; // ecx
unsigned __int8 n4; // al
int v5; // edx
int SocketInfo; // eax
unsigned __int8 n6; // cl
int v8; // esi
_BYTE *v9; // ebp
int CpuCount; // eax
unsigned __int8 v11; // cl
int v12; // ebp
int v13; // esi
int v14; // eax
__int16 v15; // si
char v16; // al
int v17; // esi
int v18; // edx
int n1429000; // ecx
unsigned __int16 n1600; // ax
unsigned __int16 n0x3E8; // ax
_BYTE *v22; // edx
unsigned __int8 n4_1; // al
int v24; // ecx
int v25; // eax
unsigned __int8 n6_1; // cl
int v27; // ebp
unsigned __int8 *v28; // esi
int v29; // edx
unsigned __int8 v30; // al
int v31; // esi
__int16 v32; // bp
unsigned __int16 v33; // cx
int v34; // esi
int v35; // eax
unsigned __int16 v36; // cx
unsigned __int16 v37; // cx
unsigned __int16 v38; // cx
unsigned __int16 v39; // cx
unsigned __int16 v40; // ... [36152 chars total]
// Function: IioFuncCEBF @ 0xffcecebf (0xa7 bytes)
// Index: 1855/2560
unsigned int __cdecl IioFuncCEBF(
int a1,
unsigned __int8 a2,
unsigned __int8 a3,
unsigned __int8 a4,
unsigned __int16 a5,
unsigned __int16 a6,
unsigned int a7)
{
int CpuCount; // ebx
unsigned __int16 n1250; // di
unsigned __int16 n10; // ax
int v10; // esi
unsigned __int8 v11; // al
int v12; // edx
CpuCount = GetCpuCount(a1, a2, a3); /*0xffceced7*/
if ( *(_WORD *)(a1 + 257315) == 12 ) /*0xffcecee1*/
{
n1250 = 1250; /*0xffcecee5*/
n10 = 10; /*0xffceceea*/
}
else
{
v10 = 1379 * a4; /*0xffcecef3*/
n1250 = 0x2710u / *(unsigned __int8 *)(v10 + CpuCount + 132); /*0xffcecf08*/
v11 = *(_BYTE *)(v10 + CpuCount + 133); /*0xffcecf0b*/
if ( v11 ) /*0xffcecf14*/
n10 = 10 * (v11 >> 4) / (v11 & 0xF); /*0xffcecf27*/
else
n10 = 0; /*0xffcecf2c*/
}
if ( (a6 & 0x80u) == 0 ) /*0xffcecf39*/
v12 = a6 & 0x3F; /*0xffcecf46*/
else
v12 = a6 - 256; /*0xffcecf3e*/
return (a5 * n1250 + n10 * v12 + a7 - 1) / a7; /*0xffcecf53*/
}
// Function: IioPcieLinkInit @ 0xffcecf66 (0x50 bytes)
// Index: 1856/2560
int __cdecl IioPcieLinkInit(int a1)
{
int v1; // esi
v1 = a1; /*0xffcecf6a*/
if ( *(_BYTE *)(a1 + 257308) != 1 || !*(_DWORD *)(a1 + 246404) ) /*0xffcecf76*/
{
*(_BYTE *)(a1 + 246409) = 0; /*0xffcecf84*/
KtiFunc2D6B(v1, *(unsigned __int8 *)(v1 + 246425), (char *)&a1 + 3, 1); /*0xffcecf95*/
KtiFunc296B(v1, *(unsigned __int8 *)(v1 + 246425), (char *)&a1 + 3, 1); /*0xffcecfa9*/
}
return 0; /*0xffcecfb3*/
}
// Function: IioPciePortConfig @ 0xffcecfb6 (0x2da bytes)
// Index: 1857/2560
int __cdecl IioPciePortConfig(_BYTE *__return_address, int n4, int a3, int a4, int a5, int n5, __int16 a7)
{
unsigned __int16 n10; // di
int v9; // eax
int v10; // edi
unsigned __int8 v12[5]; // [esp+13h] [ebp-9h] BYREF
int v13; // [esp+18h] [ebp-4h]
v12[0] = 0; /*0xffcecfd7*/
IioFuncEB9(__return_address, n4, a3, a4, n5, a7, 0); /*0xffcecfeb*/
KtiFunc27D8(__return_address, n4, a3, a4, 0xCBu, v12); /*0xffcecffe*/
n10 = v12[0]; /*0xffced003*/
if ( v12[0] < 0xAu || v12[0] == 255 ) /*0xffced01b*/
n10 = 10; /*0xffced01d*/
*(_DWORD *)&v12[1] = (unsigned __int8)a3; /*0xffced039*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Waiting for NVDIMM to be ready\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4);
if ( IioFunc1135(__return_address, n4, a3, a4, n5, a7, 96, v12, 0xA5u, 0xA5u, n10) == 1 ) /*0xffced080*/
return 1; /*0xffced080*/
v9 = (unsigned __int16)IioFuncFAD(__return_address, n4, a3, a4, n5, a7, 24); /*0xffced0ae*/
v13 = v9; /*0xffced0b4*/
if ( !(_WORD)v9 ) /*0xffced0bb*/
return 1; /*0xffced0bb*/
v10 = *(_DWORD *)&v12[1]; /*0xffced0bd*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Save timeout=%d seconds\n",
(unsigned __int8)n4,
*(_DWORD *)&v12[1],
(unsigned __int8)a4,
(unsigned __int16)v9);
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Making sure there isn't a backup in progress\n",
(unsigned __int8)n4,
v10,
(unsigned __int8)a4);
v12[0] = 0; /*0xffced0ea*/
if ( IioFunc1135(__return_address, n4, a3, a4, n5, a7, 97, v12, 0xFFu, 0, v13) == 1 ) /*0xffced129*/
return 1; /*0xffced129*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Checking if there is a backup to restore from\n",
(unsigned __int8)n4,
v10,
(unsigned __int8)a4);
v12[0] = 0; /*0xffced143*/
if ( IioFunc10A9(__return_address, n4, a3, a4, n5, a7, 100, v12) == 1 ) /*0xffced177*/
return 1; /*0xffced177*/
if ( (v12[0] & 2) != 0 )
{
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Save Error. Status=0x%x\n",
(unsigned __int8)n4,
v10,
(unsigned __int8)a4,
v12[0]);
MemShmooMain(__return_address, n4, a3, a4, n5, a7); /*0xffced1b8*/
return 2049; /*0xffced1c2*/
}
if ( (v12[0] & 1) == 0 ) /*0xffced1c9*/
return 2; /*0xffced1ce*/
v12[0] = 0; /*0xffced1d7*/
if ( IioFunc10A9(__return_address, n4, a3, a4, n5, a7, 128, v12) == 1 ) /*0xffced20a*/
return 1; /*0xffced085*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: CSAVE_INFO=0x%x\n",
(unsigned __int8)n4,
v10,
(unsigned __int8)a4,
v12[0]);
if ( (v12[0] & 1) != 0 ) /*0xffced22f*/
return 3; /*0xffced233*/
MemShmooMain(__return_address, n4, a3, a4, n5, a7); /*0xffced252*/
v12[0] = 4; /*0xffced25a*/
IioFunc14CD(__return_address, n4, n5, a7, 64, v12); /*0xffced27b*/
return 513; /*0xffced288*/
}
// Function: IioFuncD290 @ 0xffced290 (0x149 bytes)
// Index: 1858/2560
int __cdecl IioFuncD290(_BYTE *__return_address, int n4, int a3, int a4, int a5, int n4a, __int16 a7)
{
int result; // eax
unsigned __int8 n8; // [esp+13h] [ebp-1h] BYREF
n8 = 0; /*0xffced2b7*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Making sure NVDIMM is idle\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4);
result = IioFunc1135(__return_address, n4, a3, a4, n4a, a7, 97, &n8, 0xFFu, 0, 0xAu); /*0xffced2f4*/
if ( result != 1 )
{
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Clearing Restore Status\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4);
n8 = 8; /*0xffced316*/
IioFunc14CD(__return_address, n4, n4a, a7, 64, &n8); /*0xffced33a*/
LogDebugString( /*0xffced348*/
__return_address,
(int)"N%d.C%d.D%d:Starting Restore\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4);
n8 = 4; /*0xffced350*/
IioFunc14CD(__return_address, n4, n4a, a7, 67, &n8); /*0xffced374*/
n8 = 0; /*0xffced37c*/
IioFunc1135(__return_address, n4, a3, a4, n4a, a7, 97, &n8, 0xFFu, 9u, 0xAu); /*0xffced3b1*/
if ( (n8 & 8) == 0 ) /*0xffced3be*/
LogDebugString( /*0xffced3c9*/
__return_address,
(int)"N%d.C%d.D%d:RESTORE in progress bit NOT set after 10s\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4);
return 0; /*0xffced3d1*/
}
return result; /*0xffced3d3*/
}
// Function: IioPcieDmiInit @ 0xffced3d9 (0x212 bytes)
// Index: 1859/2560
int __cdecl IioPcieDmiInit(_BYTE *__return_address, int n4, int a3, int a4, int a5, int n5, __int16 a7)
{
unsigned __int8 v7; // bl
unsigned __int8 v8; // bh
int v9; // eax
unsigned __int8 v11; // [esp+13h] [ebp-9h] BYREF
int n4_1; // [esp+14h] [ebp-8h]
int v13; // [esp+18h] [ebp-4h]
v11 = 0; /*0xffced3f3*/
if ( IioFunc10A9(__return_address, n4, a3, a4, n5, a7, 21, &v11) == 1 ) /*0xffced41b*/
return 1; /*0xffced41b*/
v7 = (v11 >> 2) & 3; /*0xffced43d*/
n4_1 = (unsigned __int8)n4; /*0xffced44d*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: NVDIMM allows for %d retries\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4,
v7);
v8 = 0; /*0xffced459*/
if ( !v7 )
{
LABEL_10:
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Restore Failed after %d attempts\n",
n4_1,
(unsigned __int8)a3,
(unsigned __int8)a4,
v8);
MemShmooMain(__return_address, n4, a3, a4, n5, a7); /*0xffced5d4*/
return 1; /*0xffced5e6*/
}
while ( 1 )
{
if ( v8 ) /*0xffced465*/
IioFuncD290(__return_address, n4, a3, a4, a5, n5, a7); /*0xffced48b*/
v9 = (unsigned __int16)IioFuncFAD(__return_address, n4, a3, a4, n5, a7, 28); /*0xffced4ba*/
v13 = v9; /*0xffced4c0*/
if ( (_WORD)v9 )
{
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Restore timeout=%d\n",
n4_1,
(unsigned __int8)a3,
(unsigned __int8)a4,
(unsigned __int16)v9);
LogDebugString( /*0xffced4ee*/
__return_address,
(int)"N%d.C%d.D%d:Waiting for Restore to Complete\n",
n4_1,
(unsigned __int8)a3,
(unsigned __int8)a4);
v11 = 0; /*0xffced4f6*/
if ( IioFunc1135(__return_address, n4, a3, a4, n5, a7, 97, &v11, 0xFFu, 0, v13) != 1 )
{
v11 = 0; /*0xffced53e*/
if ( IioFunc10A9(__return_address, n4, a3, a4, n5, a7, 102, &v11) != 1 )
{
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Restore Status=0x%x\n",
n4_1,
(unsigned __int8)a3,
(unsigned __int8)a4,
v11);
if ( (v11 & 1) != 0 ) /*0xffced592*/
return 0; /*0xffced5df*/
}
}
}
if ( ++v8 >= v7 ) /*0xffced598*/
goto LABEL_10; /*0xffced598*/
}
}
// Function: IioPcieHotPlugInit @ 0xffced5eb (0x681 bytes)
// Index: 1860/2560
BOOL __cdecl IioPcieHotPlugInit(_BYTE *__return_address, int n4, int a3, int a4, int a5, int n5, __int16 a7)
{
int v8; // esi
int v9; // eax
int n4_2; // esi
int v11; // eax
unsigned __int8 n16; // [esp+13h] [ebp-9h] BYREF
int n4_1; // [esp+14h] [ebp-8h]
int v14; // [esp+18h] [ebp-4h]
n16 = 0; /*0xffced614*/
n4_1 = (unsigned __int8)n4; /*0xffced619*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Making sure NVDIMM is idle\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4);
if ( IioFunc1135(__return_address, n4, a3, a4, n5, a7, 97, &n16, 0xFFu, 0, 0xAu) == 1 ) /*0xffced660*/
return 1; /*0xffced660*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Setting Energy Policy to Device Managed\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4);
IioFuncEB9(__return_address, n4, a3, a4, n5, a7, 0); /*0xffced69d*/
n16 = 1; /*0xffced6a5*/
IioFunc14CD(__return_address, n4, n5, a7, 73, &n16); /*0xffced6c9*/
n16 = 0; /*0xffced6d1*/
IioFunc1135(__return_address, n4, a3, a4, n5, a7, 97, &n16, 0xFFu, 0, 0xAu); /*0xffced706*/
IioFunc10A9(__return_address, n4, a3, a4, n5, a7, 112, &n16); /*0xffced735*/
IioFunc1135(__return_address, n4, a3, a4, n5, a7, 112, &n16, 4u, 4u, 0xAu); /*0xffced76a*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: SET_ES_POLICY_STATUS=0x%x\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4,
n16);
IioFuncEB9(__return_address, n4, a3, a4, n5, a7, 1u); /*0xffced7a8*/
v8 = (unsigned __int16)IioFuncFAD(__return_address, n4, a3, a4, n5, a7, 16); /*0xffced7d7*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Charge timeout=0x%x\n",
n4_1,
(unsigned __int8)a3,
(unsigned __int8)a4,
v8);
IioFuncEB9(__return_address, n4, a3, a4, n5, a7, 0); /*0xffced811*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Waiting for the ES to charge\n",
n4_1,
(unsigned __int8)a3,
(unsigned __int8)a4);
IioFunc1135(__return_address, n4, a3, a4, n5, a7, 162, &n16, 1u, 0, v8); /*0xffced859*/
v9 = (unsigned __int16)IioFuncFAD(__return_address, n4, a3, a4, n5, a7, 30); /*0xffced888*/
v14 = v9; /*0xffced88e*/
if ( !(_WORD)v9 ) /*0xffced895*/
return 1; /*0xffced895*/
n4_2 = n4_1; /*0xffced89b*/
LogDebugString( /*0xffced8ac*/
__return_address,
(int)"N%d.C%d.D%d:Erase timeout=0x%x\n",
n4_1,
(unsigned __int8)a3,
(unsigned __int8)a4,
(unsigned __int16)v9);
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Clearing Erase Status\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4);
n16 = 16; /*0xffced8c2*/
IioFunc14CD(__return_address, n4, n5, a7, 64, &n16); /*0xffced8e6*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Starting Erase Command\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4);
n16 = 8; /*0xffced8fc*/
IioFunc14CD(__return_address, n4, n5, a7, 67, &n16); /*0xffced920*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Waiting for Erase to Start\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4);
IioFunc1135(__return_address, n4, a3, a4, n5, a7, 97, &n16, 0x10u, 0x10u, 1u); /*0xffced963*/
LogDebugString( /*0xffced971*/
__return_address,
(int)"N%d.C%d.D%d:Waiting for Erase to Finish\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4);
if ( IioFunc1135(__return_address, n4, a3, a4, n5, a7, 97, &n16, 0xFFu, 0, v14) == 1 ) /*0xffced9b6*/
return 1; /*0xffced9b6*/
LogDebugString( /*0xffced9c5*/
__return_address,
(int)"N%d.C%d.D%d:Checking Erase status\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4);
IioFunc10A9(__return_address, n4, a3, a4, n5, a7, 104, &n16); /*0xffced9f4*/
LogDebugString( /*0xffceda08*/
__return_address,
(int)"N%d.C%d.D%d:ERASE_STATUS0=0x%x\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4,
n16);
if ( (n16 & 1) == 0 ) /*0xffceda15*/
return 1; /*0xffceda15*/
v11 = (unsigned __int16)IioFuncFAD(__return_address, n4, a3, a4, n5, a7, 32); /*0xffceda42*/
v14 = v11; /*0xffceda48*/
if ( !(_WORD)v11 ) /*0xffceda4f*/
return 1; /*0xffceda4f*/
LogDebugString( /*0xffceda62*/
__return_address,
(int)"N%d.C%d.D%d:Arm timeout=0x%x\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4,
(unsigned __int16)v11);
LogDebugString( /*0xffceda70*/
__return_address,
(int)"N%d.C%d.D%d:Clearing Arm status\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4);
n16 = 32; /*0xffceda78*/
IioFunc14CD(__return_address, n4, n5, a7, 64, &n16); /*0xffceda9c*/
LogDebugString( /*0xffcedaaa*/
__return_address,
(int)"N%d.C%d.D%d:Starting Arm operation\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4);
n16 = 1; /*0xffcedab2*/
IioFunc14CD(__return_address, n4, n5, a7, 69, &n16); /*0xffcedad6*/
LogDebugString( /*0xffcedae4*/
__return_address,
(int)"N%d.C%d.D%d:Waiting for Arm to complete\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4);
if ( IioFunc1135(__return_address, n4, a3, a4, n5, a7, 97, &n16, 0xFFu, 0, v14) == 1 ) /*0xffcedb29*/
return 1; /*0xffced664*/
IioFunc10A9(__return_address, n4, a3, a4, n5, a7, 160, &n16); /*0xffcedb59*/
LogDebugString( /*0xffcedb6d*/
__return_address,
(int)"N%d.C%d.D%d:MODULE_HEALTH=0x%x\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4,
n16);
IioFunc10A9(__return_address, n4, a3, a4, n5, a7, 161, &n16); /*0xffcedb9f*/
LogDebugString( /*0xffcedbb3*/
__return_address,
(int)"N%d.C%d.D%d:MODULE_HEALTH_STATUS0=0x%x\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4,
n16);
IioFunc10A9(__return_address, n4, a3, a4, n5, a7, 162, &n16); /*0xffcedbe5*/
LogDebugString( /*0xffcedbf9*/
__return_address,
(int)"N%d.C%d.D%d:MODULE_vHEALTH_STATUS1=0x%x\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4,
n16);
LogDebugString( /*0xffcedc07*/
__return_address,
(int)"N%d.C%d.D%d:Checking Arm status\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4);
IioFunc1135(__return_address, n4, a3, a4, n5, a7, 106, &n16, 5u, 5u, 0x1Eu); /*0xffcedc3c*/
LogDebugString( /*0xffcedc50*/
__return_address,
(int)"N%d.C%d.D%d:ARM_STATUS0=0x%x\n",
n4_2,
(unsigned __int8)a3,
(unsigned __int8)a4,
n16);
return (n16 & 1) == 0; /*0xffcedc64*/
}
// Function: IioVtdInit @ 0xffcedc6c (0x125 bytes)
// Index: 1861/2560
int __cdecl IioVtdInit(_BYTE *__return_address, int a2, int a3, int a4, int a5, int n5, __int16 a7)
{
unsigned __int8 n3; // [esp+7h] [ebp-1h] BYREF
if ( IioFunc1135(__return_address, a2, a3, a4, n5, a7, 9, &n3, 8u, 8u, 6u) == 1 ) /*0xffcedca6*/
return 1; /*0xffcedca6*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcedcb3*/
LogDebugString(__return_address, (int)" Making sure there aren't any operations in progress\n"); /*0xffcedcc4*/
IioFunc1135(__return_address, a2, a3, a4, n5, a7, 8, &n3, 7u, 0, 0x12Cu); /*0xffcedcf5*/
KtiFunc8C4((int)__return_address, 0xF4240u); /*0xffcedd00*/
if ( IioFunc10A9(__return_address, a2, a3, a4, n5, a7, 32, &n3) == 1 /*0xffcedd70*/
|| (n3 & 0x80u) != 0
|| IioFunc10A9(__return_address, a2, a3, a4, n5, a7, 12, &n3) == 1 )
{
return 1; /*0xffcedd70*/
}
if ( n3 <= 1u ) /*0xffcedd7b*/
return 2; /*0xffcedd89*/
if ( n3 != 3 ) /*0xffcedd7f*/
return 1; /*0xffcedcab*/
return 3; /*0xffcedd8c*/
}
// Function: IioDfxInit @ 0xffcedd91 (0x33 bytes)
// Index: 1862/2560
int __cdecl IioDfxInit(
_BYTE *__return_address,
unsigned __int8 a2,
int a3,
int a4,
int a5,
int n4,
unsigned __int16 a7)
{
unsigned __int8 v8; // [esp+3h] [ebp-1h] BYREF
v8 = 1; /*0xffcedd98*/
IioFunc14CD(__return_address, a2, n4, a7, 4, &v8); /*0xffceddb6*/
return 0; /*0xffceddc0*/
}
// Function: IioCbInit @ 0xffceddc4 (0x130 bytes)
// Index: 1863/2560
int __cdecl IioCbInit(_BYTE *__return_address, int a2, int a3, int a4, int a5, int n4, __int16 a7)
{
char n32; // bl
int n32_1; // edi
int v10; // [esp+Fh] [ebp-5h]
unsigned __int8 v11; // [esp+13h] [ebp-1h] BYREF
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, 16, &v11, 0xFFu, 8u, 0x12Cu) == 1 /*0xffcede43*/
|| IioFunc1135(__return_address, a2, a3, a4, n4, a7, 8, &v11, 2u, 0, 0x3Cu) == 1 )
{
return 1; /*0xffcede0b*/
}
if ( (v11 & 0x80u) != 0 ) /*0xffcede49*/
{
if ( ProcCommonFuncFB4A((int)__return_address, 3u) ) /*0xffcede52*/
LogDebugString(__return_address, (int)"Error during restore\n"); /*0xffcede63*/
n32 = 32; /*0xffcede6c*/
LOBYTE(v10) = 32; /*0xffcede6d*/
n32_1 = 32; /*0xffcede70*/
do /*0xffcedee9*/
{
IioFunc10A9(__return_address, a2, a3, a4, n4, a7, v10, &v11); /*0xffcede94*/
if ( ProcCommonFuncFB4A((int)__return_address, 3u) ) /*0xffcede9c*/
LogDebugString(__return_address, (int)"Error Reg 0x%x=0x%x\n", n32_1, v11); /*0xffcedeb4*/
IioFunc14CD(__return_address, a2, n4, a7, v10, &v11); /*0xffceded8*/
++n32; /*0xffcedee0*/
++n32_1; /*0xffcedee2*/
LOBYTE(v10) = n32; /*0xffcedee3*/
}
while ( (unsigned __int8)n32 < 0x28u ); /*0xffcedee9*/
}
return 0; /*0xffcedeed*/
}
// Function: IioM2MemInit @ 0xffcedef4 (0x19d bytes)
// Index: 1864/2560
int __cdecl IioM2MemInit(_BYTE *__return_address, int a2, int a3, int a4, int a5, int n4, __int16 a7)
{
unsigned __int8 n5; // [esp+Bh] [ebp-1h] BYREF
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcedf00*/
LogDebugString(__return_address, (int)" Waiting for NVDIMM to charge\n"); /*0xffcedf11*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, 8, &n5, 0x10u, 0x10u, 0x258u) == 1 ) /*0xffcedf4e*/
return 1; /*0xffcedf4e*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcedf5b*/
LogDebugString(__return_address, (int)" Erasing\n"); /*0xffcedf6c*/
n5 = 5; /*0xffcedf76*/
IioFunc14CD(__return_address, a2, n4, a7, 4, &n5); /*0xffcedf90*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, 8, &n5, 4u, 0, 0x3Cu) == 1 ) /*0xffcedfc8*/
return 1; /*0xffcedfc8*/
n5 = 67; /*0xffcedfcd*/
IioFunc14CD(__return_address, a2, n4, a7, 4, &n5); /*0xffcedfe7*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcedfef*/
LogDebugString(__return_address, (int)" Making sure NVDIMM is armed\n"); /*0xffcee001*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, 9, &n5, 6u, 6u, 0x3Cu) == 1 ) /*0xffcee038*/
{
IioFunc10A9(__return_address, a2, a3, a4, n4, a7, 12, &n5); /*0xffcee059*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcee061*/
LogDebugString(__return_address, (int)"NV STATUS Register = 0x%x\n", n5); /*0xffcee07c*/
return 1; /*0xffcedf53*/
}
return 0; /*0xffcee08b*/
}
// Function: IioPcieNtbConfig @ 0xffcee091 (0x11f bytes)
// Index: 1865/2560
unsigned int __cdecl IioPcieNtbConfig(_BYTE *a1, int a2, int a3, int a4, int a5, int a6, __int16 a7)
{
__int16 v8; // ecx^2
int v9; // [esp-Ch] [ebp-18h]
unsigned __int8 v10; // [esp+Bh] [ebp-1h] BYREF
if ( (unsigned __int8)ProcCommonFuncFB4A(a1, 2) ) /*0xffcee09b*/
LogDebugString(a1, (int)"Wait for NVDIMM Enabled\n"); /*0xffcee0ac*/
if ( IioFunc1135(a1, a2, a3, a4, a6, a7, 9, &v10, 255, 165, 6) == 1 ) /*0xffcee0f2*/
return 1; /*0xffcee0f2*/
if ( (unsigned __int8)ProcCommonFuncFB4A(a1, 2) ) /*0xffcee0ff*/
LogDebugString(a1, (int)"Making sure there isn't a Restore in Progress\n"); /*0xffcee110*/
if ( IioFunc1135(a1, a2, a3, a4, a6, a7, 10, &v10, 255, 0, 120) == 1 ) /*0xffcee14e*/
return 1; /*0xffcee0f6*/
HIWORD(v9) = v8; /*0xffcee15b*/
LOWORD(v9) = a7; /*0xffcee173*/
IioFunc10A9(a1, a2, a3, a4, a6, v9, 20, &v10); /*0xffcee177*/
if ( (unsigned __int8)ProcCommonFuncFB4A(a1, 2) ) /*0xffcee17f*/
LogDebugString(a1, (int)"Backup Status Register = 0x%x\n", v10); /*0xffcee197*/
return (v10 & 2 | 4u) >> 1; /*0xffcee1ac*/
}
// Function: IioPcieEarlyInit @ 0xffcee1b0 (0x33 bytes)
// Index: 1866/2560
int __cdecl IioPcieEarlyInit(
_BYTE *__return_address,
unsigned __int8 a2,
int a3,
int a4,
int a5,
int n4,
unsigned __int16 a7)
{
unsigned __int8 v8; // [esp+3h] [ebp-1h] BYREF
v8 = -106; /*0xffcee1b7*/
IioFunc14CD(__return_address, a2, n4, a7, 11, &v8); /*0xffcee1d5*/
return 0; /*0xffcee1df*/
}
// Function: IioPcieLateInit @ 0xffcee1e3 (0xb0 bytes)
// Index: 1867/2560
int __cdecl IioPcieLateInit(_BYTE *a1, int a2, int a3, int a4, int a5, int a6, __int16 a7)
{
__int16 v7; // ecx^2
int v9; // [esp-Ch] [ebp-14h]
unsigned __int8 v10; // [esp+7h] [ebp-1h] BYREF
if ( IioFunc1135(a1, a2, a3, a4, a6, a7, 11, &v10, 255, 0, 300) == 1 ) /*0xffcee223*/
return 1; /*0xffcee223*/
HIWORD(v9) = v7; /*0xffcee233*/
LOWORD(v9) = a7; /*0xffcee247*/
IioFunc10A9(a1, a2, a3, a4, a6, v9, 21, &v10); /*0xffcee24b*/
if ( (v10 & 1) == 0 ) /*0xffcee257*/
{
if ( (unsigned __int8)ProcCommonFuncFB4A(a1, 3) ) /*0xffcee25c*/
{
LogDebugString(a1, (int)"Restore Status Register = 0x%x\n", v10); /*0xffcee272*/
LogDebugString(a1, (int)"Restore FAILED\n", v10); /*0xffcee282*/
}
return 1; /*0xffcee228*/
}
return 0; /*0xffcee28e*/
}
// Function: IioPcieErrorInit @ 0xffcee293 (0x16a bytes)
// Index: 1868/2560
int __cdecl IioPcieErrorInit(_BYTE *__return_address, int a2, int a3, int a4, int a5, int n4, __int16 a7)
{
unsigned __int8 n55; // [esp+Bh] [ebp-1h] BYREF
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcee29f*/
LogDebugString(__return_address, (int)"Waiting for Cap to Charge\n"); /*0xffcee2b0*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, 18, &n55, 7u, 7u, 0x258u) == 1 ) /*0xffcee2ed*/
return 1; /*0xffcee2ed*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcee2fa*/
LogDebugString(__return_address, (int)"Erasing the NVDIMM\n"); /*0xffcee30b*/
n55 = 55; /*0xffcee315*/
IioFunc14CD(__return_address, a2, n4, a7, 12, &n55); /*0xffcee32f*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, 18, &n55, 0x7Fu, 0x7Fu, 0x3Cu) == 1 ) /*0xffcee367*/
return 1; /*0xffcee2f1*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcee36c*/
LogDebugString(__return_address, (int)"GTG1=0x%x,", n55); /*0xffcee382*/
IioFunc10A9(__return_address, a2, a3, a4, n4, a7, 19, &n55); /*0xffcee3a9*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcee3b1*/
LogDebugString(__return_address, (int)" GTG2=0x%x\n", n55); /*0xffcee3c8*/
n55 = 24; /*0xffcee3d3*/
IioFunc14CD(__return_address, a2, n4, a7, 8, &n55); /*0xffcee3ed*/
return 0; /*0xffcee3f7*/
}
// Function: IioPciePowerMgmt @ 0xffcee3fd (0x2d9 bytes)
// Index: 1869/2560
int __cdecl IioPciePowerMgmt(_BYTE *__return_address, int a2, int a3, int a4, int a5, int n4, __int16 a7)
{
int v8; // eax
_BYTE *__return_address_1; // [esp-8h] [ebp-1Ch]
unsigned __int8 v10; // [esp+13h] [ebp-1h] BYREF
v10 = -64; /*0xffcee419*/
IioFunc14CD(__return_address, a2, n4, a7, 1, &v10); /*0xffcee42b*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, a5, &v10, 3u, 0, 0x78u) ) /*0xffcee461*/
{
__return_address_1 = __return_address; /*0xffcee46f*/
LABEL_3:
if ( ProcCommonFuncFB4A((int)__return_address_1, 3u) ) /*0xffcee470*/
LogDebugString(__return_address, (int)"FAILED to read Status register1\n"); /*0xffcee481*/
return 1; /*0xffcee48b*/
}
v10 = -113; /*0xffcee494*/
IioFunc14CD(__return_address, a2, n4, a7, 5, &v10); /*0xffcee4b1*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcee4b9*/
LogDebugString(__return_address, (int)"Starting 7s Delay\n"); /*0xffcee4cb*/
KtiFunc8C4((int)__return_address, 0xF4240u); /*0xffcee4d8*/
KtiFunc8C4((int)__return_address, 0xF4240u); /*0xffcee4e3*/
KtiFunc8C4((int)__return_address, 0xF4240u); /*0xffcee4ee*/
KtiFunc8C4((int)__return_address, 0xF4240u); /*0xffcee4f9*/
KtiFunc8C4((int)__return_address, 0xF4240u); /*0xffcee504*/
KtiFunc8C4((int)__return_address, 0xF4240u); /*0xffcee50f*/
KtiFunc8C4((int)__return_address, 0xF4240u); /*0xffcee51a*/
v8 = IioFunc10A9(__return_address, a2, a3, a4, n4, a7, a5, &v10); /*0xffcee542*/
__return_address_1 = __return_address; /*0xffcee54c*/
if ( v8 ) /*0xffcee54f*/
goto LABEL_3; /*0xffcee54f*/
if ( ProcCommonFuncFB4A((int)__return_address, 3u) ) /*0xffcee555*/
LogDebugString(__return_address, (int)"Status Register = 0x%x\n", v10); /*0xffcee56c*/
if ( (v10 & 4) != 0 ) /*0xffcee579*/
{
IioFunc1135(__return_address, a2, a3, a4, n4, a7, 12, &v10, 1u, 1u, 0x78u); /*0xffcee59f*/
return 3; /*0xffcee5a9*/
}
else
{
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcee5b2*/
LogDebugString(__return_address, (int)"Switching control to FPGA\n"); /*0xffcee5c3*/
v10 = 0x80; /*0xffcee5ce*/
IioFunc14CD(__return_address, a2, n4, a7, 5, &v10); /*0xffcee5eb*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcee5f3*/
LogDebugString(__return_address, (int)"Waiting for DDR Init Bit to go high\n"); /*0xffcee605*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, 12, &v10, 2u, 2u, 0x1Eu) ) /*0xffcee630*/
return 1; /*0xffcee63a*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcee643*/
LogDebugString(__return_address, (int)"Switching Control back to host\n"); /*0xffcee654*/
v10 = -120; /*0xffcee65f*/
IioFunc14CD(__return_address, a2, n4, a7, 5, &v10); /*0xffcee67c*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcee684*/
LogDebugString(__return_address, (int)"Checking for Host Control\n"); /*0xffcee696*/
return 2 - (IioFunc1135(__return_address, a2, a3, a4, n4, a7, 12, &v10, 1u, 1u, 0x78u) != 0); /*0xffcee6cd*/
}
}
// Function: IioPcieInit @ 0xffcee6d6 (0x17e bytes)
// Index: 1870/2560
int __cdecl IioPcieInit(_BYTE *__return_address, int a2, int a3, int a4, int a5, int n4, __int16 a7)
{
unsigned __int8 v8; // [esp+Bh] [ebp-1h] BYREF
v8 = 0x80; /*0xffcee6ef*/
IioFunc14CD(__return_address, a2, n4, a7, 5, &v8); /*0xffcee6ff*/
KtiFunc8C4((int)__return_address, 0x1388u); /*0xffcee70a*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, 12, &v8, 2u, 2u, 0x1Eu) ) /*0xffcee737*/
return 1; /*0xffcee737*/
KtiFunc8C4((int)__return_address, 0x1388u); /*0xffcee751*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, a5, &v8, 3u, 0, 0x1Eu) ) /*0xffcee77e*/
return 1; /*0xffcee77e*/
KtiFunc8C4((int)__return_address, 0x1388u); /*0xffcee790*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, 6, &v8, 0x10u, 0x10u, 0x1Eu) ) /*0xffcee7bc*/
return 1; /*0xffcee7bc*/
KtiFunc8C4((int)__return_address, 0x1388u); /*0xffcee7d2*/
v8 = -126; /*0xffcee7dc*/
IioFunc14CD(__return_address, a2, n4, a7, 5, &v8); /*0xffcee7f6*/
KtiFunc8C4((int)__return_address, 0x1388u); /*0xffcee801*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, a5, &v8, 3u, 3u, 0x1Eu) ) /*0xffcee82f*/
return 1; /*0xffcee745*/
KtiFunc8C4((int)__return_address, 0x1388u); /*0xffcee845*/
return 0; /*0xffcee84e*/
}
// Function: IioFuncE854 @ 0xffcee854 (0xcb bytes)
// Index: 1871/2560
int __cdecl IioFuncE854(_BYTE *a1, int a2, int a3, int a4, int a5, int a6, __int16 a7)
{
int v7; // edi
__int16 v8; // ecx^2
int v10; // [esp-Ch] [ebp-18h]
char v11; // [esp+Bh] [ebp-1h] BYREF
v7 = IioFunc1135(a1, a2, a3, a4, a6, a7, a5, &v11, 8, 8, 300); /*0xffcee893*/
KtiFunc8C4((int)a1, 0x1388u); /*0xffcee895*/
v11 = -120; /*0xffcee89d*/
HIWORD(v10) = v8; /*0xffcee8aa*/
LOWORD(v10) = a7; /*0xffcee8b8*/
IioFunc14CD(a1, a2, a6, v10, 5, &v11); /*0xffcee8bc*/
if ( !IioFunc1135(a1, a2, a3, a4, a6, a7, 12, &v11, 1, 1, 30) ) /*0xffcee8eb*/
return v7; /*0xffcee917*/
if ( ProcCommonFuncFB4A((int)a1, 3u) ) /*0xffcee8fa*/
LogDebugString(a1, (int)"Couldn't switch back control to host\n"); /*0xffcee90b*/
return 1; /*0xffcee919*/
}
// Function: IioFuncE91F @ 0xffcee91f (0x16b bytes)
// Index: 1872/2560
int __cdecl IioFuncE91F(_BYTE *__return_address, int a2, int a3, int a4, int a5, int n4, __int16 a7)
{
int v7; // edi
unsigned __int8 n64; // [esp+Bh] [ebp-1h] BYREF
if ( ProcCommonFuncFB4A((int)__return_address, 3u) ) /*0xffcee92b*/
LogDebugString(__return_address, (int)"Waiting for Cap to charge\n"); /*0xffcee93c*/
IioFunc1135(__return_address, a2, a3, a4, n4, a7, a5, &n64, 0x20u, 0x20u, 0x258u); /*0xffcee96f*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcee977*/
LogDebugString(__return_address, (int)"Clearing SDV\n"); /*0xffcee989*/
n64 = 64; /*0xffcee993*/
IioFunc14CD(__return_address, a2, n4, a7, 5, &n64); /*0xffcee9ad*/
if ( ProcCommonFuncFB4A((int)__return_address, 3u) ) /*0xffcee9b5*/
LogDebugString(__return_address, (int)"Making sure SAVE pin is only save trigger\n"); /*0xffcee9c7*/
n64 = 0; /*0xffcee9d1*/
IioFunc14CD(__return_address, a2, n4, a7, 1, &n64); /*0xffcee9eb*/
IioFunc10A9(__return_address, a2, a3, a4, n4, a7, a5, &n64); /*0xffceea13*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffceea1b*/
LogDebugString(__return_address, (int)"Status Register0 = 0x%x\n", n64); /*0xffceea32*/
v7 = IioFunc10A9(__return_address, a2, a3, a4, n4, a7, 12, &n64); /*0xffceea61*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffceea63*/
LogDebugString(__return_address, (int)"Status Register1 = 0x%x\n", n64); /*0xffceea7a*/
return v7; /*0xffceea84*/
}
// Function: IioFuncEA8A @ 0xffceea8a (0x25c bytes)
// Index: 1873/2560
unsigned int __cdecl IioFuncEA8A(_BYTE *a1, int a2, int a3, int a4, int a5, int a6, __int16 a7)
{
__int16 v8; // ecx^2
__int16 v9; // ecx^2
__int16 v10; // ecx^2
__int16 v11; // ecx^2
__int16 v12; // ecx^2
__int16 v13; // ecx^2
int v14; // edi
int v15; // [esp-Ch] [ebp-20h]
int v16; // [esp-Ch] [ebp-20h]
int v17; // [esp-Ch] [ebp-20h]
int v18; // [esp-Ch] [ebp-20h]
int v19; // [esp-Ch] [ebp-20h]
int v20; // [esp-Ch] [ebp-20h]
unsigned __int8 v21; // [esp+13h] [ebp-1h] BYREF
IioFunc1135(a1, a2, a3, a4, a6, a7, 15, &v21, 128, 128, 10); /*0xffceeac6*/
if ( IioFunc12C6(a1, a2, a3, a4, a6, a7) == 1 ) /*0xffceeaee*/
return 1; /*0xffceeaee*/
if ( ProcCommonFuncFB4A((int)a1, 2u) ) /*0xffceeafb*/
LogDebugString(a1, (int)" Making sure there isn't a Restore in Progress\n"); /*0xffceeb0c*/
if ( IioFunc1135(a1, a2, a3, a4, a6, a7, 8, &v21, 2, 0, 240) == 1 ) /*0xffceeb45*/
return 1; /*0xffceeb45*/
HIWORD(v15) = v8; /*0xffceeb52*/
LOWORD(v15) = a7; /*0xffceeb61*/
IioFunc10A9(a1, a2, a3, a4, a6, v15, 10, &v21); /*0xffceeb65*/
if ( ProcCommonFuncFB4A((int)a1, 2u) ) /*0xffceeb6d*/
LogDebugString(a1, (int)" Status/Event #1(0xA)=0x%x\n", v21); /*0xffceeb85*/
HIWORD(v16) = v9; /*0xffceeb98*/
LOWORD(v16) = a7; /*0xffceeba5*/
IioFunc14CD(a1, a2, a6, v16, 10, &v21); /*0xffceeba9*/
HIWORD(v17) = v10; /*0xffceebbc*/
LOWORD(v17) = a7; /*0xffceebcb*/
IioFunc10A9(a1, a2, a3, a4, a6, v17, 11, &v21); /*0xffceebcf*/
if ( ProcCommonFuncFB4A((int)a1, 2u) ) /*0xffceebd7*/
LogDebugString(a1, (int)" Status/Event #2(0xB)=0x%x\n", v21); /*0xffceebef*/
HIWORD(v18) = v11; /*0xffceec02*/
LOWORD(v18) = a7; /*0xffceec0f*/
IioFunc14CD(a1, a2, a6, v18, 11, &v21); /*0xffceec13*/
HIWORD(v19) = v12; /*0xffceec26*/
LOWORD(v19) = a7; /*0xffceec35*/
IioFunc10A9(a1, a2, a3, a4, a6, v19, 14, &v21); /*0xffceec39*/
if ( ProcCommonFuncFB4A((int)a1, 2u) ) /*0xffceec41*/
LogDebugString(a1, (int)" State Information #1(0xE)=0x%x\n", v21); /*0xffceec59*/
HIWORD(v20) = v13; /*0xffceec6c*/
LOWORD(v20) = a7; /*0xffceec7b*/
v14 = IioFunc10A9(a1, a2, a3, a4, a6, v20, 15, &v21); /*0xffceec87*/
if ( ProcCommonFuncFB4A((int)a1, 2u) ) /*0xffceec89*/
LogDebugString(a1, (int)" State Information #2(0xF)=0x%x\n", v21); /*0xffceeca1*/
if ( v14 == 1 ) /*0xffceecac*/
{
if ( ProcCommonFuncFB4A((int)a1, 3u) ) /*0xffceecb1*/
LogDebugString(a1, (int)" FAILED to read State Information Register"); /*0xffceecc6*/
return 1; /*0xffceeaf3*/
}
return (v21 & 4 | 8u) >> 2; /*0xffceece0*/
}
// Function: IioFuncECE6 @ 0xffceece6 (0x33 bytes)
// Index: 1874/2560
int __cdecl IioFuncECE6(
_BYTE *__return_address,
unsigned __int8 a2,
int a3,
int a4,
int a5,
int n4,
unsigned __int16 a7)
{
unsigned __int8 n16; // [esp+3h] [ebp-1h] BYREF
n16 = 16; /*0xffceeced*/
IioFunc14CD(__return_address, a2, n4, a7, 8, &n16); /*0xffceed0b*/
return 0; /*0xffceed15*/
}
// Function: IioFuncED19 @ 0xffceed19 (0xd8 bytes)
// Index: 1875/2560
int __cdecl IioFuncED19(int a1, int a2, int a3, int a4, int a5, int a6, __int16 a7)
{
__int16 v8; // ecx^2
__int16 v9; // ecx^2
int v10; // [esp-Ch] [ebp-14h]
int v11; // [esp-Ch] [ebp-14h]
char v12; // [esp+7h] [ebp-1h] BYREF
if ( IioFunc1135(a1, a2, a3, a4, a6, a7, 8, &v12, 16, 0, 120) == 1 ) /*0xffceed54*/
return 1; /*0xffceed54*/
if ( IioFunc1135(a1, a2, a3, a4, a6, a7, 11, &v12, 1, 1, 10) == 1 ) /*0xffceed8e*/
return 1; /*0xffceed8e*/
HIWORD(v10) = v8; /*0xffceed99*/
LOWORD(v10) = a7; /*0xffceedaf*/
if ( IioFunc10A9(a1, a2, a3, a4, a6, v10, 11, &v12) == 1 || (v12 & 8) != 0 ) /*0xffceedc3*/
return 1; /*0xffceed56*/
HIWORD(v11) = v9; /*0xffceedce*/
LOWORD(v11) = a7; /*0xffceedde*/
IioFunc14CD(a1, a2, a6, v11, 11, &v12); /*0xffceede2*/
return 0; /*0xffceedec*/
}
// Function: IioFuncEDF1 @ 0xffceedf1 (0x1e7 bytes)
// Index: 1876/2560
BOOL __cdecl IioFuncEDF1(_BYTE *__return_address, int a2, int a3, int a4, int a5, int n4, __int16 a7)
{
unsigned __int8 n32; // [esp+13h] [ebp-1h] BYREF
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffceedfd*/
LogDebugString(__return_address, (int)" Waiting for the CAP to charge\n"); /*0xffceee0e*/
IioFunc1135(__return_address, a2, a3, a4, n4, a7, 15, &n32, 8u, 8u, 0xB4u); /*0xffceee48*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffceee50*/
LogDebugString(__return_address, (int)" Erasing Flash\n"); /*0xffceee62*/
n32 = 32; /*0xffceee6d*/
IioFunc14CD(__return_address, a2, n4, a7, 8, &n32); /*0xffceee8a*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, 8, &n32, 0x20u, 0, 0xAu) == 1 ) /*0xffceeec3*/
return 1; /*0xffceeec5*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a7, 11, &n32, 1u, 1u, 0xAu) == 1 ) /*0xffceeef9*/
return 1; /*0xffceeef9*/
IioFunc14CD(__return_address, a2, n4, a7, 11, &n32); /*0xffceef1f*/
if ( IioFunc10A9(__return_address, a2, a3, a4, n4, a7, 10, &n32) == 1 || (n32 & 2) != 0 ) /*0xffceef57*/
return 1; /*0xffceeefd*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffceef5c*/
LogDebugString(__return_address, (int)" Arming NVDIMM\n"); /*0xffceef6d*/
n32 = 1; /*0xffceef78*/
IioFunc14CD(__return_address, a2, n4, a7, 7, &n32); /*0xffceef95*/
return IioFunc1135(__return_address, a2, a3, a4, n4, a7, 14, &n32, 0x80u, 0x80u, 0xAu) == 1; /*0xffceefd2*/
}
// Function: IioFuncEFD8 @ 0xffceefd8 (0x217 bytes)
// Index: 1877/2560
int __cdecl IioFuncEFD8(int a1)
{
_BYTE *v1; // esi
unsigned __int8 n6; // bh
unsigned __int8 *v3; // edi
unsigned __int8 v4; // bl
int CpuCount; // ebp
int v6; // edi
int v8; // [esp-4h] [ebp-2Ch]
int v9; // [esp+10h] [ebp-18h]
int v10; // [esp+14h] [ebp-14h]
int v11; // [esp+18h] [ebp-10h]
int v12; // [esp+18h] [ebp-10h]
unsigned __int8 *v13; // [esp+1Ch] [ebp-Ch]
int v14; // [esp+20h] [ebp-8h] BYREF
int v15; // [esp+24h] [ebp-4h]
v1 = (_BYTE *)a1; /*0xffceefde*/
if ( *(_BYTE *)(a1 + 1024) && *(_BYTE *)(a1 + 263) == 2 ) /*0xffceeff7*/
{
LOBYTE(a1) = *(_BYTE *)(a1 + 9402); /*0xffcef012*/
DebugPrint((int)v1, 3, a1, 255, 255, 255, 255, 255, "PlatformArmNVDIMMs\n"); /*0xffcef01d*/
n6 = 0; /*0xffcef031*/
LOBYTE(v9) = 0; /*0xffcef036*/
v3 = &v1[48704 * (unsigned __int8)a1 + 258725]; /*0xffcef03a*/
v13 = v3; /*0xffcef03c*/
do /*0xffcef1df*/
{
if ( *(v3 - 3) ) /*0xffcef040*/
{
v4 = 0; /*0xffcef058*/
CpuCount = GetCpuCount((int)v1, a1, v9); /*0xffcef05d*/
LOBYTE(v10) = 0; /*0xffcef05f*/
if ( *v3 ) /*0xffcef063*/
{
do /*0xffcef1c6*/
{
v6 = 1379 * v4; /*0xffcef06e*/
if ( *(_BYTE *)(v6 + CpuCount) ) /*0xffcef074*/
{
v11 = *(_DWORD *)(v6 + CpuCount + 199); /*0xffcef085*/
if ( v11 ) /*0xffcef08b*/
{
LOWORD(v14) = 1; /*0xffcef094*/
LOWORD(v15) = v15 & 0xFFF; /*0xffcef09e*/
DdrTrainFunc466A((int)v1, a1, v9, v10, (int)&v14); /*0xffcef0b5*/
v12 = v11 << 6; /*0xffcef0c1*/
LOWORD(v15) = v15 & 0xFF0F | (16 * (byte_FFD5C4B2[v12] & 0xF)); /*0xffcef0e0*/
DebugPrint( /*0xffcef122*/
(int)v1,
3,
a1,
v9,
v10,
255,
255,
255,
"Calling %s arm with vendorIndex %d device type=0x%x, Strap addr=0x%x\n",
&byte_FFD5C4A0[v12],
(unsigned __int8)byte_FFD5C4B3[v12],
((unsigned __int16)v15 >> 4) & 0xF,
((unsigned __int16)v15 >> 1) & 7);
LOWORD(v8) = v15; /*0xffcef137*/
if ( (*(int (__cdecl **)(_BYTE *, int, _BYTE, _BYTE, _DWORD, int, int))((char *)&dword_FFD5C4C0 + v12))( /*0xffcef165*/
v1,
a1,
v9,
v10,
(unsigned __int8)byte_FFD5C4B3[v12],
v14,
v8) == 1 )
{
DebugPrint((int)v1, 3, a1, v9, v10, 255, 255, 255, " ERROR Arming NVDIMM\n"); /*0xffcef17e*/
*(_DWORD *)(v6 + CpuCount + 203) |= 0x400u; /*0xffcef186*/
}
else
{
DebugPrint((int)v1, 3, a1, v9, v10, 255, 255, 255, " NVDIMM armed\n"); /*0xffcef1aa*/
*(_DWORD *)(v6 + CpuCount + 203) |= 8u; /*0xffcef1b2*/
}
}
}
v3 = v13; /*0xffcef1ba*/
LOBYTE(v10) = ++v4; /*0xffcef1c0*/
}
while ( v4 < *v13 ); /*0xffcef1c6*/
}
}
++n6; /*0xffcef1cc*/
v3 += 7688; /*0xffcef1ce*/
LOBYTE(v9) = n6; /*0xffcef1d4*/
v13 = v3; /*0xffcef1d8*/
}
while ( n6 < 6u ); /*0xffcef1df*/
}
return 0; /*0xffcef1e5*/
}
// Function: IioFuncF1EF @ 0xffcef1ef (0x2ae bytes)
// Index: 1878/2560
int __cdecl IioFuncF1EF(_BYTE *__return_address, int n4, int a3, int a4)
{
int n204; // eax
__int16 n206; // bx
__int16 v6; // cx
__int16 *v7; // eax
int n64; // esi
unsigned __int8 v9; // al
_WORD v11[3]; // [esp+12h] [ebp-12h] BYREF
int v12; // [esp+18h] [ebp-Ch]
unsigned __int16 n0xFF[2]; // [esp+1Ch] [ebp-8h]
int n204_1; // [esp+20h] [ebp-4h]
v12 = 1; /*0xffcef211*/
KtiFunc27D8(__return_address, n4, a3, a4, 3u, (unsigned __int8 *)v11); /*0xffcef219*/
if ( (v11[0] & 0xF0) == 0x90 ) /*0xffcef229*/
{
n204 = 204; /*0xffcef22b*/
*(_DWORD *)n0xFF = 204; /*0xffcef230*/
while ( 1 ) /*0xffcef23f*/
{
n204_1 = n204 + 1; /*0xffcef23f*/
KtiFunc27D8(__return_address, n4, a3, a4, n204 + 1, (unsigned __int8 *)v11); /*0xffcef243*/
*(_DWORD *)&v11[1] = (unsigned __int16)(LOBYTE(v11[0]) << 8); /*0xffcef254*/
KtiFunc27D8(__return_address, n4, a3, a4, n0xFF[0], (unsigned __int8 *)v11); /*0xffcef265*/
v11[1] |= LOBYTE(v11[0]); /*0xffcef272*/
if ( (v11[1] & 0x3F) == 0x21 ) /*0xffcef27f*/
break; /*0xffcef27f*/
n204 = (unsigned __int16)n204_1; /*0xffcef28e*/
*(_DWORD *)n0xFF = (unsigned __int16)n204_1; /*0xffcef291*/
if ( (unsigned __int16)n204_1 >= 0xDCu ) /*0xffcef298*/
goto LABEL_5; /*0xffcef298*/
}
*(_WORD *)&__return_address[48704 * (unsigned __int8)n4 /*0xffcef482*/
+ 259328
+ 7688 * (unsigned __int8)a3
+ 1379 * (unsigned __int8)a4] = v11[1] & 0x1F | (8 * (v11[1] & 0x3E0));
IioFunc13EE(__return_address, n4, a3, a4); /*0xffcef48a*/
return 1; /*0xffcef494*/
}
else
{
LABEL_5:
n206 = 206; /*0xffcef29a*/
if ( *(_WORD *)(__return_address + 257315) != 12 ) /*0xffcef2ab*/
n206 = 0; /*0xffcef2ad*/
KtiFunc27D8(__return_address, n4, a3, a4, n206 + 174, (unsigned __int8 *)v11); /*0xffcef2c9*/
if ( LOBYTE(v11[0]) != 78 ) /*0xffcef2d6*/
return 0; /*0xffcef2d6*/
KtiFunc27D8(__return_address, n4, a3, a4, n206 + 175, (unsigned __int8 *)v11); /*0xffcef2f2*/
if ( LOBYTE(v11[0]) != 86 ) /*0xffcef2ff*/
return 0; /*0xffcef2ff*/
if ( *(_WORD *)(__return_address + 257315) == 12 ) /*0xffcef30c*/
n206 = 203; /*0xffcef30e*/
KtiFunc27D8(__return_address, n4, a3, a4, n206 + 118, (unsigned __int8 *)v11); /*0xffcef326*/
n204_1 = (unsigned __int16)(LOBYTE(v11[0]) << 8); /*0xffcef337*/
KtiFunc27D8(__return_address, n4, a3, a4, n206 + 117, (unsigned __int8 *)v11); /*0xffcef34e*/
v6 = v11[0] & 0x7F | n204_1; /*0xffcef368*/
v11[1] = v6; /*0xffcef36b*/
if ( *(_WORD *)(__return_address + 257315) == 12 ) /*0xffcef377*/
n206 = 201; /*0xffcef379*/
if ( word_FFD5C4C4 ) /*0xffcef386*/
{
v7 = &word_FFD5C4C4; /*0xffcef38e*/
n64 = 64; /*0xffcef395*/
while ( 1 ) /*0xffcef396*/
{
if ( *v7 == v6 ) /*0xffcef399*/
{
v9 = 0; /*0xffcef39b*/
HIBYTE(v11[0]) = 0; /*0xffcef39d*/
if ( *(int *)((char *)&dword_FFD5C49C + n64) ) /*0xffcef3a1*/
{
*(_DWORD *)n0xFF = 0; /*0xffcef3a9*/
do /*0xffcef3fe*/
{
KtiFunc27D8(__return_address, n4, a3, a4, n206 + v9 + 128, (unsigned __int8 *)v11); /*0xffcef3ce*/
v9 = HIBYTE(v11[0]); /*0xffcef3e5*/
if ( byte_FFD5C486[*(_DWORD *)n0xFF + n64] != LOBYTE(v11[0]) ) /*0xffcef3e9*/
break; /*0xffcef3e9*/
v9 = HIBYTE(v11[0]) + 1; /*0xffcef3eb*/
HIBYTE(v11[0]) = v9; /*0xffcef3f0*/
*(_DWORD *)n0xFF = v9; /*0xffcef3f4*/
}
while ( v9 < *(unsigned int *)((char *)&dword_FFD5C49C + n64) ); /*0xffcef3fe*/
v6 = v11[1]; /*0xffcef400*/
}
if ( v9 == *(int *)((char *)&dword_FFD5C49C + n64) ) /*0xffcef410*/
break; /*0xffcef410*/
}
n64 = ++v12 << 6; /*0xffcef421*/
v7 = (__int16 *)((char *)&unk_FFD5C484 + 64 * v12); /*0xffcef424*/
if ( !*v7 ) /*0xffcef42a*/
return 0; /*0xffcef42d*/
}
return v12; /*0xffcef497*/
}
else
{
return 0; /*0xffcef433*/
}
}
}
// Function: IioFuncF49D @ 0xffcef49d (0x283 bytes)
// Index: 1879/2560
int __cdecl IioFuncF49D(int n6)
{
int n6_1; // esi
unsigned __int8 n6_2; // bl
int n6_3; // edi
unsigned __int8 n6_4; // cl
unsigned __int8 *v5; // ebx
int CpuCount; // eax
unsigned __int8 v7; // cl
int CpuCount_1; // ebp
int v9; // ebx
int v10; // eax
unsigned int v11; // eax
int v13; // [esp-18h] [ebp-3Ch]
int v14; // [esp-4h] [ebp-28h]
int v15; // [esp+10h] [ebp-14h]
int v16; // [esp+14h] [ebp-10h]
int v17; // [esp+14h] [ebp-10h]
int v18; // [esp+14h] [ebp-10h]
unsigned __int8 *v19; // [esp+18h] [ebp-Ch]
int v20; // [esp+1Ch] [ebp-8h] BYREF
int v21; // [esp+20h] [ebp-4h]
n6_1 = n6; /*0xffcef4a3*/
LOBYTE(n6) = *(_BYTE *)(n6 + 9402); /*0xffcef4bd*/
n6_2 = n6; /*0xffcef4b3*/
n6_3 = n6; /*0xffcef4c1*/
DebugPrint(n6_1, 3, n6, 255, 255, 255, 255, 255, "CoreNVDIMMStatus\n"); /*0xffcef4c9*/
n6_4 = 0; /*0xffcef4d1*/
LOBYTE(n6) = 0; /*0xffcef4e2*/
v5 = (unsigned __int8 *)(48704 * n6_2 + n6_1 + 258725); /*0xffcef4e6*/
v19 = v5; /*0xffcef4e8*/
do /*0xffcef710*/
{
if ( *(v5 - 3) ) /*0xffcef4ec*/
{
CpuCount = GetCpuCount(n6_1, n6_3, n6); /*0xffcef4fc*/
v7 = 0; /*0xffcef501*/
CpuCount_1 = CpuCount; /*0xffcef506*/
LOBYTE(v15) = 0; /*0xffcef508*/
if ( *v5 ) /*0xffcef50c*/
{
do /*0xffcef6f3*/
{
v9 = 1379 * v7; /*0xffcef517*/
if ( *(_BYTE *)(v9 + CpuCount_1) ) /*0xffcef51d*/
{
v16 = *(_DWORD *)(v9 + CpuCount_1 + 199); /*0xffcef534*/
DebugPrint(n6_1, 3, n6_3, 255, 255, 255, 255, 255, "nvVenIdx = %d\n", v16); /*0xffcef546*/
if ( v16 ) /*0xffcef554*/
{
*(_DWORD *)(v9 + CpuCount_1 + 203) = 0; /*0xffcef55a*/
LOWORD(v20) = 1; /*0xffcef565*/
LOWORD(v21) = v21 & 0xFFF; /*0xffcef56f*/
DdrTrainFunc466A(n6_1, n6_3, n6, v15, (int)&v20); /*0xffcef583*/
v17 = v16 << 6; /*0xffcef58f*/
v13 = (unsigned __int8)byte_FFD5C4B3[v17]; /*0xffcef5b5*/
LOWORD(v21) = v21 & 0xFF0F | (16 * (byte_FFD5C4B2[v17] & 0xF)); /*0xffcef5bc*/
DebugPrint( /*0xffcef5db*/
n6_1,
3,
n6_3,
n6,
v15,
255,
255,
255,
"Calling %s getStatus with vendorIndex %d\n",
&byte_FFD5C4A0[v17],
v13);
DebugPrint( /*0xffcef619*/
n6_1,
3,
n6_3,
n6,
v15,
255,
255,
255,
" busSegment=0x%x, strapAddress0x%x, deviceType=0x%x\n",
BYTE1(v21) & 0xF,
((unsigned __int16)v21 >> 1) & 7,
((unsigned __int16)v21 >> 4) & 0xF);
LOWORD(v14) = v21; /*0xffcef62e*/
v10 = (*(int (__cdecl **)(int, int, int, _BYTE, _DWORD, int, int))((char *)&dword_FFD5C4B4 + v17))( /*0xffcef648*/
n6_1,
n6_3,
n6,
v15,
(unsigned __int8)byte_FFD5C4B3[v17],
v20,
v14);
v18 = v10; /*0xffcef650*/
if ( (v10 & 0xF) == 2 ) /*0xffcef65e*/
{
DebugPrint(n6_1, 3, n6_3, n6, v15, 255, 255, 255, " NVDIMM does NOT have data to restore\n"); /*0xffcef6db*/
}
else
{
if ( (v10 & 0xF) == 3 ) /*0xffcef663*/
{
DebugPrint(n6_1, 3, n6_3, n6, v15, 255, 255, 255, " NVDIMM HAS data to restore\n"); /*0xffcef6b5*/
v11 = 1; /*0xffcef6bf*/
}
else
{
DebugPrint( /*0xffcef67f*/
n6_1,
3,
n6_3,
n6,
v15,
255,
255,
255,
" NVDIMM in ERROR condition (status = %08x)\n",
v10);
v11 = v18 & 0xFFFFFEF0 | 0x100; /*0xffcef68e*/
}
*(_DWORD *)(v9 + CpuCount_1 + 203) |= v11; /*0xffcef693*/
}
}
}
v5 = v19; /*0xffcef6e7*/
v7 = v15 + 1; /*0xffcef6eb*/
LOBYTE(v15) = v7; /*0xffcef6ed*/
}
while ( v7 < *v19 ); /*0xffcef6f3*/
}
n6_4 = n6; /*0xffcef6f9*/
}
++n6_4; /*0xffcef6fd*/
v5 += 7688; /*0xffcef6ff*/
LOBYTE(n6) = n6_4; /*0xffcef705*/
v19 = v5; /*0xffcef709*/
}
while ( n6_4 < 6u ); /*0xffcef710*/
return 0; /*0xffcef716*/
}
// Function: NvdimmCoreRestore @ 0xffcef720 (0x46e bytes)
// Index: 1880/2560
int __cdecl NvdimmCoreRestore(_BYTE *n6)
{
_BYTE *n6_1; // esi
_BYTE *n6_2; // ebp
unsigned __int8 n6_4; // bh
unsigned __int8 *v4; // edi
unsigned __int8 v5; // bl
int CpuCount; // edx
int v7; // edi
unsigned __int8 i_1; // bh
unsigned __int8 n6_5; // al
unsigned __int8 *v10; // edi
int v11; // eax
unsigned __int8 v12; // cl
int v13; // ebx
int v14; // edi
__int16 v15; // ecx^2
int v17; // [esp-18h] [ebp-58h]
int v18; // [esp-4h] [ebp-44h]
int v19; // [esp-4h] [ebp-44h]
int v20; // [esp+10h] [ebp-30h]
int v21; // [esp+14h] [ebp-2Ch]
int v22; // [esp+14h] [ebp-2Ch]
int v23; // [esp+14h] [ebp-2Ch]
int v24; // [esp+14h] [ebp-2Ch]
unsigned __int8 v25; // [esp+18h] [ebp-28h]
unsigned __int8 i; // [esp+1Ch] [ebp-24h]
unsigned __int8 v27; // [esp+20h] [ebp-20h]
unsigned __int8 *v28; // [esp+24h] [ebp-1Ch]
unsigned __int8 *v29; // [esp+24h] [ebp-1Ch]
int n6_3; // [esp+28h] [ebp-18h]
int CpuCount_1; // [esp+30h] [ebp-10h]
int v32; /... [9063 chars total]
// Function: IioFuncFB8E @ 0xffcefb8e (0x1a0 bytes)
// Index: 1881/2560
int __cdecl IioFuncFB8E(_BYTE *__return_address, int n4)
{
unsigned __int8 n6; // bh
unsigned __int8 *v4; // edi
_BYTE *v5; // eax
unsigned __int8 v6; // bl
int CpuCount; // ebp
int v8; // edi
int v10; // [esp+10h] [ebp-20h]
int v11; // [esp+14h] [ebp-1Ch]
unsigned __int8 *v12; // [esp+20h] [ebp-10h]
int v13; // [esp+24h] [ebp-Ch]
__int16 v14[2]; // [esp+28h] [ebp-8h] BYREF
int v15; // [esp+2Ch] [ebp-4h]
_BYTE *v16; // [esp+34h] [ebp+4h]
LogDebugString(__return_address, (int)"N%d: CoreSaveNVDIMMs Start\n", (unsigned __int8)n4);
v16 = 0; /*0xffcefbb0*/
n6 = 0; /*0xffcefbc1*/
LOBYTE(v10) = 0; /*0xffcefbc6*/
v4 = &__return_address[48704 * (unsigned __int8)n4 + 258725]; /*0xffcefbca*/
v5 = 0; /*0xffcefbcc*/
v12 = v4; /*0xffcefbd0*/
do
{
if ( *(v4 - 3) )
{
v6 = 0; /*0xffcefbec*/
CpuCount = GetCpuCount((int)__return_address, n4, v10); /*0xffcefbf1*/
LOBYTE(v11) = 0; /*0xffcefbf3*/
if ( *v4 )
{
do
{
v8 = 1379 * v6; /*0xffcefc02*/
if ( *(_BYTE *)(v8 + CpuCount) )
{
v13 = *(_DWORD *)(v8 + CpuCount + 199); /*0xffcefc1d*/
if ( v13 )
{
v14[0] = 1; /*0xffcefc2c*/
LOWORD(v15) = v15 & 0xFFF; /*0xffcefc36*/
DdrTrainFunc466A((int)__return_address, n4, v10, v11, (int)v14); /*0xffcefc4d*/
LOWORD(v15) = v15 & 0xFF0F | (16 * (byte_FFD5C4B2[64 * v13] & 0xF)); /*0xffcefc8c*/
if ( IioFuncD73(__return_address, n4, v10, v11, *(int *)v14, v15) )
{
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: ERROR starting NVDIMM Save\n",
(unsigned __int8)n4,
v16,
v6);
*(_DWORD *)(v8 + CpuCount + 203) |= 0x800u; /*0xffcefcbb*/
}
else
{
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Started NVDIMM Save\n",
(unsigned __int8)n4,
v16,
v6);
*(_DWORD *)(v8 + CpuCount + 203) |= 0x10u; /*0xffcefcd6*/
}
}
}
v4 = v12; /*0xffcefcde*/
LOBYTE(v11) = ++v6; /*0xffcefce4*/
}
while ( v6 < *v12 );
}
v5 = v16; /*0xffcefcf0*/
}
++n6; /*0xffcefcf4*/
v4 += 7688; /*0xffcefcf6*/
++v5; /*0xffcefcfc*/
LOBYTE(v10) = n6; /*0xffcefcfd*/
v16 = v5; /*0xffcefd01*/
v12 = v4; /*0xffcefd05*/
}
while ( n6 < 6u );
LogDebugString(__return_address, (int)"N%d: CoreSaveNVDIMMs End\n", (unsigned __int8)n4);
return 0; /*0xffcefd26*/
}
// Function: MemShmooMain @ 0xffcefd2e (0x1045 bytes)
// Index: 1882/2560
int __cdecl MemShmooMain(
_BYTE *__return_address,
int n4,
unsigned __int8 a3,
unsigned __int8 a4,
int n5,
unsigned __int16 a6)
{
signed __int8 v7; // al
unsigned __int8 v8; // al
unsigned __int8 v9; // al
signed __int8 v10; // al
unsigned __int8 v11; // al
unsigned __int8 v12; // al
unsigned __int8 v13; // al
unsigned __int8 v14; // al
unsigned __int8 v15; // al
unsigned __int8 v16; // al
unsigned __int8 v17; // al
unsigned __int8 v18; // al
unsigned __int8 v19; // al
signed __int8 v20; // al
int v21; // eax
signed __int8 v22; // cl
int v23; // edi
unsigned __int8 v24; // [esp+Fh] [ebp-1h] BYREF
if ( IioFunc10A9(__return_address, n4, a3, a4, n5, a6, 96, &v24) == 1 ) /*0xffcefd65*/
return 1; /*0xffcefd65*/
if ( v24 != 0xA5 ) /*0xffcefd74*/
LogDebugString(__return_address, (int)"N%d.C%d.D%d:NVDIMM_READY=0x%x != 0xA5\n", (unsigned __int8)n4, a3, a4, v24); /*0xffcefd92*/
if ( IioFunc10A9(__r... [24850 chars total]
// Function: IioFuncD73 @ 0xffcf0d73 (0x146 bytes)
// Index: 1883/2560
int __cdecl IioFuncD73(_BYTE *__return_address, int n4, int a3, int a4, int n4_2, __int16 a6)
{
int result; // eax
unsigned __int8 n4_1; // [esp+13h] [ebp-1h] BYREF
n4_1 = 0; /*0xffcf0d9a*/
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Making sure NVDIMM is idle\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4);
result = IioFunc1135(__return_address, n4, a3, a4, n4_2, a6, 97, &n4_1, 1u, 0, 0xAu); /*0xffcf0dd4*/
if ( result != 1 )
{
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: Clearing Save Status\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4);
n4_1 = 4; /*0xffcf0df6*/
IioFunc14CD(__return_address, n4, n4_2, a6, 64, &n4_1); /*0xffcf0e1a*/
LogDebugString( /*0xffcf0e28*/
__return_address,
(int)"N%d.C%d.D%d:Starting Save\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4);
n4_1 = 2; /*0xffcf0e30*/
IioFunc14CD(__return_address, n4, n4_2, a6, 67, &n4_1); /*0xffcf0e54*/
n4_1 = 0; /*0xffcf0e5c*/
IioFunc1135(__return_address, n4, a3, a4, n4_2, a6, 97, &n4_1, 0xFFu, 5u, 0xAu); /*0xffcf0e91*/
if ( (n4_1 & 4) == 0 ) /*0xffcf0e9e*/
LogDebugString( /*0xffcf0ea9*/
__return_address,
(int)"N%d.C%d.D%d:SAVE in progress bit NOT set after 10s\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4);
return 0; /*0xffcf0eb1*/
}
return result; /*0xffcf0eb3*/
}
// Function: IioFuncEB9 @ 0xffcf0eb9 (0xf4 bytes)
// Index: 1884/2560
BOOL __cdecl IioFuncEB9(_BYTE *__return_address, int n4, int a3, int a4, int n5, __int16 a6, char a7)
{
unsigned __int8 v8; // [esp+13h] [ebp-1h] BYREF
IioFunc10A9(__return_address, n4, a3, a4, n5, a6, 0, &v8); /*0xffcf0eea*/
LogDebugString( /*0xffcf0f13*/
__return_address,
(int)"N%d.C%d.D%d:Current Page=0x%x\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4,
v8);
if ( v8 == a7 ) /*0xffcf0f23*/
return 0; /*0xffcf0f25*/
IioFunc14CD(__return_address, n4, n5, a6, 0, (unsigned __int8 *)&a7); /*0xffcf0f45*/
IioFunc1135(__return_address, n4, a3, a4, n5, a6, 0, &v8, a7, a7, 5u); /*0xffcf0f7b*/
LogDebugString( /*0xffcf0f92*/
__return_address,
(int)"N%d.C%d.D%d:New Page=0x%x\n",
(unsigned __int8)n4,
(unsigned __int8)a3,
(unsigned __int8)a4,
v8);
return v8 != (unsigned __int8)a7; /*0xffcf0fa7*/
}
// Function: IioFuncFAD @ 0xffcf0fad (0xfc bytes)
// Index: 1885/2560
unsigned int __cdecl IioFuncFAD(
_BYTE *__return_address,
int n4,
unsigned __int8 a3,
unsigned __int8 a4,
int n5,
unsigned __int16 a6,
int n24)
{
int v7; // ecx
unsigned int result; // eax
__int16 v9; // cx
__int16 v10; // [esp+0h] [ebp-2h] BYREF
v10 = HIWORD(v7); /*0xffcf0fb0*/
if ( IioFunc10A9(__return_address, n4, a3, a4, n5, a6, n24, (unsigned __int8 *)&v10) == 1 )
{
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d:JEDECTimeoutInSeconds: Low Read Failed\n",
(unsigned __int8)n4,
a3,
a4);
return 0; /*0xffcf1009*/
}
if ( IioFunc10A9(__return_address, n4, a3, a4, n5, a6, (unsigned __int8)(n24 + 1), (unsigned __int8 *)&v10 + 1) == 1 )
{
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d:JEDECTimeoutInSeconds: High Read Failed\n",
(unsigned __int8)n4,
a3,
a4);
return 0; /*0xffcf105f*/
}
if ( (_BYTE)n24 == 16 ) /*0xffcf1068*/
v9 = HIBYTE(v10); /*0xffcf106a*/
else
v9 = HIBYTE(v10) & 0x7F; /*0xffcf1073*/
result = (unsigned __int16)((unsigned __int8)v10 | (unsigned __int16)(v9 << 8)); /*0xffcf1081*/
if ( v10 >= 0 && (_BYTE)n24 != 16 ) /*0xffcf108c*/
result = (unsigned __int16)result / 0x3E8u; /*0xffcf109a*/
if ( !(_WORD)result ) /*0xffcf10a0*/
return 1; /*0xffcf10a4*/
return result; /*0xffcf10a7*/
}
// Function: IioFunc10A9 @ 0xffcf10a9 (0x8c bytes)
// Index: 1886/2560
int __cdecl IioFunc10A9(
_BYTE *__return_address,
int a2,
unsigned __int8 a3,
unsigned __int8 a4,
int n5,
unsigned __int16 a6,
int a7,
unsigned __int8 *a8)
{
int v8; // eax
int v9; // esi
v8 = DdrTrainFunc4A71(__return_address, a2, n5, a6, a7, a8); /*0xffcf10ce*/
v9 = v8; /*0xffcf10d3*/
if ( v8 )
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: ReadSmb:Offset=0x%x, Read failed, ret value=0%x\n",
(unsigned __int8)a2,
a3,
a4,
(unsigned __int8)a7,
v8);
else
LogDebugString(
__return_address,
(int)"N%d.C%d.D%d: ReadSmb:Offset=0x%x, Value Read=0x%x,status=0x%x\n",
(unsigned __int8)a2,
a3,
a4,
(unsigned __int8)a7,
*a8,
0);
return v9; /*0xffcf112e*/
}
// Function: IioFunc1135 @ 0xffcf1135 (0x191 bytes)
// Index: 1887/2560
int __cdecl IioFunc1135(
_BYTE *a1,
int a2,
int a3,
int a4,
int a5,
__int16 a6,
int a7,
unsigned __int8 *a8,
unsigned __int8 a9,
unsigned __int8 a10,
unsigned __int16 a11)
{
int v11; // ecx
int v12; // eax
int v13; // eax
int v15; // [esp+10h] [ebp-24h]
int v16; // [esp+14h] [ebp-20h]
__int64 v17; // [esp+24h] [ebp-10h] BYREF
__int64 v18; // [esp+2Ch] [ebp-8h] BYREF
v15 = 0; /*0xffcf115b*/
DebugPrint( /*0xffcf1184*/
(int)a1,
3,
a2,
a3,
a4,
255,
255,
255,
" Starting a Poll Reg=0x%x, Mask=0x%x, Expected Value=0x%x\n",
(unsigned __int8)a7,
a9,
a10);
KtiFuncF4E(&v18); /*0xffcf118e*/
v11 = (int)a8; /*0xffcf1193*/
while ( 1 ) /*0xffcf11b7*/
{
v12 = DdrTrainFunc4A71(a1, a2, a5, a6, a7, v11); /*0xffcf11b7*/
v16 = v12; /*0xffcf11bf*/
if ( (_BYTE)v15 == 1 ) /*0xffcf11c8*/
{
if ( v12 ) /*0xffcf11cc*/
DebugPrint((int)a1, 3, a2, a3, a4, 255, 255, 255, " SMBUS Read FAILED!!!! Status=0x%x\n", v12); /*0xffcf11f1*/
else
DebugPrint((int)a1, 3, a2, a3, a4, 255, 255, 255, " Data=0x%x\n", *a8); /*0xffcf11db*/
}
v13 = v15; /*0xffcf11f9*/
if ( v15 ) /*0xffcf11ff*/
{
KtiFunc8C4((int)a1, 0x2710u); /*0xffcf1207*/
v13 = v15; /*0xffcf120c*/
}
v15 = v13 + 1; /*0xffcf1213*/
KtiFuncF4E(&v17); /*0xffcf121c*/
if ( KtiFuncF75((int)a1, v18, SHIDWORD(v18), v17, SHIDWORD(v17), 1u) > (unsigned int)a11 ) /*0xffcf1243*/
break; /*0xffcf1243*/
v11 = (int)a8; /*0xffcf1245*/
if ( (a9 & *a8) == a10 && !v16 ) /*0xffcf125e*/
{
DebugPrint((int)a1, 3, a2, a3, a4, 255, 255, 255, " Final Data=0x%x\n", *a8); /*0xffcf127b*/
return 0; /*0xffcf1285*/
}
}
DebugPrint( /*0xffcf12b3*/
(int)a1,
3,
a2,
a3,
a4,
255,
255,
255,
" ReadSmbTimeoutTimeout after %d seconds, Reg=0x%x, Mask=0x%x, Expected Value=0x%x, last read=0x%x, last status=0x%x\n",
a11,
(unsigned __int8)a7,
a9,
a10,
*a8,
v16);
return 1; /*0xffcf12be*/
}
// Function: IioFunc12C6 @ 0xffcf12c6 (0x128 bytes)
// Index: 1888/2560
int __cdecl IioFunc12C6(_BYTE *__return_address, int a2, int a3, int a4, int n4, __int16 a6)
{
unsigned __int8 v7[7]; // [esp+Ch] [ebp-8h] BYREF
unsigned __int8 v8; // [esp+13h] [ebp-1h] BYREF
*(_DWORD *)v7 = 1146047827; /*0xffcf12d4*/
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcf12db*/
LogDebugString(__return_address, (int)" Unlocking\n"); /*0xffcf12ec*/
IioFunc14CD(__return_address, a2, n4, a6, 61, v7); /*0xffcf1311*/
IioFunc14CD(__return_address, a2, n4, a6, 61, &v7[1]); /*0xffcf1331*/
IioFunc14CD(__return_address, a2, n4, a6, 61, &v7[2]); /*0xffcf1351*/
IioFunc14CD(__return_address, a2, n4, a6, 61, &v7[3]); /*0xffcf1371*/
if ( IioFunc1135(__return_address, a2, a3, a4, n4, a6, 61, &v8, 0x80u, 0x80u, 0xAu) ) /*0xffcf139e*/
{
if ( ProcCommonFuncFB4A((int)__return_address, 3u) ) /*0xffcf13ad*/
LogDebugString(__return_address, (int)" Smart Unlock:FAILED\n"); /*0xffcf13be*/
return 1; /*0xffcf13c7*/
}
else
{
if ( ProcCommonFuncFB4A((int)__return_address, 2u) ) /*0xffcf13cd*/
LogDebugString(__return_address, (int)" Unlock:Passed\n"); /*0xffcf13de*/
return 0; /*0xffcf13e5*/
}
}
// Function: IioFunc13EE @ 0xffcf13ee (0xdf bytes)
// Index: 1889/2560
int __cdecl IioFunc13EE(_BYTE *__return_address, int n4, int a3, int a4)
{
__int16 v4; // ecx^2
int v6; // [esp-Ch] [ebp-1Ch]
int v7; // [esp+4h] [ebp-Ch] BYREF
__int16 v8; // [esp+8h] [ebp-8h]
unsigned __int8 v9; // [esp+Fh] [ebp-1h] BYREF
v9 = 0; /*0xffcf13fa*/
v8 &= 0xFFFu; /*0xffcf13fe*/
LOWORD(v7) = 1; /*0xffcf140c*/
DdrTrainFunc466A((int)__return_address, n4, a3, a4, (int)&v7); /*0xffcf1419*/
v8 = v8 & 0xFF0F | (16 * (byte_FFD5C4F2 & 0xF)); /*0xffcf1451*/
IioFuncEB9(__return_address, n4, a3, a4, v7, v8, 0); /*0xffcf1459*/
if ( IioFunc1135(__return_address, n4, a3, a4, v7, v8, 96, &v9, 0xA5u, 0xA5u, 0x64u) == 1 ) /*0xffcf1497*/
return 1; /*0xffcf1499*/
v9 = 0; /*0xffcf14a0*/
HIWORD(v6) = v4; /*0xffcf14aa*/
LOWORD(v6) = v8; /*0xffcf14ba*/
IioFunc14CD(__return_address, n4, v7, v6, 69, &v9); /*0xffcf14be*/
return 0; /*0xffcf14c8*/
}
// Function: IioFunc14CD @ 0xffcf14cd (0x5f bytes)
// Index: 1890/2560
int __cdecl IioFunc14CD(
_BYTE *__return_address,
unsigned __int8 a2,
int n4,
unsigned __int16 a4,
int a5,
unsigned __int8 *a6)
{
int v6; // edi
v6 = DdrTrainFunc5231(__return_address, a2, n4, a4, a5, a6); /*0xffcf14fa*/
LogDebugString( /*0xffcf150a*/
__return_address,
(int)" WriteSmb:Offset=0x%x, Value Written=0x%x, status=0x%x\n",
(unsigned __int8)a5,
*a6,
v6);
if ( v6 ) /*0xffcf1514*/
LogDebugString(__return_address, (int)" WRITE FAILED\n"); /*0xffcf151e*/
return v6; /*0xffcf1527*/
}
// Function: IioFunc152C @ 0xffcf152c (0x3f bytes)
// Index: 1891/2560
bool __cdecl IioFunc152C(int __return_address)
{
return *(_DWORD *)(__return_address + 246404) == 1 /*0xffcf1569*/
|| *(_DWORD *)(__return_address + 9405) == 10
|| *(_DWORD *)(__return_address + 9405) == 11 && !*(_BYTE *)(__return_address + 173);
}
// Function: IioFunc156B @ 0xffcf156b (0x762 bytes)
// Index: 1892/2560
int __cdecl IioFunc156B(int __return_address)
{
_DWORD *buf; // [esp+0h] [ebp-24h] BYREF
int *i_1; // [esp+4h] [ebp-20h] BYREF
int *i_2; // [esp+8h] [ebp-1Ch] BYREF
int *i_3; // [esp+Ch] [ebp-18h] BYREF
int *i_4; // [esp+10h] [ebp-14h] BYREF
int *i_5; // [esp+14h] [ebp-10h] BYREF
int *i; // [esp+18h] [ebp-Ch] BYREF
int v9; // [esp+1Ch] [ebp-8h]
int v10; // [esp+20h] [ebp-4h]
v9 = *(_DWORD *)(__return_address + 251104); /*0xffcf157a*/
DebugPrint(__return_address, 3, 255, 255, 255, 255, 255, 255, "BIOS SSA Initialization Started\n"); /*0xffcf15a5*/
if ( *(_BYTE *)(__return_address + 172) && !IioFunc152C(__return_address) )
{
i = (int *)KtiFuncDBA(__return_address, 0x1Cu); /*0xffcf15e0*/
if ( !i )
return LogDebugString((_BYTE *)__return_address, (int)"\nERROR: SsaBiosInitialize () - EFI OUT OF RESOURCES.\n");
i_1 = (int *)KtiFuncDBA(__return_address, 0x58u); /*0xffcf1609*/
if ( !i_1 )
return LogDebugString((_BYTE *)__return_address, (... [8055 chars total]
// Function: IioFunc1CCD @ 0xffcf1ccd (0x269 bytes)
// Index: 1893/2560
int __cdecl IioFunc1CCD(int n9, int n4, int n2, char n4_3)
{
int n9_1; // ebx
int n2_1; // ebp
int n4_1; // edi
int CpuCount; // esi
char n4_4; // cl
int v9; // edi
char n9_2; // al
int v11; // eax
int v12; // eax
int v13; // eax
char n4_5; // bp
char n4_2; // [esp-18h] [ebp-2Ch]
int SocketInfo; // [esp+10h] [ebp-4h]
n9_1 = n9; /*0xffcf1ccf*/
n2_1 = n2; /*0xffcf1cd4*/
n4_1 = n4; /*0xffcf1cda*/
CpuCount = GetCpuCount(n9, n4, n2); /*0xffcf1ce8*/
SocketInfo = GetSocketInfo(n9_1, n4_1); /*0xffcf1cf1*/
n4_2 = n4_3; /*0xffcf1cf6*/
*(_WORD *)(n9_1 + 257315) = 12; /*0xffcf1cfa*/
IioFunc1F36((_BYTE *)n9_1, n4_1, n2_1, n4_2); /*0xffcf1d04*/
KtiFunc27D8((_BYTE *)n9_1, n4_1, n2_1, n4_3, 3u, (unsigned __int8 *)&n9); /*0xffcf1d17*/
n4_4 = n4_3; /*0xffcf1d1c*/
v9 = 1379 * (unsigned __int8)n4_3; /*0xffcf1d26*/
*(_BYTE *)(v9 + CpuCount + 106) = n9 & 0xF; /*0xffcf1d32*/
*(_BYTE *)(v9 + CpuCount + 109) = n9 & 0xF; /*0xffcf1d3c*/
n9_2 = n9; /*0xffcf1d40*/
if ( (_BYTE)n9 == 9 ) /*0xffcf1d46*/
{
*(_BYTE *)(v9 + CpuCount + 106) = 3; /*0xffcf1d48*/
*(_BYTE *)(v9 + CpuCount + 109) = 3; /*0xffcf1d4d*/
n9_2 = n9; /*0xffcf1d52*/
}
if ( n9_2 == 8 ) /*0xffcf1d58*/
{
*(_BYTE *)(v9 + CpuCount + 106) = 1; /*0xffcf1d5a*/
*(_BYTE *)(v9 + CpuCount + 109) = 1; /*0xffcf1d5f*/
n9_2 = n9; /*0xffcf1d64*/
}
if ( (n9_2 & 0xF) == 4 ) /*0xffcf1d6c*/
{
v11 = 7688 * (unsigned __int8)n2; /*0xffcf1d79*/
*(_BYTE *)(v9 + CpuCount + 1249) = 1; /*0xffcf1d7f*/
*(_BYTE *)(v11 + SocketInfo + 6673) = 1; /*0xffcf1d87*/
*(_BYTE *)(48704 * (unsigned __int8)n4 + n9_1 + 258703) = 1; /*0xffcf1d9c*/
*(_BYTE *)(v9 + CpuCount + 106) = 1; /*0xffcf1da4*/
}
KtiFunc27D8((_BYTE *)n9_1, n4, n2, n4_4, 4u, (unsigned __int8 *)&n9); /*0xffcf1dba*/
*(_BYTE *)(v9 + CpuCount + 118) = n9 & 0xF; /*0xffcf1dca*/
if ( (((unsigned __int8)n9 >> 4) & 3) != 0 ) /*0xffcf1ddb*/
{
if ( (((unsigned __int8)n9 >> 4) & 3) == 1 ) /*0xffcf1de0*/
*(_BYTE *)(v9 + CpuCount + 114) = 8; /*0xffcf1de2*/
}
else
{
*(_BYTE *)(v9 + CpuCount + 114) = 4; /*0xffcf1de9*/
}
v12 = (unsigned __int8)n9 >> 6; /*0xffcf1df3*/
if ( v12 ) /*0xffcf1df8*/
{
v13 = v12 - 1; /*0xffcf1dfa*/
if ( v13 ) /*0xffcf1dfd*/
{
if ( v13 == 1 ) /*0xffcf1e02*/
*(_BYTE *)(v9 + CpuCount + 115) = 4; /*0xffcf1e04*/
}
else
{
*(_BYTE *)(v9 + CpuCount + 115) = 2; /*0xffcf1e0b*/
}
}
else
{
*(_BYTE *)(v9 + CpuCount + 115) = 0; /*0xffcf1e12*/
}
n4_5 = n4_3; /*0xffcf1e1a*/
*(_BYTE *)(v9 + CpuCount + 116) = (((unsigned __int8)n9 >> 4) & 3) + 2; /*0xffcf1e25*/
*(_BYTE *)(v9 + CpuCount + 117) = (unsigned __int8)n9 >> 6; /*0xffcf1e30*/
*(_BYTE *)(v9 + CpuCount + 121) = n9; /*0xffcf1e38*/
*(_BYTE *)(v9 + CpuCount + 122) = n9; /*0xffcf1e40*/
KtiFunc27D8((_BYTE *)n9_1, n4, n2, n4_5, 5u, (unsigned __int8 *)&n9); /*0xffcf1e55*/
*(_BYTE *)(v9 + CpuCount + 119) = (((unsigned __int8)n9 >> 3) & 7) + 12; /*0xffcf1e65*/
*(_BYTE *)(v9 + CpuCount + 120) = (n9 & 7) + 9; /*0xffcf1e71*/
*(_BYTE *)(v9 + CpuCount + 123) = n9; /*0xffcf1e79*/
KtiFunc27D8((_BYTE *)n9_1, n4, n2, n4_5, 0xCu, (unsigned __int8 *)&n9); /*0xffcf1e8e*/
LOBYTE(n9) = n9 & 0x7F; /*0xffcf1e99*/
*(_BYTE *)(v9 + CpuCount + 110) = n9; /*0xffcf1e9d*/
*(_BYTE *)(v9 + CpuCount + 111) = n9; /*0xffcf1ea5*/
KtiFunc27D8((_BYTE *)n9_1, n4, n2, n4_5, 6u, (unsigned __int8 *)&n9); /*0xffcf1eba*/
*(_BYTE *)(v9 + CpuCount + 112) = n9 & 0xF3; /*0xffcf1ec8*/
KtiFunc27D8((_BYTE *)n9_1, n4, n2, n4_5, 0xAu, (unsigned __int8 *)&n9); /*0xffcf1edd*/
*(_BYTE *)(v9 + CpuCount + 113) = n9; /*0xffcf1ee6*/
KtiFunc27D8((_BYTE *)n9_1, n4, n2, n4_5, 0x82u, (unsigned __int8 *)&n9); /*0xffcf1efe*/
*(_BYTE *)(v9 + CpuCount + 29) = n9; /*0xffcf1f07*/
KtiFunc27D8((_BYTE *)n9_1, n4, n2, n4_5, 0xDu, (unsigned __int8 *)&n9); /*0xffcf1f1c*/
*(_BYTE *)(v9 + CpuCount + 127) = n9 & 0x1F; /*0xffcf1f2a*/
return 0; /*0xffcf1f30*/
}
// Function: IioFunc1F36 @ 0xffcf1f36 (0x1c7 bytes)
// Index: 1894/2560
int __cdecl IioFunc1F36(_BYTE *__return_address, int n4, int n2, char a4)
{
int CpuCount; // esi
unsigned __int8 v5; // al
int v6; // ebp
unsigned __int8 v7; // al
int v8; // ecx
int v9; // edx
int result; // eax
int v11; // ecx
unsigned __int8 v12[5]; // [esp+13h] [ebp-11h] BYREF
int v13; // [esp+18h] [ebp-Ch] BYREF
int v14; // [esp+1Ch] [ebp-8h]
int v15; // [esp+20h] [ebp-4h]
v15 = KtiFunc2725((int)__return_address, n4, n2); /*0xffcf1f54*/
CpuCount = GetCpuCount((int)__return_address, n4, n2); /*0xffcf1f5d*/
KtiFunc27D8(__return_address, n4, n2, a4, 0x11u, v12); /*0xffcf1f6d*/
v5 = v12[0] & 0xF; /*0xffcf1f7d*/
v12[0] = v5; /*0xffcf1f7f*/
if ( (v5 & 3) == 0 ) /*0xffcf1f85*/
{
*(_BYTE *)(1379 * (unsigned __int8)a4 + CpuCount + 133) = 1; /*0xffcf1f90*/
v5 = v12[0]; /*0xffcf1f98*/
}
if ( (v5 & 0xC) == 0 ) /*0xffcf1f9e*/
*(_BYTE *)(1379 * (unsigned __int8)a4 + CpuCount + 1207) = 125; /*0xffcf1fa9*/
KtiFunc27D8(__return_address, n4, n2, a4, 0x12u, v12); /*0xffcf1fbc*/
v6 = 1379 * (unsigned __int8)a4; /*0xffcf1fc8*/
v14 = (unsigned __int8)a4; /*0xffcf1fce*/
*(_DWORD *)(CpuCount + v6 + 4) = v12[0]; /*0xffcf1fd7*/
KtiFunc27D8(__return_address, n4, n2, a4, 0x13u, v12); /*0xffcf1fe9*/
*(_BYTE *)(CpuCount + v6 + 1208) = v12[0]; /*0xffcf1ff2*/
KtiFunc27D8(__return_address, n4, n2, a4, 0x7Du, v12); /*0xffcf200a*/
*(_BYTE *)(CpuCount + v6 + 8) = v12[0]; /*0xffcf2016*/
KtiFunc27D8(__return_address, n4, n2, a4, 0x7Cu, v12); /*0xffcf202b*/
*(_BYTE *)(CpuCount + v6 + 1209) = v12[0]; /*0xffcf2034*/
IioFunc20FD(__return_address, *(_BYTE *)(CpuCount + v6 + 1207), *(_BYTE *)(CpuCount + v6 + 133), &v13, &v12[1]); /*0xffcf2058*/
v7 = *(_BYTE *)(CpuCount + v6 + 8); /*0xffcf205d*/
v8 = v7; /*0xffcf2064*/
if ( (v7 & 0x80u) != 0 ) /*0xffcf206d*/
v8 = v7 - 256; /*0xffcf206f*/
v9 = v15; /*0xffcf207f*/
*(_DWORD *)(CpuCount + v6 + 4) = v13 * *(_DWORD *)(CpuCount + v6 + 4) + *(_DWORD *)&v12[1] * v8; /*0xffcf2085*/
*(_DWORD *)(2688 * v14 + v9 + 9) = *(_DWORD *)(CpuCount + v6 + 4); /*0xffcf2095*/
KtiFunc27D8(__return_address, n4, n2, a4, 0xBu, v12); /*0xffcf20aa*/
if ( (v12[0] & 3) != 0 ) /*0xffcf20bf*/
{
result = 48704 * (unsigned __int8)n4; /*0xffcf20c1*/
__return_address[result + 258700] = 3; /*0xffcf20c7*/
}
else
{
v11 = 48704 * (unsigned __int8)n4; /*0xffcf20d1*/
result = v11 + 7688 * (unsigned __int8)n2; /*0xffcf20e4*/
__return_address[result + 265401] = 1; /*0xffcf20e6*/
__return_address[v11 + 258700] = 0; /*0xffcf20ee*/
}
return result; /*0xffcf20f5*/
}
// Function: IioFunc20FD @ 0xffcf20fd (0x3f bytes)
// Index: 1895/2560
_DWORD *__cdecl IioFunc20FD(_BYTE *__return_address, unsigned __int8 a2, unsigned __int8 a3, _DWORD *a4, _DWORD *a5)
{
_DWORD *result; // eax
if ( a3 ) /*0xffcf2105*/
*a5 = 1000 * a3; /*0xffcf2113*/
else
*a5 = 0; /*0xffcf211a*/
result = a4; /*0xffcf212d*/
if ( a2 ) /*0xffcf2122*/
*a4 = 1000 * a2; /*0xffcf2130*/
else
*a4 = 0; /*0xffcf2137*/
return result; /*0xffcf2132*/
}
// Function: DimmCheckAepSupport @ 0xffcf213c (0x42c bytes)
// Index: 1896/2560
int __cdecl DimmCheckAepSupport(int __return_address, int n4, int n2, int n4_5)
{
int n4_1; // ebp
int n2_1; // esi
_BYTE *__return_address_1; // edi
int CpuCount; // ebx
int n4_2; // eax
int n4_3; // esi
int n2_3; // ecx
char n4_4; // dl
int v12; // ebp
char v13; // al
int n2_4; // esi
unsigned __int8 i; // cl
int n2_5; // esi
int n2_2; // [esp-4Ch] [ebp-68h]
unsigned __int8 __return_address_5; // [esp+10h] [ebp-Ch]
char __return_address_6; // [esp+11h] [ebp-Bh]
char __return_address_3; // [esp+12h] [ebp-Ah]
unsigned __int8 __return_address_2; // [esp+13h] [ebp-9h]
unsigned __int8 __return_address_4; // [esp+13h] [ebp-9h]
unsigned __int8 i_1; // [esp+13h] [ebp-9h]
int SocketInfo; // [esp+14h] [ebp-8h]
int v26; // [esp+14h] [ebp-8h]
int v27; // [esp+18h] [ebp-4h]
n4_1 = n4; /*0xffcf2141*/
n2_1 = n2; /*0xffcf2146*/
__return_address_1 = (_BYTE *)__return_address; /*0xffcf214b*/
CpuCount = GetCpuCount(__return_address, n4, n2); /*0xffcf2159*/
SocketInfo = GetSocketInfo((int)__return_address_1, n4_1); /*0xffcf2164*/
IioFunc1F36(__return_address_1, n4_1, n2_1, n4_5); /*0xffcf216b*/
n4_2 = n4_1; /*0xffcf2170*/
LOBYTE(n4_1) = n4_5; /*0xffcf2172*/
v27 = 48704 * (unsigned __int8)n4_2; /*0xffcf217f*/
__return_address_1[v27 + 258704] = 1; /*0xffcf2183*/
KtiFunc27D8(__return_address_1, n4_2, n2_1, n4_1, 1u, (unsigned __int8 *)&__return_address); /*0xffcf2196*/
__return_address_2 = __return_address; /*0xffcf219f*/
n2_2 = n2_1; /*0xffcf21ab*/
n4_3 = n4; /*0xffcf21ac*/
KtiFunc27D8(__return_address_1, n4, n2_2, n4_1, 3u, (unsigned __int8 *)&__return_address); /*0xffcf21b2*/
n2_3 = n2; /*0xffcf21b7*/
n4_4 = n4_1; /*0xffcf21bb*/
v12 = 1379 * (unsigned __int8)n4_1; /*0xffcf21c3*/
*(_BYTE *)(CpuCount + v12 + 106) = __return_address & 0xF; /*0xffcf21cf*/
v13 = __return_address & 0xF; /*0xffcf21d7*/
*(_BYTE *)(CpuCount + v12 + 106) = 1; /*0xffcf21d9*/
*(_BYTE *)(CpuCount + v12 + 109) = v13; /*0xffcf21de*/
if ( v13 == 1 ) /*0xffcf21e7*/
{
*(_BYTE *)(CpuCount + v12 + 1249) = 0; /*0xffcf21ef*/
v26 = SocketInfo + 7688 * (unsigned __int8)n2_3; /*0xffcf21fb*/
*(_BYTE *)(v26 + 6673) = 0; /*0xffcf21ff*/
__return_address_1[v27 + 258703] = 0; /*0xffcf220a*/
}
else
{
n4_4 = n4_5; /*0xffcf2214*/
*(_BYTE *)(CpuCount + v12 + 1249) = 1; /*0xffcf221e*/
v26 = SocketInfo + 7688 * (unsigned __int8)n2_3; /*0xffcf222a*/
*(_BYTE *)(v26 + 6673) = 1; /*0xffcf222e*/
__return_address_1[v27 + 258703] = 1; /*0xffcf2239*/
}
*(_BYTE *)(CpuCount + v12 + 127) = 11; /*0xffcf2243*/
*(_WORD *)(CpuCount + v12 + 111) = 0; /*0xffcf224d*/
*(_BYTE *)(CpuCount + v12 + 110) = 0; /*0xffcf2252*/
*(_BYTE *)(CpuCount + v12 + 118) = 4; /*0xffcf225a*/
if ( __return_address_2 > 1u ) /*0xffcf2260*/
{
KtiFunc27D8(__return_address_1, n4_3, n2_3, n4_4, 0xB0u, (unsigned __int8 *)&__return_address); /*0xffcf231e*/
n2_4 = n2; /*0xffcf2327*/
__return_address_3 = __return_address; /*0xffcf232b*/
*(_BYTE *)(CpuCount + v12 + 27) = __return_address; /*0xffcf232f*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0xB4u, (unsigned __int8 *)&__return_address); /*0xffcf2347*/
__return_address_4 = __return_address; /*0xffcf2350*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0xB2u, (unsigned __int8 *)&__return_address); /*0xffcf2368*/
__return_address_5 = __return_address; /*0xffcf2374*/
*(_BYTE *)(CpuCount + v12 + 28) = __return_address; /*0xffcf2378*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0xB5u, (unsigned __int8 *)&__return_address); /*0xffcf2390*/
__return_address_6 = __return_address; /*0xffcf2399*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0xAAu, (unsigned __int8 *)&__return_address); /*0xffcf23b1*/
*(_BYTE *)(v26 + 7502) = __return_address; /*0xffcf23be*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0xC4u, (unsigned __int8 *)&__return_address); /*0xffcf23d8*/
*(_BYTE *)(CpuCount + v12 + 23) = __return_address; /*0xffcf23e4*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0x87u, (unsigned __int8 *)&__return_address); /*0xffcf23fc*/
*(_BYTE *)(CpuCount + v12 + 24) = __return_address; /*0xffcf2405*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0x82u, (unsigned __int8 *)&__return_address); /*0xffcf241d*/
*(_BYTE *)(CpuCount + v12 + 25) = __return_address; /*0xffcf2426*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0xEDu, (unsigned __int8 *)&__return_address); /*0xffcf243e*/
*(_BYTE *)(CpuCount + v12 + 26) = __return_address; /*0xffcf244a*/
}
else
{
KtiFunc27D8(__return_address_1, n4_3, n2_3, n4_4, 0x84u, (unsigned __int8 *)&__return_address); /*0xffcf226f*/
n2_4 = n2; /*0xffcf2278*/
__return_address_3 = __return_address; /*0xffcf227c*/
KtiFunc27D8(__return_address_1, n4, n2, n4_5, 0x86u, (unsigned __int8 *)&__return_address); /*0xffcf2294*/
__return_address_5 = __return_address; /*0xffcf229d*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0x88u, (unsigned __int8 *)&__return_address); /*0xffcf22b5*/
__return_address_4 = __return_address; /*0xffcf22c1*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0x89u, (unsigned __int8 *)&__return_address); /*0xffcf22d9*/
__return_address_6 = __return_address; /*0xffcf22e2*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0xC8u, (unsigned __int8 *)&__return_address); /*0xffcf22fa*/
*(_BYTE *)(v26 + 7502) = __return_address; /*0xffcf230a*/
}
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0xEAu, (unsigned __int8 *)&__return_address); /*0xffcf2462*/
*(_WORD *)(CpuCount + v12 + 2) = (unsigned __int8)__return_address; /*0xffcf246c*/
KtiFunc27D8(__return_address_1, n4, n2_4, n4_5, 0xE9u, (unsigned __int8 *)&__return_address); /*0xffcf2485*/
*(_WORD *)(CpuCount + v12 + 2) |= (unsigned __int8)__return_address << 8; /*0xffcf24a3*/
for ( i = 0; i < 8u; ++i ) /*0xffcf24e7*/
{
if ( dword_FFD4A794[i] == (((__return_address_4 >> 7) + 1) /*0xffcf24f3*/
* (dword_FFD4A744[__return_address_3 & 0xF]
* dword_FFD4A784[__return_address_6 & 7]
* (((__return_address_5 >> 4) & 7u) + 1)
/ (((__return_address_5 >> 2) & 3u) + 1))) >> 13 )
break; /*0xffcf24f3*/
}
i_1 = i; /*0xffcf24fc*/
if ( i >= 8u ) /*0xffcf2503*/
{
n2_5 = n2; /*0xffcf2505*/
DebugPrint((int)__return_address_1, 3, n4, n2, n4_5, 255, 255, 255, "SPD ERROR - AEP DIMM not supported!\n"); /*0xffcf2522*/
KtiFunc8A8E(__return_address_1, n4, n2_5); /*0xffcf252d*/
KtiFunc211E((int)__return_address_1, 237, 12, n4, n2_5, 255, 255); /*0xffcf2546*/
i = i_1; /*0xffcf254b*/
}
*(_BYTE *)(CpuCount + v12 + 22) = i; /*0xffcf2554*/
*(_BYTE *)(CpuCount + v12 + 196) = 0; /*0xffcf255a*/
return 0; /*0xffcf2552*/
}
// Function: IioFunc2568 @ 0xffcf2568 (0x3d bytes)
// Index: 1897/2560
int __cdecl IioFunc2568(int buf, __int16 i, unsigned __int8 bufa)
{
int result; // eax
result = *(unsigned __int16 *)(buf + 2 * (i + 2 * bufa) + 31292); /*0xffcf257d*/
*(_WORD *)(buf + 19004) = i; /*0xffcf2585*/
while ( *(_WORD *)(buf + 2 * (__int16)result + 19004) != i ) /*0xffcf25a1*/
result = *(unsigned __int16 *)(buf + 2 * (__int16)result + 27196); /*0xffcf258e*/
return result; /*0xffcf25a3*/
}
// Function: InitHelper_0 @ 0xffcf25a5 (0x109 bytes)
// Index: 1898/2560
int __cdecl InitHelper_0(int a1, int a2, int a3, unsigned int *p_n4096, char n2, _DWORD *buf)
{
int v6; // ebx
_WORD *v8; // edx
unsigned int i; // ecx
unsigned int i_1; // eax
int n8; // edi
_BYTE *v12; // eax
unsigned int n4096; // eax
v6 = 0; /*0xffcf25b0*/
buf[2133] = 0; /*0xffcf25b2*/
if ( n2 == 1 ) /*0xffcf25bb*/
{
*((_BYTE *)buf + 43580) = 4; /*0xffcf25d3*/
}
else
{
if ( n2 != 2 ) /*0xffcf25c0*/
return 5; /*0xffcf25c5*/
*((_BYTE *)buf + 43580) = 5; /*0xffcf25ca*/
}
buf[1] = a1; /*0xffcf25e9*/
buf[5] = a1 + a2; /*0xffcf25f0*/
buf[2] = a3; /*0xffcf25f3*/
buf[6] = a3 + *p_n4096; /*0xffcf25fd*/
IioHuffBitCountEnc(buf, 0); /*0xffcf2600*/
IioHuffBitCountEnc(buf, 0); /*0xffcf2607*/
v8 = (_WORD *)buf + 6345; /*0xffcf260f*/
for ( i = 0; i <= 0xFF; ++i ) /*0xffcf2615*/
{
i_1 = i; /*0xffcf261a*/
n8 = 8; /*0xffcf261c*/
do /*0xffcf262b*/
{
if ( (i_1 & 1) != 0 ) /*0xffcf261f*/
i_1 ^= 0x14002u; /*0xffcf2621*/
i_1 >>= 1; /*0xffcf2626*/
--n8; /*0xffcf2628*/
}
while ( n8 ); /*0xffcf262b*/
*v8++ = i_1; /*0xffcf262d*/
}
buf[2139] = 0; /*0xffcf263d*/
buf[2140] = 0; /*0xffcf2643*/
buf[2138] = 0; /*0xffcf2649*/
if ( InitHelper((int)buf) < 0 ) /*0xffcf2658*/
return -2147483639; /*0xffcf265a*/
v12 = (_BYTE *)buf[2]; /*0xffcf2661*/
if ( (unsigned int)v12 < buf[6] ) /*0xffcf2667*/
{
*v12 = 0; /*0xffcf2669*/
++buf[2]; /*0xffcf266b*/
}
buf[2] = a3; /*0xffcf2672*/
IioHuffBitCountEnc(buf, buf[2139] + 1); /*0xffcf267e*/
IioHuffBitCountEnc(buf, buf[2140]); /*0xffcf268a*/
n4096 = buf[2139] + 9; /*0xffcf2698*/
if ( n4096 > *p_n4096 ) /*0xffcf269e*/
v6 = -2147483643; /*0xffcf26a0*/
*p_n4096 = n4096; /*0xffcf26a5*/
return v6; /*0xffcf26ab*/
}
// Function: IioHuffSymbolEncode @ 0xffcf26ae (0xd6 bytes)
// Index: 1899/2560
int __cdecl IioHuffSymbolEncode(int buf, unsigned int n0x100, unsigned int a3)
{
int v3; // ebx
bool v4; // zf
unsigned int v5; // eax
int v6; // eax
int result; // eax
unsigned int v8; // edx
v3 = 0; /*0xffcf26b6*/
v4 = *(_DWORD *)(buf + 8540) >> 1 == 0; /*0xffcf26b7*/
*(_DWORD *)(buf + 8540) >>= 1; /*0xffcf26b7*/
if ( v4 ) /*0xffcf26bd*/
{
v5 = *(_DWORD *)(buf + 8532) - 24; /*0xffcf26c5*/
*(_DWORD *)(buf + 8540) = 128; /*0xffcf26c8*/
if ( *(_DWORD *)(buf + 8536) >= v5 ) /*0xffcf26d8*/
{
IioHuffEncodeStep((unsigned __int8 *)buf); /*0xffcf26db*/
*(_DWORD *)(buf + 8536) = 0; /*0xffcf26e1*/
}
v6 = *(_DWORD *)(buf + 8536); /*0xffcf26e7*/
*(_DWORD *)(buf + 8564) = v6; /*0xffcf26ed*/
*(_DWORD *)(buf + 8536) = v6 + 1; /*0xffcf26f4*/
*(_BYTE *)(*(_DWORD *)(buf + 8564) + buf + 4892) = 0; /*0xffcf2700*/
}
result = *(_DWORD *)(buf + 8536); /*0xffcf2707*/
*(_BYTE *)(result + buf + 4892) = n0x100; /*0xffcf2711*/
++*(_DWORD *)(buf + 8536); /*0xffcf2718*/
++*(_WORD *)(buf + 2 * n0x100 + 13202); /*0xffcf271e*/
if ( n0x100 >= 0x100 ) /*0xffcf272c*/
{
v8 = a3; /*0xffcf273a*/
*(_BYTE *)(*(_DWORD *)(buf + 8564) + buf + 4892) |= *(_BYTE *)(buf + 8540); /*0xffcf273e*/
*(_BYTE *)(*(_DWORD *)(buf + 8536) + buf + 4892) = BYTE1(a3); /*0xffcf2750*/
result = ++*(_DWORD *)(buf + 8536); /*0xffcf275d*/
*(_BYTE *)(result + buf + 4892) = a3; /*0xffcf2763*/
++*(_DWORD *)(buf + 8536); /*0xffcf276a*/
if ( a3 ) /*0xffcf2772*/
{
do /*0xffcf2777*/
{
++v3; /*0xffcf2774*/
v8 >>= 1; /*0xffcf2775*/
}
while ( v8 ); /*0xffcf2777*/
}
++*(_WORD *)(buf + 2 * v3 + 16260); /*0xffcf2779*/
}
return result; /*0xffcf2781*/
}
// Function: IioFn_FFCF2784 @ 0xffcf2784 (0x46 bytes)
// Index: 1900/2560
int __cdecl IioFn_FFCF2784(int __return_address, int a2, int a3, int a4, int *p_n4096)
{
_DWORD buf[10896]; // [esp+0h] [ebp-AA40h] BYREF
memset_save_flags(buf, 0, 0xAA40u); /*0xffcf279b*/
buf[0] = __return_address; /*0xffcf27a3*/
return InitHelper_0(a2, a3, a4, (unsigned int *)p_n4096, 2, buf); /*0xffcf27c6*/
}
// Function: IioHuffTreeInit @ 0xffcf27ca (0x5a bytes)
// Index: 1901/2560
int __cdecl IioHuffTreeInit(int a1, int a2)
{
int n16; // eax
int v3; // [esp-8h] [ebp-10h]
int v4; // [esp-4h] [ebp-Ch]
int v5; // [esp+0h] [ebp-8h]
int v6; // [esp+4h] [ebp-4h]
if ( a2 >= *(_DWORD *)(a1 + 8528) ) /*0xffcf27da*/
{
++*(_DWORD *)(a1 + 34872); /*0xffcf27f4*/
IioHuffTreeInit(a1, *(unsigned __int16 *)(a1 + 2 * a2 + 8614), v5, v6); /*0xffcf2804*/
n16 = IioHuffTreeInit(a1, *(unsigned __int16 *)(a1 + 2 * a2 + 10652), v3, v4); /*0xffcf2813*/
--*(_DWORD *)(a1 + 34872); /*0xffcf281b*/
}
else
{
n16 = *(_DWORD *)(a1 + 34872); /*0xffcf27dc*/
if ( n16 >= 16 ) /*0xffcf27e5*/
n16 = 16; /*0xffcf27e9*/
++*(_WORD *)(a1 + 2 * n16 + 8580); /*0xffcf27ea*/
}
return n16; /*0xffcf2821*/
}
// Function: IioHuffFreqTableInit @ 0xffcf2824 (0x8d bytes)
// Index: 1902/2560
int __cdecl IioHuffFreqTableInit(unsigned __int8 *buf)
{
unsigned __int8 *v1; // ebx
int n510; // ecx
int n510_1; // eax
int v4; // esi
int n2; // esi
v1 = buf + 16364; /*0xffcf282e*/
memset(buf + 16364, 0, 0x24u); /*0xffcf2837*/
n510 = 510; /*0xffcf2839*/
*((_WORD *)buf + 8200) = 0; /*0xffcf283e*/
do /*0xffcf284d*/
{
if ( buf[n510 + 6939] ) /*0xffcf2840*/
break; /*0xffcf2848*/
--n510; /*0xffcf284a*/
}
while ( n510 > 0 ); /*0xffcf284d*/
n510_1 = 0; /*0xffcf284f*/
while ( n510_1 < n510 ) /*0xffcf2853*/
{
v4 = buf[n510_1++ + 6940]; /*0xffcf2856*/
if ( v4 ) /*0xffcf2861*/
{
++*(_WORD *)&buf[2 * v4 + 16368]; /*0xffcf28a1*/
continue; /*0xffcf28a1*/
}
n2 = 1; /*0xffcf2863*/
if ( n510_1 >= n510 ) /*0xffcf2866*/
goto LABEL_15; /*0xffcf2866*/
do /*0xffcf2876*/
{
if ( buf[n510_1 + 6940] ) /*0xffcf2868*/
break; /*0xffcf2870*/
++n510_1; /*0xffcf2872*/
++n2; /*0xffcf2873*/
}
while ( n510_1 < n510 ); /*0xffcf2876*/
if ( n2 <= 2 ) /*0xffcf287b*/
{
LABEL_15:
*(_WORD *)v1 += n2; /*0xffcf289c*/
continue; /*0xffcf289f*/
}
if ( n2 > 18 ) /*0xffcf2880*/
{
if ( n2 != 19 ) /*0xffcf2885*/
{
++*((_WORD *)buf + 8184); /*0xffcf2893*/
continue; /*0xffcf289a*/
}
++*(_WORD *)v1; /*0xffcf2887*/
}
++*((_WORD *)buf + 8183); /*0xffcf288a*/
}
return n510_1; /*0xffcf28ae*/
}
// Function: IioHuffNodeRemove @ 0xffcf28b1 (0x1fa bytes)
// Index: 1903/2560
int __cdecl IioHuffNodeRemove(int buf)
{
int result; // eax
__int16 v3; // dx
__int16 v4; // cx
int bufa_1; // ecx
int bufa_2; // ebp
__int16 v7; // ax
__int16 v8; // si
unsigned __int16 n0x400; // dx
int n0x400_1; // edi
__int16 v11; // cx
__int16 v12; // ax
__int16 v13; // ax
__int16 v14; // ax
__int16 v15; // dx
__int16 v16; // cx
__int16 v17; // cx
__int16 v18; // cx
int bufa_3; // [esp+4h] [ebp-4h]
int bufa; // [esp+Ch] [ebp+4h]
result = *(__int16 *)(buf + 16438); /*0xffcf28b7*/
if ( *(_WORD *)(buf + 2 * result + 19004) ) /*0xffcf28be*/
{
v3 = *(_WORD *)(buf + 2 * result + 23100); /*0xffcf28cd*/
v4 = *(_WORD *)(buf + 2 * result + 27196); /*0xffcf28d5*/
*(_WORD *)(buf + 2 * v3 + 27196) = v4; /*0xffcf28e9*/
*(_WORD *)(buf + 2 * v4 + 23100) = v3; /*0xffcf28f4*/
result = *(__int16 *)(buf + 16438); /*0xffcf28fc*/
bufa_1 = *(unsigned __int16 *)(buf + 2 * result + 19004); /*0xffcf2903*/
*(_WORD *)(buf + 2 * result + 19004) = 0; /*0xffcf290b*/
bufa = bufa_1; /*0xffcf2915*/
if ( (unsigned __int16)bufa_1 < 0x400u ) /*0xffcf291c*/
{
bufa_2 = (__int16)bufa_1; /*0xffcf2923*/
bufa_3 = (__int16)bufa_1; /*0xffcf2926*/
if ( --*(_BYTE *)(buf + (__int16)bufa_1 + 3612) <= 1u ) /*0xffcf2939*/
{
v7 = *(_WORD *)(buf + 2 * (__int16)bufa_1 + 16444) & 0x7FFF; /*0xffcf294c*/
v8 = v7; /*0xffcf294f*/
if ( v7 >= *(__int16 *)(buf + 16438) ) /*0xffcf2959*/
v8 = v7 - 1024; /*0xffcf295b*/
n0x400 = *(_WORD *)(buf + 2 * (__int16)bufa_1 + 19004); /*0xffcf295d*/
n0x400_1 = (__int16)n0x400; /*0xffcf2965*/
v11 = v8; /*0xffcf2968*/
v12 = *(_WORD *)(buf + 2 * (__int16)n0x400 + 16444); /*0xffcf296b*/
if ( v12 < 0 ) /*0xffcf2978*/
{
do /*0xffcf29bb*/
{
v13 = v12 & 0x7FFF; /*0xffcf297f*/
if ( v13 >= *(__int16 *)(buf + 16438) ) /*0xffcf298b*/
v13 -= 1024; /*0xffcf298d*/
if ( v13 > v11 ) /*0xffcf2992*/
v11 = v13; /*0xffcf2994*/
n0x400 = *(_WORD *)(buf + 2 * n0x400_1 + 19004); /*0xffcf2997*/
*(_WORD *)(buf + 2 * n0x400_1 + 16444) = v11 | 0x400; /*0xffcf29a3*/
n0x400_1 = (__int16)n0x400; /*0xffcf29ab*/
v12 = *(_WORD *)(buf + 2 * (__int16)n0x400 + 16444); /*0xffcf29ae*/
}
while ( v12 < 0 ); /*0xffcf29bb*/
bufa_2 = bufa_3; /*0xffcf29bd*/
}
if ( n0x400 < 0x400u ) /*0xffcf29c9*/
{
if ( v12 >= *(__int16 *)(buf + 16438) ) /*0xffcf29d2*/
v12 -= 1024; /*0xffcf29d4*/
if ( v12 > v11 ) /*0xffcf29d9*/
v11 = v12; /*0xffcf29db*/
*(_WORD *)(buf + 2 * (__int16)n0x400 + 16444) = v11 | 0x8400; /*0xffcf29e7*/
}
v14 = IioFunc2568(buf, bufa, *(_BYTE *)(v8 + buf + *(unsigned __int8 *)(buf + bufa_2 + 28) + 1308)); /*0xffcf2a07*/
v15 = *(_WORD *)(buf + 2 * v14 + 23100); /*0xffcf2a15*/
v16 = *(_WORD *)(buf + 2 * v14 + 27196); /*0xffcf2a1d*/
*(_WORD *)(buf + 2 * v15 + 27196) = v16; /*0xffcf2a28*/
*(_WORD *)(buf + 2 * v16 + 23100) = v15; /*0xffcf2a33*/
v17 = *(_WORD *)(buf + 2 * bufa_2 + 23100); /*0xffcf2a3b*/
*(_WORD *)(buf + 2 * v17 + 27196) = v14; /*0xffcf2a46*/
*(_WORD *)(buf + 2 * v14 + 23100) = v17; /*0xffcf2a4e*/
v18 = *(_WORD *)(buf + 2 * bufa_2 + 27196); /*0xffcf2a56*/
*(_WORD *)(buf + 2 * v18 + 23100) = v14; /*0xffcf2a61*/
*(_WORD *)(buf + 2 * v14 + 27196) = v18; /*0xffcf2a69*/
*(_WORD *)(buf + 2 * v14 + 19004) = *(_WORD *)(buf + 2 * bufa_2 + 19004); /*0xffcf2a79*/
*(_WORD *)(buf + 2 * bufa_2 + 19004) = 0; /*0xffcf2a83*/
*(_WORD *)(buf + 2 * bufa_2 + 27196) = *(_WORD *)(buf + 16442); /*0xffcf2a92*/
*(_WORD *)(buf + 16442) = bufa; /*0xffcf2a9e*/
return bufa; /*0xffcf2a9a*/
}
}
}
return result; /*0xffcf2aa8*/
}
// Function: IioHuffDynFreqInc @ 0xffcf2aab (0x82 bytes)
// Index: 1904/2560
__int16 __cdecl IioHuffDynFreqInc(int buf, int a2)
{
int v2; // ebx
int v3; // esi
int v4; // ebp
int v5; // edx
int v6; // eax
v2 = a2; /*0xffcf2aac*/
v3 = 2 * a2; /*0xffcf2ab7*/
v4 = *(__int16 *)(buf + 2 * a2 + 7488); /*0xffcf2aba*/
while ( 1 ) /*0xffcf2b16*/
{
v6 = *(_DWORD *)(buf + 8524); /*0xffcf2b16*/
if ( v3 > v6 ) /*0xffcf2b1e*/
break; /*0xffcf2b1e*/
if ( v3 < v6 /*0xffcf2ae4*/
&& *(_WORD *)(*(_DWORD *)(buf + 8572) + 2 * *(__int16 *)(buf + 2 * v3 + 7488)) > *(_WORD *)(*(_DWORD *)(buf + 8572)
+ 2
* *(__int16 *)(buf + 2 * v3 + 7490)) )
{
++v3; /*0xffcf2ae6*/
}
v5 = *(_DWORD *)(buf + 8572); /*0xffcf2aef*/
LOWORD(v6) = *(_WORD *)(v5 + 2 * v4); /*0xffcf2afc*/
if ( (unsigned __int16)v6 <= *(_WORD *)(v5 + 2 * *(__int16 *)(buf + 2 * v3 + 7488)) ) /*0xffcf2b04*/
break; /*0xffcf2b04*/
*(_WORD *)(buf + 2 * v2 + 7488) = *(_WORD *)(buf + 2 * v3 + 7488); /*0xffcf2b0a*/
v2 = v3; /*0xffcf2b12*/
v3 *= 2; /*0xffcf2b14*/
}
*(_WORD *)(buf + 2 * v2 + 7488) = v4; /*0xffcf2b20*/
return v6; /*0xffcf2b28*/
}
// Function: InitHelper @ 0xffcf2b2d (0x145 bytes)
// Index: 1905/2560
int __cdecl InitHelper(int buf)
{
int v1; // ebx
int v2; // eax
int v3; // eax
int n3; // edi
__int16 v5; // bp
int v6; // eax
int v7; // eax
v1 = 0; /*0xffcf2b33*/
*(_DWORD *)(buf + 8532) = 2048; /*0xffcf2b36*/
*(_BYTE *)(buf + 4892) = 0; /*0xffcf2b40*/
IioHuffLenEncode((_WORD *)buf); /*0xffcf2b47*/
IioHuffBitEncode((_DWORD *)buf); /*0xffcf2b4d*/
v2 = IioHuffLeafEncode((_DWORD *)buf, (_BYTE *)(buf + 2332), 1280); /*0xffcf2b5f*/
*(_DWORD *)(buf + 8516) = 0; /*0xffcf2b64*/
*(_DWORD *)(buf + 8512) = v2; /*0xffcf2b6a*/
*(_WORD *)(buf + 16438) = 1024; /*0xffcf2b76*/
MemInit(buf); /*0xffcf2b7d*/
v3 = *(_DWORD *)(buf + 8512); /*0xffcf2b82*/
if ( *(_DWORD *)(buf + 8516) > v3 ) /*0xffcf2b91*/
*(_DWORD *)(buf + 8516) = v3; /*0xffcf2b93*/
if ( v3 > 0 ) /*0xffcf2b9b*/
{
do /*0xffcf2c52*/
{
n3 = *(_DWORD *)(buf + 8516); /*0xffcf2ba3*/
v5 = *(_WORD *)(buf + 16440); /*0xffcf2ba9*/
if ( !DxeInit_4(buf) ) /*0xffcf2bb1*/
v1 = -2147483639; /*0xffcf2bbb*/
v6 = *(_DWORD *)(buf + 8512); /*0xffcf2bc0*/
if ( *(_DWORD *)(buf + 8516) > v6 ) /*0xffcf2bcc*/
*(_DWORD *)(buf + 8516) = v6; /*0xffcf2bce*/
if ( *(_DWORD *)(buf + 8516) > n3 || n3 < 3 ) /*0xffcf2bdf*/
{
IioHuffSymbolEncode(buf, *(unsigned __int8 *)(*(__int16 *)(buf + 16438) + buf + 1307), 0); /*0xffcf2c43*/
}
else
{
IioHuffSymbolEncode(buf, n3 + 253, (*(_WORD *)(buf + 16438) - v5 - 2) & 0x3FF); /*0xffcf2bfb*/
while ( --n3 > 0 ) /*0xffcf2c15*/
{
if ( !DxeInit_4(buf) ) /*0xffcf2c06*/
v1 = -2147483639; /*0xffcf2c10*/
}
v7 = *(_DWORD *)(buf + 8512); /*0xffcf2c1a*/
if ( *(_DWORD *)(buf + 8516) > v7 ) /*0xffcf2c26*/
*(_DWORD *)(buf + 8516) = v7; /*0xffcf2c28*/
}
}
while ( *(int *)(buf + 8512) > 0 ); /*0xffcf2c52*/
}
IioHuffEncodeStep((unsigned __int8 *)buf); /*0xffcf2c5b*/
IioFn_FFCF349F(buf, 7, 0); /*0xffcf2c65*/
return v1; /*0xffcf2c6f*/
}
// Function: IioHuffTableLookup @ 0xffcf2c72 (0x24 bytes)
// Index: 1906/2560
unsigned int __cdecl IioHuffTableLookup(unsigned __int8 *buf, int a2)
{
return IioFn_FFCF349F((int)buf, buf[a2 + 6940], *(unsigned __int16 *)&buf[2 * a2 + 15240]); /*0xffcf2c95*/
}
// Function: IioHuffLeafEncode @ 0xffcf2c96 (0x64 bytes)
// Index: 1907/2560
int __cdecl IioHuffLeafEncode(_DWORD *buf, _BYTE *a2, int n1280)
{
int i; // esi
_BYTE *v5; // eax
int i_1; // ebp
_BYTE *v7; // edi
int v8; // esi
unsigned int v9; // ebx
for ( i = 0; ; ++i ) /*0xffcf2ca1*/
{
v5 = (_BYTE *)buf[1]; /*0xffcf2ca3*/
if ( (unsigned int)v5 >= buf[5] || i >= n1280 ) /*0xffcf2caf*/
break; /*0xffcf2caf*/
*a2++ = *v5; /*0xffcf2cb3*/
++buf[1]; /*0xffcf2cb6*/
}
buf[2140] += i; /*0xffcf2cbc*/
i_1 = i; /*0xffcf2cc2*/
v7 = &a2[-i]; /*0xffcf2cc4*/
v8 = i - 1; /*0xffcf2cc6*/
if ( v8 >= 0 ) /*0xffcf2cc9*/
{
v9 = buf[2138]; /*0xffcf2ccc*/
do /*0xffcf2cf1*/
{
v9 = *((unsigned __int16 *)buf + (unsigned __int8)(v9 ^ *v7++) + 6345) ^ (v9 >> 8); /*0xffcf2ce5*/
--v8; /*0xffcf2ce8*/
buf[2138] = v9; /*0xffcf2ceb*/
}
while ( v8 >= 0 ); /*0xffcf2cf1*/
}
return i_1; /*0xffcf2cf4*/
}
// Function: DxeInit_4 @ 0xffcf2cfa (0x8f bytes)
// Index: 1908/2560
char __cdecl DxeInit_4(int buf)
{
int v1; // eax
char v3[1280]; // [esp+4h] [ebp-500h] BYREF
--*(_DWORD *)(buf + 8512); /*0xffcf2d0c*/
if ( ++*(_WORD *)(buf + 16438) == 2048 ) /*0xffcf2d20*/
{
AutoGenFunc8E72((int)v3, (char *)(buf + 2332), 1280); /*0xffcf2d37*/
AutoGenFunc8E72(buf + 1308, v3, 1280); /*0xffcf2d4b*/
v1 = IioHuffLeafEncode((_DWORD *)buf, (_BYTE *)(buf + 2588), 1024); /*0xffcf2d5e*/
*(_WORD *)(buf + 16438) = 1024; /*0xffcf2d66*/
*(_DWORD *)(buf + 8512) += v1; /*0xffcf2d6d*/
}
IioHuffNodeRemove(buf); /*0xffcf2d75*/
MemInit(buf); /*0xffcf2d7b*/
return 1; /*0xffcf2d84*/
}
// Function: IioHuffBitEncode @ 0xffcf2d89 (0x4b bytes)
// Index: 1909/2560
int __cdecl IioHuffBitEncode(_DWORD *buf)
{
int result; // eax
memset_save_flags((char *)buf + 13202, 0, 0x3FCu); /*0xffcf2d9e*/
result = memset_save_flags(buf + 4065, 0, 0x16u); /*0xffcf2dad*/
buf[2135] = 0; /*0xffcf2db5*/
buf[2134] = 0; /*0xffcf2dbb*/
buf[2137] = 0; /*0xffcf2dc1*/
buf[2130] = 8; /*0xffcf2dc7*/
return result; /*0xffcf2dd1*/
}
// Function: IioHuffLenEncode @ 0xffcf2dd4 (0x87 bytes)
// Index: 1910/2560
int __cdecl IioHuffLenEncode(_WORD *buf)
{
__int16 n0x3FF; // di
int v2; // eax
n0x3FF = 1; /*0xffcf2de1*/
memset_save_flags(buf + 526, 1, 0x100u); /*0xffcf2dea*/
memset_save_flags(buf + 8734, 0, 0x200u); /*0xffcf2dfd*/
memset_save_flags(buf + 10014, 0, 0x800u); /*0xffcf2e10*/
buf[8221] = 1; /*0xffcf2e18*/
do /*0xffcf2e38*/
{
v2 = n0x3FF++; /*0xffcf2e1f*/
buf[v2 + 13598] = n0x3FF; /*0xffcf2e28*/
}
while ( (unsigned __int16)n0x3FF < 0x3FFu ); /*0xffcf2e38*/
buf[14621] = 0; /*0xffcf2e42*/
return memset_save_flags(buf + 14622, 0, 0xDFCu); /*0xffcf2e58*/
}
// Function: MemInit @ 0xffcf2e5b (0x2ef bytes)
// Index: 1911/2560
int __cdecl MemInit(int buf)
{
int n4; // eax
int v3; // ebx
__int16 v4; // ax
__int16 i; // dx
__int16 i_1; // di
__int16 i_2; // ax
int j; // ecx
int v9; // ecx
int result; // eax
unsigned __int8 bufb_1; // cl
__int16 v12; // cx
__int16 v13; // ax
unsigned __int8 *p_bufa; // ebx
int v15; // eax
_BYTE *v16; // ecx
__int16 v17; // cx
__int16 v18; // cx
__int16 v19; // [esp+10h] [ebp-8h]
_BYTE *v20; // [esp+14h] [ebp-4h]
unsigned __int8 bufa; // [esp+1Ch] [ebp+4h]
int bufb; // [esp+1Ch] [ebp+4h]
v20 = *(_BYTE **)buf; /*0xffcf2e6c*/
n4 = *(_DWORD *)(buf + 8516); /*0xffcf2e70*/
if ( n4 < 4 )
{
v9 = *(__int16 *)(buf + 16438); /*0xffcf2f14*/
i_1 = *(unsigned __int8 *)(v9 + buf + 1308) + 1024; /*0xffcf2f26*/
bufa = *(_BYTE *)(v9 + buf + 1309); /*0xffcf2f30*/
i = IioFunc2568(buf, i_1, bufa); /*0xffcf2f3f*/
if ( i ) /*0xffcf2f48*/
{
*(_DWORD *)(buf + 8516) = 2; /*0xffcf2f6f*/
goto LABEL_16; /*0xffcf2f6f*/
}
result = IioFn_FFCF314A(buf, i_1, bufa, *(_WORD *)(buf + 16438)); /*0xffcf2f58*/
*(_DWORD *)(buf + 8516) = 1; /*0xffcf2f60*/
}
else
{
v3 = n4 - 1; /*0xffcf2e7f*/
v4 = *(_WORD *)(buf + 16440) + 1; /*0xffcf2e89*/
*(_DWORD *)(buf + 8516) = v3; /*0xffcf2e8b*/
for ( i = v4 | 0x400; ; i = *(_WORD *)(buf + 2 * i + 27196) ) /*0xffcf2e94*/
{
i_1 = *(_WORD *)(buf + 2 * i + 19004); /*0xffcf2ea4*/
if ( i_1 ) /*0xffcf2eaf*/
break; /*0xffcf2eaf*/
}
while ( *(unsigned __int8 *)(i_1 + buf + 28) >= v3 ) /*0xffcf2ec8*/
{
i = i_1; /*0xffcf2eb3*/
i_1 = *(_WORD *)(buf + 2 * i_1 + 19004); /*0xffcf2eb6*/
}
i_2 = i_1; /*0xffcf2eca*/
for ( j = i_1; *(__int16 *)(buf + 2 * j + 16444) < 0; j = i_2 ) /*0xffcf2ecf*/
{
*(_WORD *)(buf + 2 * j + 16444) = *(_WORD *)(buf + 16438); /*0xffcf2edb*/
i_2 = *(_WORD *)(buf + 2 * j + 19004); /*0xffcf2ee3*/
}
if ( (unsigned __int16)i_2 < 0x400u ) /*0xffcf2efb*/
*(_WORD *)(buf + 2 * i_2 + 16444) = *(_WORD *)(buf + 16438) | 0x8000; /*0xffcf2f0a*/
while ( 1 )
{
LABEL_16:
if ( (unsigned __int16)i < 0x400u ) /*0xffcf2f7c*/
{
bufb_1 = *(_BYTE *)(i + buf + 28); /*0xffcf2f97*/
*(_WORD *)(buf + 16440) = *(_WORD *)(buf + 2 * i + 16444) & 0x7FFF; /*0xffcf2fa6*/
bufb = bufb_1; /*0xffcf2fb0*/
}
else
{
*(_WORD *)(buf + 16440) = i; /*0xffcf2f7e*/
bufb = 256; /*0xffcf2f85*/
}
v12 = *(_WORD *)(buf + 16438); /*0xffcf2fb4*/
v13 = *(_WORD *)(buf + 16440); /*0xffcf2fbb*/
v19 = v12; /*0xffcf2fc2*/
if ( v13 >= v12 ) /*0xffcf2fc9*/
*(_WORD *)(buf + 16440) = v13 - 1024; /*0xffcf2fd0*/
p_bufa = (unsigned __int8 *)(*(_DWORD *)(buf + 8516) + v12 + buf + 1308); /*0xffcf2fe6*/
v15 = *(_DWORD *)(buf + 8516) + *(__int16 *)(buf + 16440); /*0xffcf2fef*/
if ( v15 < 0 )
{
AssertPrint(
v20,
255,
(int)"\n\nRC_ASSERT! %s: %u %s ",
"e:\\hs\\CpRcPkg\\Library\\BaseMemoryCoreLib\\Core\\Common\\Compress.c",
345,
"FALSE");
return ProcMemInitCheck((int)v20, 242, 65); /*0xffcf313b*/
}
v16 = (_BYTE *)(v15 + buf + 1308); /*0xffcf3001*/
if ( *(_DWORD *)(buf + 8516) < bufb ) /*0xffcf300d*/
break; /*0xffcf300d*/
LABEL_25:
if ( *(int *)(buf + 8516) >= 256 ) /*0xffcf3033*/
{
v17 = *(_WORD *)(buf + 2 * i + 23100); /*0xffcf309b*/
*(_WORD *)(buf + 2 * *(__int16 *)(buf + 16438) + 23100) = v17; /*0xffcf30a3*/
*(_WORD *)(buf + 2 * v17 + 27196) = *(_WORD *)(buf + 16438); /*0xffcf30b5*/
v18 = *(_WORD *)(buf + 2 * i + 27196); /*0xffcf30c4*/
*(_WORD *)(buf + 2 * *(__int16 *)(buf + 16438) + 27196) = v18; /*0xffcf30cc*/
*(_WORD *)(buf + 2 * v18 + 23100) = *(_WORD *)(buf + 16438); /*0xffcf30de*/
*(_WORD *)(buf + 2 * *(__int16 *)(buf + 16438) + 19004) = i_1; /*0xffcf30ed*/
*(_WORD *)(buf + 2 * i + 19004) = 0; /*0xffcf30f7*/
result = *(unsigned __int16 *)(buf + 16438); /*0xffcf30ff*/
*(_WORD *)(buf + 2 * i + 27196) = result; /*0xffcf3106*/
return result; /*0xffcf310e*/
}
i_1 = i; /*0xffcf303c*/
*(_WORD *)(buf + 2 * i + 16444) = v19; /*0xffcf303f*/
i = IioFunc2568(buf, i, *p_bufa); /*0xffcf3052*/
if ( !i ) /*0xffcf305b*/
return IioFn_FFCF314A(buf, i_1, *p_bufa, *(_WORD *)(buf + 16438)); /*0xffcf308c*/
++*(_DWORD *)(buf + 8516); /*0xffcf305d*/
}
while ( *p_bufa == *v16 ) /*0xffcf3013*/
{
++*(_DWORD *)(buf + 8516); /*0xffcf3015*/
++p_bufa; /*0xffcf301b*/
++v16; /*0xffcf3020*/
if ( *(_DWORD *)(buf + 8516) >= bufb ) /*0xffcf3027*/
goto LABEL_25; /*0xffcf3027*/
}
return IioFunc3791(buf, i); /*0xffcf306a*/
}
return result; /*0xffcf3143*/
}
// Function: IioFn_FFCF314A @ 0xffcf314a (0x70 bytes)
// Index: 1912/2560
int __cdecl IioFn_FFCF314A(int buf, __int16 i, unsigned __int8 bufa, __int16 a4)
{
__int16 v4; // di
__int16 v5; // cx
v4 = i + 2 * (bufa + 1024); /*0xffcf3172*/
v5 = *(_WORD *)(buf + 2 * v4 + 27196); /*0xffcf3178*/
*(_WORD *)(buf + 2 * v4 + 27196) = a4; /*0xffcf3180*/
*(_WORD *)(buf + 2 * a4 + 27196) = v5; /*0xffcf318b*/
*(_WORD *)(buf + 2 * v5 + 23100) = a4; /*0xffcf3193*/
*(_WORD *)(buf + 2 * a4 + 23100) = v4; /*0xffcf319b*/
*(_WORD *)(buf + 2 * a4 + 19004) = i; /*0xffcf31a3*/
++*(_BYTE *)(i + buf + 3612); /*0xffcf31b1*/
return i; /*0xffcf31ab*/
}
// Function: IioHuffWriteBits @ 0xffcf31ba (0xec bytes)
// Index: 1913/2560
int __cdecl IioHuffWriteBits(int buf, int n510)
{
int v2; // edx
unsigned __int16 *v3; // ebp
int n0x10000; // esi
int n16_1; // ecx
int n16; // ebx
int v7; // eax
_WORD *v8; // edi
int v9; // esi
_WORD *v10; // ecx
int n15; // eax
int n2; // eax
int v13; // esi
_WORD *v14; // [esp+10h] [ebp-4h]
memset((void *)(buf + 8580), 0, 0x20u); /*0xffcf31d2*/
*(_WORD *)(buf + 8612) = 0; /*0xffcf31d5*/
IioHuffTreeInit(buf, n510); /*0xffcf31d7*/
v14 = (_WORD *)(v2 + 8612); /*0xffcf31e7*/
v3 = (unsigned __int16 *)(v2 + 8612); /*0xffcf31eb*/
n0x10000 = 0; /*0xffcf31ed*/
n16_1 = 0; /*0xffcf31ef*/
n16 = 16; /*0xffcf31f3*/
do /*0xffcf3204*/
{
v7 = *v3--; /*0xffcf31f7*/
n0x10000 += v7 << n16_1++; /*0xffcf31ff*/
}
while ( n16_1 < 16 ); /*0xffcf3204*/
v8 = (_WORD *)(v2 + 8612); /*0xffcf3206*/
if ( n0x10000 != 0x10000 ) /*0xffcf3212*/
{
v9 = n0x10000 - 0x10000; /*0xffcf3216*/
do /*0xffcf325e*/
{
--*v8; /*0xffcf3222*/
v10 = (_WORD *)(v2 + 8610); /*0xffcf3225*/
n15 = 15; /*0xffcf322d*/
while ( !*v10 ) /*0xffcf3236*/
{
--n15; /*0xffcf3238*/
--v10; /*0xffcf3239*/
if ( n15 <= 0 ) /*0xffcf323d*/
goto LABEL_10; /*0xffcf323d*/
}
--*(_WORD *)(v2 + 2 * n15 + 8580); /*0xffcf3246*/
*(_WORD *)(v2 + 2 * n15 + 8582) += 2; /*0xffcf324e*/
LABEL_10:
--v9; /*0xffcf3256*/
}
while ( v9 ); /*0xffcf325e*/
n16 = 16; /*0xffcf3262*/
}
n2 = 2; /*0xffcf3265*/
do /*0xffcf329e*/
{
v13 = (unsigned __int16)*v8 - 1; /*0xffcf3269*/
if ( v13 >= 0 ) /*0xffcf326c*/
{
do /*0xffcf328c*/
{
*(_BYTE *)(**(unsigned __int16 **)(v2 + 8576) + *(_DWORD *)(v2 + 7484)) = n16; /*0xffcf3280*/
*(_DWORD *)(v2 + 8576) += 2; /*0xffcf3283*/
--v13; /*0xffcf3289*/
}
while ( v13 >= 0 ); /*0xffcf328c*/
v8 = v14; /*0xffcf328e*/
n2 = 2; /*0xffcf3294*/
}
--n16; /*0xffcf3295*/
v14 = --v8; /*0xffcf3298*/
}
while ( n16 > 0 ); /*0xffcf329e*/
return n2; /*0xffcf32a0*/
}
// Function: IioHuffTreeBuild @ 0xffcf32a6 (0x1f9 bytes)
// Index: 1914/2560
int __cdecl IioHuffTreeBuild(unsigned __int8 *buf, int n510, int a3, int a4, int a5)
{
int v6; // ecx
int n2; // eax
int v9; // ebp
int n16; // edi
int n510_1; // ebx
unsigned __int8 *bufa_1; // ecx
int v13; // edx
int n510_2; // ebp
unsigned __int8 *v15; // esi
int n510_3; // ebx
__int16 v17; // ax
int v18; // [esp+8h] [ebp-28h]
_WORD v20[17]; // [esp+Eh] [ebp-22h]
unsigned __int8 *bufa; // [esp+34h] [ebp+4h]
__int16 v22; // [esp+3Ch] [ebp+Ch]
*((_DWORD *)buf + 2143) = a3; /*0xffcf32bd*/
*((_DWORD *)buf + 1871) = a4; /*0xffcf32c7*/
*((_DWORD *)buf + 2132) = n510; /*0xffcf32cf*/
v6 = 0; /*0xffcf32d5*/
*((_DWORD *)buf + 2131) = 0; /*0xffcf32d7*/
for ( *((_WORD *)buf + 3745) = 0; v6 < *((_DWORD *)buf + 2132); ++v6 ) /*0xffcf32ea*/
{
*(_BYTE *)(v6 + *((_DWORD *)buf + 1871)) = 0; /*0xffcf32f2*/
if ( *(_WORD *)(*((_DWORD *)buf + 2143) + 2 * v6) ) /*0xffcf32fb*/
{
++*((_DWORD *)buf + 2131); /*0xffcf3301*/
*(_WORD *)&buf[2 * *((_DWORD *)buf + 2131) + 7488] = v6; /*0xffcf330d*/
}
}
n2 = *((_DWORD *)buf + 2131); /*0xffcf331e*/
if ( n2 >= 2 ) /*0xffcf3327*/
{
v9 = n2 / 2; /*0xffcf334f*/
n16 = 1; /*0xffcf3351*/
while ( v9 >= 1 ) /*0xffcf3360*/
IioHuffDynFreqInc((int)buf, v9--); /*0xffcf3356*/
n510_1 = n510; /*0xffcf3366*/
*((_DWORD *)buf + 2144) = a5; /*0xffcf336a*/
do /*0xffcf3425*/
{
bufa_1 = (unsigned __int8 *)*((__int16 *)buf + 3745); /*0xffcf3370*/
bufa = bufa_1; /*0xffcf3377*/
if ( (int)bufa_1 < *((_DWORD *)buf + 2132) ) /*0xffcf3381*/
{
**((_WORD **)buf + 2144) = (_WORD)bufa_1; /*0xffcf3389*/
*((_DWORD *)buf + 2144) += 2; /*0xffcf338c*/
}
*((_WORD *)buf + 3745) = *(_WORD *)&buf[2 * (*((_DWORD *)buf + 2131))-- + 7488]; /*0xffcf33a3*/
IioHuffDynFreqInc((int)buf, 1); /*0xffcf33b0*/
v13 = *((__int16 *)buf + 3745); /*0xffcf33b5*/
v22 = *((_WORD *)buf + 3745); /*0xffcf33be*/
if ( v13 < *((_DWORD *)buf + 2132) ) /*0xffcf33c8*/
{
**((_WORD **)buf + 2144) = v13; /*0xffcf33d0*/
*((_DWORD *)buf + 2144) += 2; /*0xffcf33d3*/
}
n510_2 = n510_1; /*0xffcf33e0*/
v18 = n510_1++; /*0xffcf33e4*/
*(_WORD *)(*((_DWORD *)buf + 2143) + 2 * v18) = *(_WORD *)(*((_DWORD *)buf + 2143) + 2 * (_DWORD)bufa) /*0xffcf33f5*/
+ *(_WORD *)(*((_DWORD *)buf + 2143) + 2 * v13);
*((_WORD *)buf + 3745) = n510_2; /*0xffcf33f9*/
IioHuffDynFreqInc((int)buf, 1); /*0xffcf3400*/
*(_WORD *)&buf[2 * n510_2 + 8614] = (_WORD)bufa; /*0xffcf3409*/
*(_WORD *)&buf[2 * n510_2 + 10652] = v22; /*0xffcf3416*/
}
while ( *((int *)buf + 2131) > 1 ); /*0xffcf3425*/
*((_DWORD *)buf + 2144) = a5; /*0xffcf3431*/
IioHuffWriteBits((int)buf, n510_2); /*0xffcf3437*/
v15 = buf + 8582; /*0xffcf343e*/
v20[0] = 0; /*0xffcf3446*/
n510_3 = 0; /*0xffcf344b*/
do /*0xffcf3464*/
{
v17 = *(_WORD *)v15 + v20[n16 - 1]; /*0xffcf3452*/
v15 += 2; /*0xffcf3455*/
v20[n16++] = 2 * v17; /*0xffcf345b*/
}
while ( n16 <= 16 ); /*0xffcf3464*/
if ( n510 > 0 ) /*0xffcf346c*/
{
do /*0xffcf348f*/
{
*(_WORD *)(a5 + 2 * n510_3) = v20[*(unsigned __int8 *)(n510_3 + a4) - 1]++; /*0xffcf347f*/
++n510_3; /*0xffcf348c*/
}
while ( n510_3 < n510 ); /*0xffcf348f*/
return v18; /*0xffcf3491*/
}
return n510_2; /*0xffcf3496*/
}
else
{
*(_WORD *)(a5 + 2 * *((__int16 *)buf + 3745)) = 0; /*0xffcf3336*/
return *((__int16 *)buf + 3745); /*0xffcf333a*/
}
}
// Function: IioFn_FFCF349F @ 0xffcf349f (0x82 bytes)
// Index: 1915/2560
unsigned int __cdecl IioFn_FFCF349F(int a1, int a2, unsigned int a3)
{
int v3; // ecx
int v4; // ecx
unsigned int result; // eax
_BYTE *v6; // ebx
int n8_1; // esi
int n8; // ecx
_BYTE *v9; // ebx
v3 = *(_DWORD *)(a1 + 8520); /*0xffcf34a8*/
if ( a2 >= v3 ) /*0xffcf34b0*/
{
v6 = *(_BYTE **)(a1 + 8); /*0xffcf34c3*/
n8_1 = a2 - v3; /*0xffcf34c6*/
if ( (unsigned int)v6 < *(_DWORD *)(a1 + 24) ) /*0xffcf34d0*/
{
result = a3 >> n8_1; /*0xffcf34d6*/
LOBYTE(result) = *(_BYTE *)(a1 + 8548) | (a3 >> n8_1); /*0xffcf34d8*/
*v6 = result; /*0xffcf34de*/
++*(_DWORD *)(a1 + 8); /*0xffcf34e0*/
}
++*(_DWORD *)(a1 + 8556); /*0xffcf34e3*/
n8 = 8; /*0xffcf34eb*/
if ( n8_1 >= 8 ) /*0xffcf34ee*/
{
v9 = *(_BYTE **)(a1 + 8); /*0xffcf34f0*/
if ( (unsigned int)v9 < *(_DWORD *)(a1 + 24) ) /*0xffcf34f6*/
{
result = a3 >> (n8_1 - 8); /*0xffcf34fd*/
*v9 = result; /*0xffcf34ff*/
++*(_DWORD *)(a1 + 8); /*0xffcf3501*/
}
++*(_DWORD *)(a1 + 8556); /*0xffcf3504*/
n8 = 16; /*0xffcf350c*/
}
v4 = n8 - n8_1; /*0xffcf350d*/
*(_DWORD *)(a1 + 8548) = a3 << v4; /*0xffcf3511*/
}
else
{
v4 = v3 - a2; /*0xffcf34b6*/
result = a3 << v4; /*0xffcf34b8*/
*(_DWORD *)(a1 + 8548) |= a3 << v4; /*0xffcf34ba*/
}
*(_DWORD *)(a1 + 8520) = v4; /*0xffcf3519*/
return result; /*0xffcf351f*/
}
// Function: IioHuffBitCountEnc @ 0xffcf3521 (0x4c bytes)
// Index: 1916/2560
_BYTE *__cdecl IioHuffBitCountEnc(_DWORD *buf, int a2)
{
_BYTE *v2; // eax
_BYTE *v3; // esi
_BYTE *v4; // esi
_BYTE *result; // eax
v2 = (_BYTE *)buf[2]; /*0xffcf3529*/
if ( (unsigned int)v2 < buf[6] ) /*0xffcf352f*/
{
*v2 = a2; /*0xffcf3531*/
++buf[2]; /*0xffcf3533*/
}
v3 = (_BYTE *)buf[2]; /*0xffcf3537*/
if ( (unsigned int)v3 < buf[6] ) /*0xffcf353d*/
{
*v3 = BYTE1(a2); /*0xffcf3544*/
++buf[2]; /*0xffcf3546*/
}
v4 = (_BYTE *)buf[2]; /*0xffcf3549*/
if ( (unsigned int)v4 < buf[6] ) /*0xffcf354f*/
{
*v4 = BYTE2(a2); /*0xffcf3556*/
++buf[2]; /*0xffcf3558*/
}
result = (_BYTE *)buf[2]; /*0xffcf355b*/
if ( (unsigned int)result < buf[6] ) /*0xffcf3562*/
{
*result = HIBYTE(a2); /*0xffcf3567*/
++buf[2]; /*0xffcf3569*/
}
return result; /*0xffcf356c*/
}
// Function: IioHuffEncodeStep @ 0xffcf356d (0x224 bytes)
// Index: 1917/2560
int __cdecl IioHuffEncodeStep(unsigned __int8 *buf)
{
int bufa_1; // ebx
unsigned int n0x1FE; // edi
unsigned int n0x13; // edi
unsigned int n0xB; // edi
int n5; // eax
unsigned int v7; // eax
int v8; // edi
int v9; // eax
int v10; // ebp
int v11; // eax
bool v12; // zf
unsigned int v13; // ebp
unsigned int v14; // ebx
unsigned int v15; // eax
unsigned int v17; // [esp+10h] [ebp-10h]
unsigned int v18; // [esp+14h] [ebp-Ch]
unsigned __int8 *buf_1; // [esp+18h] [ebp-8h]
int bufa; // [esp+24h] [ebp+4h]
bufa_1 = 0; /*0xffcf357d*/
buf_1 = buf + 13202; /*0xffcf3596*/
n0x1FE = IioHuffTreeBuild(buf, 510, (int)(buf + 13202), (int)(buf + 6940), (int)(buf + 15240)); /*0xffcf359f*/
v18 = *(unsigned __int16 *)&buf[2 * n0x1FE + 13202]; /*0xffcf35ad*/
IioFn_FFCF349F((int)buf, 16, v18); /*0xffcf35b1*/
if ( n0x1FE < 0x1FE ) /*0xffcf35bb*/
{
IioFn_FFCF349F((int)buf, 5, 0); /*0xffcf361f*/
IioFn_FFCF349F((int)buf, 5, 0); /*0xffcf3629*/
IioFn_FFCF349F((int)buf, 9, 0); /*0xffcf3633*/
IioFn_FFCF349F((int)buf, 9, n0x1FE); /*0xffcf363c*/
}
else
{
IioHuffFreqTableInit(buf); /*0xffcf35be*/
n0x13 = IioHuffTreeBuild(buf, 19, (int)(buf + 16364), (int)(buf + 7450), (int)(buf + 16302)); /*0xffcf35e0*/
if ( n0x13 < 0x13 ) /*0xffcf35e8*/
{
IioFn_FFCF349F((int)buf, 5, 0); /*0xffcf3600*/
IioFn_FFCF349F((int)buf, 5, n0x13); /*0xffcf3609*/
}
else
{
IioFunc399B((int)buf, 19, 5, 3); /*0xffcf35f1*/
}
IioFunc385F((int)buf); /*0xffcf3612*/
}
n0xB = IioHuffTreeBuild(buf, 11, (int)(buf + 16260), (int)(buf + 7450), (int)(buf + 16302)); /*0xffcf3665*/
n5 = buf[43580]; /*0xffcf366a*/
if ( n0xB < 0xB ) /*0xffcf3674*/
{
IioFn_FFCF349F((int)buf, n5, 0); /*0xffcf368a*/
IioFn_FFCF349F((int)buf, buf[43580], n0xB); /*0xffcf3699*/
}
else
{
IioFunc399B((int)buf, 11, n5, -1); /*0xffcf367c*/
}
LOBYTE(v7) = 0; /*0xffcf36a1*/
v8 = 0; /*0xffcf36a3*/
v17 = 0; /*0xffcf36a5*/
if ( v18 ) /*0xffcf36ad*/
{
do /*0xffcf3758*/
{
if ( (v7 & 7) != 0 ) /*0xffcf36b5*/
bufa_1 *= 2; /*0xffcf36c2*/
else
bufa_1 = buf[v8++ + 4892]; /*0xffcf36b7*/
v9 = buf[v8 + 4892]; /*0xffcf36c4*/
bufa = bufa_1; /*0xffcf36cc*/
if ( (bufa_1 & 0x80u) == 0 ) /*0xffcf36d2*/
{
IioFn_FFCF349F_w(buf, v9); /*0xffcf3788*/
}
else
{
IioFn_FFCF349F_w(buf, v9 + 256); /*0xffcf36df*/
v10 = buf[v8 + 4893]; /*0xffcf36e4*/
v8 += 2; /*0xffcf36ec*/
v10 <<= 8; /*0xffcf36f1*/
v11 = buf[v8 + 4892]; /*0xffcf36f4*/
v12 = v11 + v10 == 0; /*0xffcf36fc*/
v13 = v11 + v10; /*0xffcf36fc*/
v14 = 0; /*0xffcf3700*/
v15 = v13; /*0xffcf3701*/
if ( !v12 ) /*0xffcf3703*/
{
do /*0xffcf3708*/
{
++v14; /*0xffcf3705*/
v15 >>= 1; /*0xffcf3706*/
}
while ( v15 ); /*0xffcf3708*/
}
IioFn_FFCF349F((int)buf, buf[v14 + 7450], *(unsigned __int16 *)&buf[2 * v14 + 16302]); /*0xffcf371d*/
if ( v14 > 1 ) /*0xffcf3728*/
IioFn_FFCF349F((int)buf, v14 - 1, v13 & (0xFFFFu >> (17 - v14))); /*0xffcf373e*/
bufa_1 = bufa; /*0xffcf3746*/
}
v7 = v17 + 1; /*0xffcf374e*/
++v8; /*0xffcf374f*/
v17 = v7; /*0xffcf3750*/
}
while ( v7 < v18 ); /*0xffcf3758*/
}
memset_save_flags(buf_1, 0, 0x3FCu); /*0xffcf3769*/
return memset_save_flags(buf + 16260, 0, 0x16u); /*0xffcf377e*/
}
// Function: IioFunc3791 @ 0xffcf3791 (0xce bytes)
// Index: 1918/2560
int __cdecl IioFunc3791(int buf, __int16 i)
{
__int16 i_1; // di
__int16 v4; // ax
__int16 v5; // ax
i_1 = *(_WORD *)(buf + 16442); /*0xffcf379f*/
*(_WORD *)(buf + 16442) = *(_WORD *)(buf + 2 * i_1 + 27196); /*0xffcf37b2*/
*(_BYTE *)(i_1 + buf + 3612) = 0; /*0xffcf37b9*/
v4 = *(_WORD *)(buf + 2 * i + 23100); /*0xffcf37c1*/
*(_WORD *)(buf + 2 * i_1 + 23100) = v4; /*0xffcf37c9*/
*(_WORD *)(buf + 2 * v4 + 27196) = i_1; /*0xffcf37d2*/
v5 = *(_WORD *)(buf + 2 * i + 27196); /*0xffcf37da*/
*(_WORD *)(buf + 2 * i_1 + 27196) = v5; /*0xffcf37e2*/
*(_WORD *)(buf + 2 * v5 + 23100) = i_1; /*0xffcf37eb*/
*(_WORD *)(buf + 2 * i_1 + 19004) = *(_WORD *)(buf + 2 * i + 19004); /*0xffcf37fb*/
*(_BYTE *)(i_1 + buf + 28) = *(_BYTE *)(buf + 8516); /*0xffcf3809*/
*(_WORD *)(buf + 2 * i_1 + 16444) = *(_WORD *)(buf + 16438); /*0xffcf3814*/
IioFn_FFCF314A(buf, i_1, *(_BYTE *)(*(_DWORD *)(buf + 8516) + *(__int16 *)(buf + 16440) + buf + 1308), i); /*0xffcf3834*/
return IioFn_FFCF314A( /*0xffcf385b*/
buf,
i_1,
*(_BYTE *)(*(_DWORD *)(buf + 8516) + *(__int16 *)(buf + 16438) + buf + 1308),
*(_WORD *)(buf + 16438));
}
// Function: IioFunc385F @ 0xffcf385f (0x13c bytes)
// Index: 1919/2560
unsigned int __cdecl IioFunc385F(int buf)
{
signed int i; // edi
unsigned int result; // eax
signed int i_1; // ebp
int v4; // ecx
int n19; // ebx
for ( i = 510; i > 0; --i ) /*0xffcf3866*/
{
if ( *(_BYTE *)(buf + i + 6939) ) /*0xffcf386b*/
break; /*0xffcf3873*/
}
result = IioFn_FFCF349F(buf, 9, i); /*0xffcf387e*/
i_1 = 0; /*0xffcf3886*/
while ( i_1 < i ) /*0xffcf388a*/
{
v4 = *(unsigned __int8 *)(buf + i_1++ + 6940); /*0xffcf3891*/
if ( v4 ) /*0xffcf389c*/
{
result = IioFn_FFCF349F(buf, *(unsigned __int8 *)(v4 + buf + 7452), *(unsigned __int16 *)(buf + 2 * v4 + 16306)); /*0xffcf3986*/
}
else
{
n19 = 1; /*0xffcf38a4*/
if ( i_1 >= i ) /*0xffcf38a7*/
goto LABEL_22; /*0xffcf38a7*/
do /*0xffcf38b7*/
{
if ( *(_BYTE *)(buf + i_1 + 6940) ) /*0xffcf38a9*/
break; /*0xffcf38b1*/
++i_1; /*0xffcf38b3*/
++n19; /*0xffcf38b4*/
}
while ( i_1 < i ); /*0xffcf38b7*/
if ( n19 > 2 ) /*0xffcf38bc*/
{
if ( n19 > 18 ) /*0xffcf38ec*/
{
if ( n19 == 19 ) /*0xffcf390f*/
{
IioFn_FFCF349F(buf, *(unsigned __int8 *)(buf + 7450), *(unsigned __int16 *)(buf + 16302)); /*0xffcf3922*/
IioFn_FFCF349F(buf, *(unsigned __int8 *)(buf + 7451), *(unsigned __int16 *)(buf + 16304)); /*0xffcf3938*/
result = IioFn_FFCF349F(buf, 4, 0xFu); /*0xffcf3942*/
}
else
{
IioFn_FFCF349F(buf, *(unsigned __int8 *)(buf + 7452), *(unsigned __int16 *)(buf + 16306)); /*0xffcf395d*/
result = IioFn_FFCF349F(buf, 9, n19 - 20); /*0xffcf3969*/
}
}
else
{
IioFn_FFCF349F(buf, *(unsigned __int8 *)(buf + 7451), *(unsigned __int16 *)(buf + 16304)); /*0xffcf38ff*/
result = IioFn_FFCF349F(buf, 4, n19 - 3); /*0xffcf390a*/
}
continue; /*0xffcf390a*/
}
if ( n19 > 0 ) /*0xffcf38c0*/
{
LABEL_22:
do /*0xffcf38e2*/
{
result = IioFn_FFCF349F(buf, *(unsigned __int8 *)(buf + 7450), *(unsigned __int16 *)(buf + 16302)); /*0xffcf38d7*/
--n19; /*0xffcf38df*/
}
while ( n19 ); /*0xffcf38e2*/
}
}
}
return result; /*0xffcf3997*/
}
// Function: IioFunc399B @ 0xffcf399b (0x8e bytes)
// Index: 1920/2560
unsigned int __cdecl IioFunc399B(int buf, int n6, int n5, int n6a)
{
unsigned int result; // eax
int n6_2; // edi
unsigned int n6_1; // edx
while ( n6 > 0 && !*(_BYTE *)(buf + n6 + 7449) ) /*0xffcf39b0*/
--n6; /*0xffcf39b2*/
result = IioFn_FFCF349F(buf, n5, n6); /*0xffcf39bd*/
n6_2 = 0; /*0xffcf39c5*/
while ( n6_2 < n6 ) /*0xffcf39c9*/
{
n6_1 = *(unsigned __int8 *)(buf + n6_2++ + 7450); /*0xffcf39cb*/
if ( n6_1 > 6 ) /*0xffcf39d7*/
result = IioFn_FFCF349F(buf, n6_1 - 3, (1 << (n6_1 - 3)) - 2); /*0xffcf39ef*/
else
result = IioFn_FFCF349F(buf, 3, n6_1); /*0xffcf39dc*/
if ( n6_2 == n6a ) /*0xffcf39fb*/
{
while ( n6_2 < 6 && !*(_BYTE *)(buf + n6_2 + 7450) ) /*0xffcf3a07*/
++n6_2; /*0xffcf3a09*/
result = IioFn_FFCF349F(buf, 2, ((_BYTE)n6_2 + 1) & 3); /*0xffcf3a19*/
}
}
return result; /*0xffcf3a25*/
}
// Function: IioFunc3A29 @ 0xffcf3a29 (0x23c bytes)
// Index: 1921/2560
int __cdecl IioFunc3A29(int __return_address)
{
unsigned int v2; // ebx
unsigned __int8 *v3; // ebp
int v4; // eax
unsigned __int8 v5; // al
unsigned int v6; // esi
int v7; // esi
char v9; // al
int v10; // ecx
int v11; // eax
unsigned __int16 v12; // [esp+14h] [ebp-Ch]
int v13; // [esp+18h] [ebp-8h]
unsigned __int8 v14; // [esp+1Ch] [ebp-4h]
unsigned int v15; // [esp+24h] [ebp+4h]
v2 = 0; /*0xffcf3a36*/
if ( (*(_BYTE *)(__return_address + 246408) & 4) != 0 ) /*0xffcf3a3f*/
return 1; /*0xffcf3a3f*/
if ( !*(_BYTE *)(__return_address + 1552) ) /*0xffcf3a45*/
return 1; /*0xffcf3a45*/
IioFunc3C65(__return_address); /*0xffcf3a52*/
if ( PciCfgRead(__return_address, 0, 0x102E800Bu) != 12 /*0xffcf3a9b*/
|| PciCfgRead(__return_address, 0, 0x102E800Au) != 3
|| PciCfgRead(__return_address, 0, 0x102E8009u) != 32 )
{
return 1; /*0xffcf3a9b*/
}
v12 = PciCfgRead(__return_address, 0, 0x202E8004u); /*0xffcf3ab4*/
if ( (v12 & 2) != 0 ) /*0xffcf3aba*/
PciCfgWrite(__return_address, 0, 0x202E8004u, 0); /*0xffcf3ac0*/
v3 = (unsigned __int8 *)PciCfgRead(__return_address, 0, 0x402E8010u); /*0xffcf3ad4*/
if ( !v3 ) /*0xffcf3adb*/
{
PciCfgWrite(__return_address, 0, 0x402E8010u, -1); /*0xffcf3ae7*/
v4 = PciCfgRead(__return_address, 0, 0x402E8010u); /*0xffcf3aef*/
v2 = -(v4 & 0xFFFFFFF0); /*0xffcf3b00*/
PciCfgWrite(__return_address, 0, 0x402E8010u, (v4 & 0xFFFFFFF0) - 25165824); /*0xffcf3b07*/
v3 = (unsigned __int8 *)PciCfgRead(__return_address, 0, 0x402E8010u); /*0xffcf3b14*/
if ( !v3 ) /*0xffcf3b1b*/
return 1; /*0xffcf3b1b*/
}
v5 = IioFunc3D0E(__return_address, 0, 29, 0, 1); /*0xffcf3b28*/
PciCfgWrite(__return_address, 0, v5 + 539918340, 0x8000); /*0xffcf3b3d*/
v6 = (unsigned __int8)IioFunc3D0E(__return_address, 0, 29, 0, 10) + 539918338; /*0xffcf3b51*/
v13 = PciCfgRead(__return_address, 0, v6) & 0x1FFF; /*0xffcf3b68*/
v14 = ((unsigned int)PciCfgRead(__return_address, 0, v6) >> 13) - 1; /*0xffcf3b7d*/
v15 = 4 * v14 + 1076789264; /*0xffcf3b8c*/
v7 = PciCfgRead(__return_address, 0, v15); /*0xffcf3b95*/
if ( !v7 ) /*0xffcf3b9c*/
{
PciCfgWrite(__return_address, 0, v15, (int)&v3[v2]); /*0xffcf3bab*/
v7 = PciCfgRead(__return_address, 0, v15); /*0xffcf3bb8*/
if ( !v7 ) /*0xffcf3bbf*/
return 1; /*0xffcf3bc3*/
}
PciCfgWrite(__return_address, 0, 0x202E8004u, v12 | 6); /*0xffcf3be0*/
if ( v3 != *(unsigned __int8 **)(__return_address + 246808) ) /*0xffcf3bee*/
{
*(_DWORD *)(__return_address + 246808) = v3; /*0xffcf3bf4*/
*(_DWORD *)(__return_address + 246812) = &v3[*v3]; /*0xffcf3c00*/
v9 = (*((_DWORD *)v3 + 1) >> 20) & 0xF; /*0xffcf3c0c*/
*(_WORD *)(__return_address + 246825) = 7424; /*0xffcf3c0e*/
*(_BYTE *)(__return_address + 246836) = v9; /*0xffcf3c17*/
v10 = *(unsigned __int8 *)(__return_address + 246836); /*0xffcf3c1d*/
*(_BYTE *)(__return_address + 246827) = 0; /*0xffcf3c29*/
*(_DWORD *)(__return_address + 246820) = v7 + (unsigned __int16)v13; /*0xffcf3c2f*/
v11 = *(_DWORD *)(__return_address + 246812); /*0xffcf3c35*/
*(_WORD *)(__return_address + 246830) = v13; /*0xffcf3c3b*/
*(_DWORD *)(__return_address + 246832) = v7; /*0xffcf3c42*/
*(_DWORD *)(__return_address + 246816) = v11 + 4 * v10 + 64; /*0xffcf3c4e*/
*(_BYTE *)(__return_address + 246829) = v14; /*0xffcf3c58*/
}
return 0; /*0xffcf3bc4*/
}
// Function: IioFunc3C65 @ 0xffcf3c65 (0xa9 bytes)
// Index: 1922/2560
unsigned int __cdecl IioFunc3C65(int __return_address)
{
unsigned int v1; // esi
unsigned int v2; // esi
unsigned int result; // eax
MEMORY[0xFED1F598] |= 1u; /*0xffcf3c7f*/
v1 = PciCfgRead(__return_address, 0, 0x402D70F4u) | 0x80000000; /*0xffcf3c8b*/
PciCfgWrite(__return_address, 0, 0x402D70F4u, v1); /*0xffcf3c95*/
v1 |= 0xF0000u; /*0xffcf3c9a*/
PciCfgWrite(__return_address, 0, 0x402D70F4u, v1); /*0xffcf3ca4*/
PciCfgWrite(__return_address, 0, 0x402D70F4u, v1 & 0x7FFFFFFF); /*0xffcf3cb5*/
v2 = PciCfgRead(__return_address, 0, 0x402EF0F4u) | 0x80000000; /*0xffcf3ccd*/
PciCfgWrite(__return_address, 0, 0x402EF0F4u, v2); /*0xffcf3cd8*/
v2 |= 0xF0000u; /*0xffcf3cdd*/
PciCfgWrite(__return_address, 0, 0x402EF0F4u, v2); /*0xffcf3ce8*/
PciCfgWrite(__return_address, 0, 0x402EF0F4u, v2 & 0x7FFFFFFF); /*0xffcf3cf4*/
result = MEMORY[0xFED1F598] & 0xFFFFFFFE; /*0xffcf3d01*/
MEMORY[0xFED1F598] &= ~1u; /*0xffcf3d04*/
return result; /*0xffcf3d09*/
}
// Function: IioFunc3D0E @ 0xffcf3d0e (0x9f bytes)
// Index: 1923/2560
unsigned __int8 __cdecl IioFunc3D0E(
int __return_address,
unsigned __int8 a2,
unsigned __int8 n29,
unsigned __int8 a4,
char n10)
{
char v5; // al
unsigned __int8 v7; // bl
int v8; // esi
v5 = PciCfgRead(__return_address, 0, ((a4 + 8 * (n29 + 32 * a2)) << 12) + 270532614); /*0xffcf3d38*/
if ( v5 == -1 || (v5 & 0x10) == 0 ) /*0xffcf3d4a*/
return 0; /*0xffcf3d44*/
v7 = PciCfgRead(__return_address, 0, ((a4 + 8 * (n29 + 32 * a2)) << 12) + 270532660); /*0xffcf3d5e*/
if ( !v7 ) /*0xffcf3d65*/
return 0; /*0xffcf3da3*/
v8 = ((a4 + 8 * (n29 + 32 * a2)) << 12) + 270532608; /*0xffcf3d6b*/
while ( (unsigned __int8)PciCfgRead(__return_address, 0, v8 + v7) != n10 ) /*0xffcf3d86*/
{
v7 = PciCfgRead(__return_address, 0, v8 + (unsigned __int8)(v7 + 1)); /*0xffcf3d9a*/
if ( !v7 ) /*0xffcf3da1*/
return 0; /*0xffcf3da1*/
}
return v7; /*0xffcf3da6*/
}
// Function: IioFunc3DAD @ 0xffcf3dad (0x2f5 bytes)
// Index: 1924/2560
int __cdecl IioFunc3DAD(int a1)
{
int v1; // esi
int v2; // ebx
_DWORD *v3; // edi
int v4; // ebp
int result; // eax
bool v6; // zf
int v7; // [esp+10h] [ebp-14h] BYREF
__int64 v8; // [esp+14h] [ebp-10h] BYREF
__int64 v9; // [esp+1Ch] [ebp-8h] BYREF
v1 = a1; /*0xffcf3db3*/
v9 = 0; /*0xffcf3dba*/
v2 = *(_DWORD *)(a1 + 246820); /*0xffcf3dc2*/
v3 = *(_DWORD **)(a1 + 246812); /*0xffcf3dc8*/
v4 = *(_DWORD *)(a1 + 246808); /*0xffcf3dce*/
v8 = 0; /*0xffcf3dd4*/
if ( !*(_BYTE *)(a1 + 246425) ) /*0xffcf3ddc*/
{
if ( (v3[1] & 0x1000) == 0 ) /*0xffcf3df0*/
{
*v3 &= ~1u; /*0xffcf3df7*/
KtiFuncF4E(&v9); /*0xffcf3dfe*/
KtiFuncF4E(&v8); /*0xffcf3e08*/
while ( (v3[1] & 0x1000) == 0 && (unsigned int)KtiFuncF75(v1, v9, SHIDWORD(v9), v8, SHIDWORD(v8), 0x3E8u) < 2 ) /*0xffcf3e31*/
KtiFuncF4E(&v8); /*0xffcf3e38*/
if ( (v3[1] & 0x1000) == 0 ) /*0xffcf3e50*/
KtiFunc211E(v1, 0, 0, 0, 0, 0, 0); /*0xffcf3e5b*/
}
*v3 |= 2u; /*0xffcf3e68*/
while ( (*v3 & 2) != 0 ) /*0xffcf3e7a*/
KtiFunc8C4(v1, 0xAu); /*0xffcf3e6f*/
if ( (v3[1] & 0x1000) != 0 ) /*0xffcf3e84*/
{
*v3 |= 1u; /*0xffcf3e8b*/
KtiFuncF4E(&v9); /*0xffcf3e92*/
KtiFuncF4E(&v8); /*0xffcf3e9c*/
while ( (v3[1] & 0x1000) != 0 && (unsigned int)KtiFuncF75(v1, v9, SHIDWORD(v9), v8, SHIDWORD(v8), 0x3E8u) < 2 ) /*0xffcf3ec5*/
KtiFuncF4E(&v8); /*0xffcf3ecc*/
if ( (v3[1] & 0x1000) != 0 ) /*0xffcf3ee4*/
KtiFunc211E(v1, 0, 0, 0, 0, 0, 0); /*0xffcf3eef*/
}
*(_DWORD *)v2 |= 0x40000000u; /*0xffcf3efe*/
if ( (*(_DWORD *)(v4 + 4) & 0x10) != 0 ) /*0xffcf3f05*/
{
if ( (**(_DWORD **)(v1 + 246816) & 0x1000) != 0 ) /*0xffcf3f14*/
{
**(_DWORD **)(v1 + 246816) &= ~0x1000u; /*0xffcf3f30*/
KtiFunc8C4(v1, 0x4E20u); /*0xffcf3f32*/
}
**(_DWORD **)(v1 + 246816) |= 0x1000u; /*0xffcf3f4d*/
}
KtiFunc8C4(v1, 0x3D090u); /*0xffcf3f55*/
**(_DWORD **)(v1 + 246816) |= 0x100u; /*0xffcf3f75*/
KtiFunc8C4(v1, 0xC350u); /*0xffcf3f77*/
**(_DWORD **)(v1 + 246816) &= ~0x100u; /*0xffcf3f93*/
while ( (**(_DWORD **)(v1 + 246816) & 0x100) != 0 ) /*0xffcf3fab*/
KtiFunc8C4(v1, 0xAu); /*0xffcf3f9a*/
if ( (**(_DWORD **)(v1 + 246816) & 4) == 0 ) /*0xffcf3fb7*/
return -2147483641; /*0xffcf3fbe*/
*(_DWORD *)v2 |= 0x50010400u; /*0xffcf3fca*/
**(_DWORD **)(v1 + 246816) &= ~4u; /*0xffcf3fde*/
*v3 &= ~1u; /*0xffcf3fe5*/
*(_QWORD *)(v1 + 250976) = KtiFunc9D6(); /*0xffcf3fec*/
*(_DWORD *)(v1 + 250984) = 1; /*0xffcf4006*/
*(_WORD *)(v2 + 16) = 32512; /*0xffcf4013*/
if ( (int)IioFunc4171(v1, &unk_FFD5C994, &v7, &a1) < 0 ) /*0xffcf4023*/
{
*(_BYTE *)(v2 + 17) = 0; /*0xffcf4029*/
result = IioFunc4171(v1, &unk_FFD5C994, &v7, &a1); /*0xffcf4035*/
if ( result < 0 ) /*0xffcf403f*/
return result; /*0xffcf403f*/
result = IioFunc4171(v1, &unk_FFD5C98C, 0, 0); /*0xffcf404b*/
if ( result < 0 ) /*0xffcf4055*/
return result; /*0xffcf4055*/
KtiFunc8C4(v1, 0x186A0u); /*0xffcf405d*/
*(_BYTE *)(v2 + 17) = 127; /*0xffcf4064*/
}
result = IioFunc4171(v1, &unk_FFD5C99C, 0, 0); /*0xffcf4072*/
if ( result < 0 ) /*0xffcf407c*/
return result; /*0xffcf407c*/
}
v6 = *(_BYTE *)(v1 + 246824) == 0; /*0xffcf407e*/
*(_DWORD *)(v1 + 246838) = 386; /*0xffcf4085*/
if ( v6 ) /*0xffcf408f*/
*(_BYTE *)(v1 + 246824) = 1; /*0xffcf4091*/
return 0; /*0xffcf409a*/
}
// Function: IioFunc40A2 @ 0xffcf40a2 (0xcf bytes)
// Index: 1925/2560
int __cdecl IioFunc40A2(int __return_address, _BYTE *a2, unsigned int n10)
{
int __return_address_1; // esi
int v4; // edi
__int64 v5; // kr00_8
unsigned int v6; // eax
unsigned int v7; // ecx
char v8; // cl
unsigned int n10_1; // eax
__return_address_1 = __return_address; /*0xffcf40a5*/
v4 = -2147483641; /*0xffcf40ae*/
v5 = 0; /*0xffcf40ba*/
if ( *(_BYTE *)(__return_address + 246824) == 1 ) /*0xffcf40ba*/
{
v6 = *(_DWORD *)(__return_address + 251000); /*0xffcf40c0*/
if ( v6 && (v7 = *(_DWORD *)(__return_address + 251004), v7 < v6) ) /*0xffcf40d2*/
{
v8 = *(_BYTE *)(v7 + __return_address + 250992); /*0xffcf40d4*/
}
else
{
if ( n10 != -1 ) /*0xffcf40e2*/
v5 = KtiFunc9D6(); /*0xffcf40ed*/
*(_DWORD *)(__return_address_1 + 251000) = 0; /*0xffcf40ef*/
*(_DWORD *)(__return_address_1 + 251004) = 0; /*0xffcf40f6*/
while ( 1 ) /*0xffcf4101*/
{
__return_address = 8; /*0xffcf4101*/
v4 = IioFunc436F( /*0xffcf411e*/
__return_address_1,
(const char *)(__return_address_1 + *(_DWORD *)(__return_address_1 + 251000) + 250992),
&__return_address);
if ( !v4 ) /*0xffcf4125*/
{
if ( __return_address ) /*0xffcf412d*/
break; /*0xffcf412d*/
}
if ( n10 != -1 ) /*0xffcf4134*/
{
n10_1 = KtiFuncA21(__return_address_1, v5, SHIDWORD(v5)); /*0xffcf4139*/
if ( n10_1 >= n10 ) /*0xffcf4145*/
return v4; /*0xffcf4145*/
}
}
*(_DWORD *)(__return_address_1 + 251000) += __return_address; /*0xffcf4149*/
v8 = *(_BYTE *)(__return_address_1 + *(_DWORD *)(__return_address_1 + 251004) + 250992); /*0xffcf4155*/
}
*a2 = v8; /*0xffcf4160*/
++*(_DWORD *)(__return_address_1 + 251004); /*0xffcf4162*/
return 0; /*0xffcf4168*/
}
return v4; /*0xffcf416c*/
}
// Function: IioFunc4171 @ 0xffcf4171 (0x9a bytes)
// Index: 1926/2560
int __cdecl IioFunc4171(int a1, int a2, int a3, int a4)
{
int v4; // esi
int result; // eax
v4 = a2; /*0xffcf4173*/
if ( *(_WORD *)(a2 + 6) && (*(_DWORD *)a2 & 0x80u) == 0 ) /*0xffcf4183*/
return 1; /*0xffcf4187*/
result = IioFunc42C0(a1, a2, 8, 1000000, 45, 0); /*0xffcf419b*/
a2 = result; /*0xffcf41a3*/
if ( result >= 0 ) /*0xffcf41a9*/
{
if ( !*(_WORD *)(v4 + 6) /*0xffcf41d4*/
|| (*(_DWORD *)v4 & 0x80u) == 0
|| (result = IioFunc420B(a1, a3, a4, 1000000, 1), a2 = result, result >= 0) )
{
if ( (*(_DWORD *)v4 & 0x80u) == 0 ) /*0xffcf41dc*/
return IioFunc420B(a1, 0, &a2, 1000000, 1); /*0xffcf41ff*/
else
return IioFunc42C0(a1, 0, 0, 1000000, 225, 1); /*0xffcf41ea*/
}
}
return result; /*0xffcf4208*/
}
// Function: IioFunc420B @ 0xffcf420b (0xb5 bytes)
// Index: 1927/2560
int __cdecl IioFunc420B(int __return_address, int a2, int *p___return_address, int n1000000, char a5)
{
int __return_address_1; // ecx
unsigned int __return_address_2; // edi
int v7; // esi
int n3; // ebx
bool v10; // zf
__return_address_1 = __return_address; /*0xffcf420b*/
__return_address_2 = 0; /*0xffcf4217*/
*p___return_address = 0; /*0xffcf421e*/
v7 = *(_DWORD *)(__return_address + 246820); /*0xffcf4221*/
n3 = 3; /*0xffcf4229*/
*(_BYTE *)(v7 + 4) = 105; /*0xffcf422a*/
if ( a5 ) /*0xffcf422e*/
*(_BYTE *)(v7 + 5) = 75; /*0xffcf4230*/
else
*(_BYTE *)(v7 + 5) = -61; /*0xffcf4236*/
if ( !n1000000 ) /*0xffcf423e*/
return -2147483630; /*0xffcf42b6*/
while ( 1 ) /*0xffcf4240*/
{
if ( !n3 ) /*0xffcf4242*/
return -2147483641; /*0xffcf4242*/
*(_DWORD *)v7 &= ~0x10u; /*0xffcf4249*/
*(_DWORD *)v7 |= 0x20u; /*0xffcf4250*/
while ( (*(_DWORD *)v7 & 0x10000) == 0 ) /*0xffcf4259*/
; /*0xffcf4252*/
if ( (*(_DWORD *)v7 & 0x40) == 0 ) /*0xffcf425f*/
break; /*0xffcf425f*/
--n3; /*0xffcf4261*/
LABEL_12:
if ( !--n1000000 ) /*0xffcf427f*/
{
if ( n3 ) /*0xffcf4283*/
return -2147483630; /*0xffcf4283*/
return -2147483641; /*0xffcf428a*/
}
}
if ( *(_BYTE *)(v7 + 6) != *(_BYTE *)(v7 + 5) ) /*0xffcf426a*/
{
KtiFunc8C4(__return_address_1, 1u); /*0xffcf426f*/
__return_address_1 = __return_address; /*0xffcf4276*/
goto LABEL_12; /*0xffcf4276*/
}
if ( !a2 ) /*0xffcf4292*/
return -2147483646; /*0xffcf4294*/
v10 = (*(_DWORD *)v7 & 0xF) == 0; /*0xffcf429d*/
*p___return_address = *(_DWORD *)v7 & 0xF; /*0xffcf42a0*/
if ( !v10 ) /*0xffcf42a3*/
{
do /*0xffcf42b0*/
{
*(_BYTE *)(__return_address_2 + a2) = *(_BYTE *)(v7 + __return_address_2 + 8); /*0xffcf42a9*/
++__return_address_2; /*0xffcf42ac*/
}
while ( __return_address_2 < *p___return_address ); /*0xffcf42b0*/
}
return 0; /*0xffcf42bb*/
}
// Function: IioFunc42C0 @ 0xffcf42c0 (0xaf bytes)
// Index: 1928/2560
int __cdecl IioFunc42C0(int __return_address, int a2, unsigned int n8, int n1000000, char n45, char a6)
{
int v6; // esi
int n3; // edi
unsigned int n8_1; // ecx
int n1000000_1; // ebx
char v10; // al
v6 = *(_DWORD *)(__return_address + 246820); /*0xffcf42d7*/
n3 = 3; /*0xffcf42dd*/
*(_BYTE *)(v6 + 4) = n45; /*0xffcf42de*/
n8_1 = 0; /*0xffcf42e6*/
for ( *(_BYTE *)(v6 + 5) = a6 == 0 ? -61 : 75; n8_1 < n8; ++n8_1 )
*(_BYTE *)(v6 + n8_1 + 8) = *(_BYTE *)(n8_1 + a2); /*0xffcf42fa*/
n1000000_1 = n1000000; /*0xffcf4305*/
*(_DWORD *)v6 &= 0xFFFFFFF0; /*0xffcf430c*/
*(_DWORD *)v6 |= n8; /*0xffcf4312*/
if ( n1000000 ) /*0xffcf4316*/
{
while ( 1 ) /*0xffcf4318*/
{
if ( !n3 ) /*0xffcf431a*/
return -2147483641; /*0xffcf431a*/
*(_DWORD *)v6 |= 0x10u; /*0xffcf4321*/
*(_DWORD *)v6 |= 0x20u; /*0xffcf4328*/
while ( (*(_DWORD *)v6 & 0x10000) == 0 ) /*0xffcf4331*/
; /*0xffcf432a*/
if ( (*(_DWORD *)v6 & 0x40) != 0 ) /*0xffcf4337*/
{
--n3; /*0xffcf4339*/
}
else
{
v10 = *(_BYTE *)(v6 + 6); /*0xffcf433c*/
if ( v10 == -46 || v10 == -106 ) /*0xffcf4345*/
return 0; /*0xffcf4363*/
KtiFunc8C4(__return_address, 1u); /*0xffcf434a*/
}
if ( !--n1000000_1 ) /*0xffcf4354*/
{
if ( n3 ) /*0xffcf4358*/
return -2147483630; /*0xffcf4358*/
return -2147483641; /*0xffcf435f*/
}
}
}
return -2147483630; /*0xffcf436a*/
}
// Function: IioFunc436F @ 0xffcf436f (0x249 bytes)
// Index: 1929/2560
int __cdecl IioFunc436F(int __return_address, const char *a2, int *p___return_address)
{
int __return_address_1; // esi
int v4; // ebp
int v5; // ecx
int *p___return_address_1; // ebx
const char *v7; // ecx
unsigned int __return_address_2; // edi
int v9; // edx
const char *v10; // eax
unsigned int __return_address_5; // ebx
const char *v12; // ebp
int v13; // ecx
unsigned int i; // ebx
int v15; // eax
unsigned int __return_address_3; // ecx
const char *v17; // edx
const char *v18; // ecx
bool v19; // zf
const char *v21; // [esp-10h] [ebp-28h]
int __return_address_4; // [esp-Ch] [ebp-24h]
int __return_address_6; // [esp-Ch] [ebp-24h]
int v24; // [esp+8h] [ebp-10h]
int v25; // [esp+Ch] [ebp-Ch]
const char *v26; // [esp+10h] [ebp-8h]
__return_address_1 = __return_address; /*0xffcf4376*/
v4 = 0; /*0xffcf437a*/
v5 = *(_DWORD *)(__return_address + 246820); /*0xffcf4383*/
if ( *(_BYTE *)(__return_address + 246824) != 1 ) /*0xffcf4389*/
return v4; /*0xffcf4389*/
p___return_address_1 = p___return_address; /*0xffcf4390*/
*(_BYTE *)(v5 + 17) = 127; /*0xffcf4394*/
*(_BYTE *)(v5 + 16) = *(_BYTE *)(__return_address_1 + 246838); /*0xffcf439e*/
v7 = a2; /*0xffcf43a1*/
if ( !*p___return_address_1 || !a2 ) /*0xffcf43ac*/
*p___return_address_1 = 0; /*0xffcf43ae*/
__return_address_2 = 0; /*0xffcf43b0*/
v25 = 0; /*0xffcf43b2*/
__return_address = 0; /*0xffcf43b6*/
while ( 1 ) /*0xffcf43ba*/
{
v9 = *(_DWORD *)(__return_address_1 + 246844); /*0xffcf43ba*/
if ( !v9 ) /*0xffcf43c2*/
break; /*0xffcf43c2*/
if ( !*p___return_address_1 ) /*0xffcf43c4*/
goto LABEL_10; /*0xffcf43c7*/
LABEL_25:
v15 = *(_DWORD *)(__return_address_1 + 246844); /*0xffcf452f*/
if ( v15 > 0 ) /*0xffcf4537*/
{
__return_address_2 = *p___return_address_1; /*0xffcf4539*/
if ( *p___return_address_1 > (unsigned int)v15 ) /*0xffcf453d*/
__return_address_2 = *(_DWORD *)(__return_address_1 + 246844); /*0xffcf453f*/
__return_address_3 = 0; /*0xffcf4541*/
__return_address = __return_address_2; /*0xffcf4543*/
if ( __return_address_2 ) /*0xffcf4549*/
{
v17 = a2; /*0xffcf454b*/
do /*0xffcf4578*/
{
v17[__return_address_3] = *(_BYTE *)(*(_DWORD *)(__return_address_1 + 246848) + __return_address_1 + 246852); /*0xffcf455c*/
if ( (int)++*(_DWORD *)(__return_address_1 + 246848) >= 16 ) /*0xffcf456c*/
*(_DWORD *)(__return_address_1 + 246848) = 0; /*0xffcf456e*/
++__return_address_3; /*0xffcf4575*/
}
while ( __return_address_3 < __return_address_2 ); /*0xffcf4578*/
}
*(_DWORD *)(__return_address_1 + 246844) -= __return_address_2; /*0xffcf457a*/
}
v18 = a2; /*0xffcf4580*/
*p___return_address_1 -= __return_address_2; /*0xffcf4584*/
v7 = &v18[__return_address_2]; /*0xffcf4586*/
v25 += __return_address_2; /*0xffcf4588*/
v19 = *p___return_address_1 == 0; /*0xffcf458c*/
a2 = v7; /*0xffcf458f*/
if ( v19 ) /*0xffcf4593*/
goto LABEL_37; /*0xffcf4593*/
}
*(_DWORD *)(__return_address_1 + 246848) = 0; /*0xffcf43cf*/
LABEL_10:
if ( (unsigned int)*p___return_address_1 >= 8 ) /*0xffcf43d9*/
{
v4 = IioFunc420B(__return_address_1, (int)v7, &__return_address, 1, *(_BYTE *)(__return_address_1 + 246840)); /*0xffcf43f5*/
v24 = v4; /*0xffcf43fa*/
if ( v4 < 0 ) /*0xffcf4400*/
goto LABEL_37; /*0xffcf4400*/
__return_address_2 = __return_address; /*0xffcf4406*/
v10 = a2; /*0xffcf440a*/
__return_address_4 = __return_address; /*0xffcf440e*/
v21 = a2; /*0xffcf440f*/
*(_BYTE *)(__return_address_1 + 246824) = 0; /*0xffcf4416*/
v10[__return_address_2] = 0; /*0xffcf441e*/
LogDebugString((_BYTE *)__return_address_1, (int)"\nret = %d, data = %s, len = %d\n", v4, v21, __return_address_4); /*0xffcf4422*/
if ( __return_address_2 ) /*0xffcf4431*/
{
__return_address_5 = 0; /*0xffcf4433*/
v12 = a2; /*0xffcf4437*/
do /*0xffcf4451*/
LogDebugString((_BYTE *)__return_address_1, (int)"0x%02X ", (unsigned __int8)v12[__return_address_5++]); /*0xffcf4446*/
while ( __return_address_5 < __return_address_2 ); /*0xffcf4451*/
p___return_address_1 = p___return_address; /*0xffcf4453*/
v4 = v24; /*0xffcf4457*/
}
KtiFuncA833((_DWORD *)__return_address_1, 1); /*0xffcf445e*/
*(_BYTE *)(__return_address_1 + 246824) = 1; /*0xffcf4463*/
goto LABEL_24; /*0xffcf446a*/
}
v13 = *(_DWORD *)(__return_address_1 + 246848); /*0xffcf446f*/
if ( 16 - v13 - v9 >= 8 ) /*0xffcf447f*/
{
v26 = (const char *)(__return_address_1 + v13 + 246852); /*0xffcf449e*/
v4 = IioFunc420B(__return_address_1, (int)v26, &__return_address, 1, *(_BYTE *)(__return_address_1 + 246840)); /*0xffcf44a7*/
if ( v4 < 0 ) /*0xffcf44b2*/
goto LABEL_37; /*0xffcf44b2*/
__return_address_2 = __return_address; /*0xffcf44b8*/
__return_address_6 = __return_address; /*0xffcf44c0*/
*(_BYTE *)(__return_address_1 + 246824) = 0; /*0xffcf44c8*/
v26[__return_address_2] = 0; /*0xffcf44d0*/
LogDebugString((_BYTE *)__return_address_1, (int)"\nret = %d, data = %s, len = %d\n", v4, v26, __return_address_6); /*0xffcf44d4*/
if ( __return_address_2 ) /*0xffcf44e3*/
{
for ( i = 0; i < __return_address_2; ++i ) /*0xffcf44e5*/
LogDebugString((_BYTE *)__return_address_1, (int)"0x%02X ", (unsigned __int8)v26[i]); /*0xffcf44f8*/
p___return_address_1 = p___return_address; /*0xffcf4505*/
}
KtiFuncA833((_DWORD *)__return_address_1, 1); /*0xffcf4510*/
*(_BYTE *)(__return_address_1 + 246824) = 1; /*0xffcf4515*/
*(_DWORD *)(__return_address_1 + 246844) += __return_address_2; /*0xffcf451c*/
LABEL_24:
*(_BYTE *)(__return_address_1 + 246840) ^= 1u; /*0xffcf4522*/
if ( !__return_address_2 ) /*0xffcf452d*/
goto LABEL_37; /*0xffcf452d*/
goto LABEL_25; /*0xffcf452d*/
}
v4 = -2147483639; /*0xffcf459b*/
LABEL_37:
*p___return_address_1 = v25; /*0xffcf45a0*/
if ( v25 ) /*0xffcf45aa*/
return 0; /*0xffcf45ae*/
return v4; /*0xffcf45b2*/
}
// Function: IioFunc45B8 @ 0xffcf45b8 (0x99 bytes)
// Index: 1930/2560
int __cdecl IioFunc45B8(int __return_address, int a2, unsigned int *a3)
{
int v3; // ecx
unsigned int n8; // ebp
int result; // eax
v3 = *(_DWORD *)(__return_address + 246820); /*0xffcf45c7*/
if ( *(_BYTE *)(__return_address + 246824) == 1 ) /*0xffcf45cd*/
{
*(_BYTE *)(v3 + 17) = 127; /*0xffcf45d7*/
*(_BYTE *)(v3 + 16) = *(_BYTE *)(__return_address + 246839); /*0xffcf45e1*/
while ( *a3 ) /*0xffcf45e7*/
{
n8 = *a3; /*0xffcf45e9*/
if ( *a3 > 8 ) /*0xffcf45ee*/
n8 = 8; /*0xffcf45f2*/
result = IioFunc42C0(__return_address, a2, n8, 1000000, 225, *(_BYTE *)(__return_address + 246841)); /*0xffcf4608*/
if ( result < 0 ) /*0xffcf4612*/
return result; /*0xffcf4612*/
*(_BYTE *)(__return_address + 246841) ^= 1u; /*0xffcf4614*/
*a3 -= n8; /*0xffcf461b*/
a2 += n8; /*0xffcf461d*/
}
if ( IioFunc42C0(__return_address, a2, 0, 1000000, 225, *(_BYTE *)(__return_address + 246841)) >= 0 ) /*0xffcf4641*/
*(_BYTE *)(__return_address + 246841) ^= 1u; /*0xffcf4643*/
}
return 0; /*0xffcf464c*/
}
// Function: IioFunc4651 @ 0xffcf4651 (0x64 bytes)
// Index: 1931/2560
char __cdecl IioFunc4651(int n4, int a2)
{
char n4_3; // [esp+17h] [ebp+Bh]
n4_3 = *(_BYTE *)(n4 + 246409); /*0xffcf466b*/
*(_BYTE *)(n4 + 246409) = 0; /*0xffcf4674*/
KtiFunc296B(n4, a2, (_BYTE *)(n4 + 48704 * (unsigned __int8)a2 + 258689), 0xBE40u); /*0xffcf4685*/
KtiFunc296B(n4, a2, (_BYTE *)(n4 + 6365 * (unsigned __int8)a2 + 628688), 0x18DDu); /*0xffcf469f*/
*(_BYTE *)(n4 + 246409) = n4_3; /*0xffcf46aa*/
return n4_3; /*0xffcf46b0*/
}
// Function: IioFunc46B5 @ 0xffcf46b5 (0xc6 bytes)
// Index: 1932/2560
char __cdecl IioFunc46B5(_BYTE *n4, int a2)
{
char n4_3; // [esp+17h] [ebp+Bh]
n4_3 = n4[246409]; /*0xffcf46ca*/
n4[246409] = 0; /*0xffcf46d7*/
KtiFunc296B((int)n4, a2, n4 + 257309, 1u); /*0xffcf46de*/
KtiFunc296B((int)n4, a2, n4 + 257310, 1u); /*0xffcf46ed*/
KtiFunc296B((int)n4, a2, n4 + 257311, 1u); /*0xffcf46fc*/
KtiFunc296B((int)n4, a2, n4 + 257312, 1u); /*0xffcf470b*/
KtiFunc296B((int)n4, a2, n4 + 257313, 1u); /*0xffcf471d*/
KtiFunc296B((int)n4, a2, n4 + 257314, 1u); /*0xffcf472c*/
KtiFunc296B((int)n4, a2, n4 + 453505, 1u); /*0xffcf473b*/
KtiFunc296B((int)n4, a2, n4 + 453589, 2u); /*0xffcf474b*/
KtiFunc296B((int)n4, a2, &n4[12 * (unsigned __int8)a2 + 453596], 0xCu); /*0xffcf4765*/
n4[246409] = n4_3; /*0xffcf4770*/
return n4_3; /*0xffcf4776*/
}
// Function: IioFunc477B @ 0xffcf477b (0x40 bytes)
// Index: 1933/2560
int __cdecl IioFunc477B(int n4, int a2)
{
char v2; // bl
int result; // eax
v2 = *(_BYTE *)(n4 + 246409); /*0xffcf479a*/
*(_BYTE *)(n4 + 246409) = 0; /*0xffcf47a3*/
result = KtiFunc296B(n4, a2, (_BYTE *)(n4 + 50813 * (unsigned __int8)a2 + 10189), 0xC67Du); /*0xffcf47aa*/
*(_BYTE *)(n4 + 246409) = v2; /*0xffcf47b2*/
return result; /*0xffcf47b8*/
}
// Function: IioFunc47BB @ 0xffcf47bb (0x64 bytes)
// Index: 1934/2560
char __cdecl IioFunc47BB(int n4, unsigned __int8 n4a)
{
char v4; // [esp+17h] [ebp+Bh]
v4 = *(_BYTE *)(n4 + 246409); /*0xffcf47d5*/
*(_BYTE *)(n4 + 246409) = 0; /*0xffcf47de*/
KtiFunc2D6B(n4, n4a, (char *)(n4 + 48704 * n4a + 258689), 0xBE40u); /*0xffcf47ef*/
KtiFunc2D6B(n4, n4a, (char *)(n4 + 6365 * n4a + 628688), 0x18DDu); /*0xffcf4809*/
*(_BYTE *)(n4 + 246409) = v4; /*0xffcf4814*/
return v4; /*0xffcf481a*/
}
// Function: IioFunc481F @ 0xffcf481f (0xc6 bytes)
// Index: 1935/2560
char __cdecl IioFunc481F(char *n4, unsigned __int8 n4a)
{
char v4; // [esp+17h] [ebp+Bh]
v4 = n4[246409]; /*0xffcf4834*/
n4[246409] = 0; /*0xffcf4841*/
KtiFunc2D6B((int)n4, n4a, n4 + 257309, 1u); /*0xffcf4848*/
KtiFunc2D6B((int)n4, n4a, n4 + 257310, 1u); /*0xffcf4857*/
KtiFunc2D6B((int)n4, n4a, n4 + 257311, 1u); /*0xffcf4866*/
KtiFunc2D6B((int)n4, n4a, n4 + 257312, 1u); /*0xffcf4875*/
KtiFunc2D6B((int)n4, n4a, n4 + 257313, 1u); /*0xffcf4887*/
KtiFunc2D6B((int)n4, n4a, n4 + 257314, 1u); /*0xffcf4896*/
KtiFunc2D6B((int)n4, n4a, n4 + 453505, 1u); /*0xffcf48a5*/
KtiFunc2D6B((int)n4, n4a, n4 + 453589, 2u); /*0xffcf48b5*/
KtiFunc2D6B((int)n4, n4a, &n4[12 * n4a + 453596], 0xCu); /*0xffcf48cf*/
n4[246409] = v4; /*0xffcf48da*/
return v4; /*0xffcf48e0*/
}
// Function: IioFunc48E5 @ 0xffcf48e5 (0x40 bytes)
// Index: 1936/2560
int __cdecl IioFunc48E5(int n4, unsigned __int8 n4a)
{
char v2; // bl
int result; // eax
v2 = *(_BYTE *)(n4 + 246409); /*0xffcf4904*/
*(_BYTE *)(n4 + 246409) = 0; /*0xffcf490d*/
result = KtiFunc2D6B(n4, n4a, (char *)(n4 + 50813 * n4a + 10189), 0xC67Du); /*0xffcf4914*/
*(_BYTE *)(n4 + 246409) = v2; /*0xffcf491c*/
return result; /*0xffcf4922*/
}
// Function: IioFunc4925 @ 0xffcf4925 (0x90 bytes)
// Index: 1937/2560
_BYTE *__cdecl IioFunc4925(int a1, unsigned __int8 a2, char a3, _BYTE *a4)
{
int v4; // ebx
int n6; // ebp
_BYTE *SocketInfo; // esi
char v7; // dl
int v8; // edi
int v10; // [esp+10h] [ebp-4h]
int n6_1; // [esp+18h] [ebp+4h]
LOBYTE(v4) = 0; /*0xffcf4930*/
v10 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf493b*/
n6 = 6; /*0xffcf4948*/
SocketInfo = (_BYTE *)GetSocketInfo(v10, a2); /*0xffcf4949*/
n6_1 = 6; /*0xffcf494b*/
v7 = 0; /*0xffcf494f*/
v8 = 0; /*0xffcf4951*/
do /*0xffcf49a7*/
{
if ( *SocketInfo ) /*0xffcf4953*/
{
n6 = n6_1; /*0xffcf4976*/
if ( *(_BYTE *)(v8 + 50813 * a2 + v10 + 10239) == a3 ) /*0xffcf497a*/
{
if ( a3 ) /*0xffcf497e*/
LOBYTE(v4) = v4 | (1 << (v7 - 3)); /*0xffcf4991*/
else
v4 = (unsigned __int8)v4 | (1 << v7); /*0xffcf4983*/
}
}
++v7; /*0xffcf4993*/
SocketInfo += 7688; /*0xffcf4994*/
v8 += 8077; /*0xffcf499a*/
n6_1 = --n6; /*0xffcf49a3*/
}
while ( n6 ); /*0xffcf49a7*/
*a4 = v4; /*0xffcf49b0*/
return a4; /*0xffcf49ad*/
}
// Function: IioFunc49B5 @ 0xffcf49b5 (0x58 bytes)
// Index: 1938/2560
int __cdecl IioFunc49B5(int a1, unsigned __int8 a2, _BYTE *a3)
{
int v3; // ecx
int v4; // edx
int result; // eax
char v6; // si
int n2; // edi
_BYTE *v8; // edx
LOBYTE(v3) = 0; /*0xffcf49b9*/
v4 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf49c4*/
result = 48704 * a2; /*0xffcf49c7*/
if ( *(_BYTE *)(result + v4 + 258689) && *(_BYTE *)(result + v4 + 258716) ) /*0xffcf49d6*/
{
v6 = 0; /*0xffcf49e8*/
n2 = 2; /*0xffcf49ea*/
v8 = (_BYTE *)(50813 * a2 + 10189 + v4); /*0xffcf49f0*/
do /*0xffcf4a02*/
{
if ( *v8 ) /*0xffcf49f2*/
v3 = (unsigned __int8)v3 | (1 << v6); /*0xffcf49fa*/
++v6; /*0xffcf49fd*/
++v8; /*0xffcf49fe*/
--n2; /*0xffcf49ff*/
}
while ( n2 ); /*0xffcf4a02*/
*a3 = v3; /*0xffcf4a09*/
return (int)a3; /*0xffcf4a04*/
}
return result; /*0xffcf4a0b*/
}
// Function: IioFunc4A0D @ 0xffcf4a0d (0x57 bytes)
// Index: 1939/2560
_BYTE *__cdecl IioFunc4A0D(int a1, unsigned __int8 a2, char a3, unsigned __int8 a4, _BYTE *a5)
{
int v5; // ebx
_BYTE *CpuCount; // ecx
char v7; // dl
int n2; // esi
LOBYTE(v5) = 0; /*0xffcf4a14*/
if ( a3 == 1 ) /*0xffcf4a27*/
a4 += 3; /*0xffcf4a2b*/
CpuCount = (_BYTE *)GetCpuCount(*(_DWORD *)(*(_DWORD *)(a1 + 12) + 4), a2, a4); /*0xffcf4a3d*/
v7 = 0; /*0xffcf4a3f*/
n2 = 2; /*0xffcf4a43*/
do /*0xffcf4a59*/
{
if ( *CpuCount ) /*0xffcf4a44*/
v5 = (unsigned __int8)v5 | (1 << v7); /*0xffcf4a4c*/
++v7; /*0xffcf4a4f*/
CpuCount += 1379; /*0xffcf4a50*/
--n2; /*0xffcf4a56*/
}
while ( n2 ); /*0xffcf4a59*/
*a5 = v5; /*0xffcf4a5f*/
return a5; /*0xffcf4a5e*/
}
// Function: IioFunc4A64 @ 0xffcf4a64 (0x179 bytes)
// Index: 1940/2560
int __cdecl IioFunc4A64(int a1, unsigned __int8 a2, char a3, unsigned __int8 a4, unsigned __int8 a5, int a6)
{
int v6; // edi
int v7; // ebp
int v8; // edx
int result; // eax
unsigned __int8 v10; // [esp+14h] [ebp+4h]
int CpuCount; // [esp+1Ch] [ebp+Ch]
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf4a74*/
v10 = a4; /*0xffcf4a7b*/
if ( a3 == 1 ) /*0xffcf4a7f*/
{
a4 += 3; /*0xffcf4a83*/
v10 = a4; /*0xffcf4a87*/
}
CpuCount = GetCpuCount(v6, a2, v10); /*0xffcf4a9e*/
GetSocketInfo(v6, a2); /*0xffcf4aa2*/
v7 = 1379 * a5; /*0xffcf4aaf*/
*(_BYTE *)a6 = (*(_BYTE *)(CpuCount + v7 + 127) & 8) != 0; /*0xffcf4acb*/
v8 = v7 + 48704 * a2 + 7688 * a4; /*0xffcf4ae0*/
*(_DWORD *)(a6 + 1) = *(unsigned __int8 *)(v8 + v6 + 259236) << 6; /*0xffcf4aed*/
*(_BYTE *)(a6 + 5) = *(_BYTE *)(v8 + v6 + 259232); /*0xffcf4af7*/
*(_DWORD *)(a6 + 6) = 1 << *(_BYTE *)(v8 + v6 + 259237); /*0xffcf4b06*/
*(_WORD *)(a6 + 10) = 1 << *(_BYTE *)(v8 + v6 + 259238); /*0xffcf4b1a*/
*(_BYTE *)(a6 + 12) = 4 << (*(_BYTE *)(CpuCount + v7 + 110) & 7); /*0xffcf4b2a*/
switch ( *(_BYTE *)(CpuCount + v7 + 105) ) /*0xffcf4b35*/
{
case 0xB: /*0xffcf4b35*/
*(_DWORD *)(a6 + 13) = 11; /*0xffcf4b4f*/
break;
case 0xC: /*0xffcf4b35*/
*(_DWORD *)(a6 + 13) = 12; /*0xffcf4b4a*/
break;
case 0xD: /*0xffcf4b35*/
*(_DWORD *)(a6 + 13) = 13; /*0xffcf4b41*/
break;
}
result = *(unsigned __int8 *)(CpuCount + v7 + 109) - 1; /*0xffcf4b57*/
switch ( *(_BYTE *)(CpuCount + v7 + 109) ) /*0xffcf4b5c*/
{
case 1: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 1; /*0xffcf4b63*/
break; /*0xffcf4b6a*/
case 2: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 2; /*0xffcf4b6c*/
break; /*0xffcf4b73*/
case 3: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 3; /*0xffcf4b75*/
break; /*0xffcf4b7c*/
case 4: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 4; /*0xffcf4b83*/
break; /*0xffcf4b8a*/
case 5: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 5; /*0xffcf4b8c*/
break; /*0xffcf4b93*/
case 6: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 6; /*0xffcf4b95*/
break; /*0xffcf4b9c*/
case 7: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 7; /*0xffcf4b9e*/
break; /*0xffcf4ba5*/
case 8: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 8; /*0xffcf4ba7*/
break; /*0xffcf4bae*/
case 9: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 9; /*0xffcf4bb0*/
break; /*0xffcf4bb7*/
case 0xB: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 11; /*0xffcf4b7e*/
break; /*0xffcf4b81*/
case 0xC: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 12; /*0xffcf4bb9*/
break; /*0xffcf4bbc*/
case 0xD: /*0xffcf4b5c*/
*(_DWORD *)(a6 + 17) = 13; /*0xffcf4bbe*/
break; /*0xffcf4bbe*/
default:
break;
}
if ( *(_WORD *)(v6 + 257315) == 12 && *(_BYTE *)(CpuCount + v7 + 109) == 4 ) /*0xffcf4bd3*/
*(_DWORD *)(a6 + 17) = 11; /*0xffcf4bd5*/
return result; /*0xffcf4bd8*/
}
// Function: IioFunc4C14 @ 0xffcf4c14 (0x7b bytes)
// Index: 1941/2560
char __cdecl IioFunc4C14(int a1, unsigned __int8 a2, char a3, unsigned __int8 a4, unsigned __int8 a5, int a6)
{
int n4; // esi
int v7; // edx
_BYTE *v8; // ecx
int v9; // edx
char result; // al
if ( a3 == 1 ) /*0xffcf4c2a*/
a4 += 3; /*0xffcf4c2e*/
n4 = 4; /*0xffcf4c50*/
v7 = GetCpuCount(*(_DWORD *)(*(_DWORD *)(a1 + 12) + 4), a2, a4) + 1379 * a5; /*0xffcf4c51*/
*(_BYTE *)(a6 + 2) = *(_BYTE *)(v7 + 144); /*0xffcf4c59*/
*(_WORD *)a6 = *(_WORD *)(v7 + 142); /*0xffcf4c63*/
*(_BYTE *)(a6 + 3) = *(_BYTE *)(v7 + 145); /*0xffcf4c6c*/
*(_BYTE *)(a6 + 4) = *(_BYTE *)(v7 + 146); /*0xffcf4c75*/
v8 = (_BYTE *)(a6 + 5); /*0xffcf4c78*/
v9 = v7 - (a6 + 5); /*0xffcf4c7b*/
do /*0xffcf4c8a*/
{
result = v8[v9 + 150]; /*0xffcf4c7d*/
*v8++ = result; /*0xffcf4c84*/
--n4; /*0xffcf4c87*/
}
while ( n4 ); /*0xffcf4c8a*/
return result; /*0xffcf4c8d*/
}
// Function: IioFunc4C8F @ 0xffcf4c8f (0x39 bytes)
// Index: 1942/2560
char __cdecl IioFunc4C8F(int a1, unsigned __int8 a2, char a3, unsigned __int8 a4, char n2, char a6, char *a7)
{
char result; // al
if ( a3 == 1 ) /*0xffcf4ca5*/
a4 += 3; /*0xffcf4ca9*/
result = KtiFunc88D1(*(_DWORD *)(*(_DWORD *)(a1 + 12) + 4), a2, a4, n2, a6); /*0xffcf4cb9*/
*a7 = result; /*0xffcf4cc4*/
return result; /*0xffcf4cc6*/
}
// Function: IioFunc4CC8 @ 0xffcf4cc8 (0x79e bytes)
// Index: 1943/2560
int __cdecl IioFunc4CC8(
int n6,
int n4,
__int16 p_n60,
int CpuCount,
int n2,
int a6,
int a7,
int a8,
int n52,
__int16 *a10,
__int16 *a11,
__int16 *a12,
__int16 *a13)
{
int n6_1; // ebp
int v14; // eax
unsigned __int8 *n9_1; // edi
int CpuCount_1; // eax
int n52_1; // esi
int v18; // ebx
int n4_2; // eax
int n4_1; // ebp
bool v21; // zf
unsigned __int8 n2_1; // cl
int CpuCount_2; // edx
__int16 n520; // cx
unsigned __int8 n8; // bl
int v27; // ebp
unsigned int v28; // esi
bool v29; // zf
unsigned int v30; // edi
int v31; // ebx
int CpuCount_3; // ebp
int n52_2; // esi
unsigned __int8 *n9_2; // edi
char n2_3; // al
__int16 *v36; // ebp
int n21_1; // eax
__int16 *v38; // eax
int v39; // eax
int v40; // edx
char CpuCount_4; // al
__int16 *v42; // ecx
int v43; // eax
__int16 v44; // ax
__int16 v45; // dx
__int16 v46; // ax... [15583 chars total]
// Function: IioFunc5466 @ 0xffcf5466 (0x1f bytes)
// Index: 1944/2560
int __cdecl IioFunc5466(int n6, int a2, int n52, char *a4)
{
return KtiFunc6520(*(_DWORD *)(*(_DWORD *)(n6 + 12) + 4), a2, n52, a4); /*0xffcf5484*/
}
// Function: IioFunc5485 @ 0xffcf5485 (0x60 bytes)
// Index: 1945/2560
int __cdecl IioFunc5485(int a1, int n4, char a3, unsigned __int8 n6, unsigned __int8 n2, int *a6)
{
unsigned __int8 *p_n42; // esi
p_n42 = *(unsigned __int8 **)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf5493*/
if ( a3 == 1 ) /*0xffcf549c*/
n6 += 3; /*0xffcf54a0*/
if ( *(char *)(1379 * n2 + GetCpuCount((int)p_n42, n4, n6) + 128) >= 0 ) /*0xffcf54c6*/
return 3; /*0xffcf54e1*/
KtiFunc66B8(p_n42, n4, n6, n2, a6); /*0xffcf54d3*/
return 0; /*0xffcf54e2*/
}
// Function: IioFunc54E5 @ 0xffcf54e5 (0x8a bytes)
// Index: 1946/2560
int __cdecl IioFunc54E5(int n4, _DWORD *a2)
{
unsigned __int8 n4_1; // cl
unsigned __int8 *__return_address; // esi
int n3; // eax
unsigned __int8 n4a; // [esp+Ch] [ebp+8h]
n4_1 = 0; /*0xffcf54eb*/
n4a = 0; /*0xffcf54ee*/
__return_address = *(unsigned __int8 **)(*(_DWORD *)(n4 + 12) + 4); /*0xffcf54f4*/
while ( 1 ) /*0xffcf54fa*/
{
n3 = 48704 * n4_1; /*0xffcf54fa*/
if ( __return_address[n3 + 258689] ) /*0xffcf5500*/
{
if ( __return_address[n3 + 258716] ) /*0xffcf550a*/
break; /*0xffcf550a*/
}
n4a = ++n4_1; /*0xffcf5516*/
if ( n4_1 >= 4u ) /*0xffcf551c*/
return n3; /*0xffcf551c*/
}
if ( (unsigned __int8)DdrTrainFunc457F(__return_address, n4a) ) /*0xffcf5524*/
{
if ( (unsigned __int8)DdrTrainFunc457F(__return_address, n4a) == 1 ) /*0xffcf5547*/
{
*a2 = 1350; /*0xffcf554c*/
return (int)a2; /*0xffcf5549*/
}
else
{
n3 = DdrTrainFunc457F(__return_address, n4a); /*0xffcf5558*/
if ( (_BYTE)n3 == 3 ) /*0xffcf5561*/
{
*a2 = 1200; /*0xffcf5566*/
return (int)a2; /*0xffcf5563*/
}
}
}
else
{
*a2 = 1500; /*0xffcf5532*/
return (int)a2; /*0xffcf552f*/
}
return n3; /*0xffcf556c*/
}
// Function: IioFunc556F @ 0xffcf556f (0x49 bytes)
// Index: 1947/2560
_BYTE *__cdecl IioFunc556F(int a1, unsigned __int8 a2, char a3, unsigned __int8 a4, unsigned __int8 a5, _BYTE *a6)
{
unsigned __int8 v6; // cl
v6 = a4; /*0xffcf5579*/
if ( a3 == 1 ) /*0xffcf5583*/
v6 = a4 + 3; /*0xffcf5585*/
*a6 = *(_BYTE *)(1379 * a5 + 48704 * a2 + *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4) + 7688 * v6 + 259138); /*0xffcf55b4*/
return a6; /*0xffcf55a9*/
}
// Function: IioFunc55B8 @ 0xffcf55b8 (0x7f bytes)
// Index: 1948/2560
int __cdecl IioFunc55B8(
int a1,
int a2,
char a3,
int a4,
char a5,
unsigned __int16 i,
unsigned __int16 a7,
int a8,
int a9)
{
int __return_address; // ebx
unsigned int n0x200; // esi
unsigned __int16 j; // di
unsigned __int8 v13; // [esp+Bh] [ebp-1h]
v13 = 0; /*0xffcf55c5*/
__return_address = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf55cc*/
if ( a3 == 1 ) /*0xffcf55d5*/
LOBYTE(a4) = a4 + 3; /*0xffcf55d9*/
n0x200 = i + a7; /*0xffcf55e7*/
if ( n0x200 > 0x200 && *(_WORD *)(__return_address + 257315) == 12 ) /*0xffcf55f9*/
return 4; /*0xffcf55fd*/
for ( j = i; j < n0x200; ++j ) /*0xffcf5606*/
KtiFunc27D8((_BYTE *)__return_address, a2, a4, a5, j, (unsigned __int8 *)(a9 + v13++)); /*0xffcf561b*/
return 0; /*0xffcf5631*/
}
// Function: IioFunc5637 @ 0xffcf5637 (0x84 bytes)
// Index: 1949/2560
int __cdecl IioFunc5637(int a1, int a2)
{
int v2; // eax
int v3; // edi
unsigned __int8 v4; // bl
int result; // eax
int n33751556; // [esp+Ch] [ebp-14h] BYREF
char n4; // [esp+10h] [ebp-10h]
int n15; // [esp+11h] [ebp-Fh]
char n64; // [esp+15h] [ebp-Bh]
int n1333; // [esp+16h] [ebp-Ah]
char v11; // [esp+1Ah] [ebp-6h]
int v12; // [esp+1Bh] [ebp-5h]
v12 = 0; /*0xffcf5640*/
v2 = *(_DWORD *)(a1 + 12); /*0xffcf5646*/
n33751556 = 33751556; /*0xffcf564d*/
n4 = 4; /*0xffcf5654*/
n15 = 15; /*0xffcf5658*/
n64 = 64; /*0xffcf565f*/
n1333 = 1333; /*0xffcf5663*/
v11 = 0; /*0xffcf566a*/
v3 = *(_DWORD *)(v2 + 4); /*0xffcf566e*/
v4 = *(_BYTE *)(v3 + 9402); /*0xffcf5678*/
AutoGenFunc8E72(a2, (char *)&n33751556, 19); /*0xffcf567e*/
*(_DWORD *)(a2 + 5) = *(_DWORD *)(v3 + 246468); /*0xffcf568c*/
if ( *(_BYTE *)(v3 + 257312) ) /*0xffcf568f*/
{
*(_BYTE *)(a2 + 9) = 72; /*0xffcf5698*/
*(_BYTE *)(a2 + 14) = 1; /*0xffcf569c*/
}
result = *(unsigned __int16 *)(48704 * v4 + v3 + 258695); /*0xffcf56a9*/
*(_DWORD *)(a2 + 10) = result; /*0xffcf56b2*/
return result; /*0xffcf56b1*/
}
// Function: IioFunc56BB @ 0xffcf56bb (0x1f bytes)
// Index: 1950/2560
int __usercall IioFunc56BB@<eax>(int a1@<ebx>, int a2, unsigned __int8 a3, unsigned __int8 a4, int a5)
{
return KtiFunc678F(a1, *(_DWORD *)(*(_DWORD *)(a2 + 12) + 4), a3, a4, a5); /*0xffcf56d9*/
}
// Function: IioFunc56DA @ 0xffcf56da (0x1ec bytes)
// Index: 1951/2560
int __cdecl IioFunc56DA(int n6, int n6_1, int a3, int n52, char a5)
{
int n6_2; // ebx
unsigned __int8 *__return_address; // esi
int n4; // eax
_BYTE *SocketInfo; // edi
unsigned __int8 n6_4; // al
unsigned __int8 n6_3; // al
char v12[4]; // [esp+10h] [ebp-4h] BYREF
unsigned __int8 n6a; // [esp+18h] [ebp+4h]
n6_2 = n6_1; /*0xffcf56e0*/
__return_address = *(unsigned __int8 **)(*(_DWORD *)(n6 + 12) + 4); /*0xffcf56ee*/
n6a = __return_address[9402]; /*0xffcf56fb*/
__return_address[9402] = n6_1; /*0xffcf5707*/
n4 = IioFunc5466(n6, a3, n52, v12); /*0xffcf570d*/
if ( n4 != 4 ) /*0xffcf5718*/
{
if ( n52 > 50 ) /*0xffcf5721*/
{
if ( n52 == 53 ) /*0xffcf5777*/
{
if ( !a3 ) /*0xffcf589b*/
{
if ( (a5 & 1) == 0 ) /*0xffcf58a4*/
DdrTrainFunc158E((int)__return_address, n6_1); /*0xffcf58a6*/
MailBoxFuncFB4D((int)__return_address, n6_1); /*0xffcf58ad*/
}
goto LABEL_38; /*0xffcf589b*/
}
if ( (unsigned int)(n52 - 71) > 2 ) /*0xffcf5783*/
goto LABEL_38; /*0xffcf5783*/
}
else if ( n52 < 44 ) /*0xffcf5726*/
{
if ( n52 < 20 ) /*0xffcf572b*/
goto LABEL_38; /*0xffcf572b*/
if ( n52 <= 21 ) /*0xffcf5734*/
{
if ( !a3 ) /*0xffcf5742*/
{
ProcCommonFuncFBF1((int)__return_address); /*0xffcf5749*/
if ( (a5 & 1) != 0 ) /*0xffcf5754*/
WriteLevelingPushPull(__return_address, n6_1, 1, 0); /*0xffcf5759*/
else
WriteLevelingPushPull(__return_address, n6_1, -1, 0x40u); /*0xffcf5761*/
ProcCommonFuncFBFD((int)__return_address); /*0xffcf576a*/
}
goto LABEL_38; /*0xffcf576f*/
}
if ( n52 != 40 ) /*0xffcf5739*/
{
LABEL_38:
__return_address[9402] = n6a; /*0xffcf58b4*/
return 0; /*0xffcf58be*/
}
}
SocketInfo = (_BYTE *)GetSocketInfo((int)__return_address, n6_1); /*0xffcf5795*/
if ( (a5 & 1) != 0 ) /*0xffcf5799*/
{
if ( a3 == 1 && (a5 & 6) == 0 ) /*0xffcf582c*/
{
ProcCommonFuncFBF1((int)__return_address); /*0xffcf582f*/
KtiFunc9CD5(__return_address, n6_1, 1); /*0xffcf5837*/
ProcCommonFuncFBFD((int)__return_address); /*0xffcf583d*/
}
n6_3 = 0; /*0xffcf5845*/
LOBYTE(n6_1) = 0; /*0xffcf5847*/
do /*0xffcf5872*/
{
if ( *SocketInfo ) /*0xffcf584b*/
{
ProcCommonFunc1D71(__return_address, n6_2, n6_1, 0); /*0xffcf5858*/
n6_3 = n6_1; /*0xffcf585d*/
}
++n6_3; /*0xffcf5864*/
SocketInfo += 7688; /*0xffcf5866*/
LOBYTE(n6_1) = n6_3; /*0xffcf586c*/
}
while ( n6_3 < 6u ); /*0xffcf5872*/
if ( !a3 ) /*0xffcf5876*/
MailBoxFuncFB4D((int)__return_address, n6_2); /*0xffcf587a*/
}
else
{
if ( !a3 ) /*0xffcf57a1*/
{
ProcCommonFuncFBF1((int)__return_address); /*0xffcf57a4*/
KtiFunc4865((int)__return_address, n6_1, -1); /*0xffcf57ad*/
ProcCommonFuncFBFD((int)__return_address); /*0xffcf57b3*/
DdrTrainFunc158E((int)__return_address, n6_1); /*0xffcf57ba*/
}
n6_4 = 0; /*0xffcf57c2*/
LOBYTE(n6_1) = 0; /*0xffcf57c4*/
do /*0xffcf57ef*/
{
if ( *SocketInfo ) /*0xffcf57c8*/
{
ProcCommonFunc1D71(__return_address, n6_2, n6_1, 1); /*0xffcf57d5*/
n6_4 = n6_1; /*0xffcf57da*/
}
++n6_4; /*0xffcf57e1*/
SocketInfo += 7688; /*0xffcf57e3*/
LOBYTE(n6_1) = n6_4; /*0xffcf57e9*/
}
while ( n6_4 < 6u ); /*0xffcf57ef*/
if ( a3 == 1 && (a5 & 6) == 0 ) /*0xffcf57ff*/
{
ProcCommonFuncFBF1((int)__return_address); /*0xffcf5806*/
KtiFunc9CD5(__return_address, n6_2, -1); /*0xffcf580f*/
ProcCommonFuncFBFD((int)__return_address); /*0xffcf5815*/
}
}
goto LABEL_38; /*0xffcf581d*/
}
return n4; /*0xffcf58c0*/
}
// Function: IioFunc58C6 @ 0xffcf58c6 (0x3f bytes)
// Index: 1952/2560
int __usercall IioFunc58C6@<eax>(int n4@<ebx>, int n6, unsigned __int8 n4a, unsigned __int8 a4)
{
int v4; // esi
v4 = *(_DWORD *)(*(_DWORD *)(n6 + 12) + 4); /*0xffcf58d8*/
KtiFunc67D7(n4, v4, n4a, a4, 1); /*0xffcf58dc*/
KtiFunc8D9F(v4, 20); /*0xffcf58e4*/
KtiFunc67D7(n4, v4, n4a, a4, 0); /*0xffcf58f2*/
return KtiFunc8D9F(v4, 20); /*0xffcf5902*/
}
// Function: IioFunc5905 @ 0xffcf5905 (0x92 bytes)
// Index: 1953/2560
int __cdecl IioFunc5905(int a1, int n4, char a3)
{
_BYTE *__return_address; // esi
_BYTE *SocketInfo; // edi
unsigned __int8 n6; // bl
char v6; // bp
unsigned __int8 n63; // [esp+10h] [ebp-4h]
unsigned __int8 n6_1; // [esp+18h] [ebp+4h]
n63 = 0; /*0xffcf5909*/
__return_address = *(_BYTE **)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf591b*/
SocketInfo = (_BYTE *)GetSocketInfo((int)__return_address, n4); /*0xffcf5928*/
n6 = 0; /*0xffcf592d*/
v6 = 0; /*0xffcf592f*/
n6_1 = 0; /*0xffcf5932*/
do /*0xffcf596e*/
{
if ( *SocketInfo && a3 == DdrTrainFunc45AB((int)__return_address, n4, n6_1) ) /*0xffcf594e*/
n63 |= 1 << v6; /*0xffcf595a*/
++n6; /*0xffcf595e*/
SocketInfo += 7688; /*0xffcf5960*/
++v6; /*0xffcf5966*/
n6_1 = n6; /*0xffcf5967*/
}
while ( n6 < 6u ); /*0xffcf596e*/
ProcCommonFuncFBF1((int)__return_address); /*0xffcf5971*/
KtiFuncD59F(__return_address, n4, n63); /*0xffcf5983*/
return ProcCommonFuncFBFD((int)__return_address); /*0xffcf5991*/
}
// Function: IioFunc5997 @ 0xffcf5997 (0x17 bytes)
// Index: 1954/2560
BOOL __cdecl IioFunc5997(int a1)
{
return KtiFunc97F8(*(_DWORD *)(*(_DWORD *)(a1 + 12) + 4)) != 0; /*0xffcf59ad*/
}
// Function: IioFunc59AE @ 0xffcf59ae (0x4f0 bytes)
// Index: 1955/2560
int __cdecl IioFunc59AE(
int n6,
int n4,
unsigned __int8 a3,
char n9,
int n2,
int a6,
int a7,
int a8,
int n52,
__int16 a10,
__int16 n60)
{
int v11; // eax
unsigned __int8 *__return_address; // edi
bool v14; // zf
unsigned __int8 n8; // dl
bool v16; // dh
unsigned __int8 n8_1; // dh
char v18; // bl
unsigned __int8 n2_1; // cl
unsigned __int8 *n9a_1; // edx
int n4_1; // ebx
int v22; // esi
_BYTE *n6_1; // [esp+10h] [ebp-2Ch]
__int16 p_p_n60[2]; // [esp+14h] [ebp-28h] BYREF
__int16 p_n60[2]; // [esp+18h] [ebp-24h] BYREF
char v26[4]; // [esp+1Ch] [ebp-20h]
unsigned int v27; // [esp+20h] [ebp-1Ch]
unsigned int v28; // [esp+24h] [ebp-18h]
__int16 n0x7FFF[2]; // [esp+28h] [ebp-14h] BYREF
__int16 n127[2]; // [esp+2Ch] [ebp-10h] BYREF
__int16 v31[2]; // [esp+30h] [ebp-Ch] BYREF
__int16 v32[2]; // [esp+34h] [ebp-8h] BYREF
char v33[4]; // [esp+38h] [ebp-4h] BYREF
unsigned __int8 *n9a; // [esp+4Ch] [ebp+10h]
char n9b; // [esp+4Ch] [ebp+10h]
v11 = *(_DWORD *)(n6 + 12); /*0xffcf59bd*/
*(_DWORD *)n127 = 0; /*0xffcf59c2*/
*(_DWORD *)n0x7FFF = 0; /*0xffcf59c6*/
*(_DWORD *)p_n60 = 0; /*0xffcf59ca*/
*(_DWORD *)p_p_n60 = 0; /*0xffcf59ce*/
__return_address = *(unsigned __int8 **)(v11 + 4); /*0xffcf59d2*/
v26[0] = 0; /*0xffcf59d7*/
*(_DWORD *)v32 = 0; /*0xffcf59db*/
*(_DWORD *)v31 = 0; /*0xffcf59df*/
GetSocketInfo((int)__return_address, n4); /*0xffcf59e3*/
LOBYTE(n6_1) = n9; /*0xffcf59f3*/
if ( a3 == 1 ) /*0xffcf59f7*/
LOBYTE(n6_1) = n9 + 3; /*0xffcf59fb*/
n9a = (unsigned __int8 *)GetCpuCount((int)__return_address, n4, (unsigned __int8)n6_1); /*0xffcf5a0e*/
if ( IioFunc5466(n6, a8, n52, v33) == 4 ) /*0xffcf5a2b*/
return 4; /*0xffcf5a2b*/
if ( a8 == 1 ) /*0xffcf5a3a*/
{
if ( n52 != 53 ) /*0xffcf5a3f*/
{
if ( n52 == 40 || n52 == 44 ) /*0xffcf5ab6*/
{
if ( !KtiFuncCB2E((int)__return_address, n4, (unsigned __int8)n6_1, n2) ) /*0xffcf5ac2*/
return 4; /*0xffcf5ac2*/
n2_1 = n2; /*0xffcf5ad2*/
n9a_1 = n9a; /*0xffcf5ad6*/
if ( n9a[1379 * (unsigned __int8)n2 + 107] ) /*0xffcf5ae3*/
{
if ( !__return_address[195] ) /*0xffcf5ae9*/
return 4; /*0xffcf5aef*/
}
}
else
{
n2_1 = n2; /*0xffcf5af7*/
n9a_1 = n9a; /*0xffcf5afb*/
}
if ( (n52 == 74 || n52 == 75) && (!n9a_1[1379 * n2_1 + 107] || !__return_address[195]) ) /*0xffcf5b1c*/
return 4; /*0xffcf5b22*/
if ( n52 != 1 && n52 != 22 && n52 != 5 && n52 != 23 ) /*0xffcf5b3a*/
goto LABEL_10; /*0xffcf5b3a*/
v14 = ProcCommonFunc24FA((int)__return_address, n4, (unsigned __int8)n6_1, n2_1) == 0; /*0xffcf5b4f*/
LABEL_9:
if ( !v14 ) /*0xffcf5a6c*/
goto LABEL_10; /*0xffcf5a6c*/
return 4; /*0xffcf5a30*/
}
if ( !KtiFuncCB2E((int)__return_address, n4, (unsigned __int8)n6_1, n2) ) /*0xffcf5a4b*/
{
v14 = n9a[1379 * (unsigned __int8)n2 + 107] == 0; /*0xffcf5a68*/
goto LABEL_9; /*0xffcf5a68*/
}
}
LABEL_10:
n8 = 0; /*0xffcf5a6e*/
v16 = __return_address[257312] != 0; /*0xffcf5a7a*/
v28 = 0; /*0xffcf5a7d*/
v27 = 0; /*0xffcf5a81*/
n8_1 = v16 + 8; /*0xffcf5a85*/
n9b = 0; /*0xffcf5a88*/
v18 = v26[0]; /*0xffcf5a8c*/
do /*0xffcf5b7e*/
{
if ( n8 >= 4u ) /*0xffcf5a93*/
{
if ( n8 >= 8u ) /*0xffcf5b59*/
{
if ( n8 == 8 ) /*0xffcf5b71*/
{
v18 |= *(_BYTE *)(a7 + 8); /*0xffcf5b73*/
v26[0] = v18; /*0xffcf5b76*/
}
}
else
{
v27 |= *(unsigned __int8 *)(n8 + a7) << (8 * n8 - 32); /*0xffcf5b6b*/
}
}
else
{
v28 |= *(unsigned __int8 *)(n8 + a7) << (8 * n8); /*0xffcf5aa5*/
}
++n8; /*0xffcf5b7a*/
}
while ( n8 < n8_1 ); /*0xffcf5b7e*/
*(_DWORD *)p_p_n60 = (unsigned __int16)(n60 - a10); /*0xffcf5b92*/
ProcCommonFuncFBF1((int)__return_address); /*0xffcf5b96*/
n4_1 = 0; /*0xffcf5ba2*/
if ( n52 > 50 ) /*0xffcf5ba6*/
{
switch ( n52 ) /*0xffcf5d4d*/
{
case '5': /*0xffcf5d4d*/
KtiFuncBD44((int)__return_address, n4, (int)n6_1, n2, a8, 28, p_p_n60); /*0xffcf5e68*/
goto LABEL_59; /*0xffcf5e68*/
case '<': /*0xffcf5d4d*/
MailBoxFunc5B6A(__return_address, n4, (int)n6_1, n2 + 2, 2, p_n60); /*0xffcf5dbf*/
ProcCommonFunc2155(__return_address, n4, (int)n6_1, n2, 2, p_p_n60); /*0xffcf5dd5*/
v22 = (__int16)(n60 + p_n60[0] + (p_p_n60[0] << 7) - a10); /*0xffcf5df4*/
*(_DWORD *)p_p_n60 = (unsigned __int16)((__int16)(n60 + p_n60[0] + (p_p_n60[0] << 7) - a10) / 128); /*0xffcf5e05*/
ProcCommonFunc2155(__return_address, n4, (int)n6_1, n2, 24, p_p_n60); /*0xffcf5e1d*/
*(_DWORD *)p_n60 = (unsigned __int16)(v22 % 128); /*0xffcf5e35*/
MailBoxFunc5B6A(__return_address, n4, (int)n6_1, n2 + 2, 24, p_n60); /*0xffcf5e47*/
n4_1 = 0; /*0xffcf5e4f*/
goto LABEL_59; /*0xffcf5e51*/
case '=': /*0xffcf5d4d*/
MailBoxFunc6E2A(__return_address, n4, (int)n6_1, 28, p_p_n60); /*0xffcf5d9d*/
goto LABEL_59; /*0xffcf5da5*/
}
if ( (unsigned int)(n52 - 71) > 4 ) /*0xffcf5d63*/
goto LABEL_42; /*0xffcf5d63*/
goto LABEL_55; /*0xffcf5d63*/
}
if ( n52 >= 44 ) /*0xffcf5baf*/
{
KtiFuncBF1D( /*0xffcf5d3d*/
__return_address,
n4,
(int)n6_1,
n2,
a8,
n52,
28,
p_p_n60,
(unsigned __int16 *)n127,
(unsigned __int16 *)n0x7FFF);
LABEL_59:
n9b = 1; /*0xffcf5e70*/
goto LABEL_60; /*0xffcf5e70*/
}
if ( n52 >= 0 ) /*0xffcf5bb7*/
{
if ( n52 <= 6 || n52 == 18 ) /*0xffcf5bc1*/
goto LABEL_43; /*0xffcf5bc1*/
if ( n52 > 19 ) /*0xffcf5bc6*/
{
if ( n52 > 25 ) /*0xffcf5bcb*/
{
if ( n52 != 40 ) /*0xffcf5bd0*/
goto LABEL_42; /*0xffcf5bd0*/
LABEL_55:
KtiFuncBB42( /*0xffcf5d69*/
__return_address,
n4,
(int)n6_1,
n2,
a8,
n52,
28,
p_p_n60,
(unsigned __int16 *)n127,
(unsigned __int16 *)n0x7FFF);
goto LABEL_59; /*0xffcf5d8e*/
}
LABEL_43:
if ( n52 == 20 ) /*0xffcf5be1*/
LOBYTE(n9a) = 18; /*0xffcf5be3*/
else
LOBYTE(n9a) = ProcCommonFunc1DB2((int)__return_address, n4, (unsigned __int8)n6_1, n2, n52, a8); /*0xffcf5c01*/
if ( a8 == 1 && n52 == 20 ) /*0xffcf5c15*/
{
IioFunc5FAB( /*0xffcf5c5d*/
__return_address,
n4,
n6_1,
n2,
a6,
1,
1,
0x15u,
v32,
v31,
n127[0],
n0x7FFF[0],
n9a,
p_n60,
(unsigned __int16 *)&n60,
v28,
v27,
v26[0]);
IioFunc5FAB( /*0xffcf5cb7*/
__return_address,
n4,
n6_1,
n2,
a6,
1,
1,
0x16u,
v32,
v31,
n127[0],
n0x7FFF[0],
n9a,
p_n60,
(unsigned __int16 *)&n60,
v28,
v27,
v26[0]);
}
else
{
IioFunc5FAB( /*0xffcf5d10*/
__return_address,
n4,
n6_1,
n2,
a6,
1,
a8,
n52,
v32,
v31,
n127[0],
n0x7FFF[0],
n9a,
p_n60,
(unsigned __int16 *)&n60,
v28,
v27,
v26[0]);
}
goto LABEL_59; /*0xffcf5cc2*/
}
}
LABEL_42:
n4_1 = 4; /*0xffcf5bd6*/
LABEL_60:
ProcCommonFuncFBFD((int)__return_address); /*0xffcf5e75*/
if ( n9b == 1 ) /*0xffcf5e81*/
IioFunc58C6(n4_1, n6, n4, a3); /*0xffcf5e8c*/
return n4_1; /*0xffcf5e96*/
}
// Function: IioFunc5E9E @ 0xffcf5e9e (0x5d bytes)
// Index: 1956/2560
int __cdecl IioFunc5E9E(int a1, int a2)
{
int result; // eax
int n4; // edi
_BYTE *n6; // ebx
_BYTE *v5; // esi
result = *(_DWORD *)(a1 + 12); /*0xffcf5ea5*/
n4 = 4; /*0xffcf5eaa*/
n6 = *(_BYTE **)(result + 4); /*0xffcf5eab*/
v5 = n6 + 258700; /*0xffcf5eae*/
do /*0xffcf5ef5*/
{
if ( *(v5 - 11) ) /*0xffcf5eb4*/
{
switch ( a2 ) /*0xffcf5ec2*/
{
case 1200: /*0xffcf5ec2*/
*v5 = 3; /*0xffcf5ec4*/
break;
case 1350: /*0xffcf5ec2*/
*v5 = 2; /*0xffcf5ed3*/
break;
case 1500: /*0xffcf5ec2*/
*v5 = 0; /*0xffcf5ee2*/
break;
}
result = KtiFunc8A50(n6); /*0xffcf5ee6*/
}
v5 += 48704; /*0xffcf5eec*/
--n4; /*0xffcf5ef2*/
}
while ( n4 ); /*0xffcf5ef5*/
return result; /*0xffcf5ef7*/
}
// Function: IioFunc5EFB @ 0xffcf5efb (0x22 bytes)
// Index: 1957/2560
int __cdecl IioFunc5EFB(int a1, int a2, char a3, char a4, bool *a5)
{
return AutoGenFuncF054(*(_DWORD *)(*(_DWORD *)(a1 + 12) + 4), a2, a3, a4, a5); /*0xffcf5f1b*/
}
// Function: IioFunc5F1D @ 0xffcf5f1d (0x1f bytes)
// Index: 1958/2560
int __cdecl IioFunc5F1D(int a1, int a2)
{
return nullsub_5(*(_DWORD *)(*(_DWORD *)(a1 + 12) + 4), a2); /*0xffcf5f3b*/
}
// Function: IioFunc5F3C @ 0xffcf5f3c (0x22 bytes)
// Index: 1959/2560
int __cdecl IioFunc5F3C(int a1, unsigned __int8 a2, char a3, char a4, bool *a5)
{
return KtiFunc6814(*(unsigned __int8 **)(*(_DWORD *)(a1 + 12) + 4), a2, a3, a4, a5); /*0xffcf5f5c*/
}
// Function: IioFunc5F5E @ 0xffcf5f5e (0x3f bytes)
// Index: 1960/2560
int __cdecl IioFunc5F5E(int a1, __int16 a2, __int16 a3, __int16 a4, __int16 *a5, __int16 *a6)
{
__int16 v6; // ax
int result; // eax
v6 = a3 - a2; /*0xffcf5f6a*/
if ( *a5 > (__int16)(a3 - a2) ) /*0xffcf5f73*/
v6 = *a5; /*0xffcf5f75*/
*a5 = v6; /*0xffcf5f7e*/
LOWORD(result) = a4 - a2; /*0xffcf5f8a*/
if ( *a6 >= (__int16)(a4 - a2) ) /*0xffcf5f90*/
result = (__int16)result; /*0xffcf5f97*/
else
result = *a6; /*0xffcf5f92*/
*a6 = result; /*0xffcf5f98*/
return result; /*0xffcf5f9b*/
}
// Function: IioFunc5F9D @ 0xffcf5f9d (0xe bytes)
// Index: 1961/2560
char __cdecl IioFunc5F9D(char a1, char a2)
{
char result; // al
result = a2; /*0xffcf5fa2*/
if ( a1 == 1 ) /*0xffcf5fa6*/
return a2 + 3; /*0xffcf5fa8*/
return result; /*0xffcf5faa*/
}
// Function: IioFunc5FAB @ 0xffcf5fab (0x591 bytes)
// Index: 1962/2560
char __cdecl IioFunc5FAB(
unsigned __int8 *__return_address,
int n4,
_BYTE *n6,
int n2,
int a5,
char a6,
int a7,
unsigned int n21,
__int16 *a9,
__int16 *a10,
__int16 n127,
__int16 n0x7FFF,
unsigned __int8 *n9,
__int16 *p_n60,
unsigned __int16 *p_n60_1,
unsigned int a16,
unsigned int a17,
char a18)
{
unsigned int v18; // eax
unsigned __int8 n8; // bh
int v20; // ecx
unsigned __int8 n4_2; // bl
unsigned __int8 n4_1; // bl
unsigned __int8 n8_1; // bl
int v24; // ebp
unsigned int v25; // eax
char v26; // cl
unsigned __int8 n4_4; // bh
unsigned __int8 n4_3; // bh
int n17; // [esp+10h] [ebp-8h]
int v31; // [esp+14h] [ebp-4h]
int v32; // [esp+14h] [ebp-4h]
LOBYTE(v18) = (_BYTE)n9; /*0xffcf5fad*/
if ( (_BYTE)n9 == 9 ) /*0xffcf5fb7*/
{
n8 = 0; /*0xffcf5fc1*/
v20 = 0; /*0xffcf5fc3*/
LOBYTE(n17) = 0; /*0xffcf... [9947 chars total]
// Function: IioFunc653C @ 0xffcf653c (0x69 bytes)
// Index: 1963/2560
bool __cdecl IioFunc653C(int a1, char n17, char a3, char n18, unsigned int a5, unsigned int a6, unsigned __int8 a7)
{
char v7; // dl
v7 = a3; /*0xffcf653f*/
if ( ((a5 >> (4 * n17) >> a3) & 1) == 0 || !a5 || ((a6 >> (4 * n17) >> a3) & 1) == 0 || !a6 ) /*0xffcf6579*/
return 0; /*0xffcf6579*/
if ( n18 == 18 && n17 == 17 ) /*0xffcf6584*/
v7 = a3 + 4; /*0xffcf6586*/
return ((a7 >> v7) & 1) != 0 && a7; /*0xffcf659a*/
}
// Function: IioFunc65A5 @ 0xffcf65a5 (0x69 bytes)
// Index: 1964/2560
int __cdecl IioFunc65A5(int a1, int a2, char a3, char a4, int a5, int a6)
{
int v6; // edi
int SocketInfo; // esi
int v8; // esi
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf65b3*/
SocketInfo = GetSocketInfo(v6, a2); /*0xffcf65bf*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf65d5*/
if ( !*(_BYTE *)(7688 * (unsigned __int8)a1 + SocketInfo + 6673) || *(_WORD *)(v6 + 257315) != 12 ) /*0xffcf65ea*/
return 3; /*0xffcf6607*/
v8 = 0; /*0xffcf65ef*/
IioTailFn_FFD019E3(v6, a2, a1, a5, a6); /*0xffcf65fb*/
return v8; /*0xffcf6608*/
}
// Function: IioFunc660E @ 0xffcf660e (0x32 bytes)
// Index: 1965/2560
int __cdecl IioFunc660E(int a1, int a2, char a3, char a4, int a5)
{
int v5; // esi
v5 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf661e*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6629*/
IioTailFn_FFD01A38(v5, a2, a1, a5); /*0xffcf6633*/
return 0; /*0xffcf663d*/
}
// Function: IioFunc6640 @ 0xffcf6640 (0xac bytes)
// Index: 1966/2560
char __cdecl IioFunc6640(int a1, int a2)
{
_DWORD v3[6]; // [esp+0h] [ebp-4Ch] BYREF
__int16 v4; // [esp+18h] [ebp-34h]
int n255; // [esp+1Ah] [ebp-32h]
char v6; // [esp+1Eh] [ebp-2Eh]
int n31; // [esp+1Fh] [ebp-2Dh]
__int16 n7946; // [esp+23h] [ebp-29h]
int n63; // [esp+25h] [ebp-27h]
int n255_1; // [esp+29h] [ebp-23h]
int n522129183; // [esp+2Dh] [ebp-1Fh]
int n522126332; // [esp+31h] [ebp-1Bh]
__int16 n2040; // [esp+35h] [ebp-17h]
int v14; // [esp+37h] [ebp-15h]
int n522127359; // [esp+3Bh] [ebp-11h]
__int16 v16; // [esp+3Fh] [ebp-Dh]
__int16 n127; // [esp+41h] [ebp-Bh]
int n268828680; // [esp+43h] [ebp-9h]
int n2335; // [esp+47h] [ebp-5h]
v3[0] = 52365120; /*0xffcf664d*/
n255 = 255; /*0xffcf6654*/
n255_1 = 255; /*0xffcf6657*/
v16 = -128; /*0xffcf665d*/
n127 = 127; /*0xffcf6662*/
v3[1] = 0xFFFFFF; /*0xffcf666f*/
v3[2] = 0x7FFFFFF; /*0xffcf6676*/
v3[3] = 68161343; /*0xffcf667d*/
v3[4] = 0xFFFF; /*0xffcf6684*/
v3[5] = -1; /*0xffcf668b*/
v4 = -1; /*0xffcf6692*/
v6 = 1; /*0xffcf6698*/
n31 = 31; /*0xffcf669c*/
n7946 = 7946; /*0xffcf66a3*/
n63 = 63; /*0xffcf66a9*/
n522129183 = 522129183; /*0xffcf66b0*/
n522126332 = 522126332; /*0xffcf66b7*/
n2040 = 2040; /*0xffcf66be*/
v14 = -134209761; /*0xffcf66c4*/
n522127359 = 522127359; /*0xffcf66cb*/
n268828680 = 268828680; /*0xffcf66d2*/
n2335 = 2335; /*0xffcf66d9*/
return AutoGenFunc8E72(a2, (char *)v3, 75); /*0xffcf66e8*/
}
// Function: IioFunc66EC @ 0xffcf66ec (0x41 bytes)
// Index: 1967/2560
bool *__cdecl IioFunc66EC(int a1, unsigned __int8 a2, char a3, char a4, bool *a5)
{
int SocketInfo; // esi
int v6; // ecx
SocketInfo = GetSocketInfo(*(_DWORD *)(*(_DWORD *)(a1 + 12) + 4), a2); /*0xffcf6704*/
v6 = (unsigned __int8)IioFunc5F9D(a3, a4); /*0xffcf670e*/
*a5 = *(_BYTE *)(7688 * v6 + SocketInfo + 6262) != 0; /*0xffcf6729*/
return a5; /*0xffcf6725*/
}
// Function: IioFunc672D @ 0xffcf672d (0x30 bytes)
// Index: 1968/2560
int __cdecl IioFunc672D(int a1, int a2, char a3, char a4, int a5)
{
int v5; // esi
v5 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf673d*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6748*/
return IioTailFn_FFD01A58(v5, a2, a1, a5); /*0xffcf675a*/
}
// Function: IioFunc675D @ 0xffcf675d (0x33 bytes)
// Index: 1969/2560
int __cdecl IioFunc675D(int a1, int a2, char a3, char a4, int a5, int a6)
{
int v6; // esi
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf676d*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6778*/
return IioTailFn_FFD01A7A(v6, a2, a1, a5, a6); /*0xffcf678d*/
}
// Function: IioFunc6790 @ 0xffcf6790 (0x33 bytes)
// Index: 1970/2560
int __cdecl IioFunc6790(int a1, int a2, char a3, char a4, int a5, int a6)
{
int v6; // esi
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf67a0*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf67ab*/
return IioTailFn_FFD01AA1(v6, a2, a1, a5, a6); /*0xffcf67c0*/
}
// Function: IioFunc67C3 @ 0xffcf67c3 (0x30 bytes)
// Index: 1971/2560
int __cdecl IioFunc67C3(int a1, int a2, char a3, char a4, int a5)
{
int v5; // esi
v5 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf67d3*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf67de*/
return IioTailFn_FFD01AC8(v5, a2, a1, a5); /*0xffcf67f0*/
}
// Function: IioFunc67F3 @ 0xffcf67f3 (0x36 bytes)
// Index: 1972/2560
int __cdecl IioFunc67F3(int a1, int a2, char a3, char a4, int a5, int a6, int a7)
{
int v7; // esi
v7 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6803*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf680e*/
return IioTailFn_FFD01B24(v7, a2, a1, a5, a6, a7); /*0xffcf6826*/
}
// Function: IioFunc6829 @ 0xffcf6829 (0x33 bytes)
// Index: 1973/2560
int __cdecl IioFunc6829(int a1, int a2, char a3, char a4, int a5, int a6)
{
int v6; // esi
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6839*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6844*/
return IioTailFn_FFD01B75(v6, a2, a1, a5, a6); /*0xffcf6859*/
}
// Function: IioFunc685C @ 0xffcf685c (0x33 bytes)
// Index: 1974/2560
int __cdecl IioFunc685C(int a1, int a2, int a3, char a4, int a5)
{
int v5; // esi
v5 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf686c*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6877*/
return IioTailFn_FFD01CB7(v5, a2, a3, a1, a5); /*0xffcf688c*/
}
// Function: IioFunc688F @ 0xffcf688f (0x22 bytes)
// Index: 1975/2560
int __cdecl IioFunc688F(int a1, int a2, int a3, int a4, int a5)
{
return IioTailFn_FFD01ED8(*(_DWORD *)(*(_DWORD *)(a1 + 12) + 4), a2, a3, a4, a5); /*0xffcf68af*/
}
// Function: IioFunc68B1 @ 0xffcf68b1 (0x33 bytes)
// Index: 1976/2560
int __cdecl IioFunc68B1(int a1, int a2, int a3, char a4, int a5)
{
int v5; // esi
v5 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf68c1*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf68cc*/
return IioTailFn_FFD01F38(v5, a2, a3, a1, a5); /*0xffcf68e1*/
}
// Function: IioFunc68E4 @ 0xffcf68e4 (0x32 bytes)
// Index: 1977/2560
int __cdecl IioFunc68E4(int a1, int a2, char a3, char a4, int a5)
{
int v5; // esi
v5 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf68f4*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf68ff*/
IioTailFn_FFD02048(v5, a2, a1, a5); /*0xffcf6909*/
return 0; /*0xffcf6913*/
}
// Function: IioFunc6916 @ 0xffcf6916 (0x3c bytes)
// Index: 1978/2560
int __cdecl IioFunc6916(int a1, int a2, char a3, char a4, int a5, int a6, int a7, int a8, int a9)
{
int v9; // esi
v9 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6926*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6931*/
return IioTailFn_FFD02084(v9, a2, a1, a5, a6, a7, a8, a9); /*0xffcf694f*/
}
// Function: IioFunc6952 @ 0xffcf6952 (0x117 bytes)
// Index: 1979/2560
int __cdecl IioFunc6952(
int a1,
unsigned __int8 a2,
char a3,
char a4,
unsigned __int64 *a5,
unsigned __int8 a6,
unsigned __int8 a7)
{
unsigned __int8 v7; // al
char *v9; // esi
char *v10; // edi
unsigned int v11; // ebx
int v12; // eax
bool v13; // zf
int v15; // [esp+0h] [ebp-DCh]
int v16; // [esp+4h] [ebp-D8h]
unsigned __int8 *v17; // [esp+8h] [ebp-D4h]
_BYTE v18[2]; // [esp+Ch] [ebp-D0h] BYREF
char v19; // [esp+Eh] [ebp-CEh] BYREF
_BYTE v20[4]; // [esp+6Ch] [ebp-70h] BYREF
char v21; // [esp+70h] [ebp-6Ch] BYREF
v17 = *(unsigned __int8 **)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6973*/
LOBYTE(v16) = IioFunc5F9D(a3, a4); /*0xffcf697c*/
v7 = a6; /*0xffcf6980*/
if ( a6 ) /*0xffcf698b*/
{
v9 = &v19; /*0xffcf699e*/
v10 = &v21; /*0xffcf69a3*/
v15 = a6; /*0xffcf69aa*/
do /*0xffcf6a25*/
{
v11 = *(_DWORD *)a5; /*0xffcf69ae*/
v12 = DdrTrainFunc6117(*a5++, 0x20u); /*0xffcf69b8*/
*((_WORD *)v9 - 1) = v12 & 0x3FF; /*0xffcf69c9*/
*((_DWORD *)v10 - 1) = v11 & 0x3FFFF; /*0xffcf69d5*/
*v9 = ((unsigned int)v12 >> 12) & 0xF; /*0xffcf69e2*/
*v10 = (v11 >> 20) & 7; /*0xffcf69e9*/
v10 += 7; /*0xffcf69ee*/
v9 += 6; /*0xffcf69f3*/
*(v9 - 5) = BYTE2(v12) & 0x3F; /*0xffcf69f6*/
*(v10 - 6) = HIBYTE(v11) & 0xF; /*0xffcf6a14*/
v13 = v15-- == 1; /*0xffcf6a17*/
*(v10 - 5) = (v11 >> 30) & 3; /*0xffcf6a1c*/
*(v9 - 4) = HIBYTE(v12) & 0x3F; /*0xffcf6a1f*/
*(v9 - 3) = v12 < 0; /*0xffcf6a22*/
}
while ( !v13 ); /*0xffcf6a25*/
v7 = a6; /*0xffcf6a27*/
}
return DdrTrainFunc4EE(v17, a2, v16, a7, a7 + v7, (int)v20, (int)v18); /*0xffcf6a68*/
}
// Function: IioFunc6A69 @ 0xffcf6a69 (0x41 bytes)
// Index: 1980/2560
int __cdecl IioFunc6A69(int a1, int a2, char a3, char a4, int a5, int a6, int a7, int a8, int a9, int a10)
{
int v10; // esi
v10 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6a79*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6a84*/
IioTailFn_FFD020F3(v10, a2, a1, a5, a6, a7, a8, a9, a10); /*0xffcf6a9d*/
return 0; /*0xffcf6aa7*/
}
// Function: IioFunc6AAA @ 0xffcf6aaa (0x35 bytes)
// Index: 1981/2560
int __cdecl IioFunc6AAA(int a1, int a2, char a3, char a4, int a5, int a6)
{
int v6; // esi
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6aba*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6ac5*/
IioTailFn_FFD0215D(v6, a2, a1, a5, a6); /*0xffcf6ad2*/
return 0; /*0xffcf6adc*/
}
// Function: IioFunc6ADF @ 0xffcf6adf (0x33 bytes)
// Index: 1982/2560
int __cdecl IioFunc6ADF(int a1, int a2, char a3, char a4, int a5, int a6)
{
int v6; // esi
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6aef*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6afa*/
return IioTailFn_FFD021DD(v6, a2, a1, a5, a6); /*0xffcf6b0f*/
}
// Function: IioFunc6B12 @ 0xffcf6b12 (0x6d bytes)
// Index: 1983/2560
int __cdecl IioFunc6B12(int a1, int a2, char a3, char a4, unsigned __int8 a5)
{
int v5; // ebx
int v6; // edi
char v7; // si
unsigned __int8 i; // dl
char v10; // [esp+Ch] [ebp-4h]
LOBYTE(v5) = 0; /*0xffcf6b1f*/
v10 = 0; /*0xffcf6b24*/
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6b2a*/
v7 = 0; /*0xffcf6b37*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6b39*/
for ( i = 0; i < 8u; i += 2 ) /*0xffcf6b3c*/
{
if ( ((a5 >> i) & 1) != 0 || ((a5 >> (i + 1)) & 1) != 0 ) /*0xffcf6b50*/
{
v5 = (unsigned __int8)v5 | (1 << v7); /*0xffcf6b55*/
v10 = v5; /*0xffcf6b58*/
}
++v7; /*0xffcf6b5e*/
}
IioTailFn_FFD0221C(v6, a2, a1, v10); /*0xffcf6b6e*/
return 0; /*0xffcf6b78*/
}
// Function: IioFunc6B7F @ 0xffcf6b7f (0x38 bytes)
// Index: 1984/2560
int __cdecl IioFunc6B7F(int a1, int a2, char a3, char a4, int a5, int a6, int a7)
{
int v7; // esi
v7 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6b8f*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6b9a*/
IioTailFn_FFD02258(v7, a2, a1, a5, a6, a7); /*0xffcf6baa*/
return 0; /*0xffcf6bb4*/
}
// Function: IioFunc6BB7 @ 0xffcf6bb7 (0x21 bytes)
// Index: 1985/2560
int __cdecl IioFunc6BB7(int a1, int a2, int a3, char a4)
{
IioTailFunc234B(*(_DWORD *)(*(_DWORD *)(a1 + 12) + 4), a2, a3, a4); /*0xffcf6bcd*/
return 0; /*0xffcf6bd7*/
}
// Function: IioFunc6BD8 @ 0xffcf6bd8 (0x32 bytes)
// Index: 1986/2560
int __cdecl IioFunc6BD8(int a1, int a2, char a3, char a4, int a5)
{
int v5; // esi
v5 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6be8*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6bf3*/
IioTailFn_FFD0238E(v5, a2, a1, a5); /*0xffcf6bfd*/
return 0; /*0xffcf6c07*/
}
// Function: IioFunc6C0A @ 0xffcf6c0a (0x36 bytes)
// Index: 1987/2560
int __cdecl IioFunc6C0A(int a1, int a2, char a3, char a4, int a5, int a6, int a7)
{
int v7; // esi
v7 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6c1a*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6c25*/
return IioTailFn_FFD023CE(v7, a2, a1, a5, a6, a7); /*0xffcf6c3d*/
}
// Function: IioFunc6C40 @ 0xffcf6c40 (0x3c bytes)
// Index: 1988/2560
int __cdecl IioFunc6C40(int a1, int a2, int a3, char a4, int a5, int a6, int a7, int a8)
{
int v8; // esi
v8 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6c50*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6c5b*/
return IioTailFn_FFD02423(v8, a2, a3, a1, a5, a6, a7, a8); /*0xffcf6c79*/
}
// Function: IioFunc6C7C @ 0xffcf6c7c (0xa2 bytes)
// Index: 1989/2560
int __cdecl IioFunc6C7C(int a1, unsigned __int8 a2, char a3, char a4, int a5, int a6, char a7, char a8)
{
int v8; // ebx
int v9; // esi
unsigned __int8 *v10; // ebp
char v11; // al
unsigned __int8 n8; // dl
unsigned __int8 v14; // [esp+10h] [ebp-4h]
v8 = 0; /*0xffcf6c87*/
v14 = 0; /*0xffcf6c8e*/
v9 = 0; /*0xffcf6c92*/
v10 = *(unsigned __int8 **)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6c98*/
v11 = IioFunc5F9D(a3, a4); /*0xffcf6c9b*/
n8 = 0; /*0xffcf6ca6*/
LOBYTE(a1) = v11; /*0xffcf6cb0*/
do /*0xffcf6cf3*/
{
if ( n8 >= 4u ) /*0xffcf6cbb*/
{
if ( n8 >= 8u ) /*0xffcf6cd0*/
{
if ( n8 == 8 ) /*0xffcf6ce6*/
v14 = *(_BYTE *)(a5 + 8); /*0xffcf6ceb*/
}
else
{
v9 |= *(unsigned __int8 *)(n8 + a5) << (8 * n8 - 32); /*0xffcf6ce2*/
}
}
else
{
v8 |= *(unsigned __int8 *)(n8 + a5) << (8 * n8); /*0xffcf6cc9*/
}
++n8; /*0xffcf6cef*/
}
while ( n8 < (unsigned __int8)((v10[257312] != 0) + 8) ); /*0xffcf6cf3*/
return IioTailFunc2487(v10, a2, a1, a6, a7, a8, v8, v9, v14); /*0xffcf6d18*/
}
// Function: IioFunc6D1E @ 0xffcf6d1e (0xe5 bytes)
// Index: 1990/2560
char __cdecl IioFunc6D1E(
int a1,
unsigned __int8 n4,
char a3,
char a4,
unsigned __int64 *a5,
char n31,
unsigned __int8 n0x20)
{
unsigned __int8 *p_n42_1; // ebx
char n31_1; // bl
unsigned int n0x20_1; // eax
unsigned __int64 *v10; // edi
int v11; // ebp
_DWORD *v12; // ebx
int n8; // ebp
int v14; // esi
int v15; // eax
bool v16; // zf
int n31_2; // [esp+4h] [ebp-810h]
int n6; // [esp+Ch] [ebp-808h]
unsigned __int8 *p_n42; // [esp+10h] [ebp-804h]
char v21[2048]; // [esp+14h] [ebp-800h] BYREF
p_n42_1 = *(unsigned __int8 **)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6d3d*/
p_n42 = p_n42_1; /*0xffcf6d40*/
LOBYTE(n6) = IioFunc5F9D(a3, a4); /*0xffcf6d49*/
*(_DWORD *)&p_n42_1[48704 * n4 + 304938] |= 0x3Fu; /*0xffcf6d5f*/
n31_1 = n31; /*0xffcf6d6e*/
n0x20_1 = (unsigned __int8)n31 + n0x20; /*0xffcf6d7b*/
n31_2 = (unsigned __int8)n31; /*0xffcf6d7d*/
if ( n0x20_1 <= 0x20 ) /*0xffcf6d84*/
{
if ( n31 ) /*0xffcf6d88*/
{
v10 = a5; /*0xffcf6d8d*/
v11 = v21 - (char *)a5; /*0xffcf6d98*/
do /*0xffcf6dcb*/
{
v12 = (_DWORD *)((char *)v10 + v11); /*0xffcf6da0*/
n8 = 8; /*0xffcf6da3*/
do /*0xffcf6dc0*/
{
v14 = *(_DWORD *)v10; /*0xffcf6da4*/
v15 = DdrTrainFunc6117(*v10++, 0x20u); /*0xffcf6dad*/
*v12 = v14; /*0xffcf6db5*/
v12[1] = v15; /*0xffcf6db7*/
v12 += 2; /*0xffcf6dba*/
--n8; /*0xffcf6dbd*/
}
while ( n8 ); /*0xffcf6dc0*/
v16 = n31_2-- == 1; /*0xffcf6dc2*/
v11 = v21 - (char *)a5; /*0xffcf6dc7*/
}
while ( !v16 ); /*0xffcf6dcb*/
n31_1 = n31; /*0xffcf6dcd*/
}
LOBYTE(n0x20_1) = RmtFunc71F8(p_n42, n4, n6, v21, n31_1, n0x20); /*0xffcf6df3*/
}
return n0x20_1; /*0xffcf6dfb*/
}
// Function: IioFunc6E03 @ 0xffcf6e03 (0x33 bytes)
// Index: 1991/2560
int __cdecl IioFunc6E03(int a1, int a2, char a3, char a4, int a5, int a6)
{
int v6; // esi
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6e13*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6e1e*/
return IioTailFn_FFD02527(v6, a2, a1, a5, a6); /*0xffcf6e33*/
}
// Function: IioFunc6E36 @ 0xffcf6e36 (0x4b bytes)
// Index: 1992/2560
int __cdecl IioFunc6E36(int a1, int a2, char a3, char a4, int a5, int a6, int a7, int a8, int a9, int a10)
{
int v11; // esi
if ( (_BYTE)a5 ) /*0xffcf6e3d*/
return 3; /*0xffcf6e41*/
v11 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6e51*/
LOBYTE(a5) = IioFunc5F9D(a3, a4); /*0xffcf6e5c*/
IioTailFn_FFD02572(v11, a2, a5, 0, a6, a7, a8, a9, a10); /*0xffcf6e74*/
return 0; /*0xffcf6e42*/
}
// Function: IioFunc6E81 @ 0xffcf6e81 (0x49 bytes)
// Index: 1993/2560
int __cdecl IioFunc6E81(int __return_address, int a2, char a3, char a4, int a5, int a6)
{
int v6; // ecx
int v8; // esi
int v9; // [esp+0h] [ebp-4h]
v9 = v6; /*0xffcf6e84*/
if ( (_BYTE)a5 && !a6 ) /*0xffcf6e8f*/
return 3; /*0xffcf6e93*/
v8 = *(_DWORD *)(*(_DWORD *)(__return_address + 12) + 4); /*0xffcf6ea3*/
LOBYTE(v9) = IioFunc5F9D(a3, a4); /*0xffcf6eae*/
IioTailFn_FFD025D6(v8, a2, v9, a5, a6); /*0xffcf6ebb*/
return 0; /*0xffcf6ec8*/
}
// Function: IioFunc6ECA @ 0xffcf6eca (0x33 bytes)
// Index: 1994/2560
int __cdecl IioFunc6ECA(int a1, int a2, char a3, char a4, int a5, int a6)
{
int v6; // esi
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6eda*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6ee5*/
return IioTailFn_FFD02641(v6, a2, a1, a5, a6); /*0xffcf6efa*/
}
// Function: IioFunc6EFD @ 0xffcf6efd (0x33 bytes)
// Index: 1995/2560
int __cdecl IioFunc6EFD(int a1, int a2, char a3, char a4, int a5, int a6)
{
int v6; // esi
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6f0d*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6f18*/
return IioTailFn_FFD02666(v6, a2, a1, a5, a6); /*0xffcf6f2d*/
}
// Function: IioFunc6F30 @ 0xffcf6f30 (0x35 bytes)
// Index: 1996/2560
int __cdecl IioFunc6F30(int a1, int a2, int a3, char a4, int a5)
{
int v5; // esi
v5 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6f40*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6f4b*/
IioTailFn_FFD0268B(v5, a2, a3, a1, a5); /*0xffcf6f58*/
return 0; /*0xffcf6f62*/
}
// Function: IioFunc6F65 @ 0xffcf6f65 (0x41 bytes)
// Index: 1997/2560
int __cdecl IioFunc6F65(int a1, int a2, int a3, char a4, int a5, int a6, int a7, int a8, int a9)
{
int v9; // esi
v9 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6f75*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6f80*/
IioTailFn_FFD02712(v9, a2, a3, a1, a5, a6, a7, a8, a9); /*0xffcf6f99*/
return 0; /*0xffcf6fa3*/
}
// Function: IioFunc6FA6 @ 0xffcf6fa6 (0x38 bytes)
// Index: 1998/2560
int __cdecl IioFunc6FA6(int a1, int a2, char a3, char a4, int a5, int a6, int a7)
{
int v7; // esi
v7 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 4); /*0xffcf6fb6*/
LOBYTE(a1) = IioFunc5F9D(a3, a4); /*0xffcf6fc1*/
IioTailFn_FFD02770(v7, a2, a1, a5, a6, a7); /*0xffcf6fd1*/
return 0; /*0xffcf6fdb*/
}
// Function: IioFunc6FDE @ 0xffcf6fde (0x25 bytes)
// Index: 1999/2560
int __cdecl IioFunc6FDE(int a1, int a2, int a3, int a4, int a5, int a6)
{
return IioTailFn_FFD027A4(*(_DWORD *)(*(_DWORD *)(a1 + 12) + 4), a2, a3, a4, a5, a6); /*0xffcf7001*/
}
// Function: IioFunc7003 @ 0xffcf7003 (0xa0 bytes)