// // GJRobotSprite::init from 0x1006ad710 to 0x1006adc6c (1372 bytes) // // 4 xrefs: // > GJRobotSprite::create @ 0x1006ad63f // > GJRobotSprite::init_1 @ 0x1006ad6c8 // > GJSpiderSprite::create @ 0x1006aed13 // > GJSpiderSprite::init @ 0x1006aedac // // 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:35:23 +0000 // __int64 __fastcall GJRobotSprite::init(__int64 a1, unsigned int a2, __int64 a3, double a4) { __int64 v6; // rax __int64 v7; // rax __int64 v8; // r14 __int64 result; // rax __int64 v10; // r14 __int64 v11; // rax __int64 v12; // rax __int64 v13; // rdi __int64 v14; // rax char *v15; // rax unsigned int v16; // r12d int v17; // r14d bool v18; // r15 __int64 v19; // r13 __int64 v20; // rax _BYTE *v21; // r14 __int64 v22; // rax __int64 v23; // rax unsigned int v24; // r15d char *v25; // rsi size_t v26; // r15 char *v27; // r13 __int64 v28; // rax char *v29; // r13 char *v30; // rax __int64 v31; // r14 __int64 v32; // rax __int64 v33; // [rsp+8h] [rbp-A8h] __int64 v34; // [rsp+10h] [rbp-A0h] float v35[6]; // [rsp+18h] [rbp-98h] BYREF __int128 v36; // [rsp+30h] [rbp-80h] BYREF void *v37; // [rsp+40h] [rbp-70h] unsigned __int64 v38; // [rsp+48h] [rbp-68h] unsigned int v39; // [rsp+54h] [rbp-5Ch] unsigned __int64 v40; // [rsp+58h] [rbp-58h] __int128 v41; // [rsp+60h] [rbp-50h] BYREF void *__p; // [rsp+70h] [rbp-40h] __int64 Icon; // [rsp+78h] [rbp-38h] float v44; // [rsp+80h] [rbp-30h] unsigned __int8 v45; // [rsp+87h] [rbp-29h] v6 = GameManager::sharedState(); *(_DWORD *)(a1 + 764) = GameManager::getIconRequestID(v6); v7 = GameManager::sharedState(); Icon = GameManager::loadIcon(v7, a2, *(_DWORD *)(a1 + 760), *(_DWORD *)(a1 + 764), a4); if ( (*(_BYTE *)a3 & 1) != 0 ) v8 = *(_QWORD *)(a3 + 16); else v8 = a3 + 1; result = CCAnimatedSprite::initWithType((std::string *)a1, v8, Icon, 1); if ( (_BYTE)result ) { v39 = a2; v45 = result; *(_BYTE *)(a1 + 559) = 1; SpriteAnimationManager::stopAnimations(*(_QWORD *)(a1 + 648)); sub_100278260((float *)&v41, 30.0, 30.0); (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)a1 + 320LL))(a1, &v41); v10 = *(_QWORD *)(a1 + 672); v44 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1) * 0.5; v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 328LL))(a1); sub_100278250((float *)&v41, v44, *(float *)(v11 + 4) * 0.5); (*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)v10 + 184LL))(v10, &v41); v12 = sub_1007FE900(v10); *(_QWORD *)(a1 + 736) = v12; v13 = v12; cocos2d::CCObject::retain(v12); v14 = sub_1007FE900(v13); *(_QWORD *)(a1 + 720) = v14; cocos2d::CCObject::retain(v14); v15 = cocos2d::CCSprite::create_2(); *(_QWORD *)(a1 + 744) = v15; (*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 672) + 464LL))( *(_QWORD *)(a1 + 672), v15, 0xFFFFFFFFLL); v16 = 0; (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 744) + 344LL))(*(_QWORD *)(a1 + 744), 0); *(_BYTE *)(*(_QWORD *)(a1 + 744) + 559LL) = 1; v17 = *(_DWORD *)(a1 + 760); v18 = v17 == 6; v19 = *(_QWORD *)(*(_QWORD *)(a1 + 672) + 632LL); if ( (unsigned int)sub_1007FEF90(v19) ) { v40 = v18 + 9LL; v38 = v18 + 11LL; v34 = (v17 == 6) + 9LL; v33 = v19; do { v20 = sub_1007FEFE0(v19, v16); v21 = (_BYTE *)v20; *(_BYTE *)(v20 + 618) = 1; if ( (*(_BYTE *)(v20 + 624) & 1) != 0 ) { sub_10001AD30(&v41, *(const void **)(v20 + 640), *(_QWORD *)(v20 + 632)); v22 = (unsigned __int8)v41; if ( (v41 & 1) == 0 ) { LABEL_15: if ( !v22 ) goto LABEL_30; v23 = (unsigned int)v22 >> 1; v24 = -1; if ( (unsigned int)v38 > (unsigned int)v23 ) goto LABEL_23; v25 = (char *)&v41 + 1; if ( (unsigned int)v40 > (unsigned int)v23 ) LABEL_35: sub_100056810(); goto LABEL_18; } } else { __p = *(void **)(v20 + 640); v41 = *(_OWORD *)(v20 + 624); v22 = (unsigned __int8)v41; if ( (v41 & 1) == 0 ) goto LABEL_15; } v23 = *((_QWORD *)&v41 + 1); if ( !*((_QWORD *)&v41 + 1) ) goto LABEL_30; v24 = -1; if ( *((_QWORD *)&v41 + 1) >= v38 ) { if ( *((_QWORD *)&v41 + 1) < v40 ) goto LABEL_35; v25 = (char *)__p; LABEL_18: v26 = v23 - v40; if ( v23 - v40 >= 2 ) v26 = 2; LOBYTE(v35[0]) = 2 * v26; if ( v23 != v40 ) memcpy((char *)v35 + 1, &v25[v34], v26); *((_BYTE *)v35 + v26 + 1) = 0; v24 = atoi((const char *)v35 + 1); } LABEL_23: (*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)v21 + 72LL))(v21, v24); v27 = cocos2d::CCSprite::createWithTexture(Icon, (__int64)&unk_100BE5D48); (*(void (__fastcall **)(_BYTE *, char *, __int64))(*(_QWORD *)v21 + 464LL))(v21, v27, 0xFFFFFFFFLL); v44 = *(float *)(*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v21 + 328LL))(v21); v28 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v21 + 328LL))(v21); sub_100278250(v35, v44 * 0.5, *(float *)(v28 + 4) * 0.5); (*(void (__fastcall **)(char *, float *))(*(_QWORD *)v27 + 184LL))(v27, v35); sub_1007FEBF0(*(_QWORD *)(a1 + 736), v27); v29 = cocos2d::CCSprite::createWithTexture(Icon, (__int64)&unk_100BE5D48); (*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 744) + 464LL))( *(_QWORD *)(a1 + 744), v29, 0xFFFFFFFFLL); CCSpritePlus::addFollower((__int64)v21, (__int64)v29); v21[617] = 1; if ( !(*(_DWORD *)(a1 + 760) ^ 5 | v16 ^ 6) ) *(_QWORD *)(a1 + 776) = v21; if ( v24 == 1 ) { *(_QWORD *)(a1 + 768) = v21; LABEL_28: if ( !*(_QWORD *)(a1 + 752) ) { v30 = cocos2d::CCSprite::createWithTexture_1(Icon); *(_QWORD *)(a1 + 752) = v30; *(_BYTE *)(a1 + 728) = 0; (*(void (__fastcall **)(_QWORD, char *, __int64))(**(_QWORD **)(a1 + 768) + 464LL))( *(_QWORD *)(a1 + 768), v30, 2); v31 = *(_QWORD *)(a1 + 752); v44 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 768) + 328LL))(*(_QWORD *)(a1 + 768)); v32 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 768) + 328LL))(*(_QWORD *)(a1 + 768)); sub_100278250(v35, v44 * 0.5, *(float *)(v32 + 4) * 0.5); (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v31 + 184LL))(v31, v35); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 752) + 344LL))( *(_QWORD *)(a1 + 752), *(unsigned __int8 *)(a1 + 728)); } goto LABEL_30; } if ( v21 == *(_BYTE **)(a1 + 768) ) goto LABEL_28; LABEL_30: if ( (v41 & 1) != 0 ) operator delete(__p); ++v16; v19 = v33; } while ( v16 < (unsigned int)sub_1007FEF90(v33) ); } GJRobotSprite::updateFrame(a1, v39); LOBYTE(v36) = 8; strcpy((char *)&v36 + 1, "idle"); CCAnimatedSprite::runAnimation(a1, &v36); result = v45; if ( (v36 & 1) != 0 ) { operator delete(v37); return v45; } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source