Function at 0x425381
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 [0x42b004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x428], edx
mov ebx, ecx
xor esi, esi
inc edi
mov dword [ebp - 0x418], esi
test ebx, ebx
jne 0x4253b7
xor eax, eax
jmp 0x42562c
push esi
lea eax, [ebp - 0x418]
push eax
push esi
push 3
push esi
push esi
push esi
push 0x401b18
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x4253fd
push esi
lea eax, [ebp - 0x418]
mov edi, esi
push eax
push esi
push 1
push esi
push esi
push esi
push 0x401b18
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4253b0
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 0x4069b4
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 0x41c], 2
mov esi, eax
jne 0x42547c
test esi, esi
jne 0x42548d
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.00418392
jmp 0x4255e7
cmp dword [ebp - 0x41c], 1
jne 0x42548d
test esi, esi
je 0x4255e7
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 0x4069e4
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 0x4254d8
test esi, esi
je 0x425567
mov edx, 0x104
lea ecx, [ebp - 0x20c]
call fcn.00427db5
test eax, eax
jne 0x42555f
lea eax, [ebp - 0x20c]
test eax, eax
je 0x4254fd
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push 0x104
lea eax, [ebp - 0x414]
push eax
push 0x26fd
push dword [0x42c790]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x42555f
push ecx
lea eax, [ebp - 0x424]
mov esi, 0x104
push eax
mov edx, esi
lea ecx, [ebp - 0x20c]
call fcn.00418514
test eax, eax
js 0x42555d
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.00418577
xor esi, esi
test esi, esi
jne 0x425619
test edi, edi
je 0x4255e3
lea ecx, [ebp - 0x20c]
xor edi, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x425576
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push edi
push 0x4069b4
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 0x4255b1
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push edi
push 0x4069fc
push dword [ebp - 0x418]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test esi, esi
jne 0x425619
xor eax, eax
mov word [ebp - 6], ax
cmp dword [ebp - 0x428], eax
jne 0x425608
push 0x104
lea eax, [ebp - 0x20c]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
mov ecx, ebx
call fcn.00418392
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.00429770
mov esp, ebp
pop ebp
ret 4