Function at 0x504130
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59ee2b
mov eax, dword fs:[0]
push eax
sub esp, 0x1c4
mov eax, dword [0x62d12c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0xffffffffffffffff
xor edi, edi
mov esi, ecx
push edi
push esi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], edi
mov byte [ebp - 0x2c], 0
call fcn.00421c90
mov ecx, esi
mov dword [ebp - 4], edi
call fcn.00503720
test eax, eax
jne 0x5041a3
cmp dword [ebp - 0x18], 0x10
jb 0x50419c
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00558723
add esp, 4
xor eax, eax
jmp 0x5043a2
push 1
push 0x5d78cc
lea ecx, [ebp - 0x2c]
call fcn.00416b30
mov eax, dword [ebp - 0x2c]
mov ebx, 0x10
cmp dword [ebp - 0x18], ebx
jae 0x5041c2
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x1cc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x1d0], eax
cmp eax, 0xffffffff
jne 0x5041fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp dword [ebp - 0x18], ebx
jb 0x5041f4
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00558723
add esp, 4
mov eax, esi
jmp 0x5043a2
mov ebx, dword [ebp + 8]
mov edi, edi
lea eax, [ebp - 0x1a0]
push 0x5c0494
push eax
call fcn.0055ffa6
add esp, 8
test eax, eax
je 0x504310
lea ecx, [ebp - 0x1a0]
push 0x5d6c18
push ecx
call fcn.0055ffa6
add esp, 8
test eax, eax
je 0x504310
lea edx, [ebp - 0x1a0]
push edx
lea eax, [ebp - 0x48]
push esi
push eax
call fcn.00503f10
add esp, 0xc
push eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.0041fd30
mov ecx, 0x10
mov byte [ebp - 4], 0
cmp dword [ebp - 0x34], ecx
jb 0x504278
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.00558723
add esp, 4
mov ecx, 0x10
mov eax, dword [ebp - 0x1cc]
test al, 1
je 0x5042a9
and eax, 0xfffffffe
cmp dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x1cc], eax
jae 0x504296
lea ecx, [ebp - 0x2c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [ebp - 0x1cc]
mov ecx, 0x10
test al, 0x10
mov eax, dword [ebp - 0x2c]
je 0x5042ed
cmp dword [ebp - 0x18], ecx
jae 0x5042b8
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x8c]
call fcn.00503a40
push ebx
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 2
call fcn.00504130
mov edi, eax
test bl, bl
je 0x5042dc
xor edi, edi
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 0
call fcn.00503820
jmp 0x50430c
cmp dword [ebp - 0x18], ecx
jae 0x5042f5
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x504310
test bl, bl
jne 0x504310
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jne 0x50432c
mov eax, dword [ebp - 0x1d0]
lea edx, [ebp - 0x1cc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x504200
mov ecx, dword [ebp - 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [esi + 0x14], 0x10
jb 0x504343
mov eax, dword [esi]
jmp 0x504345
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x504367
and eax, 0xfffffffe
cmp dword [esi + 0x14], 0x10
jb 0x50435d
mov ecx, dword [esi]
jmp 0x50435f
mov ecx, esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test edi, edi
jne 0x50438e
cmp dword [esi + 0x14], 0x10
jb 0x504375
mov eax, dword [esi]
jmp 0x504377
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x50438e
test bl, bl
jne 0x50438e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp dword [ebp - 0x18], 0x10
jb 0x5043a0
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00558723
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00558b78
mov esp, ebp
pop ebp
ret 4