int __cdecl CAdapterDetectThread::MultipleAdaptesOrIPCheck(int a1)
{
int v1;
int v2;
int v3;
signed int v4;
char v5;
int v6;
int i;
int *v8;
int v9;
int v11;
int v12;
const char *s1;
void *ptr;
char dest;
int *v16;
int v17;
int v18;
int v19;
v1 = get\_nics\_info(0);
ptr = (void *)v1;
if ( !v1 )
return free\_nics\_info(ptr);
v2 = v1;
s1 = (const char *)(a1 + 360);
while ( !strcmp(s1, (const char *)v2) )
{
v3 = v2 + 16;
CLogFile::AppendText(g\_log\_Wireless, "nic name:%s", s1);
v4 = 6;
v5 = a1 == -884;
v6 = a1 + 884;
do
{
if ( !v4 )
break;
v5 = *(\_BYTE *)v3++ == *(\_BYTE *)v6++;
--v4;
}
while ( v5 );
if ( !v5 )
{
CLogFile::AppendText(g\_log\_Wireless, "mac chagedn");
v12 = 0;
v11 = 30;
goto FindMul;
}
CLogFile::AppendText(g\_log\_Wireless, "ipv4 count:%d", *(_DWORD *)(v2 + 48));
for ( i = *(\_DWORD *)(v2 + 52); i; i = *(\_DWORD *)(i + 8) )
CLogFile::AppendText(
g\_log\_Wireless,
(const char *)&unk_810ED8E,
*(_BYTE *)(i + 3),
*(_BYTE *)(i + 2),
*(_BYTE *)(i + 1),
*(_BYTE *)i);
if ( *(\_DWORD *)(v2 + 48) > 1 && *(\_BYTE *)(a1 + 890) )
{
CLogFile::AppendText(g\_log\_Wireless, "multiple ipsn");
v12 = 0;
v11 = 21;
goto FindMul;
}
v8 = *(int **)(v2 + 52);
if ( !v8 )
{
CLogFile::AppendText(g\_log\_Wireless, "ip chaged - no ipn");
v12 = 0;
v11 = 31;
goto FindMul;
}
v9 = *v8;
v19 = v9;
LOWORD(v9) = \_\_ROR\_\_(v9, 8);
v9 = \_\_ROR\_\_(v9, 16);
LOWORD(v9) = \_\_ROR\_\_(v9, 8);
v5 = *(_DWORD *)(a1 + 880) == v9;
v19 = v9;
if ( !v5 )
{
CLogFile::AppendText(g\_log\_Wireless, "ip chagedn");
v12 = 0;
v11 = 31;
goto FindMul;
}
LABEL_4:
v2 = *(_DWORD *)(v2 + 64);
if ( !v2 )
return free\_nics\_info(ptr);
}
if ( !*(_BYTE *)(a1 + 890) )
goto LABEL_4;
CLogFile::AppendText(g\_log\_Wireless, (const char *)&unk_810EDC9, v2);
memset(&dest, 0, 0x20u);
strncpy(&dest, (const char *)v2, 0xFu);
v16 = &v17;
v17 = 10;
v18 = 0;
if ( ioctl(*(_DWORD *)(a1 + 900), 0x8913u, &dest) < 0 )
{
if ( ioctl(*(_DWORD *)(a1 + 900), 0x8946u, &dest) >= 0 && v18 == 1 )
{
CLogFile::AppendText(g\_log\_Wireless, "multiple adaptersn");
v12 = 0;
v11 = 20;
goto FindMul;
}
goto LABEL_4;
}
if ( !((unsigned \_\_int8)v16 & 1) || !((unsigned \_\_int8)v16 & 0x40) )
{
CLogFile::AppendText(g\_log\_Wireless, "SIOCGIFFLAGS flags:%4x", (signed __int16)v16);
goto LABEL_4;
}
CLogFile::AppendText(g\_log\_Wireless, "multiple adapters flags:%4x", (signed __int16)v16);
v12 = 0;
v11 = 20;
FindMul:
PostThreadMessage(*(\_DWORD *)(a1 + 872), *(\_DWORD *)(a1 + 876), v11, v12);
return free\_nics\_info(ptr);
}