Function at 0x687137e0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x168]
push ebx
sub esp, 0x19c
mov dword [esp + 8], eax
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersionThemeManager
mov dword [esp], 0x80000001
call sym._RegOpenKeyW_12
mov edx, eax
movzx eax, byte [0x6871908c]
sub esp, 0xc
and eax, 8
test edx, edx
jne 0x68713ac0
test al, al
jne 0x68713ba0
lea eax, [ebp - 0x158]
lea ebx, [ebp - 0x164]
mov dword [ebp - 0x164], 0x14
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.ThemeActive
mov eax, dword [ebp - 0x168]
mov dword [esp], eax
call sym._RegQueryValueExW_24
sub esp, 0x18
test eax, eax
jne 0x68713b00
xor eax, eax
cmp word [ebp - 0x158], 0x30
setne al
mov dword [0x68731348], eax
mov dword [ebp - 0x164], pe_nt_image_headers32
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], 0x687310c0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.ColorName
mov eax, dword [ebp - 0x168]
mov dword [esp], eax
call sym._RegQueryValueExW_24
sub esp, 0x18
test eax, eax
je 0x687138d5
xor eax, eax
mov word [0x687310c0], ax
mov dword [ebp - 0x164], pe_nt_image_headers32
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], 0x68731040
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.SizeName
mov eax, dword [ebp - 0x168]
mov dword [esp], eax
call sym._RegQueryValueExW_24
sub esp, 0x18
test eax, eax
je 0x68713920
xor eax, eax
mov word [0x68731040], ax
mov dword [ebp - 0x15c], 0x208
mov ebx, dword [ebp - 0x168]
test byte [0x6871908c], 8
jne 0x68713f40
lea eax, [ebp - 0x15c]
mov dword [esp + 0x10], 0x68731140
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x160]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], str.DllName
mov dword [esp], ebx
call sym._RegQueryValueExW_24
sub esp, 0x18
test eax, eax
je 0x68713b50
cmp eax, 0xea
je 0x68713b50
xor eax, eax
mov word [0x68731140], ax
mov eax, dword [ebp - 0x168]
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
mov eax, dword [0x68731348]
test eax, eax
je 0x68713a90
xor edx, edx
mov eax, 0x68731040
mov ecx, 0x687310c0
cmp word [0x68731040], 0
cmovne edx, eax
xor eax, eax
cmp word [0x687310c0], 0
mov dword [esp], 0x68731140
cmovne eax, ecx
lea ecx, [ebp - 0x15c]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call sym._MSSTYLES_OpenThemeFile
test eax, eax
js 0x68713b70
mov ebx, dword [ebp - 0x15c]
mov eax, 0x687310c0
mov edx, dword [ebx + 0x218]
lea esi, cs:[esi]
movzx ecx, word [edx]
test cx, cx
je 0x68713a29
add eax, 2
add edx, 2
mov word [eax - 2], cx
cmp eax, 0x6873113e
jne 0x68713a10
xor ecx, ecx
mov word [eax], cx
mov edx, dword [ebx + 0x21c]
mov eax, 0x68731040
lea esi, [esi]
movzx ecx, word [edx]
test cx, cx
je 0x68713a59
add eax, 2
add edx, 2
mov word [eax - 2], cx
cmp eax, 0x687310be
jne 0x68713a40
xor edx, edx
mov word [eax], dx
mov dword [esp], ebx
call sym._UXTHEME_SetActiveTheme
test byte [0x6871908c], 8
jne 0x68713bd0
mov eax, dword [ebp - 0x15c]
mov dword [esp], eax
call sym._MSSTYLES_CloseThemeFile
mov eax, dword [0x68731348]
test eax, eax
jne 0x68713ab1
lea esi, [esi]
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._MSSTYLES_SetActiveTheme
test byte [0x6871908c], 8
jne 0x68714140
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test al, al
je 0x687139a0
mov dword [esp + 0xc], str.Failed_to_open_theme_registry_key_n
mov dword [esp + 8], str.UXTHEME_LoadTheme
mov dword [esp + 4], 0x6871908c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_7
mov eax, dword [0x68731348]
test eax, eax
je 0x68713a90
jmp 0x687139ad
mov dword [0x68731348], 0
test byte [0x6871908c], 8
je 0x6871388a
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.Failed_to_get_ThemeActive:__ld_n
mov dword [esp + 8], str.UXTHEME_LoadTheme
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x6871908c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_7
jmp 0x6871388a
mov edx, dword [ebp - 0x160]
cmp edx, 2
je 0x68714088
test eax, eax
je 0x6871398f
jmp 0x68713987
xor ebx, ebx
xor esi, esi
xor edi, edi
mov dword [0x68731348], 0
mov word [0x68731140], bx
mov word [0x687310c0], si
mov word [0x68731040], di
jmp 0x68713a90
mov dword [esp + 0xc], str.Loading_theme_config_n
mov dword [esp + 8], str.UXTHEME_LoadTheme
mov dword [esp + 4], 0x6871908c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_7
jmp 0x68713829
mov eax, 0x68731040
shr eax, 0x10
je 0x68714350
mov dword [esp + 4], 0xffffffff
mov edi, 0x6872f88d
mov dword [esp], 0x68731040
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x68713ced
cmp word [0x68731040], 0
je 0x687145be
lea esi, [esi]
mov edx, eax
lea eax, [eax + 1]
cmp word [edx + edx + 0x68731042], 0
jne 0x68713c18
mov edi, 0x224c
mov ebx, 0x68731040
lea eax, [ebp - 0x142]
mov word [ebp - 0x144], di
movzx edi, word [0x687302ee]
mov dword [ebp - 0x17c], ebx
jmp 0x68713c80
cmp cx, 9
je 0x687142e8
cmp cx, 0xa
jne 0x68714400
mov esi, 0x6e5c
add eax, 2
mov word [eax - 2], si
sub edx, 1
jb 0x68714597
lea ecx, [ebp - 0x22]
cmp ecx, eax
jb 0x68713cbf
add dword [ebp - 0x17c], 2
mov esi, dword [ebp - 0x17c]
movzx ecx, word [esi - 2]
cmp cx, 0xd
je 0x687142d8
jbe 0x68713c50
cmp cx, 0x22
je 0x68714300
cmp cx, 0x5c
jne 0x68714458
mov ecx, 0x5c5c
add eax, 2
mov word [eax - 2], cx
jmp 0x68713c70
mov byte [eax], 0x22
test edx, edx
je 0x6871459a
mov byte [eax + 3], 0x2e
mov edx, 0x2e2e
mov word [eax + 1], dx
lea edx, [eax + 4]
lea eax, [ebp - 0x144]
mov byte [edx], 0
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edi, eax
mov eax, 0x687310c0
shr eax, 0x10
je 0x68714330
mov dword [esp + 4], 0xffffffff
mov ebx, 0x6872f88d
mov dword [esp], 0x687310c0
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x68713dfd
cmp word [0x687310c0], 0
je 0x687145dc
nop
mov edx, eax
lea eax, [eax + 1]
cmp word [edx + edx + 0x687310c2], 0
jne 0x68713d30
mov eax, 0x224c
mov ebx, 0x687310c0
mov word [ebp - 0x144], ax
lea eax, [ebp - 0x142]
mov dword [ebp - 0x17c], ebx
jmp 0x68713d90
cmp cx, 9
je 0x687142c0
cmp cx, 0xa
jne 0x68714390
mov esi, 0x6e5c
add eax, 2
mov word [eax - 2], si
sub edx, 1
jb 0x687145a2
lea ecx, [ebp - 0x22]
cmp ecx, eax
jb 0x68713dcf
add dword [ebp - 0x17c], 2
mov esi, dword [ebp - 0x17c]
movzx ecx, word [esi - 2]
cmp cx, 0xd
je 0x68714260
jbe 0x68713d60
cmp cx, 0x22
je 0x68714290
cmp cx, 0x5c
jne 0x68714470
mov ecx, 0x5c5c
add eax, 2
mov word [eax - 2], cx
jmp 0x68713d80
mov byte [eax], 0x22
test edx, edx
je 0x687145a5
mov byte [eax + 3], 0x2e
mov edx, 0x2e2e
mov word [eax + 1], dx
lea edx, [eax + 4]
lea eax, [ebp - 0x144]
mov byte [edx], 0
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov ebx, eax
mov eax, 0x68731140
shr eax, 0x10
je 0x68714370
mov dword [esp + 4], 0xffffffff
mov dword [esp], 0x68731140
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x6872f88d
test ecx, ecx
jne 0x68713f06
cmp word [0x68731140], 0
je 0x687145fa
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [edx + edx + 0x68731142], 0
jne 0x68713e40
mov esi, 0x224c
mov dword [ebp - 0x17c], ebx
lea eax, [ebp - 0x142]
mov word [ebp - 0x144], si
mov esi, 0x68731140
jmp 0x68713ea0
cmp cx, 9
je 0x687142a8
cmp cx, 0xa
jne 0x68714490
mov ecx, 0x6e5c
add eax, 2
mov word [eax - 2], cx
sub edx, 1
jb 0x687145ad
lea ecx, [ebp - 0x22]
cmp ecx, eax
jb 0x68713ed4
movzx ecx, word [esi]
add esi, 2
cmp cx, 0xd
je 0x68714278
jbe 0x68713e70
cmp cx, 0x22
je 0x68714318
cmp cx, 0x5c
jne 0x687143e8
mov ecx, 0x5c5c
add eax, 2
mov word [eax - 2], cx
jmp 0x68713e90
mov byte [eax], 0x22
mov ebx, dword [ebp - 0x17c]
test edx, edx
je 0x687145b6
mov byte [eax + 3], 0x2e
mov edx, 0x2e2e
mov word [eax + 1], dx
lea edx, [eax + 4]
lea eax, [ebp - 0x144]
mov byte [edx], 0
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Theme_active:__s__s__s_n
mov dword [esp + 8], str.UXTHEME_LoadTheme
mov dword [esp + 4], 0x6871908c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_7
jmp 0x68713a73
mov eax, str.DllName
shr eax, 0x10
je 0x687141b8
mov dword [esp + 4], 0xffffffff
mov dword [esp], str.DllName
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x6872f88d
test ecx, ecx
jne 0x6871404a
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [edx + edx + 0x6872fa16], 0
jne 0x68713f78
mov eax, 0x224c
mov dword [ebp - 0x17c], ebx
mov esi, str.DllName
mov word [ebp - 0x144], ax
lea eax, [ebp - 0x142]
jmp 0x68713fe0
cmp cx, 9
je 0x68714188
cmp cx, 0xa
jne 0x687141f0
mov edi, 0x6e5c
add eax, 2
mov word [eax - 2], di
sub edx, 1
jb 0x687144e8
lea ecx, [ebp - 0x22]
cmp ecx, eax
jb 0x68714018
movzx ecx, word [esi]
add esi, 2
cmp cx, 0xd
je 0x687141a0
jbe 0x68713fb0
cmp cx, 0x22
je 0x68714170
cmp cx, 0x5c
jne 0x687141d8
mov ecx, 0x5c5c
add eax, 2
mov word [eax - 2], cx
jmp 0x68713fd0
mov byte [eax], 0x22
mov ebx, dword [ebp - 0x17c]
test edx, edx
je 0x687144f1
mov byte [eax + 3], 0x2e
mov edx, 0x2e2e
mov word [eax + 1], dx
lea edx, [eax + 4]
lea eax, [ebp - 0x144]
mov byte [edx], 0
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [esp + 0x18], 0x68731140
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str._hkey_p__s__p__n
mov dword [esp + 8], 0x6872fe6c
mov dword [esp + 4], 0x6871908c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_7
jmp 0x6871393d
cmp eax, 0xea
je 0x687144f9
cmp word [0x68731140], 0
mov eax, 0x68731140
je 0x687140b8
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x687140a8
sub eax, 0x6873113e
mov edx, eax
mov dword [ebp - 0x144], edx
mov dword [esp + 4], edx
mov dword [esp], 0x40
call dword [sym.imp.kernel32.dll_LocalAlloc]
mov ebx, eax
sub esp, 8
xor eax, eax
lea esi, cs:[esi]
nop
movzx edx, word [eax + 0x68731140]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x687140e0
mov dword [esp + 8], 0x104
mov dword [esp + 4], 0x68731140
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
mov edx, dword [ebp - 0x144]
sub esp, 0xc
cmp eax, edx
cmovae edx, eax
mov dword [ebp - 0x15c], edx
mov dword [esp], ebx
cmp eax, 0x104
jbe 0x68714248
call dword [sym.imp.kernel32.dll_LocalFree]
sub esp, 4
jmp 0x68713987
mov dword [esp + 0xc], str.Theming_not_active_n
mov dword [esp + 8], str.UXTHEME_LoadTheme
mov dword [esp + 4], 0x6871908c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_7
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx edi, word [0x687302f0]
add eax, 2
mov word [eax - 2], di
jmp 0x68713fd0
mov ebx, 0x745c
add eax, 2
mov word [eax - 2], bx
jmp 0x68713fd0
movzx edi, word [0x687302ee]
add eax, 2
mov word [eax - 2], di
jmp 0x68713fd0
mov dword [esp + 4], str.DllName
mov dword [esp], 0x6872f880
call sym._wine_dbg_sprintf.constprop.0_2
jmp 0x6871404a
lea edi, [ecx - 0x20]
cmp di, 0x5e
ja 0x687141f0
mov byte [eax], cl
add eax, 1
jmp 0x68713fd0
mov edi, ecx
mov byte [eax], 0x5c
add eax, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefquery_reg_path]
mov edi, ecx
shr di, 8
and edi, 0xf
mov byte [eax - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefquery_reg_path]
mov edi, ecx
and ecx, 0xf
shr di, 4
movzx ecx, byte [ecx + str.0123456789abcdefquery_reg_path]
and edi, 0xf
mov byte [eax - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefquery_reg_path]
mov byte [eax - 1], cl
mov byte [eax - 2], bl
jmp 0x68713fd0
call dword [sym.imp.kernel32.dll_LocalFree]
sub esp, 4
jmp 0x6871398f
movzx esi, word [0x687302ee]
add eax, 2
mov word [eax - 2], si
jmp 0x68713d80
movzx ebx, word [0x687302ee]
add eax, 2
mov word [eax - 2], bx
jmp 0x68713e90
movzx esi, word [0x687302f0]
add eax, 2
mov word [eax - 2], si
jmp 0x68713d80
mov ebx, 0x745c
add eax, 2
mov word [eax - 2], bx
jmp 0x68713e90
mov ebx, 0x745c
add eax, 2
mov word [eax - 2], bx
jmp 0x68713d80
mov word [eax], di
add eax, 2
jmp 0x68713c70
mov ebx, 0x745c
add eax, 2
mov word [eax - 2], bx
jmp 0x68713c70
movzx esi, word [0x687302f0]
add eax, 2
mov word [eax - 2], si
jmp 0x68713c70
movzx ebx, word [0x687302f0]
add eax, 2
mov word [eax - 2], bx
jmp 0x68713e90
mov dword [esp + 4], 0x687310c0
mov dword [esp], 0x6872f880
call sym._wine_dbg_sprintf.constprop.0_2
mov ebx, eax
jmp 0x68713dfd
mov dword [esp + 4], 0x68731040
mov dword [esp], 0x6872f880
call sym._wine_dbg_sprintf.constprop.0_2
mov edi, eax
jmp 0x68713ced
mov dword [esp + 4], 0x68731140
mov dword [esp], 0x6872f880
call sym._wine_dbg_sprintf.constprop.0_2
jmp 0x68713f06
mov esi, ecx
mov byte [eax], 0x5c
add eax, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdefquery_reg_path]
mov esi, ecx
shr si, 8
and esi, 0xf
mov byte [eax - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefquery_reg_path]
mov esi, ecx
and ecx, 0xf
shr si, 4
movzx ecx, byte [ecx + str.0123456789abcdefquery_reg_path]
and esi, 0xf
mov byte [eax - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefquery_reg_path]
mov byte [eax - 1], cl
mov byte [eax - 2], bl
jmp 0x68713d80
lea ebx, [ecx - 0x20]
cmp bx, 0x5e
ja 0x68714490
mov byte [eax], cl
add eax, 1
jmp 0x68713e90
mov esi, ecx
mov byte [eax], 0x5c
add eax, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdefquery_reg_path]
mov esi, ecx
shr si, 8
and esi, 0xf
mov byte [eax - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefquery_reg_path]
mov esi, ecx
and ecx, 0xf
shr si, 4
movzx ecx, byte [ecx + str.0123456789abcdefquery_reg_path]
and esi, 0xf
mov byte [eax - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefquery_reg_path]
mov byte [eax - 1], cl
mov byte [eax - 2], bl
jmp 0x68713c70
lea esi, [ecx - 0x20]
cmp si, 0x5e
ja 0x68714400
mov byte [eax], cl
add eax, 1
jmp 0x68713c70
lea esi, [ecx - 0x20]
cmp si, 0x5e
ja 0x68714390
mov byte [eax], cl
add eax, 1
jmp 0x68713d80
mov ebx, ecx
mov byte [eax], 0x5c
add eax, 5
shr bx, 0xc
movzx ebx, bx
movzx ebx, byte [ebx + str.0123456789abcdefquery_reg_path]
mov byte [eax - 4], bl
mov ebx, ecx
shr bx, 8
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefquery_reg_path]
mov byte [eax - 3], bl
mov ebx, ecx
and ecx, 0xf
shr bx, 4
movzx ecx, byte [ecx + str.0123456789abcdefquery_reg_path]
and ebx, 0xf
movzx ebx, byte [ebx + str.0123456789abcdefquery_reg_path]
mov byte [eax - 1], cl
mov byte [eax - 2], bl
jmp 0x68713e90
mov byte [eax], 0x22
mov ebx, dword [ebp - 0x17c]
lea edx, [eax + 1]
jmp 0x68714039
xor eax, eax
mov word [ebp - 0x16a], ax
mov eax, dword [ebp - 0x15c]
mov dword [ebp - 0x144], eax
mov dword [esp + 4], eax
mov dword [esp], 0x40
call dword [sym.imp.kernel32.dll_LocalAlloc]
sub esp, 8
mov esi, eax
lea eax, [ebp - 0x144]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.DllName
mov dword [esp], ebx
call sym._RegQueryValueExW_24
lea eax, [ebp - 0x16a]
sub esp, 0x18
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_ExpandEnvironmentStringsW]
mov edx, eax
mov eax, dword [ebp - 0x144]
sub esp, 0xc
cmp eax, edx
cmovb eax, edx
mov dword [ebp - 0x15c], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_LocalFree]
sub esp, 4
jmp 0x68713987
mov byte [eax], 0x22
lea edx, [eax + 1]
jmp 0x68713cda
mov byte [eax], 0x22
lea edx, [eax + 1]
jmp 0x68713dea
mov byte [eax], 0x22
mov ebx, dword [ebp - 0x17c]
lea edx, [eax + 1]
jmp 0x68713ef5
mov eax, 0x224c
mov byte [ebp - 0x142], 0x22
lea edx, [ebp - 0x141]
mov word [ebp - 0x144], ax
jmp 0x68713cda
mov eax, 0x224c
mov byte [ebp - 0x142], 0x22
lea edx, [ebp - 0x141]
mov word [ebp - 0x144], ax
jmp 0x68713dea
mov eax, 0x224c
mov byte [ebp - 0x142], 0x22
lea edx, [ebp - 0x141]
mov word [ebp - 0x144], ax
jmp 0x68713ef5