Function at 0x46ca10
Capabilities:
Check if file exists
Create process on windows
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7ce9
mov eax, dword fs:[0]
push eax
sub esp, 0x74
push ebx
push esi
push edi
mov eax, dword [0x513330]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x1c], esi
mov eax, dword [0x51856c]
mov edx, dword [eax + 0xc]
mov ecx, 0x51856c
call edx
mov ecx, dword [ebp + 8]
add eax, 0x10
mov dword [ecx], eax
lea edx, [ebp - 0x14]
mov edi, 1
push edx
mov ecx, str.cmd__c
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], edi
call fcn.00405a00
push 0x40
lea eax, [ebp - 0x7c]
push esi
mov byte [ebp - 4], 2
push eax
mov dword [ebp - 0x80], esi
call fcn.004ab3f0
xor eax, eax
lea ecx, [ebp - 0x20]
add esp, 0xc
push ecx
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
call fcn.0046bb00
add esp, 4
mov ecx, eax
lea esi, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.0046bc10
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x46cad4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea edx, [ebp - 0x28]
xor ecx, ecx
push edx
mov dword [ebp - 0x80], 0x44
mov dword [ebp - 0x54], edi
mov word [ebp - 0x50], cx
call fcn.0046c9a0
add esp, 4
mov bl, 6
mov edi, eax
lea esi, [ebp - 0x24]
mov byte [ebp - 4], bl
call fcn.0046ce60
mov byte [ebp - 4], 7
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040e720
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46cb35
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46cb58
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 5
push str.__i__
lea ecx, [ebp - 0x14]
push ecx
call fcn.0040e720
mov edi, dword [ebp + 0xc]
lea esi, [ebp - 0x28]
call fcn.0046ce60
mov byte [ebp - 4], 8
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [ebp - 0x14]
push edx
call fcn.0040e720
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46cbaa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 1
push 0x4eceb4
lea ecx, [ebp - 0x14]
push ecx
call fcn.0040e720
push 5
push str._2___
lea edx, [ebp - 0x14]
push edx
call fcn.0040e720
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040e720
push 4
push str.___y
lea ecx, [ebp - 0x14]
push ecx
call fcn.0040e720
mov eax, dword [ebp - 0x14]
cmp dword [eax - 4], 1
jle 0x46cc04
mov edx, dword [eax - 0xc]
push edx
lea eax, [ebp - 0x14]
push eax
call fcn.00405cd0
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x38]
push ecx
lea edx, [ebp - 0x80]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.004a5cf7
add esp, 8
test eax, eax
jl 0x46cd0f
mov ecx, dword [ebp - 0x14]
cmp eax, dword [ecx - 8]
jg 0x46cd0f
mov dword [ecx - 0xc], eax
mov edx, dword [ebp - 0x14]
xor ecx, ecx
mov word [edx + eax*2], cx
mov eax, dword [ebp - 0x38]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebp - 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [ebp - 0x34]
push edx
call esi
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x18]
push ecx
call fcn.0046b120
mov eax, dword [ebp - 0x18]
add esp, 8
cmp dword [eax - 0xc], 0
je 0x46cc9b
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
setne al
test al, al
jne 0x46ccb4
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x46ccb4
mov edx, dword [ebp - 0x18]
push 4
push 0
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46ccd7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46ccfa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00405ef0
mov eax, 0x46ccfa
ret