Function at 0x404a21
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf98
mov eax, dword [0x423008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x110
xor ebx, ebx
mov dword [ebp - 0xf98], ecx
lea eax, [ebp - 0xf84]
push ebx
push eax
call fcn.00406820
add esp, 0xc
mov dword [ebp - method.CCab.virtual_0], vtable.CCab.0
mov dword [ebp - 0xf8c], ebx
mov dword [ebp - 0xf88], ebx
call fcn.0040179a
lea ecx, [ebp - 0xf8c]
mov dword [ebp - 0xf8c], eax
mov dword [ebp - 0xf84], ebx
mov dword [ebp - 0xf80], ebx
mov dword [ebp - 0xf7c], ebx
call fcn.0040137d
push 0x104
lea eax, [ebp - 0xe74]
mov byte [ebp - 0xf78], bl
push eax
push ebx
mov dword [ebp - 0xf94], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ecx
lea eax, [ebp - 0xa6c]
push eax
lea eax, [ebp - 0x86c]
push eax
lea eax, [ebp - 0xc6c]
push eax
lea edx, [ebp - 0xc]
lea ecx, [ebp - 0xe74]
call fcn.00401a4f
pop ecx
pop ecx
lea eax, [ebp - 0x25c]
push eax
push ecx
call fcn.004025e4
xor edi, edi
add esp, 0x10
inc edi
mov esi, 0x420bd0
test eax, eax
jne 0x404b1e
lea eax, [ebp - 0x25c]
push 0x420bc8
push eax
call fcn.00406cab
pop ecx
pop ecx
test eax, eax
jne 0x404b1e
lea eax, [ebp - 0x25c]
push esi
push eax
call fcn.00406cab
test eax, eax
pop ecx
pop ecx
cmovne ebx, edi
mov edi, ebx
mov eax, 0x4213fc
xor edi, 1
cmp dword [ebp + 8], 0
cmove edi, ebx
test edi, edi
cmove esi, eax
lea eax, [ebp - 0x86c]
push esi
push eax
push str._s_s
lea eax, [ebp - 0x66c]
push 0x100
push eax
call fcn.00403fe8
mov ebx, dword [ebp - 0xf98]
lea eax, [ebp - 0xa6c]
add esp, 0x10
lea edx, [ebp - 0xc]
mov ecx, ebx
push eax
lea eax, [ebp - 0x66c]
push eax
lea eax, [ebp - 0xc6c]
push eax
call fcn.00401b8b
add esp, 0x10
lea eax, [ebp - 0x264]
mov esi, 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x404be0
cmp eax, esi
jae 0x404be0
push esi
lea eax, [ebp - 0x264]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x404be0
cmp eax, esi
jae 0x404be0
lea ecx, [ebp - 0x5c]
call fcn.004042ae
test eax, eax
je 0x404be0
push str..tmp
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x264]
push eax
push str._scs_s_s
lea eax, [ebp - 0x46c]
push esi
push eax
call fcn.00403fe8
add esp, 0x18
xor ecx, ecx
lea eax, [ebp - 0xf94]
push eax
test edi, edi
lea eax, [ebp - 0x46c]
push eax
setne cl
add ecx, 0x65
call fcn.00401cad
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x404c6b
cmp dword [ebp - 0xf94], 0
jbe 0x404c6b
push ebx
lea eax, [ebp - 0x66c]
push eax
lea eax, [ebp - 0x46c]
push eax
lea ecx, [ebp - 0xf90]
call fcn.004011d4
mov esi, eax
lea eax, [ebp - 0x46c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404c8d
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x46c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x404c8d
lea ecx, [ebp - 0x46c]
call fcn.0040190a
lea eax, [ebp - 0x46c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x404c8d
push 0x20
pop eax
push 0x40
pop ecx
test edi, edi
cmovne eax, ecx
push eax
push str.Failed_to_extract__d_bit_file_n
push 2
call fcn.0040df43
pop ecx
push eax
call fcn.00404356
add esp, 0xc
lea ecx, [ebp - 0xf90]
call fcn.00401075
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404d59
leave
ret