Function at 0x410a40
Capabilities:
Check if file exists
Get file version info
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42a76d
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
mov eax, dword [0x43b00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0xc8], eax
mov byte [ebp - 0x99], 0
call fcn.00403ba0
mov ecx, eax
test ecx, ecx
jne 0x410a96
push 0x80004005
call fcn.00404640
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xa0], eax
push esi
lea eax, [ebp - 0xa0]
mov dword [ebp - 4], 0
push str.CLSID_sInProcServer32
push eax
call fcn.00405050
add esp, 0xc
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xbc], 0
push 0x20119
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xc4]
mov esi, dword [ebp - 0xa0]
push esi
push 0x80000000
call fcn.004035a0
or edi, 0xffffffff
test eax, eax
je 0x410b17
mov ebx, dword [ebp - 0xc4]
mov byte [ebp - 0x99], 0
jmp 0x410bda
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x410b41
push 0x104
lea ecx, [ebp - 0xa0]
call fcn.00403fb0
mov esi, dword [ebp - 0xa0]
mov ebx, dword [ebp - 0xc4]
lea eax, [ebp - 0xa8]
push eax
push esi
lea eax, [ebp - 0xac]
mov dword [ebp - 0xa8], 0x208
push eax
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x410ba7
mov eax, dword [ebp - 0xac]
cmp eax, 1
je 0x410b7f
cmp eax, 2
jne 0x410ba7
test esi, esi
je 0x410c2a
mov eax, dword [ebp - 0xa8]
test eax, eax
je 0x410c25
test al, 1
jne 0x410ba7
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x410c2a
push dword [esi - 8]
push esi
call fcn.0041ca0c
add esp, 8
test eax, eax
js 0x410d83
cmp eax, dword [esi - 8]
jg 0x410d83
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
test ebx, ebx
je 0x410be5
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
test ebx, ebx
je 0x410be5
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x410c01
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0x99]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00416148
mov esp, ebp
pop ebp
ret 8
xor eax, eax
mov word [esi], ax
push dword [esi - 8]
push esi
call fcn.0041ca0c
add esp, 8
test eax, eax
js 0x410d83
cmp eax, dword [esi - 8]
jg 0x410d83
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
call fcn.00403ba0
mov ecx, eax
test ecx, ecx
jne 0x410c65
push 0x80004005
call fcn.00404640
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0xa4], edi
mov byte [ebp - 4], 2
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x410ca1
push 0x104
lea ecx, [ebp - 0xa4]
call fcn.00403fb0
mov edi, dword [ebp - 0xa4]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x410ccb
push 0x104
lea ecx, [ebp - 0xa0]
call fcn.00403fb0
mov esi, dword [ebp - 0xa0]
push 0x104
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x410cf4
lea eax, [ebp - 0xa4]
push eax
lea ecx, [ebp - 0xa0]
call fcn.00414880
mov esi, dword [ebp - 0xa0]
push dword [esi - 8]
push esi
call fcn.0041ca0c
add esp, 8
test eax, eax
js 0x410d83
cmp eax, dword [esi - 8]
jg 0x410d83
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push dword [edi - 8]
push edi
call fcn.0041ca0c
add esp, 8
test eax, eax
js 0x410d83
cmp eax, dword [edi - 8]
jg 0x410d83
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
mov eax, dword [0x43ce5c]
test eax, eax
jne 0x410d61
push str.Wow64DisableWow64FsRedirection
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x43ce5c], eax
test eax, eax
jne 0x410d61
mov dword [ebp - 0xac], eax
jmp 0x410d76
lea ecx, [ebp - 0xcc]
push ecx
call eax
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0xac], eax
mov eax, dword [esi - 0xc]
cmp eax, 3
jle 0x410d98
cmp eax, 1
jge 0x410d8d
push 0x80070057
call fcn.00404640
cmp word [esi + 2], 0x3a
je 0x410e8e
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x410dc2
push 0x104
lea ecx, [ebp - 0xa4]
call fcn.00403fb0
mov edi, dword [ebp - 0xa4]
push 0
push edi
push 0x104
push str..dll
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathW]
push dword [edi - 8]
mov ebx, eax
push edi
call fcn.0041ca0c
add esp, 8
test eax, eax
js 0x410d83
cmp eax, dword [edi - 8]
jg 0x410d83
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
cmp ebx, 0x104
jb 0x410e6c
add ebx, 4
jns 0x410e0f
push 0x80070057
call fcn.00404640
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, ebx
or eax, ecx
jge 0x410e32
push ebx
lea ecx, [ebp - 0xa4]
call fcn.00403fb0
mov edi, dword [ebp - 0xa4]
push 0
push edi
push ebx
push str..dll
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathW]
push dword [edi - 8]
mov ebx, eax
push edi
call fcn.0041ca0c
add esp, 8
test eax, eax
js 0x410d83
cmp eax, dword [edi - 8]
jg 0x410d83
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
test ebx, ebx
je 0x410e88
lea eax, [ebp - 0xa4]
push eax
lea ecx, [ebp - 0xa0]
call fcn.00414880
mov esi, dword [ebp - 0xa0]
mov ebx, dword [ebp - 0xc4]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x410fa7
push ecx
lea eax, [ebp - 0x94]
push esi
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x98], eax
call fcn.00415e10
mov byte [ebp - 4], 3
push dword [ebp - 0x98]
mov dword [ebp - 0xb8], 0
call fcn.0041f28a
add esp, 4
mov dword [ebp - 0xb4], eax
lea ecx, [ebp - 0xa8]
mov dword [ebp - 0xa8], 0
push ecx
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeA]
mov dword [ebp - 0xa8], eax
test eax, eax
je 0x410f22
push eax
call fcn.00419da8
add esp, 4
mov dword [ebp - 0xb8], eax
test eax, eax
je 0x410f22
push eax
push dword [ebp - 0xa8]
push 0
push dword [ebp - 0xb4]
call dword [sym.imp.VERSION.dll_GetFileVersionInfoA]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x94]
mov eax, dword [ebp - 0x98]
cmp eax, ecx
je 0x410f3f
push eax
call fcn.00419da3
add esp, 4
sub esp, 8
lea ecx, [ebp - 0xb8]
call fcn.0040e0a0
mov ecx, dword [ebp - 0xc8]
push eax
mov dword [ebp - 0xb0], eax
call fcn.00415ce0
mov eax, dword [ebp - 0xb0]
test eax, eax
je 0x410f72
push eax
call fcn.00419da3
add esp, 4
mov byte [ebp - 0x99], 1
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0xb8]
test eax, eax
je 0x410f90
push eax
call fcn.00419da3
add esp, 4
mov eax, dword [ebp - 0xb4]
test eax, eax
je 0x410fa3
push eax
call fcn.00419da3
add esp, 4
mov byte [ebp - 4], 2
cmp byte [ebp - 0xac], 0
je 0x410fed
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0xb0], eax
mov eax, dword [0x43ce58]
test eax, eax
jne 0x410fe5
push str.Wow64RevertWow64FsRedirection
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x43ce58], eax
test eax, eax
je 0x410fed
push dword [ebp - 0xb0]
call eax
mov byte [ebp - 4], 1
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x411009
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
or edi, 0xffffffff
jmp 0x410bcd