{"type": "func", "start": 6442539232, "end": 6442539370, "name": "sub_1800158E0", "pseudocode": "// \n// sub_1800158E0 from 0x1800158e0 to 0x18001596a (138 bytes)\n// \n// 3 xrefs:\n// > sub_18003E830 @ 0x18003e8f4\n// > sub_18003ED90 @ 0x18003ee44\n// > <???> @ 0x1801ae4d0\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_1800158E0(_BYTE *a1, unsigned int a2, int a3)\n{\n  __int64 v3; // r10\n  unsigned int i; // r9d\n  __int64 v6; // rcx\n  __int64 v7; // r8\n  __int64 result; // rax\n  __int64 v9; // r9\n\n  v3 = (unsigned int)(a3 - 1);\n  for ( i = a2; i >= 0x64; a1[v6] = result )\n  {\n    v6 = (unsigned int)(v3 - 1);\n    v7 = 2 * (i % 0x64);\n    i /= 0x64u;\n    a1[v3] = a00010203040506[(unsigned int)(v7 + 1)];\n    v3 = (unsigned int)(v3 - 2);\n    result = (unsigned __int8)a00010203040506[v7];\n  }\n  if ( i >= 0xA )\n  {\n    v9 = 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_1800158E0 from 0x1800158e0 to 0x18001596a (138 bytes)\n; \n; 3 xrefs:\n; > sub_18003E830 @ 0x18003e8f4\n; > sub_18003ED90 @ 0x18003ee44\n; > <???> @ 0x1801ae4d0\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, 0x1800158e0\nlea     r10d, [r8-1]                                                   ; +0x5, 0x1800158e5\nmov     r9d, edx                                                       ; +0x9, 0x1800158e9\nlea     rbx, a00010203040506; \"000102030405060708091011121314151617181\"... ; +0xc, 0x1800158ec\nmov     r11, rcx                                                       ; +0x13, 0x1800158f3\ncmp     edx, 64h ; 'd'                                                 ; +0x16, 0x1800158f6\njb      short loc_18001593A                                            ; +0x19, 0x1800158f9\nnop     dword ptr [rax+rax+00h]                                        ; +0x1b, 0x1800158fb\nmov     eax, 51EB851Fh                                                 ; +0x20, 0x180015900\nlea     ecx, [r10-1]                                                   ; +0x25, 0x180015905\nmul     r9d                                                            ; +0x29, 0x180015909\nshr     edx, 5                                                         ; +0x2c, 0x18001590c\nimul    eax, edx, 64h ; 'd'                                            ; +0x2f, 0x18001590f\nsub     r9d, eax                                                       ; +0x32, 0x180015912\nlea     r8d, [r9+r9]                                                   ; +0x35, 0x180015915\nmov     r9d, edx                                                       ; +0x39, 0x180015919\nlea     eax, [r8+1]                                                    ; +0x3c, 0x18001591c\nmovzx   eax, byte ptr [rax+rbx]                                        ; +0x40, 0x180015920\nmov     [r10+r11], al                                                  ; +0x44, 0x180015924\nlea     r10d, [r10-2]                                                  ; +0x48, 0x180015928\nmovzx   eax, byte ptr [r8+rbx]                                         ; +0x4c, 0x18001592c\nmov     [rcx+r11], al                                                  ; +0x51, 0x180015931\ncmp     edx, 64h ; 'd'                                                 ; +0x55, 0x180015935\njnb     short loc_180015900                                            ; +0x58, 0x180015938\ncmp     r9d, 0Ah                                                       ; +0x5a, 0x18001593a\njnb     short loc_18001594D                                            ; +0x5e, 0x18001593e\nadd     r9b, 30h ; '0'                                                 ; +0x60, 0x180015940\nmov     [r11], r9b                                                     ; +0x64, 0x180015944\nmov     rbx, [rsp+arg_0]                                               ; +0x67, 0x180015947\nretn                                                                   ; +0x6c, 0x18001594c\nadd     r9d, r9d                                                       ; +0x6d, 0x18001594d\nlea     eax, [r9+1]                                                    ; +0x70, 0x180015950\nmovzx   eax, byte ptr [rax+rbx]                                        ; +0x74, 0x180015954\nmov     [r11+1], al                                                    ; +0x78, 0x180015958\nmovzx   eax, byte ptr [r9+rbx]                                         ; +0x7c, 0x18001595c\nmov     [r11], al                                                      ; +0x81, 0x180015961\nmov     rbx, [rsp+arg_0]                                               ; +0x84, 0x180015964\nretn                                                                   ; +0x89, 0x180015969", "xrefs": ["sub_18003E830 @ 0x18003e8f4", "sub_18003ED90 @ 0x18003ee44", "<???> @ 0x1801ae4d0"], "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"}