Function at 0x667c8340
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 0x667c8408
test edx, edx
je 0x667c846b
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_RegQueryValueExA]
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 0x667c83d4
cmp eax, 0xea
jne 0x667c83f2
cmp dword [ebp - 0x24], 2
je 0x667c84d8
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x667c83ed
mov eax, dword [ebp - 0x24]
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 - 0x38], ecx
mov eax, ecx
mov dword [ebp - 0x34], edx
call sym._wine_dbgstr_an.constprop.0
mov edx, dword [ebp - 0x34]
mov dword [esp + 0x18], edi
mov ebx, dword [ebp - 0x30]
mov dword [esp + 0x10], esi
mov dword [esp], 3
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 eax, str.SHQueryValueExA
mov dword [esp + 8], eax
mov eax, 0x667cc034
mov dword [esp + 0x20], edx
mov dword [esp + 4], eax
call sym._wine_dbg_log.constprop.0
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
test edx, edx
jne 0x667c8389
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_RegQueryValueExA]
sub esp, 0x18
test eax, eax
mov ebx, eax
je 0x667c84a5
cmp eax, 0xea
jne 0x667c83f2
mov edx, dword [ebp - 0x30]
test edx, edx
je 0x667c83f2
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
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x667c85c8
cmp ebx, 0xea
je 0x667c85c8
mov esi, dword [ebp - 0x2c]
xor edi, edi
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov dword [esp + 4], edi
mov ecx, dword fs:[0x18]
inc eax
mov dword [esp + 8], eax
mov dword [ebp - 0x1c], eax
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 edx, dword [ebp - 0x38]
mov dword [ebp - 0x34], eax
sub esp, 0xc
cmp ecx, 8
mov edi, eax
jae 0x667c8650
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x38], edx
mov eax, dword [edx]
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_ExpandEnvironmentStringsA]
mov edx, dword [ebp - 0x38]
mov ecx, 0xea
mov dword [ebp - 0x1c], eax
sub esp, 0xc
cmp eax, dword [edx]
cmova ebx, ecx
cmp dword [ebp - 0x20], eax
mov dword [ebp - 0x2c], edx
mov edi, dword [ebp - 0x34]
cmovae eax, dword [ebp - 0x20]
xor ecx, ecx
mov dword [esp + 4], ecx
mov dword [esp + 8], 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 esi, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
sub esp, 0xc
test esi, esi
je 0x667c83ed
mov eax, dword [ebp - 0x24]
cmp eax, 2
jne 0x667c83e8
mov eax, dword [ebp - 0x30]
mov dword [eax], 1
jmp 0x667c83ed
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x20]
xor edx, edx
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], ecx
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
mov edi, dword [ebp - 0x3c]
mov dword [esp], esi
xor esi, esi
mov dword [esp + 4], ecx
mov dword [esp + 0x14], eax
mov dword [ebp - 0x34], edx
call edi
mov eax, dword [ebp - 0x34]
xor edi, edi
sub esp, 0x18
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsA]
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x1c], eax
sub esp, 0xc
jmp 0x667c856a
test al, 1
jne 0x667c867b
test edi, 2
jne 0x667c868c
test edi, 4
je 0x667c8539
mov eax, dword [esi]
add edi, 4
add esi, 4
sub ecx, 4
mov dword [edi - 4], eax
jmp 0x667c8539
mov esi, dword [ebp - 0x2c]
inc edi
dec ecx
movzx eax, byte [esi]
inc esi
mov byte [ebp - 0x38], al
mov byte [edi - 1], al
jmp 0x667c8654
movzx eax, word [esi]
add edi, 2
add esi, 2
sub ecx, 2
mov word [edi - 2], ax
jmp 0x667c865c