Function at 0x402160
Capabilities:
Get common file path
Get startup folder
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x445f2b
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x45f4c8]
xor eax, esp
mov dword [esp + 0x438], eax
push ebx
push esi
push edi
mov eax, dword [0x45f4c8]
xor eax, esp
push eax
lea eax, [esp + 0x450]
mov dword fs:[0], eax
mov edi, ecx
call fcn.0040ab30
cmp eax, 9
je 0x4021bf
cmp eax, 0xb
je 0x4021bf
cmp eax, 0xa
je 0x4021bf
cmp eax, 0xc
jne 0x402421
xor eax, eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], ax
push str.Updating_ME_Components_size__ARP_.
push 0x450cfc
mov dword [esp + 0x460], eax
push 0x46064c
mov dword [esp + 0x1c], eax
call fcn.00417ac0
add esp, 0xc
lea ecx, [edi + 4]
push str.IIF_INSTALLFOLDER
call fcn.004146e0
mov edx, eax
cmp word [edx], 0
jne 0x402219
xor ecx, ecx
jmp 0x40222f
mov ecx, edx
lea esi, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402220
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x24]
call fcn.00404410
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x1c]
mov eax, dword [esp + 0x2c]
cmp edx, 8
mov esi, dword [esp + 0x1c]
cmovae ecx, esi
lea ebx, [eax + eax]
cmp word [ebx + ecx - 2], 0x20
jne 0x402286
cmp edx, 8
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x1c]
cmovae eax, esi
add eax, 0xfffffffe
cmp edx, 8
cmovae ecx, esi
add eax, ebx
je 0x40227a
sub eax, ecx
sar eax, 1
push 1
push eax
lea ecx, [esp + 0x24]
call fcn.00403ff0
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [esp + 0x3c]
push eax
call fcn.004040a0
push 0
push 0
mov ecx, edi
call fcn.00402450
shrd eax, edx, 0xa
add dword [esp + 0x10], eax
lea eax, [esp + 0x34]
push eax
push 0
push 0
push 0x23
shr edx, 0xa
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0x34]
push str.IntelPackage_Cache
push eax
call ebx
cmp dword [edi + 0x248], 8
lea esi, [edi + 0x234]
jb 0x4022f9
mov eax, dword [esi]
jmp 0x4022fb
mov eax, esi
push eax
lea eax, [esp + 0x38]
push eax
call ebx
sub esp, 0x18
xor eax, eax
mov edx, esp
mov dword [edx + 0x14], 7
mov dword [edx + 0x10], 0
mov word [edx], ax
cmp word [esp + 0x4c], ax
jne 0x402326
xor ecx, ecx
jmp 0x40233f
lea ecx, [esp + 0x4c]
lea ebx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402330
sub ecx, ebx
sar ecx, 1
push ecx
lea eax, [esp + 0x50]
mov ecx, edx
push eax
call fcn.00404410
push 0
push 0
mov ecx, edi
call fcn.00402450
shrd eax, edx, 0xa
push str.SoftwareMicrosoftWindowsCurrentVersionUninstall_
add dword [esp + 0x14], eax
lea eax, [esp + 0x240]
push 0x104
shr edx, 0xa
push eax
call fcn.0042ffd1
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x402384
mov esi, dword [esi]
push esi
lea eax, [esp + 0x240]
push 0x104
push eax
call fcn.0043002d
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push 0x20106
push 0
lea eax, [esp + 0x248]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4023f6
push dword [esp + 0x10]
push str.Setting_application_size_to__d_kb
push 0x450cfc
push 0x46064c
call fcn.00417ac0
add esp, 0x10
lea eax, [esp + 0x10]
push 4
push eax
push 4
push 0
push str.EstimatedSize
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x40240e
push eax
push str.Error_while_setting_estimated_aplication_size_column:__d
push 0x450cfc
push 0x46064c
call fcn.00417ac0
add esp, 0x10
cmp dword [esp + 0x30], 8
jb 0x402421
push dword [esp + 0x1c]
call fcn.00420070
add esp, 4
mov ecx, dword [esp + 0x450]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x438]
xor ecx, esp
call fcn.0042f51f
mov esp, ebp
pop ebp
ret