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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x874
mov eax, dword [0x433368]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
cmp byte [eax], 1
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x874], eax
mov dword [ebp - 0x870], esi
jne 0x4036de
push 0x2a
push edi
call fcn.00407403
add esp, 8
test eax, eax
je 0x4036a7
push 0x5c
push edi
call fcn.00407403
add esp, 8
test eax, eax
je 0x40366a
push 0x5c
push edi
call fcn.00407403
add eax, 2
push eax
push ebx
call fcn.00406654
lea edx, [ebp - 0x414]
add esp, 0x10
mov ecx, edi
sub edx, edi
lea esp, [esp]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x4035b0
lea eax, [ebp - 0x414]
mov esi, 0x42ba60
push 0x5c
push eax
call fcn.00407403
mov ecx, 2
add esp, 8
sub ecx, esi
add ecx, eax
nop
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x4035e0
mov ecx, 0x42ba60
mov eax, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40361d
test dx, dx
je 0x403619
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40361d
add eax, 4
add ecx, 4
test dx, dx
jne 0x4035f7
xor eax, eax
jmp 0x403622
sbb eax, eax
or eax, 1
test eax, eax
je 0x40365f
mov ecx, 0x42ba68
mov eax, ebx
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x403656
test dx, dx
je 0x403652
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403656
add eax, 4
add ecx, 4
test dx, dx
jne 0x403630
xor eax, eax
jmp 0x40365b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x403690
mov eax, dword [ebp - 0x870]
mov byte [eax], 1
jmp 0x403690
push edi
push ebx
call fcn.00406654
lea edx, [ebp - 0x414]
add esp, 8
mov ecx, edi
sub edx, edi
mov edi, edi
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x403680
push edi
lea eax, [ebp - 0x61c]
push 0x42b7e0
push eax
call fcn.00406654
add esp, 0xc
jmp 0x403706
push 0x42ba60
push ebx
call fcn.00406654
push edi
lea eax, [ebp - 0x414]
push 0x42b7e0
push eax
call fcn.00406654
push edi
lea eax, [ebp - 0x61c]
push 0x42b7e0
push eax
call fcn.00406654
add esp, 0x20
mov byte [esi], 1
jmp 0x403706
push edi
lea eax, [ebp - 0x414]
push 0x42ba6c
push eax
call fcn.00406654
push ebx
push edi
lea eax, [ebp - 0x61c]
push str._s_s
push eax
call fcn.00406654
add esp, 0x1c
cmp byte [0x4343e5], 0
mov esi, dword [sym.imp.KERNEL32.DLL_FindFirstFileW]
je 0x40390b
mov eax, dword [ebp - 0x874]
cmp byte [eax], 0
je 0x403785
lea eax, [ebp - 0x414]
push 0x5c
push eax
call fcn.00407403
add esp, 8
test eax, eax
jne 0x403785
lea eax, [ebp - 0x414]
push 0x2a
push eax
call fcn.00407403
add esp, 8
test eax, eax
lea eax, [ebp - 0x86c]
push eax
push 0x42ba60
jne 0x403793
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x403af1
lea ecx, [ebp - 0x414]
mov edx, ebx
mov eax, ecx
sub edx, eax
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x403773
jmp 0x4037a0
lea eax, [ebp - 0x86c]
push eax
lea eax, [ebp - 0x414]
push eax
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x403af1
mov eax, dword [ebp - 0x874]
mov byte [eax], 0
lea esp, [esp]
mov eax, dword [ebp - 0x86c]
test al, 0x10
je 0x4038e8
test eax, 0x400
jne 0x4038e8
mov ecx, 0x42ba88
lea eax, [ebp - 0x840]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4037fa
test dx, dx
je 0x4037f6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4037fa
add eax, 4
add ecx, 4
test dx, dx
jne 0x4037d4
xor eax, eax
jmp 0x4037ff
sbb eax, eax
or eax, 1
test eax, eax
je 0x4038e8
mov ecx, 0x42ba8c
lea eax, [ebp - 0x840]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x403838
test dx, dx
je 0x403834
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403838
add eax, 4
add ecx, 4
test dx, dx
jne 0x403812
xor eax, eax
jmp 0x40383d
sbb eax, eax
or eax, 1
test eax, eax
je 0x4038e8
xor ecx, ecx
jmp 0x403850
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x403850
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.00407403
add esp, 8
test eax, eax
je 0x4038b2
lea eax, [ebp - 0x20c]
push 0x5c
push eax
lea esi, [ebp - 0x840]
call fcn.00407403
mov ecx, 2
mov edx, esi
sub ecx, edx
add esp, 8
add ecx, eax
nop
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x4038a0
jmp 0x4038cc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x840]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x4038b4
push ebx
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x870]
push dword [ebp - 0x874]
call fcn.00403530
add esp, 0x10
lea eax, [ebp - 0x86c]
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_FindNextFileW]
test eax, eax
jne 0x4037b0
push edi
call dword [sym.imp.KERNEL32.DLL_FindClose]
mov esi, dword [sym.imp.KERNEL32.DLL_FindFirstFileW]
lea eax, [ebp - 0x86c]
push eax
lea eax, [ebp - 0x61c]
push eax
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x403af1
mov ebx, dword [sym.imp.KERNEL32.DLL_RemoveDirectoryW]
lea esp, [esp]
mov ecx, 0x42ba88
lea eax, [ebp - 0x840]
jmp 0x403940
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x403966
test dx, dx
je 0x403962
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x403966
add eax, 4
add ecx, 4
test dx, dx
jne 0x403940
xor eax, eax
jmp 0x40396b
sbb eax, eax
or eax, 1
test eax, eax
je 0x403ad4
mov ecx, 0x42ba8c
lea eax, [ebp - 0x840]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4039a6
test dx, dx
je 0x4039a2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4039a6
add eax, 4
add ecx, 4
test dx, dx
jne 0x403980
xor eax, eax
jmp 0x4039ab
sbb eax, eax
or eax, 1
test eax, eax
je 0x403ad4
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x4039b5
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.00407403
add esp, 8
test eax, eax
je 0x403a16
lea eax, [ebp - 0x20c]
push 0x5c
push eax
lea esi, [ebp - 0x840]
call fcn.00407403
mov ecx, 2
mov edx, esi
sub ecx, edx
add esp, 8
add ecx, eax
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x403a04
jmp 0x403a38
xor ecx, ecx
jmp 0x403a20
movzx eax, word [ebp + ecx - 0x840]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x403a20
test byte [ebp - 0x86c], 0x10
je 0x403abe
mov eax, dword [ebp - 0x870]
cmp byte [eax], 0
je 0x403ad4
cmp byte [0x4343ea], 1
jne 0x403a7c
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x403a7c
and eax, 0xffffffdc
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
jne 0x403ab6
cmp byte [0x4343e4], al
jne 0x403ab6
lea eax, [ebp - 0x20c]
push eax
push str.Error_deleting__s:
call fcn.004064e2
add esp, 8
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
call fcn.004034f0
add esp, 4
jmp 0x403ad4
inc dword [0x4343f0]
jmp 0x403ad4
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x86c]
push eax
call fcn.00403b10
add esp, 8
lea eax, [ebp - 0x86c]
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_FindNextFileW]
test eax, eax
jne 0x403930
push edi
call dword [sym.imp.KERNEL32.DLL_FindClose]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405d02
mov esp, ebp
pop ebp
ret