Function at 0x4016c8
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, 0x40dc21
call fcn.0040dbac
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 0x401c8f
cmp dword [ebp - 0x1c], 6
jb 0x401c76
xor eax, eax
mov word [0x414210], ax
push dword [esi + 0x18]
push 0x414210
call fcn.00404471
pop ecx
pop ecx
mov dword [ebp - 0x14], edi
mov ecx, dword [ebp - 0x14]
push 0x36
pop eax
cmp ecx, eax
jge 0x401760
mov ebx, dword [ecx*4 + 0x413458]
push ebx
call fcn.00404161
pop ecx
mov dword [ebp - 0x20], eax
xor ecx, ecx
cmp ecx, dword [ebp - 0x20]
jge 0x40175b
mov eax, 0x17e5
xor word [ebx + ecx*2], ax
inc ecx
jmp 0x40174a
inc dword [ebp - 0x14]
jmp 0x40172d
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 0x401528
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.004043e6
pop ecx
pop ecx
test eax, eax
jne 0x4017b5
mov dword [ebp - 0x2c], edi
jmp 0x4017d1
push 0x412fe0
push ebx
call fcn.004043e6
pop ecx
pop ecx
test eax, eax
jne 0x401c69
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.00402341
add esp, 0xc
test eax, eax
je 0x401c69
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.00402547
add esp, 0xc
test eax, eax
je 0x401c69
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.004015b1
add esp, 0x3c
test eax, eax
je 0x401c69
call fcn.004029ab
xor ebx, ebx
cmp eax, ebx
je 0x401945
push dword [ebp - 0x38]
call fcn.00404161
xor ecx, ecx
push 2
add eax, 3
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00402b25
pop ecx
mov edi, eax
mov eax, dword [ebp - 0x28]
pop ecx
push dword [eax]
call fcn.00404161
lea esi, [eax + eax - 8]
mov eax, dword [ebp - 0x38]
cmp word [eax], 0x22
pop ecx
jne 0x40188d
add esi, 2
push esi
push eax
push edi
mov dword [ebp - 0x20], esi
call fcn.004044d0
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.00404471
push 0x44
pop esi
push esi
lea eax, [ebp - 0xec]
push ebx
push eax
call fcn.00404840
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.00404840
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.00402acb
pop ecx
cmp esi, ebx
je 0x401945
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40193d
cmp dword [ebp - 0x14], 0x103
jne 0x40193d
push 2
call dword [sym.imp.KERNEL32.dll_Sleep]
add ebx, 2
jmp 0x401916
mov eax, dword [ebp - 0x14]
jmp 0x401c92
cmp dword [ebp - 0x2c], ebx
jne 0x40195d
push ebx
push dword [ebp - 0x30]
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
js 0x401c69
push dword [ebp - 0x18]
call fcn.00404161
push dword [ebp - 0x30]
mov esi, eax
call fcn.00404161
add esi, eax
lea eax, [esi + esi + 0x20]
push eax
call fcn.0040417c
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 0x401ab3
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 0x401a2b
cmp dword [ebp - 0x40], 3
jne 0x401a2b
cmp dword [ebp - 0x38], 2
jb 0x401a2b
test byte [ebp - 0x38], 1
jne 0x401a2b
push dword [ebp - 0x38]
call fcn.0040417c
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 0x401a25
push edi
call fcn.004040f9
pop ecx
xor edi, edi
jmp 0x401a2b
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 0x401ab3
cmp dword [ebp - 0x18], ebx
je 0x401ab3
push 0x20
push 0x4103f4
push dword [ebp - 0x18]
push edi
call fcn.00402983
add esp, 0x10
xor eax, eax
cmp eax, dword [ebp - 0x18]
jge 0x401ab3
cmp dword [ebp - 0x30], ebx
jne 0x401ab3
mov esi, dword [edi]
and esi, 0xff
add eax, 4
mov dword [ebp - 0x20], eax
cmp esi, 0x10
jl 0x401aac
push 0x10
lea ecx, [ebp - 0x90]
add eax, edi
push ecx
push eax
call fcn.00402ba5
add esp, 0xc
test eax, eax
jne 0x401aac
push 0x10
lea eax, [ebp - 0x80]
push eax
mov eax, dword [ebp - 0x20]
add eax, edi
add eax, 0x10
push eax
call fcn.00402ba5
add esp, 0xc
test eax, eax
jne 0x401aac
mov dword [ebp - 0x30], 0x43001f
mov eax, dword [ebp - 0x20]
add eax, esi
jmp 0x401a55
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401ac8
or dword [ebp - 0x30], 0x9400
cmp dword [ebp - 0x2c], 1
jne 0x401b9d
cmp byte [ebp - 0x30], 0x1f
je 0x401b9d
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 0x401b17
push edi
call fcn.004040f9
lea eax, [ebp - 0x1c]
push eax
lea esi, [ebp - 0x28]
call fcn.004020b9
pop ecx
jmp 0x401c75
push 0x24
pop esi
add dword [ebp - 0x18], esi
push dword [ebp - 0x18]
push edi
call fcn.004048ba
pop ecx
mov ebx, eax
mov eax, dword [ebp - 0x18]
pop ecx
dec eax
cmp eax, esi
jl 0x401b3e
mov ecx, eax
sub ecx, esi
mov cl, byte [ecx + ebx]
mov byte [eax + ebx], cl
jmp 0x401b2d
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.00402983
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.004040f9
pop ecx
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - 0x24], 0
jmp 0x401c50
cmp dword [ebp - 0x30], ebx
jne 0x401c50
cmp dword [ebp - 0x2c], ebx
jne 0x401c50
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x20], ebx
call fcn.004020d6
pop ecx
pop ecx
cmp dword [ebp - 0x2c], ebx
je 0x401c69
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 0x401c02
push 0x10
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.004044d0
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.00401ca3
add esp, 0x20
lea eax, [ebp - 0x1c]
push eax
lea esi, [ebp - 0x28]
call fcn.004020b9
pop ecx
xor eax, eax
jmp 0x401c92
lea eax, [ebp - 0x1c]
push eax
lea esi, [ebp - 0x28]
call fcn.004020b9
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