Function at 0x502b70
Capabilities:
Delete file
Enumerate files on windows
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x5ceee8
mov eax, dword fs:[0]
push eax
sub esp, 0x32c
mov eax, dword [0x65b4e4]
xor eax, esp
mov dword [esp + 0x328], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65b4e4]
xor eax, esp
push eax
lea eax, [esp + 0x340]
mov dword fs:[0], eax
mov ecx, dword [esp + 0x350]
xor ebp, ebp
cmp ecx, ebp
mov dword [esp + 0x18], 1
je 0x502f92
cmp byte [ecx], 0
je 0x502f92
mov edi, 0xf
mov eax, ecx
mov dword [esp + 0x1f8], edi
mov dword [esp + 0x1f4], ebp
mov byte [esp + 0x1e4], 0
lea esi, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x502bf0
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0x1e8]
call fcn.004098b0
lea eax, [esp + 0xd4]
push eax
lea ecx, [esp + 0x1e4]
mov dword [esp + 0x34c], 2
call fcn.00425330
mov ecx, eax
call fcn.004258b0
cmp byte [eax], 0x5c
je 0x502c44
push 0x5c
push 1
lea ecx, [esp + 0x1e8]
call fcn.00407090
push 1
push 2
lea ecx, [esp + 0xe8]
call fcn.0040b160
push 0x5f32d8
lea ecx, [esp + 0x1e4]
push ecx
lea edx, [esp + 0xe8]
push edx
mov byte [esp + 0x354], 3
call fcn.00409360
add esp, 8
push eax
call fcn.00409c80
add esp, 8
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0xe4]
call fcn.00409610
mov ebx, 0x10
cmp dword [eax + 0x18], ebx
jb 0x502ca2
mov eax, dword [eax + 4]
jmp 0x502ca5
add eax, 4
lea ecx, [esp + 0x1fc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp dword [esp + 0x50], ebx
mov esi, eax
mov dword [esp + 0x14], esi
jb 0x502ccd
mov edx, dword [esp + 0x3c]
push edx
call fcn.00594e98
add esp, 4
cmp esi, 0xffffffff
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebp
mov byte [esp + 0x3c], 0
jne 0x502da6
push 1
push 2
lea ecx, [esp + 0x5c]
call fcn.0040b160
mov byte [esp + 0x348], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x58]
push str.FindFirstFile_INVALID_HANDLE_VALUE:
push eax
call fcn.00409c80
add esp, 8
mov ecx, eax
call fcn.004024e0
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x58]
call fcn.00409610
cmp dword [eax + 0x18], ebx
mov byte [esp + 0x348], 5
jb 0x502d38
mov eax, dword [eax + 4]
jmp 0x502d3b
add eax, 4
push eax
push str.BaseLib::CxxDeleteDirectoryFiles
push 0x8be
push str..common_function.cpp
push 0xf0000000
call fcn.00409980
mov ecx, eax
call fcn.004fa910
cmp dword [esp + 0x50], ebx
jb 0x502d6f
mov edx, dword [esp + 0x3c]
push edx
call fcn.00594e98
add esp, 4
lea ecx, [esp + 0xa0]
mov byte [esp + 0x348], 3
call fcn.00409f20
lea eax, [esp + 0xa0]
mov ebp, vtable.std::ios_base.0
push eax
mov dword [esp + 0xa4], ebp
call fcn.005cccbe
add esp, 4
xor esi, esi
jmp 0x502f24
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ebp, vtable.std::ios_base.0
push 1
call esi
push 1
push 2
lea ecx, [esp + 0x5c]
call fcn.0040b160
lea ecx, [esp + 0x228]
push ecx
lea edx, [esp + 0x1e4]
push edx
lea eax, [esp + 0x5c]
push eax
mov byte [esp + 0x354], 6
call fcn.00409360
add esp, 8
push eax
call fcn.00409c80
mov ecx, dword [esp + 0x204]
and ecx, ebx
add esp, 8
cmp cl, bl
jne 0x502e67
cmp byte [esp + 0x228], 0x2e
jne 0x502e2e
lea ecx, [esp + 0xa0]
mov byte [esp + 0x348], 3
call fcn.00409f20
lea edx, [esp + 0xa0]
push edx
jmp 0x502eeb
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x58]
call fcn.00409610
cmp dword [eax + 0x18], ebx
mov byte [esp + 0x348], 7
jb 0x502e4e
mov eax, dword [eax + 4]
jmp 0x502e51
add eax, 4
push eax
call fcn.005007e0
add esp, 4
cmp dword [esp + 0x34], ebx
jb 0x502ecf
mov ecx, dword [esp + 0x20]
push ecx
jmp 0x502ec7
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x58]
call fcn.00409610
cmp dword [eax + 0x18], ebx
jb 0x502e7f
mov eax, dword [eax + 4]
jmp 0x502e82
add eax, 4
push 0
push eax
call edi
cmp dword [esp + 0x34], ebx
jb 0x502e9a
mov eax, dword [esp + 0x20]
push eax
call fcn.00594e98
add esp, 4
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x58]
call fcn.00409610
cmp dword [eax + 0x18], ebx
jb 0x502eb2
mov eax, dword [eax + 4]
jmp 0x502eb5
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0x34], ebx
jb 0x502ecf
mov edx, dword [esp + 0x20]
push edx
call fcn.00594e98
add esp, 4
lea ecx, [esp + 0xa0]
mov byte [esp + 0x348], 3
call fcn.00409f20
lea eax, [esp + 0xa0]
push eax
mov dword [esp + 0xa4], ebp
call fcn.005cccbe
mov edx, dword [esp + 0x18]
add esp, 4
lea ecx, [esp + 0x1fc]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x502db7
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x12c]
mov byte [esp + 0x348], 2
call fcn.00409f20
lea ecx, [esp + 0x12c]
push ecx
mov dword [esp + 0x130], ebp
call fcn.005cccbe
add esp, 4
cmp dword [esp + 0x1f8], ebx
jb 0x502f68
mov edx, dword [esp + 0x1e4]
push edx
call fcn.00594e98
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x340]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.005b0968
add esp, 0x338
ret
push 1
push 2
lea ecx, [esp + 0x168]
call fcn.0040b160
lea eax, [esp + 0x160]
push 0x5f34f4
push eax
mov dword [esp + 0x350], ebp
call fcn.00409c80
add esp, 8
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x164]
call fcn.00409610
mov ebx, 0x10
cmp dword [eax + 0x18], ebx
mov byte [esp + 0x348], 1
jb 0x502fe6
mov eax, dword [eax + 4]
jmp 0x502fe9
add eax, 4
push eax
push str.BaseLib::CxxDeleteDirectoryFiles
push 0x8ad
push str..common_function.cpp
push 0xf0000000
call fcn.00409980
mov ecx, eax
call fcn.004fa910
cmp dword [esp + 0x34], ebx
jb 0x50301d
mov edx, dword [esp + 0x20]
push edx
call fcn.00594e98
add esp, 4
lea ecx, [esp + 0x1ac]
mov dword [esp + 0x348], 0xffffffff
call fcn.00409f20
lea eax, [esp + 0x1ac]
push eax
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005cccbe
add esp, 4
xor eax, eax
jmp 0x502f6a