//
// __alloca_probe from 0x1800202c0 to 0x18002030e (78 bytes)
//
// 2 xrefs:
// > cocos2d::extension::AssetsManager::uncompress @ 0x180001c35
// > ??> @ 0x18004d268
//
// 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:15:45 +0000
//
unsigned __int64 __fastcall _alloca_probe()
{
unsigned __int64 result; // rax
char *v1; // r10
char *StackLimit; // r11
char v3; // [rsp+18h] [rbp+8h] BYREF
v1 = &v3 - result;
if ( (unsigned __int64)&v3 < result )
v1 = nullptr;
StackLimit = (char *)NtCurrentTeb()->NtTib.StackLimit;
if ( v1 < StackLimit )
{
LOWORD(v1) = (unsigned __int16)v1 & 0xF000;
do
{
StackLimit -= 4096;
*StackLimit = 0;
}
while ( v1 != StackLimit );
}
return result;
}