//
// GJSearchObject::create from 0x10058d470 to 0x10058d71e (686 bytes)
//
// 5 xrefs:
// > GJSearchObject::createFromKey @ 0x10054b2b6
// > GJSearchObject::create_2 @ 0x10058d7f4
// > GJSearchObject::create_1 @ 0x10058d8ef
// > GJSearchObject::getPageObject @ 0x10058e381
// > LevelSearchLayer::getSearchObject @ 0x1007091b0
//
// 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:32:25 +0000
//
char *__fastcall GJSearchObject::create(
int a1,
std::string *a2,
std::string *a3,
std::string *a4,
int a5,
int a6,
unsigned __int8 a7,
unsigned __int8 a8,
int a9,
unsigned __int8 a10,
unsigned __int8 a11,
char a12,
char a13,
char a14,
unsigned __int8 a15,
unsigned __int8 a16,
unsigned __int8 a17,
char a18,
unsigned __int8 a19,
int a20,
int a21,
int a22)
{
char *v24; // rbx
std::string __str; // [rsp+0h] [rbp-90h] BYREF
std::string v27; // [rsp+20h] [rbp-70h] BYREF
std::string v28; // [rsp+40h] [rbp-50h] BYREF
int v29; // [rsp+60h] [rbp-30h]
int v30; // [rsp+64h] [rbp-2Ch]
v29 = a6;
v30 = a5;
v24 = (char *)operator new(0x1B8u);
cocos2d::CCNode::CCNode((__int64)v24);
*(_QWORD *)v24 = off_100B6EC40;
*((_DWORD *)v24 + 108) = 0;
*(_OWORD *)(v24 + 316) = 0;
*(_OWORD *)(v24 + 332) = 0;
*(_OWORD *)(v24 + 348) = 0;
*(_OWORD *)(v24 + 364) = 0;
*(_OWORD *)(v24 + 380) = 0;
*((_WORD *)v24 + 198) = 0;
*((_QWORD *)v24 + 50) = 0;
*(_QWORD *)(v24 + 405) = 0;
*((_QWORD *)v24 + 52) = 0;
*(_QWORD *)(v24 + 423) = 0;
if ( (*(_BYTE *)&a2->__r_.__value_.__s.0 & 1) == 0 )
{
__str = *a2;
if ( (*(_BYTE *)&a3->__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_3;
LABEL_6:
v27 = *a3;
if ( (*(_BYTE *)&a4->__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_4;
goto LABEL_7;
}
sub_10001AD30(&__str, a2->__r_.__value_.__l.__data_, a2->__r_.__value_.__l.__size_);
if ( (*(_BYTE *)&a3->__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_6;
LABEL_3:
sub_10001AD30(&v27, a3->__r_.__value_.__l.__data_, a3->__r_.__value_.__l.__size_);
if ( (*(_BYTE *)&a4->__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_4:
v28 = *a4;
goto LABEL_8;
}
LABEL_7:
sub_10001AD30(&v28, a4->__r_.__value_.__l.__data_, a4->__r_.__value_.__l.__size_);
LABEL_8:
*((_DWORD *)v24 + 79) = a1;
std::string::operator=((std::string *)(v24 + 320), &__str);
std::string::operator=((std::string *)(v24 + 344), &v27);
std::string::operator=((std::string *)(v24 + 368), &v28);
*((_DWORD *)v24 + 98) = v30;
v24[396] = v29;
*((_DWORD *)v24 + 106) = a9;
v24[428] = a12;
v24[429] = a13;
v24[397] = a14;
v24[412] = a18;
*(_QWORD *)(v24 + 404) = _mm_and_si128(
_mm_shuffle_epi8(
_mm_insert_epi8(
_mm_insert_epi8(
_mm_insert_epi8(
_mm_insert_epi8(
_mm_insert_epi8(
_mm_insert_epi8(_mm_insert_epi8(_mm_cvtsi32_si128(a7), a19, 2), a8, 4),
a10,
6),
a11,
8),
a15,
10),
a16,
12),
a17,
14),
(__m128i)xmmword_100A0CCE0),
(__m128i)xmmword_100A0CCF0).u64[0];
*((_DWORD *)v24 + 104) = a20;
*((_DWORD *)v24 + 105) = a21;
*((_DWORD *)v24 + 108) = a22;
if ( (*(_BYTE *)&v28.__r_.__value_.__s.0 & 1) == 0 )
{
if ( (*(_BYTE *)&v27.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_10;
LABEL_14:
operator delete(v27.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_12;
goto LABEL_11;
}
operator delete(v28.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v27.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_14;
LABEL_10:
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
LABEL_11:
operator delete(__str.__r_.__value_.__l.__data_);
LABEL_12:
cocos2d::CCObject::autorelease((__int64)v24);
return v24;
}