Function at 0x406660
Capabilities:
Copy file
Delete file
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x412d60
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0xc74
mov eax, dword [0x41a034]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
mov byte [ebp - 0xc28], 0
push 0xff
push 0
lea eax, [ebp - 0xc27]
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
mov byte [ebp - 0x120], 0
push 0xff
push 0
lea ecx, [ebp - 0x11f]
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
push 0xf8
lea edx, [ebp - 0xc28]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4066f2
xor eax, eax
jmp 0x406ab9
lea eax, [ebp - 0xc28]
mov dword [ebp - 0xc48], eax
lea ecx, [ebp - 0x120]
mov dword [ebp - 0xc4c], ecx
mov edx, dword [ebp - 0xc4c]
mov dword [ebp - 0xc50], edx
mov eax, dword [ebp - 0xc48]
mov cl, byte [eax]
mov byte [ebp - 0xc51], cl
mov edx, dword [ebp - 0xc4c]
mov al, byte [ebp - 0xc51]
mov byte [edx], al
mov ecx, dword [ebp - 0xc48]
add ecx, 1
mov dword [ebp - 0xc48], ecx
mov edx, dword [ebp - 0xc4c]
add edx, 1
mov dword [ebp - 0xc4c], edx
cmp byte [ebp - 0xc51], 0
jne 0x406716
lea eax, [ebp - 0xc28]
add eax, 0xffffffff
mov dword [ebp - 0xc58], eax
mov ecx, dword [ebp - 0xc58]
mov dl, byte [ecx + 1]
mov byte [ebp - 0xc59], dl
add dword [ebp - 0xc58], 1
cmp byte [ebp - 0xc59], 0
jne 0x406768
mov edi, dword [ebp - 0xc58]
mov eax, dword [str..txt]
mov dword [edi], eax
mov cl, byte [0x415330]
mov byte [edi + 4], cl
lea edx, [ebp - 0x120]
add edx, 0xffffffff
mov dword [ebp - 0xc60], edx
mov eax, dword [ebp - 0xc60]
mov cl, byte [eax + 1]
mov byte [ebp - 0xc61], cl
add dword [ebp - 0xc60], 1
cmp byte [ebp - 0xc61], 0
jne 0x4067ac
mov edi, dword [ebp - 0xc60]
mov edx, dword [str.0.txt]
mov dword [edi], edx
mov ax, word [0x415338]
mov word [edi + 4], ax
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
lea ecx, [ebp - 0xc28]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0xffffffff
je 0x40686b
push 0
mov edx, dword [ebp - 0x124]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xc40], eax
mov eax, dword [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc40], 0xffffffff
je 0x40686b
cmp dword [ebp - 0xc40], 0x19000
jbe 0x40686b
push 0
lea ecx, [ebp - 0x120]
push ecx
lea edx, [ebp - 0xc28]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea eax, [ebp - 0xc28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x41533c
lea ecx, [ebp - 0xc28]
push ecx
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
mov dword [ebp - 0xc3c], eax
cmp dword [ebp - 0xc3c], 0
jne 0x406896
xor eax, eax
jmp 0x406ab9
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x18], eax
mov byte [ebp - 0xb28], 0
push 0x1ff
push 0
lea edx, [ebp - 0xb27]
push edx
call sub.MSVCR100.dll_memset
add esp, 0xc
xor eax, eax
mov word [ebp - 0xc38], ax
xor ecx, ecx
mov dword [ebp - 0xc36], ecx
mov dword [ebp - 0xc32], ecx
mov dword [ebp - 0xc2e], ecx
mov word [ebp - 0xc2a], cx
lea edx, [ebp - 0xc38]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0xc2a]
push eax
movzx ecx, word [ebp - 0xc2c]
push ecx
movzx edx, word [ebp - 0xc2e]
push edx
movzx eax, word [ebp - 0xc30]
push eax
movzx ecx, word [ebp - 0xc32]
push ecx
movzx edx, word [ebp - 0xc36]
push edx
movzx eax, word [ebp - 0xc38]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
push str.__d___4d__02d__02d__02d:_02d:_02d:_03d_:
lea edx, [ebp - 0xb28]
push edx
call dword [sym.imp.MSVCR100.dll_sprintf]
add esp, 0x28
mov byte [ebp - 0x928], 0
push 0x7ff
push 0
lea eax, [ebp - 0x927]
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
lea ecx, [ebp + 0x10]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 0xc]
push eax
push 0x800
lea ecx, [ebp - 0x928]
push ecx
call dword [sym.imp.MSVCR100.dll__vsnprintf]
add esp, 0x10
mov dword [ebp - 0x14], 0
lea edx, [ebp - 0xb28]
mov dword [ebp - 0xc68], edx
mov eax, dword [ebp - 0xc68]
add eax, 1
mov dword [ebp - 0xc6c], eax
mov ecx, dword [ebp - 0xc68]
mov dl, byte [ecx]
mov byte [ebp - 0xc6d], dl
add dword [ebp - 0xc68], 1
cmp byte [ebp - 0xc6d], 0
jne 0x4069a0
mov eax, dword [ebp - 0xc68]
sub eax, dword [ebp - 0xc6c]
mov dword [ebp - 0xc74], eax
mov ecx, dword [ebp - 0xc3c]
push ecx
mov edx, dword [ebp - 0xc74]
push edx
push 1
lea eax, [ebp - 0xb28]
push eax
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
lea ecx, [ebp - 0x928]
mov dword [ebp - 0xc78], ecx
mov edx, dword [ebp - 0xc78]
add edx, 1
mov dword [ebp - 0xc7c], edx
mov eax, dword [ebp - 0xc78]
mov cl, byte [eax]
mov byte [ebp - 0xc7d], cl
add dword [ebp - 0xc78], 1
cmp byte [ebp - 0xc7d], 0
jne 0x406a0b
mov edx, dword [ebp - 0xc78]
sub edx, dword [ebp - 0xc7c]
mov dword [ebp - 0xc84], edx
mov eax, dword [ebp - 0xc3c]
push eax
mov ecx, dword [ebp - 0xc84]
push ecx
push 1
lea edx, [ebp - 0x928]
push edx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
mov eax, dword [ebp - 0xc3c]
push eax
push 1
push 1
push 0x41536c
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
mov ecx, dword [ebp - 0xc3c]
push ecx
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
jmp 0x406aa3
mov dword [ebp - 4], 0xffffffff
jmp 0x406ab4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.004122f0
mov esp, ebp
pop ebp
ret