//
// sub_1800D31D0 from 0x1800d31d0 to 0x1800d3240 (112 bytes)
//
// 9 xrefs:
// > sub_1800DDA10 @ 0x1800dda52
// > sub_1800DE0E0 @ 0x1800de4d2
// > sub_1800DE0E0 @ 0x1800de509
// > sub_1800DE0E0 @ 0x1800de540
// > sub_1800DE0E0 @ 0x1800de577
// > sub_1800DE0E0 @ 0x1800de5ae
// > sub_1800DE0E0 @ 0x1800de5e5
// > sub_1800DEAA0 @ 0x1800deac6
// > ??> @ 0x1801ba4e8
//
// 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
//
__int64 __fastcall sub_1800D31D0(char *SubStr, char *Str)
{
char *v2; // rdi
char *v4; // rax
__int64 v5; // rcx
const char *v6; // rcx
v2 = Str;
v4 = strstr(Str, SubStr);
if ( !v4 )
return 0;
while ( 1 )
{
v5 = -1;
do
++v5;
while ( SubStr[v5] );
v6 = &v4[v5];
if ( (v4 == v2 || *(v4 - 1) == 32) && (*v6 & 0xDF) == 0 )
break;
v2 = (char *)v6;
v4 = strstr(v6, SubStr);
if ( !v4 )
return 0;
}
return 1;
}