//
// DS_Dictionary::getVec2ForKey from 0x18001b870 to 0x18001b9c9 (345 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801aea70
//
// 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
//
cocos2d *__fastcall DS_Dictionary::getVec2ForKey(DS_Dictionary *this, cocos2d *a2, __int64 a3)
{
const char *v6; // r8
unsigned __int8 *v7; // rax
__int64 v8; // r8
int v9; // ecx
int v10; // edx
const char *v11; // r8
__int64 v12; // rbx
__int64 v13; // rax
const char *v14; // r8
__int64 v16; // rax
const char *v17; // rax
__int64 v18; // [rsp+20h] [rbp-48h] BYREF
_BYTE v19[8]; // [rsp+28h] [rbp-40h] BYREF
cocos2d::CCSize v20; // [rsp+30h] [rbp-38h] BYREF
_BYTE v21[48]; // [rsp+38h] [rbp-30h] BYREF
v6 = "k";
if ( this->compatible )
v6 = "key";
sub_18007FB10(&this->dictTree._Mypair._Myval2._Mylast[-1], &v18, v6);
if ( sub_18007F4E0(&v18) )
{
while ( 1 )
{
v7 = (unsigned __int8 *)sub_18007FB70(&v18);
v8 = a3 - (_QWORD)v7;
do
{
v9 = v7[v8];
v10 = *v7 - v9;
if ( v10 )
break;
++v7;
}
while ( v9 );
if ( !v10 )
{
v11 = "s";
if ( this->compatible )
v11 = "string";
v12 = sub_180081A50(&v18, v21, v11);
v13 = sub_180081AB0(&v18, v19);
if ( (unsigned __int8)std::operator==<_EXCEPTION_RECORD const,_EXCEPTION_RECORD const>(v13, v12) )
break;
}
v14 = "k";
if ( this->compatible )
v14 = "key";
v18 = *(_QWORD *)sub_180081A50(&v18, &v20, v14);
if ( !sub_18007F4E0(&v18) )
goto LABEL_14;
}
cocos2d::CCSize::CCSize(&v20);
v16 = sub_180081AB0(&v18, v19);
v17 = (const char *)sub_18007FB70(v16);
cocos2d::CCPointFromString(a2, v17);
}
else
{
LABEL_14:
cocos2d::cc_timeval::operator=(a2, dword_1801A8348);
}
return a2;
}