Function at 0x40a920
Capabilities:
Extract resource via kernel32 functions
Get common file path
Get program files directory
Query or enumerate registry value

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x470b52
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x248
mov eax, dword [0x4954f4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebx + 8]
push 0x488744
mov dword [ebp - 0x240], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x6e
push 0
mov dword [ebp - 0x238], 0
mov dword [edi], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x230], eax
test eax, eax
je 0x40ad3e
push eax
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
mov dword [ebp - 0x234], esi
test esi, esi
je 0x40ad3e
push dword [ebp - 0x230]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x230], eax
test eax, eax
je 0x40ad3e
inc esi
push esi
call fcn.00444962
push esi
push 0
push eax
mov dword [ebp - 0x23c], eax
call fcn.0044b130
mov esi, dword [ebp - 0x234]
push esi
push dword [ebp - 0x230]
push dword [ebp - 0x23c]
call fcn.0044b510
mov eax, dword [ebp - 0x23c]
add esp, 0x1c
push dword [ebp - 0x230]
mov byte [eax + esi], 0
call dword [sym.imp.KERNEL32.dll_FreeResource]
push esi
mov esi, dword [ebp - 0x23c]
push esi
call fcn.0040b690
mov dword [edi + 0x10], eax
test eax, eax
je 0x40ad31
push str.picwindow
push dword [edi]
push eax
call fcn.0040b7e0
test eax, eax
je 0x40ad31
push str.picwindow
push dword [edi]
call fcn.00415ef0
test eax, eax
je 0x40aa6d
push 1
push eax
call fcn.00417690
push str.edit_install
push dword [edi]
call fcn.00415ef0
mov dword [ebp - 0x234], eax
test eax, eax
je 0x40acfd
mov dword [ebp - 4], 0
xor eax, eax
mov word [ebp - 0x258], ax
mov esi, 7
mov dword [ebp - 0x230], eax
lea eax, [ebp - 0x230]
push eax
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstallXXPic
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x248], 0
mov dword [ebp - 0x238], esi
mov dword [ebp - 0x244], esi
mov dword [ebp - 0x240], 1
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x40ab63
mov esi, dword [ebp - 0x230]
test esi, esi
je 0x40ab74
push 0x20a
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.0044b130
add esp, 0xc
mov dword [ebp - 0x22c], 0x20a
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x228]
push eax
push 0
push 0
push str.InstallLocation
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea ecx, [ebp - 0x228]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ab35
sub ecx, edx
lea eax, [ebp - 0x228]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x258]
call fcn.00407ef0
mov eax, dword [ebp - 0x244]
mov dword [ebp - 0x238], eax
mov eax, dword [ebp - 0x230]
test eax, eax
je 0x40ab74
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea esi, [edi + 0x14]
lea eax, [ebp - 0x258]
cmp esi, eax
je 0x40abef
mov ecx, dword [esi + 0x14]
cmp ecx, 8
jb 0x40abba
mov eax, dword [esi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x40abb0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ad64
mov eax, edx
push ecx
push eax
call fcn.00444954
add esp, 8
movups xmm0, xmmword [ebp - 0x258]
mov dword [esi + 0x10], 0
xor ecx, ecx
mov dword [esi + 0x14], 7
mov eax, 7
movups xmmword [esi], xmm0
mov word [ebp - 0x258], cx
movq xmm0, qword [ebp - 0x248]
movq qword [esi + 0x10], xmm0
jmp 0x40abf5
mov eax, dword [ebp - 0x238]
mov dword [ebp - 4], 0xffffffff
cmp eax, 8
jb 0x40ac36
mov ecx, dword [ebp - 0x258]
lea edx, [eax*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ac2c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ad64
push edx
push ecx
call fcn.00444954
add esp, 8
cmp dword [edi + 0x24], 0
jne 0x40acdf
push 0x20a
lea eax, [ebp - 0x228]
push 0
push eax
call fcn.0044b130
add esp, 0xc
lea eax, [ebp - 0x228]
push 0
push 0x26
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.XXPic
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov ecx, dword [ebp - 0x234]
lea edx, [ebp - 0x228]
push edx
push ecx
mov eax, dword [ecx]
call dword [eax + 0xa8]
push 0
push dword [ebp - 0x234]
call fcn.00417720
push 0
push dword [ebp - 0x234]
call fcn.00417690
lea ecx, [ebp - 0x228]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40acc1
sub ecx, edx
lea eax, [ebp - 0x228]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00407ef0
cmp dword [esi + 0x14], 8
jb 0x40ace7
mov esi, dword [esi]
mov ecx, dword [ebp - 0x234]
push esi
push ecx
mov eax, dword [ecx]
call dword [eax + 0xa8]
mov esi, dword [ebp - 0x23c]
push str.btninstall
push dword [edi]
call fcn.00415ef0
test eax, eax
je 0x40ad15
push eax
push dword [edi]
call fcn.00415f20
push 5
push dword [edi]
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [edi]
call dword [sym.imp.USER32.dll_UpdateWindow]
mov dword [ebp - 0x238], 1
test esi, esi
je 0x40ad3e
push esi
call fcn.0044421a
add esp, 4
mov eax, dword [ebp - 0x238]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00444204
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4
call fcn.004538a3
int3