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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40a14b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x274
mov eax, dword [str.VlZ6LdKiJtt7hQ0BCp0SFG5wKkvZRURR2Fu9GG418I]
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x274], eax
mov eax, edi
mov esi, 1
mov dword [esp + 0x24], 0xf
mov dword [esp + 0x20], 0
mov byte [esp + 0x10], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402391
sub eax, edx
push eax
push edi
lea ecx, [esp + 0x14]
call fcn.00401ce0
mov eax, dword [esp + 0x24]
mov edi, 0x10
cmp eax, edi
mov eax, dword [esp + 0x10]
mov dword [esp + 0x284], 0
jae 0x4023c5
lea eax, [esp + 0x10]
mov ecx, dword [esp + 0x20]
cmp byte [eax + ecx - 1], 0x5c
je 0x4023e0
push 1
push 0x40b214
lea ecx, [esp + 0x14]
call fcn.00401bd0
push 1
push 0x40b210
lea ecx, [esp + 0x14]
call fcn.00401bd0
cmp dword [esp + 0x24], edi
mov eax, dword [esp + 0x10]
jae 0x4023fe
lea eax, [esp + 0x10]
lea edx, [esp + 0x130]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 8], eax
jne 0x40241f
cmp dword [esp + 0x24], edi
jmp 0x4024b0
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push 0x40b20c
lea ecx, [esp + 0x160]
push ecx
call edi
test eax, eax
je 0x4024ff
push 0x40b208
lea edx, [esp + 0x160]
push edx
call edi
test eax, eax
je 0x4024ff
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x15c]
push eax
push ecx
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
test byte [esp + 0x130], 0x10
je 0x4024c7
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.00402340
add esp, 8
test eax, eax
je 0x40255b
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov esi, eax
test esi, esi
jne 0x4024ff
cmp dword [esp + 0x24], 0x10
jb 0x402587
mov eax, dword [esp + 0x10]
push eax
call fcn.00404753
add esp, 4
xor eax, eax
jmp 0x40253b
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4024ee
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4024ee
push 4
push 0
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
jmp 0x4024ff
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, eax
test esi, esi
je 0x402573
mov ecx, dword [esp + 8]
lea eax, [esp + 0x130]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x402432
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [esp + 0x24], 0x10
jb 0x402539
mov eax, dword [esp + 0x10]
push eax
call fcn.00404753
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x27c]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x274]
call fcn.004046be
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x24], 0x10
jb 0x402587
mov edx, dword [esp + 0x10]
push edx
call fcn.00404753
add esp, 4
xor eax, eax
jmp 0x40253b
cmp dword [esp + 0x24], 0x10
jb 0x402587
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00404753
add esp, 4
xor eax, eax
jmp 0x40253b