{"type": "func", "start": 6442702000, "end": 6442702172, "name": "sub_18003D4B0", "pseudocode": "// \n// sub_18003D4B0 from 0x18003d4b0 to 0x18003d55c (172 bytes)\n// \n// 5 xrefs:\n// > sub_18003F570 @ 0x18003f63b\n// > sub_18003FAC0 @ 0x18003fb74\n// > <???> @ 0x18013718c\n// > <???> @ 0x18013719c\n// > <???> @ 0x1801b1170\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_18003D4B0(_WORD *a1, unsigned __int64 a2, int a3)\n{\n  __int64 v3; // r10\n  unsigned __int64 i; // r9\n  __int64 v5; // r8\n  __int64 v6; // rax\n  char v7; // r9\n  __int64 result; // rax\n  __int64 v9; // r9\n\n  v3 = (unsigned int)(a3 - 1);\n  for ( i = a2; i >= 0x64; a1[v6] = a00010203040506[v5] )\n  {\n    v5 = 2 * (unsigned int)(i % 0x64);\n    i /= 0x64u;\n    v6 = (unsigned int)(v3 - 1);\n    a1[v3] = a00010203040506[(unsigned int)(v5 + 1)];\n    v3 = (unsigned int)(v3 - 2);\n  }\n  if ( i >= 0xA )\n  {\n    v9 = (unsigned int)(2 * i);\n    a1[1] = a00010203040506[(unsigned int)(v9 + 1)];\n    result = (unsigned int)a00010203040506[v9];\n    *a1 = a00010203040506[v9];\n  }\n  else\n  {\n    v7 = i + 48;\n    *a1 = v7;\n    return (unsigned int)v7;\n  }\n  return result;\n}", "assembly": "; \n; sub_18003D4B0 from 0x18003d4b0 to 0x18003d55c (172 bytes)\n; \n; 5 xrefs:\n; > sub_18003F570 @ 0x18003f63b\n; > sub_18003FAC0 @ 0x18003fb74\n; > <???> @ 0x18013718c\n; > <???> @ 0x18013719c\n; > <???> @ 0x1801b1170\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\npush    rbx                                                            ; +0x0, 0x18003d4b0\nlea     r10d, [r8-1]                                                   ; +0x2, 0x18003d4b2\nmov     r9, rdx                                                        ; +0x6, 0x18003d4b6\nlea     rbx, a00010203040506; \"000102030405060708091011121314151617181\"... ; +0x9, 0x18003d4b9\nmov     r11, rcx                                                       ; +0x10, 0x18003d4c0\ncmp     rdx, 64h ; 'd'                                                 ; +0x13, 0x18003d4c3\njb      short loc_18003D52D                                            ; +0x17, 0x18003d4c7\nmov     [rsp+8+arg_0], rdi                                             ; +0x19, 0x18003d4c9\nmov     rdi, 47AE147AE147AE15h                                         ; +0x1e, 0x18003d4ce\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x28, 0x18003d4d8\nmov     rcx, r9                                                        ; +0x30, 0x18003d4e0\nmov     rax, rdi                                                       ; +0x33, 0x18003d4e3\nmul     r9                                                             ; +0x36, 0x18003d4e6\nsub     rcx, rdx                                                       ; +0x39, 0x18003d4e9\nshr     rcx, 1                                                         ; +0x3c, 0x18003d4ec\nadd     rcx, rdx                                                       ; +0x3f, 0x18003d4ef\nshr     rcx, 6                                                         ; +0x42, 0x18003d4f2\nimul    eax, ecx, 64h ; 'd'                                            ; +0x46, 0x18003d4f6\nsub     r9d, eax                                                       ; +0x49, 0x18003d4f9\nlea     r8d, [r9+r9]                                                   ; +0x4c, 0x18003d4fc\nmov     r9, rcx                                                        ; +0x50, 0x18003d500\nlea     eax, [r8+1]                                                    ; +0x53, 0x18003d503\nmovsx   edx, byte ptr [rax+rbx]                                        ; +0x57, 0x18003d507\nlea     eax, [r10-1]                                                   ; +0x5b, 0x18003d50b\nmov     [r11+r10*2], dx                                                ; +0x5f, 0x18003d50f\nlea     r10d, [r10-2]                                                  ; +0x64, 0x18003d514\nmovsx   edx, byte ptr [r8+rbx]                                         ; +0x68, 0x18003d518\nmov     [r11+rax*2], dx                                                ; +0x6d, 0x18003d51d\ncmp     rcx, 64h ; 'd'                                                 ; +0x72, 0x18003d522\njnb     short loc_18003D4E0                                            ; +0x76, 0x18003d526\nmov     rdi, [rsp+8+arg_0]                                             ; +0x78, 0x18003d528\ncmp     r9, 0Ah                                                        ; +0x7d, 0x18003d52d\njnb     short loc_18003D541                                            ; +0x81, 0x18003d531\nadd     r9b, 30h ; '0'                                                 ; +0x83, 0x18003d533\nmovsx   eax, r9b                                                       ; +0x87, 0x18003d537\nmov     [r11], ax                                                      ; +0x8b, 0x18003d53b\npop     rbx                                                            ; +0x8f, 0x18003d53f\nretn                                                                   ; +0x90, 0x18003d540\nadd     r9d, r9d                                                       ; +0x91, 0x18003d541\nlea     eax, [r9+1]                                                    ; +0x94, 0x18003d544\nmovsx   eax, byte ptr [rax+rbx]                                        ; +0x98, 0x18003d548\nmov     [r11+2], ax                                                    ; +0x9c, 0x18003d54c\nmovsx   eax, byte ptr [r9+rbx]                                         ; +0xa1, 0x18003d551\nmov     [r11], ax                                                      ; +0xa6, 0x18003d556\npop     rbx                                                            ; +0xaa, 0x18003d55a\nretn                                                                   ; +0xab, 0x18003d55b", "xrefs": ["sub_18003F570 @ 0x18003f63b", "sub_18003FAC0 @ 0x18003fb74", "<???> @ 0x18013718c", "<???> @ 0x18013719c", "<???> @ 0x1801b1170"], "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"}