Function at 0x507378
Capabilities:
Delete directory
Delete file

Disassembly:
mov eax, 0x6bc5cd
call fcn.0066bd6c
sub esp, 0x70
push ebx
mov ebx, dword [ecx + 8]
push esi
mov esi, dword [ecx + 4]
mov dword [ebp - 0x18], ebx
cmp esi, ebx
je 0x5075ff
add ecx, 0x28
mov dword [ebp - 0x1c], ecx
push edi
push 0
lea eax, [esi + 0x38]
push eax
push ecx
lea eax, [ebp - 0x64]
push eax
call fcn.0045e484
and dword [ebp - 4], 0
cmp dword [eax + 0x14], 8
jb 0x5073bb
mov eax, dword [eax]
and dword [ebp - 0x34], 0
xor ecx, ecx
and dword [ebp - 0x24], 0
mov word [ebp - 0x34], cx
lea ecx, [ebp - 0x34]
push eax
mov dword [ebp - 0x20], 7
call fcn.00427613
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 2
call fcn.0042756c
mov edx, dword [ebp - 0x20]
lea edi, [ebp - 0x34]
mov ecx, dword [ebp - 0x34]
cmp edx, 8
jb 0x5073f5
mov edi, ecx
mov eax, dword [ebp - 0x24]
sub eax, dword [esi + 0x48]
lea edi, [edi + eax*2]
add edi, 0xfffffffe
lea eax, [ebp - 0x34]
cmp edx, 8
jb 0x50740b
mov eax, ecx
push 0x5c
push eax
call fcn.0066f61b
pop ecx
pop ecx
cmp eax, edi
jb 0x5075ad
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x34]
cmp dword [ebp - 0x20], 8
jb 0x50742e
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryW]
test eax, eax
jne 0x5075a2
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x91
jne 0x5075a2
and dword [ebp - 0x4c], 0
lea ecx, [ebp - 0x4c]
and dword [ebp - 0x3c], 0
xor eax, eax
push str.thumbs.db
mov dword [ebp - 0x38], 7
mov word [ebp - 0x4c], ax
call fcn.00427613
push 0
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.0045e484
cmp dword [eax + 0x14], 8
jb 0x50748f
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
lea ecx, [ebp - 0x7c]
setne bh
call fcn.0042756c
mov eax, dword [ebp - 0x38]
mov byte [ebp - 4], 2
cmp eax, 8
jb 0x5074e2
mov ecx, dword [ebp - 0x4c]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
cmp eax, 0x1000
jb 0x5074d9
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0042741e
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
and dword [ebp - 0x4c], 0
lea ecx, [ebp - 0x4c]
and dword [ebp - 0x3c], 0
xor eax, eax
push str..DS_Store
mov dword [ebp - 0x38], 7
mov word [ebp - 0x4c], ax
call fcn.00427613
push 0
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.0045e484
cmp dword [eax + 0x14], 8
jb 0x507523
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
lea ecx, [ebp - 0x7c]
setne bl
call fcn.0042756c
mov eax, dword [ebp - 0x38]
mov byte [ebp - 4], 2
cmp eax, 8
jb 0x507576
mov ecx, dword [ebp - 0x4c]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
cmp eax, 0x1000
jb 0x50756d
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0042741e
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
test bh, bh
jne 0x50757e
test bl, bl
je 0x5075ad
cmp dword [ebp - 0x20], 8
lea eax, [ebp - 0x34]
jb 0x50758a
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryW]
test eax, eax
jne 0x5075a2
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x91
je 0x5075ad
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x34]
jmp 0x507401
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x20]
cmp eax, 8
jb 0x5075ec
mov ecx, dword [ebp - 0x34]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
cmp eax, 0x1000
jb 0x5075e3
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0042741e
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
push eax
push ecx
call fcn.0066bb0a
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
add esi, 0xa0
cmp esi, dword [ebp - 0x18]
jne 0x50739f
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret