{"type": "func", "start": 6443704960, "end": 6443705137, "name": "initialize_environment_by_cloning_nolock<wchar_t>", "pseudocode": "// \n// initialize_environment_by_cloning_nolock<wchar_t> from 0x180132280 to 0x180132331 (177 bytes)\n// \n// 2 xrefs:\n// > unknown_libname_65 @ 0x1801323ce\n// > <???> @ 0x180202fb4\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<wchar_t>()\n{\n  __int64 *v0; // rdi\n  __int64 result; // rax\n  int v2; // eax\n  void *v3; // rbx\n\n  v0 = (__int64 *)qword_1801F4CF8;\n  if ( !qword_1801F4CF8 )\n    return 0xFFFFFFFFLL;\n  while ( 1 )\n  {\n    result = *v0;\n    if ( !*v0 )\n      break;\n    v2 = _acrt_MultiByteToWideChar(0, 0, result);\n    if ( !v2 )\n      return 0xFFFFFFFFLL;\n    v3 = calloc_base(v2, 2u);\n    if ( !v3 || !(unsigned int)_acrt_MultiByteToWideChar(0, 0, *v0) )\n    {\n      free_base(v3);\n      return 0xFFFFFFFFLL;\n    }\n    common_set_variable_in_environment_nolock<wchar_t>((wchar_t *)v3);\n    free_base(nullptr);\n    ++v0;\n  }\n  return result;\n}", "assembly": "; \n; initialize_environment_by_cloning_nolock<wchar_t> from 0x180132280 to 0x180132331 (177 bytes)\n; \n; 2 xrefs:\n; > unknown_libname_65 @ 0x1801323ce\n; > <???> @ 0x180202fb4\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, 0x180132280\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x180132285\npush    rdi                                                            ; +0xa, 0x18013228a\nsub     rsp, 30h                                                       ; +0xb, 0x18013228b\nmov     rdi, cs:qword_1801F4CF8                                        ; +0xf, 0x18013228f\ntest    rdi, rdi                                                       ; +0x16, 0x180132296\njnz     short loc_180132317                                            ; +0x19, 0x180132299\nor      eax, 0FFFFFFFFh                                                ; +0x1b, 0x18013229b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x1e, 0x18013229e\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x23, 0x1801322a3\nadd     rsp, 30h                                                       ; +0x28, 0x1801322a8\npop     rdi                                                            ; +0x2c, 0x1801322ac\nretn                                                                   ; +0x2d, 0x1801322ad\nand     [rsp+38h+var_10], 0                                            ; +0x2e, 0x1801322ae\nor      r9d, 0FFFFFFFFh                                                ; +0x33, 0x1801322b3\nand     [rsp+38h+var_18], 0                                            ; +0x37, 0x1801322b7\nmov     r8, rax                                                        ; +0x3d, 0x1801322bd\nxor     edx, edx                                                       ; +0x40, 0x1801322c0\nxor     ecx, ecx                                                       ; +0x42, 0x1801322c2\ncall    __acrt_MultiByteToWideChar                                     ; +0x44, 0x1801322c4\nmovsxd  rsi, eax                                                       ; +0x49, 0x1801322c9\ntest    eax, eax                                                       ; +0x4c, 0x1801322cc\njz      short loc_18013229B                                            ; +0x4e, 0x1801322ce\nmov     edx, 2; Size                                                   ; +0x50, 0x1801322d0\nmov     rcx, rsi; Count                                                ; +0x55, 0x1801322d5\ncall    _calloc_base                                                   ; +0x58, 0x1801322d8\nmov     rbx, rax                                                       ; +0x5d, 0x1801322dd\ntest    rax, rax                                                       ; +0x60, 0x1801322e0\njz      short loc_180132324                                            ; +0x63, 0x1801322e3\nmov     r8, [rdi]                                                      ; +0x65, 0x1801322e5\nor      r9d, 0FFFFFFFFh                                                ; +0x68, 0x1801322e8\nmov     [rsp+38h+var_10], esi                                          ; +0x6c, 0x1801322ec\nxor     edx, edx                                                       ; +0x70, 0x1801322f0\nxor     ecx, ecx                                                       ; +0x72, 0x1801322f2\nmov     [rsp+38h+var_18], rax                                          ; +0x74, 0x1801322f4\ncall    __acrt_MultiByteToWideChar                                     ; +0x79, 0x1801322f9\ntest    eax, eax                                                       ; +0x7e, 0x1801322fe\njz      short loc_180132324                                            ; +0x80, 0x180132300\nxor     edx, edx                                                       ; +0x82, 0x180132302\nmov     rcx, rbx; String1                                              ; +0x84, 0x180132304\ncall    j_??$common_set_variable_in_environment_nolock@_W@@YAHQEA_WH@Z ; +0x87, 0x180132307\nxor     ecx, ecx; Block                                                ; +0x8c, 0x18013230c\ncall    _free_base                                                     ; +0x8e, 0x18013230e\nadd     rdi, 8                                                         ; +0x93, 0x180132313\nmov     rax, [rdi]                                                     ; +0x97, 0x180132317\ntest    rax, rax                                                       ; +0x9a, 0x18013231a\njnz     short loc_1801322AE                                            ; +0x9d, 0x18013231d\njmp     loc_18013229E                                                  ; +0x9f, 0x18013231f\nmov     rcx, rbx; Block                                                ; +0xa4, 0x180132324\ncall    _free_base                                                     ; +0xa7, 0x180132327\njmp     loc_18013229B                                                  ; +0xac, 0x18013232c", "xrefs": ["unknown_libname_65 @ 0x1801323ce", "<???> @ 0x180202fb4"], "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"}