{"type": "func", "start": 6443703968, "end": 6443704071, "name": "common_initialize_environment_nolock<wchar_t>", "pseudocode": "// \n// common_initialize_environment_nolock<wchar_t> from 0x180131ea0 to 0x180131f07 (103 bytes)\n// \n// 3 xrefs:\n// > unknown_libname_65 @ 0x1801323c5\n// > <???> @ 0x180202f60\n// > <???> @ 0x180202f6c\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 common_initialize_environment_nolock<wchar_t>()\n{\n  unsigned int v0; // edi\n  wchar_t *wide_environment_from_os; // rax\n  wchar_t *v3; // rbx\n  void *v4; // rax\n\n  v0 = 0;\n  if ( qword_1801F4D00 )\n    return 0;\n  wide_environment_from_os = (wchar_t *)_dcrt_get_wide_environment_from_os();\n  v3 = wide_environment_from_os;\n  if ( wide_environment_from_os )\n  {\n    v4 = (void *)create_environment<wchar_t>(wide_environment_from_os);\n    if ( v4 )\n    {\n      qword_1801F4D08 = v4;\n      qword_1801F4D00 = v4;\n    }\n    else\n    {\n      v0 = -1;\n    }\n    free_base(nullptr);\n  }\n  else\n  {\n    v0 = -1;\n  }\n  free_base(v3);\n  return v0;\n}", "assembly": "; \n; common_initialize_environment_nolock<wchar_t> from 0x180131ea0 to 0x180131f07 (103 bytes)\n; \n; 3 xrefs:\n; > unknown_libname_65 @ 0x1801323c5\n; > <???> @ 0x180202f60\n; > <???> @ 0x180202f6c\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, 0x180131ea0\npush    rdi                                                            ; +0x5, 0x180131ea5\nsub     rsp, 20h                                                       ; +0x6, 0x180131ea6\nxor     edi, edi                                                       ; +0xa, 0x180131eaa\ncmp     cs:qword_1801F4D00, rdi                                        ; +0xc, 0x180131eac\njz      short loc_180131EB9                                            ; +0x13, 0x180131eb3\nxor     eax, eax                                                       ; +0x15, 0x180131eb5\njmp     short loc_180131EFC                                            ; +0x17, 0x180131eb7\ncall    __dcrt_get_wide_environment_from_os                            ; +0x19, 0x180131eb9\nmov     rbx, rax                                                       ; +0x1e, 0x180131ebe\ntest    rax, rax                                                       ; +0x21, 0x180131ec1\njnz     short loc_180131ECB                                            ; +0x24, 0x180131ec4\nor      edi, 0FFFFFFFFh                                                ; +0x26, 0x180131ec6\njmp     short loc_180131EF2                                            ; +0x29, 0x180131ec9\nmov     rcx, rbx; Source                                               ; +0x2b, 0x180131ecb\ncall    ??$create_environment@_W@@YAQEAPEA_WQEA_W@Z                    ; +0x2e, 0x180131ece\ntest    rax, rax                                                       ; +0x33, 0x180131ed3\njnz     short loc_180131EDD                                            ; +0x36, 0x180131ed6\nor      edi, 0FFFFFFFFh                                                ; +0x38, 0x180131ed8\njmp     short loc_180131EEB                                            ; +0x3b, 0x180131edb\nmov     cs:qword_1801F4D08, rax                                        ; +0x3d, 0x180131edd\nmov     cs:qword_1801F4D00, rax                                        ; +0x44, 0x180131ee4\nxor     ecx, ecx; Block                                                ; +0x4b, 0x180131eeb\ncall    _free_base                                                     ; +0x4d, 0x180131eed\nmov     rcx, rbx; Block                                                ; +0x52, 0x180131ef2\ncall    _free_base                                                     ; +0x55, 0x180131ef5\nmov     eax, edi                                                       ; +0x5a, 0x180131efa\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x5c, 0x180131efc\nadd     rsp, 20h                                                       ; +0x61, 0x180131f01\npop     rdi                                                            ; +0x65, 0x180131f05\nretn                                                                   ; +0x66, 0x180131f06", "xrefs": ["unknown_libname_65 @ 0x1801323c5", "<???> @ 0x180202f60", "<???> @ 0x180202f6c"], "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"}