; ; common_getenv_s from 0x180128e48 to 0x180128f3f (247 bytes) ; ; 3 xrefs: ; > common_getenv_s @ 0x180128f40 ; > @ 0x180202a44 ; > @ 0x180202a50 ; ; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! ; ; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA ; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings ; Generated at Fri, 27 Nov 2026 10:54:56 +0000 ; mov rax, rsp ; +0x0, 0x180128e48 mov [rax+8], rbx ; +0x3, 0x180128e4b mov [rax+10h], rsi ; +0x7, 0x180128e4f mov [rax+18h], rdi ; +0xb, 0x180128e53 mov [rax+20h], r14 ; +0xf, 0x180128e57 push r15 ; +0x13, 0x180128e5b sub rsp, 30h ; +0x15, 0x180128e5d mov r15, r9 ; +0x19, 0x180128e61 mov rsi, r8 ; +0x1c, 0x180128e64 mov rdi, rdx ; +0x1f, 0x180128e67 mov r14, rcx ; +0x22, 0x180128e6a mov ecx, 0Bh ; +0x25, 0x180128e6d call sub_1801346AC ; +0x2a, 0x180128e72 nop ; +0x2f, 0x180128e77 xor ebx, ebx ; +0x30, 0x180128e78 test r14, r14 ; +0x32, 0x180128e7a jnz short loc_180128E92 ; +0x35, 0x180128e7d call _errno ; +0x37, 0x180128e7f mov ebx, 16h ; +0x3c, 0x180128e84 mov [rax], ebx ; +0x41, 0x180128e89 call _invalid_parameter_noinfo ; +0x43, 0x180128e8b jmp short loc_180128F02 ; +0x48, 0x180128e90 mov [r14], rbx ; +0x4a, 0x180128e92 test rdi, rdi ; +0x4d, 0x180128e95 jz short loc_180128EA4 ; +0x50, 0x180128e98 test rsi, rsi ; +0x52, 0x180128e9a jnz short loc_180128EA9 ; +0x55, 0x180128e9d test rdi, rdi ; +0x57, 0x180128e9f jnz short loc_180128EB0 ; +0x5a, 0x180128ea2 test rsi, rsi ; +0x5c, 0x180128ea4 jnz short loc_180128EB0 ; +0x5f, 0x180128ea7 mov eax, 1 ; +0x61, 0x180128ea9 jmp short loc_180128EB2 ; +0x66, 0x180128eae mov eax, ebx ; +0x68, 0x180128eb0 test eax, eax ; +0x6a, 0x180128eb2 jz short loc_180128E7F ; +0x6c, 0x180128eb4 test rdi, rdi ; +0x6e, 0x180128eb6 jz short loc_180128EBE ; +0x71, 0x180128eb9 mov [rdi], bx ; +0x73, 0x180128ebb mov rcx, r15; String2 ; +0x76, 0x180128ebe call ??$common_getenv_nolock@_W@@YAPEA_WQEB_W@Z ; +0x79, 0x180128ec1 mov r8, rax; Source ; +0x7e, 0x180128ec6 test rax, rax ; +0x81, 0x180128ec9 jz short loc_180128F02 ; +0x84, 0x180128ecc or rax, 0FFFFFFFFFFFFFFFFh ; +0x86, 0x180128ece inc rax ; +0x8a, 0x180128ed2 cmp [r8+rax*2], bx ; +0x8d, 0x180128ed5 jnz short loc_180128ED2 ; +0x92, 0x180128eda inc rax ; +0x94, 0x180128edc mov [r14], rax ; +0x97, 0x180128edf test rsi, rsi ; +0x9a, 0x180128ee2 jz short loc_180128F02 ; +0x9d, 0x180128ee5 cmp rax, rsi ; +0x9f, 0x180128ee7 jbe short loc_180128EF3 ; +0xa2, 0x180128eea mov ebx, 22h ; '"' ; +0xa4, 0x180128eec jmp short loc_180128F02 ; +0xa9, 0x180128ef1 mov rdx, rsi; SizeInWords ; +0xab, 0x180128ef3 mov rcx, rdi; Destination ; +0xae, 0x180128ef6 call wcscpy_s ; +0xb1, 0x180128ef9 test eax, eax ; +0xb6, 0x180128efe jnz short loc_180128F29 ; +0xb8, 0x180128f00 mov ecx, 0Bh ; +0xba, 0x180128f02 call sub_180134700 ; +0xbf, 0x180128f07 mov eax, ebx ; +0xc4, 0x180128f0c mov rbx, [rsp+38h+arg_0] ; +0xc6, 0x180128f0e mov rsi, [rsp+38h+arg_8] ; +0xcb, 0x180128f13 mov rdi, [rsp+38h+arg_10] ; +0xd0, 0x180128f18 mov r14, [rsp+38h+arg_18] ; +0xd5, 0x180128f1d add rsp, 30h ; +0xda, 0x180128f22 pop r15 ; +0xde, 0x180128f26 retn ; +0xe0, 0x180128f28 mov [rsp+38h+Reserved], rbx; Reserved ; +0xe1, 0x180128f29 xor r9d, r9d; LineNo ; +0xe6, 0x180128f2e xor r8d, r8d; FileName ; +0xe9, 0x180128f31 xor edx, edx; FunctionName ; +0xec, 0x180128f34 xor ecx, ecx; Expression ; +0xee, 0x180128f36 call _invoke_watson ; +0xf0, 0x180128f38 db 90h ; +0xf5, 0x180128f3d db 0CCh ; +0xf6, 0x180128f3e