Function at 0x402070
Capabilities:
Check if file exists
Create a process with modified i/o handles and window
Create process on windows
Read file on windows
Terminate process
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0x16c
mov eax, dword [0x411008]
xor eax, esp
mov dword [esp + 0x164], eax
cmp byte [0x412bb0], 0x34
push ebx
push ebp
push esi
push edi
jne 0x4023d3
mov al, 0x37
cmp byte [0x412bb3], al
jne 0x4023d3
cmp byte [0x412bb4], 0x65
jne 0x4023d3
cmp byte [0x412bb5], al
jne 0x4023d3
push 0x104
lea eax, [esp + 0x6c]
push 0
push eax
call fcn.00405e50
add esp, 0xc
xor eax, eax
mov cl, byte [eax + 0x513838]
mov byte [esp + eax + 0x68], cl
inc eax
test cl, cl
jne 0x4020d2
lea eax, [esp + 0x68]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4020e6
mov ecx, dword [str.xy_ddz.exe]
mov edx, dword [0x40f5a0]
mov dword [eax], ecx
mov ecx, dword [0x40f5a4]
mov dword [eax + 4], edx
lea edx, [esp + 0x68]
push edx
mov dword [eax + 8], ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, 1
je 0x4022cd
push 0x104
lea eax, [esp + 0x6c]
push 0
push eax
call fcn.00405e50
add esp, 0xc
xor eax, eax
mov cl, byte [eax + 0x412cb0]
mov byte [esp + eax + 0x68], cl
inc eax
test cl, cl
jne 0x402132
lea eax, [esp + 0x68]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402146
mov ecx, dword [str.xy_ddz.dat]
mov edx, dword [0x40f5ac]
mov dword [eax], ecx
mov ecx, dword [0x40f5b0]
mov dword [eax + 4], edx
lea edx, [esp + 0x68]
push 0x40f5b4
push edx
mov dword [eax + 8], ecx
call fcn.00402df4
mov esi, eax
add esp, 8
test esi, esi
jne 0x4021d1
push eax
push 0x40f4e4
push 0x40f54c
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x412a64]
test eax, eax
jne 0x4021af
mov edi, 0x412a64
call fcn.00401db0
cmp eax, 1
jne 0x4021ca
mov eax, dword [0x412a64]
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
je 0x4021ca
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0
call fcn.00403959
call fcn.00401ec0
push esi
mov ebp, eax
push 1
push ebp
push 0x4136d0
call fcn.004030ab
add esp, 0x10
xor eax, eax
test ebp, ebp
jle 0x402204
nop
or cl, 0xff
sub cl, byte [eax + 0x4136d0]
inc eax
cmp eax, ebp
mov byte [eax + 0x4136cf], cl
jl 0x4021f0
push esi
call fcn.0040363d
add esp, 4
push 0x104
lea edx, [esp + 0x6c]
push 0
push edx
call fcn.00405e50
add esp, 0xc
xor eax, eax
mov cl, byte [eax + 0x513838]
mov byte [esp + eax + 0x68], cl
inc eax
test cl, cl
jne 0x402223
lea eax, [esp + 0x68]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402237
mov ecx, dword [str.xy_ddz.exe]
mov edx, dword [0x40f5a0]
mov dword [eax], ecx
mov ecx, dword [0x40f5a4]
mov dword [eax + 4], edx
lea edx, [esp + 0x68]
push 0x40f5b8
push edx
mov dword [eax + 8], ecx
xor edi, edi
call fcn.00402df4
mov esi, eax
add esp, 8
test esi, esi
jne 0x4022b6
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea esp, [esp]
cmp dword [0x513830], 1
jne 0x402353
cmp edi, 0x32
jge 0x402353
push 0xc8
call ebx
lea eax, [esp + 0x68]
push 0x40f5b8
push eax
inc edi
call fcn.00402df4
mov esi, eax
add esp, 8
test esi, esi
je 0x402280
push esi
push 1
push ebp
push 0x4136d0
call fcn.0040322a
push esi
call fcn.0040363d
add esp, 0x14
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x14], 0x44
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x14]
push edx
push 0
push 0
push 0
push 1
push 0
mov eax, 5
push 0
mov word [esp + 0x60], ax
push 0
lea eax, [esp + 0x8c]
push eax
mov dword [esp + 0x64], 0x101
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4023cc
push eax
push 0x40f4b4
push 0x40f4bc
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x412a64]
test eax, eax
jne 0x4023aa
mov edi, 0x412a64
call fcn.00401db0
cmp eax, 1
jne 0x4023c5
mov ecx, dword [0x412a64]
push ecx
jmp 0x4023ab
push 0
push 0x40f4b4
push 0x40f4bc
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x412a64]
test eax, eax
jne 0x402388
mov edi, 0x412a64
call fcn.00401db0
cmp eax, 1
jne 0x4023a3
mov ecx, dword [0x412a64]
push ecx
jmp 0x402389
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
je 0x4023a3
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0
call fcn.00403959
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
je 0x4023c5
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push 0
call fcn.00403959
mov eax, 1
jmp 0x4023d5
xor eax, eax
mov ecx, dword [esp + 0x174]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00402ca4
add esp, 0x16c
ret