Function at 0x406f80
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50a54e
mov eax, dword fs:[0]
push eax
sub esp, 0x490
mov eax, dword [0x554418]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x49c], ecx
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov edx, dword [esi + 0x10]
test edx, edx
je 0x407283
mov ebx, dword [esi + 0x14]
mov eax, esi
cmp ebx, 0x10
jb 0x406fd1
mov eax, dword [esi]
push 4
push 0x516ab0
push edx
push eax
call fcn.00404eb0
add esp, 0x10
test al, al
je 0x40713d
test edi, edi
jns 0x407005
mov eax, edi
neg eax
push eax
lea eax, [ebp - 0x13]
push eax
call fcn.00404f20
mov byte [eax - 1], 0x2d
lea ecx, [eax - 1]
jmp 0x407011
lea eax, [ebp - 0x13]
push edi
push eax
call fcn.00404f20
mov ecx, eax
lea eax, [ebp - 0x13]
mov dword [ebp - 0x488], 0
add esp, 8
mov dword [ebp - 0x484], 0xf
mov byte [ebp - 0x498], 0
cmp ecx, eax
je 0x407045
sub eax, ecx
push eax
push ecx
lea ecx, [ebp - 0x498]
call fcn.00409aa0
push 4
push 0x516ab8
lea ecx, [ebp - 0x480]
mov dword [ebp - 4], 0
mov dword [ebp - 0x470], 0
mov dword [ebp - 0x46c], 0xf
mov byte [ebp - 0x480], 0
call fcn.00409aa0
push 0
push 0x516999
lea ecx, [ebp - 0x468]
mov byte [ebp - 4], 1
mov dword [ebp - 0x458], 0
mov dword [ebp - 0x454], 0xf
mov byte [ebp - 0x468], 0
call fcn.00409aa0
push 4
push 0x516ab0
lea ecx, [ebp - 0x450]
mov byte [ebp - 4], 2
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x43c], 0xf
mov byte [ebp - 0x450], 0
call fcn.00409aa0
lea eax, [ebp - 0x480]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x468]
push eax
lea eax, [ebp - 0x498]
push eax
lea eax, [ebp - 0x450]
push eax
call fcn.004076e0
mov ecx, eax
call fcn.00408fa0
lea ecx, [ebp - 0x450]
call fcn.004055a0
lea ecx, [ebp - 0x468]
call fcn.004055a0
lea ecx, [ebp - 0x480]
call fcn.004055a0
lea ecx, [ebp - 0x498]
mov dword [ebp - 4], 0xffffffff
call fcn.004055a0
mov ebx, dword [esi + 0x14]
push 0x208
lea eax, [ebp - 0x438]
push 0
push eax
call fcn.004d3ba0
add esp, 0xc
cmp ebx, 0x10
jb 0x40715a
mov esi, dword [esi]
push esi
lea eax, [ebp - 0x438]
push 0x516acc
push eax
call fcn.00404f60
push 0x208
lea eax, [ebp - 0x230]
push 0
push eax
call fcn.004d3ba0
add esp, 0x18
lea eax, [ebp - 0x438]
push eax
push dword [ebp - 0x49c]
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
test edi, edi
je 0x40724f
mov ecx, dword [0x55a544]
test ecx, ecx
jne 0x407210
push 0x554074
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x55a544], 0
jne 0x4071ff
push 8
call fcn.0043edf1
add esp, 4
mov dword [ebp - 0x49c], eax
mov dword [ebp - 4], 4
test eax, eax
je 0x4071e6
mov ecx, eax
call fcn.00415c60
jmp 0x4071e8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x49c]
xor edx, edx
lock or dword [ecx], edx
mov dword [0x55a544], eax
push 0x554074
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x55a544]
call fcn.00415f70
test eax, eax
je 0x40724f
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x407283
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407283
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x407276
test al, 1
je 0x407276
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043f0c9
mov esp, ebp
pop ebp
ret 8