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

Disassembly:
push 0xffffffffffffffff
push 0x42c48c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x120
push ebx
push ebp
push esi
mov ebp, ecx
push edi
xor ebx, ebx
push 0x43cbe8
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], 1
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], ebx
call fcn.00420e11
push 0x43cbe8
lea ecx, [esp + 0x1c]
mov dword [esp + 0x13c], ebx
call fcn.00420e11
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall_
lea ecx, [esp + 0x1c]
mov byte [esp + 0x13c], 1
call fcn.00420f2c
lea esi, [ebp + 0x68]
lea eax, [esp + 0x18]
push esi
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.00420fd2
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x13c], 2
call fcn.00420edc
lea ecx, [esp + 0x20]
mov byte [esp + 0x138], 1
call fcn.00420da3
cmp dword [ebp + 8], ebx
jne 0x402840
cmp dword [ebp + 0xc], ebx
je 0x402ae6
mov ecx, ebp
call fcn.00402b30
cmp eax, ebx
mov dword [esp + 0x14], eax
jne 0x40287a
lea ecx, [esp + 0x18]
mov byte [esp + 0x138], bl
call fcn.00420da3
lea ecx, [esp + 0x10]
mov dword [esp + 0x138], 0xffffffff
call fcn.00420da3
xor eax, eax
jmp 0x402b0e
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea edx, [esp + 0x24]
push edx
push 0x2001f
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstall
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
je 0x4028bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x14]
push str.Error_RegOpenKeyEx___:__d
push eax
call fcn.004200fb
add esp, 0xc
mov dword [esp + 0x14], ebx
jmp 0x402ae6
mov esi, dword [esi]
lea ecx, [esp + 0x28]
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x1c]
push ecx
push edx
push ebx
push 0x2001f
push ebx
push 0x43cbe8
push ebx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x402908
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x14]
push str.Error_RegCreateKeyEx___:__d
push ecx
call fcn.004200fb
add esp, 0xc
mov dword [esp + 0x14], ebx
jmp 0x402ac2
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
push 0x2001f
push ebx
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
je 0x402945
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x14]
push str.Error_RegOpenKeyEx___:__d
push ecx
call fcn.004200fb
add esp, 0xc
mov dword [esp + 0x14], ebx
jmp 0x402ac2
lea edx, [ebp + 0x6c]
lea ecx, [esp + 0x20]
push edx
call fcn.00420b18
mov eax, dword [esp + 0x20]
mov byte [esp + 0x138], 3
mov ecx, dword [eax - 8]
add ecx, 4
push ecx
push eax
mov eax, dword [esp + 0x24]
push 1
push ebx
push str.DisplayName
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x402993
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x14]
push str.Error_RegSetValueEx___:__d
push ecx
jmp 0x402aa5
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x2d]
mov byte [esp + 0x2c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x2c]
push 0x104
push edx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
or ecx, 0xffffffff
mov edi, 0x438300
xor eax, eax
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, dword [ebp + 0x64]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x4380c4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea edx, [esp + 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..exe
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add ecx, 3
lea eax, [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x20]
push eax
push 1
push ebx
push str.UninstallString
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x402ab1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x14]
push str.Error_RegSetValueEx___:__d
push edx
call fcn.004200fb
add esp, 0xc
mov dword [esp + 0x14], ebx
lea ecx, [esp + 0x20]
mov byte [esp + 0x138], 1
call fcn.00420da3
mov eax, dword [esp + 0x24]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, ebx
je 0x402ad7
push eax
call esi
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x402ae6
push eax
call esi
mov dword [esp + 0x1c], ebx
lea ecx, [esp + 0x18]
mov byte [esp + 0x138], bl
call fcn.00420da3
lea ecx, [esp + 0x10]
mov dword [esp + 0x138], 0xffffffff
call fcn.00420da3
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x130]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x12c
ret