Function at 0x401840
Capabilities:
Check if file exists
Check mutex on windows
Copy file
Get common file path
Set registry value

Disassembly:
sub esp, 0x490
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x299]
mov byte [esp + 0x298], bl
mov byte [esp + 0x90], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x91]
mov byte [esp + 0x39c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x39d]
mov dl, 0x86
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, 0x93
mov cl, 0x9f
mov byte [esp + 0x10], al
mov byte [esp + 0x1a], al
mov byte [esp + 0x25], cl
mov byte [esp + 0x29], cl
mov byte [esp + 0x32], al
mov byte [esp + 0x3a], al
mov cl, 0x82
lea eax, [esp + 0x10]
push 0x2e
mov byte [esp + 0x30], cl
mov byte [esp + 0x38], cl
mov byte [esp + 0x40], cl
push eax
mov byte [esp + 0x19], 0xc3
mov byte [esp + 0x1a], 0xd1
mov byte [esp + 0x1b], 0xc6
mov byte [esp + 0x1c], 0xa9
mov byte [esp + 0x1d], 0xc9
mov byte [esp + 0x1e], 0xcc
mov byte [esp + 0x1f], 0xe9
mov byte [esp + 0x20], 0xbb
mov byte [esp + 0x21], 0xe7
mov byte [esp + 0x23], 0x8d
mov byte [esp + 0x24], 0x85
mov byte [esp + 0x25], 0x9e
mov byte [esp + 0x26], 0x91
mov byte [esp + 0x27], 0xf3
mov byte [esp + 0x28], 0xf2
mov byte [esp + 0x29], 0x8b
mov byte [esp + 0x2a], 0x95
mov byte [esp + 0x2b], 0xf7
mov byte [esp + 0x2c], dl
mov byte [esp + 0x2e], 0x8f
mov byte [esp + 0x2f], 0x81
mov byte [esp + 0x30], 0x83
mov byte [esp + 0x32], 0xe6
mov byte [esp + 0x33], 0x98
mov byte [esp + 0x35], 0xe3
mov byte [esp + 0x36], 0x9b
mov byte [esp + 0x37], 0x87
mov byte [esp + 0x38], 0xed
mov byte [esp + 0x39], 0xe4
mov byte [esp + 0x3b], 0x8c
mov byte [esp + 0x3d], 0x96
mov byte [esp + 0x3e], 0xe7
mov byte [esp + 0x3f], 0xf1
mov byte [esp + 0x40], dl
mov byte [esp + 0x41], 0x97
mov byte [esp + 0x43], dl
mov byte [esp + 0x45], 0xdb
push 0x20
lea ecx, [esp + 0x4c]
call fcn.004029b0
lea ecx, [esp + 0x40]
call fcn.00402a40
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
cmp esi, ebx
je 0x401b38
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
push esi
jne 0x4019c4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401db8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x4198c8
call fcn.00402a40
push eax
call fcn.004017c0
add esp, 4
mov ecx, 0x4198c8
call fcn.00402a40
push eax
call fcn.00401630
add esp, 4
mov ecx, 0x419888
call fcn.00402a40
push eax
call fcn.004017c0
add esp, 4
mov ecx, 0x419888
call fcn.00402a40
push eax
call fcn.00401630
lea ecx, [esp + 0x94]
push 0x104
push ecx
call fcn.0040e6a0
add esp, 0xc
lea edx, [esp + 0x90]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [esp + 0x90]
push str.AddrUpdate
push eax
call esi
lea ecx, [esp + 0x90]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x401a76
lea edx, [esp + 0x90]
push ebx
push edx
call fcn.00403d90
add esp, 8
test eax, eax
je 0x401b38
lea eax, [esp + 0x90]
push str.AddrUpdate.exe
push eax
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea ecx, [esp + 0x90]
push pe_nt_image_headers32
lea edx, [esp + 0x3a0]
push ecx
push edx
call ebp
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [esp + 0x39c]
push str..bak
push eax
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x298]
push 0x104
push ecx
push ebx
call esi
test eax, eax
je 0x401b38
lea edx, [esp + 0x90]
lea eax, [esp + 0x298]
push edx
push eax
call sub.MSVCRT.dll__mbsicmp
add esp, 8
test eax, eax
je 0x401b77
lea ecx, [esp + 0x90]
push ebx
lea edx, [esp + 0x29c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x401b66
lea eax, [esp + 0x39c]
push ebx
lea ecx, [esp + 0x29c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x401b4e
lea edx, [esp + 0x298]
push ebx
push edx
call fcn.00403e50
add esp, 8
lea ecx, [esp + 0x40]
call fcn.00402a00
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x490
ret
lea eax, [esp + 0x90]
lea ecx, [esp + 0x39c]
push eax
push ecx
call fcn.00403e50
add esp, 8
lea edx, [esp + 0x298]
push ebx
push edx
call fcn.00403e50
add esp, 8
lea eax, [esp + 0x90]
push 0x104
lea ecx, [esp + 0x3a0]
push eax
push ecx
call ebp
lea edx, [esp + 0x90]
push str.__Service
push edx
call edi
mov ecx, 0x419888
call fcn.00402a40
push ebx
mov edi, eax
push ebx
push 2
lea eax, [esp + 0x9c]
push 0x10
push eax
mov ecx, 0x419930
call fcn.00402a40
push eax
push edi
call fcn.00401530
add esp, 0x1c
test eax, eax
je 0x401b38
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x195]
mov byte [esp + 0x194], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x417314
mov ecx, 0x419888
stosb byte es:[edi], al
call fcn.00402a40
push eax
call fcn.004015c0
add esp, 8
lea ecx, [esp + 0x298]
push 0x104
push ecx
push ebx
call esi
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x51]
mov byte [esp + 0x50], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edx, [esp + 0x50]
push ebx
lea eax, [esp + 0x29c]
push edx
push eax
call fcn.00403250
mov esi, dword [sym.imp.SHLWAPI.dll_SHSetValueA]
add esp, 0xc
test eax, eax
je 0x401c69
lea ecx, [esp + 0x50]
push 0x40
push ecx
push 1
push str.DisplayVersion
mov ecx, 0x419818
call fcn.00402a40
push eax
push 0x80000002
call esi
lea edx, [esp + 0x39c]
push 0x104
lea eax, [esp + 0x198]
push edx
push eax
call ebp
lea ecx, [esp + 0x194]
push str.__UnRegister
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ecx, 0x419818
call fcn.00402a40
mov edx, eax
lea edi, [esp + 0x194]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0x194]
push ecx
push eax
push 1
push str.UninstallString
push edx
push 0x80000002
call esi
mov ecx, 0x419978
call fcn.00402a40
mov ecx, 0x419818
mov ebx, eax
call fcn.00402a40
mov ecx, 0x419978
mov ebp, eax
call fcn.00402a40
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push ebx
push 1
push str.DisplayName
push ebp
push 0x80000002
call esi
mov ecx, 0x4198f8
call fcn.00402a40
mov ecx, 0x419818
mov ebx, eax
call fcn.00402a40
mov ecx, 0x4198f8
mov ebp, eax
call fcn.00402a40
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push ebx
push 1
push str.Publisher
push ebp
push 0x80000002
call esi
call fcn.00402d60
test eax, eax
jne 0x401db8
lea ecx, [esp + 0x194]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edx, [esp + 0x194]
push str.msiexec.exe
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [esp + 0x194]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401db8
mov ecx, 0x419818
call fcn.00402a40
mov edx, eax
lea edi, [esp + 0x194]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
lea ecx, [esp + 0x198]
push ecx
push 1
push str.DisplayIcon
push edx
push 0x80000002
call esi
lea ecx, [esp + 0x40]
call fcn.00402a00
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x490
ret