Function at 0x10006690
Capabilities:
Query environment variable
Read .ini file
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x10013adb
mov eax, dword fs:[0]
push eax
mov eax, 0x3042c
call fcn.10012a80
mov eax, dword [0x1001dfd0]
xor eax, esp
mov dword [esp + 0x30428], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1001dfd0]
xor eax, esp
push eax
lea eax, [esp + 0x30440]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x30450]
push ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], ebx
xor ebp, ebp
xor edi, edi
call dword [sym.imp.hpqddcmn.dll_GetDeviceInfoDatFile]
push 0xfffe
mov esi, eax
lea ecx, [esp + 0x446]
xor eax, eax
push ebp
push ecx
mov word [esp + 0x44c], ax
call sub.MSVCR90.dll_memset
add esp, 0x10
push esi
push 0x8000
lea edx, [esp + 0x444]
push edx
push 0x10015488
push ebp
push str.EnvironmentVariables
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push ebp
lea eax, [esp + 0x40]
push eax
push 3
push ebp
push str.EnvironmentVariables
push ebx
call fcn.100041e0
add esp, 0x18
test eax, eax
je 0x10006976
lea ebx, [esp + 0x43c]
cmp word [esp + 0x43c], bp
je 0x1000696f
mov edi, edi
push 0x1fe
lea edx, [esp + 0x242]
xor ecx, ecx
push ebp
push edx
mov word [esp + 0x248], cx
call sub.MSVCR90.dll_memset
mov ecx, dword [esp + 0x20]
add esp, 0xc
push 0x100
lea eax, [esp + 0x240]
push eax
push ebx
push ecx
sub esp, 0x200
mov ecx, 0x80
lea esi, [esp + 0x24c]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.10003240
lea eax, [esp + 0x44c]
add esp, 0x210
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x100067c0
sub eax, edx
sar eax, 1
je 0x1000694c
push 0xfffe
lea eax, [esp + 0x10442]
xor edx, edx
push ebp
push eax
mov word [esp + 0x10448], dx
call sub.MSVCR90.dll_memset
mov edx, dword [esp + 0x20]
push 0x8000
lea ecx, [esp + 0x1044c]
push ecx
push ebx
push edx
lea eax, [esp + 0x58]
push str.EnvironmentVariables
push eax
call fcn.100032e0
add esp, 0x24
cmp eax, 1
jne 0x1000694c
push 0xfffe
lea edx, [esp + 0x20442]
xor ecx, ecx
push ebp
push edx
mov word [esp + 0x20448], cx
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x8000
lea eax, [esp + 0x20440]
push eax
lea ecx, [esp + 0x10444]
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x8000
lea eax, [esp + 0x10440]
push eax
lea ecx, [esp + 0x244]
xor edx, edx
push ecx
mov word [esp + 0x10448], dx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
xor edx, edx
mov edi, 7
lea eax, [esp + 0x23c]
mov word [esp + 0x20], dx
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebp
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x100068a0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x240]
push eax
lea ecx, [esp + 0x24]
call fcn.100022a0
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
add ecx, 4
mov dword [esp + 0x3044c], ebp
call fcn.10006520
lea edx, [esp + 0x1043c]
lea ecx, [edx + 2]
mov si, word [edx]
add edx, 2
cmp si, bp
jne 0x100068e3
sub edx, ecx
sar edx, 1
push edx
lea edx, [esp + 0x10440]
push edx
mov ecx, eax
call fcn.100022a0
mov eax, dword [esp + 0x34]
mov dword [esp + 0x30448], 0xffffffff
cmp eax, 8
jb 0x10006927
inc eax
push eax
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x24]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::allocator_wchar_t_::deallocate_wchar_t___unsigned_int_]
lea edx, [esp + 0x2043c]
push edx
lea eax, [esp + 0x240]
xor ecx, ecx
push eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], ebp
mov word [esp + 0x28], cx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x10006951
sub eax, edx
sar eax, 1
cmp word [ebx + eax*2 + 2], bp
lea ebx, [ebx + eax*2 + 2]
jne 0x10006760
mov eax, 1
jmp 0x10006978
mov eax, edi
mov ecx, dword [esp + 0x30440]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x30428]
xor ecx, esp
call fcn.10012a16
add esp, 0x30438
ret 4