{"type": "func", "start": 4300721744, "end": 4300721908, "name": "GameLevelManager::storedFriendForAccountID", "pseudocode": "// \n// GameLevelManager::storedFriendForAccountID from 0x10057ce50 to 0x10057cef4 (164 bytes)\n// \n// 1 xrefs:\n// > GJCompactUserCell::buildUserRow @ 0x10023f7d1\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:32:19 +0000\n// \n\n__int64 __fastcall GameLevelManager::storedFriendForAccountID(__int64 a1, int a2)\n{\n  __int64 v2; // rdi\n  __int64 v3; // r14\n  unsigned int *v4; // rax\n  __int64 *v5; // rcx\n  unsigned __int64 v6; // rdx\n  __int64 result; // rax\n  char v8; // [rsp+8h] [rbp-28h] BYREF\n  void *v9[4]; // [rsp+9h] [rbp-27h] BYREF\n\n  v2 = *(_QWORD *)(a1 + 1040);\n  v8 = 22;\n  strcpy((char *)v9, \"get_friends\");\n  v3 = cocos2d::CCDictionary::objectForKey(v2, &v8);\n  if ( (v8 & 1) != 0 )\n    operator delete(*(void **)((char *)&v9[1] + 7));\n  if ( v3 != 0 && a2 > 0 )\n  {\n    v4 = *(unsigned int **)(v3 + 56);\n    if ( *v4 )\n    {\n      v5 = *((__int64 **)v4 + 2);\n      v6 = (unsigned __int64)&v5[*v4 - 1];\n      do\n      {\n        result = *v5;\n        if ( !*v5 )\n          break;\n        if ( *(_DWORD *)(result + 376) == a2 )\n          return result;\n        ++v5;\n      }\n      while ( (unsigned __int64)v5 <= v6 );\n    }\n  }\n  return 0;\n}", "assembly": "; \n; GameLevelManager::storedFriendForAccountID from 0x10057ce50 to 0x10057cef4 (164 bytes)\n; \n; 1 xrefs:\n; > GJCompactUserCell::buildUserRow @ 0x10023f7d1\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:32:19 +0000\n; \npush    rbp                                                            ; +0x0, 0x10057ce50\nmov     rbp, rsp                                                       ; +0x1, 0x10057ce51\npush    r14                                                            ; +0x4, 0x10057ce54\npush    rbx                                                            ; +0x6, 0x10057ce56\nsub     rsp, 20h                                                       ; +0x7, 0x10057ce57\nmov     ebx, esi                                                       ; +0xb, 0x10057ce5b\nmov     rdi, [rdi+410h]                                                ; +0xd, 0x10057ce5d\nmov     [rbp+var_28], 16h                                              ; +0x14, 0x10057ce64\nmov     rax, 656972665F746567h                                         ; +0x18, 0x10057ce68\nmov     [rbp+var_27], rax                                              ; +0x22, 0x10057ce72\nmov     dword ptr [rbp+var_27+7], 73646E65h                            ; +0x26, 0x10057ce76\nmov     byte ptr [rbp-1Ch], 0                                          ; +0x2d, 0x10057ce7d\nlea     rsi, [rbp+var_28]                                              ; +0x31, 0x10057ce81\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x35, 0x10057ce85\nmov     r14, rax                                                       ; +0x3a, 0x10057ce8a\ntest    [rbp+var_28], 1                                                ; +0x3d, 0x10057ce8d\njz      short loc_10057CE9C                                            ; +0x41, 0x10057ce91\nmov     rdi, [rbp+__p]; __p                                            ; +0x43, 0x10057ce93\ncall    __ZdlPv; operator delete(void *)                               ; +0x47, 0x10057ce97\ntest    r14, r14                                                       ; +0x4c, 0x10057ce9c\nsetz    al                                                             ; +0x4f, 0x10057ce9f\ntest    ebx, ebx                                                       ; +0x52, 0x10057cea2\nsetle   cl                                                             ; +0x54, 0x10057cea4\nor      cl, al                                                         ; +0x57, 0x10057cea7\njnz     short loc_10057CEE9                                            ; +0x59, 0x10057cea9\nmov     rax, [r14+38h]                                                 ; +0x5b, 0x10057ceab\nmov     edx, [rax]                                                     ; +0x5f, 0x10057ceaf\ntest    rdx, rdx                                                       ; +0x61, 0x10057ceb1\njz      short loc_10057CEE9                                            ; +0x64, 0x10057ceb4\nmov     rcx, [rax+10h]                                                 ; +0x66, 0x10057ceb6\nlea     rdx, [rcx+rdx*8]                                               ; +0x6a, 0x10057ceba\nadd     rdx, 0FFFFFFFFFFFFFFF8h                                        ; +0x6e, 0x10057cebe\nnop     word ptr [rax+rax+00000000h]                                   ; +0x72, 0x10057cec2\nmov     rax, [rcx]                                                     ; +0x80, 0x10057ced0\ntest    rax, rax                                                       ; +0x83, 0x10057ced3\njz      short loc_10057CEE9                                            ; +0x86, 0x10057ced6\ncmp     [rax+178h], ebx                                                ; +0x88, 0x10057ced8\njz      short loc_10057CEEB                                            ; +0x8e, 0x10057cede\nadd     rcx, 8                                                         ; +0x90, 0x10057cee0\ncmp     rcx, rdx                                                       ; +0x94, 0x10057cee4\njbe     short loc_10057CED0                                            ; +0x97, 0x10057cee7\nxor     eax, eax                                                       ; +0x99, 0x10057cee9\nadd     rsp, 20h                                                       ; +0x9b, 0x10057ceeb\npop     rbx                                                            ; +0x9f, 0x10057ceef\npop     r14                                                            ; +0xa0, 0x10057cef0\npop     rbp                                                            ; +0xa2, 0x10057cef2\nretn                                                                   ; +0xa3, 0x10057cef3", "xrefs": ["GJCompactUserCell::buildUserRow @ 0x10023f7d1"], "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"}