Function at 0x40e220
Capabilities:
Check if file exists
Delete file
Get file attributes
Get file size
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 0x4fcc7b
push eax
mov dword fs:[0], esp
sub esp, 0xb98
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push ebx
call fcn.00408fa0
mov esi, dword [esp + 0xbbc]
add esp, 4
cmp esi, ebx
je 0x40eaad
cmp word [esi], bx
je 0x40eaad
mov ebp, dword [esp + 0xbbc]
cmp ebp, ebx
je 0x40eaad
cmp word [ebp], bx
je 0x40eaad
cmp dword [0x5443c4], ebx
jne 0x40e28f
push 0x2b0a
push 2
jmp 0x40eab4
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
test al, 0x10
mov dword [esp + 0x54], eax
je 0x40e2ac
push 0x2b12
push 0x1d
jmp 0x40eab4
push ebp
call edi
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x40e2c8
test al, 0x10
je 0x40e2c8
push 0x2b1c
push 0x1e
jmp 0x40eab4
push ebx
push 0x80
push 3
push ebx
push 5
xor edi, edi
push SysReAllocStringLen
push esi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x50], ebx
call fcn.0040e010
add esp, 0x1c
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
je 0x40e9ec
mov eax, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x40e30f
test al, 1
je 0x40e30f
and al, 0xfe
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
push ebp
call fcn.0040e010
mov ebp, eax
add esp, 0x1c
cmp ebp, 0xffffffff
je 0x40ea02
mov edi, dword [esp + 0x10]
xor eax, eax
cmp edi, 0xffffffff
mov ecx, 0xf7
sete al
mov dword [esp + 0x34], eax
xor eax, eax
lea edi, [esp + 0x441]
mov byte [esp + 0x440], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x440]
push ecx
stosb byte es:[edi], al
call fcn.0040d890
add esp, 4
test eax, eax
je 0x40ea0b
mov ecx, 0xe1
xor eax, eax
lea edi, [esp + 0xb9]
mov byte [esp + 0xb8], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0xbc0]
mov esi, 1
cmp eax, ebx
jne 0x40e430
cmp dword [esp + 0x10], 0xffffffff
je 0x40e430
mov ecx, 0xe1
xor eax, eax
lea edi, [esp + 0x821]
mov byte [esp + 0x820], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x820]
push edx
push ebp
stosb byte es:[edi], al
call fcn.0040d3a0
add esp, 8
test eax, eax
je 0x40e430
mov eax, dword [esp + 0x820]
mov ecx, dword [esp + 0x824]
mov edx, dword [esp + 0x828]
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0x82c]
mov dword [esp + 0xbc], ecx
mov ecx, 0x66
lea esi, [esp + 0x868]
lea edi, [esp + 0x100]
mov dword [esp + 0xc0], edx
mov dword [esp + 0xc4], eax
mov dword [esp + 0x28], ebx
rep movsd dword es:[edi], dword [esi]
mov esi, ebx
lea ecx, [esp + 0xb8]
push esi
push ecx
call fcn.0040d940
add esp, 8
test eax, eax
je 0x40ea14
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x79]
mov byte [esp + 0x78], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea edx, [esp + 0x48]
lea eax, [esp + 0x4c]
push edx
lea ecx, [esp + 0x28]
push eax
mov eax, dword [esp + 0x2b4]
push ecx
mov ecx, dword [esp + 0x2b0]
lea edx, [esp + 0x84]
push 0x40
push edx
mov edx, dword [esp + 0xec]
push eax
push ecx
push edx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x44], ebx
call fcn.00413cf0
add esp, 0x20
cmp eax, ebx
mov dword [esp + 0x28], eax
je 0x40ea1d
push eax
call fcn.00408aa0
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [esp + 0x1c], edi
je 0x40ea26
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x64]
push eax
lea edx, [esp + 0x5c]
push ecx
push edx
push esi
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x2c]
mov esi, eax
push ecx
push esi
push ebp
call fcn.0040c330
add esp, 0xc
test eax, eax
je 0x40ea2f
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x34], 1
cmp eax, ebx
je 0x40e543
mov eax, dword [esp + 0x464]
or al, 8
mov dword [esp + 0x464], eax
cmp dword [esp + 0x48], ebx
je 0x40e559
mov eax, dword [esp + 0x464]
or al, 0x10
mov dword [esp + 0x464], eax
mov edx, dword [esp + 0x20]
push edx
call fcn.00413f90
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0xcc], eax
mov eax, dword [esp + 0x30]
lea edx, [esp + 0xe4]
mov dword [esp + 0xd8], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0xe0], ecx
push edx
lea ecx, [esp + 0x80]
push eax
push ecx
mov dword [esp + 0xdc], ebx
mov dword [esp + 0xe0], esi
call fcn.004170f0
mov edx, dword [esp + 0x30]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 0x10
mov dword [esp + 0xf0], 0x3e0
mov dword [esp + 0xf4], ebx
mov dword [esp + 0xf8], ebx
push ebx
push ebx
push ebx
push edx
mov dword [esp + 0x10c], ebx
mov dword [esp + 0x440], ebx
mov dword [esp + 0x444], ebx
mov dword [esp + 0x448], ebx
mov dword [esp + 0x44c], ebx
call esi
push ebx
push ebx
push ebx
push ebp
call esi
lea eax, [esp + 0x440]
push 0x3e0
push eax
push ebp
call fcn.0040db80
add esp, 0xc
test eax, eax
je 0x40ea38
mov eax, dword [esp + 0xd0]
mov dword [esp + 0x30], ebx
cmp eax, ebx
mov dword [esp + 0x14], ebx
jne 0x40e648
cmp dword [esp + 0xd4], ebx
jne 0x40e648
mov dword [esp + 0x30], 1
mov dword [esp + 0x14], ebx
jmp 0x40e87d
push 0x10000
call fcn.004da41d
mov edx, dword [edi]
add esp, 4
mov ecx, edi
mov esi, eax
push 0x10000
call dword [edx + 8]
add eax, 4
push eax
mov dword [esp + 0x44], eax
call fcn.004da41d
add esp, 4
mov dword [esp + 0x60], eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xf0]
push ebx
push ebx
push eax
push ebp
mov dword [esp + 0x48], ebx
mov dword [esp + 0x84], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, 0x4000
xor eax, eax
mov edi, esi
push ebx
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x44]
mov edi, dword [esp + 0x1c]
mov edx, ecx
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 + 0x24]
lea eax, [esp + 0x40]
push eax
push 0x10000
push esi
push ecx
mov dword [esp + 0x50], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40e7a7
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x40e7b3
lea edx, [esp + 0x74]
lea ecx, [esp + 0x38]
push edx
lea edx, [esp + 0x14]
push ecx
push edx
lea ecx, [esp + 0x4c]
lea edx, [esp + 0x24]
push ecx
push edx
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x3c]
push esi
lea ecx, [esp + 0x94]
push eax
push ecx
push edx
mov dword [esp + 0x38], ebx
call fcn.0040e080
add esp, 0x28
cmp eax, ebx
jne 0x40e7c0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
add ecx, 4
push eax
push ecx
call fcn.004170d0
mov edx, dword [esp + 0x20]
add esp, 8
mov dword [edx], eax
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x44]
push ebx
add ecx, 4
push eax
push ecx
push edx
push ebp
mov dword [esp + 0x58], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40e82c
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x44]
add eax, 4
cmp ecx, eax
jb 0x40e833
cmp dword [esp + 0xf4], ebx
jne 0x40e78c
mov dword [esp + 0xf8], eax
mov ecx, dword [esp + 0xf4]
mov dword [esp + 0xfc], eax
inc ecx
mov dword [esp + 0xf4], ecx
jmp 0x40e697
push 0x2be2
push 0xd
jmp 0x40e83a
mov dword [esp + 0x30], 1
jmp 0x40e84a
jge 0x40e823
push 0x5441d0
lea ecx, [esp + 0x20]
call fcn.0043b820
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
push 0x2bf5
push ecx
mov ecx, dword [esp + 0xbc0]
push edx
push eax
push ecx
lea edx, [esp + 0x30]
push str.Error:_Encrypt_Data_Failed__File_s__Algrithm_d__DataLen_lu_KeyLen_lu__LINE_d
push edx
mov dword [esp + 0xbcc], ebx
call fcn.0043f0a0
mov eax, dword [esp + 0x38]
push eax
call fcn.00414ff0
add esp, 0x20
lea ecx, [esp + 0x1c]
mov dword [esp + 0xbb0], 0xffffffff
call fcn.0043c090
push 0x2bf9
push 0x11
jmp 0x40e83a
push 0x2c03
jmp 0x40e838
push 0x2c0a
push 0xe
call fcn.00408f80
add esp, 8
mov dword [esp + 0x14], 1
cmp esi, ebx
je 0x40e857
push esi
call fcn.004da446
add esp, 4
mov eax, dword [esp + 0x60]
cmp eax, ebx
je 0x40e868
push eax
call fcn.004da446
add esp, 4
mov eax, dword [esp + 0x38]
cmp eax, ebx
je 0x40e87d
push eax
call fcn.004da446
add esp, 4
mov dword [esp + 0x38], ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp dword [esp + 0x30], ebx
je 0x40ea57
cmp dword [esp + 0x14], ebx
jne 0x40ea57
mov esi, dword [esp + 0xbc4]
cmp esi, ebx
je 0x40e975
mov eax, dword [esp + 0xf4]
cmp eax, ebx
jne 0x40e8c6
mov dword [esp + 0x430], 0x3e0
mov dword [esp + 0x434], ebx
jmp 0x40e8f9
mov ecx, dword [esp + 0xf8]
push ebx
dec eax
push ecx
push ebx
push eax
call fcn.004242d0
mov ecx, dword [esp + 0xfc]
xor edi, edi
add eax, ecx
adc edx, edi
add eax, 0x3e0
adc edx, ebx
mov dword [esp + 0x430], eax
mov dword [esp + 0x434], edx
mov eax, dword [esp + 0x460]
lea edx, [esp + 0xb8]
push esi
push edx
push eax
push ebp
call fcn.0040a500
add esp, 0x10
test eax, eax
je 0x40e966
mov eax, dword [esp + 0x464]
push esi
or al, 4
mov dword [esp + 0x468], eax
call fcn.004171b0
add esp, 4
test eax, eax
jne 0x40e944
mov eax, dword [esp + 0x464]
or al, 1
mov dword [esp + 0x464], eax
add esi, 0x10
push esi
call fcn.004171b0
add esp, 4
test eax, eax
jne 0x40e975
mov eax, dword [esp + 0x464]
or al, 2
mov dword [esp + 0x464], eax
jmp 0x40e975
push 0x2c4b
push 0x10
call fcn.00408f80
add esp, 8
lea ecx, [esp + 0xb8]
lea edx, [esp + 0x440]
push ecx
push edx
call fcn.0040d720
add esp, 8
test eax, eax
je 0x40ea3f
push ebx
push ebx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x440]
push 0x3e0
push eax
push ebp
call fcn.0040db80
add esp, 0xc
test eax, eax
je 0x40ea48
mov al, byte [esp + 0xbc8]
mov dword [esp + 0x50], 1
test al, 1
je 0x40ea57
lea ecx, [esp + 0x6c]
lea edx, [esp + 0x64]
push ecx
lea eax, [esp + 0x5c]
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x40ea57
push 0x2b34
push 3
call fcn.00408f80
add esp, 8
mov eax, edi
jmp 0x40eabe
push 0x2b47
push 4
jmp 0x40ea4f
push 0x2b52
push 7
jmp 0x40ea4f
push 0x2b67
push 8
jmp 0x40ea4f
push 0x2b7a
push 0xb
jmp 0x40ea4f
push 0x2b81
push 0xc
jmp 0x40ea4f
push 0x2b94
push 0x25
jmp 0x40ea4f
push 0x2bbb
jmp 0x40ea4d
push 0x2c52
push 0x13
jmp 0x40ea4f
push 0x2c5a
push 0x10
call fcn.00408f80
add esp, 8
mov ecx, dword [esp + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
cmp ebp, 0xffffffff
je 0x40ea6c
push ebp
call esi
mov edi, dword [esp + 0x50]
cmp edi, ebx
je 0x40ea95
test byte [esp + 0xbc8], 2
je 0x40eaa9
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0xbbc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, edi
jmp 0x40eabe
cmp dword [esp + 0x34], ebx
je 0x40eaa9
mov ecx, dword [esp + 0xbbc]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, edi
jmp 0x40eabe
push 0x2b04
push 1
call fcn.00408f80
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0xba8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xba4
ret