Function at 0x4090f0
Capabilities:
Copy file
Delete file
Get file attributes
Get file size
Move file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x86c
mov eax, dword [0x42f370]
xor eax, esp
mov dword [esp + 0x864], eax
mov eax, dword [esp + 0x874]
push ebx
push ebp
mov ebp, dword [esp + 0x878]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
mov ebx, edx
push ebp
mov dword [esp + 0x64], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x68], ecx
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x40916b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
push str.Failed_to_open___s__for_reading__error_code:__lu.
call fcn.0040c4d0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4097fc
push 0
push 0
push 3
push 0
push 7
push SysReAllocString
push ebp
call esi
mov esi, eax
cmp esi, 0xffffffff
je 0x409218
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x4091a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x2c], eax
je 0x409228
cmp eax, 0xffffffff
je 0x409228
push esi
lea edx, [esp + 0x14]
push edx
push 4
lea eax, [esp + 0x6c]
push eax
push edi
mov byte [esp + 0x74], 0
mov dword [esp + 0x75], esi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 4
cmp dword [esp + 0x14], eax
jb 0x409256
cmp dword [esp + 0x10], eax
je 0x409256
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
push str.Failed_to_read___s___error_code:__lu.
call fcn.0040c4d0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4097fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x2c], 0xffffffff
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
jne 0x409782
mov esi, dword [esp + 0x24]
push esi
push ebp
push str._Failed_to_get_size_of___s___error_code:__lu.
jmp 0x409155
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 4
lea ecx, [esp + 0x64]
push ecx
push str.IGEF
call fcn.0041279e
add esp, 0xc
test eax, eax
je 0x40928d
push 2
lea edx, [esp + 0x64]
push edx
push 0x426a84
call fcn.0041279e
add esp, 0xc
test eax, eax
jne 0x4092f0
push ebx
push ebp
call fcn.00412119
add esp, 8
test eax, eax
je 0x4097f7
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x40]
push ecx
mov eax, ebp
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
call fcn.00408770
add esp, 8
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x80
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x40]
push eax
jmp 0x4097e0
mov ecx, dword [esp + 0x18]
cmp dword [ecx + 0xc], 0x64
lea eax, [ecx + 0xc]
mov dword [esp + 0x3c], eax
jb 0x40932f
cmp dword [0x4335e0], esi
jne 0x40932f
mov ecx, dword [ecx + 0x10]
mov edi, dword [esp + 0x4c]
push ecx
call fcn.00407b10
add esp, 4
test eax, eax
jne 0x40932f
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4097fc
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x54]
push eax
mov eax, ebp
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
call fcn.00408770
add esp, 8
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x800
lea ecx, [esp + 0x6e]
push esi
push ecx
mov dword [esp + 0x30], eax
mov word [esp + 0x74], si
call fcn.004145e0
add esp, 0xc
push ebx
push str._s.igbak
lea edx, [esp + 0x70]
mov dword [esp + 0x40], esi
mov dword [esp + 0x4c], esi
call fcn.00401000
add esp, 8
lea eax, [esp + 0x68]
call fcn.00408720
cmp eax, esi
je 0x4093a2
cmp eax, 0xffffffff
jne 0x4093c3
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 1
lea eax, [esp + 0x6c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
cmp eax, esi
mov dword [esp + 0x38], eax
jne 0x409437
push ebx
push str.__s.ig_
lea edx, [esp + 0x70]
call fcn.00401000
add esp, 8
mov dword [esp + 0x44], 1
push esi
push 0x80
push 3
push esi
push 3
push SysReAllocString
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x1c], eax
mov edi, eax
cmp edi, 0xffffffff
jne 0x40946b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push ebp
push str.Failed_to_open___s__for_reading__error_code:__lu.
call fcn.0040c4d0
add esp, 0xc
cmp dword [esp + 0x38], esi
je 0x409429
push esi
push ebx
lea edx, [esp + 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4097fc
push ebx
push ebp
call fcn.00412119
add esp, 8
test eax, eax
jne 0x4093dd
push esi
push 0x80
push 3
push esi
push 3
push SysReAllocString
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [esp + 0x1c], edi
jmp 0x4093fa
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x44], esi
lea eax, [esp + 0x68]
jne 0x409483
mov eax, ebx
push esi
push 0x80
push 2
push esi
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x30], eax
jne 0x4094e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
push ebp
push ebx
push str.Failed_to_open___s__for_encrypting__error_code:__lu.
call fcn.0040c4d0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x38], esi
je 0x4094d4
push esi
push ebx
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push ebp
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4097fc
mov edx, dword [esp + 0x18]
push esi
lea ecx, [esp + 0x24]
push ecx
push 0x400
push edx
push eax
mov dword [esp + 0x34], esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x20], 0x400
je 0x40953c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
push str.Failed_to_write_flag_to___s___error_code:__lu.
call fcn.0040c4d0
add esp, 0xc
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
mov eax, dword [esp + 0x30]
push eax
call edi
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4097fc
mov eax, dword [esp + 0x14]
cmp eax, 0x200000
mov dword [esp + 0x2c], eax
jbe 0x409553
mov dword [esp + 0x2c], 0x200000
push 0x200001
mov dword [esp + 0x38], esi
call fcn.00412c76
mov esi, eax
add esp, 4
test esi, esi
je 0x409773
push 0x200001
push 0
push esi
call fcn.004145e0
add esp, 0xc
cmp dword [esp + 0x14], 0
mov dword [esp + 0x18], esi
jbe 0x409639
lea ecx, [ecx]
mov ebx, dword [esp + 0x2c]
push 0
lea ecx, [esp + 0x14]
push ecx
push ebx
push esi
push edi
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4096eb
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x4095cc
mov edx, dword [esp + 0x34]
add edx, eax
cmp edx, dword [esp + 0x14]
jne 0x4096eb
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x40]
push edx
push ecx
mov edi, eax
mov ebx, esi
call fcn.00408fd0
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x3c]
add esp, 0xc
push 0
lea edx, [esp + 0x24]
push edx
push eax
push esi
push ebx
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4096a9
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x20], ecx
jne 0x4096a9
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x1c]
add eax, ecx
cmp eax, dword [esp + 0x14]
mov dword [esp + 0x34], eax
jb 0x409590
mov ebx, dword [esp + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
mov ecx, dword [esp + 0x30]
push ecx
call esi
lea esi, [esp + 0x18]
call fcn.0040c8e0
cmp dword [esp + 0x38], 0
mov esi, 1
je 0x409729
push 0x80
lea edx, [esp + 0x6c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x54]
push ecx
mov eax, ebx
call fcn.004087c0
add esp, 8
mov eax, dword [esp + 0x24]
cmp eax, 0xffffffff
je 0x4096a2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, esi
jmp 0x4097fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x48]
mov edi, eax
push edi
push ecx
push str.Failed_to_write___s___error_code:__lu.
call fcn.0040c4d0
mov edx, dword [esp + 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xc
push edx
call esi
push ebx
call esi
lea esi, [esp + 0x18]
call fcn.0040c8e0
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4097fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push ebx
push ebp
push str.Failed_to_read___s___error_code:__lu.
call fcn.0040c4d0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xc
push edi
call esi
mov eax, dword [esp + 0x30]
push eax
call esi
lea esi, [esp + 0x18]
call fcn.0040c8e0
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4097fc
cmp dword [esp + 0x44], 0
je 0x40967d
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, esi
push 1
push ebx
lea ecx, [esp + 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov esi, eax
test esi, esi
jne 0x40967d
push 0xc8
call ebp
add edi, 1
cmp edi, 0xa
jle 0x40973c
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x409691
push 0x200000
push str.SafeMalloc__d__fail_
call fcn.0040c7f0
cmp eax, esi
jne 0x4097f7
push ebx
push ebp
call fcn.00412119
add esp, 8
test eax, eax
je 0x4097f7
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x40]
push eax
mov eax, ebp
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
call fcn.00408770
add esp, 8
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x80
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x40]
push edx
mov eax, ebx
call fcn.004087c0
add esp, 8
cmp edi, 0xffffffff
je 0x4097f7
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, 1
mov ecx, dword [esp + 0x874]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004110f4
add esp, 0x86c
ret