Function at 0x407340
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x678
mov eax, dword [0x586e90]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x24c
lea eax, [ebp - 0x668]
push 0
push eax
mov dword [ebp - 0x670], ecx
mov dword [ebp - 0x66c], 0
call fcn.00511ac0
add esp, 0xc
xor ecx, ecx
push 0x206
push ecx
lea edx, [ebp - 0x41a]
push edx
mov word [ebp - 0x41c], cx
call fcn.00511ac0
lea edx, [ebp - 0x41c]
add esp, 0xc
mov eax, ebx
sub edx, ebx
jmp 0x4073b0
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4073b0
lea eax, [ebp - 0x41c]
lea edx, [eax + 2]
jmp 0x4073d0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4073d0
sub eax, edx
sar eax, 1
mov esi, 0x5c
cmp word [ebp + eax*2 - 0x41e], si
je 0x407413
lea edi, [ebp - 0x41c]
add edi, 0xfffffffe
jmp 0x407400
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x407400
mov eax, dword [0x561ea4]
mov dword [edi], eax
lea eax, [ebp - 0x41c]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x407420
mov ecx, dword [0x5650ac]
mov edx, dword [0x5650b0]
mov dword [eax], ecx
mov dword [eax + 4], edx
lea eax, [ebp - 0x66c]
push eax
lea ecx, [ebp - 0x41c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x674], eax
cmp eax, 0xffffffff
je 0x4076e0
mov ecx, 0x5650b4
lea eax, [ebp - 0x640]
jmp 0x407470
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407496
test dx, dx
je 0x407492
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407496
add eax, 4
add ecx, 4
test dx, dx
jne 0x407470
xor eax, eax
jmp 0x40749b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4076a2
mov ecx, 0x5650b8
lea eax, [ebp - 0x640]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4074d6
test dx, dx
je 0x4074d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4074d6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4074b0
xor eax, eax
jmp 0x4074db
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4076a2
test byte [ebp - 0x66c], 0x10
push 0x206
push 0
je 0x4075c9
lea eax, [ebp - 0x212]
xor edx, edx
push eax
mov word [ebp - 0x214], dx
call fcn.00511ac0
lea edx, [ebp - 0x214]
add esp, 0xc
mov eax, ebx
sub edx, ebx
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x407520
lea eax, [ebp - 0x214]
lea edx, [eax + 2]
jmp 0x407540
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407540
sub eax, edx
sar eax, 1
cmp word [ebp + eax*2 - 0x216], si
je 0x407576
lea edi, [ebp - 0x214]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x407562
mov ecx, dword [0x561ea4]
mov dword [edi], ecx
lea eax, [ebp - 0x640]
mov edx, eax
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407580
lea edi, [ebp - 0x214]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x407596
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea edx, [ebp - 0x214]
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x670]
push edx
call fcn.00407340
jmp 0x40769e
lea ecx, [ebp - 0x212]
xor eax, eax
push ecx
mov word [ebp - 0x214], ax
call fcn.00511ac0
lea edx, [ebp - 0x214]
add esp, 0xc
mov eax, ebx
sub edx, ebx
jmp 0x4075f0
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4075f0
lea eax, [ebp - 0x214]
lea edx, [eax + 2]
jmp 0x407610
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407610
sub eax, edx
sar eax, 1
cmp word [ebp + eax*2 - 0x216], si
je 0x407646
lea edi, [ebp - 0x214]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x407632
mov edx, dword [0x561ea4]
mov dword [edi], edx
lea eax, [ebp - 0x640]
mov edx, eax
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407650
lea edi, [ebp - 0x214]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x407666
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
lea eax, [ebp - 0x214]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [ebp - 0x214]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4076c4
mov esi, dword [ebp - 0x674]
lea edx, [ebp - 0x66c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x4076d9
mov esi, 0x5c
jmp 0x407460
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0050ec37
mov esp, ebp
pop ebp
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ecx, dword [ebp - 8]
neg eax
pop edi
sbb eax, eax
pop esi
xor ecx, ebp
neg eax
pop ebx
call fcn.0050ec37
mov esp, ebp
pop ebp
ret 4