Function at 0x4023c0
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Move file
Set file attributes

Disassembly:
sub esp, 0x678
mov eax, dword [0x416044]
xor eax, esp
mov dword [esp + 0x674], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x688]
push edi
push esi
push str.KXAPI::RemoveDirectoryAll___s__n
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], esi
call fcn.00401140
lea edx, [esp + 0x480]
add esp, 8
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x402400
lea eax, [esp + 0x478]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x402420
mov ecx, dword [str..]
mov edx, dword [0x4141dc]
mov dword [eax], ecx
mov cx, word [0x4141e0]
mov dword [eax + 4], edx
lea edx, [esp + 0x20]
mov word [eax + 8], cx
push edx
lea eax, [esp + 0x47c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov byte [esp + 0x17], 0
test eax, eax
je 0x40269a
lea ebp, [esp + 0x270]
mov byte [esp + 0x17], 1
sub ebp, esi
mov eax, esi
movzx ecx, word [eax]
mov word [eax + ebp], cx
add eax, 2
test cx, cx
jne 0x402482
lea edi, [esp + 0x270]
add edi, 0xfffffffe
jmp 0x4024a0
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4024a0
mov ecx, dword [0x4141e4]
lea eax, [esp + 0x4c]
mov dword [edi], ecx
mov edx, eax
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4024c0
lea edi, [esp + 0x270]
sub eax, edx
add edi, 0xfffffffe
jmp 0x4024e0
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4024e0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x413ff8
lea eax, [esp + 0x4c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40252b
test dx, dx
je 0x402527
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40252b
add eax, 4
add ecx, 4
test dx, dx
jne 0x402505
xor eax, eax
jmp 0x402530
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402682
mov ecx, 0x413ffc
lea eax, [esp + 0x4c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x402567
test dx, dx
je 0x402563
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x402567
add eax, 4
add ecx, 4
test dx, dx
jne 0x402541
xor eax, eax
jmp 0x40256c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402682
test byte [esp + 0x20], 0x10
je 0x402608
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x270]
push edx
mov ecx, esi
call fcn.004023c0
lea eax, [esp + 0x270]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x402682
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4025c5
push str.KXAPI::RemoveDirectoryAll___ERROR_FILE_NOT_FOUND_n
call fcn.00401060
add esp, 4
jmp 0x402682
cmp byte [esi + 0xc], 0
je 0x4025e5
lea ecx, [esp + 0x270]
push ecx
push 0x4141e8
call fcn.00401140
add esp, 8
jmp 0x402682
lea edx, [esp + 0x270]
push edx
push str.WINNT___directory___s__is_in_use__set_the_flag_to_delete_it_when_system_reboot_n
call fcn.00401140
add esp, 8
push 4
push 0
lea eax, [esp + 0x278]
push eax
jmp 0x40267c
push 0x80
lea ecx, [esp + 0x274]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edx, dword [esp + 0x18]
push edx
lea esi, [esp + 0x274]
call fcn.00402720
test eax, eax
jne 0x402682
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40264a
push str.KXAPI::RemoveDirectoryAll___ERROR_FILE_NOT_FOUND_n
call fcn.00401060
add esp, 4
jmp 0x402682
mov eax, dword [esp + 0x18]
cmp byte [eax + 0xc], 0
je 0x402663
push str.WIN9X___file_is_in_use__set_the_flag_to_delete_it_when_system_reboot_n
call fcn.00401060
add esp, 4
jmp 0x402682
push str.WINNT___file_is_in_use__set_the_flag_to_delete_it_when_system_reboot_n
call fcn.00401060
add esp, 4
push 4
push 0
lea ecx, [esp + 0x278]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea edx, [esp + 0x20]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, dword [esp + 0x1c]
test eax, eax
jne 0x402480
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4026f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4026c6
push str.KXAPI::RemoveDirectoryAll___ERROR_FILE_NOT_FOUND_n
call fcn.00401060
add esp, 4
jmp 0x4026f8
mov eax, dword [esp + 0x18]
cmp byte [eax + 0xc], 0
push esi
je 0x4026e0
push str.WIN9X___directory___s__is_in_use__set_the_flag_to_delete_it_when_system_reboot_n
call fcn.00401060
add esp, 8
jmp 0x4026f8
push 0x4140b8
call fcn.00401060
add esp, 8
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ecx, dword [esp + 0x684]
mov al, byte [esp + 0x17]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00402d86
add esp, 0x678
ret 4