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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b9e82
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
mov eax, dword [0x6877f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x44], 0
lea ecx, [ebp - 0x40]
push 0
push 0x671c3e
mov esi, 1
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
call fcn.0040a020
mov dword [ebp - 4], 0
mov dword [ebp - 0xec], 0x672378
mov dword [ebp - 0x8c], vtable.std::basic_ios_char__struct_std::char_traits_char__.0
push 0
push 0
lea eax, [ebp - 0xdc]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0xec]
mov dword [ebp - 0x44], esi
call fcn.0040a7e0
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0xec]
push esi
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xec], vtable.std::basic_istringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [ebp - 0xec]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x60]
mov dword [ebp + ecx - 0xf0], eax
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0xdc]
call fcn.0040a600
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x405c5a
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405c50
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405e0e
push edx
push ecx
call fcn.00575155
add esp, 8
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
push 0x3b
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0xec]
push eax
call fcn.0040d050
mov ecx, eax
add esp, 0xc
mov eax, dword [ecx]
mov eax, dword [eax + 4]
test byte [eax + ecx + 0xc], 6
jne 0x405d2e
nop word [eax + eax]
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405d00
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
push 0x80
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x405d00
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
push str.Failed_to_cleanup_file____s
push edi
call fcn.00406510
add esp, 0xc
xor esi, esi
push 0x3b
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 5
push eax
lea eax, [ebp - 0xec]
push eax
call fcn.0040d050
mov ecx, eax
add esp, 0xc
mov eax, dword [ecx]
mov eax, dword [eax + 4]
test byte [eax + ecx + 0xc], 6
je 0x405ca0
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x405d66
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405d5c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405e13
push edx
push ecx
call fcn.00575155
add esp, 8
mov eax, dword [ebp - 0xec]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xec], vtable.std::basic_istringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [ebp - 0xec]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x60]
mov dword [ebp + ecx - 0xf0], eax
lea ecx, [ebp - 0xdc]
call fcn.004081a0
mov eax, dword [ebp - 0xec]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xec], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xec]
mov edx, dword [eax + 4]
lea ecx, [edx - 0x18]
mov dword [ebp + edx - 0xf0], ecx
lea eax, [ebp - 0x8c]
mov dword [ebp - 4], 8
push eax
mov dword [ebp - 0x8c], vtable.std::ios_base.0
call fcn.005734b9
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00574c7a
mov esp, ebp
pop ebp
ret
call fcn.0059b248
call fcn.0059b248
int3