Function at 0x408eb0
Capabilities:
Copy file
Delete file
Get file attributes
Get file size
Move file
Read file on windows
Resolve function by parsing pe exports
Set file attributes
Write file on windows

Disassembly:
mov eax, 0x1578
call fcn.00419e40
mov eax, dword [0x42c2f0]
xor eax, esp
mov dword [esp + 0x1574], eax
mov eax, dword [esp + 0x157c]
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 3
mov ebx, edx
push SysReAllocString
push ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], ecx
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x408f28
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
push str.Failed_to_open___s__for_reading__error_code:__lu.
call fcn.0040b8f0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
push 0
push 0
push 3
push 0
push 7
push SysReAllocString
push ebx
call edi
mov edi, eax
cmp edi, 0xffffffff
je 0x408fd3
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x28], ebp
jne 0x408f5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
cmp ebp, edi
je 0x408fde
cmp ebp, 0xffffffff
je 0x408fde
push edi
lea edx, [esp + 0x18]
push edx
push 4
lea eax, [esp + 0x464]
push eax
push esi
mov byte [esp + 0x46c], 0
mov dword [esp + 0x46d], edi
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebp, 4
jb 0x409008
cmp dword [esp + 0x14], 4
je 0x409008
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push ebx
push str.Failed_to_read___s___error_code:__lu.
call fcn.0040b8f0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
call dword [sym.imp.KERNEL32.dll_GetLastError]
or ebp, 0xffffffff
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebp, 0xffffffff
jne 0x4097ed
mov esi, dword [esp + 0x1c]
push esi
push ebx
push str._Failed_to_get_size_of___s___error_code:__lu.
jmp 0x408f12
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call ebp
push 4
lea ecx, [esp + 0x45c]
push ecx
push str.IGEF
call fcn.00411042
add esp, 0xc
test eax, eax
je 0x409093
mov esi, dword [esp + 0x10]
push esi
push ebx
call fcn.004109e7
add esp, 8
test eax, eax
je 0x409866
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x30]
push eax
mov eax, ebx
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
call fcn.00408680
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x80
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x30]
push edx
jmp 0x40984f
push edi
push 0x80
push 3
push edi
push 3
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x408f03
xor eax, eax
push 0x3fc
mov word [esp + 0x5d], ax
mov byte [esp + 0x5f], al
lea eax, [esp + 0x60]
push edi
push eax
mov byte [esp + 0x64], 0
call fcn.00412200
add esp, 0xc
push edi
lea ecx, [esp + 0x18]
push ecx
push 0x400
lea edx, [esp + 0x64]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4097c5
cmp dword [esp + 0x14], 0x400
jne 0x4097c5
push esi
call ebp
mov eax, dword [esp + 0x5c]
sub eax, 1
je 0x40979e
sub eax, 1
je 0x40913a
push ebx
push str.Failed_to_match_the_ENCRYPT_MAJOR_VERSION_from_file___s_
call fcn.0040b8f0
add esp, 8
push 0x51a
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
cmp dword [esp + 0x64], 0x64
jb 0x409170
cmp dword [0x42f91c], edi
jne 0x409170
mov eax, dword [esp + 0x68]
mov edi, dword [esp + 0x18]
push eax
call fcn.00407d90
add esp, 4
test eax, eax
jne 0x409170
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
push 0x400
lea ecx, [esp + 0xd75]
push 0
push ecx
mov byte [esp + 0xd7c], 0
call fcn.00412200
add esp, 0xc
push 0x103
lea edx, [esp + 0x465]
push 0
push edx
mov byte [esp + 0x46c], 0
call fcn.00412200
mov ebp, dword [esp + 0x24]
add esp, 0xc
lea edi, [esp + 0x460]
mov edx, ebp
call fcn.0040b460
mov esi, edi
lea eax, [esp + 0x74]
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x4091e6
test cl, cl
je 0x4091e2
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x4091e6
add eax, 2
add esi, 2
test cl, cl
jne 0x4091c6
xor eax, eax
jmp 0x4091eb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x409300
mov edi, str.fc1b28f6d31e228bb42421e63eb5fce4
lea esi, [esp + 0x74]
mov ecx, 0x21
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4092b7
push 0x400
push eax
lea ecx, [esp + 0x1181]
push ecx
mov byte [esp + 0x1184], al
call fcn.00412200
lea edx, [esp + 0x1184]
add esp, 0xc
push edx
call fcn.00408720
add esp, 4
lea edi, [esp + 0x460]
lea edx, [esp + 0x1178]
call fcn.0040b460
mov esi, edi
lea eax, [esp + 0x74]
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x409271
test cl, cl
je 0x40926d
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x409271
add eax, 2
add esi, 2
test cl, cl
jne 0x409251
xor eax, eax
jmp 0x409276
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x409297
push ebx
push str.Failed_to_match_encrypt_key_and_demo_key_from_file___s_
call fcn.0040b8f0
add esp, 8
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x1178]
mov byte [esp + eax + 0xd70], cl
add eax, 1
test cl, cl
jne 0x4092a0
jmp 0x40931c
cmp dword [esp + 0x64], 0x64
jb 0x4092e3
cmp dword [0x42f91c], 0
je 0x4092e3
mov eax, dword [0x430140]
test eax, eax
je 0x4092e3
lea ecx, [esp + 0xd70]
push ecx
lea edx, [esp + 0x78]
push edx
call eax
test eax, eax
jne 0x40931c
push ebx
push str.Failed_to_match_encrypt_key_from_file___s_
call fcn.0040b8f0
add esp, 8
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
lea edx, [esp + 0xd70]
mov eax, ebp
sub edx, ebp
jmp 0x409310
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x409310
lea eax, [esp + 0xd70]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x409326
sub eax, edx
cmp eax, dword [esp + 0x68]
je 0x409354
push ebx
push str.Failed_to_match_the_length_of_key_from_file___s_
call fcn.0040b8f0
add esp, 8
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
lea eax, [esp + 0x48]
xor ebp, ebp
push eax
lea ecx, [esp + 0x54]
push ecx
mov eax, ebx
mov dword [esp + 0x58], ebp
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], ebp
call fcn.00408680
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x800
lea edx, [esp + 0x56e]
push ebp
push edx
mov dword [esp + 0x28], eax
mov word [esp + 0x574], bp
call fcn.00412200
mov esi, dword [esp + 0x1c]
add esp, 0xc
push esi
xor edi, edi
push str._s.igbak
lea edx, [esp + 0x570]
mov dword [esp + 0x48], edi
mov dword [esp + 0x20], ebp
call fcn.00401000
add esp, 8
lea eax, [esp + 0x568]
call fcn.00408630
cmp eax, ebp
je 0x4093db
cmp eax, 0xffffffff
jne 0x409404
lea eax, [esp + 0x568]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 1
lea ecx, [esp + 0x56c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x40], edi
jne 0x409483
push esi
push str._s.ig_
lea edx, [esp + 0x570]
call fcn.00401000
add esp, 8
mov dword [esp + 0x18], 1
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x4094ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
push str.Failed_to_open___s__for_reading__error_code:__lu.
call fcn.0040b8f0
add esp, 0xc
test edi, edi
je 0x408f1a
mov eax, dword [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x570]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
push esi
push ebx
call fcn.004109e7
add esp, 8
test eax, eax
jne 0x409421
push eax
push 0x80
push 3
push eax
push 3
push SysReAllocString
lea edx, [esp + 0x580]
push edx
jmp 0x409434
push 0
push 0
push 0x400
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x18], 0
lea eax, [esp + 0x568]
jne 0x4094d7
mov eax, esi
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x24], ebx
jne 0x40953c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
push esi
push str.Failed_to_open___s__for_encrypting__error_code:__lu.
call fcn.0040b8f0
add esp, 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x40952e
push 0
push esi
lea edx, [esp + 0x570]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
mov eax, dword [esp + 0x28]
add eax, 0xfffffc00
cmp eax, 0x200000
mov dword [esp + 0x38], eax
mov dword [esp + 0x44], eax
jbe 0x40955c
mov dword [esp + 0x44], 0x200000
push 0x200001
mov dword [esp + 0x38], 0
call fcn.00410ac7
mov esi, eax
add esp, 4
test esi, esi
je 0x40978f
push 0x200001
push 0
push esi
call fcn.00412200
add esp, 0xc
cmp dword [esp + 0x38], 0
mov dword [esp + 0x3c], esi
jbe 0x409644
mov ebx, dword [esp + 0x44]
push 0
lea eax, [esp + 0x18]
push eax
push ebx
push esi
push ebp
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4096f9
mov edi, dword [esp + 0x14]
cmp edi, ebx
je 0x4095d6
mov ecx, dword [esp + 0x34]
add ecx, edi
cmp ecx, dword [esp + 0x38]
jne 0x4096f9
mov edx, dword [esp + 0x34]
push edx
lea eax, [esp + 0xd74]
push eax
lea ecx, [esp + 0x6c]
push ecx
mov ebx, esi
call fcn.00408e20
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
add esp, 0xc
push 0
lea edx, [esp + 0x2c]
push edx
push eax
push esi
push ecx
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4096b7
mov ecx, dword [esp + 0x14]
cmp dword [esp + 0x28], ecx
jne 0x4096b7
mov eax, dword [esp + 0x34]
add eax, ecx
cmp eax, dword [esp + 0x38]
mov dword [esp + 0x34], eax
jb 0x40959a
mov edi, dword [esp + 0x40]
mov ebx, dword [esp + 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call esi
push ebx
call esi
lea esi, [esp + 0x3c]
call fcn.0040bd00
test edi, edi
mov esi, 1
je 0x40973b
push 0x80
lea eax, [esp + 0x56c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [esp + 0x568]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [esp + 0x10]
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x54]
push edx
mov eax, edi
call fcn.004086d0
add esp, 8
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
je 0x4096b0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, esi
jmp 0x40986b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x10]
mov edi, eax
push edi
push edx
push str.Failed_to_write___s___error_code:__lu.
call fcn.0040b8f0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xc
push ebp
call esi
mov eax, dword [esp + 0x24]
push eax
call esi
lea esi, [esp + 0x3c]
call fcn.0040bd00
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x2c]
mov edi, eax
push edi
push ecx
push str.Failed_to_read___s___error_code:__lu.
call fcn.0040b8f0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xc
push ebp
call esi
mov edx, dword [esp + 0x24]
push edx
call esi
lea esi, [esp + 0x3c]
call fcn.0040bd00
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
cmp dword [esp + 0x18], 0
je 0x409687
mov edi, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ebx, esi
push 1
push edi
lea edx, [esp + 0x570]
push edx
call ebp
mov esi, eax
test esi, esi
jne 0x40968b
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
add ebx, 1
cmp ebx, 0xa
jle 0x409752
lea eax, [esp + 0x568]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40969f
push 0x200000
push str.SafeMalloc__d__fail_
call fcn.0040bc10
mov esi, dword [esp + 0x10]
push esi
push ebx
push str.Call_DecodeFile_1_0___to_decrypt_file___s_______s_.
call fcn.0040b8f0
mov ecx, dword [esp + 0x24]
add esp, 0xc
push esi
mov edx, ebx
call fcn.00408860
add esp, 4
jmp 0x40986b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push ebx
push str.Failed_to_read___s___error_code:__lu.
call fcn.0040b8f0
add esp, 0xc
push esi
call ebp
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40986b
cmp ebp, edi
jne 0x409866
mov esi, dword [esp + 0x10]
push esi
push ebx
call fcn.004109e7
add esp, 8
test eax, eax
je 0x409866
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x30]
push ecx
mov eax, ebx
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
call fcn.00408680
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x80
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x30]
push eax
mov eax, esi
call fcn.004086d0
add esp, 8
cmp ebp, 0xffffffff
je 0x409866
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, 1
mov ecx, dword [esp + 0x1584]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040fbc6
add esp, 0x1578
ret