Function at 0x40c1c0
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 0x40c203
push eax
mov dword [esp + 0x14], ecx
call esi
jmp 0x40c216
mov eax, dword [0x4d9540]
push ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], eax
call fcn.004016e0
mov eax, dword [esp + 0x10]
push ecx
mov ecx, esp
cmp dword [eax - 0xc], edi
jl 0x40c230
mov dword [ecx], eax
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffff4
push ecx
call esi
jmp 0x40c242
mov edx, dword [0x4d9540]
mov dword [ecx], edx
mov eax, dword [esp + 0x14]
push eax
call fcn.004016e0
call fcn.0048c0e0
add esp, 4
cmp eax, 1
jne 0x40c33f
mov eax, dword [esp + 0x10]
push ecx
mov ecx, esp
cmp dword [eax - 0xc], edi
jl 0x40c26d
mov dword [ecx], eax
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffff4
push ecx
call esi
jmp 0x40c27f
mov edx, dword [0x4d9540]
mov dword [ecx], edx
mov eax, dword [esp + 0x14]
push eax
call fcn.004016e0
mov ecx, ebp
call fcn.0040c730
cmp eax, edi
jne 0x40c2b4
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov dword [ebp + 0x1c], 1
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40c2f0
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40c2f0
jmp 0x40c2e0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x10]
mov edx, dword [0x4d9544]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40c2f0
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40c2f0
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
lea ecx, [esp + 0x1c]
call fcn.004104d0
mov eax, dword [esp + 0x484]
mov edx, dword [0x4d9544]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40c50f
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40c50f
mov edx, dword [esp + 0x484]
add edx, 0xfffffff4
push edx
call fcn.004c5432
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x470
ret 4
lea eax, [esp + 0x10]
push eax
call fcn.0040c530
mov ecx, dword [0x4d9540]
mov edx, 0x4da05c
add esp, 4
mov dword [esp + 0x14], ecx
test edx, edx
je 0x40c399
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
cmp esi, edi
je 0x40c399
push esi
lea ecx, [esp + 0x18]
call fcn.004012f0
test eax, eax
je 0x40c399
mov eax, dword [esp + 0x14]
inc esi
push esi
push 0x4da05c
push eax
call fcn.004011c0
add esp, 0xc
lea ecx, [esp + 0x14]
push 0xffffffffffffffff
call fcn.00401970
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax - 8]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401850
mov eax, dword [esp + 0x14]
mov ecx, dword [0x4d9544]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40c3da
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40c3da
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
push eax
call fcn.004c5432
add esp, 4
mov ecx, dword [esp + 0x10]
push ecx
lea ecx, [esp + 0x20]
call fcn.004103c0
test eax, eax
je 0x40c4be
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 0x40c40b
xor esi, esi
jmp 0x40c42b
mov ecx, dword [esp + 0x47c]
test ecx, ecx
jne 0x40c41a
xor esi, esi
jmp 0x40c42b
lea edx, [esp + 0x1c]
push edx
push eax
call edi
mov dword [esp + 0x47c], eax
mov esi, eax
lea ecx, [esp + 0x1c]
call fcn.00410380
test eax, eax
jne 0x40c4b4
push 0x10
lea ecx, [esp + 0x20]
call fcn.00410360
test eax, eax
je 0x40c47e
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
call fcn.00410170
push eax
lea ecx, [esp + 0x14]
call fcn.0040ec90
lea ecx, [esp + 0x18]
call fcn.004014c0
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
push edx
call fcn.00401200
mov ecx, ebp
call fcn.0040c1c0
jmp 0x40c4b4
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1c]
push eax
call fcn.00410170
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
push edx
call fcn.00401200
mov ecx, ebp
call fcn.0040c730
test eax, eax
je 0x40c51c
mov eax, dword [esp + 0x14]
push eax
call ebx
lea ecx, [esp + 0x14]
call fcn.004014c0
test esi, esi
jne 0x40c3fc
xor edi, edi
mov eax, dword [esp + 0x478]
mov dword [esp + 0x47c], edi
cmp eax, edi
je 0x40c4e3
cmp eax, 0xffffffff
je 0x40c4e3
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.004014c0
lea ecx, [esp + 0x1c]
call fcn.004104d0
lea ecx, [esp + 0x484]
call fcn.004014c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x470
ret 4
lea ecx, [esp + 0x14]
mov dword [ebp + 0x1c], 1
call fcn.004014c0
jmp 0x40c4f1