Function at 0x40a200
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x474
mov eax, dword [0x43a004]
xor eax, esp
mov dword [esp + 0x470], eax
push ebx
push esi
push edi
lea eax, [esp + 0x10]
mov esi, ecx
push eax
lea eax, [esp + 0x274]
mov ebx, edx
push eax
push 0x104
push esi
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
push dword [ebp + 8]
mov edx, ebx
lea ecx, [esp + 0x274]
call fcn.00409d00
mov edi, eax
add esp, 4
mov dword [esp + 0x14], edi
test edi, edi
js 0x40a48e
test byte [ebx], 0x20
je 0x40a48c
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [esp + 0x270]
push eax
mov ebx, 0x437378
call edi
cmp eax, 0xffffffff
je 0x40a287
test al, 0x10
jne 0x40a29f
push 0x5c
push esi
call fcn.0041df18
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40a29d
add ebx, 2
jmp 0x40a29f
mov ebx, esi
cmp dword [esp + 0x10], 0
je 0x40a2bf
lea eax, [esp + 0x270]
push eax
call edi
cmp eax, 0xffffffff
je 0x40a2b9
test al, 0x10
jne 0x40a2bf
mov eax, dword [esp + 0x10]
jmp 0x40a307
lea ecx, [esp + 0x270]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a2d0
sub ecx, edx
lea eax, [esp + 0x270]
sar ecx, 1
lea eax, [eax + ecx*2]
mov dword [esp + 0x10], eax
cmp word [eax - 2], 0x5c
je 0x40a307
mov ecx, 0x5c
mov word [eax], cx
mov eax, dword [esp + 0x10]
add eax, 2
mov dword [esp + 0x10], eax
mov dword [eax], 0x2a
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x274]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [esp + 0x18], esi
cmp esi, 0xffffffff
je 0x40a488
nop
test byte [esp + 0x20], 0x10
je 0x40a452
mov ecx, 0x43737c
lea eax, [esp + 0x4c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40a36a
test dx, dx
je 0x40a366
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40a36a
add eax, 4
add ecx, 4
test dx, dx
jne 0x40a344
xor eax, eax
jmp 0x40a36f
sbb eax, eax
or eax, 1
test eax, eax
je 0x40a452
mov eax, 0x437380
lea ecx, [esp + 0x4c]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x40a3a6
test dx, dx
je 0x40a3a2
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x40a3a6
add ecx, 4
add eax, 4
test dx, dx
jne 0x40a380
xor eax, eax
jmp 0x40a3ab
sbb eax, eax
or eax, 1
test eax, eax
je 0x40a452
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x4c]
nop dword [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x40a3c0
mov edi, dword [esp + 0x10]
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x40a3e0
mov eax, dword [0x437300]
mov edx, ebx
mov dword [edi], eax
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40a3f7
mov edi, dword [esp + 0x10]
sub edx, esi
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40a410
mov ecx, edx
shr ecx, 2
push dword [ebp + 8]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x20]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x274]
call fcn.0040a200
mov edi, dword [esp + 0x18]
add esp, 4
mov esi, dword [esp + 0x18]
add edi, eax
mov dword [esp + 0x14], edi
js 0x40a46a
jmp 0x40a456
mov edi, dword [esp + 0x14]
lea eax, [esp + 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40a330
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x470]
xor ecx, esp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x14]
mov eax, edi
mov ecx, dword [esp + 0x47c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret