// // EditorUI::getRandomStartKey from 0x100613120 to 0x100613346 (550 bytes) // // 2 xrefs: // > EditorUI::processSmartObjectsFromType @ 0x10004447f // > SetupSmartBlockLayer::onCreate @ 0x1004e6d60 // // 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 // int __fastcall EditorUI::getRandomStartKey(int a1) { int result; // eax __m128 v2; // xmm0 bool v3; // cf int v4; // eax if ( a1 <= 1860 ) { if ( a1 != 869 ) { if ( a1 == 1431 ) { qword_1009A35A0 = 214013 * qword_1009A35A0 + 2531011; v2.f32[0] = (float)((float)(WORD1(qword_1009A35A0) & 0x7FFF) / 32767.0) * 3.0; v2.f32[0] = _mm_round_ss(v2, v2, 9).f32[0]; result = 1431; if ( (int)v2.f32[0] ) return ((int)v2.f32[0] == 1) ^ 0x599; } else if ( a1 == 1461 ) { qword_1009A35A0 = 214013 * qword_1009A35A0 + 2531011; v2.f32[0] = (float)((float)(WORD1(qword_1009A35A0) & 0x7FFF) / 32767.0) * 4.0; v2.f32[0] = _mm_round_ss(v2, v2, 9).f32[0]; result = 1464; if ( (unsigned int)(int)v2.f32[0] < 3 ) return (int)v2.f32[0] + 1461; } return result; } qword_1009A35A0 = 214013 * qword_1009A35A0 + 2531011; v2.f32[0] = (float)((float)(WORD1(qword_1009A35A0) & 0x7FFF) / 32767.0) + (float)((float)(WORD1(qword_1009A35A0) & 0x7FFF) / 32767.0); v3 = (int)_mm_round_ss(v2, v2, 9).f32[0] == 0; v4 = 870; return v4 - v3; } switch ( a1 ) { case 2838: qword_1009A35A0 = 214013 * qword_1009A35A0 + 2531011; v2.f32[0] = (float)((float)(WORD1(qword_1009A35A0) & 0x7FFF) / 32767.0) + (float)((float)(WORD1(qword_1009A35A0) & 0x7FFF) / 32767.0); return 2 * ((int)_mm_round_ss(v2, v2, 9).f32[0] != 0) + 2838; case 2703: qword_1009A35A0 = 214013 * qword_1009A35A0 + 2531011; v2.f32[0] = (float)((float)(WORD1(qword_1009A35A0) & 0x7FFF) / 32767.0) + (float)((float)(WORD1(qword_1009A35A0) & 0x7FFF) / 32767.0); v3 = (int)_mm_round_ss(v2, v2, 9).f32[0] == 0; v4 = 2704; return v4 - v3; case 1861: qword_1009A35A0 = 214013 * qword_1009A35A0 + 2531011; v2.f32[0] = (float)((float)(WORD1(qword_1009A35A0) & 0x7FFF) / 32767.0) * 4.0; v2.f32[0] = _mm_round_ss(v2, v2, 9).f32[0]; result = 1864; if ( (unsigned int)(int)v2.f32[0] < 3 ) return (int)v2.f32[0] + 1861; break; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source