{"type": "func", "start": 4298206640, "end": 4298206772, "name": "GameStatsManager::usernameForAccountID", "pseudocode": "// \n// GameStatsManager::usernameForAccountID from 0x100316db0 to 0x100316e34 (132 bytes)\n// \n// 2 xrefs:\n// > ItemInfoPopup::init @ 0x10035bcf5\n// > GameLevelManager::tryGetUsername @ 0x10054067f\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:28:41 +0000\n// \n\n_QWORD *__fastcall GameStatsManager::usernameForAccountID(_QWORD *a1, __int64 a2, int a3)\n{\n  __int64 v3; // rcx\n  __int64 v4; // rsi\n  __int64 v5; // rax\n  __int64 v7; // rax\n\n  v3 = *(_QWORD *)(a2 + 872);\n  if ( !v3 )\n    goto LABEL_8;\n  v4 = a2 + 872;\n  v5 = v4;\n  do\n  {\n    if ( *(_DWORD *)(v3 + 32) >= a3 )\n      v5 = v3;\n    v3 = *(_QWORD *)(v3 + 8LL * (*(_DWORD *)(v3 + 32) < a3));\n  }\n  while ( v3 );\n  if ( v5 == v4 || *(_DWORD *)(v5 + 32) > a3 )\n  {\nLABEL_8:\n    *(_WORD *)a1 = 0;\n    return a1;\n  }\n  if ( (*(_BYTE *)(v5 + 40) & 1) == 0 )\n  {\n    v7 = v5 + 40;\n    a1[2] = *(_QWORD *)(v7 + 16);\n    *(_OWORD *)a1 = *(_OWORD *)v7;\n    return a1;\n  }\n  sub_10001AD30(a1, *(const void **)(v5 + 56), *(_QWORD *)(v5 + 48));\n  return a1;\n}", "assembly": "; \n; GameStatsManager::usernameForAccountID from 0x100316db0 to 0x100316e34 (132 bytes)\n; \n; 2 xrefs:\n; > ItemInfoPopup::init @ 0x10035bcf5\n; > GameLevelManager::tryGetUsername @ 0x10054067f\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:28:41 +0000\n; \npush    rbp                                                            ; +0x0, 0x100316db0\nmov     rbp, rsp                                                       ; +0x1, 0x100316db1\npush    rbx                                                            ; +0x4, 0x100316db4\npush    rax                                                            ; +0x5, 0x100316db5\nmov     rcx, [rsi+368h]                                                ; +0x6, 0x100316db6\ntest    rcx, rcx                                                       ; +0xd, 0x100316dbd\njz      short loc_100316DF1                                            ; +0x10, 0x100316dc0\nadd     rsi, 368h                                                      ; +0x12, 0x100316dc2\nmov     rax, rsi                                                       ; +0x19, 0x100316dc9\nnop     dword ptr [rax+00h]                                            ; +0x1c, 0x100316dcc\nxor     r8d, r8d                                                       ; +0x20, 0x100316dd0\ncmp     [rcx+20h], edx                                                 ; +0x23, 0x100316dd3\nsetl    r8b                                                            ; +0x26, 0x100316dd6\ncmovge  rax, rcx                                                       ; +0x2a, 0x100316dda\nmov     rcx, [rcx+r8*8]                                                ; +0x2e, 0x100316dde\ntest    rcx, rcx                                                       ; +0x32, 0x100316de2\njnz     short loc_100316DD0                                            ; +0x35, 0x100316de5\ncmp     rax, rsi                                                       ; +0x37, 0x100316de7\njz      short loc_100316DF1                                            ; +0x3a, 0x100316dea\ncmp     [rax+20h], edx                                                 ; +0x3c, 0x100316dec\njle     short loc_100316E00                                            ; +0x3f, 0x100316def\nmov     word ptr [rdi], 0                                              ; +0x41, 0x100316df1\nmov     rax, rdi                                                       ; +0x46, 0x100316df6\nadd     rsp, 8                                                         ; +0x49, 0x100316df9\npop     rbx                                                            ; +0x4d, 0x100316dfd\npop     rbp                                                            ; +0x4e, 0x100316dfe\nretn                                                                   ; +0x4f, 0x100316dff\ntest    byte ptr [rax+28h], 1                                          ; +0x50, 0x100316e00\njnz     short loc_100316E1A                                            ; +0x54, 0x100316e04\nadd     rax, 28h ; '('                                                 ; +0x56, 0x100316e06\nmov     rcx, [rax+10h]                                                 ; +0x5a, 0x100316e0a\nmov     [rdi+10h], rcx                                                 ; +0x5e, 0x100316e0e\nmovups  xmm0, xmmword ptr [rax]                                        ; +0x62, 0x100316e12\nmovups  xmmword ptr [rdi], xmm0                                        ; +0x65, 0x100316e15\njmp     short loc_100316DF6                                            ; +0x68, 0x100316e18\nmov     rdx, [rax+30h]                                                 ; +0x6a, 0x100316e1a\nmov     rsi, [rax+38h]                                                 ; +0x6e, 0x100316e1e\nmov     rbx, rdi                                                       ; +0x72, 0x100316e22\ncall    sub_10001AD30                                                  ; +0x75, 0x100316e25\nmov     rax, rbx                                                       ; +0x7a, 0x100316e2a\nadd     rsp, 8                                                         ; +0x7d, 0x100316e2d\npop     rbx                                                            ; +0x81, 0x100316e31\npop     rbp                                                            ; +0x82, 0x100316e32\nretn                                                                   ; +0x83, 0x100316e33", "xrefs": ["ItemInfoPopup::init @ 0x10035bcf5", "GameLevelManager::tryGetUsername @ 0x10054067f"], "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"}