Function at 0x41fda0
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 [0x4434f4]
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 0x404100
xor edi, edi
mov ebx, edx
push reloc.OLEAUT32.dll_SysReAllocString
inc edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x41fe18
push esi
lea eax, [ebp - 0x418]
mov edi, esi
push eax
push esi
push 1
push esi
push esi
push esi
push 0x404100
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x41fe18
xor eax, eax
jmp 0x420045
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 0x4046c0
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 0x41c], 2
mov esi, eax
jne 0x41fe97
test esi, esi
jne 0x41fea8
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.0040c010
jmp 0x41fffe
cmp dword [ebp - 0x41c], 1
jne 0x41fea8
test esi, esi
je 0x41fffe
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 0x4046f0
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 0x41fef3
test esi, esi
je 0x41ff7e
mov edx, 0x104
lea ecx, [ebp - 0x20c]
call fcn.004358e8
test eax, eax
jne 0x41ff76
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 [0x443af0]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x41ff76
push ecx
lea eax, [ebp - 0x424]
mov esi, 0x104
push eax
mov edx, esi
lea ecx, [ebp - 0x20c]
call fcn.0040c131
test eax, eax
js 0x41ff74
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.0040c197
xor esi, esi
test esi, esi
jne 0x420032
test edi, edi
je 0x41fffa
lea ecx, [ebp - 0x20c]
xor edi, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x41ff8d
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push edi
push 0x4046c0
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 0x41ffc8
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push edi
push 0x404708
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test esi, esi
jne 0x420032
xor eax, eax
mov word [ebp - 6], ax
test ebx, ebx
jne 0x42001b
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.0040c010
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.00441b90
mov esp, ebp
pop ebp
ret