{"type": "func", "start": 4295022592, "end": 4295022956, "name": "EditorUI::getSpriteButton", "pseudocode": "// \n// EditorUI::getSpriteButton from 0x10000d800 to 0x10000d96c (364 bytes)\n// \n// 5 xrefs:\n// > EditorUI::getSpriteButton_1 @ 0x100007f39\n// > EditorUI::createDpadMoveMenu @ 0x10063abcc\n// > EditorUI::setupDeleteMenu @ 0x10063b5a9\n// > EditorUI::setupDeleteMenu @ 0x10063b6b7\n// > EditorUI::setupDeleteMenu @ 0x10063b987\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 12:18:50 +0000\n// \n\nfloat *__fastcall EditorUI::getSpriteButton(\n        __int64 a1,\n        _QWORD *a2,\n        __int64 a3,\n        __int64 a4,\n        __int64 a5,\n        int a6,\n        float a7,\n        float a8,\n        __int64 a9)\n{\n  unsigned int v13; // r9d\n  const char *v14; // r13\n  float v15; // xmm1_4\n  _QWORD *v16; // rdi\n  __int64 v17; // rsi\n  const char *v18; // r8\n  __int64 v19; // r9\n  __int64 v20; // rax\n  __int64 v21; // rax\n  __m128 v22; // xmm2\n  __int64 v23; // r14\n  float *v24; // r15\n  unsigned __int64 v27; // [rsp+8h] [rbp-38h] BYREF\n  float v28; // [rsp+10h] [rbp-30h]\n  float v29; // [rsp+14h] [rbp-2Ch]\n\n  v29 = a7;\n  v13 = a6 - 2;\n  if ( v13 > 4 )\n  {\n    v14 = \"GJ_button_01.png\";\n    if ( a8 <= 0.0 )\n      goto LABEL_3;\n  }\n  else\n  {\n    v14 = off_100AB5540[v13];\n    if ( a8 <= 0.0 )\n    {\nLABEL_3:\n      v15 = 1.0;\n      v16 = a2;\n      v17 = 32;\n      v18 = v14;\n      v19 = 1;\n      goto LABEL_6;\n    }\n  }\n  v20 = *a2;\n  v28 = a8;\n  v21 = (*(__int64 (__fastcall **)(_QWORD *))(v20 + 328))(a2);\n  sub_100278630(&v27, v21);\n  v22 = _mm_div_ps((__m128)xmmword_100A03860, (__m128)v27);\n  v15 = fminf(fminf(_mm_movehdup_ps(v22).f32[0], v22.f32[0]), 1.0);\n  v17 = (unsigned int)(int)(float)(v28 + -8.0);\n  v16 = a2;\n  v18 = v14;\n  v19 = 0;\nLABEL_6:\n  v23 = ButtonSprite::create(v16, v17, 0, 1, v18, v19, 32.0, v15, 0.0);\n  v24 = (float *)CCMenuItemSpriteExtra::create(v23, 0, a1, a3, a4);\n  (*(void (__fastcall **)(float *, float))(*(_QWORD *)v24 + 160LL))(v24, v29);\n  v24[101] = v29;\n  if ( a5 )\n    (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)a5 + 456LL))(a5, v24);\n  sub_1002782D0(&v27, a9);\n  ButtonSprite::updateSpriteOffset(v23, &v27);\n  return v24;\n}", "assembly": "; \n; EditorUI::getSpriteButton from 0x10000d800 to 0x10000d96c (364 bytes)\n; \n; 5 xrefs:\n; > EditorUI::getSpriteButton_1 @ 0x100007f39\n; > EditorUI::createDpadMoveMenu @ 0x10063abcc\n; > EditorUI::setupDeleteMenu @ 0x10063b5a9\n; > EditorUI::setupDeleteMenu @ 0x10063b6b7\n; > EditorUI::setupDeleteMenu @ 0x10063b987\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 12:18:50 +0000\n; \npush    rbp                                                            ; +0x0, 0x10000d800\nmov     rbp, rsp                                                       ; +0x1, 0x10000d801\npush    r15                                                            ; +0x4, 0x10000d804\npush    r14                                                            ; +0x6, 0x10000d806\npush    r13                                                            ; +0x8, 0x10000d808\npush    r12                                                            ; +0xa, 0x10000d80a\npush    rbx                                                            ; +0xc, 0x10000d80c\nsub     rsp, 18h                                                       ; +0xd, 0x10000d80d\nmovss   [rbp+var_2C], xmm0                                             ; +0x11, 0x10000d811\nmov     rbx, r8                                                        ; +0x16, 0x10000d816\nmov     [rbp+var_40], rcx                                              ; +0x19, 0x10000d819\nmov     r15, rdx                                                       ; +0x1d, 0x10000d81d\nmov     r14, rsi                                                       ; +0x20, 0x10000d820\nmov     r12, rdi                                                       ; +0x23, 0x10000d823\nadd     r9d, 0FFFFFFFEh                                                ; +0x26, 0x10000d826\ncmp     r9d, 4                                                         ; +0x2a, 0x10000d82a\nja      short loc_10000D873                                            ; +0x2e, 0x10000d82e\nmov     eax, r9d                                                       ; +0x30, 0x10000d830\nlea     rcx, off_100AB5540; \"GJ_button_02.png\"                         ; +0x33, 0x10000d833\nmov     r13, [rcx+rax*8]                                               ; +0x3a, 0x10000d83a\nxorps   xmm0, xmm0                                                     ; +0x3e, 0x10000d83e\nucomiss xmm1, xmm0                                                     ; +0x41, 0x10000d841\nja      short loc_10000D882                                            ; +0x44, 0x10000d844\nmovss   xmm0, cs:dword_100A0376C                                       ; +0x46, 0x10000d846\nmovss   xmm1, cs:alpha                                                 ; +0x4e, 0x10000d84e\nxorps   xmm2, xmm2                                                     ; +0x56, 0x10000d856\nmov     rdi, r14                                                       ; +0x59, 0x10000d859\nmov     esi, 20h ; ' '                                                 ; +0x5c, 0x10000d85c\nxor     edx, edx                                                       ; +0x61, 0x10000d861\nmov     ecx, 1                                                         ; +0x63, 0x10000d863\nmov     r8, r13                                                        ; +0x68, 0x10000d868\nmov     r9d, 1                                                         ; +0x6b, 0x10000d86b\njmp     short loc_10000D8EA                                            ; +0x71, 0x10000d871\nlea     r13, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x73, 0x10000d873\nxorps   xmm0, xmm0                                                     ; +0x7a, 0x10000d87a\nucomiss xmm1, xmm0                                                     ; +0x7d, 0x10000d87d\njbe     short loc_10000D846                                            ; +0x80, 0x10000d880\nmov     rax, [r14]                                                     ; +0x82, 0x10000d882\nmov     rdi, r14                                                       ; +0x85, 0x10000d885\nmovss   [rbp+var_30], xmm1                                             ; +0x88, 0x10000d888\ncall    qword ptr [rax+148h]                                           ; +0x8d, 0x10000d88d\nlea     rdi, [rbp+var_38]                                              ; +0x93, 0x10000d893\nmov     rsi, rax                                                       ; +0x97, 0x10000d897\ncall    sub_100278630                                                  ; +0x9a, 0x10000d89a\nmovsd   xmm0, [rbp+var_38]                                             ; +0x9f, 0x10000d89f\nmovaps  xmm2, cs:xmmword_100A03860                                     ; +0xa4, 0x10000d8a4\ndivps   xmm2, xmm0                                                     ; +0xab, 0x10000d8ab\nmovshdup xmm1, xmm2                                                    ; +0xae, 0x10000d8ae\nminss   xmm1, xmm2                                                     ; +0xb2, 0x10000d8b2\nminss   xmm1, cs:alpha                                                 ; +0xb6, 0x10000d8b6\nmovss   xmm0, [rbp+var_30]                                             ; +0xbe, 0x10000d8be\naddss   xmm0, cs:dword_100A03810                                       ; +0xc3, 0x10000d8c3\ncvttss2si esi, xmm0                                                    ; +0xcb, 0x10000d8cb\nmovss   xmm0, cs:dword_100A0376C                                       ; +0xcf, 0x10000d8cf\nxorps   xmm2, xmm2                                                     ; +0xd7, 0x10000d8d7\nmov     rdi, r14                                                       ; +0xda, 0x10000d8da\nxor     edx, edx                                                       ; +0xdd, 0x10000d8dd\nmov     ecx, 1                                                         ; +0xdf, 0x10000d8df\nmov     r8, r13                                                        ; +0xe4, 0x10000d8e4\nxor     r9d, r9d                                                       ; +0xe7, 0x10000d8e7\ncall    ButtonSprite__create                                           ; +0xea, 0x10000d8ea\nmov     r14, rax                                                       ; +0xef, 0x10000d8ef\nmov     r13, [rbp+arg_0]                                               ; +0xf2, 0x10000d8f2\nmov     rdi, rax                                                       ; +0xf6, 0x10000d8f6\nxor     esi, esi                                                       ; +0xf9, 0x10000d8f9\nmov     rdx, r12                                                       ; +0xfb, 0x10000d8fb\nmov     rcx, r15                                                       ; +0xfe, 0x10000d8fe\nmov     r8, [rbp+var_40]                                               ; +0x101, 0x10000d901\ncall    CCMenuItemSpriteExtra__create                                  ; +0x105, 0x10000d905\nmov     r15, rax                                                       ; +0x10a, 0x10000d90a\nmov     rax, [rax]                                                     ; +0x10d, 0x10000d90d\nmov     rdi, r15                                                       ; +0x110, 0x10000d910\nmovss   xmm0, [rbp+var_2C]                                             ; +0x113, 0x10000d913\ncall    qword ptr [rax+0A0h]                                           ; +0x118, 0x10000d918\nmovss   xmm0, [rbp+var_2C]                                             ; +0x11e, 0x10000d91e\nmovss   dword ptr [r15+194h], xmm0                                     ; +0x123, 0x10000d923\ntest    rbx, rbx                                                       ; +0x12c, 0x10000d92c\njz      short loc_10000D940                                            ; +0x12f, 0x10000d92f\nmov     rax, [rbx]                                                     ; +0x131, 0x10000d931\nmov     rdi, rbx                                                       ; +0x134, 0x10000d934\nmov     rsi, r15                                                       ; +0x137, 0x10000d937\ncall    qword ptr [rax+1C8h]                                           ; +0x13a, 0x10000d93a\nlea     rbx, [rbp+var_38]                                              ; +0x140, 0x10000d940\nmov     rdi, rbx                                                       ; +0x144, 0x10000d944\nmov     rsi, r13                                                       ; +0x147, 0x10000d947\ncall    sub_1002782D0                                                  ; +0x14a, 0x10000d94a\nmov     rdi, r14                                                       ; +0x14f, 0x10000d94f\nmov     rsi, rbx                                                       ; +0x152, 0x10000d952\ncall    ButtonSprite__updateSpriteOffset                               ; +0x155, 0x10000d955\nmov     rax, r15                                                       ; +0x15a, 0x10000d95a\nadd     rsp, 18h                                                       ; +0x15d, 0x10000d95d\npop     rbx                                                            ; +0x161, 0x10000d961\npop     r12                                                            ; +0x162, 0x10000d962\npop     r13                                                            ; +0x164, 0x10000d964\npop     r14                                                            ; +0x166, 0x10000d966\npop     r15                                                            ; +0x168, 0x10000d968\npop     rbp                                                            ; +0x16a, 0x10000d96a\nretn                                                                   ; +0x16b, 0x10000d96b", "xrefs": ["EditorUI::getSpriteButton_1 @ 0x100007f39", "EditorUI::createDpadMoveMenu @ 0x10063abcc", "EditorUI::setupDeleteMenu @ 0x10063b5a9", "EditorUI::setupDeleteMenu @ 0x10063b6b7", "EditorUI::setupDeleteMenu @ 0x10063b987"], "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"}