{"type": "func", "start": 4295005156, "end": 4295005492, "name": "GJSmartBlockPreview::addChance", "pseudocode": "// \n// GJSmartBlockPreview::addChance from 0x1000093e4 to 0x100009534 (336 bytes)\n// \n// 2 xrefs:\n// > BrowseSmartKeyLayer::init @ 0x100072e4c\n// > BrowseSmartKeyLayer::updateChanceValues @ 0x100073a5c\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\nvoid __fastcall GJSmartBlockPreview::addChance(GJSmartBlockPreview *a1, int a2, int a3)\n{\n  __n128 v6; // q0\n  __n128 v7; // q1\n  cocos2d::CCLabelBMFont *m_infoLabel; // x22\n  cocos2d::CCString *v9; // x0\n  const char *CString; // x0\n  std::string *v11; // x1\n  std::string v12; // [xsp+18h] [xbp-38h] BYREF\n  cocos2d::CCPoint v13; // 0:kr00_8.8\n\n  GJSmartBlockPreview::createInfoLabel(a1);\n  m_infoLabel = a1->m_infoLabel;\n  if ( a3 )\n  {\n    v6.n128_u32[0] = 1110704128;\n    v7.n128_u32[0] = -15.0;\n    v13 = sub_100022980(v6, v7);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *, float, float))m_infoLabel->setPosition)(\n      m_infoLabel,\n      &v12,\n      v13.x,\n      v13.y);\n    memset(&v12, 0, sizeof(v12));\n    if ( a2 )\n    {\n      v9 = (cocos2d::CCString *)sub_100268F4C(\"%i (%.1f%%)\", a2, (float)((float)((float)a2 / (float)a3) * 100.0));\n      CString = cocos2d::CCString::getCString(v9);\n      std::string::assign(&v12, CString);\n    }\n    else\n    {\n      std::string::assign(&v12, \"0\");\n    }\n    if ( (v12.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )\n      v11 = &v12;\n    else\n      v11 = (std::string *)v12.__r_.__value_.__r.__words[0];\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, std::string *))a1->m_infoLabel->setString)(a1->m_infoLabel, v11);\n    cocos2d::CCLabelBMFont::limitLabelWidth(a1->m_infoLabel, 100.0, 0.8, 0.0);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))a1->m_infoLabel->setVisible)(a1->m_infoLabel, 1);\n    if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )\n      operator delete(v12.__r_.__value_.__l.__data_);\n  }\n  else\n  {\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))m_infoLabel->setVisible)(a1->m_infoLabel, 0);\n  }\n}", "assembly": "; \n; GJSmartBlockPreview::addChance from 0x1000093e4 to 0x100009534 (336 bytes)\n; \n; 2 xrefs:\n; > BrowseSmartKeyLayer::init @ 0x100072e4c\n; > BrowseSmartKeyLayer::updateChanceValues @ 0x100073a5c\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\nSUB             SP, SP, #0x60                                          ; +0x0, 0x1000093e4\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x4, 0x1000093e8\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0x8, 0x1000093ec\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0xc, 0x1000093f0\nADD             X29, SP, #0x50                                         ; +0x10, 0x1000093f4\nMOV             X21, X2                                                ; +0x14, 0x1000093f8\nMOV             X20, X1                                                ; +0x18, 0x1000093fc\nMOV             X19, X0                                                ; +0x1c, 0x100009400\nBL              GJSmartBlockPreview__createInfoLabel                   ; +0x20, 0x100009404\nLDR             X22, [X19,#0x158]                                      ; +0x24, 0x100009408\nCBZ             W21, loc_100009488                                     ; +0x28, 0x10000940c\nMOV             W8, #0x42340000                                        ; +0x2c, 0x100009410\nFMOV            S0, W8                                                 ; +0x30, 0x100009414\nADD             X0, SP, #0x50+var_38                                   ; +0x34, 0x100009418\nFMOV            S1, #-15.0                                             ; +0x38, 0x10000941c\nBL              sub_100022980                                          ; +0x3c, 0x100009420\nLDR             X8, [X22]                                              ; +0x40, 0x100009424\nLDR             X8, [X8,#0xB8]                                         ; +0x44, 0x100009428\nADD             X1, SP, #0x50+var_38                                   ; +0x48, 0x10000942c\nMOV             X0, X22                                                ; +0x4c, 0x100009430\nBLR             X8                                                     ; +0x50, 0x100009434\nSTP             XZR, XZR, [SP,#0x50+var_38]                            ; +0x54, 0x100009438\nSTR             XZR, [SP,#0x50+var_38.__r_.__value_+0x10]              ; +0x58, 0x10000943c\nCBZ             W20, loc_1000094AC                                     ; +0x5c, 0x100009440\nSCVTF           S0, W20                                                ; +0x60, 0x100009444\nSCVTF           S1, W21                                                ; +0x64, 0x100009448\nFDIV            S0, S0, S1                                             ; +0x68, 0x10000944c\nMOV             W8, #0x42C80000                                        ; +0x6c, 0x100009450\nFMOV            S1, W8                                                 ; +0x70, 0x100009454\nFMUL            S0, S0, S1                                             ; +0x74, 0x100009458\nFCVT            D0, S0                                                 ; +0x78, 0x10000945c\nSTR             X20, [SP,#0x50+var_50]                                 ; +0x7c, 0x100009460\nSTR             D0, [SP,#0x50+var_48]                                  ; +0x80, 0x100009464\nADRL            X0, aI1f; \"%i (%.1f%%)\"                                ; +0x84, 0x100009468\nBL              sub_100268F4C                                          ; +0x8c, 0x100009470\nBL              cocos2d__CCString__getCString                          ; +0x90, 0x100009474\nMOV             X1, X0; __s                                            ; +0x94, 0x100009478\nADD             X0, SP, #0x50+var_38; this                             ; +0x98, 0x10000947c\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0x9c, 0x100009480\nB               loc_1000094BC                                          ; +0xa0, 0x100009484\nLDR             X8, [X22]                                              ; +0xa4, 0x100009488\nLDR             X2, [X8,#0x148]                                        ; +0xa8, 0x10000948c\nMOV             X0, X22                                                ; +0xac, 0x100009490\nMOV             W1, #0                                                 ; +0xb0, 0x100009494\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0xb4, 0x100009498\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0xb8, 0x10000949c\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0xbc, 0x1000094a0\nADD             SP, SP, #0x60 ; '`'                                    ; +0xc0, 0x1000094a4\nBR              X2                                                     ; +0xc4, 0x1000094a8\nADRL            X1, a0; \"0\"                                            ; +0xc8, 0x1000094ac\nADD             X0, SP, #0x50+var_38; this                             ; +0xd0, 0x1000094b4\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKc; std::string::assign(char const*) ; +0xd4, 0x1000094b8\nLDR             X0, [X19,#0x158]                                       ; +0xd8, 0x1000094bc\nLDRSB           W8, [SP,#0x50+var_38.__r_.__value_+0x17]               ; +0xdc, 0x1000094c0\nLDR             X9, [SP,#0x50+var_38]                                  ; +0xe0, 0x1000094c4\nCMP             W8, #0                                                 ; +0xe4, 0x1000094c8\nADD             X8, SP, #0x50+var_38                                   ; +0xe8, 0x1000094cc\nCSEL            X1, X9, X8, LT                                         ; +0xec, 0x1000094d0\nLDR             X8, [X0]                                               ; +0xf0, 0x1000094d4\nLDR             X8, [X8,#0x390]                                        ; +0xf4, 0x1000094d8\nBLR             X8                                                     ; +0xf8, 0x1000094dc\nLDR             X0, [X19,#0x158]                                       ; +0xfc, 0x1000094e0\nMOV             W8, #0x42C80000                                        ; +0x100, 0x1000094e4\nFMOV            S0, W8                                                 ; +0x104, 0x1000094e8\nADRP            X8, #dword_100635340@PAGE                              ; +0x108, 0x1000094ec\nLDR             S1, [X8,#dword_100635340@PAGEOFF]                      ; +0x10c, 0x1000094f0\nFMOV            S2, WZR                                                ; +0x110, 0x1000094f4\nBL              cocos2d__CCLabelBMFont__limitLabelWidth                ; +0x114, 0x1000094f8\nLDR             X0, [X19,#0x158]                                       ; +0x118, 0x1000094fc\nLDR             X8, [X0]                                               ; +0x11c, 0x100009500\nLDR             X8, [X8,#0x148]                                        ; +0x120, 0x100009504\nMOV             W1, #1                                                 ; +0x124, 0x100009508\nBLR             X8                                                     ; +0x128, 0x10000950c\nLDRSB           W8, [SP,#0x50+var_38.__r_.__value_+0x17]               ; +0x12c, 0x100009510\nTBZ             W8, #0x1F, loc_100009520                               ; +0x130, 0x100009514\nLDR             X0, [SP,#0x50+var_38]; __p                             ; +0x134, 0x100009518\nBL              __ZdlPv; operator delete(void *)                       ; +0x138, 0x10000951c\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x13c, 0x100009520\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x140, 0x100009524\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0x144, 0x100009528\nADD             SP, SP, #0x60 ; '`'                                    ; +0x148, 0x10000952c\nRET                                                                    ; +0x14c, 0x100009530", "xrefs": ["BrowseSmartKeyLayer::init @ 0x100072e4c", "BrowseSmartKeyLayer::updateChanceValues @ 0x100073a5c"], "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"}