{"type": "func", "start": 5372658384, "end": 5372658972, "name": "ProfilePage::onBlockUser", "pseudocode": "// \n// ProfilePage::onBlockUser from 0x1403c42d0 to 0x1403c451c (588 bytes)\n// \n// 2 xrefs:\n// > ProfilePage::loadPageFromUserInfo @ 0x1403c2469\n// > <???> @ 0x1406d77c0\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\n// Hidden C++ exception states: #wind=4\nvoid ProfilePage::onBlockUser(ProfilePage *a1, cocos2d::CCObject *a2)\n{\n  GJAccountManager *v3; // rax\n  ProfilePage *v4; // rcx\n  const char *v5; // r8\n  const char *v6; // rdx\n  cocos2d::CCString *v7; // rax\n  const char *CString; // rax\n  size_t v9; // rbx\n  size_t v10; // r8\n  void **v11; // rdx\n  FLAlertLayer *v12; // rbx\n  __int64 v13; // rax\n  void *v14; // rcx\n  FLAlertLayer *v15; // [rsp+58h] [rbp-41h]\n  __int128 v16; // [rsp+60h] [rbp-39h] BYREF\n  __int64 v17; // [rsp+70h] [rbp-29h]\n  __int64 v18; // [rsp+78h] [rbp-21h]\n  _BYTE v19[32]; // [rsp+80h] [rbp-19h] BYREF\n  void *Block[2]; // [rsp+A0h] [rbp+7h] BYREF\n  __int64 v21; // [rsp+B0h] [rbp+17h]\n  unsigned __int64 v22; // [rsp+B8h] [rbp+1Fh]\n  _QWORD v23[4]; // [rsp+C0h] [rbp+27h] BYREF\n\n  v3 = GJAccountManager::sharedState();\n  if ( v3->m_accountID - v3->m_unkInt1 > 0 )\n  {\n    sub_14003BDB0((__int64)v23, (__int64)&a1->m_score->m_userName);\n    v5 = (const char *)v23;\n    if ( v23[3] <= 0xFu )\n    {\n      v6 = (const char *)v23;\n    }\n    else\n    {\n      v6 = (const char *)v23[0];\n      v5 = (const char *)v23[0];\n    }\n    v7 = cocos2d::CCString::createWithFormat(\n           \"Are you sure you want to block <cg>%s</c>?\\n\"\n           \"<cg>%s</c> will no longer be able to:\\n\"\n           \"- <cy>View your profile</c>\\n\"\n           \"- <cl>Send messages</c>\\n\"\n           \"- <cp>Send friend requests</c>\\n\"\n           \"- <cr>Messages from this user will be removed</c>\",\n           v6,\n           v5);\n    CString = cocos2d::CCString::getCString(v7);\n    *(_OWORD *)Block = 0;\n    v21 = 0;\n    v22 = 0;\n    v9 = -1;\n    v10 = -1;\n    do\n      ++v10;\n    while ( CString[v10] );\n    sub_14003A930(Block, CString, v10);\n    v11 = Block;\n    if ( v22 > 0xF )\n      v11 = (void **)Block[0];\n    v16 = 0;\n    v17 = 0;\n    v18 = 0;\n    do\n      ++v9;\n    while ( *((_BYTE *)v11 + v9) );\n    sub_14003A930(&v16, v11, v9);\n    v15 = (FLAlertLayer *)operator new(0x278u);\n    v12 = FLAlertLayer::FLAlertLayer(v15);\n    if ( v12 )\n    {\n      v13 = sub_14003BDB0((__int64)v19, (__int64)&v16);\n      if ( FLAlertLayer::init(\n             (__int64)v12,\n             (__int64)&a1->FLAlertLayerProtocol,\n             \"Confirm Block\",\n             v13,\n             \"Back\",\n             \"Block\",\n             380.0,\n             0,\n             0,\n             1.0) )\n      {\n        cocos2d::CCObject::autorelease(v12);\n      }\n      else\n      {\n        ((void (__fastcall *)(FLAlertLayer *, __int64))v12->~FLAlertLayer)(v12, 1);\n        v12 = nullptr;\n      }\n    }\n    sub_14003A830((__int64)&v16);\n    ButtonSprite::updateBGImage(v12->m_button2, \"GJ_button_06.png\");\n    v12->setTag(v12, 3);\n    v12->show(v12);\n    if ( v22 > 0xF )\n    {\n      v14 = Block[0];\n      if ( v22 + 1 >= 0x1000 )\n      {\n        v14 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v14 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v14);\n    }\n    sub_14003A830((__int64)v23);\n  }\n  else\n  {\n    ProfilePage::showNoAccountError(v4);\n  }\n}", "assembly": "; \n; ProfilePage::onBlockUser from 0x1403c42d0 to 0x1403c451c (588 bytes)\n; \n; 2 xrefs:\n; > ProfilePage::loadPageFromUserInfo @ 0x1403c2469\n; > <???> @ 0x1406d77c0\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-8+arg_8], rbx                                             ; +0x0, 0x1403c42d0\nmov     [rsp-8+arg_10], rsi                                            ; +0x5, 0x1403c42d5\nmov     [rsp-8+arg_18], rdi                                            ; +0xa, 0x1403c42da\npush    rbp                                                            ; +0xf, 0x1403c42df\nlea     rbp, [rsp-57h]                                                 ; +0x10, 0x1403c42e0\nsub     rsp, 0F0h                                                      ; +0x15, 0x1403c42e5\nmov     rax, cs:__security_cookie                                      ; +0x1c, 0x1403c42ec\nxor     rax, rsp                                                       ; +0x23, 0x1403c42f3\nmov     [rbp+57h+var_10], rax                                          ; +0x26, 0x1403c42f6\nmov     rdi, rcx                                                       ; +0x2a, 0x1403c42fa\nxor     esi, esi                                                       ; +0x2d, 0x1403c42fd\ncall    GJAccountManager__sharedState                                  ; +0x2f, 0x1403c42ff\nmov     edx, [rax+168h]                                                ; +0x34, 0x1403c4304\nsub     edx, [rax+16Ch]                                                ; +0x3a, 0x1403c430a\ntest    edx, edx                                                       ; +0x40, 0x1403c4310\njg      short loc_1403C431E                                            ; +0x42, 0x1403c4312\ncall    ProfilePage__showNoAccountError                                ; +0x44, 0x1403c4314\njmp     loc_1403C44F7                                                  ; +0x49, 0x1403c4319\nmov     rdx, [rdi+2B0h]                                                ; +0x4e, 0x1403c431e\nadd     rdx, 140h                                                      ; +0x55, 0x1403c4325\nlea     rcx, [rbp+57h+var_30]                                          ; +0x5c, 0x1403c432c\ncall    sub_14003BDB0                                                  ; +0x60, 0x1403c4330\nnop                                                                    ; +0x65, 0x1403c4335\nlea     r8, [rbp+57h+var_30]                                           ; +0x66, 0x1403c4336\ncmp     [rbp+57h+var_18], 0Fh                                          ; +0x6a, 0x1403c433a\njbe     short loc_1403C434A                                            ; +0x6f, 0x1403c433f\nmov     rdx, [rbp+57h+var_30]                                          ; +0x71, 0x1403c4341\nmov     r8, rdx                                                        ; +0x75, 0x1403c4345\njmp     short loc_1403C434E                                            ; +0x78, 0x1403c4348\nlea     rdx, [rbp+57h+var_30]                                          ; +0x7a, 0x1403c434a\nlea     rcx, aAreYouSureYouW_3; \"Are you sure you want to block <cg>%s</\"... ; +0x7e, 0x1403c434e\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x85, 0x1403c4355\nmov     rcx, rax                                                       ; +0x8b, 0x1403c435b\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x8e, 0x1403c435e\nxorps   xmm0, xmm0                                                     ; +0x94, 0x1403c4364\nmovups  xmmword ptr [rbp+57h+Block], xmm0                              ; +0x97, 0x1403c4367\nmov     [rbp+57h+var_40], rsi                                          ; +0x9b, 0x1403c436b\nmov     [rbp+57h+var_38], rsi                                          ; +0x9f, 0x1403c436f\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0xa3, 0x1403c4373\nmov     r8, rbx                                                        ; +0xaa, 0x1403c437a\nnop     dword ptr [rax]                                                ; +0xad, 0x1403c437d\ninc     r8                                                             ; +0xb0, 0x1403c4380\ncmp     byte ptr [rax+r8], 0                                           ; +0xb3, 0x1403c4383\njnz     short loc_1403C4380                                            ; +0xb8, 0x1403c4388\nmov     rdx, rax                                                       ; +0xba, 0x1403c438a\nlea     rcx, [rbp+57h+Block]                                           ; +0xbd, 0x1403c438d\ncall    sub_14003A930                                                  ; +0xc1, 0x1403c4391\nnop                                                                    ; +0xc6, 0x1403c4396\nlea     rdx, [rbp+57h+Block]                                           ; +0xc7, 0x1403c4397\ncmp     [rbp+57h+var_38], 0Fh                                          ; +0xcb, 0x1403c439b\ncmova   rdx, [rbp+57h+Block]                                           ; +0xd0, 0x1403c43a0\nxorps   xmm0, xmm0                                                     ; +0xd5, 0x1403c43a5\nmovups  [rbp+57h+var_90], xmm0                                         ; +0xd8, 0x1403c43a8\nmov     [rbp+57h+var_80], rsi                                          ; +0xdc, 0x1403c43ac\nmov     [rbp+57h+var_78], rsi                                          ; +0xe0, 0x1403c43b0\ninc     rbx                                                            ; +0xe4, 0x1403c43b4\ncmp     byte ptr [rdx+rbx], 0                                          ; +0xe7, 0x1403c43b7\njnz     short loc_1403C43B4                                            ; +0xeb, 0x1403c43bb\nmov     r8, rbx                                                        ; +0xed, 0x1403c43bd\nlea     rcx, [rbp+57h+var_90]                                          ; +0xf0, 0x1403c43c0\ncall    sub_14003A930                                                  ; +0xf4, 0x1403c43c4\nlea     rax, [rbp+57h+var_90]                                          ; +0xf9, 0x1403c43c9\nmov     [rbp+57h+var_A0], rax                                          ; +0xfd, 0x1403c43cd\nmov     ecx, 278h; Size                                                ; +0x101, 0x1403c43d1\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x106, 0x1403c43d6\nmov     [rbp+57h+var_98], rax                                          ; +0x10b, 0x1403c43db\nmov     rcx, rax                                                       ; +0x10f, 0x1403c43df\ncall    FLAlertLayer__FLAlertLayer                                     ; +0x112, 0x1403c43e2\nmov     rbx, rax                                                       ; +0x117, 0x1403c43e7\ntest    rax, rax                                                       ; +0x11a, 0x1403c43ea\njz      loc_1403C4478                                                  ; +0x11d, 0x1403c43ed\nlea     rdx, [rbp+57h+var_90]                                          ; +0x123, 0x1403c43f3\nlea     rcx, [rbp+57h+var_70]                                          ; +0x127, 0x1403c43f7\ncall    sub_14003BDB0                                                  ; +0x12b, 0x1403c43fb\nmovss   xmm0, cs:flt_140622C24                                         ; +0x130, 0x1403c4400\nmovss   [rsp+0F0h+var_A8], xmm0                                        ; +0x138, 0x1403c4408\nxorps   xmm1, xmm1                                                     ; +0x13e, 0x1403c440e\nmovss   [rsp+0F0h+var_B0], xmm1                                        ; +0x141, 0x1403c4411\nmov     [rsp+0F0h+var_B8], 0                                           ; +0x147, 0x1403c4417\nmovss   xmm0, cs:dword_140623478                                       ; +0x14c, 0x1403c441c\nmovss   [rsp+0F0h+var_C0], xmm0                                        ; +0x154, 0x1403c4424\nlea     rcx, aBlock; \"Block\"                                           ; +0x15a, 0x1403c442a\nmov     [rsp+0F0h+var_C8], rcx                                         ; +0x161, 0x1403c4431\nlea     rcx, aBack; \"Back\"                                             ; +0x166, 0x1403c4436\nmov     [rsp+0F0h+var_D0], rcx                                         ; +0x16d, 0x1403c443d\nmov     r9, rax                                                        ; +0x172, 0x1403c4442\nlea     r8, aConfirmBlock; \"Confirm Block\"                             ; +0x175, 0x1403c4445\nlea     rdx, [rdi+278h]                                                ; +0x17c, 0x1403c444c\nmov     rcx, rbx                                                       ; +0x183, 0x1403c4453\ncall    FLAlertLayer__init                                             ; +0x186, 0x1403c4456\nmov     rcx, rbx                                                       ; +0x18b, 0x1403c445b\ntest    al, al                                                         ; +0x18e, 0x1403c445e\njz      short loc_1403C446A                                            ; +0x190, 0x1403c4460\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x192, 0x1403c4462\njmp     short loc_1403C4478                                            ; +0x198, 0x1403c4468\nmov     rax, [rbx]                                                     ; +0x19a, 0x1403c446a\nmov     edx, 1                                                         ; +0x19d, 0x1403c446d\ncall    qword ptr [rax+8]                                              ; +0x1a2, 0x1403c4472\nmov     rbx, rsi                                                       ; +0x1a5, 0x1403c4475\nlea     rcx, [rbp+57h+var_90]                                          ; +0x1a8, 0x1403c4478\ncall    sub_14003A830                                                  ; +0x1ac, 0x1403c447c\nlea     rdx, aGjButton06Png; \"GJ_button_06.png\"                        ; +0x1b1, 0x1403c4481\nmov     rcx, [rbx+258h]                                                ; +0x1b8, 0x1403c4488\ncall    ButtonSprite__updateBGImage                                    ; +0x1bf, 0x1403c448f\nmov     rax, [rbx]                                                     ; +0x1c4, 0x1403c4494\nmov     edx, 3                                                         ; +0x1c7, 0x1403c4497\nmov     rcx, rbx                                                       ; +0x1cc, 0x1403c449c\ncall    qword ptr [rax+40h]                                            ; +0x1cf, 0x1403c449f\nmov     rax, [rbx]                                                     ; +0x1d2, 0x1403c44a2\nmov     rcx, rbx                                                       ; +0x1d5, 0x1403c44a5\ncall    qword ptr [rax+410h]                                           ; +0x1d8, 0x1403c44a8\nnop                                                                    ; +0x1de, 0x1403c44ae\nmov     rdx, [rbp+57h+var_38]                                          ; +0x1df, 0x1403c44af\ncmp     rdx, 0Fh                                                       ; +0x1e3, 0x1403c44b3\njbe     short loc_1403C44EE                                            ; +0x1e7, 0x1403c44b7\ninc     rdx                                                            ; +0x1e9, 0x1403c44b9\nmov     rcx, [rbp+57h+Block]; Block                                    ; +0x1ec, 0x1403c44bc\nmov     rax, rcx                                                       ; +0x1f0, 0x1403c44c0\ncmp     rdx, 1000h                                                     ; +0x1f3, 0x1403c44c3\njb      short loc_1403C44E8                                            ; +0x1fa, 0x1403c44ca\nadd     rdx, 27h ; '''                                                 ; +0x1fc, 0x1403c44cc\nmov     rcx, [rcx-8]                                                   ; +0x200, 0x1403c44d0\nsub     rax, rcx                                                       ; +0x204, 0x1403c44d4\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x207, 0x1403c44d7\ncmp     rax, 1Fh                                                       ; +0x20b, 0x1403c44db\njbe     short loc_1403C44E8                                            ; +0x20f, 0x1403c44df\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x211, 0x1403c44e1\nalign 8                                                                ; +0x217, 0x1403c44e7\ncall    j_j_free                                                       ; +0x218, 0x1403c44e8\nnop                                                                    ; +0x21d, 0x1403c44ed\nlea     rcx, [rbp+57h+var_30]                                          ; +0x21e, 0x1403c44ee\ncall    sub_14003A830                                                  ; +0x222, 0x1403c44f2\nmov     rcx, [rbp+57h+var_10]                                          ; +0x227, 0x1403c44f7\nxor     rcx, rsp; StackCookie                                          ; +0x22b, 0x1403c44fb\ncall    __security_check_cookie                                        ; +0x22e, 0x1403c44fe\nlea     r11, [rsp+0F0h+var_s0]                                         ; +0x233, 0x1403c4503\nmov     rbx, [r11+18h]                                                 ; +0x23b, 0x1403c450b\nmov     rsi, [r11+20h]                                                 ; +0x23f, 0x1403c450f\nmov     rdi, [r11+28h]                                                 ; +0x243, 0x1403c4513\nmov     rsp, r11                                                       ; +0x247, 0x1403c4517\npop     rbp                                                            ; +0x24a, 0x1403c451a\nretn                                                                   ; +0x24b, 0x1403c451b", "xrefs": ["ProfilePage::loadPageFromUserInfo @ 0x1403c2469", "<???> @ 0x1406d77c0"], "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"}