Function at 0x479010
Capabilities:
Enumerate files on windows
Enumerate files recursively
Get file attributes
Set file attributes

Disassembly:
push ebp
lea ebp, [esp - 0x254]
sub esp, 0x254
push 0xffffffffffffffff
push 0x5157a0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
mov eax, dword [0x57c080]
xor eax, ebp
mov dword [ebp + 0x250], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax]
sub ecx, 0x10
call fcn.004070e1
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 1
lea ebx, [esi - 0xc]
mov ecx, dword [ebx]
mov dword [ebp - 0x14], ecx
test ecx, ecx
jle 0x4790d3
lea eax, [ecx - 1]
test eax, eax
js 0x479400
cmp eax, ecx
jg 0x479400
cmp word [esi + eax*2], 0x5c
je 0x4790d3
lea edi, [ecx + 1]
test edi, edi
js 0x479400
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x4790b3
push edi
lea ecx, [ebp - 0x18]
call fcn.0040d6fc
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov ecx, 0x5c
mov word [esi + eax*2], cx
cmp edi, dword [esi - 8]
jg 0x479400
lea ebx, [esi - 0xc]
xor eax, eax
mov dword [ebx], edi
mov word [esi + edi*2], ax
push 0x53ea28
call fcn.004e0c46
mov ebx, dword [ebx]
mov edi, 0x53ea28
sub edi, esi
mov dword [ebp - 0x10], ebx
add esp, 4
sar edi, 1
test eax, eax
js 0x479400
push eax
push 0x53ea28
call fcn.004e3927
mov edx, eax
mov ecx, 0x7fffffff
sub ecx, edx
mov dword [ebp - 0x14], edx
add esp, 8
cmp ecx, ebx
jl 0x479400
add ebx, edx
js 0x479400
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x479140
push ebx
lea ecx, [ebp - 0x18]
call fcn.0040d6fc
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
lea ecx, [esi + edi*2]
cmp edi, eax
jbe 0x47914f
mov ecx, 0x53ea28
add edx, edx
push edx
push ecx
lea ecx, [esi + eax*2]
call fcn.0040d7d5
add esp, 8
cmp ebx, dword [esi - 8]
jg 0x479400
xor eax, eax
mov dword [esi - 0xc], ebx
push 0x250
push eax
mov word [esi + ebx*2], ax
lea eax, [ebp]
push eax
call fcn.004de9a0
add esp, 0xc
lea eax, [ebp]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
or ebx, 0xffffffff
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x4793a3
cmp word [ebp + 0x2c], 0x2e
jne 0x4791c6
mov ax, word [ebp + 0x2e]
test ax, ax
je 0x47938b
cmp ax, 0x2e
jne 0x4791c6
cmp word [ebp + 0x30], 0
je 0x47938b
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
sub ecx, 0x10
call fcn.004070e1
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x10]
mov ebx, dword [eax - 0xc]
test ebx, ebx
jle 0x47924a
lea ecx, [ebx - 1]
test ecx, ecx
js 0x479400
cmp ecx, ebx
jg 0x479400
cmp word [eax + ecx*2], 0x5c
je 0x47924a
lea edi, [ebx + 1]
test edi, edi
js 0x479400
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, edi
or ecx, edx
jge 0x479229
push edi
lea ecx, [ebp - 0x10]
call fcn.0040d6fc
mov eax, dword [ebp - 0x10]
mov ecx, 0x5c
mov word [eax + ebx*2], cx
mov eax, dword [ebp - 0x10]
cmp edi, dword [eax - 8]
jg 0x479400
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [ebp - 0x10]
mov word [eax + edi*2], cx
lea eax, [ebp + 0x2c]
push eax
call fcn.004e0c46
lea ecx, [ebp + 0x2c]
add esp, 4
mov ebx, ecx
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x10]
sub ebx, ecx
sar ebx, 1
mov edi, dword [ecx - 0xc]
mov dword [ebp - 0x20], edi
test eax, eax
js 0x479400
push eax
lea eax, [ebp + 0x2c]
push eax
call fcn.004e3927
mov ecx, 0x7fffffff
mov dword [ebp - 0x28], eax
sub ecx, eax
add esp, 8
cmp ecx, edi
jl 0x479400
add edi, eax
js 0x479400
mov eax, dword [ebp - 0x10]
mov edx, 1
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, edi
or ecx, edx
jge 0x4792ba
push edi
lea ecx, [ebp - 0x10]
call fcn.0040d6fc
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
cmp ebx, ecx
lea ebx, [eax + ebx*2]
jbe 0x4792c7
mov ebx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
lea ecx, [eax + ecx*2]
add edx, edx
push edx
push ebx
call fcn.0040d7d5
mov eax, dword [ebp - 0x10]
add esp, 8
cmp edi, dword [eax - 8]
jg 0x479400
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [ebp - 0x10]
mov word [eax + edi*2], cx
test byte [ebp], 0x10
je 0x479325
mov dl, 1
lea ecx, [ebp - 0x10]
call fcn.00479010
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x47931b
and eax, 0xfffffffe
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [ebp - 0x10]
call fcn.00479410
jmp 0x479347
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x47933f
and eax, 0xfffffffe
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [ebp - 0x10]
call fcn.004796b0
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x10]
mov eax, ebx
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x479385
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, 0x534850
jne 0x4793fa
mov eax, dword [edx + 4]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [eax + 4]
call edi
jmp 0x47938b
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
lea eax, [ebp]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4791a1
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4793d7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, 0x534850
jne 0x47940a
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x250]
xor ecx, ebp
call fcn.004dab44
lea esp, [ebp + 0x254]
pop ebp
ret
mov ecx, edx
call edi
jmp 0x479385
push 0x80070057
call fcn.0040d85a
call edx
jmp 0x4793d7