Function at 0x4106a0
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x4132e8
mov eax, dword fs:[0]
push eax
mov eax, 0x2040
call fcn.004131e0
mov eax, dword [0x41b01c]
xor eax, esp
mov dword [esp + 0x203c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41b01c]
xor eax, esp
push eax
lea eax, [esp + 0x2054]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2064]
xor ebx, ebx
push 0x1ffe
lea ecx, [esp + 0x56]
push ebx
push ecx
mov dword [esp + 0x20], eax
mov word [esp + 0x5c], bx
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [esp + 0x34]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
push 0x1000
lea edx, [esp + 0x54]
push edx
mov dword [esp + 0x2064], ebx
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0x415da0
call ebp
mov esi, eax
cmp esi, ebx
je 0x41076b
cmp esi, 0x1000
jbe 0x410787
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004123ed
add esp, 4
push esi
mov edi, eax
push edi
push 0x415da0
call ebp
cmp eax, ebx
push edi
jne 0x41078c
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
lea ecx, [esp + 0x34]
mov dword [esp + 0x205c], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
xor al, al
jmp 0x410814
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
mov ecx, dword [esp + 0x14]
push ecx
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
push 0x415dac
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2060], 1
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
cmp dword [esp + 0x30], 8
mov eax, dword [esp + 0x1c]
jae 0x4107da
lea eax, [esp + 0x1c]
push eax
push 0x415da0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
lea ecx, [esp + 0x18]
setne bl
mov byte [esp + 0x205c], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x34]
mov dword [esp + 0x205c], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov al, bl
mov ecx, dword [esp + 0x2054]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x203c]
xor ecx, esp
call fcn.0041250b
add esp, 0x204c
ret