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

Disassembly:
push 0xffffffffffffffff
push 0x42e06b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x624
push ebx
push ebp
push esi
lea ebp, [ecx + 0xd0]
lea eax, [esp + 0x10]
push edi
mov dword [esp + 0x18], ecx
xor ebx, ebx
push eax
mov ecx, ebp
mov dword [esp + 0x18], ebx
call fcn.00404870
cmp eax, ebx
jbe 0x40540a
xor esi, esi
mov edi, eax
mov ecx, dword [esp + 0x14]
push 0x20
lea edx, [esi + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [esp + 0x14]
lea ecx, [esi + eax]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esi, 0x104
dec edi
jne 0x4053e3
mov edx, dword [esp + 0x14]
mov ecx, ebp
push edx
call fcn.00404ba0
mov al, byte [0x440950]
mov ecx, 0x40
mov byte [esp + 0x1c], al
xor eax, eax
lea edi, [esp + 0x1d]
lea edx, [esp + 0x42c]
rep stosd dword es:[edi], eax
mov cx, word [0x440954]
push edx
stosw word es:[edi], ax
stosb byte es:[edi], al
mov word [esp + 0x228], cx
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x22a]
rep stosd dword es:[edi], eax
mov ecx, ebp
stosw word es:[edi], ax
call fcn.00403bd0
cmp byte [esp + 0x530], bl
je 0x40553e
mov esi, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esp + 0x530]
lea ecx, [esp + 0x42c]
push eax
push ecx
lea edx, [esp + 0x24]
push 0x43c300
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x4054b8
and al, 0xfe
lea ecx, [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [esp + 0x1c]
push edx
call esi
lea eax, [esp + 0x224]
push 0x104
push eax
lea ecx, [esp + 0x538]
push 0xffffffffffffffff
push ecx
push ebx
push ebx
call edi
cmp eax, ebx
jle 0x40553e
lea edx, [esp + 0x224]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
dec eax
js 0x405504
lea ecx, [esp + eax*2 + 0x224]
cmp word [ecx], 0x5c
je 0x405504
dec eax
sub ecx, 2
cmp eax, ebx
jge 0x4054f6
cmp eax, ebx
jle 0x40553e
mov word [esp + eax*2 + 0x224], bx
push ebx
push ebx
lea eax, [esp + 0x538]
push 0x104
push eax
lea ecx, [esp + 0x234]
push 0xffffffffffffffff
push ecx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp byte [esp + 0x530], bl
jne 0x405478
lea edx, [esp + 0x10]
mov ecx, ebp
push edx
call fcn.00403b50
mov eax, dword [esp + 0x10]
mov dword [esp + 0x63c], ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405573
test al, 1
je 0x405573
mov ecx, dword [esp + 0x10]
and al, 0xfe
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov al, byte [0x440950]
mov ecx, 0x40
mov byte [esp + 0x120], al
xor eax, eax
lea edi, [esp + 0x121]
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x124]
push ecx
push ebx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x120]
push ebx
push edx
call fcn.00406c60
lea ecx, [esp + 0x10]
mov dword [esp + 0x63c], 0xffffffff
call fcn.00422a0b
mov ecx, dword [esp + 0x634]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x630
ret