{"type": "func", "start": 5371154176, "end": 5371154652, "name": "GameLevelManager::onUploadFriendRequestCompleted", "pseudocode": "// \n// GameLevelManager::onUploadFriendRequestCompleted from 0x140254f00 to 0x1402550dc (476 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::handleIt @ 0x140219fcb\n// > <???> @ 0x14091c580\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:28:43 +0000\n// \n\n// Hidden C++ exception states: #wind=3\nvoid __fastcall GameLevelManager::onUploadFriendRequestCompleted(__int64 a1, const void **a2, void **a3)\n{\n  _BYTE *v6; // rbx\n  size_t v7; // r8\n  __int64 v8; // rcx\n  void *v9; // rcx\n  __int64 SplitIntFromKey; // r14\n  const void *v11; // rcx\n  size_t v12; // r8\n  __int64 v13; // rcx\n  struct cocos2d::CCObject *v14; // rax\n  __int64 v15; // rcx\n  void (__fastcall ***v16)(_QWORD, _QWORD, __int64); // rcx\n  void *Block[2]; // [rsp+40h] [rbp-58h] BYREF\n  __int128 v18; // [rsp+50h] [rbp-48h]\n\n  v6 = a3;\n  if ( (unsigned __int64)a3[3] > 0xF )\n    v6 = *a3;\n  *(_OWORD *)Block = 0;\n  v18 = 0;\n  v7 = -1;\n  do\n    ++v7;\n  while ( v6[v7] );\n  sub_14003D230(Block, v6, v7);\n  cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 1200), Block);\n  if ( *((_QWORD *)&v18 + 1) > 0xFu )\n  {\n    v9 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v18 + 1) + 1LL) >= 0x1000 )\n    {\n      v9 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v9);\n  }\n  SplitIntFromKey = GameLevelManager::getSplitIntFromKey(v8, v6, 1u);\n  *(_OWORD *)Block = 0;\n  *(_QWORD *)&v18 = 2;\n  *((_QWORD *)&v18 + 1) = 15;\n  strcpy((char *)Block, \"-1\");\n  v11 = a2;\n  if ( (unsigned __int64)a2[3] > 0xF )\n    v11 = *a2;\n  v12 = (size_t)a2[2];\n  if ( v12 > 2 )\n    v12 = 2;\n  if ( !memcmp(v11, Block, v12) && a2[2] == (const void *)2 )\n  {\n    v13 = *(_QWORD *)(a1 + 1488);\n    if ( v13 )\n      (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v13 + 8LL))(v13, (unsigned int)SplitIntFromKey, 35);\n    GameLevelManager::resetTimerForKey(a1, v6);\n  }\n  else\n  {\n    v14 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 1232), SplitIntFromKey);\n    if ( v14 )\n    {\n      *((_DWORD *)v14 + 190) = 4;\n      v15 = *(_QWORD *)(a1 + 1480);\n      if ( v15 )\n        (*(void (__fastcall **)(__int64, struct cocos2d::CCObject *))(*(_QWORD *)v15 + 16LL))(v15, v14);\n    }\n    v16 = *(void (__fastcall ****)(_QWORD, _QWORD, __int64))(a1 + 1488);\n    if ( v16 )\n      (**v16)(v16, (unsigned int)SplitIntFromKey, 35);\n  }\n  sub_14003D310((__int64)a2);\n  sub_14003D310((__int64)a3);\n}", "assembly": "; \n; GameLevelManager::onUploadFriendRequestCompleted from 0x140254f00 to 0x1402550dc (476 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::handleIt @ 0x140219fcb\n; > <???> @ 0x14091c580\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:28:43 +0000\n; \npush    rbx                                                            ; +0x0, 0x140254f00\npush    rbp                                                            ; +0x2, 0x140254f02\npush    rsi                                                            ; +0x3, 0x140254f03\npush    rdi                                                            ; +0x4, 0x140254f04\npush    r14                                                            ; +0x5, 0x140254f05\nsub     rsp, 70h                                                       ; +0x7, 0x140254f07\nmov     rax, cs:__security_cookie                                      ; +0xb, 0x140254f0b\nxor     rax, rsp                                                       ; +0x12, 0x140254f12\nmov     [rsp+98h+var_38], rax                                          ; +0x15, 0x140254f15\nmov     rsi, r8                                                        ; +0x1a, 0x140254f1a\nmov     rdi, rdx                                                       ; +0x1d, 0x140254f1d\nmov     rbp, rcx                                                       ; +0x20, 0x140254f20\nmov     [rsp+98h+var_68], rdx                                          ; +0x23, 0x140254f23\nmov     [rsp+98h+var_60], r8                                           ; +0x28, 0x140254f28\nmov     rbx, r8                                                        ; +0x2d, 0x140254f2d\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x30, 0x140254f30\njbe     short loc_140254F3A                                            ; +0x35, 0x140254f35\nmov     rbx, [r8]                                                      ; +0x37, 0x140254f37\nxorps   xmm0, xmm0                                                     ; +0x3a, 0x140254f3a\nmovups  xmmword ptr [rsp+98h+Block], xmm0                              ; +0x3d, 0x140254f3d\nxorps   xmm1, xmm1                                                     ; +0x42, 0x140254f42\nmovdqu  [rsp+98h+var_48], xmm1                                         ; +0x45, 0x140254f45\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x4b, 0x140254f4b\ninc     r8                                                             ; +0x52, 0x140254f52\ncmp     byte ptr [rbx+r8], 0                                           ; +0x55, 0x140254f55\njnz     short loc_140254F52                                            ; +0x5a, 0x140254f5a\nmov     rdx, rbx                                                       ; +0x5c, 0x140254f5c\nlea     rcx, [rsp+98h+Block]                                           ; +0x5f, 0x140254f5f\ncall    sub_14003D230                                                  ; +0x64, 0x140254f64\nnop                                                                    ; +0x69, 0x140254f69\nlea     rdx, [rsp+98h+Block]                                           ; +0x6a, 0x140254f6a\nmov     rcx, [rbp+4B0h]                                                ; +0x6f, 0x140254f6f\ncall    cs:?removeObjectForKey@CCDictionary@cocos2d@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::removeObjectForKey(std::string const &) ; +0x76, 0x140254f76\nnop                                                                    ; +0x7c, 0x140254f7c\nmov     rdx, qword ptr [rsp+98h+var_48+8]                              ; +0x7d, 0x140254f7d\ncmp     rdx, 0Fh                                                       ; +0x82, 0x140254f82\njbe     short loc_140254FD0                                            ; +0x86, 0x140254f86\ninc     rdx                                                            ; +0x88, 0x140254f88\nmov     rcx, [rsp+98h+Block]; Block                                    ; +0x8b, 0x140254f8b\nmov     rax, rcx                                                       ; +0x90, 0x140254f90\ncmp     rdx, 1000h                                                     ; +0x93, 0x140254f93\njb      short loc_140254FCB                                            ; +0x9a, 0x140254f9a\nadd     rdx, 27h ; '''                                                 ; +0x9c, 0x140254f9c\nmov     rcx, [rcx-8]                                                   ; +0xa0, 0x140254fa0\nsub     rax, rcx                                                       ; +0xa4, 0x140254fa4\nsub     rax, 8                                                         ; +0xa7, 0x140254fa7\ncmp     rax, 1Fh                                                       ; +0xab, 0x140254fab\njbe     short loc_140254FCB                                            ; +0xaf, 0x140254faf\nmov     [rsp+98h+Reserved], 0; Reserved                                ; +0xb1, 0x140254fb1\nxor     r9d, r9d; LineNo                                               ; +0xba, 0x140254fba\nxor     r8d, r8d; FileName                                             ; +0xbd, 0x140254fbd\nxor     edx, edx; FunctionName                                         ; +0xc0, 0x140254fc0\nxor     ecx, ecx; Expression                                           ; +0xc2, 0x140254fc2\ncall    cs:_invoke_watson                                              ; +0xc4, 0x140254fc4\ndb 0CCh                                                                ; +0xca, 0x140254fca\ncall    j_j_free                                                       ; +0xcb, 0x140254fcb\nmov     r8d, 1                                                         ; +0xd0, 0x140254fd0\nmov     rdx, rbx                                                       ; +0xd6, 0x140254fd6\ncall    GameLevelManager__getSplitIntFromKey                           ; +0xd9, 0x140254fd9\nmovsxd  r14, eax                                                       ; +0xde, 0x140254fde\nxorps   xmm0, xmm0                                                     ; +0xe1, 0x140254fe1\nmovups  xmmword ptr [rsp+98h+Block], xmm0                              ; +0xe4, 0x140254fe4\nmov     edx, 2                                                         ; +0xe9, 0x140254fe9\nmov     qword ptr [rsp+98h+var_48], rdx                                ; +0xee, 0x140254fee\nmov     qword ptr [rsp+98h+var_48+8], 0Fh                              ; +0xf3, 0x140254ff3\nmov     eax, 312Dh                                                     ; +0xfc, 0x140254ffc\nmov     word ptr [rsp+98h+Block], ax                                   ; +0x101, 0x140255001\nmov     byte ptr [rsp+98h+Block+2], 0                                  ; +0x106, 0x140255006\nmov     rcx, rdi                                                       ; +0x10b, 0x14025500b\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x10e, 0x14025500e\njbe     short loc_140255018                                            ; +0x113, 0x140255013\nmov     rcx, [rdi]; Buf1                                               ; +0x115, 0x140255015\nmov     r8, [rdi+10h]                                                  ; +0x118, 0x140255018\ncmp     r8, rdx                                                        ; +0x11c, 0x14025501c\ncmova   r8, rdx; Size                                                  ; +0x11f, 0x14025501f\nlea     rdx, [rsp+98h+Block]; Buf2                                     ; +0x123, 0x140255023\ncall    memcmp                                                         ; +0x128, 0x140255028\ntest    eax, eax                                                       ; +0x12d, 0x14025502d\njnz     short loc_140255060                                            ; +0x12f, 0x14025502f\ncmp     qword ptr [rdi+10h], 2                                         ; +0x131, 0x140255031\njnz     short loc_140255060                                            ; +0x136, 0x140255036\nmov     rcx, [rbp+5D0h]                                                ; +0x138, 0x140255038\ntest    rcx, rcx                                                       ; +0x13f, 0x14025503f\njz      short loc_140255053                                            ; +0x142, 0x140255042\nmov     rax, [rcx]                                                     ; +0x144, 0x140255044\nmov     r8d, 23h ; '#'                                                 ; +0x147, 0x140255047\nmov     edx, r14d                                                      ; +0x14d, 0x14025504d\ncall    qword ptr [rax+8]                                              ; +0x150, 0x140255050\nmov     rdx, rbx                                                       ; +0x153, 0x140255053\nmov     rcx, rbp                                                       ; +0x156, 0x140255056\ncall    GameLevelManager__resetTimerForKey                             ; +0x159, 0x140255059\njmp     short loc_1402550B3                                            ; +0x15e, 0x14025505e\nmov     rdx, r14                                                       ; +0x160, 0x140255060\nmov     rcx, [rbp+4D0h]                                                ; +0x163, 0x140255063\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x16a, 0x14025506a\ntest    rax, rax                                                       ; +0x170, 0x140255070\njz      short loc_140255098                                            ; +0x173, 0x140255073\nmov     dword ptr [rax+2F8h], 4                                        ; +0x175, 0x140255075\nmov     rcx, [rbp+5C8h]                                                ; +0x17f, 0x14025507f\ntest    rcx, rcx                                                       ; +0x186, 0x140255086\njz      short loc_140255098                                            ; +0x189, 0x140255089\nmov     rdx, [rcx]                                                     ; +0x18b, 0x14025508b\nmov     r8, [rdx+10h]                                                  ; +0x18e, 0x14025508e\nmov     rdx, rax                                                       ; +0x192, 0x140255092\ncall    r8                                                             ; +0x195, 0x140255095\nmov     rcx, [rbp+5D0h]                                                ; +0x198, 0x140255098\ntest    rcx, rcx                                                       ; +0x19f, 0x14025509f\njz      short loc_1402550B3                                            ; +0x1a2, 0x1402550a2\nmov     rax, [rcx]                                                     ; +0x1a4, 0x1402550a4\nmov     r8d, 23h ; '#'                                                 ; +0x1a7, 0x1402550a7\nmov     edx, r14d                                                      ; +0x1ad, 0x1402550ad\ncall    qword ptr [rax]                                                ; +0x1b0, 0x1402550b0\nnop                                                                    ; +0x1b2, 0x1402550b2\nmov     rcx, rdi                                                       ; +0x1b3, 0x1402550b3\ncall    sub_14003D310                                                  ; +0x1b6, 0x1402550b6\nnop                                                                    ; +0x1bb, 0x1402550bb\nmov     rcx, rsi                                                       ; +0x1bc, 0x1402550bc\ncall    sub_14003D310                                                  ; +0x1bf, 0x1402550bf\nmov     rcx, [rsp+98h+var_38]                                          ; +0x1c4, 0x1402550c4\nxor     rcx, rsp; StackCookie                                          ; +0x1c9, 0x1402550c9\ncall    __security_check_cookie                                        ; +0x1cc, 0x1402550cc\nadd     rsp, 70h                                                       ; +0x1d1, 0x1402550d1\npop     r14                                                            ; +0x1d5, 0x1402550d5\npop     rdi                                                            ; +0x1d7, 0x1402550d7\npop     rsi                                                            ; +0x1d8, 0x1402550d8\npop     rbp                                                            ; +0x1d9, 0x1402550d9\npop     rbx                                                            ; +0x1da, 0x1402550da\nretn                                                                   ; +0x1db, 0x1402550db", "xrefs": ["GameLevelManager::handleIt @ 0x140219fcb", "<???> @ 0x14091c580"], "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"}