{"type": "func", "start": 4295333664, "end": 4295334332, "name": "ButtonSprite::init", "pseudocode": "// \n// ButtonSprite::init from 0x100059720 to 0x1000599bc (668 bytes)\n// \n// 1 xrefs:\n// > ButtonSprite::create @ 0x1000596bb\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:19:39 +0000\n// \n\n__int64 __fastcall ButtonSprite::init(\n        __int64 a1,\n        __int64 a2,\n        int a3,\n        int a4,\n        char a5,\n        __int64 a6,\n        float a7,\n        float a8,\n        float a9,\n        char a10)\n{\n  __int64 result; // rax\n  __int64 v14; // rax\n  __int64 v15; // r14\n  float v16; // xmm0_4\n  __int64 *v17; // r14\n  __int64 v18; // rax\n  float *v19; // rax\n  float v20; // xmm0_4\n  __int64 v21; // rax\n  float v22; // xmm0_4\n  __int64 v23; // r14\n  __int64 v24; // rax\n  __int64 v25; // r14\n  double v26; // xmm0_8\n  _BYTE v27[16]; // [rsp+0h] [rbp-50h] BYREF\n  float v28; // [rsp+10h] [rbp-40h]\n  float v29; // [rsp+14h] [rbp-3Ch]\n  __int64 v30; // [rsp+18h] [rbp-38h]\n  float v31; // [rsp+20h] [rbp-30h]\n  unsigned __int8 v32; // [rsp+27h] [rbp-29h]\n\n  v28 = a9;\n  v30 = a6;\n  v29 = a8;\n  v31 = a7;\n  result = cocos2d::CCSprite::init();\n  if ( !(_BYTE)result )\n    return result;\n  v32 = result;\n  *(_DWORD *)(a1 + 596) = 0;\n  *(float *)(a1 + 600) = (float)a3;\n  *(float *)(a1 + 604) = (float)a4;\n  *(float *)(a1 + 608) = v29;\n  *(_BYTE *)(a1 + 620) = a5;\n  *(float *)(a1 + 612) = v28;\n  *(_QWORD *)(a1 + 632) = a2;\n  (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, a2, 1);\n  if ( !a10 )\n  {\n    sub_100278270(v27, 0.0, 0.0, COERCE_DOUBLE(1109393408), COERCE_DOUBLE(1109393408));\n    v15 = cocos2d::extension::CCScale9Sprite::create_2(v30, v27);\n    *(_QWORD *)(a1 + 648) = v15;\n    sub_100278260(v27, COERCE_DOUBLE(1098907648), COERCE_DOUBLE(1098907648));\n    (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v15 + 320LL))(v15, v27);\n    (*(void (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 648), 0);\n    if ( *(float *)(a1 + 600) <= 0.0 )\n      goto LABEL_8;\nLABEL_6:\n    v16 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 632) + 328LL))(*(_QWORD *)(a1 + 632));\n    if ( v16 > *(float *)(a1 + 600) )\n    {\n      v17 = *(__int64 **)(a1 + 632);\n      v18 = *v17;\n      LODWORD(v30) = *(_DWORD *)(a1 + 600);\n      v19 = (float *)(*(__int64 (__fastcall **)(__int64 *, float, double))(v18 + 328))(v17, v16, 0.0);\n      (*(void (__fastcall **)(__int64 *, float))(*v17 + 160))(v17, *(float *)&v30 / *v19);\n    }\n    goto LABEL_8;\n  }\n  v14 = cocos2d::CCSprite::create_1(v30);\n  *(_QWORD *)(a1 + 640) = v14;\n  (*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, v14, 0);\n  if ( *(float *)(a1 + 600) > 0.0 )\n    goto LABEL_6;\nLABEL_8:\n  if ( v31 > 0.0 )\n  {\n    v20 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 632) + 328LL))(*(_QWORD *)(a1 + 632)) + 4);\n    if ( v20 > v31 )\n    {\n      v21 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 632) + 328LL))(*(_QWORD *)(a1 + 632));\n      *(float *)&v30 = v31 / *(float *)(v21 + 4);\n      v22 = (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 632) + 168LL))(*(_QWORD *)(a1 + 632));\n      if ( v22 > *(float *)&v30 )\n      {\n        v23 = *(_QWORD *)(a1 + 632);\n        v24 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 328LL))(v23);\n        (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v23 + 160LL))(v23, v31 / *(float *)(v24 + 4));\n      }\n    }\n  }\n  v25 = *(_QWORD *)(a1 + 632);\n  v26 = (*(double (__fastcall **)(__int64))(*(_QWORD *)v25 + 168LL))(v25);\n  if ( *(float *)&v26 <= *(float *)(a1 + 608) )\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 632) + 168LL))(*(_QWORD *)(a1 + 632));\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v25 + 160LL))(v25);\n  ButtonSprite::updateSpriteBGSize(a1);\n  return v32;\n}", "assembly": "; \n; ButtonSprite::init from 0x100059720 to 0x1000599bc (668 bytes)\n; \n; 1 xrefs:\n; > ButtonSprite::create @ 0x1000596bb\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:19:39 +0000\n; \npush    rbp                                                            ; +0x0, 0x100059720\nmov     rbp, rsp                                                       ; +0x1, 0x100059721\npush    r15                                                            ; +0x4, 0x100059724\npush    r14                                                            ; +0x6, 0x100059726\npush    r13                                                            ; +0x8, 0x100059728\npush    r12                                                            ; +0xa, 0x10005972a\npush    rbx                                                            ; +0xc, 0x10005972c\nsub     rsp, 28h                                                       ; +0xd, 0x10005972d\nmovss   [rbp+var_40], xmm2                                             ; +0x11, 0x100059731\nmov     [rbp+var_38], r9                                               ; +0x16, 0x100059736\nmov     r12d, r8d                                                      ; +0x1a, 0x10005973a\nmovss   [rbp+var_3C], xmm1                                             ; +0x1d, 0x10005973d\nmovss   [rbp+var_30], xmm0                                             ; +0x22, 0x100059742\nmov     r13d, ecx                                                      ; +0x27, 0x100059747\nmov     r14d, edx                                                      ; +0x2a, 0x10005974a\nmov     r15, rsi                                                       ; +0x2d, 0x10005974d\nmov     rbx, rdi                                                       ; +0x30, 0x100059750\ncall    cocos2d__CCSprite__init                                        ; +0x33, 0x100059753\ntest    al, al                                                         ; +0x38, 0x100059758\njz      loc_1000599AD                                                  ; +0x3a, 0x10005975a\nmov     [rbp+var_29], al                                               ; +0x40, 0x100059760\nxorps   xmm0, xmm0                                                     ; +0x43, 0x100059763\ncvtsi2ss xmm0, r14d                                                    ; +0x46, 0x100059766\nmov     dword ptr [rbx+254h], 0                                        ; +0x4b, 0x10005976b\nxorps   xmm1, xmm1                                                     ; +0x55, 0x100059775\ncvtsi2ss xmm1, r13d                                                    ; +0x58, 0x100059778\nmovss   dword ptr [rbx+258h], xmm0                                     ; +0x5d, 0x10005977d\nmovzx   r14d, [rbp+arg_0]                                              ; +0x65, 0x100059785\nmovss   dword ptr [rbx+25Ch], xmm1                                     ; +0x6a, 0x10005978a\nmovss   xmm0, [rbp+var_3C]                                             ; +0x72, 0x100059792\nmovss   dword ptr [rbx+260h], xmm0                                     ; +0x77, 0x100059797\nmov     [rbx+26Ch], r12b                                               ; +0x7f, 0x10005979f\nmovss   xmm0, [rbp+var_40]                                             ; +0x86, 0x1000597a6\nmovss   dword ptr [rbx+264h], xmm0                                     ; +0x8b, 0x1000597ab\nmov     [rbx+278h], r15                                                ; +0x93, 0x1000597b3\nmov     rax, [rbx]                                                     ; +0x9a, 0x1000597ba\nmov     rdi, rbx                                                       ; +0x9d, 0x1000597bd\nmov     rsi, r15                                                       ; +0xa0, 0x1000597c0\nmov     edx, 1                                                         ; +0xa3, 0x1000597c3\ncall    qword ptr [rax+1D0h]                                           ; +0xa8, 0x1000597c8\ntest    r14b, r14b                                                     ; +0xae, 0x1000597ce\njz      short loc_10005980D                                            ; +0xb1, 0x1000597d1\nmov     rdi, [rbp+var_38]                                              ; +0xb3, 0x1000597d3\ncall    cocos2d__CCSprite__create_1                                    ; +0xb7, 0x1000597d7\nmov     [rbx+280h], rax                                                ; +0xbc, 0x1000597dc\nmov     rcx, [rbx]                                                     ; +0xc3, 0x1000597e3\nmov     rdi, rbx                                                       ; +0xc6, 0x1000597e6\nmov     rsi, rax                                                       ; +0xc9, 0x1000597e9\nxor     edx, edx                                                       ; +0xcc, 0x1000597ec\ncall    qword ptr [rcx+1D0h]                                           ; +0xce, 0x1000597ee\nmovss   xmm0, dword ptr [rbx+258h]                                     ; +0xd4, 0x1000597f4\nxorps   xmm1, xmm1                                                     ; +0xdc, 0x1000597fc\nucomiss xmm0, xmm1                                                     ; +0xdf, 0x1000597ff\nja      loc_10005988B                                                  ; +0xe2, 0x100059802\njmp     loc_1000598DF                                                  ; +0xe8, 0x100059808\nlea     r14, [rbp+var_50]                                              ; +0xed, 0x10005980d\nmovss   xmm2, cs:dword_100A035D0                                       ; +0xf1, 0x100059811\nxorps   xmm0, xmm0                                                     ; +0xf9, 0x100059819\nxorps   xmm1, xmm1                                                     ; +0xfc, 0x10005981c\nmov     rdi, r14                                                       ; +0xff, 0x10005981f\nmovaps  xmm3, xmm2                                                     ; +0x102, 0x100059822\ncall    sub_100278270                                                  ; +0x105, 0x100059825\nmov     rdi, [rbp+var_38]                                              ; +0x10a, 0x10005982a\nmov     rsi, r14                                                       ; +0x10e, 0x10005982e\ncall    cocos2d__extension__CCScale9Sprite__create_2                   ; +0x111, 0x100059831\nmov     r14, rax                                                       ; +0x116, 0x100059836\nmov     [rbx+288h], rax                                                ; +0x119, 0x100059839\nlea     r15, [rbp+var_50]                                              ; +0x120, 0x100059840\nmovss   xmm0, cs:dword_100A03D60                                       ; +0x124, 0x100059844\nmov     rdi, r15                                                       ; +0x12c, 0x10005984c\nmovaps  xmm1, xmm0                                                     ; +0x12f, 0x10005984f\ncall    sub_100278260                                                  ; +0x132, 0x100059852\nmov     rax, [r14]                                                     ; +0x137, 0x100059857\nmov     rdi, r14                                                       ; +0x13a, 0x10005985a\nmov     rsi, r15                                                       ; +0x13d, 0x10005985d\ncall    qword ptr [rax+140h]                                           ; +0x140, 0x100059860\nmov     rsi, [rbx+288h]                                                ; +0x146, 0x100059866\nmov     rax, [rbx]                                                     ; +0x14d, 0x10005986d\nmov     rdi, rbx                                                       ; +0x150, 0x100059870\nxor     edx, edx                                                       ; +0x153, 0x100059873\ncall    qword ptr [rax+1D0h]                                           ; +0x155, 0x100059875\nmovss   xmm0, dword ptr [rbx+258h]                                     ; +0x15b, 0x10005987b\nxorps   xmm1, xmm1                                                     ; +0x163, 0x100059883\nucomiss xmm0, xmm1                                                     ; +0x166, 0x100059886\njbe     short loc_1000598DF                                            ; +0x169, 0x100059889\nmov     rdi, [rbx+278h]                                                ; +0x16b, 0x10005988b\nmov     rax, [rdi]                                                     ; +0x172, 0x100059892\ncall    qword ptr [rax+148h]                                           ; +0x175, 0x100059895\nxorps   xmm1, xmm1                                                     ; +0x17b, 0x10005989b\nmovss   xmm0, dword ptr [rax]                                          ; +0x17e, 0x10005989e\nmovss   xmm2, dword ptr [rbx+258h]                                     ; +0x182, 0x1000598a2\nucomiss xmm0, xmm2                                                     ; +0x18a, 0x1000598aa\njbe     short loc_1000598DF                                            ; +0x18d, 0x1000598ad\nmov     r14, [rbx+278h]                                                ; +0x18f, 0x1000598af\nmov     rax, [r14]                                                     ; +0x196, 0x1000598b6\nmov     rdi, r14                                                       ; +0x199, 0x1000598b9\nmovss   dword ptr [rbp+var_38], xmm2                                   ; +0x19c, 0x1000598bc\ncall    qword ptr [rax+148h]                                           ; +0x1a1, 0x1000598c1\nmovss   xmm0, dword ptr [rbp+var_38]                                   ; +0x1a7, 0x1000598c7\ndivss   xmm0, dword ptr [rax]                                          ; +0x1ac, 0x1000598cc\nmov     rax, [r14]                                                     ; +0x1b0, 0x1000598d0\nmov     rdi, r14                                                       ; +0x1b3, 0x1000598d3\ncall    qword ptr [rax+0A0h]                                           ; +0x1b6, 0x1000598d6\nxorps   xmm1, xmm1                                                     ; +0x1bc, 0x1000598dc\nmovss   xmm0, [rbp+var_30]                                             ; +0x1bf, 0x1000598df\nucomiss xmm0, xmm1                                                     ; +0x1c4, 0x1000598e4\njbe     short loc_100059962                                            ; +0x1c7, 0x1000598e7\nmov     rdi, [rbx+278h]                                                ; +0x1c9, 0x1000598e9\nmov     rax, [rdi]                                                     ; +0x1d0, 0x1000598f0\ncall    qword ptr [rax+148h]                                           ; +0x1d3, 0x1000598f3\nmovss   xmm0, dword ptr [rax+4]                                        ; +0x1d9, 0x1000598f9\nucomiss xmm0, [rbp+var_30]                                             ; +0x1de, 0x1000598fe\njbe     short loc_100059962                                            ; +0x1e2, 0x100059902\nmov     rdi, [rbx+278h]                                                ; +0x1e4, 0x100059904\nmov     rax, [rdi]                                                     ; +0x1eb, 0x10005990b\ncall    qword ptr [rax+148h]                                           ; +0x1ee, 0x10005990e\nmovss   xmm0, [rbp+var_30]                                             ; +0x1f4, 0x100059914\ndivss   xmm0, dword ptr [rax+4]                                        ; +0x1f9, 0x100059919\nmovss   dword ptr [rbp+var_38], xmm0                                   ; +0x1fe, 0x10005991e\nmov     rdi, [rbx+278h]                                                ; +0x203, 0x100059923\nmov     rax, [rdi]                                                     ; +0x20a, 0x10005992a\ncall    qword ptr [rax+0A8h]                                           ; +0x20d, 0x10005992d\nucomiss xmm0, dword ptr [rbp+var_38]                                   ; +0x213, 0x100059933\njbe     short loc_100059962                                            ; +0x217, 0x100059937\nmov     r14, [rbx+278h]                                                ; +0x219, 0x100059939\nmov     rax, [r14]                                                     ; +0x220, 0x100059940\nmov     rdi, r14                                                       ; +0x223, 0x100059943\ncall    qword ptr [rax+148h]                                           ; +0x226, 0x100059946\nmovss   xmm0, [rbp+var_30]                                             ; +0x22c, 0x10005994c\ndivss   xmm0, dword ptr [rax+4]                                        ; +0x231, 0x100059951\nmov     rax, [r14]                                                     ; +0x236, 0x100059956\nmov     rdi, r14                                                       ; +0x239, 0x100059959\ncall    qword ptr [rax+0A0h]                                           ; +0x23c, 0x10005995c\nmov     r14, [rbx+278h]                                                ; +0x242, 0x100059962\nmov     rax, [r14]                                                     ; +0x249, 0x100059969\nmov     rdi, r14                                                       ; +0x24c, 0x10005996c\ncall    qword ptr [rax+0A8h]                                           ; +0x24f, 0x10005996f\nmovaps  xmm1, xmm0                                                     ; +0x255, 0x100059975\nmovss   xmm0, dword ptr [rbx+260h]                                     ; +0x258, 0x100059978\nucomiss xmm1, xmm0                                                     ; +0x260, 0x100059980\nja      short loc_100059995                                            ; +0x263, 0x100059983\nmov     rdi, [rbx+278h]                                                ; +0x265, 0x100059985\nmov     rax, [rdi]                                                     ; +0x26c, 0x10005998c\ncall    qword ptr [rax+0A8h]                                           ; +0x26f, 0x10005998f\nmov     rax, [r14]                                                     ; +0x275, 0x100059995\nmov     rdi, r14                                                       ; +0x278, 0x100059998\ncall    qword ptr [rax+0A0h]                                           ; +0x27b, 0x10005999b\nmov     rdi, rbx                                                       ; +0x281, 0x1000599a1\ncall    ButtonSprite__updateSpriteBGSize                               ; +0x284, 0x1000599a4\nmovzx   eax, [rbp+var_29]                                              ; +0x289, 0x1000599a9\nadd     rsp, 28h                                                       ; +0x28d, 0x1000599ad\npop     rbx                                                            ; +0x291, 0x1000599b1\npop     r12                                                            ; +0x292, 0x1000599b2\npop     r13                                                            ; +0x294, 0x1000599b4\npop     r14                                                            ; +0x296, 0x1000599b6\npop     r15                                                            ; +0x298, 0x1000599b8\npop     rbp                                                            ; +0x29a, 0x1000599ba\nretn                                                                   ; +0x29b, 0x1000599bb", "xrefs": ["ButtonSprite::create @ 0x1000596bb"], "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"}