Function at 0x667c7fc0
Capabilities:
Access peb ldr_data
Get process heap flags
Query environment variable
Query or enumerate registry value

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
mov eax, ecx
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x68
mov ebx, dword [eax + 0xc]
test byte [0x667cc034], 8
mov esi, dword [ecx]
mov dword [ebp - 0x20], 0
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x30], ebx
mov ebx, dword [eax + 0x10]
mov edi, dword [eax + 8]
mov edx, dword [eax + 0x14]
mov dword [ebp - 0x2c], ebx
jne 0x667c8088
test edx, edx
je 0x667c80eb
mov dword [ebp - 0x38], edx
mov eax, dword [edx]
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
mov dword [esp], esi
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x34], ecx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.advapi32.dll_RegQueryValueExW]
mov dword [ebp - 0x3c], eax
call eax
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x38]
sub esp, 0x18
test eax, eax
mov ebx, eax
je 0x667c8054
cmp eax, 0xea
jne 0x667c8071
mov eax, dword [ebp - 0x24]
cmp eax, 2
je 0x667c8158
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x667c806c
mov esi, dword [ebp - 0x30]
mov dword [esi], eax
mov eax, dword [ebp - 0x20]
mov dword [edx], eax
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x18
mov dword [ebp - 0x34], edx
mov eax, ecx
mov dword [ebp - 0x38], ecx
call sym._wine_dbgstr_wn.constprop.0
mov edx, dword [ebp - 0x34]
mov ecx, 0x667cc034
mov dword [esp + 4], ecx
mov ebx, dword [ebp - 0x30]
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x24], edx
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
mov eax, str.__p___s___p___p___p___p__n
mov dword [esp + 0xc], eax
mov dword [esp + 0x20], edx
mov edx, str.SHQueryValueExW
mov dword [esp + 8], edx
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
test edx, edx
jne 0x667c8009
mov dword [esp + 8], edi
lea eax, [ebp - 0x20]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], ecx
mov dword [esp], esi
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0xc], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
test eax, eax
mov ebx, eax
je 0x667c8125
cmp eax, 0xea
jne 0x667c8071
mov esi, dword [ebp - 0x30]
test esi, esi
je 0x667c8071
mov eax, dword [ebp - 0x24]
mov edx, 1
mov edi, dword [ebp - 0x30]
cmp eax, 2
cmove eax, edx
mov dword [edi], eax
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x18
cmp dword [ebp - 0x2c], 0
je 0x667c8260
cmp ebx, 0xea
je 0x667c8260
mov edi, dword [ebp - 0x2c]
cmp word [edi], 0
mov ecx, edi
je 0x667c8191
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x667c8180
mov eax, dword [ebp - 0x2c]
sub ecx, eax
lea eax, [ecx + 2]
mov dword [esp + 8], eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [esp + 4], eax
mov ecx, dword fs:[0x18]
mov dword [ebp - 0x38], edx
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x34], eax
sub esp, 0xc
cmp ecx, 8
mov edi, eax
jae 0x667c82e8
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x38], edx
mov eax, dword [edx]
shr eax, 1
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
mov edx, dword [ebp - 0x38]
mov ecx, 0xea
mov dword [ebp - 0x1c], eax
sub esp, 0xc
cmp eax, dword [edx]
cmova ebx, ecx
mov dword [ebp - 0x2c], edx
mov edi, dword [ebp - 0x34]
cmp dword [ebp - 0x20], eax
cmovae eax, dword [ebp - 0x20]
mov dword [esp + 8], edi
xor edi, edi
mov dword [esp + 4], edi
mov dword [ebp - 0x20], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
sub esp, 0xc
test eax, eax
je 0x667c806c
mov eax, dword [ebp - 0x24]
cmp eax, 2
jne 0x667c8067
mov eax, dword [ebp - 0x30]
mov dword [eax], 1
jmp 0x667c806c
mov dword [ebp - 0x38], edx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], edx
xor edx, edx
mov dword [esp + 4], edx
mov dword [ebp - 0x1c], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
xor ecx, ecx
sub esp, 0xc
mov edx, eax
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], edx
mov dword [esp + 8], edi
xor edi, edi
mov dword [esp], esi
mov esi, dword [ebp - 0x3c]
mov dword [esp + 4], ecx
mov dword [esp + 0x14], eax
mov dword [ebp - 0x34], edx
call esi
mov eax, dword [ebp - 0x34]
xor esi, esi
sub esp, 0x18
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x1c], eax
sub esp, 0xc
jmp 0x667c8204
test al, 1
jne 0x667c8313
test edi, 2
jne 0x667c8321
test edi, 4
je 0x667c81d1
mov eax, dword [esi]
add edi, 4
add esi, 4
sub ecx, 4
mov dword [edi - 4], eax
jmp 0x667c81d1
movzx eax, byte [esi]
inc edi
inc esi
dec ecx
mov byte [ebp - 0x38], al
mov byte [edi - 1], al
jmp 0x667c82ec
movzx eax, word [esi]
add edi, 2
add esi, 2
sub ecx, 2
mov word [edi - 2], ax
jmp 0x667c82f4