{"type": "func", "start": 6443704748, "end": 6443704957, "name": "initialize_environment_by_cloning_nolock<char>", "pseudocode": "// \n// initialize_environment_by_cloning_nolock<char> from 0x1801321ac to 0x18013227d (209 bytes)\n// \n// 2 xrefs:\n// > unknown_libname_64 @ 0x180132392\n// > <???> @ 0x180202fa8\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 initialize_environment_by_cloning_nolock<char>()\n{\n  __int64 *v0; // rdi\n  __int64 result; // rax\n  int v2; // eax\n  int v3; // esi\n  void *v4; // rax\n  void *v5; // rbx\n\n  v0 = (__int64 *)qword_1801F4D00;\n  if ( !qword_1801F4D00 )\n    return 0xFFFFFFFFLL;\n  while ( 1 )\n  {\n    result = *v0;\n    if ( !*v0 )\n      break;\n    v2 = _acrt_WideCharToMultiByte(0, 0, result, -1, 0, 0, 0, 0);\n    v3 = v2;\n    if ( !v2 )\n      return 0xFFFFFFFFLL;\n    v4 = calloc_base(v2, 1u);\n    v5 = v4;\n    if ( !v4 || !(unsigned int)_acrt_WideCharToMultiByte(0, 0, *v0, -1, (_DWORD)v4, v3, 0, 0) )\n    {\n      free_base(v5);\n      return 0xFFFFFFFFLL;\n    }\n    common_set_variable_in_environment_nolock<char>(v5);\n    free_base(nullptr);\n    ++v0;\n  }\n  return result;\n}", "assembly": "; \n; initialize_environment_by_cloning_nolock<char> from 0x1801321ac to 0x18013227d (209 bytes)\n; \n; 2 xrefs:\n; > unknown_libname_64 @ 0x180132392\n; > <???> @ 0x180202fa8\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, 0x1801321ac\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1801321b1\npush    rdi                                                            ; +0xa, 0x1801321b6\nsub     rsp, 40h                                                       ; +0xb, 0x1801321b7\nmov     rdi, cs:qword_1801F4D00                                        ; +0xf, 0x1801321bb\ntest    rdi, rdi                                                       ; +0x16, 0x1801321c2\njnz     loc_18013225F                                                  ; +0x19, 0x1801321c5\nor      eax, 0FFFFFFFFh                                                ; +0x1f, 0x1801321cb\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x22, 0x1801321ce\nmov     rsi, [rsp+48h+arg_8]                                           ; +0x27, 0x1801321d3\nadd     rsp, 40h                                                       ; +0x2c, 0x1801321d8\npop     rdi                                                            ; +0x30, 0x1801321dc\nretn                                                                   ; +0x31, 0x1801321dd\nand     [rsp+48h+var_10], 0                                            ; +0x32, 0x1801321de\nor      r9d, 0FFFFFFFFh                                                ; +0x38, 0x1801321e4\nand     [rsp+48h+var_18], 0                                            ; +0x3c, 0x1801321e8\nmov     r8, rax                                                        ; +0x42, 0x1801321ee\nand     [rsp+48h+var_20], 0                                            ; +0x45, 0x1801321f1\nxor     edx, edx                                                       ; +0x4a, 0x1801321f6\nand     [rsp+48h+var_28], 0                                            ; +0x4c, 0x1801321f8\nxor     ecx, ecx                                                       ; +0x52, 0x1801321fe\ncall    __acrt_WideCharToMultiByte                                     ; +0x54, 0x180132200\nmovsxd  rsi, eax                                                       ; +0x59, 0x180132205\ntest    eax, eax                                                       ; +0x5c, 0x180132208\njz      short loc_1801321CB                                            ; +0x5e, 0x18013220a\nmov     edx, 1; Size                                                   ; +0x60, 0x18013220c\nmov     rcx, rsi; Count                                                ; +0x65, 0x180132211\ncall    _calloc_base                                                   ; +0x68, 0x180132214\nmov     rbx, rax                                                       ; +0x6d, 0x180132219\ntest    rax, rax                                                       ; +0x70, 0x18013221c\njz      short loc_180132270                                            ; +0x73, 0x18013221f\nand     [rsp+48h+var_10], 0                                            ; +0x75, 0x180132221\nor      r9d, 0FFFFFFFFh                                                ; +0x7b, 0x180132227\nand     [rsp+48h+var_18], 0                                            ; +0x7f, 0x18013222b\nxor     edx, edx                                                       ; +0x85, 0x180132231\nmov     r8, [rdi]                                                      ; +0x87, 0x180132233\nxor     ecx, ecx                                                       ; +0x8a, 0x180132236\nmov     [rsp+48h+var_20], esi                                          ; +0x8c, 0x180132238\nmov     [rsp+48h+var_28], rax                                          ; +0x90, 0x18013223c\ncall    __acrt_WideCharToMultiByte                                     ; +0x95, 0x180132241\ntest    eax, eax                                                       ; +0x9a, 0x180132246\njz      short loc_180132270                                            ; +0x9c, 0x180132248\nxor     edx, edx                                                       ; +0x9e, 0x18013224a\nmov     rcx, rbx; Block                                                ; +0xa0, 0x18013224c\ncall    j_??$common_set_variable_in_environment_nolock@D@@YAHQEADH@Z   ; +0xa3, 0x18013224f\nxor     ecx, ecx; Block                                                ; +0xa8, 0x180132254\ncall    _free_base                                                     ; +0xaa, 0x180132256\nadd     rdi, 8                                                         ; +0xaf, 0x18013225b\nmov     rax, [rdi]                                                     ; +0xb3, 0x18013225f\ntest    rax, rax                                                       ; +0xb6, 0x180132262\njnz     loc_1801321DE                                                  ; +0xb9, 0x180132265\njmp     loc_1801321CE                                                  ; +0xbf, 0x18013226b\nmov     rcx, rbx; Block                                                ; +0xc4, 0x180132270\ncall    _free_base                                                     ; +0xc7, 0x180132273\njmp     loc_1801321CB                                                  ; +0xcc, 0x180132278", "xrefs": ["unknown_libname_64 @ 0x180132392", "<???> @ 0x180202fa8"], "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"}