{"type": "func", "start": 6442539088, "end": 6442539226, "name": "sub_180015850", "pseudocode": "// \n// sub_180015850 from 0x180015850 to 0x1800158da (138 bytes)\n// \n// 3 xrefs:\n// > sub_18003EF10 @ 0x18003efd9\n// > sub_18003F450 @ 0x18003f502\n// > <???> @ 0x1801b8584\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:21:24 +0000\n// \n\n__int64 __fastcall sub_180015850(_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_180015850 from 0x180015850 to 0x1800158da (138 bytes)\n; \n; 3 xrefs:\n; > sub_18003EF10 @ 0x18003efd9\n; > sub_18003F450 @ 0x18003f502\n; > <???> @ 0x1801b8584\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:21:24 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180015850\nlea     r10d, [r8-1]                                                   ; +0x5, 0x180015855\nmov     r9d, edx                                                       ; +0x9, 0x180015859\nlea     rbx, a00010203040506; \"000102030405060708091011121314151617181\"... ; +0xc, 0x18001585c\nmov     r11, rcx                                                       ; +0x13, 0x180015863\ncmp     edx, 64h ; 'd'                                                 ; +0x16, 0x180015866\njb      short loc_1800158AA                                            ; +0x19, 0x180015869\nnop     dword ptr [rax+rax+00h]                                        ; +0x1b, 0x18001586b\nmov     eax, 51EB851Fh                                                 ; +0x20, 0x180015870\nlea     ecx, [r10-1]                                                   ; +0x25, 0x180015875\nmul     r9d                                                            ; +0x29, 0x180015879\nshr     edx, 5                                                         ; +0x2c, 0x18001587c\nimul    eax, edx, 64h ; 'd'                                            ; +0x2f, 0x18001587f\nsub     r9d, eax                                                       ; +0x32, 0x180015882\nlea     r8d, [r9+r9]                                                   ; +0x35, 0x180015885\nmov     r9d, edx                                                       ; +0x39, 0x180015889\nlea     eax, [r8+1]                                                    ; +0x3c, 0x18001588c\nmovzx   eax, byte ptr [rax+rbx]                                        ; +0x40, 0x180015890\nmov     [r10+r11], al                                                  ; +0x44, 0x180015894\nlea     r10d, [r10-2]                                                  ; +0x48, 0x180015898\nmovzx   eax, byte ptr [r8+rbx]                                         ; +0x4c, 0x18001589c\nmov     [rcx+r11], al                                                  ; +0x51, 0x1800158a1\ncmp     edx, 64h ; 'd'                                                 ; +0x55, 0x1800158a5\njnb     short loc_180015870                                            ; +0x58, 0x1800158a8\ncmp     r9d, 0Ah                                                       ; +0x5a, 0x1800158aa\njnb     short loc_1800158BD                                            ; +0x5e, 0x1800158ae\nadd     r9b, 30h ; '0'                                                 ; +0x60, 0x1800158b0\nmov     [r11], r9b                                                     ; +0x64, 0x1800158b4\nmov     rbx, [rsp+arg_0]                                               ; +0x67, 0x1800158b7\nretn                                                                   ; +0x6c, 0x1800158bc\nadd     r9d, r9d                                                       ; +0x6d, 0x1800158bd\nlea     eax, [r9+1]                                                    ; +0x70, 0x1800158c0\nmovzx   eax, byte ptr [rax+rbx]                                        ; +0x74, 0x1800158c4\nmov     [r11+1], al                                                    ; +0x78, 0x1800158c8\nmovzx   eax, byte ptr [r9+rbx]                                         ; +0x7c, 0x1800158cc\nmov     [r11], al                                                      ; +0x81, 0x1800158d1\nmov     rbx, [rsp+arg_0]                                               ; +0x84, 0x1800158d4\nretn                                                                   ; +0x89, 0x1800158d9", "xrefs": ["sub_18003EF10 @ 0x18003efd9", "sub_18003F450 @ 0x18003f502", "<???> @ 0x1801b8584"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}