//
// GameCell::loadFromString from 0x1400400d0 to 0x1400404a8 (984 bytes)
//
// 3 xrefs:
// > BoomListView::loadCell @ 0x14003ff4e
// > CustomListView::loadCell @ 0x14014617c
// > ??> @ 0x14090f3bc
//
// 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 11:25:29 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall GameCell::loadFromString(__int64 a1, const void **a2)
{
const void **v2; // rsi
int v4; // ebx
size_t v5; // rdi
char *CString; // rax
size_t v7; // r8
const void *v8; // rcx
unsigned __int64 v9; // rbx
size_t v10; // r8
int v11; // ebx
const void *v12; // rcx
unsigned __int64 v13; // rbx
size_t v14; // r8
int v15; // ebx
const char *v16; // rdx
cocos2d::CCString *v17; // rax
const char *v18; // rdx
cocos2d::CCString *v19; // rax
const char *v20; // rax
void **v21; // rcx
struct cocos2d::CCSprite *v22; // rax
struct cocos2d::CCMenuItem *v23; // rax
struct cocos2d::CCMenu *v24; // rdi
__int64 v25; // rbx
__int64 v26; // rax
void *v27; // rcx
char v28[8]; // [rsp+30h] [rbp-29h] BYREF
const void **v29; // [rsp+38h] [rbp-21h]
__int128 Buf2; // [rsp+40h] [rbp-19h] BYREF
__m128i si128; // [rsp+50h] [rbp-9h]
void *Block[2]; // [rsp+60h] [rbp+7h] BYREF
__m128i v33; // [rsp+70h] [rbp+17h]
v2 = a2;
v29 = a2;
LOBYTE(a2) = 1;
(*(void (__fastcall **)(_QWORD, const void **))(**(_QWORD **)(a1 + 544) + 576LL))(*(_QWORD *)(a1 + 544), a2);
Buf2 = 0;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836530);
strcpy((char *)&Buf2, "gj");
v4 = sub_14003D160(v2, &Buf2);
sub_14003D310((__int64)&Buf2);
v5 = -1;
if ( v4 )
{
Buf2 = 0;
si128.m128i_i64[0] = 3;
si128.m128i_i64[1] = 15;
LODWORD(Buf2) = 7105127;
v8 = v2;
if ( (unsigned __int64)v2[3] > 0xF )
v8 = *v2;
v9 = (unsigned __int64)v2[2];
v10 = v9;
if ( v9 > 3 )
v10 = 3;
if ( !memcmp(v8, &Buf2, v10) && v9 == 3 )
{
CString = "https://play.google.com/store/apps/details?id=com.robtopx.geometryjumplite";
v7 = 74;
}
else
{
Buf2 = 0;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836540);
LODWORD(Buf2) = 7170663;
v11 = sub_14003D160(v2, &Buf2);
sub_14003D310((__int64)&Buf2);
if ( v11 )
{
Buf2 = 0;
si128.m128i_i64[0] = 3;
si128.m128i_i64[1] = 15;
LODWORD(Buf2) = 7826023;
v12 = v2;
if ( (unsigned __int64)v2[3] > 0xF )
v12 = *v2;
v13 = (unsigned __int64)v2[2];
v14 = v13;
if ( v13 > 3 )
v14 = 3;
if ( !memcmp(v12, &Buf2, v14) && v13 == 3 )
{
CString = "https://play.google.com/store/apps/details?id=com.robtopx.geometrydashworld";
v7 = 75;
}
else
{
Buf2 = 0;
si128 = _mm_load_si128((const __m128i *)&xmmword_140836540);
LODWORD(Buf2) = 8022631;
v15 = sub_14003D160(v2, &Buf2);
sub_14003D310((__int64)&Buf2);
if ( v15 )
{
v16 = (const char *)v2;
if ( (unsigned __int64)v2[3] > 0xF )
v16 = (const char *)*v2;
v17 = cocos2d::CCString::createWithFormat("https://www.robtopgames.com/download/%s%i", v16, 0);
CString = (char *)cocos2d::CCString::getCString(v17);
v7 = -1;
do
++v7;
while ( CString[v7] );
}
else
{
CString = "https://play.google.com/store/apps/details?id=com.robtopx.geometrydashsubzero";
v7 = 77;
}
}
}
else
{
CString = "https://play.google.com/store/apps/details?id=com.robtopx.geometrydashmeltdown";
v7 = 78;
}
}
}
else
{
CString = "https://play.google.com/store/apps/details?id=com.robtopx.geometryjump";
v7 = 70;
}
sub_1400405A0((void *)(a1 + 568), CString, v7);
v18 = (const char *)v2;
if ( (unsigned __int64)v2[3] > 0xF )
v18 = (const char *)*v2;
v19 = cocos2d::CCString::createWithFormat("promo_%s.png", v18);
v20 = cocos2d::CCString::getCString(v19);
*(_OWORD *)Block = 0;
v33 = 0;
do
++v5;
while ( v20[v5] );
sub_14003D230(Block, v20, v5);
v21 = Block;
if ( v33.m128i_i64[1] > 0xFuLL )
v21 = (void **)Block[0];
v22 = cocos2d::CCSprite::create((const char *)v21);
v23 = (struct cocos2d::CCMenuItem *)CCMenuItemSpriteExtra::create(v22, 0, a1, GameCell::onTouch);
*((_WORD *)v23 + 204) = 256;
v24 = cocos2d::CCMenu::create(v23, 0);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCMenu *))(**(_QWORD **)(a1 + 544) + 464LL))(
*(_QWORD *)(a1 + 544),
v24);
v25 = *(_QWORD *)v24;
v26 = cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v28, *(float *)(a1 + 528) * 0.5, *(float *)(a1 + 532) * 0.5);
(*(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(v25 + 184))(v24, v26);
if ( v33.m128i_i64[1] > 0xFuLL )
{
v27 = Block[0];
if ( (unsigned __int64)(v33.m128i_i64[1] + 1) >= 0x1000 )
{
v27 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v27 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v27);
}
v33 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
sub_14003D310((__int64)v2);
}