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

Disassembly:
push 0xffffffffffffffff
push 0x438b80
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44aaf0]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x30]
call fcn.0041dcb7
mov dword [esp + 0x54], 0
call fcn.00412a2b
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40f3c6
push 0x80004005
call fcn.00401ed0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x54], 1
mov ebp, dword [esp + 0x5c]
mov ecx, dword [ebp]
push ecx
lea edx, [esp + 0x20]
push str._s.
push edx
call fcn.00405da0
mov esi, dword [esp + 0x28]
add esp, 0xc
push 0
push esi
lea ecx, [esp + 0x38]
call fcn.0041dd43
test eax, eax
je 0x40f608
mov bl, 2
nop
lea ecx, [esp + 0x30]
call fcn.0041d9d0
lea ecx, [esp + 0x30]
mov dword [esp + 0x2c], eax
call fcn.0041dc7e
test eax, eax
jne 0x40f5f9
call fcn.00412a2b
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40f3bc
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x34]
mov byte [esp + 0x58], bl
call fcn.0041df72
mov esi, eax
mov byte [esp + 0x54], 3
mov eax, dword [esi]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, 0xc8
or eax, ecx
jge 0x40f490
push 0xc8
mov ecx, esi
call fcn.004021f0
mov esi, dword [esi]
test esi, esi
jne 0x40f49a
xor eax, eax
jmp 0x40f4ab
mov eax, esi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40f4a0
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x20]
call fcn.00402080
mov byte [esp + 0x54], bl
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f4da
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x30]
mov eax, dword [edx + 0x38]
push 0x10
lea ecx, [esp + 0x34]
call eax
test eax, eax
je 0x40f54c
call fcn.00412a2b
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40f3bc
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x5c], eax
mov byte [esp + 0x54], 4
mov edi, dword [esp + 0x18]
mov ecx, dword [ebp]
push edi
push ecx
lea edx, [esp + 0x64]
push str._s_s
push edx
call fcn.00405da0
mov ecx, dword [esp + 0x38]
add esp, 0x10
lea eax, [esp + 0x5c]
push eax
call fcn.0040f370
mov byte [esp + 0x54], bl
mov eax, dword [esp + 0x5c]
add eax, 0xfffffff0
jmp 0x40f5bf
call fcn.00412a2b
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40f3bc
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x54], 5
mov edi, dword [esp + 0x18]
mov ecx, dword [ebp]
push edi
push ecx
lea edx, [esp + 0x28]
push str._s_s
push edx
call fcn.00405da0
mov esi, dword [esp + 0x30]
add esp, 0x10
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40f5b8
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov byte [esp + 0x54], bl
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f5d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x54], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f5f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x2c], 0
jne 0x40f410
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x30]
call fcn.0041d900
mov eax, dword [ebp]
push 0
push eax
lea ecx, [esp + 0x38]
call fcn.0041dd43
test eax, eax
je 0x40f682
mov eax, dword [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x40f682
call fcn.0040fd40
push 0x43f458
push 0x442578
call fcn.0040fe10
lea eax, [esi - 0x10]
add esp, 8
mov byte [esp + 0x54], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f66a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x54], 0xffffffff
call fcn.0041dcdb
mov eax, 1
jmp 0x40f6b6
lea eax, [esi - 0x10]
mov byte [esp + 0x54], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f6a3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x30]
mov dword [esp + 0x54], 0xffffffff
call fcn.0041dcdb
xor eax, eax
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 4