Function at 0x401721
Capabilities:
Accept command line arguments
Check if file exists
Create directory
Create process on windows
Create thread
Get file attributes
Query or enumerate registry value
Set registry value

Disassembly:
mov eax, 0x40dc71
call fcn.0040dbfc
sub esp, 0xe0
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [ebp - 0x1c]
push ecx
push eax
mov dword [ebp - 0x38], eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp dword [ebp - 0x1c], 1
mov esi, eax
mov dword [ebp - 0x28], esi
je 0x401ce8
cmp dword [ebp - 0x1c], 6
jb 0x401ccf
xor eax, eax
mov word [0x414210], ax
push dword [esi + 0x18]
push 0x414210
call fcn.004044ca
pop ecx
pop ecx
mov dword [ebp - 0x14], edi
mov ecx, dword [ebp - 0x14]
push 0x36
pop eax
cmp ecx, eax
jge 0x4017b9
mov ebx, dword [ecx*4 + 0x413458]
push ebx
call fcn.004041ba
pop ecx
mov dword [ebp - 0x20], eax
xor ecx, ecx
cmp ecx, dword [ebp - 0x20]
jge 0x4017b4
mov eax, 0x17e5
xor word [ebx + ecx*2], ax
inc ecx
jmp 0x4017a3
inc dword [ebp - 0x14]
jmp 0x401786
mov eax, dword [esi + 0x10]
push 0xffffffffffffffff
mov dword [0x413538], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
lea eax, [ebp - 0x50]
push eax
push edi
push edi
push 0x401581
push edi
push edi
mov dword [ebp - 0x50], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xf
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [esi + 4]
push 0x412fd8
push ebx
call fcn.0040443f
pop ecx
pop ecx
test eax, eax
jne 0x40180e
mov dword [ebp - 0x2c], edi
jmp 0x40182a
push 0x412fe0
push ebx
call fcn.0040443f
pop ecx
pop ecx
test eax, eax
jne 0x401cc2
mov dword [ebp - 0x2c], 1
mov eax, dword [esi + 0x14]
push eax
push dword [esi + 0x10]
mov dword [ebp - 0x20], eax
push dword [esi + 0xc]
mov eax, dword [esi + 8]
lea ebx, [ebp - 0xa8]
call fcn.0040239a
add esp, 0xc
test eax, eax
je 0x401cc2
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x30]
push eax
mov eax, ebx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
call fcn.004025a0
add esp, 0xc
test eax, eax
je 0x401cc2
push dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
sub esp, 0x38
push 0xe
pop ecx
mov esi, ebx
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.0040160a
add esp, 0x3c
test eax, eax
je 0x401cc2
call fcn.00402a04
xor ebx, ebx
cmp eax, ebx
je 0x40199e
push dword [ebp - 0x38]
call fcn.004041ba
xor ecx, ecx
push 2
add eax, 3
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00402b7e
pop ecx
mov edi, eax
mov eax, dword [ebp - 0x28]
pop ecx
push dword [eax]
call fcn.004041ba
lea esi, [eax + eax - 8]
mov eax, dword [ebp - 0x38]
cmp word [eax], 0x22
pop ecx
jne 0x4018e6
add esi, 2
push esi
push eax
push edi
mov dword [ebp - 0x20], esi
call fcn.00404520
push 0x36
pop eax
mov word [esi + edi], ax
push 0x34
pop eax
mov word [esi + edi + 2], ax
xor eax, eax
mov word [esi + edi + 4], ax
mov eax, esi
add eax, dword [ebp - 0x38]
push eax
push edi
call fcn.004044ca
push 0x44
pop esi
push esi
lea eax, [ebp - 0xec]
push ebx
push eax
call fcn.00404890
add esp, 0x20
lea eax, [ebp - 0xec]
push eax
mov dword [ebp - 0xec], esi
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
push 0x10
lea eax, [ebp - 0x4c]
push ebx
push eax
call fcn.00404890
add esp, 0xc
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0xec]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push edi
mov esi, eax
call fcn.00402b24
pop ecx
cmp esi, ebx
je 0x40199e
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x401996
cmp dword [ebp - 0x14], 0x103
jne 0x401996
push 2
call dword [sym.imp.KERNEL32.dll_Sleep]
add ebx, 2
jmp 0x40196f
mov eax, dword [ebp - 0x14]
jmp 0x401ceb
cmp dword [ebp - 0x2c], ebx
jne 0x4019b6
push ebx
push dword [ebp - 0x30]
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
js 0x401cc2
push dword [ebp - 0x18]
call fcn.004041ba
push dword [ebp - 0x30]
mov esi, eax
call fcn.004041ba
add esi, eax
lea eax, [esi + esi + 0x20]
push eax
call fcn.004041d5
add esp, 0xc
push dword [ebp - 0x30]
mov dword [ebp - 0x14], eax
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea ecx, [ebp - 0x24]
push ecx
push 0x20019
push ebx
mov eax, reloc.OLEAUT32.dll_SysReAllocString
push 0x413028
push eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], ebx
xor edi, edi
mov dword [ebp - 0x18], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401b0c
lea eax, [ebp - 0x38]
push eax
push ebx
lea eax, [ebp - 0x40]
push eax
push ebx
mov esi, 0x412ff0
push esi
push dword [ebp - 0x24]
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x40], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401a84
cmp dword [ebp - 0x40], 3
jne 0x401a84
cmp dword [ebp - 0x38], 2
jb 0x401a84
test byte [ebp - 0x38], 1
jne 0x401a84
push dword [ebp - 0x38]
call fcn.004041d5
pop ecx
mov edi, eax
lea eax, [ebp - 0x38]
push eax
push edi
push ebx
push ebx
push esi
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x401a7e
push edi
call fcn.00404152
pop ecx
xor edi, edi
jmp 0x401a84
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x18], eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x24], ebx
cmp edi, ebx
je 0x401b0c
cmp dword [ebp - 0x18], ebx
je 0x401b0c
push 0x20
push 0x4103f4
push dword [ebp - 0x18]
push edi
call fcn.004029dc
add esp, 0x10
xor eax, eax
cmp eax, dword [ebp - 0x18]
jge 0x401b0c
cmp dword [ebp - 0x30], ebx
jne 0x401b0c
mov esi, dword [edi]
and esi, 0xff
add eax, 4
mov dword [ebp - 0x20], eax
cmp esi, 0x10
jl 0x401b05
push 0x10
lea ecx, [ebp - 0x90]
add eax, edi
push ecx
push eax
call fcn.00402bfe
add esp, 0xc
test eax, eax
jne 0x401b05
push 0x10
lea eax, [ebp - 0x80]
push eax
mov eax, dword [ebp - 0x20]
add eax, edi
add eax, 0x10
push eax
call fcn.00402bfe
add esp, 0xc
test eax, eax
jne 0x401b05
mov dword [ebp - 0x30], 0x43001f
mov eax, dword [ebp - 0x20]
add eax, esi
jmp 0x401aae
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401b21
or dword [ebp - 0x30], 0x9400
cmp dword [ebp - 0x2c], 1
jne 0x401bf6
cmp byte [ebp - 0x30], 0x1f
je 0x401bf6
push ebx
lea eax, [ebp - 0x24]
push eax
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push 0x413028
mov eax, reloc.OLEAUT32.dll_SysReAllocString
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x401b70
push edi
call fcn.00404152
lea eax, [ebp - 0x1c]
push eax
lea esi, [ebp - 0x28]
call fcn.00402112
pop ecx
jmp 0x401cce
push 0x24
pop esi
add dword [ebp - 0x18], esi
push dword [ebp - 0x18]
push edi
call fcn.0040490a
pop ecx
mov ebx, eax
mov eax, dword [ebp - 0x18]
pop ecx
dec eax
cmp eax, esi
jl 0x401b97
mov ecx, eax
sub ecx, esi
mov cl, byte [ecx + ebx]
mov byte [eax + ebx], cl
jmp 0x401b86
mov dword [ebx], 0x20
lea edi, [ebx + 4]
lea esi, [ebp - 0x90]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea edi, [ebx + 0x14]
lea esi, [ebp - 0x80]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0x20
push 0x4103f4
push dword [ebp - 0x18]
movsd dword es:[edi], dword [esi]
push ebx
movsd dword es:[edi], dword [esi]
call fcn.004029dc
add esp, 0x10
push dword [ebp - 0x18]
push ebx
push 3
push 0
push 0x412ff0
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push ebx
call fcn.00404152
pop ecx
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - 0x24], 0
jmp 0x401ca9
cmp dword [ebp - 0x30], ebx
jne 0x401ca9
cmp dword [ebp - 0x2c], ebx
jne 0x401ca9
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x20], ebx
call fcn.0040212f
pop ecx
pop ecx
cmp dword [ebp - 0x2c], ebx
je 0x401cc2
lea eax, [ebp - 0x70]
push eax
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x70]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
test eax, eax
jne 0x401c5b
push 0x10
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.00404520
add esp, 0xc
lea eax, [ebp - 0x44]
push eax
lea esi, [ebp - 0x60]
call fcn.00401000
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x44]
push dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x34], eax
add eax, dword [0x413530]
mov dword [ebp - 0x30], ecx
adc ecx, dword [0x413534]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0xa8]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x14]
mov dword [ebp - 0x38], ecx
call fcn.00401cfc
add esp, 0x20
lea eax, [ebp - 0x1c]
push eax
lea esi, [ebp - 0x28]
call fcn.00402112
pop ecx
xor eax, eax
jmp 0x401ceb
lea eax, [ebp - 0x1c]
push eax
lea esi, [ebp - 0x28]
call fcn.00402112
pop ecx
push 0x10
push str.Critical_error
push str.An_error_occured_while_installing_main_application_assembly.
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x10