{"type": "func", "start": 5372520608, "end": 5372521003, "name": "FriendRequestPopup::onClose", "pseudocode": "// \n// FriendRequestPopup::onClose from 0x1403a28a0 to 0x1403a2a2b (395 bytes)\n// \n// 4 xrefs:\n// > FriendRequestPopup::keyBackClicked @ 0x1403a2f09\n// > FriendRequestPopup::onClosePopup @ 0x1403a31f9\n// > FriendRequestPopup::init @ 0x1403a1b55\n// > <???> @ 0x140923630\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 11:31:17 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall FriendRequestPopup::onClose(__int64 a1)\n{\n  __int64 v2; // rax\n  __int64 v3; // rdi\n  cocos2d::CCString *v4; // rax\n  const char *CString; // rax\n  size_t v6; // r8\n  void *v7; // rcx\n  __int64 v8; // rdx\n  void *v10; // [rsp+30h] [rbp-38h]\n  void *Block[2]; // [rsp+38h] [rbp-30h] BYREF\n  __int64 v12; // [rsp+48h] [rbp-20h]\n  unsigned __int64 v13; // [rsp+50h] [rbp-18h]\n\n  if ( !*(_BYTE *)(a1 + 689) )\n  {\n    v2 = *(_QWORD *)(a1 + 696);\n    if ( v2 )\n    {\n      if ( !*(_BYTE *)(v2 + 400) )\n      {\n        v3 = *(_QWORD *)&qword_14090BFB0;\n        if ( !*(_QWORD *)&qword_14090BFB0 )\n        {\n          v10 = operator new(0x690u);\n          *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v10);\n          (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n          v3 = *(_QWORD *)&qword_14090BFB0;\n        }\n        if ( *(int *)(*(_QWORD *)(a1 + 696) + 320LL) > 0 )\n        {\n          v4 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8);\n          CString = cocos2d::CCString::getCString(v4);\n          *(_OWORD *)Block = 0;\n          v12 = 0;\n          v13 = 0;\n          v6 = -1;\n          do\n            ++v6;\n          while ( CString[v6] );\n          sub_14003D230(Block, CString, v6);\n          GameLevelManager::readFriendRequests(v3, (const char *)Block);\n          if ( v13 > 0xF )\n          {\n            v7 = Block[0];\n            if ( v13 + 1 >= 0x1000 )\n            {\n              v7 = *((void **)Block[0] - 1);\n              if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )\n                invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n            }\n            j_j_free(v7);\n          }\n        }\n        *(_BYTE *)(*(_QWORD *)(a1 + 696) + 400LL) = 1;\n      }\n    }\n  }\n  (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);\n  LOBYTE(v8) = 1;\n  return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 520LL))(a1, v8);\n}", "assembly": "; \n; FriendRequestPopup::onClose from 0x1403a28a0 to 0x1403a2a2b (395 bytes)\n; \n; 4 xrefs:\n; > FriendRequestPopup::keyBackClicked @ 0x1403a2f09\n; > FriendRequestPopup::onClosePopup @ 0x1403a31f9\n; > FriendRequestPopup::init @ 0x1403a1b55\n; > <???> @ 0x140923630\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 11:31:17 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1403a28a0\npush    rdi                                                            ; +0x5, 0x1403a28a5\nsub     rsp, 60h                                                       ; +0x6, 0x1403a28a6\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1403a28aa\nxor     rax, rsp                                                       ; +0x11, 0x1403a28b1\nmov     [rsp+68h+var_10], rax                                          ; +0x14, 0x1403a28b4\nmov     rbx, rcx                                                       ; +0x19, 0x1403a28b9\ncmp     byte ptr [rcx+2B1h], 0                                         ; +0x1c, 0x1403a28bc\njnz     loc_1403A29F7                                                  ; +0x23, 0x1403a28c3\nmov     rax, [rcx+2B8h]                                                ; +0x29, 0x1403a28c9\ntest    rax, rax                                                       ; +0x30, 0x1403a28d0\njz      loc_1403A29F7                                                  ; +0x33, 0x1403a28d3\ncmp     byte ptr [rax+190h], 0                                         ; +0x39, 0x1403a28d9\njnz     loc_1403A29F7                                                  ; +0x40, 0x1403a28e0\nmov     rdi, cs:qword_14090BFB0                                        ; +0x46, 0x1403a28e6\ntest    rdi, rdi                                                       ; +0x4d, 0x1403a28ed\njnz     short loc_1403A2924                                            ; +0x50, 0x1403a28f0\nmov     ecx, 690h; Size                                                ; +0x52, 0x1403a28f2\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x57, 0x1403a28f7\nmov     [rsp+68h+var_38], rax                                          ; +0x5c, 0x1403a28fc\nmov     rcx, rax                                                       ; +0x61, 0x1403a2901\ncall    GameLevelManager__GameLevelManager                             ; +0x64, 0x1403a2904\nnop                                                                    ; +0x69, 0x1403a2909\nmov     cs:qword_14090BFB0, rax                                        ; +0x6a, 0x1403a290a\nmov     rcx, [rax]                                                     ; +0x71, 0x1403a2911\nmov     rdx, [rcx+48h]                                                 ; +0x74, 0x1403a2914\nmov     rcx, rax                                                       ; +0x78, 0x1403a2918\ncall    rdx                                                            ; +0x7b, 0x1403a291b\nmov     rdi, cs:qword_14090BFB0                                        ; +0x7d, 0x1403a291d\nmov     rax, [rbx+2B8h]                                                ; +0x84, 0x1403a2924\nmov     edx, [rax+140h]                                                ; +0x8b, 0x1403a292b\ntest    edx, edx                                                       ; +0x91, 0x1403a2931\njle     loc_1403A29E9                                                  ; +0x93, 0x1403a2933\nlea     rcx, word_1406ED6F8                                            ; +0x99, 0x1403a2939\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xa0, 0x1403a2940\nmov     rcx, rax                                                       ; +0xa6, 0x1403a2946\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xa9, 0x1403a2949\nxorps   xmm0, xmm0                                                     ; +0xaf, 0x1403a294f\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0xb2, 0x1403a2952\nmov     [rsp+68h+var_20], 0                                            ; +0xb7, 0x1403a2957\nmov     [rsp+68h+var_18], 0                                            ; +0xc0, 0x1403a2960\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0xc9, 0x1403a2969\ninc     r8                                                             ; +0xd0, 0x1403a2970\ncmp     byte ptr [rax+r8], 0                                           ; +0xd3, 0x1403a2973\njnz     short loc_1403A2970                                            ; +0xd8, 0x1403a2978\nmov     rdx, rax                                                       ; +0xda, 0x1403a297a\nlea     rcx, [rsp+68h+Block]                                           ; +0xdd, 0x1403a297d\ncall    sub_14003D230                                                  ; +0xe2, 0x1403a2982\nnop                                                                    ; +0xe7, 0x1403a2987\nlea     rdx, [rsp+68h+Block]                                           ; +0xe8, 0x1403a2988\nmov     rcx, rdi                                                       ; +0xed, 0x1403a298d\ncall    GameLevelManager__readFriendRequests                           ; +0xf0, 0x1403a2990\nnop                                                                    ; +0xf5, 0x1403a2995\nmov     rdx, [rsp+68h+var_18]                                          ; +0xf6, 0x1403a2996\ncmp     rdx, 0Fh                                                       ; +0xfb, 0x1403a299b\njbe     short loc_1403A29E9                                            ; +0xff, 0x1403a299f\ninc     rdx                                                            ; +0x101, 0x1403a29a1\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x104, 0x1403a29a4\nmov     rax, rcx                                                       ; +0x109, 0x1403a29a9\ncmp     rdx, 1000h                                                     ; +0x10c, 0x1403a29ac\njb      short loc_1403A29E4                                            ; +0x113, 0x1403a29b3\nadd     rdx, 27h ; '''                                                 ; +0x115, 0x1403a29b5\nmov     rcx, [rcx-8]                                                   ; +0x119, 0x1403a29b9\nsub     rax, rcx                                                       ; +0x11d, 0x1403a29bd\nsub     rax, 8                                                         ; +0x120, 0x1403a29c0\ncmp     rax, 1Fh                                                       ; +0x124, 0x1403a29c4\njbe     short loc_1403A29E4                                            ; +0x128, 0x1403a29c8\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0x12a, 0x1403a29ca\nxor     r9d, r9d; LineNo                                               ; +0x133, 0x1403a29d3\nxor     r8d, r8d; FileName                                             ; +0x136, 0x1403a29d6\nxor     edx, edx; FunctionName                                         ; +0x139, 0x1403a29d9\nxor     ecx, ecx; Expression                                           ; +0x13b, 0x1403a29db\ncall    cs:_invoke_watson                                              ; +0x13d, 0x1403a29dd\nalign 4                                                                ; +0x143, 0x1403a29e3\ncall    j_j_free                                                       ; +0x144, 0x1403a29e4\nmov     rax, [rbx+2B8h]                                                ; +0x149, 0x1403a29e9\nmov     byte ptr [rax+190h], 1                                         ; +0x150, 0x1403a29f0\nmov     rax, [rbx]                                                     ; +0x157, 0x1403a29f7\nxor     edx, edx                                                       ; +0x15a, 0x1403a29fa\nmov     rcx, rbx                                                       ; +0x15c, 0x1403a29fc\ncall    qword ptr [rax+3E0h]                                           ; +0x15f, 0x1403a29ff\nmov     rax, [rbx]                                                     ; +0x165, 0x1403a2a05\nmov     dl, 1                                                          ; +0x168, 0x1403a2a08\nmov     rcx, rbx                                                       ; +0x16a, 0x1403a2a0a\ncall    qword ptr [rax+208h]                                           ; +0x16d, 0x1403a2a0d\nmov     rcx, [rsp+68h+var_10]                                          ; +0x173, 0x1403a2a13\nxor     rcx, rsp; StackCookie                                          ; +0x178, 0x1403a2a18\ncall    __security_check_cookie                                        ; +0x17b, 0x1403a2a1b\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x180, 0x1403a2a20\nadd     rsp, 60h                                                       ; +0x185, 0x1403a2a25\npop     rdi                                                            ; +0x189, 0x1403a2a29\nretn                                                                   ; +0x18a, 0x1403a2a2a", "xrefs": ["FriendRequestPopup::keyBackClicked @ 0x1403a2f09", "FriendRequestPopup::onClosePopup @ 0x1403a31f9", "FriendRequestPopup::init @ 0x1403a1b55", "<???> @ 0x140923630"], "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"}