Function at 0x40a480
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5393a9
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x58d140]
xor eax, esp
mov dword [esp + 0x238], eax
push ebx
push esi
push edi
mov eax, dword [0x58d140]
xor eax, esp
push eax
lea eax, [esp + 0x250]
mov dword fs:[0], eax
mov esi, ecx
call fcn.0041472a
call fcn.0040e25e
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40a4e3
push 0x80004005
call fcn.00401670
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
push 0x56802c
lea ecx, [esp + 0x1c]
mov dword [esp + 0x25c], ebx
call fcn.00405e40
mov edi, eax
push str.Upgrader_OnInitDialog
lea ecx, [esp + 0x20]
mov byte [esp + 0x25c], 1
call fcn.00405e40
push edi
push eax
lea ecx, [esp + 0x2c]
push ecx
mov edi, 3
mov byte [esp + 0x264], 2
call fcn.00406e60
mov byte [esp + 0x258], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a56d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x258], 0
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 0x40a595
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esi + 0xec]
mov ecx, dword [esi + 0x20]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
push 1
push 0x80
push ecx
call edi
mov eax, dword [esi + 0xec]
mov edx, dword [esi + 0x20]
push eax
push ebx
push 0x80
push edx
call edi
call fcn.0040c580
test al, al
jne 0x40a8e4
push 0x56802c
lea ecx, [esp + 0x18]
call fcn.00405e40
mov edi, eax
push str.Upgrader_Started_without_access_to_program_files.
lea ecx, [esp + 0x24]
mov byte [esp + 0x25c], 3
call fcn.00405e40
push edi
push eax
lea eax, [esp + 0x2c]
push eax
mov edi, 1
mov byte [esp + 0x264], 4
call fcn.00406e60
mov byte [esp + 0x258], 3
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a636
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x258], 0
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 0x40a65e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea ecx, [esp + 0x20]
call fcn.00405e40
mov byte [esp + 0x258], 5
mov eax, dword [esp + 0x1c]
cmp dword [eax - 0xc], ebx
jl 0x40a7a6
push str.restarted
push eax
call fcn.0050eae8
add esp, 8
cmp eax, ebx
je 0x40a7a6
sub eax, dword [esp + 0x1c]
sar eax, 1
cmp eax, 0xffffffff
je 0x40a7a6
push 0x56802c
lea ecx, [esp + 0x24]
call fcn.00405e40
mov edi, eax
mov bl, 6
push str.Upgrader_Re_Started_without_access_to_program_files._Exiting.
lea ecx, [esp + 0x18]
mov byte [esp + 0x25c], bl
call fcn.00405e40
push edi
push eax
lea ecx, [esp + 0x2c]
push ecx
mov edi, 1
mov byte [esp + 0x264], 7
call fcn.00406e60
mov byte [esp + 0x258], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a70f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x258], 5
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a737
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x17c]
mov ecx, esi
call eax
mov byte [esp + 0x258], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a76b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ebx, [esp + 0x28]
mov dword [esp + 0x258], 0xffffffff
call fcn.004044d0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a79f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40a97c
push 0x56802c
lea ecx, [esp + 0x1c]
call fcn.00405e40
push 0x104
lea ecx, [esp + 0x40]
push ecx
push ebx
mov byte [esp + 0x264], 8
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40a830
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x18]
call fcn.00405e40
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x25c], 9
call fcn.00401600
mov byte [esp + 0x258], 8
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 0x40a819
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], ebx
jl 0x40a830
push 0x56a8a0
push eax
call fcn.0050eae8
add esp, 8
push 0x56802c
lea ecx, [esp + 0x3c]
call fcn.00405e40
push str._restarted
lea ecx, [esp + 0x18]
mov byte [esp + 0x25c], 0xa
call fcn.00405e40
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.004082c0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a87f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x17c]
mov ecx, esi
call eax
mov byte [esp + 0x258], 8
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a8b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x258], 5
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 0x40a743
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40a743
mov ecx, dword [esi + 0xe4]
mov eax, dword [esi + 0x20]
push ecx
mov dword [esi + 0xd8], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [esi + 0xe4]
lea ecx, [esi + 0xc8]
mov dword [esi + 0xdc], eax
call fcn.004012c0
push ebx
push ebx
push ebx
push ebx
lea edi, [esi + 0xc0]
push edi
push 0x40a9a0
mov dword [edi], esi
call fcn.004119ed
push ebx
push ebx
push ebx
push ebx
push edi
push 0x40ba20
mov dword [esi + 0xbc], eax
call fcn.004119ed
lea ebx, [esp + 0x28]
mov dword [esi + 0xe8], eax
mov dword [esp + 0x258], 0xffffffff
call fcn.004044d0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a977
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x250]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x238]
xor ecx, esp
call fcn.0050e0a7
mov esp, ebp
pop ebp
ret