Function at 0x12fbf2d0
Capabilities:
Check if file exists
Delete file
Get file attributes
Read file on windows
Resolve function by parsing pe exports
Set file attributes
Timestomp file
Write file on windows

Disassembly:
sub esp, 0x4b4
mov dword [0x131c8f38], 0
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push edi
call ebp
mov edi, dword [esp + 0x4c8]
mov dword [0x131c8f40], eax
test edi, edi
je 0x12fbfd78
cmp word [edi], 0
je 0x12fbfd78
mov ebx, dword [esp + 0x4cc]
test ebx, ebx
je 0x12fbfd78
cmp word [ebx], 0
je 0x12fbfd78
mov eax, dword [0x131c8f44]
test eax, eax
jne 0x12fbf354
mov dword [0x131c8f38], 2
mov dword [0x131c8f3c], 0x3516
call ebp
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x4b4
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push edi
call esi
test al, 0x10
mov dword [esp + 0x68], eax
je 0x12fbf38d
mov dword [0x131c8f38], 0x1d
mov dword [0x131c8f3c], 0x351e
call ebp
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x4b4
ret
push ebx
call esi
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
je 0x12fbf3c5
test al, 0x10
je 0x12fbf3c5
mov dword [0x131c8f38], 0x1e
mov dword [0x131c8f3c], 0x3528
call ebp
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x4b4
ret
xor esi, esi
mov dword [esp + 0x14], 0xffffffff
push esi
push esi
push 3
push esi
push 5
push SysReAllocStringLen
push edi
mov dword [esp + 0x50], esi
mov dword [esp + 0x68], esi
mov dword [esp + 0x54], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x2c], ebx
je 0x12fbfbb2
push esi
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, 0x105
xor eax, eax
lea edi, [esp + 0xad]
mov byte [esp + 0xac], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xac]
test eax, eax
je 0x12fbf4a6
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x12fbf486
mov ecx, 0x106
xor eax, eax
lea edi, [esp + 0xac]
push eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
lea edx, [esp + 0xb0]
push ecx
push 0x418
push edx
push ebx
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x12fbf4bc
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x29f7
call ebp
mov dword [0x131c8f40], eax
mov dword [0x131c8f38], 0xf
mov dword [0x131c8f3c], 0x354a
call ebp
mov dword [0x131c8f40], eax
jmp 0x12fbfd06
mov dword [0x131c8f38], 1
mov dword [0x131c8f3c], 0x29ea
jmp 0x12fbf47f
push 0x10
lea eax, [esp + 0xb0]
push 0x1318284c
push eax
call fcn.12f5e5f0
add esp, 0xc
test eax, eax
jne 0x12fbf81c
mov edx, dword [esp + 0xe0]
lea eax, [esp + 0xac]
push edx
push 0x34
push eax
mov dword [esp + 0x24], 3
call fcn.12fedaa0
add esp, 0xc
test eax, eax
je 0x12fbfbfc
mov ecx, dword [esp + 0xd8]
push ecx
call fcn.12f5bf8b
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x38], esi
je 0x12fbfc24
mov ecx, dword [esp + 0xd8]
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0xd8]
lea eax, [esp + 0x58]
push eax
push ecx
push esi
push ebx
mov dword [esp + 0x68], 0
call fcn.12fb5c00
add esp, 0x10
test eax, eax
je 0x12fbfcf5
mov edi, dword [esp + 0x4cc]
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
jne 0x12fbf5c8
mov eax, dword [esp + 0x20]
test al, 1
je 0x12fbf5a0
and al, 0xfe
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x12fbfc3f
lea edx, [esp + 0x44]
lea eax, [esp + 0x50]
push edx
lea ecx, [esp + 0x40]
push eax
xor edi, edi
push ecx
push ebx
mov dword [esp + 0x5c], 1
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov eax, dword [esp + 0x18]
cmp eax, 3
jne 0x12fbf96d
mov edx, dword [esi + 0x24]
push edx
call fcn.12ff0660
mov ebx, eax
add esp, 4
cmp ebx, edi
mov dword [esp + 0x5c], ebx
je 0x12fbfc58
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x6d]
mov byte [esp + 0x6c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edx, dword [esi + 0x20]
push 0x3f
stosb byte es:[edi], al
lea eax, [esp + 0x70]
push eax
mov eax, dword [esi + 0x5c]
push eax
mov eax, dword [esi + 0x54]
push eax
push edx
call fcn.12fc0270
add esp, 0x14
test eax, eax
je 0x12fbfc6e
lea ecx, [esi + 0x28]
lea edi, [esp + 0x6c]
push ecx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x70]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
call fcn.12fedb50
add esp, 0xc
test eax, eax
je 0x12fbfc84
push 0
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebp
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x12fbfc9a
mov edi, dword [esi + 0x40]
cmp eax, 1
mov dword [esp + 0x20], edi
jne 0x12fbf6b9
mov edi, dword [esi + 0x44]
mov dword [esp + 0x20], edi
push edi
call fcn.12f5bf8b
add esp, 4
mov ebp, eax
mov eax, dword [ebx]
mov ecx, ebx
push edi
call dword [eax + 0xc]
mov ebx, eax
push ebx
call fcn.12f5bf8b
mov ecx, dword [esi + 0x38]
mov edx, dword [esp + 0x30]
add esp, 4
xor edi, edi
mov dword [esp + 0x18], eax
push edi
push edi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x30], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x30]
inc ecx
mov edx, dword [eax + 0x3c]
mov esi, dword [eax + 0x40]
cmp ecx, edx
mov dword [esp + 0x30], ecx
jne 0x12fbf71c
mov esi, dword [eax + 0x44]
mov dword [esp + 0x28], 1
mov ecx, dword [esp + 0x20]
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
mov dword [esp + 0x68], 0
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x1c]
mov ecx, ebx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x68]
push eax
push esi
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12fbf877
mov edx, dword [ebp]
lea edi, [esi - 4]
lea esi, [ebp + 4]
push edx
push edi
push esi
call fcn.12fedaa0
add esp, 0xc
test eax, eax
je 0x12fbf88d
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x1c]
mov eax, dword [edx]
push ebx
push ecx
push edi
mov dword [esp + 0x70], eax
lea edi, [esp + 0x7c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push esi
push ecx
lea eax, [esp + 0x84]
mov ecx, edx
mov edx, dword [esp + 0x78]
push eax
mov dword [esp + 0x40], 0
call dword [edx + 0x14]
test eax, eax
je 0x12fbf8a3
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push 0
push eax
mov eax, dword [esp + 0x1c]
push ecx
push edx
push eax
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x12fbf8b9
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
cmp ecx, eax
jb 0x12fbf8cf
mov eax, dword [esp + 0x28]
test eax, eax
je 0x12fbf6fa
jmp 0x12fbf8f6
mov edi, 0x131827b4
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0xb0]
push 0x131827b4
push ecx
call fcn.12f5e5f0
add esp, 0xc
test eax, eax
jne 0x12fbfbdc
mov eax, dword [esp + 0xec]
test eax, eax
jne 0x12fbf861
mov dword [esp + 0x18], 1
jmp 0x12fbf563
cmp eax, 1
jne 0x12fbfbdc
mov dword [esp + 0x18], 2
jmp 0x12fbf563
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x35ea
jmp 0x12fbf8e3
mov dword [0x131c8f38], 0x1c
mov dword [0x131c8f3c], 0x35f3
jmp 0x12fbf8e3
mov dword [0x131c8f38], 0x12
mov dword [0x131c8f3c], 0x35fc
jmp 0x12fbf8e3
mov dword [0x131c8f38], 0xe
mov dword [0x131c8f3c], 0x3604
jmp 0x12fbf8e3
mov dword [0x131c8f38], 0xe
mov dword [0x131c8f3c], 0x360b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov dword [esp + 0x10], 1
push ebp
call fcn.12f5bf80
mov edx, dword [esp + 0x1c]
push edx
call fcn.12f5bf80
mov eax, dword [esp + 0x30]
add esp, 8
test eax, eax
je 0x12fbfcf5
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x12fbfcf5
mov al, byte [esp + 0x4d0]
mov dword [esp + 0x34], 1
test al, 1
je 0x12fbf94e
lea eax, [esp + 0x44]
lea ecx, [esp + 0x50]
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x40]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [esp + 0x4d4]
test eax, eax
je 0x12fbfcf5
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
jmp 0x12fbfcf5
cmp eax, 1
je 0x12fbf97b
cmp eax, 2
jne 0x12fbfcf5
push 2
call fcn.12ff0660
add esp, 4
cmp eax, edi
mov dword [esp + 0x20], eax
je 0x12fbfcd6
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x6d]
mov byte [esp + 0x6c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, 0x131827e4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x6c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xor ebp, ebp
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [esp + 0xf0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
push ebp
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xfc]
lea eax, [edx + ecx + 0x100]
mov ecx, dword [esp + 0x34]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x10000
call fcn.12f5bf8b
push 0x10000
mov esi, eax
call fcn.12f5bf8b
add esp, 8
mov ebx, eax
mov dword [esp + 0x24], ebp
mov dword [esp + 0x10], ebp
mov ecx, 0x4000
xor eax, eax
mov edi, esi
lea edx, [esp + 0x1c]
rep stosd dword es:[edi], eax
mov ecx, 0x4000
mov edi, ebx
push ebp
push edx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x34]
push 0x10000
push esi
push eax
mov dword [esp + 0x30], ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12fbfad6
mov eax, dword [esp + 0x1c]
cmp eax, 0x10000
jae 0x12fbfa66
cmp eax, ebp
mov dword [esp + 0x24], 1
je 0x12fbfb3f
mov ecx, dword [esp + 0x20]
lea edi, [esp + 0x6c]
mov dword [esp + 0x28], ebp
mov edx, dword [ecx]
lea ecx, [esp + 0x28]
push ecx
push 0x10000
push ebx
push eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push esi
lea eax, [esp + 0x80]
push ecx
mov ecx, dword [esp + 0x38]
push eax
call dword [edx + 0x14]
test eax, eax
je 0x12fbfaec
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x30]
push ebp
push ecx
push edx
push ebx
push eax
mov dword [esp + 0x44], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x12fbfb02
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
cmp ecx, eax
jb 0x12fbfb18
cmp dword [esp + 0x24], ebp
je 0x12fbfa14
jmp 0x12fbfb3f
mov dword [0x131c8f38], 0xd
mov dword [0x131c8f3c], 0x3646
jmp 0x12fbfb2c
mov dword [0x131c8f38], 0x12
mov dword [0x131c8f3c], 0x3656
jmp 0x12fbfb2c
mov dword [0x131c8f38], 0xe
mov dword [0x131c8f3c], 0x365e
jmp 0x12fbfb2c
mov dword [0x131c8f38], 0xe
mov dword [0x131c8f3c], 0x3665
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov dword [esp + 0x10], 1
push esi
call fcn.12f5bf80
push ebx
call fcn.12f5bf80
mov eax, dword [esp + 0x2c]
add esp, 8
cmp eax, ebp
je 0x12fbfcf5
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x12fbfcf5
mov al, byte [esp + 0x4d0]
mov dword [esp + 0x34], 1
test al, 1
je 0x12fbfb93
lea edx, [esp + 0x44]
lea eax, [esp + 0x50]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x40]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [esp + 0x4d4]
test eax, eax
je 0x12fbfcf5
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
jmp 0x12fbfcf5
mov dword [0x131c8f38], 3
mov dword [0x131c8f3c], 0x3540
call ebp
pop edi
pop esi
mov dword [0x131c8f40], eax
mov eax, dword [esp + 0x2c]
pop ebp
pop ebx
add esp, 0x4b4
ret
mov dword [0x131c8f38], 0x23
mov dword [0x131c8f3c], 0x3551
call ebp
mov dword [0x131c8f40], eax
jmp 0x12fbfd06
mov dword [0x131c8f38], 0x1c
mov dword [0x131c8f3c], 0x3559
call ebp
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x4b4
ret
mov dword [0x131c8f38], 0x21
mov dword [0x131c8f3c], 0x3563
call ebp
jmp 0x12fbfcf0
mov dword [0x131c8f38], 4
mov dword [0x131c8f3c], 0x3589
jmp 0x12fbfcea
mov dword [0x131c8f38], 0xc
mov dword [0x131c8f3c], 0x359b
jmp 0x12fbfcea
mov dword [0x131c8f38], 0xb
mov dword [0x131c8f3c], 0x35a7
jmp 0x12fbfcea
mov dword [0x131c8f38], 0x1b
mov dword [0x131c8f3c], 0x35ae
jmp 0x12fbfcea
test byte [esp + 0x4d0], 1
je 0x12fbfcba
lea ecx, [esp + 0x44]
lea edx, [esp + 0x50]
push ecx
lea eax, [esp + 0x40]
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [esp + 0x4d4]
test eax, eax
je 0x12fbfccc
push ebp
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov dword [esp + 0x34], 1
jmp 0x12fbfcf5
mov dword [0x131c8f38], 0xc
mov dword [0x131c8f3c], 0x3629
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c8f40], eax
mov eax, dword [esp + 0x38]
test eax, eax
je 0x12fbfd06
push eax
call fcn.12f5bf80
add esp, 4
mov ecx, dword [esp + 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x12fbfd1f
push eax
call esi
mov eax, dword [esp + 0x34]
test eax, eax
je 0x12fbfd53
test byte [esp + 0x4d0], 2
je 0x12fbfd69
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x4cc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4b4
ret
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x12fbfd69
mov ecx, dword [esp + 0x4cc]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4b4
ret
mov dword [0x131c8f38], 1
mov dword [0x131c8f3c], 0x3510
call ebp
pop edi
pop esi
mov dword [0x131c8f40], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x4b4
ret