Function at 0x401640
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x674
mov eax, dword [0x536400]
xor eax, esp
mov dword [esp + 0x670], eax
push ebp
push esi
mov esi, dword [esp + 0x680]
lea edx, [esp + 0x46c]
push edi
mov dword [esp + 0x14], esi
mov eax, esi
sub edx, esi
lea ecx, [ecx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x401670
lea eax, [esp + 0x470]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x401690
mov ecx, dword [0x4c3ca0]
mov dx, word [0x4c3ca4]
mov dword [eax], ecx
mov word [eax + 4], dx
lea edx, [esp + 0x268]
mov eax, esi
sub edx, esi
lea ebx, [ebx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4016c0
lea edi, [esp + 0x268]
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4016e0
mov eax, dword [0x4c3ca8]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x474]
push edx
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x40184e
jmp 0x401720
movzx ecx, word [esp + eax + 0x268]
mov word [esp + eax + 0x470], cx
add eax, 2
test cx, cx
jne 0x401720
mov ebp, dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x401831
lea esi, [esp + 0x44]
call fcn.004015c0
test eax, eax
jne 0x40173e
mov eax, esi
mov edx, esi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401763
lea edi, [esp + 0x268]
sub eax, edx
add edi, 0xfffffffe
lea ebx, [ebx]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x401780
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test byte [esp + 0x18], 0x10
rep movsb byte es:[edi], byte [esi]
je 0x4017f1
lea ecx, [esp + 0x268]
push ecx
call fcn.00401640
add esp, 4
test eax, eax
je 0x401866
lea edx, [esp + 0x268]
push edx
call ebp
xor eax, eax
jmp 0x4017d0
movzx ecx, word [esp + eax + 0x470]
mov word [esp + eax + 0x268], cx
add eax, 2
test cx, cx
jne 0x4017d0
mov edi, dword [esp + 0x10]
jmp 0x40173e
lea eax, [esp + 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x40188b
xor eax, eax
lea esp, [esp]
movzx ecx, word [esp + eax + 0x470]
mov word [esp + eax + 0x268], cx
add eax, 2
test cx, cx
jne 0x401810
mov edi, dword [esp + 0x10]
jmp 0x40173e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x4018b0
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x14]
push eax
call ebp
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.0046255c
add esp, 0x674
ret
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.0046255c
add esp, 0x674
ret
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.0046255c
add esp, 0x674
ret
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x67c]
pop edi
pop esi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.0046255c
add esp, 0x674
ret