Function at 0x12fd6ec0
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:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x13071be6
push eax
mov dword fs:[0], esp
sub esp, 0x530
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
xor ebx, ebx
push edi
mov dword [0x131c97c0], ebx
call ebp
mov esi, dword [esp + 0x550]
mov dword [0x131c97c8], eax
cmp esi, ebx
je 0x12fd7aa4
cmp word [esi], bx
je 0x12fd7aa4
mov eax, dword [esp + 0x554]
cmp eax, ebx
je 0x12fd7aa4
cmp word [eax], bx
je 0x12fd7aa4
cmp dword [0x131c97cc], ebx
jne 0x12fd6f45
mov dword [0x131c97c0], 2
mov dword [0x131c97c4], 0x2771
jmp 0x12fd7ab8
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
test al, 0x10
mov dword [esp + 0xac], eax
je 0x12fd6f72
mov dword [0x131c97c0], 0x1d
mov dword [0x131c97c4], 0x2779
jmp 0x12fd7ab8
mov eax, dword [esp + 0x554]
push eax
call edi
cmp eax, 0xffffffff
mov dword [esp + 0x48], eax
je 0x12fd6fa2
test al, 0x10
je 0x12fd6fa2
mov dword [0x131c97c0], 0x1e
mov dword [0x131c97c4], 0x2783
jmp 0x12fd7ab8
mov ecx, dword [esp + 0x554]
or edi, 0xffffffff
push ecx
lea ecx, [esp + 0x28]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x84], ebx
call fcn.12feda20
mov edx, dword [esp + 0x564]
push ebx
push 0x80
push 3
push ebx
push edx
push SysReAllocStringLen
push esi
mov dword [esp + 0x564], ebx
call fcn.12fee920
mov esi, eax
add esp, 0x1c
cmp esi, edi
mov dword [esp + 0x14], esi
je 0x12fd77c0
lea eax, [esp + 0xa4]
lea ecx, [esp + 0x94]
push eax
lea edx, [esp + 0xa0]
push ecx
push edx
push esi
mov dword [esp + 0xac], ebx
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xb4], ebx
mov dword [esp + 0xb8], ebx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0xe9]
mov byte [esp + 0xe8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0xe8]
push eax
push esi
call fcn.12fda0c0
add esp, 8
test eax, eax
je 0x12fd77f0
lea ecx, [esp + 0xe8]
test ecx, ecx
je 0x12fd7810
push 0x10
lea edx, [esp + 0xec]
push 0x13182cc0
push edx
call fcn.12f5e6c0
add esp, 0xc
test eax, eax
jne 0x12fd7810
test byte [esp + 0x11a], 1
je 0x12fd7810
mov edx, dword [esp + 0x108]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x40]
push ebx
push ecx
push ebx
push edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x50], ebx
call fcn.12fc2eb0
mov eax, dword [esp + 0x34]
add esp, 0x14
cmp eax, ebx
jne 0x12fd7830
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x179]
mov byte [esp + 0x178], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x13
xor eax, eax
lea edi, [esp + 0x12c]
mov dword [esp + 0x128], ebx
rep stosd dword es:[edi], eax
mov ecx, 0xd
lea edi, [esp + 0xb4]
mov dword [esp + 0xb0], ebx
mov dword [esp + 0x58], ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x128]
lea ecx, [esp + 0xe8]
push eax
push ecx
push esi
call fcn.12fda300
add esp, 0xc
test eax, eax
je 0x12fd7850
mov ecx, 0xe1
xor eax, eax
lea edi, [esp + 0x1b9]
mov byte [esp + 0x1b8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x1b8]
push edx
push esi
stosb byte es:[edi], al
call fcn.12fd43c0
add esp, 8
test eax, eax
je 0x12fd7870
lea eax, [esp + 0xb0]
lea ecx, [esp + 0x128]
push eax
lea edx, [esp + 0xec]
push ecx
push edx
push esi
call fcn.12fda580
add esp, 0x10
test eax, eax
je 0x12fd7890
cmp word [esp + 0xba], bx
jne 0x12fd78ad
lea ecx, [esp + 0x1c]
call fcn.12f92480
lea eax, [esp + 0x70]
lea ecx, [esp + 0x84]
push eax
lea edx, [esp + 0x20]
push ecx
lea eax, [esp + 0x130]
push edx
lea ecx, [esp + 0xf4]
push eax
push ecx
push esi
mov byte [esp + 0x560], 1
mov dword [esp + 0x9c], ebx
mov dword [esp + 0x88], ebx
call fcn.12fda7d0
add esp, 0x18
test eax, eax
je 0x12fd78ca
mov edx, dword [esp + 0x84]
xor ecx, ecx
mov di, word [edx + 0xc]
cmp di, bx
jbe 0x12fd7257
mov edx, dword [esp + 0x70]
mov eax, ecx
and eax, 0xffff
lea eax, [eax + eax*4]
test byte [edx + eax*8 + 8], 1
lea eax, [edx + eax*8]
je 0x12fd7251
mov eax, dword [eax]
cmp eax, 1
jb 0x12fd78e0
cmp eax, 4
ja 0x12fd78e0
inc ecx
cmp cx, di
jb 0x12fd7229
lea ecx, [esp + 0x58]
lea edx, [esp + 0x178]
push ecx
push 0x40
lea eax, [esp + 0x80]
push edx
lea ecx, [esp + 0x134]
push eax
push ecx
mov dword [esp + 0x8c], ebx
call fcn.12fd85e0
add esp, 0x14
test eax, eax
je 0x12fd78f6
mov edx, dword [esp + 0x78]
push edx
call fcn.12ff0730
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x90], ebx
je 0x12fd793b
lea ecx, [esp + 0x1c]
mov byte [esp + 0x548], 0
call fcn.12f925e0
mov eax, dword [esp + 0x554]
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
push eax
call fcn.12fee920
mov edi, eax
or esi, 0xffffffff
add esp, 0x1c
cmp edi, esi
mov dword [esp + 0x30], edi
je 0x12fd796c
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0xc0]
xor ecx, ecx
cmp eax, esi
mov eax, dword [esp + 0xc4]
push eax
push edx
sete cl
push edi
mov dword [esp + 0x5c], ecx
call fcn.12fee8e0
add esp, 0xc
test eax, eax
je 0x12fd7990
mov eax, dword [esp + 0x14c]
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
mov ebp, 1
push eax
push ecx
mov dword [esp + 0x60], ebp
call esi
push 0
push 0
push 0
push edi
call esi
mov eax, dword [esp + 0xd8]
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], ecx
jne 0x12fd7368
mov esi, ebp
xor ebx, ebx
jmp 0x12fd7737
mov edi, dword [esp + 0xdc]
cmp eax, ebp
jne 0x12fd737a
mov edi, dword [esp + 0xe0]
mov edx, dword [ebx]
push edi
mov ecx, ebx
call dword [edx + 0xc]
mov esi, dword [0x13182cbc]
mov ecx, eax
mov eax, esi
xor edx, edx
div edi
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x3c], esi
mov ebx, eax
mov eax, dword [esp + 0xd8]
imul ebx, ecx
cmp eax, ebp
mov dword [esp + 0x48], ebx
je 0x12fd73b6
mov eax, esi
xor edx, edx
div edi
test edx, edx
je 0x12fd73c2
mov esi, edi
mov ebx, ecx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x48], ebx
push esi
call fcn.12f5c05b
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x44], ebp
je 0x12fd79b4
push ebx
call fcn.12f5c05b
add esp, 4
mov dword [esp + 0x34], eax
test eax, eax
je 0x12fd79ca
mov eax, esi
xor edx, edx
xor ebp, ebp
div edi
mov dword [esp + 0x54], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x8c], eax
mov edi, dword [esp + 0x44]
mov ecx, esi
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 edi, dword [esp + 0x34]
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 edi, dword [esp + 0x8c]
mov eax, dword [esp + 0xd8]
lea ecx, [edi + ebp]
cmp ecx, eax
jb 0x12fd7466
mov edi, eax
mov eax, dword [esp + 0xe0]
sub edi, ebp
mov dword [esp + 0x20], 1
lea esi, [edi - 1]
imul esi, dword [esp + 0xdc]
add esi, eax
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x74]
push 0
push edx
push esi
push eax
push ecx
mov dword [esp + 0x88], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x12fd76a6
cmp esi, dword [esp + 0x74]
jne 0x12fd76bc
mov ebx, dword [esp + 0x44]
mov ebp, dword [esp + 0x34]
mov dword [esp + 0x5c], edi
xor edi, edi
mov dword [esp + 0x7c], edi
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0xd8]
mov ecx, dword [esp + 0xdc]
inc eax
cmp eax, edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x60], ecx
jne 0x12fd74d7
mov ecx, dword [esp + 0xe0]
mov dword [esp + 0x60], ecx
mov edx, dword [esp + 0xd4]
xor eax, eax
cmp eax, edx
mov dword [esp + 0x10], edi
ja 0x12fd756e
jb 0x12fd74fd
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0xd0]
cmp edx, eax
jae 0x12fd756e
lea eax, [esp + 0x88]
lea edx, [esp + 0x64]
push eax
mov eax, dword [esp + 0xbc]
push edx
push ecx
push ebx
push eax
mov dword [esp + 0x78], edi
mov dword [esp + 0x9c], edi
call fcn.12fdd390
add esp, 0x14
test eax, eax
je 0x12fd767a
lea eax, [esp + 0x10]
mov ecx, dword [esp + 0x90]
push eax
mov eax, dword [esp + 0x70]
push eax
mov eax, dword [esp + 0x90]
push ebp
mov edx, dword [ecx]
push eax
mov eax, dword [esp + 0x74]
push eax
mov eax, dword [esp + 0x6c]
push eax
lea eax, [esp + 0x190]
push eax
call dword [edx + 0x14]
cmp eax, edi
je 0x12fd7690
mov ecx, dword [esp + 0x10]
jmp 0x12fd75ca
mov ecx, dword [esp + 0xe4]
mov eax, dword [esp + 0x6c]
cmp ecx, eax
mov dword [esp + 0x10], ecx
jbe 0x12fd7587
mov ecx, eax
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0xb8]
and eax, 0xffff
sub eax, edi
je 0x12fd75b2
dec eax
je 0x12fd75a2
dec eax
jne 0x12fd75ca
lea esi, [ebx + 8]
jmp 0x12fd75b4
mov eax, ecx
lea esi, [ebx + 4]
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
jmp 0x12fd75bf
mov esi, ebx
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
xor edi, edi
mov eax, dword [esp + 0xd8]
mov edx, dword [esp + 0x40]
cmp edx, eax
jne 0x12fd760a
mov eax, dword [esp + 0xc4]
mov ecx, dword [esp + 0xc0]
cmp eax, edi
ja 0x12fd75f3
cmp ecx, 0x1000
jbe 0x12fd7606
and ecx, 0xfff
xor eax, eax
mov edx, ecx
or edx, eax
jne 0x12fd7606
mov ecx, 0x1000
mov dword [esp + 0x10], ecx
mov esi, dword [esp + 0x7c]
mov eax, dword [esp + 0x5c]
add esi, ecx
dec eax
mov dword [esp + 0x7c], esi
mov dword [esp + 0x5c], eax
je 0x12fd762c
mov edx, dword [esp + 0x60]
add ebx, edx
add ebp, ecx
jmp 0x12fd74ad
mov ebx, dword [esp + 0x54]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x68]
push edi
push eax
push esi
add ebx, esi
push ecx
push edx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x7c], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x12fd76d2
cmp dword [esp + 0x68], esi
jb 0x12fd76e8
cmp dword [esp + 0x20], edi
jne 0x12fd770f
mov ebp, dword [esp + 0x40]
mov ebx, dword [esp + 0x48]
mov esi, dword [esp + 0x3c]
jmp 0x12fd7405
mov dword [0x131c97c0], 0x1c
mov dword [0x131c97c4], 0x289a
jmp 0x12fd76fc
mov dword [0x131c97c0], 0x12
mov dword [0x131c97c4], 0x28a3
jmp 0x12fd76fc
mov dword [0x131c97c0], 0xd
mov dword [0x131c97c4], 0x2874
jmp 0x12fd76fc
mov dword [0x131c97c0], 0xd
mov dword [0x131c97c4], 0x287c
jmp 0x12fd76fc
mov dword [0x131c97c0], 0xe
mov dword [0x131c97c4], 0x28cd
jmp 0x12fd76fc
mov dword [0x131c97c0], 0xe
mov dword [0x131c97c4], 0x28d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c97c8], eax
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x44]
push eax
call fcn.12f5c050
mov ecx, dword [esp + 0x38]
push ecx
call fcn.12f5c050
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x38]
add esp, 8
mov ebp, 1
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test esi, esi
je 0x12fd77a6
test ebx, ebx
jne 0x12fd77a6
mov bl, byte [esp + 0x558]
test bl, 4
je 0x12fd776c
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x80]
lea eax, [esp + 0x38]
push edx
push eax
push ecx
call fcn.12fee110
add esp, 0xc
test bl, 1
mov dword [esp + 0x4c], ebp
je 0x12fd7794
lea edx, [esp + 0xa4]
lea eax, [esp + 0x94]
push edx
lea ecx, [esp + 0xa0]
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [esp + 0x55c]
test eax, eax
je 0x12fd77a6
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
mov dword [esp + 0x30], eax
mov dword [esp + 0x548], eax
jmp 0x12fd79fd
mov dword [0x131c97c0], 3
mov dword [0x131c97c4], 0x27a1
call ebp
lea ecx, [esp + 0x24]
mov dword [0x131c97c8], eax
mov dword [esp + 0x548], edi
call fcn.12fedac0
jmp 0x12fd7a21
mov dword [0x131c97c0], 0xf
mov dword [0x131c97c4], 0x27ae
call ebp
mov dword [0x131c97c8], eax
jmp 0x12fd7922
mov dword [0x131c97c0], 0x22
mov dword [0x131c97c4], 0x27b5
call ebp
mov dword [0x131c97c8], eax
jmp 0x12fd7922
mov dword [0x131c97c0], 0x31
mov dword [0x131c97c4], 0x27bc
call ebp
mov dword [0x131c97c8], eax
jmp 0x12fd7922
mov dword [0x131c97c0], 0x14
mov dword [0x131c97c4], 0x27cc
call ebp
mov dword [0x131c97c8], eax
jmp 0x12fd7922
mov dword [0x131c97c0], 0x1f
mov dword [0x131c97c4], 0x27d4
call ebp
mov dword [0x131c97c8], eax
jmp 0x12fd7922
mov dword [0x131c97c0], 0x14
mov dword [0x131c97c4], 0x27da
call ebp
mov dword [0x131c97c8], eax
jmp 0x12fd7922
mov dword [0x131c97c0], 1
mov dword [0x131c97c4], 0x27e1
call ebp
mov dword [0x131c97c8], eax
jmp 0x12fd7922
mov dword [0x131c97c0], 0x14
mov dword [0x131c97c4], 0x27eb
jmp 0x12fd790a
mov dword [0x131c97c0], 0x32
mov dword [0x131c97c4], 0x27f1
jmp 0x12fd790a
mov dword [0x131c97c0], 0xb
mov dword [0x131c97c4], 0x2801
call ebp
lea ecx, [esp + 0x1c]
mov dword [0x131c97c8], eax
mov byte [esp + 0x548], 0
call fcn.12f925e0
lea ecx, [esp + 0x24]
mov dword [esp + 0x548], 0xffffffff
call fcn.12fedac0
jmp 0x12fd7a0c
mov dword [0x131c97c0], 0xc
mov dword [0x131c97c4], 0x280a
call ebp
lea ecx, [esp + 0x1c]
mov dword [0x131c97c8], eax
mov byte [esp + 0x548], 0
call fcn.12f925e0
jmp 0x12fd79f2
mov dword [0x131c97c0], 4
mov dword [0x131c97c4], 0x2820
call ebp
mov dword [0x131c97c8], eax
mov dword [esp + 0x548], esi
jmp 0x12fd79fd
mov dword [0x131c97c0], 0x25
mov dword [0x131c97c4], 0x282d
call ebp
mov dword [0x131c97c8], eax
mov dword [esp + 0x548], esi
jmp 0x12fd79fd
mov dword [0x131c97c0], 0x21
mov dword [0x131c97c4], 0x2851
jmp 0x12fd79e7
push ebp
call fcn.12f5c050
add esp, 4
mov dword [0x131c97c0], 0x21
mov dword [0x131c97c4], 0x285b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x131c97c8], eax
mov dword [esp + 0x548], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.12fedac0
mov esi, dword [esp + 0x14]
xor ebx, ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [esp + 0x30]
cmp eax, 0xffffffff
je 0x12fd7a21
push eax
call esi
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x4c]
cmp eax, ebx
je 0x12fd7a5b
cmp esi, ebx
je 0x12fd7a4e
mov edx, dword [esp + 0x80]
push edx
push eax
mov eax, dword [esp + 0x55c]
push eax
call fcn.12fee390
mov eax, dword [esp + 0x44]
add esp, 0xc
push eax
call fcn.12f5c050
add esp, 4
mov dword [esp + 0x38], ebx
cmp esi, ebx
je 0x12fd7a83
test byte [esp + 0x558], 2
je 0x12fd7aa0
mov ecx, dword [esp + 0xac]
mov edx, dword [esp + 0x554]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, esi
jmp 0x12fd7ac1
cmp dword [esp + 0x50], ebx
je 0x12fd7aa0
cmp dword [esp + 0x560], ebx
jne 0x12fd7aa0
mov eax, dword [esp + 0x554]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
jmp 0x12fd7ac1
mov dword [0x131c97c0], 1
mov dword [0x131c97c4], 0x276b
call ebp
mov dword [0x131c97c8], eax
xor eax, eax
mov ecx, dword [esp + 0x540]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x53c
ret