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

Disassembly:
mov eax, 0x1c54
call fcn.004169c0
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x1c4c], eax
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x206
lea eax, [esp + 0x82e]
push ebx
push eax
mov word [esp + 0x834], bx
call fcn.0040ef00
add esp, 0xc
push 0x206
lea ecx, [esp + 0x1256]
push ebx
push ecx
mov word [esp + 0x125c], bx
call fcn.0040ef00
add esp, 0xc
push 0x206
lea edx, [esp + 0x104e]
push ebx
push edx
mov word [esp + 0x1054], bx
call fcn.0040ef00
xor eax, eax
add esp, 0xc
push 0x7e
mov dword [esp + 0x66e], eax
mov dword [esp + 0x672], eax
mov dword [esp + 0x676], eax
mov dword [esp + 0x67a], eax
mov dword [esp + 0x67e], eax
mov dword [esp + 0x682], eax
mov dword [esp + 0x686], eax
mov word [esp + 0x68a], ax
lea eax, [esp + 0x72e]
push ebx
push eax
mov word [esp + 0x674], bx
mov word [esp + 0x734], bx
call fcn.0040ef00
add esp, 0xc
push 0x7e
lea ecx, [esp + 0x6ae]
push ebx
push ecx
mov word [esp + 0x6b4], bx
call fcn.0040ef00
add esp, 0xc
push 0x7e
lea edx, [esp + 0x7ae]
push ebx
push edx
mov dword [esp + 0x20], ebx
mov word [esp + 0x7b4], bx
call fcn.0040ef00
add esp, 0xc
push 0x206
lea eax, [esp + 0xc3e]
push ebx
push eax
mov dword [esp + 0x24], ebx
mov word [esp + 0xc44], bx
call fcn.0040ef00
xor eax, eax
add esp, 0xc
push 0x200
mov word [esp + 0x68c], bx
mov dword [esp + 0x68e], eax
mov dword [esp + 0x692], eax
mov dword [esp + 0x696], eax
mov dword [esp + 0x69a], eax
mov dword [esp + 0x69e], eax
mov dword [esp + 0x6a2], eax
mov dword [esp + 0x6a6], eax
mov word [esp + 0x6aa], ax
xor ebp, ebp
mov dword [esp + 0x28], ebx
push ebx
lea ecx, [esp + 0x38]
push ecx
call fcn.0040ef00
add esp, 0xc
push 1
lea edi, [esp + 0x34]
call fcn.0040a980
add esp, 4
mov esi, eax
push ebx
lea edi, [esp + 0x46c]
mov dword [esp + 0x2c], esi
call fcn.0040a980
add esp, 4
push 0x104
lea edx, [esp + 0x1254]
push edx
push ebx
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x828]
push eax
push 0x104
call edi
push 0x41dc44
lea ecx, [esp + 0x82c]
push 0x104
push ecx
call fcn.0040ab8d
lea eax, [esp + 0x834]
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x4017f3
sub eax, ecx
sar eax, 1
je 0x401825
lea edx, [esp + 0x828]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401825
lea eax, [esp + 0x828]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp esi, ebx
je 0x401b02
lea ecx, [esp + 0x828]
push ecx
push 0x104
call edi
lea edx, [esp + 0x1b8]
push edx
lea eax, [esp + 0x82c]
push 0x104
push eax
call fcn.0040ab8d
add esp, 0xc
push 0x41dc28
lea ecx, [esp + 0x82c]
push 0x104
push ecx
call fcn.0040ab8d
lea eax, [esp + 0x834]
add esp, 0xc
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401880
sub eax, edx
sar eax, 1
je 0x4018f0
lea edx, [esp + 0x828]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4018f0
xor eax, eax
jmp 0x4018b0
movzx ecx, word [esp + eax + 0x1b8]
mov word [esp + eax + 0x230], cx
add eax, 2
cmp cx, bx
jne 0x4018b0
push 0x41dc28
lea eax, [esp + 0x234]
push 0x104
push eax
call fcn.0040ab8d
add esp, 0xc
lea ecx, [esp + 0x828]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea edx, [esp + 0x1d8]
push edx
lea eax, [esp + 0x66c]
push 0x10
push eax
call fcn.0040ac07
add esp, 0xc
lea edi, [esp + 0x828]
lea esi, [esp + 0x1d8]
call fcn.00403990
call fcn.00401450
cmp eax, 1
jne 0x40192e
xor eax, eax
jmp 0x4020bb
push 0x206
lea ecx, [esp + 0xa36]
push ebx
push ecx
mov word [esp + 0xa3c], bx
call fcn.0040ef00
add esp, 0xc
push 0x206
lea edx, [esp + 0xe46]
push ebx
push edx
mov word [esp + 0xe4c], bx
call fcn.0040ef00
add esp, 0xc
xor eax, eax
lea esp, [esp]
movzx ecx, word [esp + eax + 0x1d8]
mov word [esp + eax + 0xa30], cx
add eax, 2
cmp cx, bx
jne 0x401970
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x1d8]
mov word [esp + eax + 0xe40], cx
add eax, 2
cmp cx, bx
jne 0x401990
lea eax, [esp + 0xe40]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x4019b2
mov ecx, dword [0x41dc1c]
mov edx, dword [0x41dc20]
mov edi, dword [sym.imp.KERNEL32.dll_OpenEventW]
mov dword [eax], ecx
mov ecx, dword [0x41dc24]
mov dword [eax + 4], edx
lea edx, [esp + 0xa30]
push edx
push ebx
push 0x20000
mov dword [eax + 8], ecx
call edi
cmp eax, ebx
je 0x401a4c
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call ebp
lea eax, [esp + 0xe40]
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
lea ecx, [esp + 0xa30]
push ecx
push ebx
push 0x20000
xor esi, esi
call edi
cmp eax, ebx
je 0x401a4c
cmp esi, 5
jge 0x401a4c
push eax
call ebp
push 0x1f4
add esi, 1
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0xa30]
push edx
push ebx
push 0x20000
call edi
cmp eax, ebx
jne 0x401a22
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x828]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
jmp 0x401a70
movzx ecx, word [esp + eax + 0xb6]
mov word [esp + eax + 0x728], cx
add eax, 2
cmp cx, bx
jne 0x401a70
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x34]
mov word [esp + eax + 0x6a8], cx
add eax, 2
cmp cx, bx
jne 0x401a90
movzx ecx, word [esp + 0xb4]
mov dword [esp + 0x14], ecx
xor eax, eax
jmp 0x401ac0
movzx ecx, word [esp + eax + 0xd6]
mov word [esp + eax + 0x7a8], cx
add eax, 2
cmp cx, bx
jne 0x401ac0
movzx edx, word [esp + 0x156]
mov ebp, dword [esp + 0x1f8]
lea eax, [esp + 0x1b8]
push eax
push 0x10
lea ecx, [esp + 0x690]
mov dword [esp + 0x20], edx
push ecx
jmp 0x401baf
cmp dword [0x4230c0], 3
jne 0x401bb7
push 0x236
lea edx, [esp + 0x234]
push ebx
push edx
call fcn.0040ef00
add esp, 0xc
lea esi, [esp + 0x230]
call fcn.00404220
cmp eax, ebx
mov dword [esp + 0x24], eax
je 0x401bb7
xor eax, eax
nop
movzx ecx, word [esp + eax + 0x33e]
mov word [esp + eax + 0x728], cx
add eax, 2
cmp cx, bx
jne 0x401b40
mov ecx, dword [esp + 0x336]
lea esi, [esp + 0x6a8]
call fcn.00403600
movzx eax, word [esp + 0x33a]
mov ecx, dword [esp + 0x330]
lea esi, [esp + 0x7a8]
mov dword [esp + 0x14], eax
call fcn.00403600
movzx ecx, word [esp + 0x334]
mov ebp, dword [esp + 0x238]
lea edx, [esp + 0x35e]
push edx
push 0x10
lea eax, [esp + 0x670]
mov dword [esp + 0x20], ecx
push eax
call fcn.0040ac07
add esp, 0xc
mov edi, dword [esp + 0x2c]
cmp edi, ebx
je 0x401ce0
xor eax, eax
jmp 0x401bd0
movzx ecx, word [esp + eax + 0x4ee]
mov word [esp + eax + 0x728], cx
add eax, 2
cmp cx, bx
jne 0x401bd0
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x46c]
mov word [esp + eax + 0x6a8], cx
add eax, 2
cmp cx, bx
jne 0x401bf0
movzx ecx, word [esp + 0x4ec]
mov dword [esp + 0x14], ecx
xor eax, eax
jmp 0x401c20
movzx ecx, word [eax + 0x41dc5c]
mov word [esp + eax + 0x7a8], cx
add eax, 2
cmp cx, bx
jne 0x401c20
cmp dword [0x4230c0], 3
movzx edx, word [esp + 0x58e]
mov dword [esp + 0x18], edx
mov ebp, 5
je 0x401c66
lea eax, [esp + 0xc38]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x401c93
push 0x104
lea ecx, [esp + 0xc3c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x41dc18
lea edx, [esp + 0xc3c]
push 0x104
push edx
call fcn.0040ab8d
add esp, 0xc
xor eax, eax
jmp 0x401ca0
movzx ecx, word [esp + eax + 0xc38]
mov word [esp + eax + 0x1048], cx
add eax, 2
cmp cx, bx
jne 0x401ca0
push 0x41dc78
lea eax, [esp + 0x104c]
push 0x104
push eax
call fcn.0040ab8d
add esp, 0xc
lea ecx, [esp + 0x1048]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x200
lea edx, [esp + 0x34]
push ebx
push edx
call fcn.0040ef00
mov esi, 0x504d534d
add esp, 0xc
mov dword [esp + 0x30], esi
mov word [esp + 0xb4], 0x51
xor eax, eax
jmp 0x401d10
movzx ecx, word [eax + 0x41dc90]
mov word [esp + eax + 0x34], cx
add eax, 2
cmp cx, bx
jne 0x401d10
mov word [esp + 0x156], 0x2b66
xor eax, eax
movzx ecx, word [eax + 0x41dc5c]
mov word [esp + eax + 0xd6], cx
add eax, 2
cmp cx, bx
jne 0x401d30
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + 0x41dcac]
mov word [esp + eax + 0xb6], cx
add eax, 2
cmp cx, bx
jne 0x401d50
cmp dword [esp + 0x28], ebx
mov dword [esp + 0x1f8], 5
jne 0x401d86
cmp dword [esp + 0x24], ebx
jne 0x401d86
cmp edi, ebx
je 0x401e01
lea eax, [esp + 0x728]
push eax
lea ecx, [esp + 0xba]
push 0x10
push ecx
call fcn.0040ac07
add esp, 0xc
lea edx, [esp + 0x6a8]
push edx
lea eax, [esp + 0x38]
push 0x40
push eax
call fcn.0040ac07
movzx ecx, word [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x7a8]
push edx
lea eax, [esp + 0xda]
push 0x40
push eax
mov word [esp + 0xc0], cx
call fcn.0040ac07
movzx ecx, word [esp + 0x24]
add esp, 0xc
cmp ebp, ebx
mov word [esp + 0x156], cx
mov dword [esp + 0x1f8], ebp
jne 0x401e01
mov dword [esp + 0x1f8], 5
cmp word [esp + 0x34], bx
je 0x4020b6
cmp word [esp + 0xb4], bx
jbe 0x4020b6
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x30], esi
call ebp
push eax
call fcn.0040b71a
add esp, 4
push 0x7fe
lea edx, [esp + 0x145e]
push ebx
push edx
mov word [esp + 0x1464], bx
call fcn.0040ef00
add esp, 0xc
cmp word [esp + 0x158], bx
jne 0x401e81
lea eax, [esp + 0x1458]
push eax
call fcn.00402f80
add esp, 4
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x15c]
push 0x10
push edx
call fcn.0040ac07
add esp, 0xc
cmp word [esp + 0x178], bx
jne 0x401eb5
lea eax, [esp + 0x1458]
push eax
call fcn.00402f80
add esp, 4
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x17c]
push 0x10
push edx
call fcn.0040ac07
add esp, 0xc
cmp word [esp + 0x1b8], bx
jne 0x401ee9
lea eax, [esp + 0x1458]
push eax
call fcn.00402f80
add esp, 4
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x1bc]
push 0x10
push edx
call fcn.0040ac07
add esp, 0xc
cmp word [esp + 0x1d8], bx
jne 0x401f52
lea eax, [esp + 0x1458]
push eax
call fcn.00402f80
add esp, 4
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x1dc]
push 0x10
push edx
call fcn.0040ac07
lea eax, [esp + 0x674]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401f27
sub eax, edx
sar eax, 1
je 0x401f52
lea eax, [esp + 0x668]
push eax
lea ecx, [esp + 0x1dc]
push 0x10
push ecx
call fcn.0040ac07
add esp, 0xc
lea eax, [esp + 0x688]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401f60
sub eax, edx
sar eax, 1
je 0x401f8b
lea edx, [esp + 0x688]
push edx
lea eax, [esp + 0x19c]
push 0x10
push eax
call fcn.0040ac07
add esp, 0xc
cmp word [esp + 0x198], bx
jne 0x401fbf
lea ecx, [esp + 0x1458]
push ecx
call fcn.00402f80
add esp, 4
lea edx, [esp + 0x1458]
push edx
lea eax, [esp + 0x19c]
push 0x10
push eax
call fcn.0040ac07
add esp, 0xc
cmp dword [esp + 0x1f8], ebx
mov dword [esp + 0x1fc], 0x100020f
jne 0x401fde
mov dword [esp + 0x1f8], 5
lea ecx, [esp + 0x30]
push ecx
call fcn.0040aa40
add esp, 4
test eax, eax
je 0x4020b6
lea edi, [esp + 0x828]
lea esi, [esp + 0x1d8]
call fcn.00403990
call ebp
push eax
call fcn.0040b71a
add esp, 4
push 0x32
mov eax, 0x64
call fcn.00402f40
add esp, 4
push eax
mov edx, edi
push edx
lea eax, [esp + 0x1258]
call fcn.00401520
add esp, 8
lea eax, [esp + 0x1c]
push eax
push 3
push ebx
push 0x41dcb8
push closesocket
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40209e
mov eax, edi
lea edx, [eax + 2]
jmp 0x402060
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x402060
sub eax, edx
sar eax, 1
lea ecx, [eax + eax + 2]
mov eax, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x82c]
push edx
push 1
push ebx
push 0x41dd24
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x40209e
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 1
push ebx
push 0x41dd90
lea edx, [esp + 0x834]
push edx
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov eax, 1
mov ecx, dword [esp + 0x1c5c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040ab4e
add esp, 0x1c54
ret