int __cdecl ikfakov_resolver(int a1) //oaoaoa
{
int result; // eax
_DWORD *v2; // esi
int v3; // eax
int *v4; // eax
int v5; // eax
float *v6; // eax
float m_nChokedCommands; // xmm0_4
int *v8; // eax
int v9; // ST14_4
int v10; // ST18_4
int v11; // ST1C_4
float m_nChokedCommands_1; // xmm0_4
double v13; // st7
float v14; // ST18_4
void *v15; // eax
int v16; // eax
int v17; // eax
float v18; // xmm0_4
float v19; // xmm0_4
double v20; // st7
int v21; // eax
int (__thiscall *v22)(int); // edx
int v23; // eax
int (__thiscall *v24)(int); // eax
int v25; // eax
int v26; // eax
int (__thiscall *v27)(int); // eax
int v28; // eax
float m_nChokedCommands_2; // xmm1_4
float v30; // ST1C_4
int v31; // eax
double m_flFakeGoalFeetYaw; // st7
int (__thiscall *v33)(int); // eax
int v34; // eax
float m_nChokedCommands_3; // xmm0_4
int m_flFakeGoalFeetYaw_1; // ST18_4
_DWORD *GetLowerBodyYaw; // eax
double v38; // st7
int (__thiscall *v39)(int); // eax
int v40; // eax
char v41; // [esp+20h] [ebp-208h]
char v42; // [esp+2Ch] [ebp-1FCh]
char v43; // [esp+38h] [ebp-1F0h]
double v44; // [esp+44h] [ebp-1E4h]
double v45; // [esp+4Ch] [ebp-1DCh]
double v46; // [esp+54h] [ebp-1D4h]
double flMinBodyYaw; // [esp+5Ch] [ebp-1CCh]
double v48; // [esp+64h] [ebp-1C4h]
double v49; // [esp+6Ch] [ebp-1BCh]
float flDuckingSpeed; // [esp+74h] [ebp-1B4h]
float v51; // [esp+78h] [ebp-1B0h]
float Right; // [esp+7Ch] [ebp-1ACh]
float v53; // [esp+80h] [ebp-1A8h]
float Left; // [esp+84h] [ebp-1A4h]
int v55; // [esp+88h] [ebp-1A0h]
int v56; // [esp+8Ch] [ebp-19Ch]
float v57; // [esp+90h] [ebp-198h]
int v58; // [esp+94h] [ebp-194h]
float v59; // [esp+98h] [ebp-190h]
float v60; // [esp+9Ch] [ebp-18Ch]
float v61; // [esp+A0h] [ebp-188h]
float v62; // [esp+A4h] [ebp-184h]
int v63; // [esp+A8h] [ebp-180h]
int v64; // [esp+ACh] [ebp-17Ch]
int v65; // [esp+B0h] [ebp-178h]
int v66; // [esp+B4h] [ebp-174h]
float m_flGroundFraction; // [esp+B8h] [ebp-170h]
float v68; // [esp+BCh] [ebp-16Ch]
char *flMaxBodyYaw; // [esp+C0h] [ebp-168h]
char *v70; // [esp+C4h] [ebp-164h]
float flDuckingSpeed_1; // [esp+C8h] [ebp-160h]
float flDuckAmount; // [esp+CCh] [ebp-15Ch]
char v73; // [esp+D0h] [ebp-158h]
int v74; // [esp+D4h] [ebp-154h]
int v75; // [esp+D8h] [ebp-150h]
int v76; // [esp+DCh] [ebp-14Ch]
float m_flGoalFeetYaw; // [esp+E0h] [ebp-148h]
int Misscount; // [esp+E4h] [ebp-144h]
float flMaxBodyYaw_1; // [esp+E8h] [ebp-140h]
float flMinBodyYaw_1; // [esp+ECh] [ebp-13Ch]
float speed; // [esp+F0h] [ebp-138h]
float flRunningSpeed; // [esp+F4h] [ebp-134h]
float flMaxMovementSpeed; // [esp+F8h] [ebp-130h]
float v84; // [esp+FCh] [ebp-12Ch]
float v85; // [esp+100h] [ebp-128h]
float v86; // [esp+104h] [ebp-124h]
float v87; // [esp+108h] [ebp-120h]
int i; // [esp+10Ch] [ebp-11Ch]
float flYawModifier; // [esp+110h] [ebp-118h]
char *animState; // [esp+114h] [ebp-114h]
float flEyeYaw; // [esp+118h] [ebp-110h]
void *v92; // [esp+11Ch] [ebp-10Ch]
int v93[65]; // [esp+120h] [ebp-108h]
result = (unsigned __int8)sub_2DA9EAC0(0);
if ( (_BYTE)result )
{
for ( i = 1; i < (*(int (__thiscall **)(signed int))(MEMORY[0x5F938178] + 80))(1603502456); ++i )
{
v92 = (void *)sub_2DA26E00(i);
if ( v92 && (unsigned __int8)sub_2DA9E4B0(v92) )
{
if ( v92 )
{
v2 = LBYTarget(v92);
*(_DWORD *)(sub_2DA26E20(v92) + 4) = *v2;
v3 = sub_2DA26E20(v92);
sub_2DA26640(v3);
}
}
}
animState = sub_2DA9E8D0((char *)a1);
v4 = (int *)sub_2DA21C30(a1);
v74 = *v4;
v75 = v4[1];
v76 = v4[2];
v53 = sub_2DA26380(&v74);
v51 = sub_2DA25E80(1134297088, 0x40000000);
if ( v53 > v51 )
{
sub_2DA261D0(&v43);
v5 = sub_2DA264D0(&v41, 1134297088);
sub_2DA263D0(v5);
}
v6 = (float *)sub_2DA270E0((void *)a1);
v85 = clamp(*v6 + *((float *)animState + 138), 0, 1065353216);
v87 = *((float *)animState + 139);
v64 = MEMORY[0x136471B0];
v49 = (double)MEMORY[0x136471B0];
m_nChokedCommands = (double)MEMORY[0x136471B0];// g_pClientState->m_nChokedCommands, назвал так чтобы в коде понятнее было
v86 = m_nChokedCommands * 6.0;
if ( (float)(m_nChokedCommands * 6.0) < (float)(v85 - v87) ) // clamp, судя по тому что написано тут https://yougame.biz/threads/96665/
{
v84 = v87 + v86;
}
else if ( (float)(v85 - v87) < COERCE_FLOAT(LODWORD(v86) ^ xmmword_2DAAF5F0) )
{
v84 = v87 - v86;
}
else
{
v84 = v85;
}
flDuckAmount = clamp(LODWORD(v84), 0, 1065353216);
v8 = (int *)sub_2DA21C30(a1);
v9 = *v8;
v10 = v8[1];
v11 = v8[2];
v63 = MEMORY[0x136471B0];
v48 = (double)MEMORY[0x136471B0];
m_nChokedCommands_1 = (double)MEMORY[0x136471B0];
GetSmoothedVelocity(&v42, m_nChokedCommands_1 * 2000.0, v74, v75, v76, v9, v10, v11);
v13 = sub_2DA26330(&v42, 1132593152);
v14 = v13;
MEMORY[0x7511F960](LODWORD(v14));
speed = v13;
v15 = sub_2DA21CE0((void *)a1);
sub_2DA27F50(v15);
flMaxMovementSpeed = 260.0;
if ( sub_2DA2B450(&v73) )
{
v16 = sub_2DA2B4A0(&v73);
v17 = sub_2DA9E6E0(v16, 981668463);
MEMORY[0x7511F890](*(_DWORD *)(v17 + 4));
flMaxMovementSpeed = v13;
}
m_flGroundFraction = *((float *)animState + 99116);
flRunningSpeed = speed / (float)(flMaxMovementSpeed * 0.51999998);
flDuckingSpeed = speed / (float)(flMaxMovementSpeed * 0.34);
flRunningSpeed = clamp(speed / (float)(flMaxMovementSpeed * 0.51999998), 0, 1065353216);
flYawModifier = (float)((float)((float)(m_flGroundFraction * -0.30000001) - 0.2) * flRunningSpeed) + 1.0;
if ( flDuckAmount > 0.0 )
{
flDuckingSpeed_1 = clamp(LODWORD(flDuckingSpeed_1), 0, 1065353216);
flYawModifier = (float)((float)(flDuckAmount * flDuckingSpeed_1) * (float)(0.5 - flYawModifier)) + flYawModifier;
}
v70 = animState + 816;
flMinBodyYaw = (double)(unsigned int)(animState + 816);
v18 = flMinBodyYaw;
flMinBodyYaw_1 = sub_2DA216B0(v18 * flYawModifier);
flMaxBodyYaw = animState + 820;
v46 = (double)(unsigned int)(animState + 820);
v19 = v46;
v20 = sub_2DA216B0(v19 * flYawModifier);
flMaxBodyYaw_1 = v20;
flEyeYaw = *(float *)(sub_2DA26E20(a1) + 4);
v21 = (*(int (__thiscall **)(int, signed int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8, 1135869952);
MEMORY[0x7515C070](flEyeYaw - *(float *)&v93[v21]);
v68 = v20;
if ( flMaxBodyYaw_1 < v68 )
{
v20 = sub_2DA25EF0(LODWORD(flMaxBodyYaw_1));
v60 = v20;
v24 = *(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40);
v59 = flEyeYaw - v60;
v25 = v24(a1 + 8);
*(float *)&v93[v25] = v59;
}
else if ( flMinBodyYaw_1 > v68 )
{
v20 = sub_2DA25EF0(LODWORD(flMinBodyYaw_1));
v62 = v20;
v22 = *(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40);
v61 = v62 + flEyeYaw;
v23 = v22(a1 + 8);
*(float *)&v93[v23] = v61;
}
v26 = (*(int (__thiscall **)(int, signed int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8, 1135869952);
MEMORY[0x7515C070](v93[v26]);
v27 = *(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40);
*(float *)&v58 = v20;
v28 = v27(a1 + 8);
v93[v28] = v58;
if ( speed <= 0.1 && (v57 = sub_2DA25EF0(v76), v57 <= 100.0) )
{
v65 = MEMORY[0x136471B0];
v45 = (double)MEMORY[0x136471B0];
m_nChokedCommands_3 = (double)MEMORY[0x136471B0];
m_flFakeGoalFeetYaw_1 = v93[(*(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8)];
GetLowerBodyYaw = LBYTarget((void *)a1);
v38 = ApproachAngle(*GetLowerBodyYaw, m_flFakeGoalFeetYaw_1, m_nChokedCommands_3 * 100.0);
v39 = *(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40);
*(float *)&v55 = v38;
v40 = v39(a1 + 8);
v93[v40] = v55;
}
else
{
v66 = MEMORY[0x136471B0];
v44 = (double)MEMORY[0x136471B0];
m_nChokedCommands_2 = (double)MEMORY[0x136471B0];
v30 = (float)((float)(m_flGroundFraction * 20.0) + 30.0) * m_nChokedCommands_2;
v31 = (*(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8);
m_flFakeGoalFeetYaw = ApproachAngle(LODWORD(flEyeYaw), v93[v31], LODWORD(v30));
v33 = *(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40);
*(float *)&v56 = m_flFakeGoalFeetYaw;
v34 = v33(a1 + 8);
v93[v34] = v56;
}
Left = flEyeYaw + flMinBodyYaw_1;
Right = flEyeYaw + flMaxBodyYaw_1;
Misscount = Globals::MissedShots[(*(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8)] % 3;
if ( Misscount )
{
if ( Misscount == 1 )
{
m_flGoalFeetYaw = *(float *)&v93[(*(int (__thiscall **)(int))(*(_DWORD *)(a1 + 8) + 40))(a1 + 8)]; //получ resolveYaw = resolverInfo.m_flFakeGoalFeetYaw;
}
else if ( Misscount == 2 )
{
m_flGoalFeetYaw = Right;
}
}
else
{
m_flGoalFeetYaw = Left;
}
result = sub_2DA21D90(animState);
*(float *)result = m_flGoalFeetYaw;
}
return result;
}