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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x434
mov eax, dword [0x1035030]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x1c]
and dword [ebp - 0x420], 0
or dword [ebp - 0x418], 0xffffffff
mov dword [ebp - 0x430], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x424], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x42c], ecx
mov dword [ebp - 0x434], eax
mov dword [ebp - 0x428], edx
mov dword [ebp - 0x41c], 0x80004005
test eax, eax
je 0x10216e7
mov eax, 0x104
cmp dword [ebp + 0x18], eax
jb 0x10216e7
push ebx
xor edx, edx
push esi
push edi
mov word [ebp - 0x414], dx
mov word [ebp - 0x20c], dx
test ecx, ecx
jne 0x102151a
push eax
lea eax, [ebp - 0x414]
push eax
call fcn.0101fbd2
mov dword [ebp - 0x41c], eax
test eax, eax
jge 0x102150e
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x10216be
test byte [eax + 0x1c], 1
je 0x10216be
push dword [ebp - 0x41c]
push 0x1003fb8
push 0xe
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01004eb4
jmp 0x10216be
lea eax, [ebp - 0x414]
mov dword [ebp - 0x42c], eax
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, 0x80
mov edi, 0xc0000000
lea eax, [ebp - 0x20c]
push eax
push 0
push 0x1004214
push dword [ebp - 0x42c]
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x1021626
cmp dword [ebp - 0x424], 0
je 0x10215c0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp - 0x424]
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.01013dea
test eax, eax
jge 0x10215a7
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x10215a7
test byte [eax + 0x1c], 1
je 0x10215a7
push dword [ebp - 0x41c]
push 0x1003fb8
push 0xf
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01004eb4
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp + 0x24]
push 0
or eax, ebx
push eax
push 1
jmp 0x10215ca
mov eax, dword [ebp + 0x24]
push 0
or eax, ebx
push eax
push 2
push dword [ebp - 0x428]
lea eax, [ebp - 0x20c]
push dword [ebp + 0x20]
push edi
push eax
call esi
mov dword [ebp - 0x418], eax
cmp eax, 0xffffffff
jne 0x1021659
mov eax, dword [ebp + 0x24]
or eax, 0x2080
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x1021626
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x1021626
test byte [eax + 0x1c], 2
je 0x1021626
push 0x1003fb8
push 0x10
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01004e8e
inc dword [ebp - 0x420]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x420], 0x32
jb 0x102152a
cmp dword [ebp - 0x418], 0xffffffff
jne 0x1021659
mov dword [ebp - 0x41c], 0x80004005
jmp 0x10216dc
push dword [ebp + 0x18]
lea eax, [ebp - 0x20c]
push dword [ebp - 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x1021687
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01004dcc
mov dword [ebp - 0x41c], eax
jmp 0x10216be
mov eax, dword [ebp - 0x430]
test eax, eax
je 0x102169b
mov ecx, dword [ebp - 0x418]
mov dword [eax], ecx
jmp 0x10216b7
cmp dword [ebp - 0x418], 0xffffffff
je 0x10216b7
push dword [ebp - 0x418]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x418], 0xffffffff
and dword [ebp - 0x41c], 0
cmp dword [ebp - 0x41c], 0
jge 0x10216dc
cmp dword [ebp - 0x418], 0xffffffff
je 0x10216dc
push dword [ebp - 0x418]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x41c]
pop edi
pop esi
pop ebx
jmp 0x1021710
mov eax, dword [0x1035014]
cmp eax, 0x1035014
je 0x102170b
test byte [eax + 0x1c], 1
je 0x102170b
push 0x1003fb8
push 0xd
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01004e8e
mov eax, 0x80070057
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01011f27
leave
ret 0x20