{"type": "func", "start": 4302546256, "end": 4302546739, "name": "GJMultiplayerManager::addComment", "pseudocode": "// \n// GJMultiplayerManager::addComment from 0x10073a550 to 0x10073a733 (483 bytes)\n// \n// 2 xrefs:\n// > GJMultiplayerManager::onJoinLobbyCompleted @ 0x1007394cd\n// > GJMultiplayerManager::createAndAddComment @ 0x10073b4ea\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 12:36:26 +0000\n// \n\n__int64 __fastcall GJMultiplayerManager::addComment(__int64 a1, __int128 *a2, int a3)\n{\n  __int64 v4; // rdi\n  __int64 v5; // r12\n  __int64 v6; // rbx\n  void *v7; // rdi\n  __int64 v8; // r15\n  int v9; // r12d\n  __int64 v10; // rax\n  unsigned int v11; // r12d\n  __int64 v12; // r13\n  int v13; // r14d\n  __int64 v14; // rax\n  __int64 result; // rax\n  __int64 v16; // rax\n  __int64 v17; // [rsp+8h] [rbp-68h]\n  __int128 v18; // [rsp+10h] [rbp-60h] BYREF\n  void *__p; // [rsp+20h] [rbp-50h]\n  std::string __str; // [rsp+30h] [rbp-40h] BYREF\n\n  v4 = *(_QWORD *)(a1 + 344);\n  v5 = a3;\n  v6 = cocos2d::CCDictionary::objectForKey_1(v4, a3);\n  if ( v6 )\n  {\n    if ( (*(_BYTE *)a2 & 1) == 0 )\n    {\nLABEL_3:\n      __p = *((void **)a2 + 2);\n      v18 = *a2;\n      goto LABEL_6;\n    }\n  }\n  else\n  {\n    v6 = sub_1007FE900(v4);\n    cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 344), v6, v5);\n    if ( (*(_BYTE *)a2 & 1) == 0 )\n      goto LABEL_3;\n  }\n  sub_10001AD30(&v18, *((const void **)a2 + 2), *((_QWORD *)a2 + 1));\nLABEL_6:\n  v17 = a1;\n  v7 = GameLevelManager::responseToDict((__int64)&v18, 1);\n  v8 = GJComment::create((__int64)v7);\n  if ( (v18 & 1) != 0 )\n  {\n    v7 = __p;\n    operator delete(__p);\n  }\n  v9 = *(_DWORD *)(v8 + 388);\n  v10 = GJAccountManager::sharedState((__int64)v7, 1);\n  if ( v9 == *(_DWORD *)(v10 + 352) - *(_DWORD *)(v10 + 356)\n    && *(_DWORD *)(v8 + 368) != -1\n    && (unsigned int)sub_1007FEF90(v6) )\n  {\n    v11 = 0;\n    while ( 1 )\n    {\n      v12 = sub_1007FEFE0(v6, v11);\n      v13 = *(_DWORD *)(v12 + 388);\n      v14 = GJAccountManager::sharedState(v6, v11);\n      if ( v13 == *(_DWORD *)(v14 + 352) - *(_DWORD *)(v14 + 356) && *(_DWORD *)(v12 + 368) == -1 )\n        break;\n      if ( ++v11 >= (unsigned int)sub_1007FEF90(v6) )\n        goto LABEL_16;\n    }\n    result = *(unsigned int *)(v8 + 368);\n    *(_DWORD *)(v12 + 368) = result;\n  }\n  else\n  {\nLABEL_16:\n    *(_BYTE *)(v8 + 433) = 1;\n    v16 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(v17 + 328), *(int *)(v8 + 388));\n    if ( v16 )\n    {\n      if ( (*(_BYTE *)(v16 + 320) & 1) != 0 )\n        sub_10001AD30(&__str, *(const void **)(v16 + 336), *(_QWORD *)(v16 + 328));\n      else\n        __str = *(std::string *)(v16 + 320);\n      std::string::operator=((std::string *)(v8 + 344), &__str);\n      if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )\n        operator delete(__str.__r_.__value_.__l.__data_);\n    }\n    return sub_1007FEBF0(v6, v8);\n  }\n  return result;\n}", "assembly": "; \n; GJMultiplayerManager::addComment from 0x10073a550 to 0x10073a733 (483 bytes)\n; \n; 2 xrefs:\n; > GJMultiplayerManager::onJoinLobbyCompleted @ 0x1007394cd\n; > GJMultiplayerManager::createAndAddComment @ 0x10073b4ea\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 12:36:26 +0000\n; \npush    rbp                                                            ; +0x0, 0x10073a550\nmov     rbp, rsp                                                       ; +0x1, 0x10073a551\npush    r15                                                            ; +0x4, 0x10073a554\npush    r14                                                            ; +0x6, 0x10073a556\npush    r13                                                            ; +0x8, 0x10073a558\npush    r12                                                            ; +0xa, 0x10073a55a\npush    rbx                                                            ; +0xc, 0x10073a55c\nsub     rsp, 48h                                                       ; +0xd, 0x10073a55d\nmov     r15, rsi                                                       ; +0x11, 0x10073a561\nmov     r14, rdi                                                       ; +0x14, 0x10073a564\nmov     rdi, [rdi+158h]                                                ; +0x17, 0x10073a567\nmovsxd  r12, edx                                                       ; +0x1e, 0x10073a56e\nmov     rsi, r12                                                       ; +0x21, 0x10073a571\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0x24, 0x10073a574\nmov     rbx, rax                                                       ; +0x29, 0x10073a579\ntest    rax, rax                                                       ; +0x2c, 0x10073a57c\njz      short loc_10073A599                                            ; +0x2f, 0x10073a57f\ntest    byte ptr [r15], 1                                              ; +0x31, 0x10073a581\njnz     short loc_10073A5B9                                            ; +0x35, 0x10073a585\nmov     rax, [r15+10h]                                                 ; +0x37, 0x10073a587\nmov     [rbp+__p], rax                                                 ; +0x3b, 0x10073a58b\nmovups  xmm0, xmmword ptr [r15]                                        ; +0x3f, 0x10073a58f\nmovaps  [rbp+var_60], xmm0                                             ; +0x43, 0x10073a593\njmp     short loc_10073A5CA                                            ; +0x47, 0x10073a597\ncall    sub_1007FE900                                                  ; +0x49, 0x10073a599\nmov     rbx, rax                                                       ; +0x4e, 0x10073a59e\nmov     rdi, [r14+158h]                                                ; +0x51, 0x10073a5a1\nmov     rsi, rax                                                       ; +0x58, 0x10073a5a8\nmov     rdx, r12                                                       ; +0x5b, 0x10073a5ab\ncall    cocos2d__CCDictionary__setObject_1                             ; +0x5e, 0x10073a5ae\ntest    byte ptr [r15], 1                                              ; +0x63, 0x10073a5b3\njz      short loc_10073A587                                            ; +0x67, 0x10073a5b7\nmov     rdx, [r15+8]                                                   ; +0x69, 0x10073a5b9\nmov     rsi, [r15+10h]                                                 ; +0x6d, 0x10073a5bd\nlea     rdi, [rbp+var_60]                                              ; +0x71, 0x10073a5c1\ncall    sub_10001AD30                                                  ; +0x75, 0x10073a5c5\nmov     [rbp+var_68], r14                                              ; +0x7a, 0x10073a5ca\nlea     r12, [rbp+__p]                                                 ; +0x7e, 0x10073a5ce\nlea     rdi, [rbp+var_60]                                              ; +0x82, 0x10073a5d2\nmov     esi, 1                                                         ; +0x86, 0x10073a5d6\ncall    GameLevelManager__responseToDict                               ; +0x8b, 0x10073a5db\nmov     rdi, rax                                                       ; +0x90, 0x10073a5e0\ncall    GJComment__create                                              ; +0x93, 0x10073a5e3\nmov     r15, rax                                                       ; +0x98, 0x10073a5e8\ntest    byte ptr [rbp+var_60], 1                                       ; +0x9b, 0x10073a5eb\njz      short loc_10073A5FA                                            ; +0x9f, 0x10073a5ef\nmov     rdi, [rbp+__p]; __p                                            ; +0xa1, 0x10073a5f1\ncall    __ZdlPv; operator delete(void *)                               ; +0xa5, 0x10073a5f5\nmov     r12d, [r15+184h]                                               ; +0xaa, 0x10073a5fa\ncall    GJAccountManager__sharedState                                  ; +0xb1, 0x10073a601\nmov     ecx, [rax+160h]                                                ; +0xb6, 0x10073a606\nsub     ecx, [rax+164h]                                                ; +0xbc, 0x10073a60c\ncmp     r12d, ecx                                                      ; +0xc2, 0x10073a612\njnz     loc_10073A698                                                  ; +0xc5, 0x10073a615\ncmp     dword ptr [r15+170h], 0FFFFFFFFh                               ; +0xcb, 0x10073a61b\njz      short loc_10073A698                                            ; +0xd3, 0x10073a623\nmov     rdi, rbx                                                       ; +0xd5, 0x10073a625\ncall    sub_1007FEF90                                                  ; +0xd8, 0x10073a628\ntest    eax, eax                                                       ; +0xdd, 0x10073a62d\njz      short loc_10073A698                                            ; +0xdf, 0x10073a62f\nxor     r12d, r12d                                                     ; +0xe1, 0x10073a631\njmp     short loc_10073A650                                            ; +0xe4, 0x10073a634\nalign 20h                                                              ; +0xe6, 0x10073a636\ninc     r12d                                                           ; +0xf0, 0x10073a640\nmov     rdi, rbx                                                       ; +0xf3, 0x10073a643\ncall    sub_1007FEF90                                                  ; +0xf6, 0x10073a646\ncmp     r12d, eax                                                      ; +0xfb, 0x10073a64b\njnb     short loc_10073A698                                            ; +0xfe, 0x10073a64e\nmov     rdi, rbx                                                       ; +0x100, 0x10073a650\nmov     esi, r12d                                                      ; +0x103, 0x10073a653\ncall    sub_1007FEFE0                                                  ; +0x106, 0x10073a656\nmov     r13, rax                                                       ; +0x10b, 0x10073a65b\nmov     r14d, [rax+184h]                                               ; +0x10e, 0x10073a65e\ncall    GJAccountManager__sharedState                                  ; +0x115, 0x10073a665\nmov     ecx, [rax+160h]                                                ; +0x11a, 0x10073a66a\nsub     ecx, [rax+164h]                                                ; +0x120, 0x10073a670\ncmp     r14d, ecx                                                      ; +0x126, 0x10073a676\njnz     short loc_10073A640                                            ; +0x129, 0x10073a679\ncmp     dword ptr [r13+170h], 0FFFFFFFFh                               ; +0x12b, 0x10073a67b\njnz     short loc_10073A640                                            ; +0x133, 0x10073a683\nmov     eax, [r15+170h]                                                ; +0x135, 0x10073a685\nmov     [r13+170h], eax                                                ; +0x13c, 0x10073a68c\njmp     loc_10073A724                                                  ; +0x143, 0x10073a693\nmov     byte ptr [r15+1B1h], 1                                         ; +0x148, 0x10073a698\nmov     rax, [rbp+var_68]                                              ; +0x150, 0x10073a6a0\nmov     rdi, [rax+148h]                                                ; +0x154, 0x10073a6a4\nmovsxd  rsi, dword ptr [r15+184h]                                      ; +0x15b, 0x10073a6ab\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0x162, 0x10073a6b2\ntest    rax, rax                                                       ; +0x167, 0x10073a6b7\njz      short loc_10073A719                                            ; +0x16a, 0x10073a6ba\ntest    byte ptr [rax+140h], 1                                         ; +0x16c, 0x10073a6bc\njnz     short loc_10073A6DC                                            ; +0x173, 0x10073a6c3\nadd     rax, 140h                                                      ; +0x175, 0x10073a6c5\nmov     rcx, [rax+10h]                                                 ; +0x17b, 0x10073a6cb\nmov     qword ptr [rbp+__str.__r_.__value_+10h], rcx                   ; +0x17f, 0x10073a6cf\nmovups  xmm0, xmmword ptr [rax]                                        ; +0x183, 0x10073a6d3\nmovaps  xmmword ptr [rbp+__str.__r_.__value_], xmm0                    ; +0x186, 0x10073a6d6\njmp     short loc_10073A6F3                                            ; +0x18a, 0x10073a6da\nmov     rdx, [rax+148h]                                                ; +0x18c, 0x10073a6dc\nmov     rsi, [rax+150h]                                                ; +0x193, 0x10073a6e3\nlea     rdi, [rbp+__str]                                               ; +0x19a, 0x10073a6ea\ncall    sub_10001AD30                                                  ; +0x19e, 0x10073a6ee\nlea     r12, [rbp+__str.__r_.__value_+10h]                             ; +0x1a3, 0x10073a6f3\nmov     rdi, r15                                                       ; +0x1a7, 0x10073a6f7\nadd     rdi, 158h; this                                                ; +0x1aa, 0x10073a6fa\nlea     rsi, [rbp+__str]; __str                                        ; +0x1b1, 0x10073a701\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x1b5, 0x10073a705\ntest    byte ptr [rbp+__str.__r_.__value_], 1                          ; +0x1ba, 0x10073a70a\njz      short loc_10073A719                                            ; +0x1be, 0x10073a70e\nmov     rdi, qword ptr [rbp+__str.__r_.__value_+10h]; __p              ; +0x1c0, 0x10073a710\ncall    __ZdlPv; operator delete(void *)                               ; +0x1c4, 0x10073a714\nmov     rdi, rbx                                                       ; +0x1c9, 0x10073a719\nmov     rsi, r15                                                       ; +0x1cc, 0x10073a71c\ncall    sub_1007FEBF0                                                  ; +0x1cf, 0x10073a71f\nadd     rsp, 48h                                                       ; +0x1d4, 0x10073a724\npop     rbx                                                            ; +0x1d8, 0x10073a728\npop     r12                                                            ; +0x1d9, 0x10073a729\npop     r13                                                            ; +0x1db, 0x10073a72b\npop     r14                                                            ; +0x1dd, 0x10073a72d\npop     r15                                                            ; +0x1df, 0x10073a72f\npop     rbp                                                            ; +0x1e1, 0x10073a731\nretn                                                                   ; +0x1e2, 0x10073a732", "xrefs": ["GJMultiplayerManager::onJoinLobbyCompleted @ 0x1007394cd", "GJMultiplayerManager::createAndAddComment @ 0x10073b4ea"], "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"}