Function at 0x409f50
Capabilities:
Check if file exists
Delete file
Get file attributes
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4427da
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x198
mov al, byte [esp + 3]
push ebx
push ebp
push esi
mov ebp, ecx
push edi
push 0
lea ecx, [esp + 0x88]
mov dword [esp + 0x24], ebp
mov byte [esp + 0x88], al
call fcn.00403f10
mov edi, str._temp_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str._temp_
lea ecx, [esp + 0x8c]
call fcn.00403ab0
push 0x800
lea ecx, [esp + 0x88]
push 0
push ecx
lea ecx, [ebp + 0x1fc]
mov dword [esp + 0x1bc], 0
call fcn.0041f9e1
mov edx, dword [0x456404]
mov dword [esp + 0x38], edx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x1b0], 1
call fcn.0040a5f0
mov eax, dword [0x456404]
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x1b0], 3
call fcn.0040a5f0
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor eax, eax
mov ax, word [ebp + 0x104]
mov byte [esp + 0x1b0], 4
push eax
push 0x60
push 0
call ebx
push eax
lea ecx, [esp + 0x48]
call fcn.00426cda
neg eax
sbb eax, eax
neg eax
mov dword [esp + 0x1c], eax
jne 0x40a056
push str.Failed_to_load_localized_string
push str._s_failed_n
push 0x45a150
call fcn.0041a185
add esp, 0xc
jmp 0x40a08a
mov edi, dword [esp + 0x40]
test edi, edi
jne 0x40a063
mov edi, 0x445318
mov ecx, dword [esp + 0x44]
lea esi, [ecx + 1]
lea ecx, [esp + 0x38]
push esi
call fcn.0043bbbd
push esi
push edi
push eax
call fcn.00428ee8
add esp, 0xc
lea ecx, [esp + 0x38]
push 0xffffffffffffffff
call fcn.0043bc0c
xor eax, eax
mov ax, word [ebp + 0x104]
push eax
push 0x5a
push 0
call ebx
push eax
lea ecx, [esp + 0x34]
call fcn.00426cda
neg eax
sbb eax, eax
neg eax
mov dword [esp + 0x1c], eax
jne 0x40a0c9
push str.Failed_to_load_localized_string
push str._s_failed_n
push 0x45a150
call fcn.0041a185
add esp, 0xc
jmp 0x40a0fd
mov edi, dword [esp + 0x2c]
test edi, edi
jne 0x40a0d6
mov edi, 0x445318
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x24]
lea esi, [edx + 1]
push esi
call fcn.0043bbbd
push esi
push edi
push eax
call fcn.00428ee8
add esp, 0xc
lea ecx, [esp + 0x24]
push 0xffffffffffffffff
call fcn.0043bc0c
push 0x450c24
lea ecx, [esp + 0x20]
call fcn.0043ba73
push eax
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x74]
push eax
push ecx
mov byte [esp + 0x1bc], 5
call fcn.0043bb57
lea edx, [esp + 0x24]
mov byte [esp + 0x1b0], 6
push edx
push eax
lea eax, [esp + 0x74]
push eax
call fcn.0043bb57
mov cl, byte [esp + 0x13]
mov esi, dword [eax]
xor ebx, ebx
mov byte [esp + 0x74], cl
push ebx
lea ecx, [esp + 0x78]
mov byte [esp + 0x1b4], 7
call fcn.00403f10
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
lea ecx, [esp + 0x7c]
call fcn.00403ab0
lea ecx, [esp + 0x6c]
mov byte [esp + 0x1b0], 0xb
call fcn.0043ba49
lea ecx, [esp + 0x70]
mov byte [esp + 0x1b0], 0xa
call fcn.0043ba49
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1b0], 9
call fcn.0043ba49
push ebx
push ebx
mov ecx, ebp
mov dword [esp + 0x1c], ebx
call fcn.00403160
mov edx, dword [esp + 0x1b8]
mov eax, dword [edx + 4]
mov ebp, dword [eax]
cmp ebp, eax
je 0x40a3fa
jmp 0x40a1c8
xor ebx, ebx
mov al, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x50]
mov byte [esp + 0x50], al
call fcn.00403f10
lea esi, [ebp + 8]
lea ecx, [esp + 0x84]
push esi
lea edx, [esp + 0x98]
push ecx
push edx
mov byte [esp + 0x1bc], 0xc
call fcn.00405310
add esp, 0xc
mov ecx, dword [0x445314]
mov byte [esp + 0x1b0], 0xd
push ecx
push ebx
push eax
lea ecx, [esp + 0x58]
call fcn.004038b0
push 1
lea ecx, [esp + 0x98]
mov byte [esp + 0x1b4], 0xc
call fcn.00403f10
mov eax, dword [esp + 0x78]
mov ebx, dword [esp + 0x7c]
test eax, eax
mov dword [esp + 0x18], 0x445318
je 0x40a246
mov dword [esp + 0x18], eax
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
test eax, eax
jne 0x40a255
mov eax, 0x445318
push ecx
push eax
call fcn.00429d68
mov edx, dword [esp + 0x20]
push ebx
push edx
mov edi, eax
call fcn.00429d68
lea eax, [eax + edi + 1]
push eax
call fcn.0043ad23
mov edi, eax
add esp, 0x14
test edi, edi
je 0x40a2c8
mov esi, dword [esi + 4]
test esi, esi
jne 0x40a288
mov esi, 0x445318
mov eax, dword [esp + 0x78]
test eax, eax
jne 0x40a295
mov eax, 0x445318
push esi
push eax
push edi
call fcn.00428fc1
add esp, 0xc
lea edx, [esp + 0x13]
push 0
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
push edi
call fcn.00416280
mov ecx, dword [esp + 0x34]
call fcn.00402fc0
push edi
call fcn.0043ad4c
add esp, 4
mov al, byte [0x469cb0]
mov ecx, 0x40
mov byte [esp + 0xa4], al
xor eax, eax
lea edi, [esp + 0xa5]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40a2f4
mov eax, 0x445318
lea ecx, [esp + 0xa4]
push 0
push ecx
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea edi, [esp + 0xa4]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xa4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x54]
call fcn.00403ab0
lea eax, [esp + 0xa4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40a359
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40a34d
mov eax, 0x445318
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40a366
mov eax, 0x445318
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x40a440
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40a382
mov eax, 0x445318
push eax
push str.Deleted_file__s
push 1
push 0x45a150
call fcn.004018d0
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x1c8]
add esp, 0x10
inc ebx
mov eax, dword [esi + 8]
mov dword [esp + 0x14], ebx
fild dword [esp + 0x14]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], 0
push 0
fmul qword [0x445400]
fild qword [esp + 0x60]
fdivp st(1)
call fcn.00429dac
mov ecx, dword [esp + 0x24]
push eax
call fcn.00403160
push 1
lea ecx, [esp + 0x50]
mov byte [esp + 0x1b4], 9
call fcn.00403f10
mov ebp, dword [ebp]
mov eax, dword [esi + 4]
cmp ebp, eax
jne 0x40a1c6
xor ebx, ebx
push 1
lea ecx, [esp + 0x78]
mov byte [esp + 0x1b4], 4
call fcn.00403f10
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x1b0], 2
cmp eax, ebx
je 0x40a54b
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40a542
cmp al, 0xff
je 0x40a542
dec al
mov byte [ecx], al
jmp 0x40a54b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x60], cl
lea ecx, [esp + 0x60]
mov esi, eax
call fcn.00403f10
lea edx, [esp + 0x5c]
mov byte [esp + 0x1b0], 0xe
push edx
call fcn.00422f0d
mov ecx, dword [esp + 0x64]
add esp, 4
test ecx, ecx
jne 0x40a47d
mov ecx, 0x445318
mov eax, dword [esp + 0x50]
test eax, eax
jne 0x40a48a
mov eax, 0x445318
push ecx
push esi
push eax
push str.Failed_to_delete_file__s.__error0x_x_:__s
push 8
push 0x45a150
call fcn.004018d0
add esp, 0x18
lea ecx, [esp + 0x5c]
mov byte [esp + 0x1b0], 0xc
push 1
call fcn.00403f10
push 1
lea ecx, [esp + 0x50]
mov byte [esp + 0x1b4], 9
call fcn.00403f10
push 1
lea ecx, [esp + 0x78]
mov byte [esp + 0x1b4], 4
call fcn.00403f10
push 1
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1b4], 0xf
call fcn.00403f10
lea ecx, [esp + 0x24]
mov byte [esp + 0x1b0], 2
call fcn.0043ba49
push 1
lea ecx, [esp + 0x40]
mov byte [esp + 0x1b4], 0x10
call fcn.00403f10
lea ecx, [esp + 0x38]
mov byte [esp + 0x1b0], 0
call fcn.0043ba49
push 1
lea ecx, [esp + 0x88]
mov dword [esp + 0x1b4], 0xffffffff
call fcn.00403f10
xor eax, eax
jmp 0x40a5cc
push ecx
call fcn.0043ad4c
add esp, 4
lea ecx, [esp + 0x24]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.0043ba49
mov ecx, dword [esp + 0x40]
mov byte [esp + 0x1b0], 0
cmp ecx, ebx
je 0x40a58b
mov al, byte [ecx - 1]
dec ecx
test al, al
je 0x40a582
cmp al, 0xff
je 0x40a582
dec al
mov byte [ecx], al
jmp 0x40a58b
push ecx
call fcn.0043ad4c
add esp, 4
lea ecx, [esp + 0x38]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
call fcn.0043ba49
mov ecx, dword [esp + 0x88]
cmp ecx, ebx
je 0x40a5c7
mov al, byte [ecx - 1]
test al, al
je 0x40a5bd
cmp al, 0xff
je 0x40a5bd
dec al
mov byte [ecx - 1], al
jmp 0x40a5c7
dec ecx
push ecx
call fcn.0043ad4c
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x1a8]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x1a4
ret 4