// // ChallengeNode::init from 0x14009f430 to 0x1400a0532 (4354 bytes) // // 2 xrefs: // > ChallengesPage::createChallengeNode @ 0x14009e968 // > @ 0x140913070 // // 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:26:06 +0000 // // Hidden C++ exception states: #wind=2 bool __fastcall ChallengeNode::init(__int64 a1, __int64 a2, __int64 a3, char a4) { bool result; // al __int64 v8; // rax BOOL v9; // ebx __int64 v10; // rdx const char *v11; // rcx __int64 *v12; // rdi _QWORD *v13; // r14 __int64 v14; // rdx __int64 v15; // rbx __int64 v16; // rax size_t v17; // rsi __int64 v18; // rdx struct cocos2d::CCLabelBMFont *v19; // rax const char *v20; // rcx struct cocos2d::CCLabelBMFont *v21; // r12 __int64 v22; // rbx __int64 v23; // rax __int64 v24; // rbx __int64 v25; // rax int v26; // eax __int64 v27; // rdi unsigned __int64 v28; // rsi void **v29; // rbx unsigned __int64 v30; // rcx __int64 v31; // rbx _QWORD *v32; // r14 void *v33; // rcx unsigned __int64 v34; // rsi _BYTE *v35; // rbx unsigned __int64 v36; // rcx char *v37; // rax char *v38; // rbx void *v39; // rcx __int64 v40; // rdi unsigned __int64 v41; // rsi void **v42; // rbx unsigned __int64 v43; // rcx __int64 v44; // r14 _WORD *v45; // rbx void *v46; // rcx _BYTE *v47; // rbx unsigned __int64 v48; // rcx char *v49; // rdx _BYTE *v50; // rbx unsigned __int64 v51; // rcx __int64 v52; // rdi void **v53; // rax _QWORD *v54; // rsi void **v55; // r8 cocos2d::CCString *v56; // rax const char *CString; // rax struct cocos2d::CCLabelBMFont *v58; // rdi __int64 v59; // rbx __int64 v60; // rax __int64 v61; // rax __int64 v62; // rbx __int64 v63; // rax void **v64; // rcx struct cocos2d::CCSprite *v65; // rdi float *v66; // rbx float v67; // xmm6_4 double v68; // xmm0_8 float v69; // xmm7_4 float v70; // xmm6_4 double v71; // xmm0_8 __int64 v72; // rax __int64 v73; // rbx __int64 v74; // rax struct cocos2d::CCLabelBMFont *v75; // r14 __int64 v76; // rbx __int64 v77; // rax float *v78; // rdi __int64 v79; // rsi __int64 v80; // rbx float v81; // xmm6_4 float v82; // xmm0_4 __int64 v83; // rax struct cocos2d::CCSprite *v84; // rsi __int64 v85; // rdx __int64 v86; // rbx __int64 v87; // rax __int64 v88; // rbx __int64 v89; // rax struct cocos2d::CCSprite *v90; // rdi float v91; // xmm6_4 __int64 v92; // rbx __int64 v93; // rax __int64 v94; // rbx __int64 v95; // rax __int64 v96; // rax __int64 v97; // rbx __int64 v98; // rax cocos2d::CCString *v99; // rax const char *v100; // rax struct cocos2d::CCLabelBMFont *v101; // rdi float *v102; // rax __int64 v103; // rax __int64 v104; // rbx __int64 v105; // rax struct cocos2d::CCSprite *v106; // rsi __int64 v107; // rbx __int64 v108; // rax cocos2d::CCString *v109; // rax const char *v110; // rax struct cocos2d::CCLabelBMFont *v111; // rdi __int64 v112; // rbx __int64 v113; // rax __int64 v114; // rax __int64 v115; // rbx __int64 v116; // rax struct cocos2d::CCSprite *v117; // rax int v118; // ebx cocos2d::CCObject *v119; // rax struct cocos2d::CCMenu *v120; // r14 __int64 v121; // rbx __int64 v122; // rax struct cocos2d::CCSprite *v123; // rsi __int64 v124; // rbx __int64 v125; // rax cocos2d::CCString *v126; // rax const char *v127; // rax struct cocos2d::CCLabelBMFont *v128; // rdi __int64 v129; // rbx __int64 v130; // rax __int64 v131; // rax __int64 v132; // rbx __int64 v133; // rax __int64 v134; // rax void *v135; // rcx void *v136; // rcx _BYTE v138[12]; // [rsp+3Ch] [rbp-85h] BYREF _BYTE v139[16]; // [rsp+48h] [rbp-79h] BYREF __int16 v140; // [rsp+58h] [rbp-69h] BYREF char v141; // [rsp+5Ah] [rbp-67h] void *v142[2]; // [rsp+60h] [rbp-61h] BYREF __int64 v143; // [rsp+70h] [rbp-51h] unsigned __int64 v144; // [rsp+78h] [rbp-49h] void *Block[2]; // [rsp+80h] [rbp-41h] BYREF __int64 v146; // [rsp+90h] [rbp-31h] unsigned __int64 v147; // [rsp+98h] [rbp-29h] result = cocos2d::CCNode::init((cocos2d::CCNode *)a1); if ( result ) { *(_QWORD *)(a1 + 328) = a2; if ( a2 ) cocos2d::CCObject::retain((cocos2d::CCObject *)a2); v8 = *(_QWORD *)(a1 + 328); v9 = v8 && *(_BYTE *)(v8 + 100); *(_QWORD *)(a1 + 320) = a3; v10 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v139, 0.0, 0.0, 80.0, 80.0); v11 = "GJ_square02.png"; if ( v9 ) v11 = "GJ_square03.png"; v12 = (__int64 *)cocos2d::extension::CCScale9Sprite::create(v11, v10); v13 = v12 + 40; LOBYTE(v14) = -1; (*(void (__fastcall **)(__int64 *, __int64))(v12[40] + 40))(v12 + 40, v14); v15 = *v12; cocos2d::CCSize::CCSize((cocos2d::CCSize *)v138, 300.0, 70.0); (*(void (__fastcall **)(__int64 *, __int64))(v15 + 312))(v12, v16); v17 = -1; (*(void (__fastcall **)(__int64, __int64 *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v12, 0xFFFFFFFFLL); if ( !*(_QWORD *)(a1 + 328) ) { (*(void (__fastcall **)(_QWORD *, __int16 *))*v13)(v13, &word_140702D1C); LOBYTE(v18) = 75; (*(void (__fastcall **)(_QWORD *, __int64))(*v13 + 40LL))(v13, v18); v19 = cocos2d::CCLabelBMFont::create("00:00:00", (const char *)&qword_140704F78); *(_QWORD *)(a1 + 344) = v19; (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v19 + 160LL))(v19); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 344)); *(_BYTE *)(a1 + 352) = 1; return 1; } v20 = (const char *)(a2 + 112); if ( *(_QWORD *)(a2 + 136) > 0xFu ) v20 = *(const char **)v20; v21 = cocos2d::CCLabelBMFont::create(v20, (const char *)&qword_140704F78); (*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)a1 + 464LL))(a1, v21); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 160LL))(v21); v22 = *(_QWORD *)v21; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v138, 0.0, 1.0); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v22 + 288))(v21, v23); v24 = *(_QWORD *)v21; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v138, -140.0, 29.0); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v24 + 184))(v21, v25); *(_OWORD *)Block = 0; v146 = 0; v147 = 15; LOBYTE(Block[0]) = 0; *(_OWORD *)v142 = 0; v143 = 0; v144 = 0; v142[0] = sub_14003D460(0x20u); v143 = 23; v144 = 31; strcpy((char *)v142[0], "currencyOrbIcon_001.png"); v26 = *(_DWORD *)(a2 + 56); switch ( v26 ) { case 1: v27 = 0x7FFFFFFFFFFFFFFFLL; v28 = v147; if ( v147 < 9 ) { v30 = v147 >> 1; if ( v147 <= 0x7FFFFFFFFFFFFFFFLL - (v147 >> 1) ) { v31 = 15; if ( v30 + v147 > 0xF ) v31 = v30 + v147; } else { v31 = 0x7FFFFFFFFFFFFFFFLL; } v32 = sub_14003D460(v31 + 1); v146 = 9; v147 = v31; *v32 = *(_QWORD *)"Mana Orbs"; *((_WORD *)v32 + 4) = (unsigned __int8)aManaOrbs[8]; if ( v28 > 0xF ) { v33 = Block[0]; if ( v28 + 1 >= 0x1000 ) { v33 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v33 - 8) > 0x1F ) goto LABEL_74; } j_j_free(v33); } Block[0] = v32; } else { v29 = Block; if ( v147 > 0xF ) v29 = (void **)Block[0]; v146 = 9; memmove(v29, "Mana Orbs", 9u); *((_BYTE *)v29 + 9) = 0; } v34 = v144; if ( v144 >= 0x17 ) { v35 = v142[0]; v143 = 23; memmove(v142[0], &xmmword_14071BE38, 0x17u); v35[23] = 0; LABEL_75: v55 = Block; if ( v147 > 0xF ) v55 = (void **)Block[0]; v56 = cocos2d::CCString::createWithFormat( "Collect %i %s.", *(_DWORD *)(a2 + 84) - *(_DWORD *)(a2 + 88), (const char *)v55); CString = cocos2d::CCString::getCString(v56); v58 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt"); v59 = *(_QWORD *)v58; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v138, 0.0, 1.0); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v59 + 288))(v58, v60); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, 0.0, -20.0); v62 = v61; v63 = (*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 200LL))(v21); cocos2d::CCPoint::operator+(v63, v138, v62); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v58 + 184LL))(v58, v138); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v58 + 160LL))(v58); (*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)a1 + 464LL))(a1, v58); v64 = v142; if ( v144 > 0xF ) v64 = (void **)v142[0]; v65 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v64); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v65); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v65 + 160LL))(v65); v66 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 320LL))(v21); v67 = *(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 320LL))(v21) + 4); v68 = (*(double (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 168LL))(v21); v69 = (float)-(float)((float)(*(float *)&v68 * v67) * 0.5) - 1.0; v70 = *v66; v71 = (*(double (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 168LL))(v21); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, (float)(*(float *)&v71 * v70) + 14.0, v69); v73 = v72; v74 = (*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 200LL))(v21); cocos2d::CCPoint::operator+(v74, v138, v73); (*(void (__fastcall **)(struct cocos2d::CCSprite *, _BYTE *))(*(_QWORD *)v65 + 184LL))(v65, v138); if ( a4 ) { v75 = cocos2d::CCLabelBMFont::create("New!", "goldFont.fnt"); v76 = *(_QWORD *)v75; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, 0.0, 0.5); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v76 + 288))(v75, v77); v78 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v65 + 200LL))(v65); v79 = *(_QWORD *)v75; v80 = (*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 200LL))(v21); v81 = *(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 320LL))(v21) + 4); v82 = (*(float (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v21 + 168LL))(v21); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v139, *v78 + 15.0, *(float *)(v80 + 4) - (float)((float)(v82 * v81) * 0.5)); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v79 + 184))(v75, v83); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v75 + 160LL))(v75); (*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)a1 + 464LL))(a1, v75); } v140 = 0; v141 = 0; v84 = cocos2d::CCSprite::create("GJ_progressBar_001.png"); (**((void (__fastcall ***)(__int64, __int16 *))v84 + 40))((__int64)v84 + 320, &v140); LOBYTE(v85) = 125; (*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v84 + 40) + 40LL))((__int64)v84 + 320, v85); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v84 + 120LL))(v84); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v84 + 136LL))(v84); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v84, 3); v86 = *(_QWORD *)v84; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, 0.0, 1.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v86 + 288))(v84, v87); v88 = *(_QWORD *)v84; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, -140.0, -13.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v88 + 184))(v84, v89); v90 = cocos2d::CCSprite::create("GJ_progressBar_001.png"); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v90 + 120LL))(v90); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v90 + 136LL))(v90); (**((void (__fastcall ***)(__int64, void *))v90 + 40))((__int64)v90 + 320, &unk_140702D20); v91 = *((float *)v90 + 108); (*(void (__fastcall **)(struct cocos2d::CCSprite *, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v84 + 456LL))( v84, v90, 1); v92 = *(_QWORD *)v90; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, 0.0, 0.5); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v92 + 288))(v90, v93); v94 = *(_QWORD *)v90; v95 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v84 + 320LL))(v84); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v139, (float)(v91 - (float)(v91 * 0.98000002)) * 0.5, *(float *)(v95 + 4) * 0.5); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v94 + 184))(v90, v96); v97 = *(_QWORD *)v90; v98 = cocos2d::CCRect::CCRect( (cocos2d::CCRect *)v139, 0.0, 0.0, fminf( *((float *)v90 + 108), (float)((float)(*(_DWORD *)(a2 + 60) - *(_DWORD *)(a2 + 64)) / (float)(*(_DWORD *)(a2 + 84) - *(_DWORD *)(a2 + 88))) * *((float *)v90 + 108)), *((float *)v90 + 109)); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v97 + 992))(v90, v98); v99 = cocos2d::CCString::createWithFormat( "%i / %i", *(_DWORD *)(a2 + 60) - *(_DWORD *)(a2 + 64), *(_DWORD *)(a2 + 84) - *(_DWORD *)(a2 + 88)); v100 = cocos2d::CCString::getCString(v99); v101 = cocos2d::CCLabelBMFont::create(v100, (const char *)&qword_140704F78); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v101 + 160LL))(v101); (*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)a1 + 456LL))( a1, v101, 4); v102 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v84 + 320LL))(v84); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, (float)(*v102 * 0.5) * 0.5, -5.0); v104 = v103; v105 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v84 + 200LL))(v84); cocos2d::CCPoint::operator+(v105, v138, v104); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v101 + 184LL))(v101, v138); if ( *(_BYTE *)(a2 + 100) ) { v117 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_rewardBtn_001.png"); v118 = (int)v117; (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v117 + 160LL))(v117); v119 = CCMenuItemSpriteExtra::create(v118, 0, a1, (__int64)ChallengeNode::onClaimReward); *((_DWORD *)v119 + 93) = 1069547520; v120 = cocos2d::CCMenu::createWithItem(v119); (*(void (__fastcall **)(__int64, struct cocos2d::CCMenu *))(*(_QWORD *)a1 + 464LL))(a1, v120); v121 = *(_QWORD *)v120; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, 115.0, 0.0); (*(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(v121 + 184))(v120, v122); v123 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigDiamond_001.png"); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v123); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v123 + 160LL))(v123); v124 = *(_QWORD *)v123; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, 70.0, 0.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v124 + 184))(v123, v125); v126 = cocos2d::CCString::createWithFormat("%ix", *(_DWORD *)(a2 + 72) - *(_DWORD *)(a2 + 76)); v127 = cocos2d::CCString::getCString(v126); v128 = cocos2d::CCLabelBMFont::create(v127, (const char *)&qword_140704F78); (*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)a1 + 464LL))(a1, v128); v129 = *(_QWORD *)v128; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, 1.0, 0.5); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v129 + 288))(v128, v130); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v128 + 160LL))(v128); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, -14.0, 0.0); v132 = v131; v133 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v123 + 200LL))(v123); cocos2d::CCPoint::operator+(v133, v138, v132); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v128 + 184LL))(v128, v138); v134 = (*(__int64 (__fastcall **)(struct cocos2d::CCMenu *))(*(_QWORD *)v120 + 200LL))(v120); cocos2d::CCPoint::operator=(a1 + 336, v134); } else { v106 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigDiamond_001.png"); (*(void (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)a1 + 464LL))(a1, v106); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v106 + 160LL))(v106); v107 = *(_QWORD *)v106; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, 118.0, 0.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v107 + 184))(v106, v108); v109 = cocos2d::CCString::createWithFormat("%ix", *(_DWORD *)(a2 + 72) - *(_DWORD *)(a2 + 76)); v110 = cocos2d::CCString::getCString(v109); v111 = cocos2d::CCLabelBMFont::create(v110, (const char *)&qword_140704F78); (*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)a1 + 464LL))(a1, v111); v112 = *(_QWORD *)v111; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, 1.0, 0.5); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v112 + 288))(v111, v113); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v111 + 160LL))(v111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v139, -20.0, 0.0); v115 = v114; v116 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v106 + 200LL))(v106); cocos2d::CCPoint::operator+(v116, v138, v115); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v111 + 184LL))(v111, v138); } if ( v144 > 0xF ) { v135 = v142[0]; if ( v144 + 1 >= 0x1000 ) { v135 = *((void **)v142[0] - 1); if ( (unsigned __int64)((char *)v142[0] - (char *)v135 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v135); } v143 = 0; v144 = 15; LOBYTE(v142[0]) = 0; if ( v147 > 0xF ) { v136 = Block[0]; if ( v147 + 1 >= 0x1000 ) { v136 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v136 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v136); } return 1; } v36 = v144 >> 1; if ( v144 <= 0x7FFFFFFFFFFFFFFFLL - (v144 >> 1) ) { v27 = 31; if ( v144 + v36 > 0x1F ) v27 = v144 + v36; } v37 = (char *)sub_14003D460(v27 + 1); v143 = 23; v144 = v27; strcpy(v37, "currencyOrbIcon_001.png"); break; case 3: v40 = 0x7FFFFFFFFFFFFFFFLL; v41 = v147; if ( v147 < 0xB ) { v43 = v147 >> 1; if ( v147 <= 0x7FFFFFFFFFFFFFFFLL - (v147 >> 1) ) { v44 = 15; if ( v43 + v147 > 0xF ) v44 = v43 + v147; } else { v44 = 0x7FFFFFFFFFFFFFFFLL; } v45 = sub_14003D460(v44 + 1); v146 = 11; v147 = v44; qmemcpy(v45, "Stars/Moon", 10); v45[5] = (unsigned __int8)aStarsMoons[10]; if ( v41 > 0xF ) { v46 = Block[0]; if ( v41 + 1 >= 0x1000 ) { v46 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v46 - 8) > 0x1F ) goto LABEL_74; } j_j_free(v46); } Block[0] = v45; } else { v42 = Block; if ( v147 > 0xF ) v42 = (void **)Block[0]; v146 = 11; memmove(v42, "Stars/Moons", 0xBu); *((_BYTE *)v42 + 11) = 0; } v34 = v144; if ( v144 >= 0x14 ) { v47 = v142[0]; v143 = 20; memmove(v142[0], "GJ_starsIcon_001.png", 0x14u); v47[20] = 0; goto LABEL_75; } v48 = v144 >> 1; if ( v144 <= 0x7FFFFFFFFFFFFFFFLL - (v144 >> 1) ) { v40 = 31; if ( v144 + v48 > 0x1F ) v40 = v144 + v48; } v37 = (char *)sub_14003D460(v40 + 1); v143 = 20; v144 = v40; strcpy(v37, "GJ_starsIcon_001.png"); break; case 2: v49 = "Silver Coins"; if ( *(_DWORD *)(a2 + 84) - *(_DWORD *)(a2 + 88) == 1 ) v49 = "Silver Coin"; do ++v17; while ( v49[v17] ); sub_1400405A0(Block, v49, v17); v34 = v144; if ( v144 >= 0x15 ) { v50 = v142[0]; v143 = 21; memmove(v142[0], "GJ_coinsIcon2_001.png", 0x15u); v50[21] = 0; goto LABEL_75; } v51 = v144 >> 1; v52 = 0x7FFFFFFFFFFFFFFFLL; if ( v144 <= 0x7FFFFFFFFFFFFFFFLL - (v144 >> 1) ) { v52 = 31; if ( v51 + v144 > 0x1F ) v52 = v51 + v144; } v37 = (char *)sub_14003D460(v52 + 1); v143 = 21; v144 = v52; qmemcpy(v37, "GJ_coinsIcon2_001.pn", 20); *((_WORD *)v37 + 10) = (unsigned __int8)aGjCoinsicon200[20]; break; default: if ( v147 ) { v53 = Block; if ( v147 > 0xF ) v53 = (void **)Block[0]; v146 = 1; *(_WORD *)v53 = 63; } else { v54 = sub_14003D460(0x10u); v146 = 1; v147 = 15; *(_WORD *)v54 = 63; Block[0] = v54; } goto LABEL_75; } v38 = v37; if ( v34 <= 0xF ) { LABEL_38: v142[0] = v38; goto LABEL_75; } v39 = v142[0]; if ( v34 + 1 < 0x1000 || (v39 = *((void **)v142[0] - 1), (unsigned __int64)((char *)v142[0] - (char *)v39 - 8) <= 0x1F) ) { j_j_free(v39); goto LABEL_38; } LABEL_74: invoke_watson(nullptr, nullptr, nullptr, 0, 0); } return result; }