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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x428
mov eax, dword [0x4424f4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x428], ecx
push esi
lea eax, [ebp - 0x418]
mov dword [ebp - 0x418], esi
push eax
push esi
push 3
push esi
push esi
push esi
push 0x404110
xor edi, edi
mov ebx, edx
push reloc.OLEAUT32.dll_SysReAllocString
inc edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x41fb99
push esi
lea eax, [ebp - 0x418]
mov edi, esi
push eax
push esi
push 1
push esi
push esi
push esi
push 0x404110
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x41fb99
xor eax, eax
jmp 0x41fdc6
lea eax, [ebp - 0x420]
mov dword [ebp - 0x420], 0x208
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x41c], 1
push eax
lea eax, [ebp - 0x41c]
push eax
push esi
push 0x4046d0
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 0x41c], 2
mov esi, eax
jne 0x41fc18
test esi, esi
jne 0x41fc29
push 0x104
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x414]
mov edx, 0x104
push eax
lea ecx, [ebp - 0x20c]
call fcn.0040c040
jmp 0x41fd7f
cmp dword [ebp - 0x41c], 1
jne 0x41fc29
test esi, esi
je 0x41fd7f
lea eax, [ebp - 0x420]
mov dword [ebp - 0x420], 0x208
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x41c]
push eax
push 0
push 0x404700
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
xor eax, eax
cmp dword [ebp - 0x41c], 1
mov word [ebp - 6], ax
jne 0x41fc74
test esi, esi
je 0x41fcff
mov edx, 0x104
lea ecx, [ebp - 0x20c]
call fcn.0043529c
test eax, eax
jne 0x41fcf7
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push 0x104
lea eax, [ebp - 0x414]
push eax
push 0x26fd
push dword [0x442af0]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x41fcf7
push ecx
lea eax, [ebp - 0x424]
mov esi, 0x104
push eax
mov edx, esi
lea ecx, [ebp - 0x20c]
call fcn.0040c15d
test eax, eax
js 0x41fcf5
push ecx
lea eax, [ebp - 0x414]
mov edx, esi
push eax
mov eax, dword [ebp - 0x424]
sub edx, eax
push ecx
lea ecx, [ebp - 0x20c]
lea ecx, [ecx + eax*2]
call fcn.0040c1c3
xor esi, esi
test esi, esi
jne 0x41fdb3
test edi, edi
je 0x41fd7b
lea ecx, [ebp - 0x20c]
xor edi, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x41fd0e
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push edi
push 0x4046d0
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x41fd49
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push edi
push 0x404718
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test esi, esi
jne 0x41fdb3
xor eax, eax
mov word [ebp - 6], ax
test ebx, ebx
jne 0x41fd9c
push 0x104
lea eax, [ebp - 0x20c]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov ecx, dword [ebp - 0x428]
lea eax, [ebp - 0x20c]
push eax
mov edx, 0x104
call fcn.0040c040
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test esi, esi
sete al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00441130
leave