Function at 0x404a40
Capabilities:
Accept command line arguments
Get common file path
Get program files directory
Query environment variable

Disassembly:
sub esp, 0x240
mov eax, dword [0x472940]
xor eax, esp
mov dword [esp + 0x23c], eax
mov eax, dword [esp + 0x244]
push ebx
push eax
call fcn.0040989d
add esp, 4
xor ebx, ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
test eax, eax
jl 0x404d9d
push esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
lea ecx, [esp + 0xc]
call fcn.004013b0
mov eax, dword [esp + 8]
cmp dword [eax - 0xc], ebx
jl 0x404bbd
push str.silence
push eax
call fcn.0044390e
add esp, 8
cmp eax, ebx
je 0x404bbd
sub eax, dword [esp + 8]
cmp eax, 0xffffffff
je 0x404bbd
push 0x103
lea eax, [esp + 0x41]
push ebx
push eax
mov dword [0x476990], 1
mov byte [esp + 0x48], bl
call fcn.00445f90
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
add esp, 0xc
push 0x104
lea ecx, [esp + 0x40]
push ecx
push str.INSTALLPATH
call esi
test eax, eax
je 0x404b02
lea edx, [esp + 0x3c]
push edx
mov ecx, 0x476a04
call fcn.00401490
mov eax, dword [0x476a04]
cmp dword [eax - 0xc], ebx
jne 0x404b72
push 0x103
lea ecx, [esp + 0x145]
push ebx
push ecx
mov byte [esp + 0x14c], bl
call fcn.00445f90
add esp, 0xc
push ebx
push 0x26
lea edx, [esp + 0x148]
push edx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [esp + 0x140]
push eax
mov ecx, 0x476a04
call fcn.00401490
mov eax, 0x476a04
call fcn.00401ae0
push 4
push str.Sgsc
mov ecx, 0x476a04
call fcn.00402520
mov eax, 0x476a04
call fcn.00401ae0
xor eax, eax
push 0x1e
lea ecx, [esp + 0x20]
push ecx
push str.CALLPROCESSID
mov byte [esp + 0x28], bl
mov dword [esp + 0x29], eax
mov dword [esp + 0x2d], eax
mov dword [esp + 0x31], eax
mov dword [esp + 0x35], eax
mov dword [esp + 0x39], eax
mov dword [esp + 0x3d], eax
mov dword [esp + 0x41], eax
mov word [esp + 0x45], ax
call esi
test eax, eax
je 0x404bbd
lea edx, [esp + 0x1c]
push edx
call fcn.00443e3e
add esp, 4
mov dword [0x476994], eax
cmp dword [0x476990], ebx
je 0x404bd4
call fcn.00404980
mov dword [0x47698c], eax
jmp 0x404c65
push 0x304
call fcn.0043678c
add esp, 4
cmp eax, ebx
je 0x404bf4
push edi
mov edi, eax
call fcn.00403300
mov esi, eax
pop edi
cmp esi, ebx
jne 0x404c0d
mov eax, dword [esp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x404d90
push ebx
push 0x23c
push 0x320
push ebx
push ebx
push ebx
push 0x96c80000
push 0x467f50
push ebx
mov ecx, esi
call fcn.0040934c
mov ecx, esi
call fcn.00408f39
push 5
mov ecx, esi
call fcn.004212ae
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.0040c911
lea eax, [esi + 0x2e4]
call fcn.00405b40
lea ecx, [esi + 0x18]
call fcn.0040afa6
push esi
call fcn.004367bb
add esp, 4
call fcn.00402e30
cmp dword [0x47698c], ebx
je 0x404d57
push 0x467f74
push str.UPGRADE
mov ecx, str.updateupgrade.ini
mov ebx, str.myupgradetype
lea esi, [esp + 0x18]
call fcn.004010f0
add esp, 8
push 0x467c1c
lea ecx, [esp + 0x10]
call fcn.004013b0
push str.1.1.4.0.0
lea ecx, [esp + 0x1c]
call fcn.004013b0
push 0x467f9c
lea ecx, [esp + 0x18]
call fcn.004013b0
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
lea edx, [esp + 0x14]
mov ecx, esi
call fcn.00402f00
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404cf5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404d15
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404d35
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404d55
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ebx, ebx
mov ecx, dword [0x4769f8]
push 0x2710
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x404d76
mov dword [0x4769f4], ebx
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [esp + 8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404d9c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop esi
mov ecx, dword [esp + 0x240]
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00443100
add esp, 0x240
ret 0x10