// // EditorUI::createLoop from 0x100045780 to 0x100045f78 (2040 bytes) // // 1 xrefs: // > EditorPauseLayer::onCreateLoop @ 0x100293ed3 // // 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 // void __fastcall EditorUI::createLoop(EditorUI *a1) { __int64 v1; // rsi EditorUI *v2; // rbx __int64 v3; // rax __int64 v4; // r14 GameObject *m_selectedObject; // rsi unsigned int v6; // ebx GameObject *v7; // rax unsigned int *v8; // rax void *v9; // rdi size_t v10; // rsi __int64 v11; // r12 int v12; // eax _BYTE *v13; // rbx double v14; // xmm0_8 _BYTE *v15; // rsi float *v16; // rdi __int64 v17; // r15 __int64 v18; // rax __int64 v19; // r15 __int64 v20; // rdi _BYTE *v21; // rsi unsigned int v22; // ebx __int64 v23; // r12 __int64 v24; // rdi __int64 v25; // rsi unsigned int v26; // eax __int64 v27; // r13 __int64 v28; // rax __int64 v29; // rsi float *v30; // rdi __int64 v31; // r15 __int64 v32; // r12 __int64 v33; // rax EditorUI *v34; // r14 LevelEditorLayer *m_editorLayer; // rdi std::__hash_node_base *>::__next_pointer next; // rdi std::__hash_node_base *> *v37; // rbx std::__hash_node_base *> **v38; // rdi LevelEditorLayer *v39; // r14 cocos2d::CCPoint v40; // xmm0_8 GameObject *Object; // rax EffectGameObject *v42; // rbx float m_pixelScaleX; // xmm0_4 EditorUI *v44; // r15 LevelEditorLayer *v45; // r13 __int64 v46; // rbx __m128 v47; // xmm0 int v48; // r14d unsigned int v49; // eax int v50; // r13d int v51; // eax __int64 v52; // rax __int64 v53; // rax LevelEditorLayer *v54; // rbx float v55; // xmm0_4 __int64 v56; // r12 int v57; // r13d unsigned int v58; // ebx GameObject *v59; // r12 int v60; // eax LevelEditorLayer *v61; // rdi std::__hash_node_base *>::__next_pointer v62; // rdi std::__hash_node_base *> *v63; // r15 std::__hash_node_base *> **v64; // rdi LevelEditorLayer *v65; // r12 cocos2d::CCPoint v66; // xmm0_8 GameObject *v67; // rax EffectGameObject *v68; // r12 float v69; // xmm0_4 char v70[8]; // [rsp+8h] [rbp-D8h] BYREF float v71; // [rsp+10h] [rbp-D0h] BYREF __int64 v72; // [rsp+18h] [rbp-C8h] __m128 v73; // [rsp+20h] [rbp-C0h] __int64 v74; // [rsp+30h] [rbp-B0h] int v75; // [rsp+3Ch] [rbp-A4h] int v76; // [rsp+40h] [rbp-A0h] float v77; // [rsp+44h] [rbp-9Ch] EditorUI *v78; // [rsp+48h] [rbp-98h] __m128 value; // [rsp+50h] [rbp-90h] __int64 v80; // [rsp+68h] [rbp-78h] std::unordered_set v81; // [rsp+70h] [rbp-70h] BYREF float v82[2]; // [rsp+9Ch] [rbp-44h] BYREF float v83; // [rsp+A4h] [rbp-3Ch] float v84; // [rsp+A8h] [rbp-38h] int NextFreeGroupID; // [rsp+ACh] [rbp-34h] int v86; // [rsp+B0h] [rbp-30h] float v87; // [rsp+B4h] [rbp-2Ch] v2 = a1; if ( a1->m_selectedObject || (a1 = (EditorUI *)a1->m_selectedObjects, (unsigned int)sub_100720070(a1)) ) { v3 = sub_10071F9E0(a1, v1); v4 = v3; m_selectedObject = v2->m_selectedObject; if ( m_selectedObject ) sub_10071FCD0(v3, m_selectedObject); else sub_100720050(v3, v2->m_selectedObjects); v78 = v2; if ( (unsigned int)sub_100720070(v4) ) { v6 = 0; do { while ( 1 ) { v7 = (GameObject *)sub_1007200C0(v4, v6); if ( !GameObject::isSpawnableTrigger(v7) ) break; if ( ++v6 >= (unsigned int)sub_100720070(v4) ) goto LABEL_11; } sub_100720230(v4, v6, 1); } while ( v6 < (unsigned int)sub_100720070(v4) ); } LABEL_11: v8 = *(unsigned int **)(v4 + 56); v9 = *((void **)v8 + 2); v10 = *v8; qsort(v9, v10, 8u, (int (__cdecl *)(const void *, const void *))sub_100008B30); v11 = sub_10071F9E0(v9, v10); sub_10028CC30(v70); v12 = sub_100720070(v4); value = 0; v74 = v11; if ( v12 ) { v13 = (_BYTE *)sub_1007200C0(v4, 0); (*(void (__fastcall **)(std::unordered_set *, _BYTE *))(*(_QWORD *)v13 + 1344LL))(&v81, v13); v14 = sub_10028CC90(); v13[1473] = 1; v13[1664] = 1; v15 = v13; (*(void (__fastcall **)(std::unordered_set *, _BYTE *, double))(*(_QWORD *)v13 + 1344LL))(&v81, v13, v14); value = (__m128)(unsigned __int64)v81.__table_.__bucket_list_.__ptr_.__value_; v16 = (float *)v11; if ( !(unsigned int)sub_100720070(v11) ) goto LABEL_14; v17 = sub_1007200E0(v11); v18 = sub_1007200C0(v17, 0); v87 = *(float *)&v81.__table_.__bucket_list_.__ptr_.__value_; v16 = v82; v15 = (_BYTE *)v18; (*(void (__fastcall **)(float *, __int64))(*(_QWORD *)v18 + 1344LL))(v82, v18); if ( (float)(v87 - v82[0]) <= 0.1 ) { v20 = v17; v21 = v13; } else { LABEL_14: v19 = sub_10071F9E0(v16, v15); sub_10071FCD0(v19, v13); v20 = v11; v21 = (_BYTE *)v19; } sub_10071FCD0(v20, v21); if ( (unsigned int)sub_100720070(v4) >= 2 ) { v22 = 1; do { v27 = sub_1007200C0(v4, v22); v28 = *(_QWORD *)v27; *(_BYTE *)(v27 + 1473) = 1; *(_BYTE *)(v27 + 1664) = 1; v29 = v27; (*(void (__fastcall **)(std::unordered_set *, __int64))(v28 + 1344))(&v81, v27); value = _mm_blendv_ps( value, (__m128)(unsigned __int64)v81.__table_.__bucket_list_.__ptr_.__value_, _mm_or_ps( _mm_cmplt_ps( _mm_blend_ps((__m128)(unsigned __int64)v81.__table_.__bucket_list_.__ptr_.__value_, value, 2), _mm_insert_ps(value, (__m128)(unsigned __int64)v81.__table_.__bucket_list_.__ptr_.__value_, 80)), _mm_cmpeq_ps(value, (__m128)xmmword_1008150A0))); v30 = (float *)v11; v31 = v11; if ( (unsigned int)sub_100720070(v11) && (v32 = sub_1007200E0(v11), v33 = sub_1007200C0(v32, 0), v87 = *(float *)&v81.__table_.__bucket_list_.__ptr_.__value_, v30 = v82, v29 = v33, (*(void (__fastcall **)(float *, __int64))(*(_QWORD *)v33 + 1344LL))(v82, v33), (float)(v87 - v82[0]) <= 0.1) ) { v24 = v32; v25 = v27; } else { v23 = sub_10071F9E0(v30, v29); sub_10071FCD0(v23, v27); v24 = v31; v25 = v23; } sub_10071FCD0(v24, v25); ++v22; v26 = sub_100720070(v4); v11 = v74; } while ( v22 < v26 ); } } v34 = v78; m_editorLayer = v78->m_editorLayer; memset(&v81, 0, 32); v81.__table_.__p3_.__value_ = 1.0; NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(m_editorLayer, &v81); next = v81.__table_.__p1_.__value_.__next_; if ( v81.__table_.__p1_.__value_.__next_ ) { do { v37 = next->__next_; operator delete(next); next = v37; } while ( v37 ); } v38 = v81.__table_.__bucket_list_.__ptr_.__value_; v81.__table_.__bucket_list_.__ptr_.__value_ = nullptr; if ( v38 ) operator delete(v38); v73 = _mm_movehdup_ps(value); sub_10028CBE0(v82, value.f32[0], v73.f32[0] + 90.0); v39 = v34->m_editorLayer; *(double *)&v40 = sub_10028CC60(&v81); Object = LevelEditorLayer::createObject(v39, 1268, v40, (bool)&v81); v42 = (EffectGameObject *)Object; if ( Object ) { m_pixelScaleX = Object->m_pixelScaleX; if ( m_pixelScaleX != 1.0 || Object->m_pixelScaleY != 1.0 ) { GameObject::updateCustomScaleX(Object, m_pixelScaleX); GameObject::updateCustomScaleY(v42, v42->m_pixelScaleY); } } EffectGameObject::setTargetID(v42, NextFreeGroupID); v44 = v78; LevelEditorLayer::refreshSpecial(v78->m_editorLayer, v42); v45 = v44->m_editorLayer; v87 = 0.0; sub_10028CBE0(&v81, value.f32[0], 0.0); v46 = 0; v77 = ((float (__fastcall *)(LevelEditorLayer *, std::unordered_set *, _QWORD, _QWORD, _QWORD, _QWORD))v45->timeForPos)( v45, &v81, 0, 0, 0, 0); sub_10028CC30(v82); rand(); v72 = sub_10071F9E0(v82, &v81); if ( (unsigned int)sub_100720070(v11) ) { v47 = v73; v47.f32[0] = v73.f32[0] + 60.0; v73 = v47; v48 = NextFreeGroupID; v83 = 0.0; do { v50 = sub_100720070(v11); value.i64[0] = sub_1007200C0(v11, (unsigned int)v46); v51 = sub_100720070(v11); v84 = v87; v80 = v46; if ( (unsigned int)v46 < v51 - 1 ) { v52 = sub_1007200C0(v11, (unsigned int)(v80 + 1)); v53 = sub_1007200C0(v52, 0); (*(void (__fastcall **)(std::unordered_set *, __int64))(*(_QWORD *)v53 + 1344LL))(&v81, v53); v54 = v44->m_editorLayer; sub_10028CBE0(&v81, *(float *)&v81.__table_.__bucket_list_.__ptr_.__value_, 0.0); v55 = ((float (__fastcall *)(LevelEditorLayer *, std::unordered_set *, _QWORD, _QWORD, _QWORD, _QWORD))v54->timeForPos)( v54, &v81, 0, 0, 0, 0); v84 = v55 - v77; } v56 = value.i64[0]; if ( (unsigned int)sub_100720070(value.i64[0]) ) { v57 = v50 - 1; v58 = 0; v86 = v48; v75 = v48; v76 = v57; do { v59 = (GameObject *)sub_1007200C0(v56, v58); LevelEditorLayer::addObjectToGroup(v44->m_editorLayer, v59, v48); if ( !v58 ) { v86 = NextFreeGroupID; v60 = v80; if ( (_DWORD)v80 != v57 ) { v61 = v44->m_editorLayer; memset(&v81, 0, 32); v81.__table_.__p3_.__value_ = 1.0; v86 = LevelEditorLayer::getNextFreeGroupID(v61, &v81); v62 = v81.__table_.__p1_.__value_.__next_; if ( v81.__table_.__p1_.__value_.__next_ ) { do { v63 = v62->__next_; operator delete(v62); v62 = v63; } while ( v63 ); } v64 = v81.__table_.__bucket_list_.__ptr_.__value_; v81.__table_.__bucket_list_.__ptr_.__value_ = nullptr; if ( v64 ) operator delete(v64); v44 = v78; v60 = v80; } v87 = v84; if ( v60 != v57 ) v87 = v84 - v83; ((void (__fastcall *)(float *, GameObject *))v59->getRealPosition)(&v71, v59); sub_10028CBE0(&v81, v71, v73.f32[0]); sub_10028CC90(); sub_10028CC60(&v71); v65 = v44->m_editorLayer; *(double *)&v66 = sub_10028CC60(&v81); v67 = LevelEditorLayer::createObject(v65, 1268, v66, (bool)&v81); v68 = (EffectGameObject *)v67; if ( v67 ) { v69 = v67->m_pixelScaleX; if ( v69 != 1.0 || v67->m_pixelScaleY != 1.0 ) { GameObject::updateCustomScaleX(v67, v69); GameObject::updateCustomScaleY(v68, v68->m_pixelScaleY); } } sub_10071FCD0(v72, v68); v48 = v75; LevelEditorLayer::addObjectToGroup(v44->m_editorLayer, v68, v75); EffectGameObject::setTargetID(v68, v86); v68[1].m_fScaleX = v87; v68->m_isSpawnTriggered = 1; v68->m_isMultiTriggered = 1; LevelEditorLayer::refreshSpecial(v44->m_editorLayer, v68); v83 = v83 + v87; v57 = v76; } ++v58; v56 = value.i64[0]; } while ( v58 < (unsigned int)sub_100720070(value.i64[0]) ); } else { v86 = v48; } v46 = (unsigned int)(v80 + 1); v11 = v74; v49 = sub_100720070(v74); v48 = v86; } while ( (unsigned int)v46 < v49 ); } LevelEditorLayer::dirtifyTriggers(v44->m_editorLayer); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source