//
// sub_100183CF0 from 0x100183cf0 to 0x100183de8 (248 bytes)
//
// 27 xrefs:
// > DS_Dictionary::setVec2ForKey @ 0x10017f462
// > DS_Dictionary::setVec2ForKey @ 0x10017f484
// > DS_Dictionary::setVec2ForKey @ 0x10017f4a6
// > DS_Dictionary::setRectForKey @ 0x10017f962
// > DS_Dictionary::setRectForKey @ 0x10017f984
// > DS_Dictionary::setRectForKey @ 0x10017f9a6
// > DS_Dictionary::setRectForKey @ 0x10017f9c8
// > DS_Dictionary::setRectForKey @ 0x10017f9ea
// > DS_Dictionary::setVec2ArrayForKey @ 0x10018010f
// > DS_Dictionary::setVec2ArrayForKey @ 0x100180134
// > DS_Dictionary::setVec2ArrayForKey @ 0x10018015a
// > DS_Dictionary::setRectArrayForKey @ 0x100180524
// > DS_Dictionary::setRectArrayForKey @ 0x100180549
// > DS_Dictionary::setRectArrayForKey @ 0x10018056f
// > DS_Dictionary::setRectArrayForKey @ 0x100180595
// > DS_Dictionary::setRectArrayForKey @ 0x1001805bb
// > cocos2d::ZipUtils::urlDecode @ 0x100205f7c
// > cocos2d::ZipUtils::urlDecode @ 0x100205ff1
// > sub_1002942E0 @ 0x1002943cf
// > sub_1002942E0 @ 0x1002943eb
// > sub_1002942E0 @ 0x10029440a
// > sub_1002942E0 @ 0x100294462
// > sub_1002942E0 @ 0x10029455d
// > sub_1002942E0 @ 0x100294571
// > sub_1002942E0 @ 0x100294598
// > sub_1002942E0 @ 0x100294681
// > sub_1002942E0 @ 0x100294695
//
// 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
//
_QWORD *__fastcall sub_100183CF0(_QWORD *a1, __int64 a2, __int64 a3)
{
char *v4; // r8
__int64 v5; // r12
int v6; // r13d
int v7; // eax
const std::locale::facet *v8; // rax
__int64 v9; // r14
__int64 v10; // rdx
_BYTE v12[16]; // [rsp+0h] [rbp-50h] BYREF
char *v13; // [rsp+10h] [rbp-40h]
std::locale v14; // [rsp+18h] [rbp-38h] BYREF
char v15; // [rsp+27h] [rbp-29h]
std::ostream::sentry::sentry(v12, a1);
if ( v12[0] == 1 )
{
v4 = (char *)a1 + *(_QWORD *)(*a1 - 24LL);
v5 = *((_QWORD *)v4 + 5);
v6 = *((_DWORD *)v4 + 2);
v7 = *((_DWORD *)v4 + 36);
if ( v7 == -1 )
{
v13 = (char *)a1 + *(_QWORD *)(*a1 - 24LL);
std::ios_base::getloc((const std::ios_base *)&v14);
v8 = std::locale::use_facet(&v14, &std::ctype::id);
v15 = ((__int64 (__fastcall *)(const std::locale::facet *, __int64))v8->__vftable[2].~facet_0)(v8, 32);
std::locale::~locale(&v14);
LOBYTE(v7) = v15;
v4 = v13;
*((_DWORD *)v13 + 36) = v15;
}
v9 = a2 + a3;
v10 = a2;
if ( (v6 & 0xB0) == 0x20 )
v10 = v9;
if ( !sub_100183E40(v5, a2, v10, v9, v4, (unsigned int)(char)v7) )
std::ios_base::clear(
(std::ios_base *)((char *)a1 + *(_QWORD *)(*a1 - 24LL)),
*(_DWORD *)((char *)a1 + *(_QWORD *)(*a1 - 24LL) + 32) | 5);
}
std::ostream::sentry::~sentry(v12);
return a1;
}