Function at 0x42f68a
Capabilities:
Check if file exists
Clear file content
Get file attributes
Write file on windows

Disassembly:
push 0x28
mov eax, 0x4a8b53
call fcn.00490adb
mov esi, dword [ebp + 8]
lea edi, [esi + 4]
push edi
mov dword [ebp - 0x18], edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x42f6bc
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x42f6bc
xor eax, eax
jmp 0x42f894
mov eax, dword [0x4f4a0c]
and dword [ebp - 0x1c], 0
mov ecx, 0x4f4a0c
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
and dword [ebp - 4], 0
mov eax, dword [esi + 0x224]
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x20c]
mov dword [ebp - 0x2c], eax
mov ebx, 0x4c460c
mov eax, dword [esi + 0x224]
mov dword [ebp - 0x30], eax
mov eax, dword [esi + 0x20c]
lea edi, [ebp - 0x34]
lea esi, [ebp - 0x2c]
mov dword [ebp - 0x34], eax
call fcn.0042fae3
test al, al
jne 0x42f7d7
push 1
push 0x4c47e8
lea eax, [ebp - 0x14]
call fcn.00405cb7
call fcn.00423239
push dword [eax]
lea eax, [ebp - 0x14]
push eax
call fcn.00405c9d
push 3
push 0x4cd5e8
lea eax, [ebp - 0x14]
call fcn.00405cb7
call fcn.00423239
mov edi, dword [eax + 4]
mov eax, dword [edi + 0x18]
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
mov eax, dword [edi]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
mov esi, dword [edi + 0x18]
mov eax, dword [edi]
je 0x42f768
cmp dword [ebp - 0x24], eax
je 0x42f76d
call fcn.0048a37f
cmp dword [ebp - 0x20], esi
je 0x42f7bc
lea esi, [ebp - 0x24]
call fcn.00423239
push dword [eax]
lea eax, [ebp - 0x14]
push eax
call fcn.00405c9d
push 1
push 0x4c921c
lea eax, [ebp - 0x14]
call fcn.00405cb7
call fcn.00423239
add eax, 4
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
lea eax, [ebp - 0x14]
call fcn.00405cb7
push 2
push ebx
lea eax, [ebp - 0x14]
call fcn.00405cb7
call fcn.0041105f
jmp 0x42f758
push 2
push ebx
lea eax, [ebp - 0x14]
call fcn.00405cb7
lea esi, [ebp - 0x2c]
call fcn.0041105f
mov esi, dword [ebp + 8]
jmp 0x42f6f0
push 0
push 0x20
push 4
push 0
push 1
push 0x40000000
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x42f886
mov ecx, dword [ebp - 0x14]
mov esi, dword [ecx - 0xc]
add esi, esi
jne 0x42f80e
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x42f87d
add esi, 2
lea eax, [esi + 2]
push eax
call fcn.00487d50
mov ebx, eax
xor eax, eax
lea edi, [ebx + esi]
pop ecx
stosw word es:[edi], ax
test ebx, ebx
je 0x42f87d
mov eax, 0xfeff
mov word [ebx], ax
mov eax, dword [ebp - 0x14]
mov ecx, ebx
sub ecx, eax
lea edx, [ecx + 2]
movzx ecx, word [eax]
mov word [edx + eax], cx
inc eax
inc eax
test cx, cx
jne 0x42f83a
and dword [ebp - 0x18], 0
push 0
lea eax, [ebp - 0x18]
push eax
push esi
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x42f876
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp dword [ebp - 0x18], esi
jne 0x42f876
mov dword [ebp - 0x1c], 1
push ebx
call fcn.00489298
pop ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.00404bfa
mov eax, dword [ebp - 0x1c]
call fcn.00490bb3
ret