//
// sub_1004BEB10 from 0x1004beb10 to 0x1004bebb7 (167 bytes)
//
// 1 xrefs:
// > GameToolbox::showOpenFileDialogMulti @ 0x1004f6386
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:31:04 +0000
//
bool __fastcall sub_1004BEB10(void (__fastcall *a1)(_QWORD), void (__fastcall *a2)(_QWORD), __int64 *a3, double a4)
{
__int64 v5; // r12
__int64 i; // r13
void (__fastcall *block[12])(_QWORD); // [rsp+0h] [rbp-60h] BYREF
v5 = *a3;
for ( i = a3[1]; i != v5; i -= 24 )
{
if ( (*(_BYTE *)(i - 24) & 1) != 0 )
operator delete(*(void **)(i - 8));
}
a3[1] = v5;
block[0] = (void (__fastcall *)(_QWORD))_NSConcreteStackBlock;
block[1] = (void (__fastcall *)(_QWORD))3221225472LL;
block[2] = (void (__fastcall *)(_QWORD))sub_1004BEBC0;
block[3] = (void (__fastcall *)(_QWORD))&unk_100B5AA18;
block[4] = a2;
block[5] = a1;
block[6] = (void (__fastcall *)(_QWORD))a3;
sub_1004BE1C0(block, a4);
return *a3 != a3[1];
}