Function at 0x4040d0
Capabilities:
Delete file
Get common file path
Get file attributes
Move file
Set file attributes

Disassembly:
sub esp, 0x324
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x20], ebp
mov eax, dword [ebp + 4]
mov dword [esp + 0x18], 0xffffffff
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, dword [ebp + 4]
push 0x80
push ecx
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edx, dword [ebp + 4]
push 0x4154b4
push edx
call fcn.0040743a
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [esp + 0x14], ebx
je 0x4043ca
mov edi, dword [esp + 0x338]
mov eax, dword [edi + 8]
test eax, eax
je 0x404146
mov ecx, dword [edi + 0xc]
sub ecx, eax
test ecx, 0xfffffffc
je 0x404146
mov eax, 1
jmp 0x404148
xor eax, eax
test eax, eax
mov dword [esp + 0x10], eax
je 0x4042b1
lea edx, [eax*4]
test edx, edx
jle 0x4042b1
mov ecx, dword [edi + 8]
test ecx, ecx
jne 0x40416e
xor eax, eax
jmp 0x404176
mov eax, dword [edi + 0xc]
sub eax, ecx
sar eax, 2
mov ecx, dword [esp + 0x10]
cmp ecx, eax
ja 0x4042b1
mov eax, dword [edi + 8]
add edx, 4
mov dword [esp + 0x1c], edx
mov esi, dword [eax + edx - 8]
mov eax, ecx
inc eax
test esi, esi
mov dword [esp + 0x10], eax
je 0x4042a9
mov cl, byte [0x41866c]
xor eax, eax
mov byte [esp + 0x28], cl
mov ecx, 0x40
lea edi, [esp + 0x29]
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 1
push 1
push 0x4154b0
stosb byte es:[edi], al
call fcn.004075dd
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
push ecx
push 1
push esi
call fcn.004075dd
mov eax, dword [esi + 0x6c]
add esp, 0x20
test eax, eax
je 0x4041fb
mov edx, dword [esi + 0x70]
sub edx, eax
test edx, 0xfffffffc
je 0x4041fb
mov eax, 1
jmp 0x4041fd
xor eax, eax
test eax, eax
mov ebp, eax
je 0x404288
lea ebx, [eax*4]
test ebx, ebx
jle 0x404284
mov ecx, dword [esi + 0x6c]
test ecx, ecx
jne 0x40421d
xor eax, eax
jmp 0x404225
mov eax, dword [esi + 0x70]
sub eax, ecx
sar eax, 2
cmp ebp, eax
ja 0x404284
mov eax, dword [esi + 0x6c]
inc ebp
mov eax, dword [eax + ebx - 4]
add ebx, 4
test eax, eax
je 0x404280
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
push ecx
mov ecx, dword [eax + 0xc]
push edx
mov edx, dword [eax + 8]
push ecx
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0x40]
push str._d_d_d_d_d_d
push eax
call fcn.0040815d
mov ecx, dword [esp + 0x34]
lea edi, [esp + 0x48]
push ecx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x4c]
repne scasb al, byte es:[edi]
not ecx
push ecx
push 1
push edx
call fcn.004075dd
add esp, 0x30
test ebx, ebx
jne 0x404210
mov ebx, dword [esp + 0x14]
push ebx
push 1
push 1
push 0x415498
call fcn.004075dd
mov ebp, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x348]
add esp, 0x10
test edx, edx
jne 0x40415d
push ebx
call fcn.0040738c
add esp, 4
lea eax, [esp + 0x230]
mov byte [esp + 0x12c], 0
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x4042f6
lea ecx, [esp + 0x12c]
lea edx, [esp + 0x230]
push ecx
push 0
push 0x415494
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov al, byte [esp + 0x12c]
test al, al
je 0x404386
call fcn.004058b0
mov esi, eax
test esi, esi
je 0x404386
push esi
call fcn.00406810
push esi
mov ebx, eax
call fcn.004072d0
add esp, 8
test ebx, ebx
je 0x404386
mov eax, dword [ebp + 4]
push 0x41548c
push eax
call fcn.0040743a
mov edi, eax
add esp, 8
test edi, edi
je 0x404375
lea ecx, [esp + 0x12c]
push 0x415490
push ecx
call fcn.0040743a
mov esi, eax
add esp, 8
test esi, esi
je 0x40436c
push esi
push ebx
push edi
call fcn.004071e0
push esi
mov dword [esp + 0x28], eax
call fcn.0040738c
add esp, 0x10
push edi
call fcn.0040738c
add esp, 4
push ebx
call fcn.004072d0
mov eax, dword [esp + 0x1c]
add esp, 4
test eax, eax
je 0x40439d
mov edx, dword [ebp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x324
ret 4
mov eax, dword [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp + 4]
lea edx, [esp + 0x12c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov eax, dword [esp + 0x24]
or al, 2
push eax
mov eax, dword [ebp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x324
ret 4