//
// sub_81F68 from 0x81f68 to 0x8209a (306 bytes)
//
// 1 xrefs:
// > sub_81840 @ 0x81958
//
// 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
//
int __fastcall sub_81F68(int a1)
{
int result; // r0
int v3; // r0
int v4; // r0
int v5; // [sp+18h] [bp-628h] BYREF
_BYTE v6[512]; // [sp+1Ch] [bp-624h] BYREF
int v7; // [sp+21Ch] [bp-424h] BYREF
int v8; // [sp+220h] [bp-420h] BYREF
_BYTE v9[512]; // [sp+224h] [bp-41Ch] BYREF
_BYTE v10[512]; // [sp+424h] [bp-21Ch] BYREF
v7 = 512;
v8 = 512;
result = sub_BBB84(*(_DWORD *)(a1 + 220), 0);
if ( !result )
{
result = sub_82310(a1, v10, &v8, 0, 0);
if ( !result )
{
if ( sub_BE30E("?WPL VERSION", v10, 12) )
{
return 19;
}
else
{
while ( 1 )
{
v8 = 512;
result = sub_82310(a1, v10, &v8, 0, 0);
if ( result )
break;
if ( !sub_BE30E("seq", v10, 3) )
{
while ( 1 )
{
v7 = 512;
v8 = 512;
if ( sub_82310(a1, v10, &v8, v9, &v7) )
break;
v10[v8] = 0;
v3 = v7;
v9[v7] = 0;
if ( v3 )
{
v4 = sub_BE290(v10);
sub_B0B08(a1, 8, v4, v9);
}
else
{
v5 = 512;
sub_8240A(0, v10, v6, &v5);
if ( !sub_BE30E("MEDIA SRC", v10, 8) )
sub_B0B08(a1, 8, "FILE", v6);
}
}
return 0;
}
}
}
}
}
return result;
}