Function at 0x40fec0
Capabilities:
Delete directory
Delete file

Disassembly:
sub esp, 0x470
push ebx
push ebp
mov ebp, ecx
push esi
mov ecx, dword [esp + 0x480]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push edi
xor edi, edi
lea eax, [ecx - 0xc]
mov word [esp + 0x474], 0x5c
mov dword [esp + 0x478], edi
mov dword [esp + 0x47c], edi
cmp dword [eax], edi
jl 0x40ff03
push eax
mov dword [esp + 0x14], ecx
call esi
jmp 0x40ff16
mov eax, dword [0x546560]
push ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], eax
call fcn.00405920
mov eax, dword [esp + 0x10]
push ecx
mov ecx, esp
cmp dword [eax - 0xc], edi
jl 0x40ff30
mov dword [ecx], eax
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffff4
push ecx
call esi
jmp 0x40ff42
mov edx, dword [0x546560]
mov dword [ecx], edx
mov eax, dword [esp + 0x14]
push eax
call fcn.00405920
call fcn.004b9470
add esp, 4
cmp eax, 1
jne 0x41003f
mov eax, dword [esp + 0x10]
push ecx
mov ecx, esp
cmp dword [eax - 0xc], edi
jl 0x40ff6d
mov dword [ecx], eax
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffff4
push ecx
call esi
jmp 0x40ff7f
mov edx, dword [0x546560]
mov dword [ecx], edx
mov eax, dword [esp + 0x14]
push eax
call fcn.00405920
mov ecx, ebp
call fcn.00410430
cmp eax, edi
jne 0x40ffb4
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov dword [ebp + 0x1c], 1
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40fff0
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40fff0
jmp 0x40ffe0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x10]
mov edx, dword [0x546564]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40fff0
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40fff0
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
lea ecx, [esp + 0x1c]
call fcn.004141f0
mov eax, dword [esp + 0x484]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x41020f
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x41020f
mov edx, dword [esp + 0x484]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x470
ret 4
lea eax, [esp + 0x10]
push eax
call fcn.00410230
mov ecx, dword [0x546560]
mov edx, 0x547304
add esp, 4
mov dword [esp + 0x14], ecx
test edx, edx
je 0x410099
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
cmp esi, edi
je 0x410099
push esi
lea ecx, [esp + 0x18]
call fcn.00405530
test eax, eax
je 0x410099
mov eax, dword [esp + 0x14]
inc esi
push esi
push 0x547304
push eax
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x14]
push 0xffffffffffffffff
call fcn.00405bb0
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax - 8]
push ecx
lea ecx, [esp + 0x18]
call fcn.00405a90
mov eax, dword [esp + 0x14]
mov ecx, dword [0x546564]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x4100da
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4100da
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
push eax
call fcn.00531732
add esp, 4
mov ecx, dword [esp + 0x10]
push ecx
lea ecx, [esp + 0x20]
call fcn.004140e0
test eax, eax
je 0x4101be
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov eax, dword [esp + 0x478]
test eax, eax
jne 0x41010b
xor esi, esi
jmp 0x41012b
mov ecx, dword [esp + 0x47c]
test ecx, ecx
jne 0x41011a
xor esi, esi
jmp 0x41012b
lea edx, [esp + 0x1c]
push edx
push eax
call edi
mov dword [esp + 0x47c], eax
mov esi, eax
lea ecx, [esp + 0x1c]
call fcn.004140a0
test eax, eax
jne 0x4101b4
push 0x10
lea ecx, [esp + 0x20]
call fcn.00414080
test eax, eax
je 0x41017e
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
call fcn.00413e90
push eax
lea ecx, [esp + 0x14]
call fcn.004129b0
lea ecx, [esp + 0x18]
call fcn.00405700
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
push edx
call fcn.00405440
mov ecx, ebp
call fcn.0040fec0
jmp 0x4101b4
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1c]
push eax
call fcn.00413e90
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
push edx
call fcn.00405440
mov ecx, ebp
call fcn.00410430
test eax, eax
je 0x41021c
mov eax, dword [esp + 0x14]
push eax
call ebx
lea ecx, [esp + 0x14]
call fcn.00405700
test esi, esi
jne 0x4100fc
xor edi, edi
mov eax, dword [esp + 0x478]
mov dword [esp + 0x47c], edi
cmp eax, edi
je 0x4101e3
cmp eax, 0xffffffff
je 0x4101e3
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [esp + 0x478], edi
mov ecx, dword [esp + 0x484]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea ecx, [esp + 0x10]
call fcn.00405700
lea ecx, [esp + 0x1c]
call fcn.004141f0
lea ecx, [esp + 0x484]
call fcn.00405700
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x470
ret 4
lea ecx, [esp + 0x14]
mov dword [ebp + 0x1c], 1
call fcn.00405700
jmp 0x4101f1