int __userpurge MyNtResumeThread<eax>(int a1<edx>, int a2<esi>, int a3, int a4)
{
int result; // eax@1
int v5; // ecx@4
int v6; // esi@4
DWORD v7; // eax@5
int v8; // esi@7
unsigned int v9; // esi@10
int v10[16]; // [sp+8h] [bp-9Ch]@1
int v11[16]; // [sp+48h] [bp-5Ch]@1
int v12; // [sp+88h] [bp-1Ch]@1
unsigned int v13; // [sp+8Ch] [bp-18h]@1
int v14; // [sp+90h] [bp-14h]@1
int v15; // [sp+94h] [bp-10h]@1
int v16; // [sp+98h] [bp-Ch]@1
int v17; // [sp+9Ch] [bp-8h]@1
DWORD v18; // [sp+A0h] [bp-4h]@10
int v19; // [sp+ACh] [bp+8h]@11
int v20; // [sp+B0h] [bp+Ch]@11
v14 = a1;
v12 = a2;
v16 = a3;
v17 = a4;
result = pre_check(0x34u, (int)&v16, (int)v11, (int)v10, (int)&v13);
v15 = result;
if ( result == 0xC0000503 )
{
LABEL_17:
result = 0;
}
else
{
if ( result >= 0 )
{
if ( BYTE1(dword_1D03C) & 0x10 )
{
v6 = dword_1D03C & 0xFFF;
if ( MmIsAddressValid((PVOID)mysdt_And_Shadow_IsHookTableAddr->shadowSsdtOriginFunc[dword_1D03C & 0xFFF]) )
v7 = mysdt_And_Shadow_IsHookTableAddr->shadowSsdtOriginFunc[v6];
else
v7 = *(_DWORD *)(shadowTableAddr + 4 * v6);
}
else
{
v8 = 4 * dword_1D03C;
if ( MmIsAddressValid((PVOID)mysdt_And_Shadow_IsHookTableAddr->ssdtOriginFunc[dword_1D03C]) )
v7 = *(DWORD *)((char *)&mysdt_And_Shadow_IsHookTableAddr->ssdtOriginFunc[0] + v8);
else
v7 = *(_DWORD *)(v8 + sdttableaddr);
}
v18 = v7;
v15 = ((int (__fastcall *)(int, int, int, int))v7)(v5, v14, a3, a4);
v9 = 0;
if ( v13 )
{
while ( 1 )
{
v19 = v11[v9];
v20 = v10[v9];
if ( v11[v9] )
{
result = ((int (__stdcall *)(signed int, int *, int, int))v19)(52, &v16, v15, v20);
v14 = result;
if ( result == 0xC0000503 )
goto LABEL_17;
if ( result < 0 )
break;
}
++v9;
if ( v9 >= v13 )
goto LABEL_15;
}
}
else
{
LABEL_15:
result = v15;
}
}
}
return result;
}