Function at 0x402260
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
mov eax, 0x10454
call fcn.00412cc0
push ebx
mov ebx, dword [esp + 0x10460]
push ebp
push esi
push edi
lea eax, [esp + 0x364]
push eax
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x268]
push ecx
lea edx, [esp + 0x168]
push edx
push 0
push ebx
call fcn.00412f51
mov al, byte [esp + 0x174]
add esp, 0x14
test al, al
je 0x402367
lea eax, [esp + 0x160]
push eax
call fcn.004145ab
mov esi, eax
push 0x431e68
push esi
mov dword [esp + 0x20], esi
call fcn.00412e9c
mov edx, eax
xor eax, eax
add esp, 0xc
test edx, edx
mov ecx, 0x41
lea edi, [esp + 0x5c]
rep stosd dword es:[edi], eax
je 0x40235e
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov eax, edx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4022e7
lea edi, [esp + 0x5c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4022f5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x5c]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402312
mov cx, word [0x431e64]
lea edx, [esp + 0x5c]
push edx
mov word [edi], cx
call ebp
cmp eax, 0xffffffff
jne 0x402345
push 0
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x402669
push 0x431e68
push 0
call fcn.00412e9c
mov edx, eax
add esp, 8
test edx, edx
jne 0x4022e5
mov esi, dword [esp + 0x14]
push esi
call fcn.00412e2b
add esp, 4
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x264]
push str.patch.exx
push ecx
call fcn.0041f0fe
add esp, 8
test eax, eax
je 0x4023b7
mov edx, dword [esp + 0x18]
cmp dword [edx + 0x67b0], 5
jne 0x4023b7
mov ecx, dword [str.patch.exx]
mov eax, ebx
mov dword [eax], ecx
mov edx, dword [0x431e5c]
mov dword [eax + 4], edx
mov cx, word [0x431e60]
mov word [eax + 8], cx
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push ebx
call esi
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x14], ebx
je 0x402663
mov edx, dword [esp + 0x10468]
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push edx
call esi
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x58], ebp
je 0x402663
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x18], eax
push 0x38
xor eax, eax
mov ecx, 0xe
lea edi, [esp + 0x20]
push 0x431e50
rep stosd dword es:[edi], eax
lea eax, [esp + 0x24]
push 0xfffffffffffffff1
push eax
call fcn.00405940
add esp, 0x10
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x8000
lea edx, [esp + 0x470]
push edx
push ebp
mov esi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402669
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x464]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10474]
test eax, eax
mov dword [esp + 0x20], edx
jne 0x40256b
test edx, edx
jbe 0x402607
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp edx, 0x8000
lea ecx, [esp + 0x8464]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], 0x8000
mov eax, 0x8000
ja 0x4024b3
mov eax, edx
xor ecx, ecx
test eax, eax
jbe 0x4024d7
lea esp, [esp]
mov edx, dword [esp + 0x1c]
mov dl, byte [ecx + edx]
mov edi, dword [esp + 0x28]
mov byte [ecx + edi], dl
inc ecx
cmp ecx, eax
jb 0x4024c0
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
add edi, eax
mov dword [esp + 0x28], edi
add dword [esp + 0x1c], eax
mov edi, dword [esp + 0x30]
sub edx, eax
sub ecx, eax
add edi, eax
mov eax, 0x8000
sub eax, ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edi
je 0x40251f
push 0
lea ecx, [esp + 0x58]
push ecx
push eax
lea edx, [esp + 0x8470]
push edx
push ebx
call esi
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x402560
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x24]
jbe 0x402607
push edx
lea ecx, [esp + 0x14]
push ecx
push 0x8000
lea edx, [esp + 0x470]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x464]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
test edx, edx
ja 0x402491
jmp 0x402607
test esi, esi
jne 0x402607
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [esp]
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x8464]
push 2
push edx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], 0x8000
call fcn.00405a70
mov ecx, dword [esp + 0x34]
mov esi, eax
mov eax, 0x8000
add esp, 8
sub eax, ecx
je 0x4025c4
push 0
lea ecx, [esp + 0x58]
push ecx
push eax
lea edx, [esp + 0x8470]
push edx
push ebx
call edi
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4025fa
push 0
lea eax, [esp + 0x14]
push eax
push 0x8000
lea ecx, [esp + 0x470]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x464]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
cmp esi, 1
je 0x402607
test esi, esi
je 0x402580
lea ecx, [esp + 0x1c]
push ecx
call fcn.004058f0
mov ebx, dword [esp + 0x10474]
mov edx, dword [esp + 0x18]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFileTime]
add esp, 4
push ebx
push ebx
push ebx
push edx
call ebp
test eax, eax
je 0x402669
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov ecx, dword [esp + 0x1046c]
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x402678
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10454
ret 0x10
push ebx
push ebx
push ebx
push esi
call ebp
test eax, eax
je 0x402669
push esi
call edi
mov edx, dword [esp + 0x58]
push edx
call edi
mov eax, dword [esp + 0x10468]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10454
ret 0x10