{"type": "func", "start": 4300125296, "end": 4300125565, "name": "GameToolbox::createToggleButton_1", "pseudocode": "// \n// GameToolbox::createToggleButton_1 from 0x1004eb470 to 0x1004eb57d (269 bytes)\n// \n// 3 xrefs:\n// > LevelSettingsLayer::init @ 0x100256f52\n// > sub_1008FB260 @ 0x1008fb836\n// > sub_1008FB260 @ 0x1008fb8f6\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:31:22 +0000\n// \n\n__int64 __fastcall GameToolbox::createToggleButton_1(\n        __int128 *a1,\n        int a2,\n        int a3,\n        unsigned __int8 a4,\n        __int64 a5,\n        _QWORD *a6,\n        __int64 a7,\n        __int64 a8,\n        __int64 a9)\n{\n  __int64 result; // rax\n  __int64 v13; // rbx\n  __int64 v14; // [rsp+40h] [rbp-60h] BYREF\n  __int64 v15; // [rsp+48h] [rbp-58h] BYREF\n  __int64 v16; // [rsp+50h] [rbp-50h] BYREF\n  __int64 v17; // [rsp+58h] [rbp-48h]\n  __int128 v18; // [rsp+60h] [rbp-40h] BYREF\n  void *__p; // [rsp+70h] [rbp-30h]\n\n  v17 = a5;\n  sub_100278250((float *)&v15, 8.0, 0.0);\n  if ( (*(_BYTE *)a1 & 1) != 0 )\n  {\n    sub_10001AD30(&v18, *((const void **)a1 + 2), *((_QWORD *)a1 + 1));\n  }\n  else\n  {\n    __p = *((void **)a1 + 2);\n    v18 = *a1;\n  }\n  sub_1002782D0(&v16, a6);\n  sub_1002782D0(&v14, &v15);\n  result = GameToolbox::createToggleButton(\n             (unsigned int)&v18,\n             a2,\n             a3,\n             a4,\n             v17,\n             (unsigned int)&v16,\n             a7,\n             a8,\n             (__int64)&v14,\n             (__int64)\"bigFont.fnt\",\n             0,\n             0,\n             a9);\n  if ( (v18 & 1) != 0 )\n  {\n    v13 = result;\n    operator delete(__p);\n    return v13;\n  }\n  return result;\n}", "assembly": "; \n; GameToolbox::createToggleButton_1 from 0x1004eb470 to 0x1004eb57d (269 bytes)\n; \n; 3 xrefs:\n; > LevelSettingsLayer::init @ 0x100256f52\n; > sub_1008FB260 @ 0x1008fb836\n; > sub_1008FB260 @ 0x1008fb8f6\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:31:22 +0000\n; \npush    rbp                                                            ; +0x0, 0x1004eb470\nmov     rbp, rsp                                                       ; +0x1, 0x1004eb471\npush    r15                                                            ; +0x4, 0x1004eb474\npush    r14                                                            ; +0x6, 0x1004eb476\npush    r13                                                            ; +0x8, 0x1004eb478\npush    r12                                                            ; +0xa, 0x1004eb47a\npush    rbx                                                            ; +0xc, 0x1004eb47c\nsub     rsp, 78h                                                       ; +0xd, 0x1004eb47d\nmov     r13, r9                                                        ; +0x11, 0x1004eb481\nmov     [rbp+var_48], r8                                               ; +0x14, 0x1004eb484\nmov     r12d, ecx                                                      ; +0x18, 0x1004eb488\nmov     r14, rdx                                                       ; +0x1b, 0x1004eb48b\nmov     r15, rsi                                                       ; +0x1e, 0x1004eb48e\nmov     rbx, rdi                                                       ; +0x21, 0x1004eb491\nlea     rdi, [rbp+var_58]                                              ; +0x24, 0x1004eb494\nmovss   xmm0, cs:dword_100A03D64                                       ; +0x28, 0x1004eb498\nxorps   xmm1, xmm1                                                     ; +0x30, 0x1004eb4a0\ncall    sub_100278250                                                  ; +0x33, 0x1004eb4a3\ntest    byte ptr [rbx], 1                                              ; +0x38, 0x1004eb4a8\njnz     short loc_1004EB4BE                                            ; +0x3b, 0x1004eb4ab\nmov     rax, [rbx+10h]                                                 ; +0x3d, 0x1004eb4ad\nmov     [rbp+__p], rax                                                 ; +0x41, 0x1004eb4b1\nmovups  xmm0, xmmword ptr [rbx]                                        ; +0x45, 0x1004eb4b5\nmovaps  [rbp+var_40], xmm0                                             ; +0x48, 0x1004eb4b8\njmp     short loc_1004EB4CF                                            ; +0x4c, 0x1004eb4bc\nmov     rdx, [rbx+8]                                                   ; +0x4e, 0x1004eb4be\nmov     rsi, [rbx+10h]                                                 ; +0x52, 0x1004eb4c2\nlea     rdi, [rbp+var_40]                                              ; +0x56, 0x1004eb4c6\ncall    sub_10001AD30                                                  ; +0x5a, 0x1004eb4ca\nlea     rdi, [rbp+var_50]                                              ; +0x5f, 0x1004eb4cf\nmov     rsi, r13                                                       ; +0x63, 0x1004eb4d3\ncall    sub_1002782D0                                                  ; +0x66, 0x1004eb4d6\nlea     rbx, [rbp+var_60]                                              ; +0x6b, 0x1004eb4db\nlea     rsi, [rbp+var_58]                                              ; +0x6f, 0x1004eb4df\nmov     rdi, rbx                                                       ; +0x73, 0x1004eb4e3\ncall    sub_1002782D0                                                  ; +0x76, 0x1004eb4e6\nmov     rax, [rbp+arg_10]                                              ; +0x7b, 0x1004eb4eb\nmov     rcx, [rbp+arg_8]                                               ; +0x7f, 0x1004eb4ef\nmov     rdx, [rbp+arg_0]                                               ; +0x83, 0x1004eb4f3\nmov     [rsp+0A0h+var_70], rax                                         ; +0x87, 0x1004eb4f7\nlea     rax, aBigfontFnt; \"bigFont.fnt\"                                ; +0x8c, 0x1004eb4fc\nmov     [rsp+0A0h+var_88], rax                                         ; +0x93, 0x1004eb503\nmov     [rsp+0A0h+var_90], rbx                                         ; +0x98, 0x1004eb508\nmov     [rsp+0A0h+var_98], rcx                                         ; +0x9d, 0x1004eb50d\nmov     [rsp+0A0h+var_A0], rdx                                         ; +0xa2, 0x1004eb512\nmov     [rsp+0A0h+var_78], 0                                           ; +0xa6, 0x1004eb516\nmov     [rsp+0A0h+var_80], 0                                           ; +0xae, 0x1004eb51e\nmovzx   ecx, r12b                                                      ; +0xb6, 0x1004eb526\nlea     rdi, [rbp+var_40]                                              ; +0xba, 0x1004eb52a\nlea     r9, [rbp+var_50]                                               ; +0xbe, 0x1004eb52e\nmovss   xmm0, cs:dword_100A0374C                                       ; +0xc2, 0x1004eb532\nmovss   xmm1, cs:dword_100A03578                                       ; +0xca, 0x1004eb53a\nmovss   xmm2, cs:dword_100A035A8                                       ; +0xd2, 0x1004eb542\nmov     rsi, r15                                                       ; +0xda, 0x1004eb54a\nmov     rdx, r14                                                       ; +0xdd, 0x1004eb54d\nmov     r8, [rbp+var_48]                                               ; +0xe0, 0x1004eb550\ncall    GameToolbox__createToggleButton                                ; +0xe4, 0x1004eb554\ntest    byte ptr [rbp+var_40], 1                                       ; +0xe9, 0x1004eb559\njz      short loc_1004EB56E                                            ; +0xed, 0x1004eb55d\nmov     rdi, [rbp+__p]; __p                                            ; +0xef, 0x1004eb55f\nmov     rbx, rax                                                       ; +0xf3, 0x1004eb563\ncall    __ZdlPv; operator delete(void *)                               ; +0xf6, 0x1004eb566\nmov     rax, rbx                                                       ; +0xfb, 0x1004eb56b\nadd     rsp, 78h                                                       ; +0xfe, 0x1004eb56e\npop     rbx                                                            ; +0x102, 0x1004eb572\npop     r12                                                            ; +0x103, 0x1004eb573\npop     r13                                                            ; +0x105, 0x1004eb575\npop     r14                                                            ; +0x107, 0x1004eb577\npop     r15                                                            ; +0x109, 0x1004eb579\npop     rbp                                                            ; +0x10b, 0x1004eb57b\nretn                                                                   ; +0x10c, 0x1004eb57c", "xrefs": ["LevelSettingsLayer::init @ 0x100256f52", "sub_1008FB260 @ 0x1008fb836", "sub_1008FB260 @ 0x1008fb8f6"], "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"}