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

Disassembly:
sub esp, 0x4a8
mov eax, dword [0x41c040]
xor eax, esp
mov dword [esp + 0x4a4], eax
mov eax, dword [esp + 0x4ac]
push ebx
push ebp
mov ebp, dword [0x41d3cc]
push esi
push edi
mov edi, ecx
xor ecx, ecx
push 0x208
push ecx
lea edx, [esp + 0xa6]
push edx
mov dword [esp + 0x1c], eax
mov word [esp + 0xa8], cx
call fcn.00406ac0
add esp, 0xc
test edi, edi
je 0x401ffd
cmp word [edi], 0
je 0x401ffd
push 0x5c
push edi
call fcn.0040578e
add esp, 8
test eax, eax
jne 0x40205a
push 0x20a
lea eax, [esp + 0xa0]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x9c]
push 0x5c
push ecx
call fcn.00405762
add esp, 8
test eax, eax
je 0x401fc1
xor edx, edx
mov word [eax + 2], dx
mov ecx, 0x20a
lea eax, [esp + 0x9c]
lea ecx, [ecx]
cmp word [eax], 0
je 0x401fe0
add eax, 2
sub ecx, 1
jne 0x401fd0
jmp 0x402053
test ecx, ecx
je 0x402053
mov eax, 0x20a
sub eax, ecx
mov edx, 0x20a
sub edx, eax
lea ecx, [esp + eax*2 + 0x9c]
mov eax, edi
jmp 0x40204e
push 0x20a
lea eax, [esp + 0xa0]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, 0x20a
lea eax, [esp + 0x9c]
mov edi, edi
cmp word [eax], 0
je 0x402030
add eax, 2
sub ecx, 1
jne 0x402020
jmp 0x402053
test ecx, ecx
je 0x402053
mov eax, 0x20a
sub eax, ecx
mov edx, 0x20a
sub edx, eax
lea ecx, [esp + eax*2 + 0x9c]
mov eax, str..log
call fcn.00401cd0
lea edi, [esp + 0x9c]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x20
push 4
push 0
push 3
push 0xc0000000
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x4021e1
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
shl ebp, 0xa
cmp eax, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
jbe 0x402177
cmp eax, 0xffffffff
je 0x402177
push esi
call ebp
xor ecx, ecx
push 0x208
push ecx
lea edx, [esp + 0x2b2]
push edx
mov word [esp + 0x2b4], cx
call fcn.00406ac0
add esp, 0xc
push 0x105
push edi
lea eax, [esp + 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea ecx, [esp + 0x2a8]
push 0x2e
push ecx
call fcn.00405762
add esp, 8
test eax, eax
je 0x4020f2
xor edx, edx
mov word [eax], dx
mov ecx, 0x20a
lea eax, [esp + 0x2a8]
mov edi, edi
cmp word [eax], 0
je 0x402110
add eax, 2
sub ecx, 1
jne 0x402100
jmp 0x402133
test ecx, ecx
je 0x402133
mov eax, 0x20a
sub eax, ecx
mov edx, 0x20a
sub edx, eax
lea ecx, [esp + eax*2 + 0x2a8]
mov eax, str.2.log
call fcn.00401cd0
push 0x80
lea eax, [esp + 0x2ac]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [esp + 0x2a8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea edx, [esp + 0x2a8]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push 0
push 0x20
push 4
push 0
push 3
push 0xc0000000
push edi
call ebx
mov esi, eax
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push 3
mov dword [esp + 0x1c], eax
push ecx
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0
call fcn.00401e50
mov edx, dword [esp + 0x18]
mov eax, edx
lea edi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4021b0
push 0
lea ecx, [esp + 0x18]
push ecx
sub eax, edi
push eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x1c]
cmp eax, edx
je 0x4021de
push eax
call fcn.004055c8
add esp, 4
push esi
call ebp
mov ecx, dword [esp + 0x4b4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040531f
add esp, 0x4a8
ret