Function at 0x406260
Capabilities:
Get common file path
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x443dd6
mov eax, dword fs:[0]
push eax
sub esp, 0x63c
mov eax, dword [0x44f030]
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 + 8]
xor esi, esi
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x634], eax
call fcn.00406090
cmp eax, 1
je 0x406583
cmp eax, 4
je 0x406583
cmp eax, 5
je 0x406583
push 0x104
lea eax, [ebp - 0x114]
mov dword [ebp - 0x62c], esi
push esi
push eax
call fcn.00409bb0
add esp, 0xc
lea eax, [ebp - 0x114]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push str._sti.dll
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.004258b9
lea eax, [ebp - 0x114]
push eax
push str.STI_DLL_Module_Path___s_r_n
call fcn.00404100
add esp, 0x14
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x406340
push str._STI_Error__LoadLibrary_r_n
call fcn.00404100
add esp, 4
xor esi, esi
jmp 0x406583
push str.StiCreateInstanceW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
jne 0x406370
push str.StiCreateInstanceW
push str._STI_Error__GetProceAddress___s__r_n
call fcn.00404100
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x406583
push 0
lea eax, [ebp - 0x62c]
push eax
push 2
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call esi
test eax, eax
jns 0x4063e7
mov dword [ebp - method._com_error.virtual_0], vtable._com_error.0
mov dword [ebp - 0x640], eax
mov dword [ebp - 0x63c], 0
mov dword [ebp - 0x638], 0
lea ecx, [ebp - 0x644]
mov dword [ebp - 4], 0
call fcn.00404580
push eax
push str._STI_Error__StiCreateInstance___s__r_n
call fcn.00404100
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x644]
call fcn.004043b0
xor esi, esi
jmp 0x4064a5
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x628]
push 0x104
push eax
push 0xffffffffffffffff
push dword [ebp - 0x634]
push 1
push 0
call esi
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0xffffffffffffffff
push ebx
push 1
push 0
call esi
mov eax, dword [ebp - 0x62c]
lea edx, [ebp - 0x420]
push edx
lea edx, [ebp - 0x628]
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x28]
test eax, eax
jns 0x406494
mov dword [ebp - method._com_error.virtual_0], vtable._com_error.0
mov dword [ebp - 0x640], eax
mov dword [ebp - 0x63c], 0
mov dword [ebp - 0x638], 0
lea ecx, [ebp - 0x644]
mov dword [ebp - 4], 1
call fcn.00404580
push eax
push str._STI_Error__RegisterLaunchApplication___s__r_n
call fcn.00404100
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x644]
call fcn.004043b0
xor esi, esi
jmp 0x406499
mov esi, 1
mov eax, dword [ebp - 0x62c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp esi, 1
jne 0x406583
call fcn.00406210
test eax, eax
je 0x406583
push ebx
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004257f6
push str.__StiDevice:_1__StiEvent:_2
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.004258b9
lea esi, [ebp - 0x218]
add esp, 0x18
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4064f6
lea eax, [ebp - 0x630]
sub esi, ecx
push eax
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionStillImageRegistered_Applications
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x406554
lea eax, [ebp - 0x648]
push eax
lea eax, [ebp - 0x630]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionStillImageRegistered_Applications
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x406339
push esi
lea eax, [ebp - 0x218]
push eax
push 1
push 0
push dword [ebp - 0x634]
push dword [ebp - 0x630]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x630]
neg eax
sbb esi, esi
inc esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
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.004072be
mov esp, ebp
pop ebp
ret