Function at 0x408860
Capabilities:
Check if file exists
Copy file
Delete file
Get file attributes
Get file size
Move file
Read file on windows
Set file attributes
Write file on windows

Disassembly:
mov eax, 0x1160
call fcn.00419e40
mov eax, dword [0x42c2f0]
xor eax, esp
mov dword [esp + 0x115c], eax
mov eax, dword [esp + 0x1164]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 3
mov edi, edx
push SysReAllocString
push edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x44], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x40], ebx
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x4088c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
jmp 0x40890e
push ebx
push ebx
push 3
push ebx
push 7
push SysReAllocString
push edi
call ebp
mov edi, eax
cmp edi, 0xffffffff
je 0x40892f
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x1c], ebp
jne 0x4088f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebp, ebx
jg 0x408937
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [esp + 0x116c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040fbc6
add esp, 0x1160
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4088fe
lea edi, [ebp + 1]
push edi
call fcn.00410ac7
mov ebp, eax
add esp, 4
cmp ebp, ebx
mov dword [esp + 0x20], ebp
je 0x408e05
push edi
push ebx
push ebp
call fcn.00412200
mov edi, dword [esp + 0x28]
add esp, 0xc
push ebx
lea edx, [esp + 0x40]
push edx
push edi
push ebp
push esi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x50], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x3c], edi
je 0x40899a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call fcn.0040fe64
add esp, 4
jmp 0x40890d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 4
push ebp
push str.IGEF
call fcn.00411042
add esp, 0xc
test eax, eax
jne 0x408d7f
cmp dword [ebp + 0xc], 0x64
jb 0x4089f0
cmp dword [0x42f91c], ebx
jne 0x4089f0
mov eax, dword [ebp + 0x10]
mov esi, dword [esp + 0x18]
push eax
mov edi, esi
call fcn.00407d90
add esp, 4
test eax, eax
jne 0x4089f4
lea esi, [esp + 0x14]
call fcn.0040bd00
push 0x45a
jmp 0x40890e
mov esi, dword [esp + 0x18]
push 0x400
lea ecx, [esp + 0x155]
push ebx
push ecx
mov byte [esp + 0x15c], bl
call fcn.00412200
add esp, 0xc
push 0x103
lea edx, [esp + 0x4d]
push ebx
push edx
mov byte [esp + 0x54], bl
call fcn.00412200
add esp, 0xc
lea edi, [esp + 0x48]
mov edx, esi
call fcn.0040b460
add ebp, 0x14
mov ecx, edi
mov eax, ebp
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408a60
cmp dl, bl
je 0x408a5c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408a60
add eax, 2
add ecx, 2
cmp dl, bl
jne 0x408a40
xor eax, eax
jmp 0x408a65
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x408b34
mov edi, str.fc1b28f6d31e228bb42421e63eb5fce4
mov esi, ebp
mov ecx, 0x21
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x408b28
push 0x400
lea ecx, [esp + 0x55d]
push ebx
push ecx
mov byte [esp + 0x564], bl
call fcn.00412200
lea edx, [esp + 0x564]
add esp, 0xc
push edx
call fcn.00408720
add esp, 4
lea edi, [esp + 0x48]
lea edx, [esp + 0x558]
call fcn.0040b460
mov ecx, edi
mov eax, ebp
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408ae4
cmp dl, bl
je 0x408ae0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408ae4
add eax, 2
add ecx, 2
cmp dl, bl
jne 0x408ac4
xor eax, eax
jmp 0x408ae9
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x408b0f
mov eax, dword [esp + 0x10]
push eax
push str.Failed_to_match_encrypt_key_and_demo_key_from_file___s_
call fcn.0040b8f0
add esp, 8
lea esi, [esp + 0x14]
call fcn.0040bd00
push 0x57
jmp 0x40890e
xor eax, eax
mov cl, byte [esp + eax + 0x558]
mov byte [esp + eax + 0x150], cl
add eax, 1
cmp cl, bl
jne 0x408b11
jmp 0x408b4c
mov ecx, dword [esp + 0x10]
push ecx
push str.Failed_to_match_encrypt_key_from_file___s_
jmp 0x408af7
lea edx, [esp + 0x150]
mov eax, esi
sub edx, esi
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
cmp cl, bl
jne 0x408b40
lea eax, [esp + 0x150]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x408b56
mov ecx, dword [esp + 0x20]
sub eax, edx
cmp eax, dword [ecx + 0x10]
jne 0x408aff
cmp dword [ecx + 4], 1
je 0x408b83
lea esi, [esp + 0x14]
call fcn.0040bd00
push 0x51a
jmp 0x40890e
mov esi, dword [esp + 0x10]
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x30]
push eax
mov eax, esi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
call fcn.00408680
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [esp + 0x28]
push 0x80
push edi
mov dword [esp + 0x4c], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x800
lea ecx, [esp + 0x966]
push ebx
push ecx
mov word [esp + 0x96c], bx
call fcn.00412200
add esp, 0xc
push edi
push str._s.igbak
lea edx, [esp + 0x968]
call fcn.00401000
add esp, 8
lea eax, [esp + 0x960]
mov dword [esp + 0x10], ebx
call fcn.00408630
test eax, eax
jg 0x408c43
lea edx, [esp + 0x960]
push edx
call fcn.0040bba0
add esp, 4
test eax, eax
je 0x408c2f
lea eax, [esp + 0x960]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebx
lea ecx, [esp + 0x964]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [esp + 0x10], eax
push ebx
push 0x80
push 2
push ebx
push 3
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x408c8e
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esp + 0x14]
mov ebp, eax
call fcn.0040bd00
cmp dword [esp + 0x10], ebx
je 0x408c88
push ebx
push edi
lea edx, [esp + 0x968]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push ebp
jmp 0x40890e
mov eax, dword [esp + 0x1c]
add eax, 0xfffffc00
cmp eax, ebx
jge 0x408c9f
xor edi, edi
jmp 0x408caa
mov ebx, eax
call fcn.0040bcc0
mov edi, eax
xor ebx, ebx
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
push edi
add esi, 0xfffffc00
lea ecx, [eax + 0x400]
push esi
push ecx
lea edx, [esp + 0x15c]
push edx
add eax, 0xc
mov dword [esp + 0x24], edi
call fcn.00408060
add esp, 0x10
push ebx
lea eax, [esp + 0x1c]
push eax
push esi
push edi
push ebp
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x18], esi
je 0x408cfd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x40], eax
jmp 0x408d05
mov dword [esp + 0x24], 1
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x10], ebx
je 0x408d26
cmp dword [esp + 0x24], ebx
je 0x408d26
lea ecx, [esp + 0x960]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea esi, [esp + 0x14]
call fcn.0040bd00
mov esi, dword [esp + 0x28]
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x30]
push eax
mov eax, esi
call fcn.004086d0
mov eax, dword [esp + 0x4c]
add esp, 8
cmp eax, 0xffffffff
je 0x408d58
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebp, dword [esp + 0x20]
push ebp
call fcn.0040fe64
mov esi, dword [esp + 0x28]
add esp, 4
cmp esi, ebx
jne 0x408d78
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
jmp 0x408916
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x10]
push edi
push esi
call fcn.004109e7
add esp, 8
test eax, eax
je 0x408d5c
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x38]
push edx
mov eax, esi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.00408680
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x80
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x10]
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x38]
push edx
mov eax, edi
call fcn.004086d0
add esp, 8
cmp esi, 0xffffffff
je 0x408d5c
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x408d5c
mov ecx, dword [esp + 0x1c]
push ecx
push str.SafeMalloc__d__fail_
call fcn.0040bc10
int3