Function at 0x412c80
Capabilities:
Accept command line arguments
Check if file exists
Create process on windows
Get common file path

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x43eef8
push eax
mov eax, 0x23ec
mov dword fs:[0], esp
call fcn.00427c30
push ebx
push ebp
mov ebp, dword [esp + 0x2404]
push esi
push edi
push ebp
mov dword [esp + 0x7c], ecx
push str.Preparing_to_launch_restarter__applying_update_file:__s__n
call fcn.00406da0
add esp, 8
lea eax, [esp + 0x1f4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0xf0]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov al, byte [esp + 0xf0]
mov bl, 0x5c
test al, al
je 0x412d3c
lea edi, [esp + 0xf0]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0xef], bl
je 0x412d3c
mov edi, 0x44c20c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xf0]
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x28]
mov byte [esp + 0x28], al
call fcn.00417e30
lea edi, [esp + 0x1f4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x1f8]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00401670
mov eax, dword [0x441678]
push 1
lea edx, [esp + 0x17]
push eax
push edx
lea ecx, [esp + 0x30]
mov dword [esp + 0x2410], 0
mov byte [esp + 0x1f], bl
call fcn.00409eb0
mov edi, dword [0x441678]
lea esi, [eax + 1]
cmp dword [esp + 0x2c], esi
jae 0x412dab
call fcn.00431cfc
mov eax, dword [esp + 0x2c]
sub eax, esi
cmp eax, edi
jae 0x412db7
mov edi, eax
test edi, edi
jbe 0x412e02
lea ecx, [esp + 0x24]
call fcn.004030e0
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
sub eax, edi
lea ecx, [edx + edi]
sub eax, esi
add ecx, esi
add edx, esi
push eax
push ecx
push edx
call fcn.00427550
mov esi, dword [esp + 0x38]
add esp, 0xc
sub esi, edi
lea ecx, [esp + 0x24]
push 0
push esi
call fcn.00403160
test al, al
je 0x412e02
push esi
lea ecx, [esp + 0x28]
call fcn.004030c0
mov eax, dword [0x441678]
lea ecx, [esp + 0x24]
push eax
push 0
push ecx
lea ecx, [esp + 0x30]
call fcn.00402e20
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x412e25
mov eax, 0x44167c
push eax
push str.SierraUpdate_folder:__s_n
call fcn.00406da0
mov dl, byte [esp + 0x1b]
add esp, 8
lea ecx, [esp + 0x44]
mov byte [esp + 0x44], dl
push 0
call fcn.00417e30
lea edi, [esp + 0x1f4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x1f4]
push ecx
push eax
lea ecx, [esp + 0x4c]
call fcn.00401670
mov eax, dword [0x441678]
push 1
lea ecx, [esp + 0x17]
push eax
push ecx
lea ecx, [esp + 0x50]
mov byte [esp + 0x2410], 1
mov byte [esp + 0x1f], bl
call fcn.00409eb0
lea esi, [eax + 1]
mov eax, dword [esp + 0x4c]
cmp eax, esi
jae 0x412e98
mov esi, eax
test esi, esi
jbe 0x412edd
lea ecx, [esp + 0x44]
call fcn.004030e0
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
sub eax, esi
lea edx, [ecx + esi]
push eax
push edx
push ecx
call fcn.00427550
mov edi, dword [esp + 0x58]
add esp, 0xc
sub edi, esi
lea ecx, [esp + 0x44]
push 0
push edi
call fcn.00403160
test al, al
je 0x412edd
push edi
lea ecx, [esp + 0x48]
call fcn.004030c0
mov edx, dword [0x441678]
lea eax, [esp + 0x44]
push edx
push 0
push eax
lea ecx, [esp + 0x50]
call fcn.00402e20
lea ecx, [esp + 0x44]
lea edx, [esp + 0x7c]
push ecx
push edx
call fcn.00421db0
add esp, 8
mov eax, dword [esp + 0x48]
mov byte [esp + 0x2404], 2
test eax, eax
jne 0x412f1b
mov eax, 0x44167c
push eax
push str.SierraUpdate_executable:__s_n
call fcn.00406da0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
mov al, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x5c]
mov byte [esp + 0x5c], al
call fcn.00417e30
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
lea ecx, [esp + 0x60]
call fcn.00401670
lea ecx, [esp + 0x58]
lea edx, [esp + 0x8c]
push ecx
push edx
mov byte [esp + 0x240c], 3
call fcn.00421db0
add esp, 8
mov al, byte [esp + 0x58]
push 0
lea ecx, [esp + 0x18]
mov byte [esp + 0x2408], 4
mov byte [esp + 0x18], al
call fcn.00417e30
mov ecx, dword [0x441678]
lea edx, [esp + 0x58]
push ecx
push 0
push edx
lea ecx, [esp + 0x20]
call fcn.00402e20
mov eax, dword [esp + 0x5c]
mov byte [esp + 0x2404], 5
test eax, eax
jne 0x412fbf
mov eax, 0x44167c
push eax
push str.Original_Command_Line___s_n
call fcn.00406da0
mov eax, dword [esp + 0x88]
add esp, 8
test eax, eax
jne 0x412fdd
mov eax, 0x44167c
mov ecx, dword [esp + 0x84]
push ecx
push 0
push eax
lea ecx, [esp + 0x98]
call fcn.00403030
cmp eax, dword [0x441678]
je 0x413176
mov edx, dword [esp + 0x84]
lea esi, [edx + eax]
mov eax, dword [esp + 0x1c]
cmp eax, esi
jae 0x413014
mov esi, eax
test esi, esi
jbe 0x413059
lea ecx, [esp + 0x14]
call fcn.004030e0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
sub eax, esi
lea edx, [ecx + esi]
push eax
push edx
push ecx
call fcn.00427550
mov edi, dword [esp + 0x28]
add esp, 0xc
sub edi, esi
lea ecx, [esp + 0x14]
push 0
push edi
call fcn.00403160
test al, al
je 0x413059
push edi
lea ecx, [esp + 0x18]
call fcn.004030c0
mov eax, dword [0x441678]
lea ecx, [esp + 0x14]
push eax
push 0
push ecx
lea ecx, [esp + 0x20]
call fcn.00402e20
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x413176
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x413096
lea ecx, [esp + 0x14]
call fcn.004030e0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
jmp 0x41309b
mov ecx, 0x44167c
cmp byte [ecx], 0x22
jne 0x41310b
mov esi, 1
cmp eax, esi
jae 0x4130af
mov esi, eax
test esi, esi
jbe 0x4130f0
lea ecx, [esp + 0x14]
call fcn.004030e0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
sub eax, esi
lea edx, [ecx + esi]
push eax
push edx
push ecx
call fcn.00427550
mov edi, dword [esp + 0x28]
add esp, 0xc
sub edi, esi
lea ecx, [esp + 0x14]
push 0
push edi
call fcn.00403160
test al, al
je 0x4130f0
push edi
lea ecx, [esp + 0x18]
call fcn.004030c0
mov edx, dword [0x441678]
lea eax, [esp + 0x14]
push edx
push 0
push eax
lea ecx, [esp + 0x20]
call fcn.00402e20
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x413176
mov esi, 1
cmp eax, esi
jae 0x41311e
mov esi, eax
test esi, esi
jbe 0x41315f
lea ecx, [esp + 0x14]
call fcn.004030e0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
sub eax, esi
lea edx, [ecx + esi]
push eax
push edx
push ecx
call fcn.00427550
mov edi, dword [esp + 0x28]
add esp, 0xc
sub edi, esi
lea ecx, [esp + 0x14]
push 0
push edi
call fcn.00403160
test al, al
je 0x41315f
push edi
lea ecx, [esp + 0x18]
call fcn.004030c0
mov ecx, dword [0x441678]
lea edx, [esp + 0x14]
push ecx
push 0
push edx
lea ecx, [esp + 0x20]
call fcn.00402e20
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x413183
mov eax, 0x44167c
push eax
push str.New_Command_Line__for_restart____s_n
call fcn.00406da0
mov al, byte [esp + 0x1b]
add esp, 8
lea ecx, [esp + 0x34]
mov byte [esp + 0x34], al
push 0
call fcn.00417e30
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebp
lea ecx, [esp + 0x3c]
call fcn.00401670
or ebp, 0xffffffff
mov edi, 0x44c88c
mov ecx, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov bl, 6
push ecx
push eax
push 0x44c88c
lea ecx, [esp + 0x40]
mov byte [esp + 0x2410], bl
call fcn.00403030
test eax, eax
jne 0x413288
mov eax, dword [esp + 0x3c]
mov esi, 2
cmp eax, esi
jae 0x413200
mov esi, eax
test esi, esi
jbe 0x413241
lea ecx, [esp + 0x34]
call fcn.004030e0
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
sub eax, esi
lea edx, [ecx + esi]
push eax
push edx
push ecx
call fcn.00427550
mov edi, dword [esp + 0x48]
add esp, 0xc
sub edi, esi
lea ecx, [esp + 0x34]
push 0
push edi
call fcn.00403160
test al, al
je 0x413241
push edi
lea ecx, [esp + 0x38]
call fcn.004030c0
lea ecx, [esp + 0x34]
lea edx, [esp + 0xf0]
push ecx
lea eax, [esp + 0x6c]
push edx
push eax
call fcn.00409f30
add esp, 0xc
mov ecx, dword [0x441678]
mov byte [esp + 0x2404], 7
push ecx
push 0
push eax
lea ecx, [esp + 0x40]
call fcn.00402e20
push 1
lea ecx, [esp + 0x6c]
mov byte [esp + 0x2408], bl
call fcn.00417e30
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x413295
mov eax, 0x44167c
push eax
push str.Full_update_path___s_n
call fcn.00406da0
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
add esp, 8
push str..SierraUpRestarter.ini
push str.1000
push 0x441cb0
push 0x441ca8
call esi
lea edx, [esp + 0x1f4]
push str..SierraUpRestarter.ini
push edx
push 0x441cbc
push 0x441ca8
call esi
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x4132e5
mov eax, 0x44167c
push str..SierraUpRestarter.ini
push eax
push 0x441cc4
push 0x441ca8
call esi
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x413304
mov eax, 0x44167c
push str..SierraUpRestarter.ini
push eax
push 0x441cd4
push 0x441ca8
call esi
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x413323
mov eax, 0x44167c
push str..SierraUpRestarter.ini
push eax
push 0x441ce0
push 0x441ca8
call esi
mov al, byte [0x44f2e0]
test al, al
mov eax, 0x44c86c
jne 0x413348
mov eax, 0x44c280
push str..SierraUpRestarter.ini
push eax
push 0x441cf0
push 0x441ca8
call esi
push str..SierraUpRestarter.ini
push str.SierraUpRestarter.exe
lea eax, [esp + 0x300]
push str._s__s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0xbc]
push str.Launching_SierraUpRestarter_n
rep stosd dword es:[edi], eax
mov dword [esp + 0xc0], 0x44
call fcn.00406da0
add esp, 0x14
lea ecx, [esp + 0x9c]
lea edx, [esp + 0xac]
lea eax, [esp + 0x2f8]
push ecx
push edx
push 0
push 0
push 8
push 0
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x41347e
mov ecx, dword [esp + 0xa0]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x9c]
push edx
call esi
push 1
lea ecx, [esp + 0x38]
mov byte [esp + 0x2408], 5
call fcn.00417e30
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0x2408], 4
call fcn.00417e30
push 1
lea ecx, [esp + 0x90]
mov byte [esp + 0x2408], 3
call fcn.00417e30
push 1
lea ecx, [esp + 0x5c]
mov byte [esp + 0x2408], 2
call fcn.00417e30
push 1
lea ecx, [esp + 0x80]
mov byte [esp + 0x2408], 1
call fcn.00417e30
push 1
lea ecx, [esp + 0x48]
mov byte [esp + 0x2408], 0
call fcn.00417e30
push 1
lea ecx, [esp + 0x28]
mov dword [esp + 0x2408], ebp
call fcn.00417e30
mov al, 1
jmp 0x41362e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 2
jne 0x4134dd
lea eax, [esp + 0x68]
push 0x2375
push eax
mov ecx, 0x44f200
call fcn.00402690
mov eax, dword [eax + 4]
test eax, eax
jne 0x4134ab
mov eax, 0x44167c
mov edi, eax
mov ecx, ebp
xor eax, eax
lea edx, [esp + 0x3fc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 1
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x6c]
call fcn.00417e30
jmp 0x413547
push 0
lea ecx, [esp + 0x58]
push 0
push ecx
push 0x400
call esi
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
lea edx, [esp + 0x68]
push 0x2376
push edx
mov ecx, 0x44f200
call fcn.00402690
mov eax, dword [eax + 4]
test eax, eax
jne 0x41351b
mov eax, 0x44167c
mov ecx, dword [esp + 0x54]
lea edx, [esp + 0x3fc]
push ecx
push eax
push edx
call fcn.00428790
add esp, 0xc
lea ecx, [esp + 0x68]
push 1
call fcn.00417e30
mov eax, dword [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ecx, [esp + 0x3fc]
push ecx
push str.Error_Starting_SierraUpRestarter:__s_n
call fcn.00406da0
add esp, 8
lea edx, [esp + 0x68]
mov ecx, 0x44f200
push 0x2377
push edx
call fcn.00402690
mov eax, dword [eax + 4]
test eax, eax
jne 0x41357c
mov eax, 0x44167c
mov ecx, dword [esp + 0x78]
push 0
push eax
lea eax, [esp + 0x404]
mov edx, dword [ecx + 0x1c]
push eax
push edx
call sub.SierraPt.dll_SP_MessageBox
add esp, 0x10
lea ecx, [esp + 0x68]
push 1
call fcn.00417e30
push 1
lea ecx, [esp + 0x38]
mov byte [esp + 0x2408], 5
call fcn.00417e30
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0x2408], 4
call fcn.00417e30
push 1
lea ecx, [esp + 0x90]
mov byte [esp + 0x2408], 3
call fcn.00417e30
push 1
lea ecx, [esp + 0x5c]
mov byte [esp + 0x2408], 2
call fcn.00417e30
push 1
lea ecx, [esp + 0x80]
mov byte [esp + 0x2408], 1
call fcn.00417e30
push 1
lea ecx, [esp + 0x48]
mov byte [esp + 0x2408], 0
call fcn.00417e30
push 1
lea ecx, [esp + 0x28]
mov dword [esp + 0x2408], ebp
call fcn.00417e30
xor al, al
mov ecx, dword [esp + 0x23fc]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x23f8
ret 4