Function at 0x412150
Capabilities:
Check if file exists
Get common file path
Get file attributes
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x470836
mov eax, dword fs:[0]
push eax
mov eax, 0x2140
call fcn.0045a630
mov eax, dword [0x485c44]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2104], ecx
lea eax, [ebp - 0x2051]
mov dword [ebp - 0x2050], eax
push 0
push 0
mov ecx, dword [ebp - 0x2104]
call fcn.0040d8a0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x2104]
call fcn.00412550
xor ecx, ecx
mov word [ebp - 0x2014], cx
push 0x1ffe
push 0
lea edx, [ebp - 0x2012]
push edx
call fcn.0045a140
add esp, 0xc
mov dword [ebp - 0x10], 0
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push 0x477280
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x41250a
mov dword [ebp - 0x2018], 0
mov dword [ebp - 0x2038], 0x2000
push 0x477228
lea ecx, [ebp - 0x2034]
call fcn.0040d830
mov byte [ebp - 4], 1
mov dword [ebp - 0x2108], 0x477224
mov ecx, dword [ebp - 0x2108]
add ecx, 2
mov dword [ebp - 0x210c], ecx
mov edx, dword [ebp - 0x2108]
mov ax, word [edx]
mov word [ebp - 0x210e], ax
add dword [ebp - 0x2108], 2
cmp word [ebp - 0x210e], 0
jne 0x41223c
mov ecx, dword [ebp - 0x2108]
sub ecx, dword [ebp - 0x210c]
sar ecx, 1
mov dword [ebp - 0x2114], ecx
mov edx, dword [ebp - 0x2114]
push edx
push 0x477224
push 3
push 1
lea ecx, [ebp - 0x2034]
call fcn.0040edc0
cmp dword [ebp - 0x201c], 8
jb 0x4122a3
mov eax, dword [ebp - 0x2030]
mov dword [ebp - 0x2118], eax
jmp 0x4122af
lea ecx, [ebp - 0x2030]
mov dword [ebp - 0x2118], ecx
lea edx, [ebp - 0x2038]
push edx
lea eax, [ebp - 0x2014]
push eax
lea ecx, [ebp - 0x2018]
push ecx
push 0
mov edx, dword [ebp - 0x2118]
push edx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4124f7
mov dword [ebp - 0x203c], 0x477208
push 0x477208
lea ecx, [ebp - 0x2014]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
mov dword [ebp - 0x2040], eax
cmp dword [ebp - 0x2040], 0
je 0x41248e
mov edx, dword [ebp - 0x2040]
lea eax, [ebp - 0x2014]
sub edx, eax
sar edx, 1
mov dword [ebp - 0x2048], edx
lea ecx, [ebp - 0x2014]
mov dword [ebp - 0x211c], ecx
mov edx, dword [ebp - 0x211c]
add edx, 2
mov dword [ebp - 0x2120], edx
mov eax, dword [ebp - 0x211c]
mov cx, word [eax]
mov word [ebp - 0x2122], cx
add dword [ebp - 0x211c], 2
cmp word [ebp - 0x2122], 0
jne 0x41233f
mov edx, dword [ebp - 0x211c]
sub edx, dword [ebp - 0x2120]
sar edx, 1
mov dword [ebp - 0x2128], edx
mov eax, dword [ebp - 0x2128]
push eax
lea ecx, [ebp - 0x2014]
push ecx
mov ecx, dword [ebp - 0x2104]
call fcn.0040d960
push 0x477208
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
mov edx, dword [ebp - 0x2048]
push edx
mov ecx, dword [ebp - 0x2104]
call fcn.0040dd10
push 0
push 0x28
lea eax, [ebp - 0x2014]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea ecx, [ebp - 0x2014]
mov dword [ebp - 0x212c], ecx
mov edx, dword [ebp - 0x212c]
add edx, 2
mov dword [ebp - 0x2130], edx
mov eax, dword [ebp - 0x212c]
mov cx, word [eax]
mov word [ebp - 0x2132], cx
add dword [ebp - 0x212c], 2
cmp word [ebp - 0x2132], 0
jne 0x4123d9
mov edx, dword [ebp - 0x212c]
sub edx, dword [ebp - 0x2130]
sar edx, 1
mov dword [ebp - 0x2138], edx
mov eax, dword [ebp - 0x2138]
push eax
lea ecx, [ebp - 0x2014]
push ecx
mov edx, dword [ebp - 0x2048]
push edx
mov ecx, dword [ebp - 0x2104]
call fcn.004126e0
mov eax, dword [ebp - 0x2104]
cmp dword [eax + 0x18], 8
jb 0x41244b
mov ecx, dword [ebp - 0x2104]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x213c], edx
jmp 0x41245a
mov eax, dword [ebp - 0x2104]
add eax, 4
mov dword [ebp - 0x213c], eax
mov ecx, dword [ebp - 0x213c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x2044], eax
cmp dword [ebp - 0x2044], 0xffffffff
je 0x412481
mov edx, dword [ebp - 0x2044]
and edx, 0x10
jne 0x41248c
mov ecx, dword [ebp - 0x2104]
call fcn.00412550
jmp 0x4124f7
lea eax, [ebp - 0x2014]
mov dword [ebp - 0x2140], eax
mov ecx, dword [ebp - 0x2140]
add ecx, 2
mov dword [ebp - 0x2144], ecx
mov edx, dword [ebp - 0x2140]
mov ax, word [edx]
mov word [ebp - 0x2146], ax
add dword [ebp - 0x2140], 2
cmp word [ebp - 0x2146], 0
jne 0x4124a9
mov ecx, dword [ebp - 0x2140]
sub ecx, dword [ebp - 0x2144]
sar ecx, 1
mov dword [ebp - 0x214c], ecx
mov edx, dword [ebp - 0x214c]
push edx
lea eax, [ebp - 0x2014]
push eax
mov ecx, dword [ebp - 0x2104]
call fcn.0040d960
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x2034]
call fcn.0040d8a0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x2104]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00458357
mov esp, ebp
pop ebp
ret