//
// sub_D20D90 from 0xd20d90 to 0xd20e48 (184 bytes)
//
// 2 xrefs:
// > ??> @ 0x121ee78
// > ??> @ 0x121eef8
//
// 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 __int64 __fastcall sub_D20D90(__int64 a1, unsigned __int64 a2, unsigned __int64 a3, __int64 a4)
{
__int64 v6; // x20
wctype_t *v7; // x26
_BYTE *v8; // x25
wctype_t *v9; // x22
wctype_t *v10; // x19
_BYTE *v11; // x28
char v12; // w21
wctype_t v13; // x1
if ( a2 < a3 )
{
v6 = 0;
v7 = (wctype_t *)(a1 + 1200);
v8 = (_BYTE *)(a1 + 1180);
v9 = (wctype_t *)(a1 + 1328);
do
{
v10 = v7;
v11 = v8;
v12 = 0;
do
{
v13 = *v10++;
if ( iswctype(*(_DWORD *)(a2 + 4 * v6), v13) )
v12 |= *v11;
++v11;
}
while ( v10 != v9 );
*(_BYTE *)(a4 + v6++) = v12;
}
while ( v6 != ((~a2 + a3) >> 2) + 1 );
}
return a3;
}