Function at 0x408a00
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.0041c300
mov eax, dword [0x42f370]
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 0x408a64
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
jmp 0x408aae
push ebx
push ebx
push 3
push ebx
push 7
push SysReAllocString
push edi
call ebp
mov edi, eax
cmp edi, 0xffffffff
je 0x408acf
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x1c], ebp
jne 0x408a93
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebp, ebx
jg 0x408ad7
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.004110f4
add esp, 0x1160
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x408a9e
lea edi, [ebp + 1]
push edi
call fcn.00412c76
mov ebp, eax
add esp, 4
cmp ebp, ebx
mov dword [esp + 0x20], ebp
je 0x408fb5
push edi
push ebx
push ebp
call fcn.004145e0
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 0x408b3a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call fcn.00411e42
add esp, 4
jmp 0x408aad
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 4
push ebp
push str.IGEF
call fcn.0041279e
add esp, 0xc
test eax, eax
jne 0x408f2f
cmp dword [ebp + 0xc], 0x64
jb 0x408b90
cmp dword [0x4335e0], ebx
jne 0x408b90
mov eax, dword [ebp + 0x10]
mov esi, dword [esp + 0x18]
push eax
mov edi, esi
call fcn.00407b10
add esp, 4
test eax, eax
jne 0x408b94
lea esi, [esp + 0x14]
call fcn.0040c8e0
push 0x45a
jmp 0x408aae
mov esi, dword [esp + 0x18]
push 0x400
lea ecx, [esp + 0x155]
push ebx
push ecx
mov byte [esp + 0x15c], bl
call fcn.004145e0
add esp, 0xc
push 0x103
lea edx, [esp + 0x4d]
push ebx
push edx
mov byte [esp + 0x54], bl
call fcn.004145e0
add esp, 0xc
lea edi, [esp + 0x48]
mov edx, esi
call fcn.0040c030
add ebp, 0x14
mov ecx, edi
mov eax, ebp
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408c00
cmp dl, bl
je 0x408bfc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408c00
add eax, 2
add ecx, 2
cmp dl, bl
jne 0x408be0
xor eax, eax
jmp 0x408c05
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x408ce3
mov edi, str.fc1b28f6d31e228bb42421e63eb5fce4
mov esi, ebp
mov ecx, 0x21
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x408cd7
push 0x400
lea ecx, [esp + 0x55d]
push ebx
push ecx
mov byte [esp + 0x564], bl
call fcn.004145e0
add esp, 0xc
lea edx, [esp + 0x558]
push edx
push 0x80
mov ecx, 0x426b60
call fcn.00408810
add esp, 8
lea edi, [esp + 0x48]
lea edx, [esp + 0x558]
call fcn.0040c030
mov ecx, edi
mov eax, ebp
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408c90
cmp dl, bl
je 0x408c8c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408c90
add eax, 2
add ecx, 2
cmp dl, bl
jne 0x408c70
xor eax, eax
jmp 0x408c95
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x408cbb
mov eax, dword [esp + 0x10]
push eax
push str.Failed_to_match_encrypt_key_and_demo_key_from_file___s_
call fcn.0040c4d0
add esp, 8
lea esi, [esp + 0x14]
call fcn.0040c8e0
push 0x57
jmp 0x408aae
xor eax, eax
lea ecx, [ecx]
mov cl, byte [esp + eax + 0x558]
mov byte [esp + eax + 0x150], cl
add eax, 1
cmp cl, bl
jne 0x408cc0
jmp 0x408cfc
mov ecx, dword [esp + 0x10]
push ecx
push str.Failed_to_match_encrypt_key_from_file___s_
jmp 0x408ca3
lea edx, [esp + 0x150]
mov eax, esi
sub edx, esi
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
cmp cl, bl
jne 0x408cf0
lea eax, [esp + 0x150]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x408d06
mov ecx, dword [esp + 0x20]
sub eax, edx
cmp eax, dword [ecx + 0x10]
jne 0x408cab
cmp dword [ecx + 4], 1
je 0x408d33
lea esi, [esp + 0x14]
call fcn.0040c8e0
push 0x51a
jmp 0x408aae
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.00408770
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.004145e0
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.00408720
test eax, eax
jg 0x408df3
lea edx, [esp + 0x960]
push edx
call fcn.0040c780
add esp, 4
test eax, eax
je 0x408ddf
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 0x408e3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esp + 0x14]
mov ebp, eax
call fcn.0040c8e0
cmp dword [esp + 0x10], ebx
je 0x408e38
push ebx
push edi
lea edx, [esp + 0x968]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push ebp
jmp 0x408aae
mov eax, dword [esp + 0x1c]
add eax, 0xfffffc00
cmp eax, ebx
jge 0x408e4f
xor edi, edi
jmp 0x408e5a
mov ebx, eax
call fcn.0040c8a0
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.00407de0
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 0x408ead
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x40], eax
jmp 0x408eb5
mov dword [esp + 0x24], 1
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x10], ebx
je 0x408ed6
cmp dword [esp + 0x24], ebx
je 0x408ed6
lea ecx, [esp + 0x960]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea esi, [esp + 0x14]
call fcn.0040c8e0
mov esi, dword [esp + 0x28]
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x30]
push eax
mov eax, esi
call fcn.004087c0
mov eax, dword [esp + 0x4c]
add esp, 8
cmp eax, 0xffffffff
je 0x408f08
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebp, dword [esp + 0x20]
push ebp
call fcn.00411e42
mov esi, dword [esp + 0x28]
add esp, 4
cmp esi, ebx
jne 0x408f28
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, esi
jmp 0x408ab6
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x10]
push esi
push edi
call fcn.00412119
add esp, 8
test eax, eax
je 0x408f0c
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x38]
push edx
mov eax, edi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.00408770
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x80
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x10]
push ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x38]
push edx
mov eax, esi
call fcn.004087c0
add esp, 8
cmp edi, 0xffffffff
je 0x408f0c
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x408f0c
mov ecx, dword [esp + 0x1c]
push ecx
push str.SafeMalloc__d__fail_
call fcn.0040c7f0
int3