Function at 0x403050
Capabilities:
Accept command line arguments
Check if file exists
Create process on windows
Get common file path
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2ec
mov eax, dword [0x434014]
xor eax, esp
mov dword [esp + 0x2e8], eax
push ebx
push esi
push edi
call fcn.0040a600
test al, al
jne 0x403ad6
xor ebx, ebx
mov dword [esp + 0x4c], 0
push ebx
push 0x42f83c
lea ecx, [esp + 0xbc]
mov dword [esp + 0x88], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 7
mov dword [esp + 0x70], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 7
mov dword [esp + 0x18], ebx
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xcc], ebx
mov dword [esp + 0xd0], 7
call fcn.00404100
lea eax, [esp + 0x98]
mov dword [esp + 0x98], ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
test esi, esi
je 0x4032ba
mov eax, dword [esp + 0x98]
sub eax, 5
je 0x403252
sub eax, 1
je 0x4031dc
sub eax, 1
jne 0x4032ba
push dword [esi + 4]
call fcn.00414228
add esp, 4
mov dword [esp + 0x4c], eax
push dword [esi + 8]
call fcn.00414228
mov edx, dword [esi + 0xc]
add esp, 4
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403160
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x88]
call fcn.00404100
mov edx, dword [esi + 0x10]
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403185
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x70]
call fcn.00404100
push dword [esi + 0x14]
call fcn.00414228
mov edx, dword [esi + 0x18]
mov ebx, eax
mov ecx, edx
mov dword [esp + 0x14], ebx
add esp, 4
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4031c0
sub ecx, esi
sar ecx, 1
push ecx
lea ecx, [esp + 0xb8]
jmp 0x4032b4
push dword [esi + 4]
call fcn.00414228
add esp, 4
mov dword [esp + 0x4c], eax
push dword [esi + 8]
call fcn.00414228
mov edx, dword [esi + 0xc]
add esp, 4
mov ecx, edx
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403200
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x88]
call fcn.00404100
mov edx, dword [esi + 0x10]
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403225
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x70]
call fcn.00404100
push dword [esi + 0x14]
call fcn.00414228
mov ebx, eax
add esp, 4
mov dword [esp + 0x10], ebx
jmp 0x4032ba
push dword [esi + 4]
call fcn.00414228
add esp, 4
mov dword [esp + 0x4c], eax
push dword [esi + 8]
call fcn.00414228
mov edx, dword [esi + 0xc]
add esp, 4
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403274
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x88]
call fcn.00404100
mov edx, dword [esi + 0x10]
mov ecx, edx
lea esi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4032a0
sub ecx, esi
sar ecx, 1
push ecx
lea ecx, [esp + 0x6c]
push edx
call fcn.00404100
cmp dword [esp + 0x7c], 8
lea edx, [esp + 0x68]
mov eax, dword [esp + 0x78]
mov ecx, 0x5c
cmovae edx, dword [esp + 0x68]
lea edx, [edx + eax*2]
lea eax, [esp + 0x68]
cmovae eax, dword [esp + 0x68]
cmp eax, edx
je 0x4032f1
cmp word [eax], 0x2f
jne 0x4032ea
mov word [eax], cx
add eax, 2
cmp eax, edx
jne 0x4032e1
mov edx, dword [esp + 0x94]
lea eax, [esp + 0x80]
mov esi, dword [esp + 0x80]
cmp edx, 8
mov edi, dword [esp + 0x90]
cmovae eax, esi
lea ecx, [eax + edi*2]
lea eax, [esp + 0x80]
cmovae eax, esi
cmp eax, ecx
je 0x403355
mov edx, 0x5c
nop dword [eax]
cmp word [eax], 0x2f
jne 0x403339
mov word [eax], dx
add eax, 2
cmp eax, ecx
jne 0x403330
mov edx, dword [esp + 0x94]
mov edi, dword [esp + 0x90]
mov esi, dword [esp + 0x80]
test edi, edi
je 0x40338d
cmp dword [esp + 0x78], 0
jne 0x403375
push 0
push 2
push 0x5fb
push ebx
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x403a03
cmp edx, 8
lea eax, [esp + 0x80]
cmovae eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4033a2
push 0
push 1
push 0x5fb
push ebx
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x403a03
push 0x403b30
push 0x7d0
push 1
push 0
call dword [sym.imp.USER32.dll_SetTimer]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
lea eax, [esp + 0xcc]
push 0
push 0
push 0
push eax
call esi
test eax, eax
je 0x403415
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
nop dword [eax]
cmp dword [esp + 0xd0], 0x113
jne 0x403401
lea eax, [esp + 0xcc]
push eax
call edi
lea eax, [esp + 0xcc]
push eax
call ebx
push 0
push 0
push 0
lea eax, [esp + 0xd8]
push eax
call esi
test eax, eax
jne 0x4033e0
lea edx, [esp + 0x68]
lea ecx, [esp + 0x80]
call fcn.00408cb0
mov byte [esp + 0xf], al
lea ecx, [esp + 0x68]
test al, al
jne 0x403438
call fcn.00407c50
jmp 0x40343d
call fcn.0040aff0
cmp dword [esp + 0x4c], 1
jne 0x4035b2
cmp dword [esp + 0x7c], 8
lea eax, [esp + 0x68]
push dword [esp + 0x78]
cmovae eax, dword [esp + 0x6c]
lea ecx, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 7
call fcn.00404100
push ecx
lea ecx, [esp + 0x18]
call fcn.00404720
push eax
lea ecx, [esp + 0x30]
call fcn.00403ca0
push 0x23
push str._launchtype_:_install_update_
lea ecx, [esp + 0x58]
mov dword [esp + 0x58], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 7
call fcn.00404100
cmp dword [esp + 0x64], 8
lea ecx, [esp + 0x50]
push 5
cmovae ecx, dword [esp + 0x54]
lea eax, [esp + 0x30]
cmp dword [esp + 0x44], 8
push 0
cmovae eax, dword [esp + 0x34]
push ecx
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov edx, dword [esp + 0x64]
cmp edx, 8
jb 0x403523
mov ecx, dword [esp + 0x50]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403519
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403aef
push edx
push ecx
call fcn.0040e74a
add esp, 8
mov edx, dword [esp + 0x40]
cmp edx, 8
jb 0x40355f
mov ecx, dword [esp + 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403555
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403af4
push edx
push ecx
call fcn.0040e74a
add esp, 8
mov edx, dword [esp + 0x28]
xor eax, eax
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 7
mov word [esp + 0x2c], ax
cmp edx, 8
jb 0x4035b2
mov ecx, dword [esp + 0x14]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4035a8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403af4
push edx
push ecx
call fcn.0040e74a
add esp, 8
push 0x1c0
push str.086C85453018C87B00B1A50E9AEE6CA8B10AA592F2B9E0FB662F264C3885243B918192BA92944004BF275E5AADA09DDDE86225C6BBADEFF7BF2FA0A3A7247F83E20BD8F35082CBA4102D01A9CF74ACC116EF0377A5E932DDC65FFA8C0DDC530279A889E8307C329F23BB6BC500BE1B2CFCE491C72D3267E5C8E32097D5FAE6BD5EF26417B4506D2C930BA1ECA8E45ADBE86912FAE076680ADD7F9771FDE0CAFB9B1C6EE735637B994FCF1E6D7AA39CBAB31B2FCAD9EDB4D73C821A60DD5CE1778CADA82FDF75AB180ACAB6DD91B16986C65EABAB172B644CA424377B757075DD
lea ecx, [esp + 0xa4]
mov dword [esp + 0xa4], 0
mov dword [esp + 0xb4], 0
mov dword [esp + 0xb8], 7
call fcn.00404100
cmp dword [esp + 0xb0], 8
lea edi, [esp + 0x9c]
push dword [esp + 0x78]
cmovae edi, dword [esp + 0xa0]
lea eax, [esp + 0x6c]
cmp dword [esp + 0x80], 8
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0
cmovae eax, dword [esp + 0x6c]
push eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 7
call fcn.00404100
call fcn.0040d219
push 0
push 0
push 0x18
mov ebx, eax
mov dword [esp + 0x5c], 0
push str.FlashAssistantRepair.exe
push ebx
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 7
call fcn.0040d236
mov esi, eax
test edx, edx
jne 0x403af9
push edx
push esi
lea ecx, [esp + 0x58]
call fcn.00403bb0
cmp dword [esp + 0x64], 8
lea eax, [esp + 0x50]
push esi
cmovae eax, dword [esp + 0x54]
push eax
push 0x18
push str.FlashAssistantRepair.exe
push ebx
call fcn.0040d236
mov dword [esp + 0x44], eax
test edx, edx
jne 0x403b00
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x18]
call fcn.00401e00
mov edx, dword [esp + 0x64]
mov esi, eax
cmp edx, 8
jb 0x4036f1
mov ecx, dword [esp + 0x50]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4036e7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403b07
push edx
push ecx
call fcn.0040e74a
add esp, 8
xor eax, eax
mov dword [esp + 0x60], 0
push esi
lea ecx, [esp + 0x30]
mov dword [esp + 0x68], 7
mov word [esp + 0x54], ax
call fcn.00403ca0
cmp dword [esp + 0x40], 8
lea eax, [esp + 0x2c]
push 0
cmovae eax, dword [esp + 0x30]
push 0
push edi
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov edx, dword [esp + 0x40]
cmp edx, 8
jb 0x40376f
mov ecx, dword [esp + 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403765
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403b0c
push edx
push ecx
call fcn.0040e74a
add esp, 8
mov edx, dword [esp + 0x28]
xor eax, eax
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 7
mov word [esp + 0x2c], ax
cmp edx, 8
jb 0x4037c2
mov ecx, dword [esp + 0x14]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4037b8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403b0c
push edx
push ecx
call fcn.0040e74a
add esp, 8
cmp dword [esp + 0x94], 8
lea eax, [esp + 0x80]
push dword [esp + 0x90]
cmovae eax, dword [esp + 0x84]
lea ecx, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 7
call fcn.00404100
lea ecx, [esp + 0x14]
call fcn.00402fd0
mov edx, dword [esp + 0x28]
cmp edx, 8
jb 0x403847
mov ecx, dword [esp + 0x14]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40383d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403b11
push edx
push ecx
call fcn.0040e74a
add esp, 8
push 0x208
lea eax, [esp + 0xec]
push 0
push eax
call fcn.0040fea0
add esp, 0xc
mov dword [esp + 0x4c], 0
lea eax, [esp + 0x4c]
push eax
push 0x1c
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x403895
lea eax, [esp + 0xe8]
push eax
push dword [esp + 0x50]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push dword [esp + 0x4c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
lea ecx, [esp + 0xe8]
mov dword [esp + 0x50], 0
mov dword [esp + 0x60], 0
lea edx, [ecx + 2]
mov dword [esp + 0x64], 7
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4038b7
sub ecx, edx
lea eax, [esp + 0xe8]
sar ecx, 1
push ecx
push eax
lea ecx, [esp + 0x58]
call fcn.00404100
mov edx, dword [esp + 0x64]
mov eax, edx
mov ecx, dword [esp + 0x60]
sub eax, ecx
cmp eax, 0x14
jb 0x403917
cmp edx, 8
lea esi, [esp + 0x50]
push 0x28
cmovae esi, dword [esp + 0x54]
lea edi, [ecx + 0x14]
push str._Flash_Update_filebk
mov dword [esp + 0x68], edi
lea eax, [esi + ecx*2]
push eax
call fcn.0040f920
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x403932
push 0x14
push str._Flash_Update_filebk
mov byte [esp + 0x4c], 0
lea ecx, [esp + 0x58]
push dword [esp + 0x4c]
push 0x14
call fcn.00404940
cmp dword [esp + 0x64], 8
lea ecx, [esp + 0x50]
cmovae ecx, dword [esp + 0x50]
call fcn.004078a0
mov edx, dword [esp + 0x64]
cmp edx, 8
jb 0x403981
mov ecx, dword [esp + 0x50]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403977
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403b16
push edx
push ecx
call fcn.0040e74a
add esp, 8
xor ecx, ecx
mov eax, 3
cmp byte [esp + 0xf], cl
push 0
cmovne eax, ecx
push eax
push 0x5fb
push dword [esp + 0x1c]
call dword [sym.imp.USER32.dll_PostMessageW]
mov edx, dword [esp + 0xb0]
cmp edx, 8
jb 0x4039e3
mov ecx, dword [esp + 0x9c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4039d9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403b1b
push edx
push ecx
call fcn.0040e74a
add esp, 8
xor eax, eax
mov dword [esp + 0xac], 0
mov dword [esp + 0xb0], 7
mov word [esp + 0x9c], ax
mov edx, dword [esp + 0xc8]
cmp edx, 8
jb 0x403a45
mov ecx, dword [esp + 0xb4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403a3b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403b1b
push edx
push ecx
call fcn.0040e74a
add esp, 8
mov edx, dword [esp + 0x7c]
cmp edx, 8
jb 0x403a81
mov ecx, dword [esp + 0x68]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403a77
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403b1b
push edx
push ecx
call fcn.0040e74a
add esp, 8
mov edx, dword [esp + 0x94]
xor eax, eax
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 7
mov word [esp + 0x68], ax
cmp edx, 8
jb 0x403ad6
mov ecx, dword [esp + 0x80]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x403acc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403b1b
push edx
push ecx
call fcn.0040e74a
add esp, 8
mov ecx, dword [esp + 0x2f4]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040e3a6
mov esp, ebp
pop ebp
ret 0x10
call fcn.0041260f
call fcn.0041260f
mov ecx, edx
call fcn.00401cb0
mov ecx, edx
call fcn.00401cb0
call fcn.0041260f
call fcn.0041260f
call fcn.0041260f
call fcn.0041260f
call fcn.0041260f
int3