Function at 0x404fa4
Capabilities:
Check if file exists
Create process on windows
Delete file
Get file attributes
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6b4
mov eax, dword [0x40e004]
xor eax, esp
mov dword [esp + 0x6b0], eax
push ebx
push esi
push edi
mov esi, ecx
lea edx, [esp + 0x2b8]
push 0x200
mov ecx, 0x41d
call fcn.00402774
lea eax, [esp + 0x2b8]
mov ecx, esi
push eax
call fcn.00405c5f
mov ecx, esi
call fcn.004045d4
test eax, eax
je 0x4052fe
push 0xffffffffffffffff
push 0x4013cc
push 0xffffffffffffffff
push dword [0x4108a8]
push 1
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringA]
dec eax
mov edi, 0x4016d0
dec eax
je 0x405020
mov edi, 0x4016dc
push 0x104
lea eax, [esp + 0x1b4]
mov byte [esp + 0x1b4], 0
push eax
push dword [0x40ee78]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x405062
push 0x5c
pop edx
lea ecx, [esp + 0x1b0]
call fcn.0040c724
test eax, eax
je 0x405062
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov byte [eax], 0
xor ebx, ebx
lea ecx, [esp + 0x1b0]
cmp byte [esp + 0x1b0], bl
push edi
sete bl
call fcn.0040c6bd
test ebx, ebx
jne 0x4052e4
lea eax, [esp + 0x1b0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4052e4
lea ecx, [esp + 0x1b0]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4050a4
sub ecx, edx
mov edx, 0x40f838
lea edi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4050b5
sub edx, edi
lea ebx, [ecx + 0xa]
add ebx, edx
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
jne 0x4050e2
xor eax, eax
mov edx, 0x44c
push eax
push 0x10
push eax
jmp 0x4052f6
push 0x40f838
lea eax, [esp + 0x1b4]
push eax
push 0x4016e8
push ebx
push edi
call fcn.00401b0d
push 0x44
pop ebx
push ebx
lea eax, [esp + 0x40]
push 0
push eax
call sub.msvcrt.dll_memset
mov ax, word [0x40ee84]
add esp, 0x20
cmp word [0x40ee80], 0
mov dword [esp + 0x28], ebx
je 0x405127
push 6
pop ecx
jmp 0x405137
test ax, ax
jne 0x405135
cmp word [0x40ee6c], ax
je 0x405149
xor ecx, ecx
mov word [esp + 0x58], cx
mov dword [esp + 0x54], 1
test ax, ax
jne 0x40514d
xor eax, eax
jmp 0x405152
mov eax, 0x8000000
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x2c]
push ecx
xor ecx, ecx
push ecx
push ecx
push eax
push ecx
push ecx
push ecx
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x40519c
push dword [esp + 0x14]
call ebx
mov ecx, dword [esp + 0x10]
call fcn.00402407
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [esp + 0x10]
call ebx
jmp 0x4051d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
lea ecx, [esp + 0x4b8]
push ebx
push 0x200
push ecx
push ebx
push eax
push ebx
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push ebx
push 0x10
lea eax, [esp + 0x4c0]
mov edx, 0x46c
push eax
push edi
mov ecx, esi
call fcn.00402462
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x4016f4
mov ecx, esi
call fcn.00405c5f
lea eax, [esp + 0x70]
mov edi, 0x40fb44
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, dword [esp + 0x90]
sub ebx, dword [esp + 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
push eax
push eax
push 3
push eax
push eax
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
jne 0x40523f
push 0
push 0x10
push 0
push edi
mov edx, 0x466
jmp 0x4052f7
lea eax, [ebx + 1]
cmp eax, ebx
jb 0x4050d2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4050d2
push 0
lea eax, [esp + 0x28]
push eax
push ebx
mov ebx, dword [esp + 0x18]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405285
push eax
push 0x10
push eax
push 0x40fb44
mov edx, 0x467
jmp 0x4052f7
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov ecx, esi
call fcn.00405c5f
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x4016f4
mov ecx, esi
call fcn.00405c5f
push ecx
push 0
mov edx, 0x4016c4
call fcn.00402b69
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4052c5
push 0x40f838
call esi
test dword [0x4108bc], 0x10000
jne 0x4052d8
push 0x40fa40
call esi
push 0x40fb44
call esi
xor eax, eax
inc eax
jmp 0x405300
push 0
push 0x10
push 0
lea eax, [esp + 0x1bc]
mov edx, 0x46d
push eax
mov ecx, esi
call fcn.00402462
xor eax, eax
mov ecx, dword [esp + 0x6bc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040cb2e
mov esp, ebp
pop ebp
ret