{"type": "func", "start": 6442701824, "end": 6442701993, "name": "sub_18003D400", "pseudocode": "// \n// sub_18003D400 from 0x18003d400 to 0x18003d4a9 (169 bytes)\n// \n// 6 xrefs:\n// > sub_18003F2C0 @ 0x18003f389\n// > sub_18003F830 @ 0x18003f8e6\n// > <???> @ 0x180137148\n// > <???> @ 0x180137158\n// > <???> @ 0x1801b1140\n// > <???> @ 0x1801b114c\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_18003D400(_BYTE *a1, unsigned __int64 a2, int a3)\n{\n  __int64 v3; // r8\n  unsigned __int64 i; // r9\n  __int64 v6; // rdx\n  __int64 v7; // rcx\n  __int64 result; // rax\n  __int64 v9; // r9\n\n  v3 = (unsigned int)(a3 - 1);\n  for ( i = a2; i >= 0x64; a1[v7] = result )\n  {\n    v6 = 2 * (unsigned int)(i % 0x64);\n    i /= 0x64u;\n    v7 = (unsigned int)(v3 - 1);\n    a1[v3] = a00010203040506[(unsigned int)(v6 + 1)];\n    v3 = (unsigned int)(v3 - 2);\n    result = (unsigned __int8)a00010203040506[v6];\n  }\n  if ( i >= 0xA )\n  {\n    v9 = (unsigned int)(2 * i);\n    a1[1] = a00010203040506[(unsigned int)(v9 + 1)];\n    result = (unsigned __int8)a00010203040506[v9];\n    *a1 = result;\n  }\n  else\n  {\n    *a1 = i + 48;\n  }\n  return result;\n}", "assembly": "; \n; sub_18003D400 from 0x18003d400 to 0x18003d4a9 (169 bytes)\n; \n; 6 xrefs:\n; > sub_18003F2C0 @ 0x18003f389\n; > sub_18003F830 @ 0x18003f8e6\n; > <???> @ 0x180137148\n; > <???> @ 0x180137158\n; > <???> @ 0x1801b1140\n; > <???> @ 0x1801b114c\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\nsub     rsp, 8                                                         ; +0x0, 0x18003d400\ndec     r8d                                                            ; +0x4, 0x18003d404\nlea     r11, a00010203040506; \"000102030405060708091011121314151617181\"... ; +0x7, 0x18003d407\nmov     r9, rdx                                                        ; +0xe, 0x18003d40e\nmov     r10, rcx                                                       ; +0x11, 0x18003d411\ncmp     rdx, 64h ; 'd'                                                 ; +0x14, 0x18003d414\njb      short loc_18003D47A                                            ; +0x18, 0x18003d418\nmov     [rsp+8+var_8], rbx                                             ; +0x1a, 0x18003d41a\nmov     rbx, 47AE147AE147AE15h                                         ; +0x1e, 0x18003d41e\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x28, 0x18003d428\nmov     rcx, r9                                                        ; +0x30, 0x18003d430\nmov     rax, rbx                                                       ; +0x33, 0x18003d433\nmul     r9                                                             ; +0x36, 0x18003d436\nsub     rcx, rdx                                                       ; +0x39, 0x18003d439\nshr     rcx, 1                                                         ; +0x3c, 0x18003d43c\nadd     rcx, rdx                                                       ; +0x3f, 0x18003d43f\nshr     rcx, 6                                                         ; +0x42, 0x18003d442\nimul    eax, ecx, 64h ; 'd'                                            ; +0x46, 0x18003d446\nsub     r9d, eax                                                       ; +0x49, 0x18003d449\nlea     edx, [r9+r9]                                                   ; +0x4c, 0x18003d44c\nmov     r9, rcx                                                        ; +0x50, 0x18003d450\nlea     ecx, [r8-1]                                                    ; +0x53, 0x18003d453\nlea     eax, [rdx+1]                                                   ; +0x57, 0x18003d457\nmovzx   eax, byte ptr [rax+r11]                                        ; +0x5a, 0x18003d45a\nmov     [r8+r10], al                                                   ; +0x5f, 0x18003d45f\nlea     r8d, [r8-2]                                                    ; +0x63, 0x18003d463\nmovzx   eax, byte ptr [rdx+r11]                                        ; +0x67, 0x18003d467\nmov     [rcx+r10], al                                                  ; +0x6c, 0x18003d46c\ncmp     r9, 64h ; 'd'                                                  ; +0x70, 0x18003d470\njnb     short loc_18003D430                                            ; +0x74, 0x18003d474\nmov     rbx, [rsp+8+var_8]                                             ; +0x76, 0x18003d476\ncmp     r9, 0Ah                                                        ; +0x7a, 0x18003d47a\njnb     short loc_18003D48C                                            ; +0x7e, 0x18003d47e\nadd     r9b, 30h ; '0'                                                 ; +0x80, 0x18003d480\nmov     [r10], r9b                                                     ; +0x84, 0x18003d484\nadd     rsp, 8                                                         ; +0x87, 0x18003d487\nretn                                                                   ; +0x8b, 0x18003d48b\nadd     r9d, r9d                                                       ; +0x8c, 0x18003d48c\nlea     eax, [r9+1]                                                    ; +0x8f, 0x18003d48f\nmovzx   eax, byte ptr [rax+r11]                                        ; +0x93, 0x18003d493\nmov     [r10+1], al                                                    ; +0x98, 0x18003d498\nmovzx   eax, byte ptr [r9+r11]                                         ; +0x9c, 0x18003d49c\nmov     [r10], al                                                      ; +0xa1, 0x18003d4a1\nadd     rsp, 8                                                         ; +0xa4, 0x18003d4a4\nretn                                                                   ; +0xa8, 0x18003d4a8", "xrefs": ["sub_18003F2C0 @ 0x18003f389", "sub_18003F830 @ 0x18003f8e6", "<???> @ 0x180137148", "<???> @ 0x180137158", "<???> @ 0x1801b1140", "<???> @ 0x1801b114c"], "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"}