{"type": "func", "start": 5369676800, "end": 5369677270, "name": "MemberListPopup::onAddPolicy", "pseudocode": "// \n// MemberListPopup::onAddPolicy from 0x1400ec400 to 0x1400ec5d6 (470 bytes)\n// \n// 2 xrefs:\n// > MemberListPopup::refreshPolicyBtn @ 0x1400ec359\n// > <???> @ 0x140914fa8\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:26:35 +0000\n// \n\n// Hidden C++ exception states: #wind=3\nvoid __fastcall MemberListPopup::onAddPolicy(__int64 a1)\n{\n  __int16 *v2; // rdx\n  size_t v3; // r8\n  __int64 v4; // rcx\n  char updated; // di\n  void *v6; // r8\n  __int64 v7; // rbx\n  __int64 v8; // rax\n  void *v9; // [rsp+30h] [rbp-38h]\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 + 864)\n    && *(int *)(a1 + 868) <= 0\n    && *(int *)(a1 + 872) <= 0\n    && *(int *)(a1 + 876) <= 0\n    && !*(_BYTE *)(a1 + 848) )\n  {\n    v2 = &word_14070D060;\n    if ( *(_DWORD *)(*(_QWORD *)(a1 + 800) + 248LL) == 1 )\n      v2 = (__int16 *)\"0\";\n    *(_OWORD *)Block = 0;\n    v12 = 0;\n    v13 = 0;\n    v3 = -1;\n    do\n      ++v3;\n    while ( *((_BYTE *)v2 + v3) );\n    sub_14003D230(Block, v2, v3);\n    v4 = *(_QWORD *)&qword_14090BFB0;\n    if ( !*(_QWORD *)&qword_14090BFB0 )\n    {\n      v9 = operator new(0x690u);\n      *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v9);\n      (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n      v4 = *(_QWORD *)&qword_14090BFB0;\n    }\n    updated = GameLevelManager::updateThread(v4, *(unsigned int *)(*(_QWORD *)(a1 + 800) + 56LL), 13, Block);\n    if ( v13 > 0xF )\n    {\n      v6 = Block[0];\n      if ( v13 + 1 >= 0x1000 )\n      {\n        v6 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v6);\n    }\n    if ( updated )\n    {\n      *(_BYTE *)(a1 + 848) = 1;\n      v7 = a1 + 776;\n      v8 = *(_QWORD *)&qword_14090BFB0;\n      if ( !*(_QWORD *)&qword_14090BFB0 )\n      {\n        v10 = operator new(0x690u);\n        *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v10);\n        (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n        v8 = *(_QWORD *)&qword_14090BFB0;\n      }\n      *(_QWORD *)(v8 + 1392) = v7;\n    }\n  }\n}", "assembly": "; \n; MemberListPopup::onAddPolicy from 0x1400ec400 to 0x1400ec5d6 (470 bytes)\n; \n; 2 xrefs:\n; > MemberListPopup::refreshPolicyBtn @ 0x1400ec359\n; > <???> @ 0x140914fa8\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:26:35 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1400ec400\npush    rdi                                                            ; +0x5, 0x1400ec405\nsub     rsp, 60h                                                       ; +0x6, 0x1400ec406\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1400ec40a\nxor     rax, rsp                                                       ; +0x11, 0x1400ec411\nmov     [rsp+68h+var_10], rax                                          ; +0x14, 0x1400ec414\nmov     rbx, rcx                                                       ; +0x19, 0x1400ec419\ncmp     byte ptr [rcx+360h], 0                                         ; +0x1c, 0x1400ec41c\njnz     loc_1400EC5BE                                                  ; +0x23, 0x1400ec423\ncmp     dword ptr [rcx+364h], 0                                        ; +0x29, 0x1400ec429\njg      loc_1400EC5BE                                                  ; +0x30, 0x1400ec430\ncmp     dword ptr [rcx+368h], 0                                        ; +0x36, 0x1400ec436\njg      loc_1400EC5BE                                                  ; +0x3d, 0x1400ec43d\ncmp     dword ptr [rcx+36Ch], 0                                        ; +0x43, 0x1400ec443\njg      loc_1400EC5BE                                                  ; +0x4a, 0x1400ec44a\ncmp     byte ptr [rcx+350h], 0                                         ; +0x50, 0x1400ec450\njnz     loc_1400EC5BE                                                  ; +0x57, 0x1400ec457\nmov     rax, [rcx+320h]                                                ; +0x5d, 0x1400ec45d\nlea     rcx, a0; \"0\"                                                   ; +0x64, 0x1400ec464\nlea     rdx, word_14070D060                                            ; +0x6b, 0x1400ec46b\ncmp     dword ptr [rax+0F8h], 1                                        ; +0x72, 0x1400ec472\ncmovz   rdx, rcx                                                       ; +0x79, 0x1400ec479\nxorps   xmm0, xmm0                                                     ; +0x7d, 0x1400ec47d\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x80, 0x1400ec480\nmov     [rsp+68h+var_20], 0                                            ; +0x85, 0x1400ec485\nmov     [rsp+68h+var_18], 0                                            ; +0x8e, 0x1400ec48e\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x97, 0x1400ec497\nxchg    ax, ax                                                         ; +0x9e, 0x1400ec49e\ninc     r8                                                             ; +0xa0, 0x1400ec4a0\ncmp     byte ptr [rdx+r8], 0                                           ; +0xa3, 0x1400ec4a3\njnz     short loc_1400EC4A0                                            ; +0xa8, 0x1400ec4a8\nlea     rcx, [rsp+68h+Block]                                           ; +0xaa, 0x1400ec4aa\ncall    sub_14003D230                                                  ; +0xaf, 0x1400ec4af\nnop                                                                    ; +0xb4, 0x1400ec4b4\nmov     rcx, cs:qword_14090BFB0                                        ; +0xb5, 0x1400ec4b5\ntest    rcx, rcx                                                       ; +0xbc, 0x1400ec4bc\njnz     short loc_1400EC4F3                                            ; +0xbf, 0x1400ec4bf\nmov     ecx, 690h; Size                                                ; +0xc1, 0x1400ec4c1\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xc6, 0x1400ec4c6\nmov     [rsp+68h+var_38], rax                                          ; +0xcb, 0x1400ec4cb\nmov     rcx, rax                                                       ; +0xd0, 0x1400ec4d0\ncall    GameLevelManager__GameLevelManager                             ; +0xd3, 0x1400ec4d3\nnop                                                                    ; +0xd8, 0x1400ec4d8\nmov     cs:qword_14090BFB0, rax                                        ; +0xd9, 0x1400ec4d9\nmov     rcx, [rax]                                                     ; +0xe0, 0x1400ec4e0\nmov     rdx, [rcx+48h]                                                 ; +0xe3, 0x1400ec4e3\nmov     rcx, rax                                                       ; +0xe7, 0x1400ec4e7\ncall    rdx                                                            ; +0xea, 0x1400ec4ea\nmov     rcx, cs:qword_14090BFB0                                        ; +0xec, 0x1400ec4ec\nmov     rdx, [rbx+320h]                                                ; +0xf3, 0x1400ec4f3\nlea     r9, [rsp+68h+Block]                                            ; +0xfa, 0x1400ec4fa\nmov     r8d, 0Dh                                                       ; +0xff, 0x1400ec4ff\nmov     edx, [rdx+38h]                                                 ; +0x105, 0x1400ec505\ncall    GameLevelManager__updateThread                                 ; +0x108, 0x1400ec508\nmovzx   edi, al                                                        ; +0x10d, 0x1400ec50d\nmov     rdx, [rsp+68h+var_18]                                          ; +0x110, 0x1400ec510\ncmp     rdx, 0Fh                                                       ; +0x115, 0x1400ec515\njbe     short loc_1400EC566                                            ; +0x119, 0x1400ec519\ninc     rdx                                                            ; +0x11b, 0x1400ec51b\nmov     r8, [rsp+68h+Block]                                            ; +0x11e, 0x1400ec51e\nmov     rcx, r8                                                        ; +0x123, 0x1400ec523\ncmp     rdx, 1000h                                                     ; +0x126, 0x1400ec526\njb      short loc_1400EC55E                                            ; +0x12d, 0x1400ec52d\nadd     rdx, 27h ; '''                                                 ; +0x12f, 0x1400ec52f\nmov     r8, [r8-8]                                                     ; +0x133, 0x1400ec533\nsub     rcx, r8                                                        ; +0x137, 0x1400ec537\nsub     rcx, 8                                                         ; +0x13a, 0x1400ec53a\ncmp     rcx, 1Fh                                                       ; +0x13e, 0x1400ec53e\njbe     short loc_1400EC55E                                            ; +0x142, 0x1400ec542\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0x144, 0x1400ec544\nxor     r9d, r9d; LineNo                                               ; +0x14d, 0x1400ec54d\nxor     r8d, r8d; FileName                                             ; +0x150, 0x1400ec550\nxor     edx, edx; FunctionName                                         ; +0x153, 0x1400ec553\nxor     ecx, ecx; Expression                                           ; +0x155, 0x1400ec555\ncall    cs:_invoke_watson                                              ; +0x157, 0x1400ec557\nalign 2                                                                ; +0x15d, 0x1400ec55d\nmov     rcx, r8; Block                                                 ; +0x15e, 0x1400ec55e\ncall    j_j_free                                                       ; +0x161, 0x1400ec561\ntest    dil, dil                                                       ; +0x166, 0x1400ec566\njz      short loc_1400EC5BE                                            ; +0x169, 0x1400ec569\nmov     byte ptr [rbx+350h], 1                                         ; +0x16b, 0x1400ec56b\nadd     rbx, 308h                                                      ; +0x172, 0x1400ec572\nmov     rax, cs:qword_14090BFB0                                        ; +0x179, 0x1400ec579\ntest    rax, rax                                                       ; +0x180, 0x1400ec580\njnz     short loc_1400EC5B7                                            ; +0x183, 0x1400ec583\nmov     ecx, 690h; Size                                                ; +0x185, 0x1400ec585\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x18a, 0x1400ec58a\nmov     [rsp+68h+var_38], rax                                          ; +0x18f, 0x1400ec58f\nmov     rcx, rax                                                       ; +0x194, 0x1400ec594\ncall    GameLevelManager__GameLevelManager                             ; +0x197, 0x1400ec597\nnop                                                                    ; +0x19c, 0x1400ec59c\nmov     cs:qword_14090BFB0, rax                                        ; +0x19d, 0x1400ec59d\nmov     rcx, [rax]                                                     ; +0x1a4, 0x1400ec5a4\nmov     rdx, [rcx+48h]                                                 ; +0x1a7, 0x1400ec5a7\nmov     rcx, rax                                                       ; +0x1ab, 0x1400ec5ab\ncall    rdx                                                            ; +0x1ae, 0x1400ec5ae\nmov     rax, cs:qword_14090BFB0                                        ; +0x1b0, 0x1400ec5b0\nmov     [rax+570h], rbx                                                ; +0x1b7, 0x1400ec5b7\nmov     rcx, [rsp+68h+var_10]                                          ; +0x1be, 0x1400ec5be\nxor     rcx, rsp; StackCookie                                          ; +0x1c3, 0x1400ec5c3\ncall    __security_check_cookie                                        ; +0x1c6, 0x1400ec5c6\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x1cb, 0x1400ec5cb\nadd     rsp, 60h                                                       ; +0x1d0, 0x1400ec5d0\npop     rdi                                                            ; +0x1d4, 0x1400ec5d4\nretn                                                                   ; +0x1d5, 0x1400ec5d5", "xrefs": ["MemberListPopup::refreshPolicyBtn @ 0x1400ec359", "<???> @ 0x140914fa8"], "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"}