Function at 0x412440
Capabilities:
Check if file exists
Delete file
Get file attributes
Get file size
Read file on windows
Set file attributes
Timestomp file
Write file on windows

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
push edi
xor edi, edi
push edi
call fcn.00411850
mov eax, dword [esp + 0x54]
add esp, 4
cmp eax, edi
je 0x41245c
mov dword [eax], edi
mov esi, dword [esp + 0x48]
cmp esi, edi
je 0x412740
cmp word [esi], di
je 0x412740
mov ebp, dword [esp + 0x4c]
cmp ebp, edi
je 0x412740
cmp word [ebp], di
je 0x412740
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call ebx
test al, 0x10
mov dword [esp + 0x28], eax
je 0x4124b1
push 0xd93
push 0x1d
call fcn.00411830
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
push ebp
call ebx
cmp eax, 0xffffffff
mov dword [esp + 0x48], eax
je 0x4124da
test al, 0x10
je 0x4124da
push 0xd9d
push 0x1e
call fcn.00411830
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
push edi
push 0x80
push 3
push edi
push 7
push SysReAllocStringLen
push esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], edi
call fcn.00429640
mov ebx, eax
add esp, 0x1c
cmp ebx, 0xffffffff
je 0x4126d8
mov eax, dword [esp + 0x48]
cmp eax, 0xffffffff
je 0x41251d
test al, 1
je 0x41251d
and al, 0xfe
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
push 0x80
push 4
push edi
push edi
push 0xc0000000
push ebp
call fcn.00429640
mov ebp, eax
add esp, 0x1c
cmp ebp, 0xffffffff
je 0x4126f3
mov ecx, dword [esp + 0x48]
xor eax, eax
cmp ecx, 0xffffffff
lea ecx, [esp + 0x2c]
sete al
mov dword [esp + 0x10], eax
lea edx, [esp + 0x34]
push ecx
lea eax, [esp + 0x40]
push edx
push eax
push ebx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], edi
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, dword [esp + 0x18]
push edx
push eax
push ebp
call fcn.00429600
add esp, 0xc
test eax, eax
je 0x412704
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
push edi
push edi
push ebx
mov dword [esp + 0x20], 1
call esi
push edi
push edi
push edi
push ebp
call esi
push 0x1000
call fcn.004a2973
add esp, 4
mov esi, eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x48], edi
mov ecx, 0x400
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
xor edi, edi
lea eax, [esp + 0x1c]
push edi
push eax
push 0x1000
push esi
push ebx
mov dword [esp + 0x30], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41261f
mov eax, dword [esp + 0x1c]
cmp eax, edi
je 0x412628
lea ecx, [esp + 0x24]
push edi
push ecx
push eax
push esi
push ebp
mov dword [esp + 0x38], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x412632
jmp 0x4125d6
push 0xdf1
push 0xd
jmp 0x412639
mov dword [esp + 0x20], 1
jmp 0x412649
push 0xdff
push 0xe
call fcn.00411830
add esp, 8
mov dword [esp + 0x48], 1
push esi
call fcn.004a299c
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp dword [esp + 0x20], edi
je 0x41269c
mov eax, dword [esp + 0x48]
test eax, eax
jne 0x41269c
mov al, byte [esp + 0x54]
mov dword [esp + 0x14], 1
test al, 1
je 0x41268d
lea edx, [esp + 0x2c]
lea eax, [esp + 0x34]
push edx
lea ecx, [esp + 0x40]
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [esp + 0x58]
test eax, eax
je 0x41269c
push ebp
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
cmp ebp, 0xffffffff
je 0x4126af
push ebp
call esi
cmp dword [esp + 0x14], edi
je 0x412715
test byte [esp + 0x54], 2
je 0x412734
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x4c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
push 0xdb5
push 3
call fcn.00411830
mov eax, dword [esp + 0x1c]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
push 0xdc8
push 4
call fcn.00411830
add esp, 8
jmp 0x41269e
push 0xddb
push 0x25
call fcn.00411830
add esp, 8
jmp 0x41269e
cmp dword [esp + 0x10], edi
je 0x412734
mov eax, dword [esp + 0x50]
cmp eax, edi
je 0x412729
mov dword [eax], 1
mov ecx, dword [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
push 0xd8b
push 1
call fcn.00411830
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret