Function at 0x40e4c4
Capabilities:
Delete file
Get file attributes
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff94
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 8], ebx
mov ebx, ecx
mov esi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00405a28
xor eax, eax
push ebp
push 0x40e944
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp - 4]
call fcn.00405a38
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
setne byte [ebp - 9]
cmp byte [ebp - 9], 0
je 0x40e920
lea eax, [ebx + 1]
push eax
lea eax, [ebp - 8]
mov ecx, 1
mov edx, dword [0x40e4a4]
call fcn.00407030
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], eax
test ebx, ebx
jl 0x40e7f4
inc ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x10], 0
imul eax, dword [ebp - 0x14], 0xd
mov edx, dword [ebp - 8]
lea edi, [edx + eax*4]
mov eax, dword [ebp + 8]
call fcn.00406e74
cmp eax, dword [ebp - 0x10]
jg 0x40e5a1
mov eax, edi
mov edx, dword [esi]
call fcn.004055fc
mov eax, dword [edi]
call fcn.00405868
mov ebx, eax
cmp ebx, 1
jl 0x40e5b1
mov eax, dword [edi]
cmp byte [eax + ebx - 1], 0x5c
jne 0x40e59a
mov eax, edi
mov ecx, ebx
mov edx, 1
call fcn.00405ae0
jmp 0x40e5b1
dec ebx
test ebx, ebx
jne 0x40e581
jmp 0x40e5b1
mov eax, edi
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
mov edx, dword [edx + ecx*4]
call fcn.004055fc
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, dword [esi]
call fcn.00405a38
push eax
call sub.kernel32.dll_CreateFileA_1
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40e7df
push 0
push ebx
call sub.kernel32.dll_GetFileSize_1
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc_1
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x40e7d9
imul eax, dword [ebp - 0x30], 0xb
mov ecx, 0xa
xor edx, edx
div ecx
add eax, 0xc
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc_1
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x40e7d0
push 0
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x28]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x40e7c7
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x30]
jne 0x40e7c7
mov dword [ebp - 0x56], 0x4034b50
mov word [ebp - 0x52], 0x14
mov word [ebp - 0x50], 0
mov word [ebp - 0x4e], 8
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x30]
or eax, 0xffffffff
call fcn.0040e460
not eax
mov dword [ebp - 0x48], eax
imul eax, dword [ebp - 0x30], 0xb
mov ecx, 0xa
xor edx, edx
div ecx
add eax, 0xc
push eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
call fcn.0040e354
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x40], eax
mov eax, dword [edi]
call fcn.00405868
mov word [ebp - 0x3c], ax
mov word [ebp - 0x3a], 0
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push ebx
call sub.kernel32.dll_GetFileTime
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x20]
push eax
call sub.kernel32.dll_FileTimeToLocalFileTime
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x4a]
push eax
lea eax, [ebp - 0x20]
push eax
call sub.kernel32.dll_FileTimeToDosDateTime
lea eax, [edi + 4]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov dword [eax], 0x2014b50
mov eax, dword [ebp - 0x38]
mov word [eax + 4], 0x14
mov eax, dword [ebp - 0x38]
push esi
push edi
lea edi, [eax + 6]
lea esi, [ebp - 0x52]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
pop edi
pop esi
mov eax, dword [ebp - 0x38]
mov word [eax + 0x20], 0
mov eax, dword [ebp - 0x38]
mov word [eax + 0x22], 0
mov eax, dword [ebp - 0x38]
mov word [eax + 0x24], 0
mov eax, dword [esi]
call fcn.00405a38
push eax
call sub.kernel32.dll_GetFileAttributesA
mov edx, dword [ebp - 0x38]
mov dword [edx + 0x26], eax
push 1
push 0
push 0
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_SetFilePointer_1
mov edx, dword [ebp - 0x38]
mov dword [edx + 0x2a], eax
push 0
lea eax, [ebp - 0x24]
push eax
push 0x1e
lea eax, [ebp - 0x56]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x40e7bb
cmp dword [ebp - 0x24], 0x1e
jne 0x40e7bb
push 0
lea eax, [ebp - 0x24]
push eax
mov eax, dword [edi]
call fcn.00405868
push eax
mov eax, dword [edi]
call fcn.00405a38
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x40e7bb
mov eax, dword [edi]
call fcn.00405868
cmp eax, dword [ebp - 0x24]
jne 0x40e7bb
push 0
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x40e7bb
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x44]
je 0x40e7bf
xor eax, eax
jmp 0x40e7c1
mov al, 1
mov byte [ebp - 9], al
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_LocalFree
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_LocalFree
push ebx
call sub.kernel32.dll_CloseHandle_1
cmp byte [ebp - 9], 0
je 0x40e7f4
inc dword [ebp - 0x10]
add esi, 4
dec dword [ebp - 0x34]
jne 0x40e553
cmp byte [ebp - 9], 0
je 0x40e800
cmp dword [ebp - 0x14], 0
jg 0x40e804
xor eax, eax
jmp 0x40e806
mov al, 1
mov byte [ebp - 9], al
cmp byte [ebp - 9], 0
je 0x40e903
mov dword [ebp - 0x6c], 0x6054b50
mov word [ebp - 0x68], 0
mov word [ebp - 0x66], 0
movzx eax, word [ebp - 0x14]
mov word [ebp - 0x64], ax
mov word [ebp - 0x62], ax
xor eax, eax
mov dword [ebp - 0x60], eax
push 1
push 0
push 0
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_SetFilePointer_1
mov dword [ebp - 0x5c], eax
mov word [ebp - 0x58], 0
mov eax, dword [ebp - 0x14]
dec eax
test eax, eax
jl 0x40e8d5
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x10], 0
imul eax, dword [ebp - 0x10], 0xd
mov edx, dword [ebp - 8]
lea ebx, [edx + eax*4]
mov eax, dword [ebx]
call fcn.00405868
add eax, 0x2e
add dword [ebp - 0x60], eax
push 0
lea eax, [ebp - 0x24]
push eax
push 0x2e
lea eax, [ebx + 4]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x40e8c7
cmp dword [ebp - 0x24], 0x2e
jne 0x40e8c7
push 0
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebx]
call fcn.00405868
push eax
mov eax, dword [ebx]
call fcn.00405a38
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x40e8c7
mov eax, dword [ebx]
call fcn.00405868
cmp eax, dword [ebp - 0x24]
je 0x40e8cd
mov byte [ebp - 9], 0
jmp 0x40e8d5
inc dword [ebp - 0x10]
dec dword [ebp - 0x34]
jne 0x40e862
cmp byte [ebp - 9], 0
je 0x40e8fa
push 0
lea eax, [ebp - 0x24]
push eax
push 0x16
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
je 0x40e8fa
cmp dword [ebp - 0x24], 0x16
je 0x40e8fe
xor eax, eax
jmp 0x40e900
mov al, 1
mov byte [ebp - 9], al
mov eax, dword [ebp - 0x18]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp byte [ebp - 9], 0
jne 0x40e920
mov eax, dword [ebp - 4]
call fcn.00405a38
push eax
call sub.kernel32.dll_DeleteFileA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40e94b
lea eax, [ebp - 8]
mov edx, dword [0x40e4a4]
call fcn.00407150
lea eax, [ebp - 4]
call fcn.004055a8
ret