//
// sub_CD4850 from 0xcd4850 to 0xcd4990 (320 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
unsigned int **__fastcall sub_CD4850(unsigned int **a1, __int64 a2)
{
char *v4; // x1
_BYTE v6[7]; // [xsp+38h] [xbp+38h] BYREF
char v7; // [xsp+3Fh] [xbp+3Fh] BYREF
sub_CD43C0(v6, a1, 0);
if ( a2 && v6[0] )
{
if ( !sub_CFA100(*(unsigned int **)((char *)a1 + *((_QWORD *)*a1 - 3) + 232), a2, &v7) )
{
if ( v7 )
v4 = byte_6;
else
LODWORD(v4) = 4;
goto LABEL_6;
}
if ( v7 )
{
LODWORD(v4) = 2;
LABEL_6:
sub_CCF1DC(
(__int64)a1 + *((_QWORD *)*a1 - 3),
(unsigned int)v4 | *(_DWORD *)((char *)a1 + *((_QWORD *)*a1 - 3) + 32));
return a1;
}
}
else if ( !a2 )
{
LODWORD(v4) = 4;
goto LABEL_6;
}
return a1;
}