Function at 0x406f10
Capabilities:
Delete file
Get file size
Move file
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
mov eax, dword [0x465b00]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov byte [ebp - 0x118], 0
push 0x104
push 0
lea eax, [ebp - 0x117]
push eax
call fcn.004401c0
add esp, 0xc
cmp dword [ebp + 0xc], 0
je 0x406f50
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx]
test edx, edx
jne 0x406f88
push 0x105
lea eax, [ebp - 0x118]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push str..log
push 0x105
lea ecx, [ebp - 0x118]
push ecx
call fcn.00406910
lea edx, [ebp - 0x118]
mov dword [ebp + 0xc], edx
jmp 0x407015
push 0x5c
mov eax, dword [ebp + 0xc]
push eax
call fcn.00442733
add esp, 8
test eax, eax
jne 0x407015
push 0x105
lea ecx, [ebp - 0x118]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
lea edx, [ebp - 0x118]
push edx
call fcn.00440418
add esp, 8
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0
je 0x406fd8
mov eax, dword [ebp - 0x120]
mov byte [eax + 1], 0
mov ecx, 0x105
cmp ecx, 0x7fffffff
jbe 0x406ff1
mov dword [ebp - 0x240], 0x80070057
jmp 0x40700c
mov edx, dword [ebp + 0xc]
push edx
push 0x105
lea eax, [ebp - 0x118]
push eax
call fcn.00406950
mov dword [ebp - 0x240], eax
lea ecx, [ebp - 0x118]
mov dword [ebp + 0xc], ecx
push 0
push 0x20
push 4
push 0
push 3
push 0xc0000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0xffffffff
jne 0x407042
jmp 0x4071a5
push 0
mov eax, dword [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0x10]
shl ecx, 0xa
cmp dword [ebp - 8], ecx
jbe 0x40715a
cmp dword [ebp - 8], 0xffffffff
je 0x40715a
mov edx, dword [ebp - 0x11c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x230], 0
push 0x104
push 0
lea eax, [ebp - 0x22f]
push eax
call fcn.004401c0
add esp, 0xc
push 0x105
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x230]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x2e
lea eax, [ebp - 0x230]
push eax
call fcn.00440418
add esp, 8
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0
je 0x4070d6
mov ecx, dword [ebp - 0x124]
mov byte [ecx], 0
mov edx, 0x105
cmp edx, 0x7fffffff
jbe 0x4070ef
mov dword [ebp - 0x26c], 0x80070057
jmp 0x40710b
push str.2.log
push 0x105
lea eax, [ebp - 0x230]
push eax
call fcn.00406950
mov dword [ebp - 0x26c], eax
push 0x80
lea ecx, [ebp - 0x230]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [ebp - 0x230]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x230]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
push 0
push 0x20
push 4
push 0
push 3
push 0xc0000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x11c], eax
push 2
push 0
push 0
mov eax, dword [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 4], 0
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00440430
add esp, 4
push eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x11c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x11c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.004401a3
mov esp, ebp
pop ebp
ret