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

Disassembly:
mov eax, 0x1c4c
call fcn.00415980
mov eax, dword [0x422044]
xor eax, esp
mov dword [esp + 0x1c44], eax
push ebx
push ebp
push esi
push edi
push 0x206
xor ebx, ebx
lea ecx, [esp + 0x826]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x82c], ax
call fcn.0040f8c0
add esp, 0xc
push 0x206
lea eax, [esp + 0x124e]
xor edx, edx
push ebx
push eax
mov word [esp + 0x1254], dx
call fcn.0040f8c0
add esp, 0xc
push 0x206
lea edx, [esp + 0x1046]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x104c], cx
call fcn.0040f8c0
xor eax, eax
add esp, 0xc
push 0x7e
lea edx, [esp + 0x7a6]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x66c], ax
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
mov word [esp + 0x7ac], cx
call fcn.0040f8c0
add esp, 0xc
push 0x7e
lea ecx, [esp + 0x726]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x72c], ax
call fcn.0040f8c0
add esp, 0xc
push 0x7e
lea eax, [esp + 0x6a6]
xor edx, edx
push ebx
push eax
mov dword [esp + 0x20], ebx
mov word [esp + 0x6ac], dx
call fcn.0040f8c0
add esp, 0xc
push 0x206
lea edx, [esp + 0xc36]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0xc3c], cx
call fcn.0040f8c0
add esp, 0xc
xor eax, eax
mov word [esp + 0x680], ax
mov dword [esp + 0x682], eax
mov dword [esp + 0x686], eax
mov dword [esp + 0x68a], eax
mov dword [esp + 0x68e], eax
mov dword [esp + 0x692], eax
mov dword [esp + 0x696], eax
mov dword [esp + 0x69a], eax
push 0x200
lea ecx, [esp + 0x2c]
push ebx
push ecx
mov word [esp + 0x6aa], ax
xor ebp, ebp
mov dword [esp + 0x2c], ebx
call fcn.0040f8c0
add esp, 0xc
push 1
lea edi, [esp + 0x2c]
call fcn.0040a7d0
add esp, 4
mov esi, eax
push ebx
lea edi, [esp + 0x464]
mov dword [esp + 0x1c], esi
call fcn.0040a7d0
add esp, 4
push 0x104
lea edx, [esp + 0x124c]
push edx
push ebx
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp esi, ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
je 0x40219e
lea eax, [esp + 0x820]
push eax
push 0x104
call esi
lea ecx, [esp + 0x1b0]
push ecx
lea edx, [esp + 0x824]
push 0x104
push edx
call fcn.0040a9bd
add esp, 0xc
push 0x41dd08
lea eax, [esp + 0x824]
push 0x104
push eax
call fcn.0040a9bd
lea eax, [esp + 0x82c]
add esp, 0xc
lea edx, [eax + 2]
jmp 0x401eb0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401eb0
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub eax, edx
sar eax, 1
je 0x401f1c
lea ecx, [esp + 0x820]
push ecx
call ebp
cmp eax, 0xffffffff
je 0x401f1c
xor eax, eax
jmp 0x401ee0
movzx ecx, word [esp + eax + 0x1b0]
mov word [esp + eax + 0x228], cx
add eax, 2
cmp cx, bx
jne 0x401ee0
push 0x41dd08
lea edx, [esp + 0x22c]
push 0x104
push edx
call fcn.0040a9bd
add esp, 0xc
lea eax, [esp + 0x820]
push eax
call edi
lea ecx, [esp + 0x820]
push ecx
push 0x104
call esi
push 0x41dd24
lea edx, [esp + 0x824]
push 0x104
push edx
call fcn.0040a9bd
lea eax, [esp + 0x82c]
add esp, 0xc
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401f50
sub eax, edx
sar eax, 1
je 0x401f7a
lea eax, [esp + 0x820]
push eax
call ebp
cmp eax, 0xffffffff
je 0x401f7a
lea ecx, [esp + 0x820]
push ecx
call edi
lea esi, [esp + 0x1d0]
call fcn.00401ad0
cmp eax, 1
jne 0x401f92
xor eax, eax
jmp 0x4027a4
lea edx, [esp + 0x1d0]
push edx
lea eax, [esp + 0x664]
push 0x10
push eax
call fcn.0040aa6e
add esp, 0xc
lea edi, [esp + 0x820]
lea esi, [esp + 0x1d0]
call fcn.00403ac0
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0xa32]
push edx
mov word [esp + 0xa34], cx
call fcn.0040f8c0
add esp, 0xc
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0xe42]
push ecx
mov word [esp + 0xe44], ax
call fcn.0040f8c0
add esp, 0xc
xor eax, eax
jmp 0x402010
movzx ecx, word [esp + eax + 0x1d0]
mov word [esp + eax + 0xa28], cx
add eax, 2
test cx, cx
jne 0x402010
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x1d0]
mov word [esp + eax + 0xe38], cx
add eax, 2
test cx, cx
jne 0x402030
lea eax, [esp + 0xe38]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x402052
mov edx, dword [0x41dc9c]
mov ecx, dword [0x41dca0]
mov edi, dword [sym.imp.KERNEL32.dll_OpenEventW]
mov dword [eax], edx
mov edx, dword [0x41dca4]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
lea eax, [esp + 0xa28]
push eax
push 0
push 0x20000
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
test eax, eax
je 0x4020f5
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call ebx
lea ecx, [esp + 0xe38]
push ecx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
lea edx, [esp + 0xa28]
push edx
xor esi, esi
push esi
push 0x20000
call edi
test eax, eax
je 0x4020f5
lea esp, [esp]
cmp esi, 5
jge 0x4020f5
push eax
call ebx
push 0xc8
inc esi
call ebp
lea eax, [esp + 0xa28]
push eax
push 0
push 0x20000
call edi
test eax, eax
jne 0x4020d0
push 0x5dc
call ebp
lea ecx, [esp + 0x820]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
lea esp, [esp]
movzx ecx, word [esp + eax + 0xae]
mov word [esp + eax + 0x7a0], cx
add eax, 2
test cx, cx
jne 0x402110
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x2c]
mov word [esp + eax + 0x720], cx
add eax, 2
test cx, cx
jne 0x402130
movzx edx, word [esp + 0xac]
mov dword [esp + 0x14], edx
xor eax, eax
jmp 0x402160
movzx ecx, word [esp + eax + 0xce]
mov word [esp + eax + 0x6a0], cx
add eax, 2
test cx, cx
jne 0x402160
movzx ebx, word [esp + 0x14e]
mov ebp, dword [esp + 0x1f0]
lea eax, [esp + 0x1b0]
push eax
push 0x10
lea ecx, [esp + 0x688]
push ecx
jmp 0x40224b
cmp dword [0x423070], 3
jne 0x402253
push 0x236
lea edx, [esp + 0x22c]
push 0
push edx
call fcn.0040f8c0
add esp, 0xc
lea esi, [esp + 0x228]
call fcn.004041f0
mov dword [esp + 0x20], eax
test eax, eax
je 0x402253
xor eax, eax
jmp 0x4021e0
movzx ecx, word [esp + eax + 0x336]
mov word [esp + eax + 0x7a0], cx
add eax, 2
test cx, cx
jne 0x4021e0
mov ecx, dword [esp + 0x32e]
lea esi, [esp + 0x720]
call fcn.00403730
movzx eax, word [esp + 0x332]
mov ecx, dword [esp + 0x328]
lea esi, [esp + 0x6a0]
mov dword [esp + 0x14], eax
call fcn.00403730
movzx ebx, word [esp + 0x32c]
mov ebp, dword [esp + 0x230]
lea ecx, [esp + 0x356]
push ecx
push 0x10
lea edx, [esp + 0x668]
push edx
call fcn.0040aa6e
add esp, 0xc
mov edi, dword [esp + 0x24]
test edi, edi
je 0x402380
xor eax, eax
jmp 0x402270
movzx ecx, word [esp + eax + 0x4e6]
mov word [esp + eax + 0x7a0], cx
add eax, 2
test cx, cx
jne 0x402270
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x464]
mov word [esp + eax + 0x720], cx
add eax, 2
test cx, cx
jne 0x402290
movzx eax, word [esp + 0x4e4]
mov dword [esp + 0x14], eax
xor eax, eax
jmp 0x4022c0
movzx ecx, word [eax + 0x41dce4]
mov word [esp + eax + 0x6a0], cx
add eax, 2
test cx, cx
jne 0x4022c0
cmp dword [0x423070], 3
movzx ebx, word [esp + 0x586]
mov ebp, 5
je 0x402302
lea ecx, [esp + 0xc30]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x40232f
push 0x104
lea edx, [esp + 0xc34]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x41dc88
lea eax, [esp + 0xc34]
push 0x104
push eax
call fcn.0040a9bd
add esp, 0xc
xor eax, eax
jmp 0x402340
movzx ecx, word [esp + eax + 0xc30]
mov word [esp + eax + 0x1040], cx
add eax, 2
test cx, cx
jne 0x402340
push 0x41dd3c
lea ecx, [esp + 0x1044]
push 0x104
push ecx
call fcn.0040a9bd
add esp, 0xc
lea edx, [esp + 0x1040]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x200
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.0040f8c0
mov esi, 0x504d534d
mov ecx, 0x51
add esp, 0xc
mov dword [esp + 0x28], esi
mov word [esp + 0xac], cx
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + 0x41dcbc]
mov word [esp + eax + 0x2c], cx
add eax, 2
test cx, cx
jne 0x4023b0
mov edx, 0x2b66
mov word [esp + 0x14e], dx
xor eax, eax
jmp 0x4023e0
movzx ecx, word [eax + 0x41dce4]
mov word [esp + eax + 0xce], cx
add eax, 2
test cx, cx
jne 0x4023e0
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + 0x41dcd8]
mov word [esp + eax + 0xae], cx
add eax, 2
test cx, cx
jne 0x402400
cmp dword [esp + 0x18], 0
mov dword [esp + 0x1f0], 5
jne 0x402434
cmp dword [esp + 0x20], 0
jne 0x402434
test edi, edi
je 0x4024aa
lea eax, [esp + 0x7a0]
push eax
lea ecx, [esp + 0xb2]
push 0x10
push ecx
call fcn.0040aa6e
add esp, 0xc
lea edx, [esp + 0x720]
push edx
lea eax, [esp + 0x30]
push 0x40
push eax
call fcn.0040aa6e
mov cx, word [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x6a0]
push edx
lea eax, [esp + 0xd2]
push 0x40
push eax
mov word [esp + 0xb8], cx
call fcn.0040aa6e
add esp, 0xc
mov word [esp + 0x14e], bx
mov dword [esp + 0x1f0], ebp
test ebp, ebp
jne 0x4024aa
mov dword [esp + 0x1f0], 5
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + 0x41dce4]
mov word [esp + eax + 0xce], cx
add eax, 2
test cx, cx
jne 0x4024b0
cmp word [esp + 0x2c], cx
je 0x40279f
cmp word [esp + 0xac], cx
jbe 0x40279f
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x28], esi
call ebx
push eax
call fcn.0040aa3a
add esp, 4
xor ecx, ecx
push 0x7fe
push ecx
lea edx, [esp + 0x145a]
push edx
mov word [esp + 0x145c], cx
call fcn.0040f8c0
add esp, 0xc
cmp word [esp + 0x150], 0
jne 0x40254e
lea eax, [esp + 0x1450]
push eax
push 5
mov eax, 6
call fcn.004030a0
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x15c]
push 0x10
push edx
call fcn.0040aa6e
add esp, 0x14
cmp word [esp + 0x170], 0
jne 0x402587
lea eax, [esp + 0x1450]
push eax
push 5
mov eax, 6
call fcn.004030a0
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x17c]
push 0x10
push edx
call fcn.0040aa6e
add esp, 0x14
cmp word [esp + 0x1b0], 0
jne 0x4025c0
lea eax, [esp + 0x1450]
push eax
push 5
mov eax, 6
call fcn.004030a0
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x1bc]
push 0x10
push edx
call fcn.0040aa6e
add esp, 0x14
cmp word [esp + 0x1d0], 0
jne 0x40262e
lea eax, [esp + 0x1450]
push eax
push 5
mov eax, 6
call fcn.004030a0
lea ecx, [esp + 0x1458]
push ecx
lea edx, [esp + 0x1dc]
push 0x10
push edx
call fcn.0040aa6e
lea eax, [esp + 0x674]
add esp, 0x14
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402603
sub eax, edx
sar eax, 1
je 0x40262e
lea eax, [esp + 0x660]
push eax
lea ecx, [esp + 0x1d4]
push 0x10
push ecx
call fcn.0040aa6e
add esp, 0xc
lea eax, [esp + 0x680]
lea edx, [eax + 2]
jmp 0x402640
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402640
sub eax, edx
sar eax, 1
je 0x40266b
lea edx, [esp + 0x680]
push edx
lea eax, [esp + 0x194]
push 0x10
push eax
call fcn.0040aa6e
add esp, 0xc
cmp word [esp + 0x190], 0
jne 0x4026a4
lea ecx, [esp + 0x1450]
push ecx
push 5
mov eax, 6
call fcn.004030a0
lea edx, [esp + 0x1458]
push edx
lea eax, [esp + 0x19c]
push 0x10
push eax
call fcn.0040aa6e
add esp, 0x14
cmp dword [esp + 0x1f0], 0
mov dword [esp + 0x1f4], 0x10001cf
jne 0x4026c4
mov dword [esp + 0x1f0], 5
lea ecx, [esp + 0x28]
push ecx
call fcn.0040a880
add esp, 4
test eax, eax
je 0x40279f
lea edi, [esp + 0x820]
lea esi, [esp + 0x1d0]
call fcn.00403ac0
call ebx
push eax
call fcn.0040aa3a
add esp, 4
push 0x32
mov eax, 0x64
call fcn.00403060
add esp, 4
push eax
mov edx, edi
push edx
lea eax, [esp + 0x1250]
call fcn.00401ba0
add esp, 8
push 1
push 0
push 0x41dd54
mov eax, edi
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
lea ecx, [esp + 0x1c]
push ecx
push 3
push 0
push 0x41dd60
push closesocket
mov dword [esp + 0x30], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40279f
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402760
mov ecx, dword [esp + 0x1c]
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
push edx
lea eax, [esp + 0x824]
push eax
push 1
push 0
push 0x41ddcc
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x40279f
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
mov ecx, dword [esp + 0x1c54]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040a982
add esp, 0x1c4c
ret