{"type": "func", "start": 6442717136, "end": 6442717218, "name": "sub_180040FD0", "pseudocode": "// \n// sub_180040FD0 from 0x180040fd0 to 0x180041022 (82 bytes)\n// \n// 8 xrefs:\n// > sub_18003E830 @ 0x18003e8cb\n// > sub_18003EAD0 @ 0x18003eb63\n// > sub_18003ED90 @ 0x18003ee1b\n// > sub_18003F020 @ 0x18003f09f\n// > sub_18003F2C0 @ 0x18003f35f\n// > sub_18003F570 @ 0x18003f607\n// > sub_18003F830 @ 0x18003f8bc\n// > sub_18003FAC0 @ 0x18003fb40\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n__int64 __fastcall sub_180040FD0(unsigned __int64 a1)\n{\n  unsigned int v2; // ecx\n\n  v2 = 1;\n  if ( a1 < 0xA )\n    return v2;\n  while ( a1 >= 0x64 )\n  {\n    if ( a1 < 0x3E8 )\n      return v2 + 2;\n    if ( a1 < 0x2710 )\n      return v2 + 3;\n    v2 += 4;\n    a1 /= 0x2710u;\n    if ( a1 < 0xA )\n      return v2;\n  }\n  return v2 + 1;\n}", "assembly": "; \n; sub_180040FD0 from 0x180040fd0 to 0x180041022 (82 bytes)\n; \n; 8 xrefs:\n; > sub_18003E830 @ 0x18003e8cb\n; > sub_18003EAD0 @ 0x18003eb63\n; > sub_18003ED90 @ 0x18003ee1b\n; > sub_18003F020 @ 0x18003f09f\n; > sub_18003F2C0 @ 0x18003f35f\n; > sub_18003F570 @ 0x18003f607\n; > sub_18003F830 @ 0x18003f8bc\n; > sub_18003FAC0 @ 0x18003fb40\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     rdx, rcx                                                       ; +0x0, 0x180040fd0\nmov     ecx, 1                                                         ; +0x3, 0x180040fd3\ncmp     rdx, 0Ah                                                       ; +0x8, 0x180040fd8\njb      short loc_180041013                                            ; +0xc, 0x180040fdc\nmov     r8, 346DC5D63886594Bh                                          ; +0xe, 0x180040fde\ncmp     rdx, 64h ; 'd'                                                 ; +0x18, 0x180040fe8\njb      short loc_18004101E                                            ; +0x1c, 0x180040fec\ncmp     rdx, 3E8h                                                      ; +0x1e, 0x180040fee\njb      short loc_18004101A                                            ; +0x25, 0x180040ff5\ncmp     rdx, 2710h                                                     ; +0x27, 0x180040ff7\njb      short loc_180041016                                            ; +0x2e, 0x180040ffe\nmov     rax, r8                                                        ; +0x30, 0x180041000\nadd     ecx, 4                                                         ; +0x33, 0x180041003\nmul     rdx                                                            ; +0x36, 0x180041006\nshr     rdx, 0Bh                                                       ; +0x39, 0x180041009\ncmp     rdx, 0Ah                                                       ; +0x3d, 0x18004100d\njnb     short loc_180040FE8                                            ; +0x41, 0x180041011\nmov     eax, ecx                                                       ; +0x43, 0x180041013\nretn                                                                   ; +0x45, 0x180041015\nlea     eax, [rcx+3]                                                   ; +0x46, 0x180041016\nretn                                                                   ; +0x49, 0x180041019\nlea     eax, [rcx+2]                                                   ; +0x4a, 0x18004101a\nretn                                                                   ; +0x4d, 0x18004101d\nlea     eax, [rcx+1]                                                   ; +0x4e, 0x18004101e\nretn                                                                   ; +0x51, 0x180041021", "xrefs": ["sub_18003E830 @ 0x18003e8cb", "sub_18003EAD0 @ 0x18003eb63", "sub_18003ED90 @ 0x18003ee1b", "sub_18003F020 @ 0x18003f09f", "sub_18003F2C0 @ 0x18003f35f", "sub_18003F570 @ 0x18003f607", "sub_18003F830 @ 0x18003f8bc", "sub_18003FAC0 @ 0x18003fb40"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}