; ; __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 ; mov [rsp+arg_0], rbx ; +0x0, 0x18013ad08 mov [rsp+arg_8], rbp ; +0x5, 0x18013ad0d mov [rsp+arg_10], rsi ; +0xa, 0x18013ad12 push rdi ; +0xf, 0x18013ad17 sub rsp, 20h ; +0x10, 0x18013ad18 call cs:GetEnvironmentStringsW ; +0x14, 0x18013ad1c xor esi, esi ; +0x1a, 0x18013ad22 mov rbx, rax ; +0x1c, 0x18013ad24 test rax, rax ; +0x1f, 0x18013ad27 jz short loc_18013AD8F ; +0x22, 0x18013ad2a mov rbp, rax ; +0x24, 0x18013ad2c cmp [rax], si ; +0x27, 0x18013ad2f jz short loc_18013AD51 ; +0x2a, 0x18013ad32 or rax, 0FFFFFFFFFFFFFFFFh ; +0x2c, 0x18013ad34 inc rax ; +0x30, 0x18013ad38 cmp [rbp+rax*2+0], si ; +0x33, 0x18013ad3b jnz short loc_18013AD38 ; +0x38, 0x18013ad40 lea rbp, [rbp+rax*2+0] ; +0x3a, 0x18013ad42 add rbp, 2 ; +0x3f, 0x18013ad47 cmp [rbp+0], si ; +0x43, 0x18013ad4b jnz short loc_18013AD34 ; +0x47, 0x18013ad4f sub rbp, rbx ; +0x49, 0x18013ad51 add rbp, 2 ; +0x4c, 0x18013ad54 sar rbp, 1 ; +0x50, 0x18013ad58 add rbp, rbp ; +0x53, 0x18013ad5b mov rcx, rbp; Size ; +0x56, 0x18013ad5e call _malloc_base ; +0x59, 0x18013ad61 mov rdi, rax ; +0x5e, 0x18013ad66 test rax, rax ; +0x61, 0x18013ad69 jz short loc_18013AD7F ; +0x64, 0x18013ad6c mov r8, rbp; Size ; +0x66, 0x18013ad6e mov rdx, rbx; Src ; +0x69, 0x18013ad71 mov rcx, rax; void * ; +0x6c, 0x18013ad74 call memmove ; +0x6f, 0x18013ad77 mov rsi, rdi ; +0x74, 0x18013ad7c xor ecx, ecx; Block ; +0x77, 0x18013ad7f call _free_base ; +0x79, 0x18013ad81 mov rcx, rbx; penv ; +0x7e, 0x18013ad86 call cs:FreeEnvironmentStringsW ; +0x81, 0x18013ad89 mov rbx, [rsp+28h+arg_0] ; +0x87, 0x18013ad8f mov rax, rsi ; +0x8c, 0x18013ad94 mov rsi, [rsp+28h+arg_10] ; +0x8f, 0x18013ad97 mov rbp, [rsp+28h+arg_8] ; +0x94, 0x18013ad9c add rsp, 20h ; +0x99, 0x18013ada1 pop rdi ; +0x9d, 0x18013ada5 retn ; +0x9e, 0x18013ada6