{"type": "func", "start": 5374766720, "end": 5374767013, "name": "CreateParticlePopup::onSelectColor", "pseudocode": "// \n// CreateParticlePopup::onSelectColor from 0x1405c6e80 to 0x1405c6fa5 (293 bytes)\n// \n// 3 xrefs:\n// > CreateParticlePopup::init @ 0x1405c249e\n// > CreateParticlePopup::init @ 0x1405c3291\n// > <???> @ 0x14092e2a4\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:34:51 +0000\n// \n\n__int64 __fastcall CreateParticlePopup::onSelectColor(__int64 a1, __int64 a2)\n{\n  int v4; // eax\n  __int64 v5; // rax\n  int v6; // ebx\n  __m128 *v7; // rax\n  char *v8; // rax\n  char *v9; // rdi\n  __int64 v10; // rbx\n  unsigned int v11; // eax\n  __int64 v12; // rax\n  __int64 v13; // rcx\n  __int16 v15; // [rsp+40h] [rbp+8h]\n  char v16; // [rsp+42h] [rbp+Ah]\n\n  v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  switch ( v4 )\n  {\n    case 0:\n      v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(a1 + 792) + 408LL) + 8LL))(*(_QWORD *)(a1 + 792) + 408LL);\n      LOBYTE(v6) = *(_BYTE *)(v5 + 2);\n      v15 = *(_WORD *)v5;\n      goto LABEL_9;\n    case 1:\n      v7 = (__m128 *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 712) + 1344LL))(*(_QWORD *)(a1 + 712));\nLABEL_5:\n      LOBYTE(v15) = (int)(float)(COERCE_FLOAT(*v7) * 255.0);\n      HIBYTE(v15) = (int)(float)(_mm_shuffle_ps(*v7, *v7, 85).m128_f32[0] * 255.0);\n      v6 = (int)(float)(_mm_shuffle_ps(*v7, *v7, 170).m128_f32[0] * 255.0);\n      goto LABEL_9;\n    case 2:\n      v7 = (__m128 *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 712) + 1376LL))(*(_QWORD *)(a1 + 712));\n      goto LABEL_5;\n  }\n  LOBYTE(v6) = v16;\nLABEL_9:\n  v8 = ColorAction::create();\n  *((_WORD *)v8 + 36) = v15;\n  v8[74] = v6;\n  *((_DWORD *)v8 + 23) = 0;\n  v9 = ColorSelectPopup::create(0, 0, (__int64)v8);\n  v10 = *(_QWORD *)v9;\n  v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  (*(void (__fastcall **)(char *, _QWORD))(v10 + 64))(v9, v11);\n  v12 = *(_QWORD *)v9;\n  v13 = a1 + 664;\n  if ( !a1 )\n    v13 = 0;\n  *((_QWORD *)v9 + 138) = v13;\n  return (*(__int64 (__fastcall **)(char *))(v12 + 1064))(v9);\n}", "assembly": "; \n; CreateParticlePopup::onSelectColor from 0x1405c6e80 to 0x1405c6fa5 (293 bytes)\n; \n; 3 xrefs:\n; > CreateParticlePopup::init @ 0x1405c249e\n; > CreateParticlePopup::init @ 0x1405c3291\n; > <???> @ 0x14092e2a4\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:34:51 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1405c6e80\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1405c6e85\npush    rsi                                                            ; +0xa, 0x1405c6e8a\npush    rdi                                                            ; +0xb, 0x1405c6e8b\npush    r14                                                            ; +0xc, 0x1405c6e8c\nsub     rsp, 20h                                                       ; +0xe, 0x1405c6e8e\nmov     rax, [rdx]                                                     ; +0x12, 0x1405c6e92\nmov     rbp, rcx                                                       ; +0x15, 0x1405c6e95\nmov     rcx, rdx                                                       ; +0x18, 0x1405c6e98\nmov     rsi, rdx                                                       ; +0x1b, 0x1405c6e9b\ncall    qword ptr [rax+38h]                                            ; +0x1e, 0x1405c6e9e\ntest    eax, eax                                                       ; +0x21, 0x1405c6ea1\njnz     short loc_1405C6EC7                                            ; +0x23, 0x1405c6ea3\nmov     rcx, [rbp+318h]                                                ; +0x25, 0x1405c6ea5\nadd     rcx, 198h                                                      ; +0x2c, 0x1405c6eac\nmov     rax, [rcx]                                                     ; +0x33, 0x1405c6eb3\ncall    qword ptr [rax+8]                                              ; +0x36, 0x1405c6eb6\nmovzx   ecx, word ptr [rax]                                            ; +0x39, 0x1405c6eb9\nmovzx   ebx, byte ptr [rax+2]                                          ; +0x3c, 0x1405c6ebc\nmov     [rsp+38h+arg_0], cx                                            ; +0x40, 0x1405c6ec0\njmp     short loc_1405C6F33                                            ; +0x45, 0x1405c6ec5\ncmp     eax, 1                                                         ; +0x47, 0x1405c6ec7\njnz     short loc_1405C6F17                                            ; +0x4a, 0x1405c6eca\nmov     rcx, [rbp+2C8h]                                                ; +0x4c, 0x1405c6ecc\nmov     rax, [rcx]                                                     ; +0x53, 0x1405c6ed3\ncall    qword ptr [rax+540h]                                           ; +0x56, 0x1405c6ed6\nmovups  xmm3, xmmword ptr [rax]                                        ; +0x5c, 0x1405c6edc\nmovss   xmm2, cs:dword_140835964                                       ; +0x5f, 0x1405c6edf\nmovaps  xmm0, xmm3                                                     ; +0x67, 0x1405c6ee7\nmovaps  xmm1, xmm3                                                     ; +0x6a, 0x1405c6eea\nshufps  xmm1, xmm3, 55h ; 'U'                                          ; +0x6d, 0x1405c6eed\nmulss   xmm0, xmm2                                                     ; +0x71, 0x1405c6ef1\nmulss   xmm1, xmm2                                                     ; +0x75, 0x1405c6ef5\ncvttss2si eax, xmm0                                                    ; +0x79, 0x1405c6ef9\nshufps  xmm3, xmm3, 0AAh                                               ; +0x7d, 0x1405c6efd\nmov     byte ptr [rsp+38h+arg_0], al                                   ; +0x81, 0x1405c6f01\ncvttss2si eax, xmm1                                                    ; +0x85, 0x1405c6f05\nmulss   xmm3, xmm2                                                     ; +0x89, 0x1405c6f09\nmov     byte ptr [rsp+38h+arg_0+1], al                                 ; +0x8d, 0x1405c6f0d\ncvttss2si ebx, xmm3                                                    ; +0x91, 0x1405c6f11\njmp     short loc_1405C6F33                                            ; +0x95, 0x1405c6f15\ncmp     eax, 2                                                         ; +0x97, 0x1405c6f17\njnz     short loc_1405C6F2E                                            ; +0x9a, 0x1405c6f1a\nmov     rcx, [rbp+2C8h]                                                ; +0x9c, 0x1405c6f1c\nmov     rax, [rcx]                                                     ; +0xa3, 0x1405c6f23\ncall    qword ptr [rax+560h]                                           ; +0xa6, 0x1405c6f26\njmp     short loc_1405C6EDC                                            ; +0xac, 0x1405c6f2c\nmovzx   ebx, [rsp+38h+arg_2]                                           ; +0xae, 0x1405c6f2e\ncall    ColorAction__create                                            ; +0xb3, 0x1405c6f33\nmovzx   ecx, [rsp+38h+arg_0]                                           ; +0xb8, 0x1405c6f38\nxor     r14d, r14d                                                     ; +0xbd, 0x1405c6f3d\nmov     r8, rax                                                        ; +0xc0, 0x1405c6f40\nxor     edx, edx                                                       ; +0xc3, 0x1405c6f43\nmov     [rax+48h], cx                                                  ; +0xc5, 0x1405c6f45\nxor     ecx, ecx                                                       ; +0xc9, 0x1405c6f49\nmov     [rax+4Ah], bl                                                  ; +0xcb, 0x1405c6f4b\nmov     [rax+5Ch], r14d                                                ; +0xce, 0x1405c6f4e\ncall    ColorSelectPopup__create                                       ; +0xd2, 0x1405c6f52\nmov     rcx, [rsi]                                                     ; +0xd7, 0x1405c6f57\nmov     rdi, rax                                                       ; +0xda, 0x1405c6f5a\nmov     rbx, [rax]                                                     ; +0xdd, 0x1405c6f5d\nmov     rdx, [rcx+38h]                                                 ; +0xe0, 0x1405c6f60\nmov     rcx, rsi                                                       ; +0xe4, 0x1405c6f64\ncall    rdx                                                            ; +0xe7, 0x1405c6f67\nmov     edx, eax                                                       ; +0xe9, 0x1405c6f69\nmov     rcx, rdi                                                       ; +0xeb, 0x1405c6f6b\ncall    qword ptr [rbx+40h]                                            ; +0xee, 0x1405c6f6e\nmov     rax, [rdi]                                                     ; +0xf1, 0x1405c6f71\nlea     rcx, [rbp+298h]                                                ; +0xf4, 0x1405c6f74\ntest    rbp, rbp                                                       ; +0xfb, 0x1405c6f7b\ncmovz   rcx, r14                                                       ; +0xfe, 0x1405c6f7e\nmov     [rdi+450h], rcx                                                ; +0x102, 0x1405c6f82\nmov     rcx, rdi                                                       ; +0x109, 0x1405c6f89\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x10c, 0x1405c6f8c\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x111, 0x1405c6f91\nadd     rsp, 20h                                                       ; +0x116, 0x1405c6f96\npop     r14                                                            ; +0x11a, 0x1405c6f9a\npop     rdi                                                            ; +0x11c, 0x1405c6f9c\npop     rsi                                                            ; +0x11d, 0x1405c6f9d\njmp     qword ptr [rax+428h]                                           ; +0x11e, 0x1405c6f9e", "xrefs": ["CreateParticlePopup::init @ 0x1405c249e", "CreateParticlePopup::init @ 0x1405c3291", "<???> @ 0x14092e2a4"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}