Function at 0x401f5c
Capabilities:
Get file attributes
Read file on windows
Set file attributes
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push edi
push esi
push ebx
add esp, 0xfffffff4
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_GetFileAttributesA
mov dword [ebp - 0x48], eax
and al, 0xfe
add esp, 0xfffffff4
push eax
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_SetFileAttributesA
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x10], 0
mov byte [ebp - 0x4d], 0
add esp, 0x18
jmp 0x402240
push 2
push 0
push 0xfffffc00
push edi
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_SetEndOfFile
add esp, 0xfffffffc
push 0
push 0
push 0x228
push edi
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
lea eax, [ebp - 0x24]
mov dword [ebp - 0x5c], eax
push eax
push 4
lea eax, [ebp - 0x18]
push eax
push edi
call sub.KERNEL32.dll_ReadFile
add esp, 0x1c
test eax, eax
je 0x402299
push 0
push 0
push 0x7c0c
push edi
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
mov eax, dword [ebp - 0x5c]
push eax
push 4
lea eax, [ebp - 0x14]
push eax
push edi
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x402299
add esp, 0xfffffff4
push 0
mov eax, dword [ebp - 0x5c]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push edi
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x402299
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4020a7
add esp, 0xfffffff4
push eax
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x10], eax
add esp, 0x10
test eax, eax
je 0x4022ac
push 0
push 0
push 0x8a00
push edi
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
mov eax, dword [ebp - 0x5c]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push edi
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x402299
push dword [ebp - 0x1c]
push 0xc000
push dword [ebp - 0x18]
push dword [ebp - 0x10]
call fcn.00401450
add esp, 0x10
test al, al
je 0x402299
mov ebx, dword [ebp - 0x18]
add ebx, 0x8a00
mov dword [ebp - 0x54], ebx
push 2
push 0
mov dword [ebp - 0x58], ebx
neg dword [ebp - 0x58]
mov eax, dword [ebp - 0x58]
push eax
push edi
call sub.KERNEL32.dll_SetFilePointer
mov esi, eax
cmp esi, ebx
jae 0x4020d2
mov ebx, esi
mov esi, dword [ebp - 0x54]
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x4c], eax
add esp, 0x10
test eax, eax
je 0x402299
push 0
push 0
push esi
push edi
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
mov eax, dword [ebp - 0x5c]
push eax
push ebx
mov eax, dword [ebp - 0x4c]
push eax
push edi
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x402299
add esp, 0xfffffff8
push ebx
mov eax, dword [ebp - 0x4c]
push eax
call fcn.00401264
push 0
push 0
push 0
push edi
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
mov eax, dword [ebp - 0x5c]
push eax
push ebx
mov eax, dword [ebp - 0x4c]
push eax
push edi
call sub.KERNEL32.dll_WriteFile
add esp, 0x1c
test eax, eax
je 0x402299
add esp, 0xfffffff4
mov eax, dword [ebp - 0x4c]
push eax
call sub.msvcrt.dll_free
mov dword [ebp - 0x4c], 0
push 2
push 0
mov eax, dword [ebp - 0x58]
push eax
push edi
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_SetEndOfFile
add esp, 0x1c
cmp dword [ebp - 0x18], 0
je 0x402295
push 2
push 0
push 0
push edi
call sub.KERNEL32.dll_SetFilePointer
mov esi, eax
mov ebx, dword [ebp - 0x18]
mov edx, ebx
add edx, dword [ebp - 0x14]
cmp edx, esi
jbe 0x4021a4
mov eax, edx
sub eax, esi
sub ebx, eax
mov esi, edx
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x4c], eax
add esp, 0x10
test eax, eax
je 0x402299
push 0
push 0
push dword [ebp - 0x14]
push edi
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
mov eax, dword [ebp - 0x5c]
push eax
push ebx
mov eax, dword [ebp - 0x4c]
push eax
push edi
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x402299
push 0
push 0
push esi
push edi
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
mov eax, dword [ebp - 0x5c]
push eax
push ebx
mov eax, dword [ebp - 0x4c]
push eax
push edi
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
je 0x402299
push 0
push 0
push dword [ebp - 0x14]
push edi
call sub.KERNEL32.dll_SetFilePointer
add esp, 0xfffffff4
push 0
mov eax, dword [ebp - 0x5c]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push edi
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
je 0x402299
jmp 0x402295
add esp, 0xfffffffc
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_CreateFileA
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
je 0x402299
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x40]
push eax
push edi
call sub.KERNEL32.dll_GetFileTime
add esp, 0xfffffff8
lea eax, [ebp - 0x41]
push eax
push edi
call fcn.004016a8
add esp, 0x10
test al, al
je 0x402295
cmp byte [ebp - 0x41], 0
jne 0x401fa0
mov byte [ebp - 0x4d], 1
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4022ac
add esp, 0xfffffff4
push eax
call sub.msvcrt.dll_free
add esp, 0x10
cmp dword [ebp - 0x4c], 0
je 0x4022c1
add esp, 0xfffffff4
mov eax, dword [ebp - 0x4c]
push eax
call sub.msvcrt.dll_free
add esp, 0x10
cmp edi, 0xffffffff
je 0x4022e4
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x40]
push eax
push edi
call sub.KERNEL32.dll_SetFileTime
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
add esp, 0xfffffff8
mov eax, dword [ebp - 0x48]
push eax
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_SetFileAttributesA
mov al, byte [ebp - 0x4d]
lea esp, [ebp - 0x78]
pop ebx
pop esi
pop edi
leave
ret