{"type": "func", "start": 6442701680, "end": 6442701824, "name": "sub_18003D370", "pseudocode": "// \n// sub_18003D370 from 0x18003d370 to 0x18003d400 (144 bytes)\n// \n// 3 xrefs:\n// > sub_18003EAD0 @ 0x18003eb96\n// > sub_18003F020 @ 0x18003f0d2\n// > <???> @ 0x1801b1140\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_18003D370(_WORD *a1, unsigned int a2, int a3)\n{\n  __int64 v3; // r10\n  unsigned int i; // r9d\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 * (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 = 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_18003D370 from 0x18003d370 to 0x18003d400 (144 bytes)\n; \n; 3 xrefs:\n; > sub_18003EAD0 @ 0x18003eb96\n; > sub_18003F020 @ 0x18003f0d2\n; > <???> @ 0x1801b1140\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     [rsp+arg_0], rbx                                               ; +0x0, 0x18003d370\nlea     r10d, [r8-1]                                                   ; +0x5, 0x18003d375\nmov     r9d, edx                                                       ; +0x9, 0x18003d379\nlea     rbx, a00010203040506; \"000102030405060708091011121314151617181\"... ; +0xc, 0x18003d37c\ncmp     edx, 64h ; 'd'                                                 ; +0x13, 0x18003d383\njb      short loc_18003D3CC                                            ; +0x16, 0x18003d386\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x18, 0x18003d388\nmov     eax, 51EB851Fh                                                 ; +0x20, 0x18003d390\nmul     r9d                                                            ; +0x25, 0x18003d395\nshr     edx, 5                                                         ; +0x28, 0x18003d398\nimul    eax, edx, 64h ; 'd'                                            ; +0x2b, 0x18003d39b\nsub     r9d, eax                                                       ; +0x2e, 0x18003d39e\nlea     r8d, [r9+r9]                                                   ; +0x31, 0x18003d3a1\nmov     r9d, edx                                                       ; +0x35, 0x18003d3a5\nlea     eax, [r8+1]                                                    ; +0x38, 0x18003d3a8\nmovsx   edx, byte ptr [rax+rbx]                                        ; +0x3c, 0x18003d3ac\nlea     eax, [r10-1]                                                   ; +0x40, 0x18003d3b0\nmov     [rcx+r10*2], dx                                                ; +0x44, 0x18003d3b4\nlea     r10d, [r10-2]                                                  ; +0x49, 0x18003d3b9\nmovsx   edx, byte ptr [r8+rbx]                                         ; +0x4d, 0x18003d3bd\nmov     [rcx+rax*2], dx                                                ; +0x52, 0x18003d3c2\ncmp     r9d, 64h ; 'd'                                                 ; +0x56, 0x18003d3c6\njnb     short loc_18003D390                                            ; +0x5a, 0x18003d3ca\ncmp     r9d, 0Ah                                                       ; +0x5c, 0x18003d3cc\njnb     short loc_18003D3E3                                            ; +0x60, 0x18003d3d0\nadd     r9b, 30h ; '0'                                                 ; +0x62, 0x18003d3d2\nmovsx   eax, r9b                                                       ; +0x66, 0x18003d3d6\nmov     [rcx], ax                                                      ; +0x6a, 0x18003d3da\nmov     rbx, [rsp+arg_0]                                               ; +0x6d, 0x18003d3dd\nretn                                                                   ; +0x72, 0x18003d3e2\nadd     r9d, r9d                                                       ; +0x73, 0x18003d3e3\nlea     eax, [r9+1]                                                    ; +0x76, 0x18003d3e6\nmovsx   eax, byte ptr [rax+rbx]                                        ; +0x7a, 0x18003d3ea\nmov     [rcx+2], ax                                                    ; +0x7e, 0x18003d3ee\nmovsx   eax, byte ptr [r9+rbx]                                         ; +0x82, 0x18003d3f2\nmov     [rcx], ax                                                      ; +0x87, 0x18003d3f7\nmov     rbx, [rsp+arg_0]                                               ; +0x8a, 0x18003d3fa\nretn                                                                   ; +0x8f, 0x18003d3ff", "xrefs": ["sub_18003EAD0 @ 0x18003eb96", "sub_18003F020 @ 0x18003f0d2", "<???> @ 0x1801b1140"], "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"}