{"type": "func", "start": 5371930960, "end": 5371931588, "name": "SearchButton::init", "pseudocode": "// \n// SearchButton::init from 0x140312950 to 0x140312bc4 (628 bytes)\n// \n// 4 xrefs:\n// > SearchButton::create @ 0x140312907\n// > <???> @ 0x140692700\n// > <???> @ 0x140692710\n// > <???> @ 0x1406d4898\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nbool SearchButton::init(SearchButton *a1, const char *a2, const char *a3, float a4, const char *a5)\n{\n  float v5; // xmm0_4\n  bool result; // al\n  const struct cocos2d::CCSize *v9; // rax\n  cocos2d::CCLabelBMFont *v10; // rax\n  SearchButton_vtbl *v11; // r9\n  float v12; // xmm0_4\n  cocos2d::CCLabelBMFont_vtbl *v13; // rbx\n  const cocos2d::CCPoint *v14; // rax\n  cocos2d::CCSprite *v15; // rax\n  SearchButton_vtbl *v16; // r9\n  cocos2d::CCSprite *m_icon; // rbx\n  double v18; // xmm0_8\n  float v19; // xmm7_4\n  const cocos2d::CCSize *v20; // rbx\n  cocos2d::CCLabelBMFont_vtbl *v21; // rbx\n  float v22; // xmm7_4\n  float v23; // xmm6_4\n  __int64 v24; // rax\n  float v25; // xmm0_4\n  cocos2d::CCSprite_vtbl *v26; // rbx\n  const cocos2d::CCPoint *v27; // rax\n  float v28; // [rsp+20h] [rbp-48h]\n  const char *v29; // [rsp+78h] [rbp+10h] BYREF\n\n  v29 = a2;\n  result = cocos2d::CCSprite::initWithSpriteFrameName(a1, \"GJ_longBtn04_001.png\");\n  if ( result )\n  {\n    cocos2d::CCPoint::CCPoint(v5, -1.0);\n    v9 = a1->getContentSize(a1);\n    cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v29, v9);\n    v10 = cocos2d::CCLabelBMFont::create(a3, (const char *)&qword_14052A4D8);\n    v11 = a1->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    a1->m_label = v10;\n    v12 = ((float (__fastcall *)(SearchButton *, cocos2d::CCLabelBMFont *, __int64))v11->addChild_0)(a1, v10, 1);\n    v13 = a1->m_label->__vftable;\n    cocos2d::CCPoint::CCPoint(v12, (float)(*(float *)&v29 * 0.5) + v28);\n    v13->setPosition_0(a1->m_label, v14);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_label->setScale_0)(a1->m_label);\n    if ( a5 )\n    {\n      v15 = cocos2d::CCSprite::createWithSpriteFrameName(a5);\n      v16 = a1->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n      a1->m_icon = v15;\n      v16->addChild_0(a1, v15, 1);\n      ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_icon->setScale_0)(a1->m_icon);\n      m_icon = a1->m_icon;\n      v18 = ((double (__fastcall *)(cocos2d::CCSprite *))m_icon->getScale)(m_icon);\n      v19 = *(float *)&v18 * m_icon->m_obRect.size.width;\n      v20 = a1->m_label->getContentSize(a1->m_label);\n      *(float *)&v18 = (float)(a1->m_label->getScale(a1->m_label) * v20->width) + 5.0;\n      v21 = a1->m_label->__vftable;\n      v22 = v19 * 0.5;\n      v23 = (float)((float)(v22 + *(float *)&v18) + 10.0) * 0.5;\n      cocos2d::CCPoint::CCPoint(\n        *(float *)&v18 * 0.5,\n        (float)((float)((float)(*(float *)&v29 * 0.5) - v23) + (float)(*(float *)&v18 * 0.5)) + v28);\n      v25 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v21->setPosition_0)(a1->m_label, v24);\n      v26 = a1->m_icon->__vftable;\n      cocos2d::CCPoint::CCPoint(v25, (float)((float)(*(float *)&v29 * 0.5) + v23) - v22);\n      v26->setPosition_0(a1->m_icon, v27);\n    }\n    return 1;\n  }\n  return result;\n}", "assembly": "; \n; SearchButton::init from 0x140312950 to 0x140312bc4 (628 bytes)\n; \n; 4 xrefs:\n; > SearchButton::create @ 0x140312907\n; > <???> @ 0x140692700\n; > <???> @ 0x140692710\n; > <???> @ 0x1406d4898\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140312950\nmov     [rsp+arg_8], rdx                                               ; +0x5, 0x140312955\npush    rdi                                                            ; +0xa, 0x14031295a\nsub     rsp, 60h                                                       ; +0xb, 0x14031295b\nmovaps  [rsp+68h+var_18], xmm6                                         ; +0xf, 0x14031295f\nlea     rdx, aGjLongbtn04001; \"GJ_longBtn04_001.png\"                   ; +0x14, 0x140312964\nmovaps  xmm6, xmm3                                                     ; +0x1b, 0x14031296b\nmov     rbx, r8                                                        ; +0x1e, 0x14031296e\nmov     rdi, rcx                                                       ; +0x21, 0x140312971\ncall    cs:__imp_?initWithSpriteFrameName@CCSprite@cocos2d@@UEAA_NPEBD@Z; cocos2d::CCSprite::initWithSpriteFrameName(char const *) ; +0x24, 0x140312974\ntest    al, al                                                         ; +0x2a, 0x14031297a\njnz     short loc_14031298E                                            ; +0x2c, 0x14031297c\nmov     rbx, [rsp+68h+arg_0]                                           ; +0x2e, 0x14031297e\nmovaps  xmm6, [rsp+68h+var_18]                                         ; +0x33, 0x140312983\nadd     rsp, 60h                                                       ; +0x38, 0x140312988\npop     rdi                                                            ; +0x3c, 0x14031298c\nretn                                                                   ; +0x3d, 0x14031298d\nmovss   xmm2, cs:flt_140622C24                                         ; +0x3e, 0x14031298e\nlea     rcx, [rsp+68h+var_48]                                          ; +0x46, 0x140312996\nmovss   xmm1, cs:dword_1406236F0                                       ; +0x4b, 0x14031299b\nmovaps  [rsp+68h+var_38], xmm8                                         ; +0x53, 0x1403129a3\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x59, 0x1403129a9\nmov     rax, [rdi]                                                     ; +0x5f, 0x1403129af\nmov     rcx, rdi                                                       ; +0x62, 0x1403129b2\ncall    qword ptr [rax+130h]                                           ; +0x65, 0x1403129b5\nmov     rdx, rax                                                       ; +0x6b, 0x1403129bb\nlea     rcx, [rsp+68h+arg_8]                                           ; +0x6e, 0x1403129be\ncall    cs:??0CCSize@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCSize::CCSize(cocos2d::CCSize const &) ; +0x73, 0x1403129c3\nlea     rdx, qword_14052A4D8                                           ; +0x79, 0x1403129c9\nmov     rcx, rbx                                                       ; +0x80, 0x1403129d0\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x83, 0x1403129d3\nmov     r9, [rdi]                                                      ; +0x89, 0x1403129d9\nmov     r8d, 1                                                         ; +0x8c, 0x1403129dc\nmov     rdx, rax                                                       ; +0x92, 0x1403129e2\nmov     [rdi+258h], rax                                                ; +0x95, 0x1403129e5\nmov     rcx, rdi                                                       ; +0x9c, 0x1403129ec\ncall    qword ptr [r9+1B8h]                                            ; +0x9f, 0x1403129ef\nmovss   xmm2, dword ptr [rsp+68h+arg_8+4]                              ; +0xa6, 0x1403129f6\nlea     rcx, [rsp+68h+var_40]                                          ; +0xac, 0x1403129fc\nmovss   xmm1, dword ptr [rsp+68h+arg_8]                                ; +0xb1, 0x140312a01\nmovss   xmm8, cs:dword_140622B08                                       ; +0xb7, 0x140312a07\nmov     rax, [rdi+258h]                                                ; +0xc0, 0x140312a10\nmulss   xmm2, xmm8                                                     ; +0xc7, 0x140312a17\nmulss   xmm1, xmm8                                                     ; +0xcc, 0x140312a1c\nmov     rbx, [rax]                                                     ; +0xd1, 0x140312a21\naddss   xmm2, [rsp+68h+var_44]                                         ; +0xd4, 0x140312a24\naddss   xmm1, [rsp+68h+var_48]                                         ; +0xda, 0x140312a2a\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xe0, 0x140312a30\nmov     rcx, [rdi+258h]                                                ; +0xe6, 0x140312a36\nmov     rdx, rax                                                       ; +0xed, 0x140312a3d\ncall    qword ptr [rbx+0B8h]                                           ; +0xf0, 0x140312a40\nmov     rcx, [rdi+258h]                                                ; +0xf6, 0x140312a46\nmovaps  xmm1, xmm6                                                     ; +0xfd, 0x140312a4d\nmov     rax, [rcx]                                                     ; +0x100, 0x140312a50\ncall    qword ptr [rax+0A0h]                                           ; +0x103, 0x140312a53\nmov     rcx, [rsp+68h+arg_20]                                          ; +0x109, 0x140312a59\ntest    rcx, rcx                                                       ; +0x111, 0x140312a61\njz      loc_140312BAC                                                  ; +0x114, 0x140312a64\nmovaps  [rsp+68h+var_28], xmm7                                         ; +0x11a, 0x140312a6a\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x11f, 0x140312a6f\nmov     r9, [rdi]                                                      ; +0x125, 0x140312a75\nmov     r8d, 1                                                         ; +0x128, 0x140312a78\nmov     rdx, rax                                                       ; +0x12e, 0x140312a7e\nmov     [rdi+260h], rax                                                ; +0x131, 0x140312a81\nmov     rcx, rdi                                                       ; +0x138, 0x140312a88\ncall    qword ptr [r9+1B8h]                                            ; +0x13b, 0x140312a8b\nmov     rcx, [rdi+260h]                                                ; +0x142, 0x140312a92\nmovss   xmm1, cs:dword_140622C54                                       ; +0x149, 0x140312a99\nmov     rax, [rcx]                                                     ; +0x151, 0x140312aa1\ncall    qword ptr [rax+0A0h]                                           ; +0x154, 0x140312aa4\nmov     rbx, [rdi+260h]                                                ; +0x15a, 0x140312aaa\nmov     rcx, rbx                                                       ; +0x161, 0x140312ab1\nmov     rax, [rbx]                                                     ; +0x164, 0x140312ab4\ncall    qword ptr [rax+0A8h]                                           ; +0x167, 0x140312ab7\nmov     rcx, [rdi+258h]                                                ; +0x16d, 0x140312abd\nmovaps  xmm7, xmm0                                                     ; +0x174, 0x140312ac4\nmulss   xmm7, dword ptr [rbx+1B0h]                                     ; +0x177, 0x140312ac7\nmov     rax, [rcx]                                                     ; +0x17f, 0x140312acf\ncall    qword ptr [rax+130h]                                           ; +0x182, 0x140312ad2\nmov     rcx, [rdi+258h]                                                ; +0x188, 0x140312ad8\nmov     rbx, rax                                                       ; +0x18f, 0x140312adf\nmov     rdx, [rcx]                                                     ; +0x192, 0x140312ae2\ncall    qword ptr [rdx+0A8h]                                           ; +0x195, 0x140312ae5\nmovss   xmm1, dword ptr [rsp+68h+arg_8]                                ; +0x19b, 0x140312aeb\nlea     rcx, [rsp+68h+var_40]                                          ; +0x1a1, 0x140312af1\nmulss   xmm0, dword ptr [rbx]                                          ; +0x1a6, 0x140312af6\nmov     rax, [rdi+258h]                                                ; +0x1aa, 0x140312afa\nmovss   xmm2, dword ptr [rsp+68h+arg_8+4]                              ; +0x1b1, 0x140312b01\nmulss   xmm1, xmm8                                                     ; +0x1b7, 0x140312b07\naddss   xmm0, cs:flt_140623010                                         ; +0x1bc, 0x140312b0c\nmov     rbx, [rax]                                                     ; +0x1c4, 0x140312b14\nmulss   xmm7, xmm8                                                     ; +0x1c7, 0x140312b17\nmulss   xmm2, xmm8                                                     ; +0x1cc, 0x140312b1c\nmovaps  xmm6, xmm7                                                     ; +0x1d1, 0x140312b21\naddss   xmm6, xmm0                                                     ; +0x1d4, 0x140312b24\nmulss   xmm0, xmm8                                                     ; +0x1d8, 0x140312b28\naddss   xmm2, [rsp+68h+var_44]                                         ; +0x1dd, 0x140312b2d\naddss   xmm6, cs:flt_14062307C                                         ; +0x1e3, 0x140312b33\nmulss   xmm6, xmm8                                                     ; +0x1eb, 0x140312b3b\nsubss   xmm1, xmm6                                                     ; +0x1f0, 0x140312b40\naddss   xmm1, xmm0                                                     ; +0x1f4, 0x140312b44\naddss   xmm1, [rsp+68h+var_48]                                         ; +0x1f8, 0x140312b48\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1fe, 0x140312b4e\nmov     rcx, [rdi+258h]                                                ; +0x204, 0x140312b54\nmov     rdx, rax                                                       ; +0x20b, 0x140312b5b\ncall    qword ptr [rbx+0B8h]                                           ; +0x20e, 0x140312b5e\nmovss   xmm1, dword ptr [rsp+68h+arg_8]                                ; +0x214, 0x140312b64\nlea     rcx, [rsp+68h+var_40]                                          ; +0x21a, 0x140312b6a\nmovss   xmm2, dword ptr [rsp+68h+arg_8+4]                              ; +0x21f, 0x140312b6f\nmov     rax, [rdi+260h]                                                ; +0x225, 0x140312b75\nmulss   xmm1, xmm8                                                     ; +0x22c, 0x140312b7c\nmulss   xmm2, xmm8                                                     ; +0x231, 0x140312b81\nmov     rbx, [rax]                                                     ; +0x236, 0x140312b86\naddss   xmm1, xmm6                                                     ; +0x239, 0x140312b89\nsubss   xmm1, xmm7                                                     ; +0x23d, 0x140312b8d\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x241, 0x140312b91\nmov     rcx, [rdi+260h]                                                ; +0x247, 0x140312b97\nmov     rdx, rax                                                       ; +0x24e, 0x140312b9e\ncall    qword ptr [rbx+0B8h]                                           ; +0x251, 0x140312ba1\nmovaps  xmm7, [rsp+68h+var_28]                                         ; +0x257, 0x140312ba7\nmovaps  xmm8, [rsp+68h+var_38]                                         ; +0x25c, 0x140312bac\nmov     al, 1                                                          ; +0x262, 0x140312bb2\nmov     rbx, [rsp+68h+arg_0]                                           ; +0x264, 0x140312bb4\nmovaps  xmm6, [rsp+68h+var_18]                                         ; +0x269, 0x140312bb9\nadd     rsp, 60h                                                       ; +0x26e, 0x140312bbe\npop     rdi                                                            ; +0x272, 0x140312bc2\nretn                                                                   ; +0x273, 0x140312bc3", "xrefs": ["SearchButton::create @ 0x140312907", "<???> @ 0x140692700", "<???> @ 0x140692710", "<???> @ 0x1406d4898"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}