// // __dcrt_get_wide_environment_from_os from 0x18013ad08 to 0x18013ada7 (159 bytes) // // 2 xrefs: // > common_initialize_environment_nolock @ 0x180131eb9 // > @ 0x1802038c0 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void *_dcrt_get_wide_environment_from_os() { LPWCH EnvironmentStringsW; // rax void *v1; // rsi LPWCH v2; // rbx char *v3; // rbp __int64 v4; // rax size_t v5; // rbp void *v6; // rax void *v7; // rdi EnvironmentStringsW = GetEnvironmentStringsW(); v1 = nullptr; v2 = EnvironmentStringsW; if ( EnvironmentStringsW ) { v3 = (char *)EnvironmentStringsW; if ( *EnvironmentStringsW ) { do { v4 = -1; do ++v4; while ( *(_WORD *)&v3[2 * v4] ); v3 += 2 * v4 + 2; } while ( *(_WORD *)v3 ); } v5 = 2 * ((v3 - (char *)v2 + 2) >> 1); v6 = malloc_base(v5); v7 = v6; if ( v6 ) { memmove(v6, v2, v5); v1 = v7; } free_base(nullptr); FreeEnvironmentStringsW(v2); } return v1; }