Function at 0x479492
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x484
mov eax, dword [0x501344]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov eax, dword [ebx]
push edi
xor edi, edi
mov dword [ebp - 0x484], ebx
mov esi, edx
cmp dword [eax - 0xc], edi
je 0x4797ab
push 0x104
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push dword [ebx]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4797ab
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x479508
mov eax, dword [ebx]
call fcn.0044eab0
test eax, eax
je 0x4797ab
lea eax, [ebp - 0x474]
push eax
mov eax, dword [esi]
push 0x3b
mov dword [ebp - 0x474], edi
mov dword [ebp - 0x470], edi
call fcn.00462070
cmp dword [ebp - 0x474], edi
pop ecx
pop ecx
push ebx
lea eax, [ebp - 0x47c]
push eax
seta byte [ebp - 0x462]
call fcn.0041f17d
push 0x4d987c
lea eax, [ebp - 0x47c]
push eax
call fcn.00439083
lea eax, [ebp - 0x460]
push eax
push dword [ebp - 0x47c]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x480], eax
cmp eax, 0xffffffff
je 0x47978d
lea eax, [ebp - 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x47978d
test byte [ebp - 0x460], 0x10
mov edi, 0x4d8c20
jne 0x479766
push ebx
lea eax, [ebp - 0x468]
push eax
call fcn.0041f17d
push edi
lea eax, [ebp - 0x468]
push eax
call fcn.00439083
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x468]
push eax
call fcn.00439083
cmp byte [ebp - 0x462], 0
sete byte [ebp - 0x461]
cmp byte [ebp - 0x462], 0
je 0x47963d
cmp dword [ebp - 0x474], 0
jbe 0x47963d
mov esi, dword [ebp - 0x470]
mov eax, dword [ebp - 0x474]
add esi, 4
mov dword [ebp - 0x478], eax
push dword [esi]
lea eax, [ebp - 0x46c]
push eax
call fcn.00405d14
push dword [ebp - 0x468]
lea eax, [ebp - 0x46c]
push eax
call fcn.0042e27d
test eax, eax
jne 0x479627
mov byte [ebp - 0x461], 1
lea ecx, [ebp - 0x46c]
call fcn.004058a3
add esi, 8
dec dword [ebp - 0x478]
jne 0x4795fc
cmp byte [ebp - 0x461], 0
je 0x479652
push dword [ebp - 0x468]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x468]
call fcn.004058a3
jmp 0x479766
test byte [ebp - 0x460], 0x10
jne 0x479766
push ebx
lea eax, [ebp - 0x468]
push eax
call fcn.0041f17d
lea eax, [ebp - 0x478]
push eax
lea eax, [ebp - 0x468]
xor ecx, ecx
push eax
inc ecx
call fcn.0042e0e7
push edi
push eax
call fcn.0042e27d
test eax, eax
lea ecx, [ebp - 0x478]
setne bl
call fcn.004058a3
test bl, bl
je 0x4796ba
push edi
lea eax, [ebp - 0x468]
push eax
call fcn.00439083
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x468]
push eax
call fcn.00439083
cmp byte [ebp - 0x462], 0
sete byte [ebp - 0x461]
cmp byte [ebp - 0x462], 0
je 0x479740
xor ebx, ebx
cmp dword [ebp - 0x474], ebx
jbe 0x479740
mov esi, dword [ebp - 0x470]
add esi, 4
push dword [esi]
lea eax, [ebp - 0x46c]
push eax
call fcn.00405d14
push dword [ebp - 0x468]
lea eax, [ebp - 0x46c]
push eax
call fcn.0042e27d
lea ecx, [ebp - 0x46c]
test eax, eax
je 0x479734
call fcn.004058a3
inc ebx
add esi, 8
cmp ebx, dword [ebp - 0x474]
jb 0x4796f7
jmp 0x479740
mov byte [ebp - 0x461], 1
call fcn.004058a3
cmp byte [ebp - 0x461], 0
je 0x479755
push dword [ebp - 0x468]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x468]
call fcn.004058a3
mov ebx, dword [ebp - 0x484]
lea eax, [ebp - 0x460]
push eax
push dword [ebp - 0x480]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x479662
push dword [ebp - 0x480]
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea ecx, [ebp - 0x47c]
call fcn.004058a3
lea esi, [ebp - 0x474]
call fcn.0046202d
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049c07b
leave
ret