Function at 0x40ef40
Capabilities:
Delete file
Get file size
Move file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
mov esi, dword [0x431014]
lea ecx, [ebp - 0x28]
push edi
push 0
push dword [ebp + 8]
or edi, 0xffffffff
mov dword [ebp - 8], esi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], 0
call fcn.0040b0c0
mov ebx, dword [ebp - 0x28]
test eax, eax
je 0x40f161
lea eax, [ebp - 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp edi, 0xffffffff
jne 0x40ef98
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebp - 0x20]
push edi
mov dword [ebp - 0xc], edi
call fcn.00414eeb
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
je 0x40f15e
test edi, edi
je 0x40efc2
push 0
lea ecx, [ebp - 0x1c]
push ecx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp ebx, 0xffffffff
je 0x40efce
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
or ebx, 0xffffffff
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], 0
mov edx, dword [ecx + 0x3c]
lea eax, [edx + 0xf8]
cmp eax, edi
ja 0x40f099
cmp dword [edx + ecx], 0x4550
lea eax, [edx + ecx]
jne 0x40f099
movzx edx, word [eax + 4]
mov edi, 0x14c
cmp dx, di
jne 0x40f018
mov edx, dword [eax + 0x34]
mov dword [ebp - 0x14], edx
lea edx, [edi - 0x54]
jmp 0x40f02d
mov edi, 0x8664
cmp dx, di
jne 0x40f099
mov edx, dword [eax + 0x30]
mov dword [ebp - 0x14], edx
mov edx, 0x108
movzx edi, word [eax + 6]
add edx, eax
mov dword [ebp - 0x1c], edi
xor eax, eax
xor edi, edi
mov dword [ebp - 0x18], edx
cmp ax, word [ebp - 0x1c]
jae 0x40f099
movzx eax, di
lea eax, [eax + eax*4]
cmp dword [edx + eax*8], 0x7865742e
lea ebx, [edx + eax*8]
jne 0x40f08f
cmp byte [ebx + 4], 0x74
jne 0x40f08f
mov eax, dword [ebx + 0x14]
push 0xa
push str._tTSigCheck
push dword [ebx + 0x10]
add eax, ecx
push eax
call fcn.00411770
mov ecx, dword [ebp - 4]
add esp, 0x10
test eax, eax
je 0x40f08c
mov eax, dword [eax - 4]
sub eax, dword [ebx + 0xc]
sub eax, dword [ebp - 0x14]
add eax, dword [ebx + 0x14]
cmp byte [eax + ecx], 0x53
je 0x40f0ad
mov edx, dword [ebp - 0x18]
inc edi
cmp di, word [ebp - 0x1c]
jb 0x40f043
mov ebx, dword [ebp - 0x28]
mov edi, dword [ebp - 4]
push edi
call fcn.00414ef4
mov edi, dword [ebp - 0x10]
add esp, 4
jmp 0x40f161
mov byte [eax + ecx], 0xc3
lea eax, [ebp - 0xc]
push eax
push ecx
call fcn.0040f1a0
mov edi, dword [ebp - 4]
lea eax, [ebp - 0xc]
push 0
push 1
push eax
push edi
call fcn.004105f0
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 8]
add esp, 0x18
push ebx
call fcn.00408520
push str..bak
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push str..bak
push eax
lea ecx, [ebp - 8]
call fcn.00408e20
mov esi, dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40f146
push 0x1001
push ebx
lea ecx, [ebp - 0x28]
call fcn.0040b0c0
test eax, eax
je 0x40f146
push dword [ebp - 0xc]
lea ecx, [ebp - 0x28]
push edi
call fcn.0040caa0
lea ecx, [ebp - 0x28]
call fcn.00408d50
mov ebx, dword [ebp - 0x28]
xor eax, eax
push edi
mov dword [ebp - 0x10], eax
call fcn.00414ef4
mov edi, dword [ebp - 0x10]
add esp, 4
jmp 0x40f161
mov ebx, dword [ebp - 0x28]
push edi
mov dword [ebp - 0x10], 0xfffffffe
call fcn.00414ef4
mov edi, dword [ebp - 0x10]
add esp, 4
jmp 0x40f161
or edi, 0xffffffff
cmp ebx, 0xffffffff
je 0x40f16d
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0xc]
cmp eax, dword [0x431010]
je 0x40f190
add esi, 0xfffffff4
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x40f190
push esi
call fcn.00414ef4
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret