Function at 0x40f504
Capabilities:
Accept command line arguments
Check if file exists
Check mutex on windows
Create process on windows
Get file attributes
Get file version info
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xd8c
mov eax, dword [0x4434f4]
xor eax, esp
mov dword [esp + 0xd88], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x14]
push edi
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, eax
xor ebx, ebx
push ebx
mov dword [esp + 0x28], edi
call dword [sym.imp.ole32.dll_CoInitialize]
push ebx
mov esi, eax
call dword [sym.imp.ole32.dll_CoInitialize]
push ebx
xor eax, eax
push ebx
inc eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_HeapSetInformation]
mov dword [esp + 0x28], 8
mov dword [esp + 0x2c], 0x20ff
call fcn.0040c272
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push edi
push 0x40223c
push 4
call fcn.0041ea5f
add esp, 0xc
test esi, esi
jns 0x40f597
mov ebx, esi
jmp 0x40f6d7
push 0x100
lea eax, [esp + 0x984]
push eax
push 0x64
push dword [esp + 0x28]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x40f6d7
push 0x402260
call dword [sym.imp.SHELL32.dll_SetCurrentProcessExplicitAppUserModelID]
push 0x4022a0
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esp + 0x18], eax
test eax, eax
je 0x40f5ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40f6fa
test edi, edi
je 0x40f654
push 0x4022c0
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x40f6fa
push 0x4022d4
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x40f6fa
push 0x401cd4
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x40f6c1
push 0x4022e8
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x40f6c1
push 0x401be0
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x40f6c1
mov edi, 0x100
lea eax, [esp + 0x580]
push edi
push eax
push 0xac
push dword [0x443af0]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x40f6c1
push edi
lea eax, [esp + 0x784]
push eax
push 0xad
push dword [0x443af0]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x40f6c1
xor eax, eax
cmp byte [0x444fde], al
sete al
dec eax
and eax, 0x180000
add eax, 0x10
push eax
lea eax, [esp + 0x784]
push eax
lea eax, [esp + 0x588]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40f6d7
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
js 0x40f6e1
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [esp + 0xd94]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00441b90
mov esp, ebp
pop ebp
ret 0x10
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_RegisterApplicationRestart]
test eax, eax
jns 0x40f725
cmp dword [0x443534], 0xffffffff
jne 0x40f718
push ecx
push 2
pop edx
call fcn.0041e530
push 2
mov edx, 0x402308
pop ecx
call fcn.0041e988
mov eax, dword [esp + 0x1c]
mov dword [0x443af0], eax
test edi, edi
je 0x40f767
push 0x40216c
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x40f74d
call fcn.0040f344
mov ebx, eax
jmp 0x40f6d7
push 0x40234c
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
neg eax
pop ecx
sbb eax, eax
not eax
and dword [0x443518], eax
pop ecx
call fcn.0040ea5f
xor ecx, ecx
mov dword [0x443514], 1
call fcn.0040e2b6
test edi, edi
je 0x40fb6f
push 0x401be0
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
neg eax
push 0x402368
sbb eax, eax
neg eax
push edi
mov dword [0x443a4c], eax
call dword [sym.imp.msvcrt.dll_wcsstr]
add esp, 0x10
test eax, eax
je 0x40f7bb
mov dword [0x443ab0], 1
jmp 0x40f7c0
call fcn.0040eb5e
push 0x105
lea eax, [esp + 0xb84]
push eax
push 0xdb
push dword [0x443af0]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x40f851
lea eax, [esp + 0xb80]
mov dword [esp + 0x10], 1
push 0x40237c
push eax
mov dword [esp + 0x1c], ebx
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
neg eax
push ebx
sbb eax, eax
and dword [esp + 0x14], eax
lea eax, [esp + 0x18]
push eax
push ebx
push 0x20006
push ebx
push ebx
push ebx
push 0x4021d0
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40f851
push 4
lea eax, [esp + 0x14]
push eax
push 4
push ebx
push 0x402380
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x4021ac
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x40f86a
mov ecx, edi
call fcn.0040f45d
push 0x401cd4
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x40f8f0
push 0x402398
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x40f8f0
lea ecx, [esp + 0x60]
call fcn.0042eb32
mov dword [esp + 0x98], ebx
call fcn.00432528
push ebx
lea ecx, [esp + 0x64]
call fcn.00430f1a
test eax, eax
je 0x40f8ba
lea ecx, [esp + 0x60]
call fcn.00432e9a
lea ecx, [esp + 0x60]
call fcn.0042eb6c
call fcn.0040eade
test eax, eax
je 0x40f8f0
cmp dword [0x443534], 0xffffffff
jne 0x40f8de
push ecx
push 2
pop edx
call fcn.0041e530
mov edx, 0x4023bc
push 2
pop ecx
call fcn.0041e988
jmp 0x40f6d7
push 0x4023e4
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
neg eax
push 0x401cd4
sbb eax, eax
neg eax
push edi
mov dword [0x443a1c], eax
call dword [sym.imp.msvcrt.dll_wcsstr]
add esp, 0x10
test eax, eax
je 0x40fb4b
mov dword [0x443a4c], ebx
call fcn.00419fae
call fcn.004196ea
mov edx, 0x105
lea ecx, [esp + 0x370]
call fcn.00420056
test eax, eax
je 0x40fb47
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ebx
push eax
lea eax, [esp + 0x374]
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x40fb05
lea ecx, [esp + 0x370]
call fcn.0041f47f
test eax, eax
je 0x40fb47
push ebx
push 0x80
push 3
push ebx
push 1
push ebx
lea eax, [esp + 0x388]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40fb47
lea eax, [esp + 0x3c]
push eax
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x40fafc
lea eax, [esp + 0xa8]
push eax
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
test eax, eax
je 0x40fafc
push 0xac
lea eax, [esp + 0xbc]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0xb8]
push eax
call dword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
cmp eax, 0xffffffff
je 0x40fafc
mov ecx, dword [esp + 0xb8]
test ecx, ecx
jle 0x40fa11
movzx eax, cx
jmp 0x40fa18
mov eax, ecx
neg eax
movzx eax, ax
xor edx, edx
movzx eax, ax
mov dword [esp + 0x10], 0x3c
div dword [esp + 0x10]
cmp ecx, 1
mov cx, word [esp + 0xae]
movzx edx, ax
mov ax, word [esp + 0xb0]
jge 0x40fa46
add ax, dx
jmp 0x40fa67
cmp ax, dx
jae 0x40fa64
mov dword [esp + 0x10], 0xffff
add cx, word [esp + 0x10]
add ax, 0x18
mov word [esp + 0xae], cx
sub ax, dx
mov word [esp + 0xb0], ax
cmp ax, 0x17
jbe 0x40fac8
mov edx, 0xffe8
add ax, dx
inc cx
mov word [esp + 0xb0], ax
mov word [esp + 0xae], cx
cmp cx, 0x20
jne 0x40fac8
mov ax, word [esp + 0xaa]
xor ecx, ecx
inc ecx
inc ax
mov word [esp + 0xae], cx
mov word [esp + 0xaa], ax
cmp ax, 0xd
jne 0x40fac8
inc word [esp + 0xa8]
mov word [esp + 0xaa], cx
fldz
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0xac]
push eax
fstp qword [esp + 0x38]
call dword [sym.imp.OLEAUT32.dll_VariantTimeToSystemTime]
test eax, eax
je 0x40fafc
fld qword [esp + 0x30]
lea eax, [esp + 0xa8]
push eax
push ecx
push ecx
fstp qword [esp]
call dword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40fb47
push eax
call fcn.0044183a
mov edi, eax
pop ecx
test edi, edi
je 0x40fb47
push edi
push dword [esp + 0x14]
lea eax, [esp + 0x378]
push ebx
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x40fb40
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x3c]
push eax
push 0x4043e0
push edi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
push edi
call fcn.00441807
pop ecx
push 3
jmp 0x40fb5f
push 0x4023f0
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x40fbc7
push 4
pop ecx
call fcn.0040e2b6
mov dword [0x443514], 5
mov edi, dword [0x443a4c]
neg edi
push ecx
sbb edi, edi
not edi
and edi, dword [esp + 0x24]
push ecx
call fcn.0040c4bf
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x980]
push eax
mov edx, edi
call fcn.0040fed6
mov edi, eax
mov dword [esp + 0x20], edi
test edi, edi
jne 0x40fcc3
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40fbbd
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0040c4ea
jmp 0x40f6d7
push 0x4022c0
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x40fc57
cmp dword [0x443a4c], ebx
jne 0x40f6c1
mov edi, 0x100
lea eax, [esp + 0x780]
push edi
push eax
push 0xba
push dword [0x443af0]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x40f6c1
push edi
lea eax, [esp + 0x584]
push eax
push 0xad
push dword [0x443af0]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
je 0x40f6c1
xor eax, eax
cmp byte [0x444fde], al
sete al
dec eax
and eax, 0x180000
add eax, 0x10
push eax
lea eax, [esp + 0x584]
push eax
lea eax, [esp + 0x788]
jmp 0x40f6b9
push 0x402414
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x40fc7f
push 0x40242c
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x40fb6f
cmp dword [0x443534], 0xffffffff
jne 0x40fc91
push ecx
push 4
pop edx
call fcn.0041e530
mov edx, 0x402448
push 4
jmp 0x40f8e5
lea eax, [esp + 0x44]
push eax
push edi
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x40fcc3
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push ebx
push ebx
push ebx
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x40fc9d
cmp dword [0x443a5c], ebx
je 0x40fceb
push 2
mov dword [0x443a5c], ebx
call dword [sym.imp.USER32.dll_LockSetForegroundWindow]
mov edi, dword [esp + 0x24]
test edi, edi
je 0x40fd25
push 0x401cd4
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x40fd0e
xor ecx, ecx
call fcn.0041a4bf
jmp 0x40fd25
push 0x402468
push edi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x40fd25
call fcn.0040ebd6
call fcn.0040c4ea
mov edi, dword [0x444f3c]
test edi, edi
je 0x40fd48
mov ecx, edi
call fcn.0041c8c2
push edi
call fcn.00441835
pop ecx
mov dword [0x444f3c], ebx
mov ecx, dword [0x443abc]
test ecx, ecx
je 0x40fd5e
push ecx
call fcn.0041fb3c
mov dword [0x443abc], ebx
mov ecx, dword [0x444f34]
test ecx, ecx
je 0x40fd74
push ecx
call fcn.0040fe6e
mov dword [0x444f34], ebx
mov ecx, dword [0x443acc]
test ecx, ecx
je 0x40fd8a
push ecx
call fcn.0041fb3c
mov dword [0x443acc], ebx
push dword [esp + 0x20]
call dword [sym.imp.USER32.dll_DestroyWindow]
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40fdaa
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x443a84], ebx
je 0x40fe58
cmp dword [0x443518], ebx
je 0x40fe58
cmp dword [0x4439fc], ebx
jne 0x40fe58
xor edx, edx
lea ecx, [esp + 0x168]
call fcn.0041fda0
test eax, eax
je 0x40fe58
lea eax, [esp + 0x168]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push ecx
lea eax, [esp + 0x28]
mov edi, 0x104
push eax
mov edx, edi
lea ecx, [esp + 0x170]
call fcn.0040c131
test eax, eax
js 0x40fe58
mov eax, dword [esp + 0x24]
sub edi, eax
push ecx
push 0x402478
push ecx
lea ecx, [esp + 0x174]
mov edx, edi
lea ecx, [ecx + eax*2]
call fcn.0040c197
test eax, eax
js 0x40fe58
lea eax, [esp + 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40fe58
test al, 0x10
jne 0x40fe58
push 0xa
push ebx
push ebx
lea eax, [esp + 0x174]
push eax
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
call fcn.0041eb38
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ebx, dword [0x443ae8]
jmp 0x40f6d7