Function at 0x10058eb
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
sub esp, 0x6b0
mov eax, dword [0x100fb04]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x200
lea eax, [ebp - 0x508]
push eax
push 0x41d
mov dword [ebp - 0x64c], esi
call fcn.0100210a
lea eax, [ebp - 0x508]
push eax
push 0x856
push esi
call fcn.01002480
push esi
call fcn.01005103
test eax, eax
je 0x1005c73
push ebx
push 0xffffffffffffffff
push 0x1001634
push 0xffffffffffffffff
push dword [0x1011578]
push 1
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringA]
dec eax
dec eax
mov ebx, 0x100194c
je 0x1005968
mov ebx, 0x1001940
push edi
mov esi, 0x104
push esi
lea eax, [ebp - 0x108]
push eax
call fcn.0100260c
neg eax
push ebx
sbb edi, edi
push esi
lea eax, [ebp - 0x108]
push eax
inc edi
call fcn.0100d2b0
xor esi, esi
cmp edi, esi
jne 0x1005c54
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1005c54
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, 0x1010508
push ebx
call edi
lea ecx, [ebp - 0x108]
push ecx
mov dword [ebp - 0x654], eax
call edi
mov ecx, dword [ebp - 0x654]
lea edi, [ecx + eax + 0xa]
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x650], eax
cmp eax, esi
jne 0x10059f7
push esi
push 0x10
push esi
push esi
push 0x44c
jmp 0x1005c64
push ebx
lea ecx, [ebp - 0x108]
push ecx
push 0x1001934
push edi
push eax
call fcn.010028bd
push 0x44
pop edi
push edi
lea eax, [ebp - 0x6b0]
push esi
push eax
call sub.msvcrt.dll_memset
mov ax, word [0x100fb50]
add esp, 0x20
mov dword [ebp - 0x6b0], edi
cmp word [0x100fb58], si
je 0x1005a39
push 6
pop ecx
jmp 0x1005a49
cmp ax, si
jne 0x1005a47
cmp word [0x100fb54], si
je 0x1005a5f
xor ecx, ecx
mov word [ebp - 0x680], cx
mov dword [ebp - 0x684], 1
cmp ax, si
jne 0x1005a63
xor eax, eax
jmp 0x1005a68
mov eax, 0x8000000
lea ecx, [ebp - 0x664]
push ecx
lea ecx, [ebp - 0x6b0]
push ecx
push esi
push esi
push eax
push esi
push esi
push esi
push dword [ebp - 0x650]
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x1005ac3
push dword [ebp - 0x660]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x664]
call fcn.01001f45
lea eax, [ebp - 0x66c]
push eax
push dword [ebp - 0x664]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x664]
call edi
jmp 0x1005b04
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push 0x200
lea ecx, [ebp - 0x308]
push ecx
push esi
push eax
push esi
push 0x1000
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push esi
push 0x10
lea eax, [ebp - 0x308]
push eax
push dword [ebp - 0x650]
push 0x46c
push dword [ebp - 0x64c]
call fcn.01002a45
push dword [ebp - 0x650]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x100192c
push 0x856
push dword [ebp - 0x64c]
call fcn.01002480
lea eax, [ebp - 0x648]
push eax
mov edi, 0x1010814
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, dword [ebp - 0x628]
sub ebx, dword [ebp - 0x62c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
push esi
push 3
push esi
push esi
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x650], eax
cmp eax, 0xffffffff
jne 0x1005b77
push esi
push 0x10
push esi
push edi
push 0x466
jmp 0x1005c64
lea eax, [ebp - 0x654]
push eax
push 1
push ebx
call fcn.0100c01c
test eax, eax
js 0x10059e8
push dword [ebp - 0x654]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x654], eax
push esi
cmp eax, esi
je 0x10059e9
lea ecx, [ebp - 0x668]
push ecx
push ebx
push eax
push dword [ebp - 0x650]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1005bd3
push esi
push 0x10
push esi
push edi
push 0x467
jmp 0x1005c64
push dword [ebp - 0x650]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x654]
mov ebx, 0x856
push ebx
push dword [ebp - 0x64c]
call fcn.01002480
push dword [ebp - 0x654]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x100192c
push ebx
push dword [ebp - 0x64c]
call fcn.01002480
push 0x1011a20
push esi
push 0x1001920
push 0x1001444
call fcn.010021fb
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x1005c39
push 0x1010508
call esi
test dword [0x101158c], 0x10000
jne 0x1005c4c
push 0x1010710
call esi
push edi
call esi
xor eax, eax
inc eax
jmp 0x1005c71
push esi
push 0x10
push esi
lea eax, [ebp - 0x108]
push eax
push 0x46d
push dword [ebp - 0x64c]
call fcn.01002a45
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0100cb7f
leave
ret 4