// // SetupBGSpeedTrigger::init from 0x10050a9b0 to 0x10050adab (1019 bytes) // // 1 xrefs: // > SetupBGSpeedTrigger::create @ 0x10050a972 // // 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 // bool __fastcall SetupBGSpeedTrigger::init(SetupBGSpeedTrigger *a1, EffectGameObject *a2, cocos2d::CCArray *a3, int a4) { bool v5; // bl const char *v6; // rcx __int64 v7; // rax const std::string::value_type *v8; // rsi const char *data; // r15 size_t v10; // rax size_t v11; // r12 char *v12; // r13 size_t v13; // rbx char v15; // [rsp+40h] [rbp-100h] BYREF char v16[15]; // [rsp+41h] [rbp-FFh] BYREF void *v17; // [rsp+50h] [rbp-F0h] char v18; // [rsp+58h] [rbp-E8h] BYREF char v19[15]; // [rsp+59h] [rbp-E7h] BYREF void *v20; // [rsp+68h] [rbp-D8h] float v21[2]; // [rsp+70h] [rbp-D0h] BYREF unsigned __int64 v22; // [rsp+78h] [rbp-C8h] BYREF char v23; // [rsp+80h] [rbp-C0h] BYREF _BYTE v24[15]; // [rsp+81h] [rbp-BFh] void *__p; // [rsp+90h] [rbp-B0h] char v26; // [rsp+98h] [rbp-A8h] BYREF char v27[15]; // [rsp+99h] [rbp-A7h] BYREF void *v28; // [rsp+A8h] [rbp-98h] char v29; // [rsp+B0h] [rbp-90h] BYREF char v30[15]; // [rsp+B1h] [rbp-8Fh] BYREF void *v31; // [rsp+C0h] [rbp-80h] __int128 __dst; // [rsp+C8h] [rbp-78h] BYREF void *v33; // [rsp+D8h] [rbp-68h] std::string v34; // [rsp+E0h] [rbp-60h] BYREF double v35; // [rsp+104h] [rbp-3Ch] BYREF unsigned __int64 v36; // [rsp+10Ch] [rbp-34h] BYREF bool v37; // [rsp+117h] [rbp-29h] v5 = SetupTriggerPopup::init(a1, a2, a3, 300.0, 240.0, 1); if ( !v5 ) return v5; SetupTriggerPopup::preSetup(a1); cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v21); v6 = "Change BG Speed"; if ( a4 == 3612 ) v6 = "Change MG Speed"; v7 = *(_QWORD *)v6; *(_QWORD *)&v24[7] = *(_QWORD *)(v6 + 7); *(_QWORD *)v24 = v7; v23 = 30; __p = nullptr; SetupTriggerPopup::addTitle((__int64)a1, (__int64)&v23); if ( (v23 & 1) != 0 ) operator delete(__p); v15 = 4; strcpy(v16, "OK"); SetupTriggerPopup::addCloseButton((__int64)a1, (__int64)&v15); if ( (v15 & 1) != 0 ) operator delete(v17); memset(&v34, 0, sizeof(v34)); v8 = "Lets you change the speed of the background during gameplay movement. Default X: 0.1, Y: 0.1"; if ( a4 == 3612 ) v8 = "Lets you change the speed of the middle ground during gameplay movement. Default X: 0.3, Y: 0.5"; std::string::assign(&v34, v8); v18 = 8; strcpy(v19, "Help"); if ( (*(_BYTE *)&v34.__r_.__value_.__s.0 & 1) != 0 ) data = v34.__r_.__value_.__l.__data_; else data = v34.__r_.__value_.__s.__data_; v10 = strlen(data); if ( v10 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(0.0); v11 = v10; if ( v10 >= 0x17 ) { v37 = v5; v13 = 26; if ( (v10 | 7) != 0x17 ) v13 = (v10 | 7) + 1; v12 = (char *)operator new(v13); v33 = v12; *(_QWORD *)&__dst = v13 | 1; *((_QWORD *)&__dst + 1) = v11; v5 = v37; } else { LOBYTE(__dst) = 2 * v10; v12 = (char *)&__dst + 1; if ( !v10 ) goto LABEL_21; } memmove(v12, data, v11); LABEL_21: v12[v11] = 0; SetupTriggerPopup::addHelpButton((__int64)a1, (__int64)&v18, &__dst, (__m128)0x3F800000u); if ( (__dst & 1) != 0 ) operator delete(v33); if ( (v18 & 1) != 0 ) operator delete(v20); sub_10028CBE0((float *)&v22, v21[0] * 0.5, 0.5 * v21[1]); v26 = 12; strcpy(v27, "Mod X:"); sub_10028CBE0((float *)&v36, 0.0, 60.0); sub_10028CCE0(&v35, &v22, &v36); SetupTriggerPopup::createValueControlAdvanced( (__int64)a1, 143, (__int64)&v26, (float *)&v35, 0, Float, 0.80000001, 0.0, 1.0, 10, 0, 0, 0, 0, 2, 0); if ( (v26 & 1) != 0 ) operator delete(v28); v29 = 12; strcpy(v30, "Mod Y:"); sub_10028CBE0((float *)&v36, 0.0, -10.0); sub_10028CCE0(&v35, &v22, &v36); SetupTriggerPopup::createValueControlAdvanced( (__int64)a1, 144, (__int64)&v29, (float *)&v35, 0, Float, 0.80000001, 0.0, 1.0, 10, 0, 0, 0, 0, 2, 0); if ( (v29 & 1) != 0 ) operator delete(v31); SetupTriggerPopup::createMultiTriggerItemsDefault(a1); SetupTriggerPopup::postSetup(a1); if ( (*(_BYTE *)&v34.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v34.__r_.__value_.__l.__data_); return v5; }
GD Web Decomp Icon

GD Web Decomp

Raw Source