Function at 0x10009854
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Get file size
Move file
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x100139c0
call fcn.1000a92c
sub esp, 0x580
push ebx
push esi
xor ebx, ebx
push edi
cmp dword [ebp + 8], ebx
mov dword [ebp - 0x10], esp
je 0x10009e0d
nop
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jb 0x1000988c
cmp al, 4
jb 0x1000988c
push 1
pop eax
jmp 0x1000988e
xor eax, eax
nop
cmp eax, ebx
je 0x10009df7
nop
nop
nop
mov esi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov edi, 0x104
lea eax, [ebp - 0x478]
push edi
push eax
push dword [ebp + 8]
call esi
cmp dword [ebp + 0xc], ebx
je 0x100098c6
lea eax, [ebp - 0x374]
push edi
push eax
push dword [ebp + 0xc]
call esi
jmp 0x100098d9
lea eax, [ebp - 0x374]
push 0x1001b064
push eax
call fcn.1000abd0
pop ecx
pop ecx
lea eax, [ebp - 0x270]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x57c]
push eax
push ebx
lea eax, [ebp - 0x270]
push 0x1001b060
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x10009e0d
lea eax, [ebp - 0x270]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x271], 0x5c
je 0x10009932
lea eax, [ebp - 0x270]
push 0x1001a834
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x270]
push str.WININIT.INI
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
nop
lea eax, [ebp - 0x270]
mov byte [ebp - 0x14], 0xd
push eax
mov byte [ebp - 0x13], 0xa
mov byte [ebp - 0x12], bl
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x10009a89
push str._rename_
lea eax, [ebp - 0x16c]
push 0x1001b044
push eax
call fcn.1000aa0b
add esp, 0xc
nop
push ebx
push 0x80
push 2
push ebx
push ebx
lea eax, [ebp - 0x270]
push 0x40000000
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x100099c6
lea eax, [ebp - 0x64]
push 0x10014f48
push eax
mov dword [ebp - 0x64], 0x1001c1a0
call fcn.1000a94b
mov eax, 0x10009e0d
ret
nop
push 2
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x16c]
push eax
mov dword [ebp - 0x18], ebx
call fcn.1000a990
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
pop ecx
push eax
lea eax, [ebp - 0x16c]
push eax
push edi
call esi
nop
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.1000a990
pop ecx
push eax
lea eax, [ebp - 0x14]
push eax
push edi
call esi
lea eax, [ebp - 0x478]
push eax
lea eax, [ebp - 0x374]
push eax
lea eax, [ebp - 0x16c]
push str._s_s
push eax
call fcn.1000aa0b
add esp, 0x10
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x16c]
push eax
call fcn.1000a990
pop ecx
push eax
lea eax, [ebp - 0x16c]
push eax
push edi
call esi
nop
lea eax, [ebp - 0x18]
push ebx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.1000a990
pop ecx
push eax
lea eax, [ebp - 0x14]
push eax
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
push 1
pop eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
lea eax, [ebp - 0x57c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
nop
mov dword [ebp - 0x58], ebx
nop
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, 0x80
push ebx
push edi
push 3
push ebx
push ebx
lea eax, [ebp - 0x270]
push 0x80000000
push eax
mov dword [ebp - 4], 2
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x44], eax
jne 0x10009ade
lea eax, [ebp - 0x68]
push 0x10014f48
push eax
mov dword [ebp - 0x68], 0x1001c1a0
call fcn.1000a94b
nop
push ebx
push edi
push 2
push ebx
push ebx
lea eax, [ebp - 0x57c]
push 0x40000000
push eax
call esi
mov dword [ebp - 0x40], eax
nop
cmp eax, 0xffffffff
jne 0x10009b11
lea eax, [ebp - 0x60]
push 0x10014f48
push eax
mov dword [ebp - 0x60], 0x1001c1a0
call fcn.1000a94b
mov dword [ebp - 0x5c], ebx
nop
mov dword [ebp + 0xc], ebx
nop
mov dword [ebp + 8], ebx
nop
lea eax, [ebp + 8]
push eax
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x18], eax
nop
push eax
call fcn.1000a438
pop ecx
mov esi, eax
nop
lea eax, [ebp + 0xc]
push ebx
push eax
push dword [ebp - 0x18]
push esi
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov al, byte [ebp + 0xf]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call fcn.10003e65
push esi
call fcn.1000a990
pop ecx
push eax
push esi
lea ecx, [ebp - 0x2c]
call fcn.100040d4
mov al, byte [ebp + 0xf]
push ebx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 3
mov byte [ebp - 0x3c], al
call fcn.10003e65
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 4
push eax
call fcn.1000a990
pop ecx
push eax
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x2c]
call fcn.1000407d
xor edi, edi
nop
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x18], ebx
jbe 0x10009cda
lea eax, [ebp - 0x14]
push eax
call fcn.1000a990
pop ecx
push eax
lea eax, [ebp - 0x14]
push edi
push eax
lea ecx, [ebp - 0x2c]
call fcn.10009fc5
cmp eax, dword [0x10014370]
mov dword [ebp - 0x1c], eax
je 0x10009cda
mov ecx, dword [ebp - 0x18]
dec ecx
cmp edi, ecx
jae 0x10009cda
sub eax, edi
lea ecx, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x54]
push edi
push eax
call fcn.10003c87
mov byte [ebp - 4], 5
nop
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x58c]
push eax
call fcn.10009ec7
pop ecx
pop ecx
push 1
lea ecx, [ebp - 0x58c]
call fcn.10003e65
mov eax, dword [ebp - 0x50]
cmp eax, ebx
jne 0x10009c1d
mov eax, 0x1001435c
mov edi, dword [ebp - 0x40]
lea ecx, [ebp + 0xc]
push ebx
push ecx
push dword [ebp - 0x4c]
push eax
push edi
call esi
lea eax, [ebp + 0xc]
push ebx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.1000a990
pop ecx
push eax
lea eax, [ebp - 0x14]
push eax
push edi
call esi
nop
mov eax, dword [ebp - 0x50]
cmp eax, ebx
jne 0x10009c50
mov eax, 0x1001435c
push str._rename_
push eax
call fcn.10012380
pop ecx
test eax, eax
pop ecx
jne 0x10009cc1
mov dword [ebp - 0x5c], 1
nop
lea eax, [ebp - 0x478]
push eax
lea eax, [ebp - 0x374]
push eax
lea eax, [ebp - 0x16c]
push str._s_s
push eax
call fcn.1000aa0b
add esp, 0x10
nop
lea eax, [ebp + 0xc]
push ebx
push eax
lea eax, [ebp - 0x16c]
push eax
call fcn.1000a990
pop ecx
push eax
lea eax, [ebp - 0x16c]
push eax
push edi
call esi
nop
lea eax, [ebp + 0xc]
push ebx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.1000a990
pop ecx
push eax
lea eax, [ebp - 0x14]
push eax
push edi
call esi
mov eax, dword [ebp - 0x1c]
push 1
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 4
lea edi, [eax + 1]
call fcn.10003e65
jmp 0x10009ba1
cmp dword [ebp - 0x5c], ebx
jne 0x10009d8e
mov dword [ebp - 0x1c], ebx
nop
push str._rename_
lea eax, [ebp - 0x16c]
push 0x1001b044
push eax
call fcn.1000aa0b
add esp, 0xc
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0x16c]
push eax
call fcn.1000a990
mov edi, dword [ebp - 0x40]
pop ecx
push eax
lea eax, [ebp - 0x16c]
push eax
push edi
call esi
nop
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.1000a990
pop ecx
push eax
lea eax, [ebp - 0x14]
push eax
push edi
call esi
lea eax, [ebp - 0x478]
push eax
lea eax, [ebp - 0x374]
push eax
lea eax, [ebp - 0x16c]
push str._s_s
push eax
call fcn.1000aa0b
add esp, 0x10
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0x16c]
push eax
call fcn.1000a990
pop ecx
push eax
lea eax, [ebp - 0x16c]
push eax
push edi
call esi
lea eax, [ebp - 0x1c]
push ebx
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.1000a990
pop ecx
push eax
lea eax, [ebp - 0x14]
push eax
push edi
call esi
push dword [ebp - 0x44]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
nop
push dword [ebp - 0x40]
call esi
lea eax, [ebp - 0x270]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
nop
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x57c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
push 1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 3
call fcn.10003e65
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.10003e65
jmp 0x10009a6f
push 5
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x10009a6f
xor eax, eax
jmp 0x10009a7a