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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x464
mov eax, dword [0x43a004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov ebx, edx
mov dword [ebp - 0x420], eax
push edi
lea edx, [ebp - 0x418]
mov dword [ebp - 0x42c], ebx
mov esi, ecx
call fcn.004119c0
lea edx, [ebp - 0x210]
mov ecx, ebx
call fcn.004119c0
push dword [ebp - 0x418]
call fcn.004216bb
push dword [ebp - 0x210]
mov word [ebp - 0x418], ax
call fcn.004216bb
add esp, 8
mov word [ebp - 0x210], ax
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4173db
push esi
push 0x140
push 0x44a060
call fcn.0041cd80
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x448]
push eax
lea eax, [ebp - 0x450]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call esi
push ebx
mov dword [ebp - 0x428], eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x4174ed
test al, 0x10
jne 0x4174ed
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test byte [ebp + 8], 0x20
je 0x4174e6
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x41c], eax
cmp eax, 0xffffffff
jne 0x417480
push ebx
push 0x140
push 0x44a060
call fcn.0041cd80
add esp, 0xc
push edi
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x440]
push ecx
lea ecx, [ebp - 0x458]
push ecx
lea ecx, [ebp - 0x460]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov eax, dword [ebp - 0x434]
cmp eax, dword [ebp - 0x43c]
ja 0x4174de
jne 0x4174ba
mov eax, dword [ebp - 0x438]
cmp eax, dword [ebp - 0x440]
ja 0x4174de
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push dword [ebp - 0x41c]
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x41c]
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp + 8]
mov eax, ecx
and eax, 1
mov dword [ebp - 0x41c], eax
test cl, 2
je 0x417538
xor eax, 1
push ebx
add eax, 0x2df
push eax
push 0x44a060
call fcn.0041cd80
add esp, 0xc
xor ecx, ecx
call fcn.004125b0
test eax, eax
jne 0x417538
push edi
call esi
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x41c], 0
mov ecx, 0x2db
mov eax, 0x2e1
push ebx
cmove eax, ecx
push eax
push 0x44a060
call fcn.0041cd80
add esp, 0xc
lea ecx, [ebp - 0x210]
lea eax, [ebp - 0x418]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41758d
test dx, dx
je 0x417589
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41758d
add eax, 4
add ecx, 4
test dx, dx
jne 0x417567
xor eax, eax
jmp 0x417592
sbb eax, eax
or eax, 1
push 0
test eax, eax
jne 0x4175ec
mov dword [ebp - 0x41c], eax
mov edx, 0x165
lea eax, [ebp - 0x41c]
push eax
push ecx
call fcn.0041d0b0
mov ecx, dword [ebp - 0x41c]
test ecx, ecx
je 0x4175ca
test eax, eax
je 0x4175ca
push eax
push ecx
push 1
call fcn.0041ce60
add esp, 0xc
push edi
call esi
mov eax, dword [ebp - 0x420]
mov dword [eax], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
push 0
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x417661
push edi
call esi
push 0
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x41c], 0
push eax
push ecx
mov edx, 0x165
call fcn.0041d0b0
mov ecx, dword [ebp - 0x41c]
test ecx, ecx
je 0x417642
test eax, eax
je 0x417642
push eax
push ecx
push 1
call fcn.0041ce60
add esp, 0xc
mov eax, dword [ebp - 0x420]
mov dword [eax], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
push 4
push 0x1000
push 0x4000
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x4176d2
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push edi
call esi
push 0
lea eax, [ebp - 0x420]
mov dword [ebp - 0x420], 0
push eax
push ecx
mov edx, 0x6d
call fcn.0041d0b0
mov ecx, dword [ebp - 0x420]
test ecx, ecx
je 0x4176bf
test eax, eax
je 0x4176bf
push eax
push ecx
push 1
call fcn.0041ce60
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x428]
push dword [ebp - 0x42c]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x448]
push eax
lea eax, [ebp - 0x450]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push 0
lea eax, [ebp - 0x424]
push eax
push 0x4000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x424]
test eax, eax
je 0x417796
push 0
lea ecx, [ebp - 0x430]
push ecx
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x430]
cmp eax, dword [ebp - 0x424]
jne 0x417750
cmp dword [0x43bbe4], 0
je 0x417700
nop dword [eax]
mov edx, 0x142
mov ecx, 0x44a060
call fcn.0041cc00
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push edi
call esi
mov dword [0x43bbd4], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push edi
call esi
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041d22b
mov esp, ebp
pop ebp
ret