Function at 0x409040
Capabilities:
Delete directory
Delete file
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x45ebf2
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x484904]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov eax, dword [0x486034]
cmp eax, 0xffffffff
mov byte [0x486047], 1
je 0x409085
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
cmp dword [0x491604], ebx
jle 0x4090c3
xor esi, esi
cmp esi, ebx
jl 0x40931a
cmp edi, dword [0x4915f8]
jge 0x40931a
mov eax, dword [0x4915f4]
mov eax, dword [esi + eax + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
add edi, 1
add esi, 0xc
cmp edi, dword [0x491604]
jl 0x409091
cmp byte [0x486048], bl
jne 0x409306
sub esp, 0xc
mov ecx, esp
mov dword [esp + 0x24], esp
push 2
push ecx
call fcn.0041e7b0
lea edx, [esp + 0x40]
add esp, 8
push edx
call fcn.00403c40
add esp, 0x10
push str.C:Program_FilesCommon_FilesBorland_SharedBDE
lea ecx, [esp + 0x24]
mov dword [esp + 0x5c], ebx
call fcn.0041f3f0
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x5c], 1
call fcn.0041f620
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x5c], 2
call fcn.0041f3c0
lea ecx, [esp + 0x38]
mov byte [esp + 0x58], 1
call fcn.0041f1d0
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x24]
call fcn.0041f620
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x5c], 3
call fcn.0041f3c0
lea ecx, [esp + 0x38]
mov byte [esp + 0x58], 1
call fcn.0041f1d0
xor edi, edi
cmp dword [0x491660], ebx
jle 0x409296
xor esi, esi
lea ebp, [edi + 6]
push 0
sub esp, 0xc
lea edx, [esp + 0x3c]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.0041f330
test esi, esi
mov byte [esp + 0x68], 4
jl 0x40931a
cmp edi, dword [0x491654]
jge 0x40931a
mov eax, dword [0x491650]
lea edx, [esp + 0x54]
lea ecx, [esi + eax]
push edx
call fcn.0041f620
or ebx, 1
mov byte [esp + 0x68], 5
mov dword [esp + 0x28], ebx
mov ecx, eax
mov dword [esp + 0x68], ebp
call fcn.0041f290
test eax, eax
jg 0x40922a
push 0
sub esp, 0xc
lea eax, [esp + 0x30]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
call fcn.0041f330
cmp edi, dword [0x491654]
mov dword [esp + 0x68], 7
jge 0x40931a
mov ecx, dword [0x491650]
lea edx, [esp + 0x48]
add ecx, esi
push edx
call fcn.0041f620
or ebx, 2
mov byte [esp + 0x68], 8
mov dword [esp + 0x28], ebx
mov ecx, eax
mov dword [esp + 0x68], 9
call fcn.0041f290
test eax, eax
mov byte [esp + 0x17], 0
jle 0x40922f
mov byte [esp + 0x17], 1
test bl, 2
mov dword [esp + 0x58], ebp
je 0x409248
and ebx, 0xfffffffd
lea ecx, [esp + 0x38]
mov dword [esp + 0x18], ebx
call fcn.0041f1d0
test bl, 1
mov dword [esp + 0x58], 1
je 0x409261
lea ecx, [esp + 0x44]
and ebx, 0xfffffffe
call fcn.0041f1d0
cmp byte [esp + 0x17], 0
jne 0x409284
cmp edi, dword [0x491654]
jge 0x40931a
mov eax, dword [0x491650]
mov eax, dword [esi + eax + 4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
add edi, 1
add esi, 0xc
cmp edi, dword [0x491660]
jl 0x409170
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x467ca0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor edi, edi
cmp dword [0x491680], edi
jle 0x4092e7
mov ebx, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
xor esi, esi
jmp 0x4092c0
test esi, esi
jl 0x40931a
cmp edi, dword [0x491674]
jge 0x40931a
mov ecx, dword [0x491670]
mov eax, dword [esi + ecx + 4]
push eax
call ebx
add edi, 1
add esi, 0xc
cmp edi, dword [0x491680]
jl 0x4092c0
lea ecx, [esp + 0x20]
mov byte [esp + 0x58], 0
call fcn.0041f1d0
lea ecx, [esp + 0x2c]
mov dword [esp + 0x58], 0xffffffff
call fcn.0041f1d0
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
jmp fcn.00428114