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

Disassembly:
push 0xffffffffffffffff
push 0x4108a6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x388
mov eax, dword [0x414148]
mov ecx, 0x414440
push ebp
push esi
test ecx, ecx
push edi
mov dword [esp + 0xc], eax
je 0x4021f7
mov edx, ecx
shr edx, 0x10
jne 0x4021b8
xor eax, eax
mov ax, cx
lea ecx, [esp + 0xc]
push eax
call fcn.004043e0
jmp 0x4021f7
push 0x414440
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x4021f7
push esi
lea ecx, [esp + 0x10]
call fcn.00404780
test eax, eax
je 0x4021f7
lea edx, [esi + 1]
cmp edx, esi
jb 0x4021f7
mov edi, dword [esp + 0xc]
mov ecx, esi
mov eax, ecx
mov esi, 0x414440
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x3a8]
lea edx, [esp + 0x24]
push ecx
push 0x41443c
push edx
mov dword [esp + 0x3a8], 0
call fcn.00408dcd
lea ebp, [esp + eax + 0x30]
mov edi, 0x414438
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
lea edx, [esp + 0x24]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x1c], ebp
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x128]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x40250b
push ebx
mov ebx, dword [esp + 0x3a8]
jmp 0x402274
mov ebp, dword [esp + 0x20]
lea edi, [esp + 0x158]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test byte [esp + 0x12c], 0x10
je 0x4022c0
cmp byte [esp + 0x158], 0x2e
je 0x4024e8
lea ecx, [esp + 0x28]
push ecx
push ebx
call fcn.00402170
jmp 0x4024e8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test al, 1
je 0x402375
lea edx, [esp + 0x28]
lea eax, [esp + 0x10]
push edx
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.00404a90
mov esi, dword [eax]
mov al, byte [0x417cb8]
test al, 1
mov byte [esp + 0x3a0], 1
jne 0x402318
or al, 1
push 0x414234
mov ecx, 0x417cbc
mov byte [0x417cb8], al
call fcn.004033c0
push 0x4026c0
call fcn.00408642
add esp, 4
push esi
lea edx, [esp + 0x20]
push 0x417cbc
push edx
call fcn.00404a90
mov eax, dword [eax]
push eax
mov eax, dword [ebx + 0x2c]
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea ecx, [esp + 0x1c]
call fcn.00404750
mov eax, dword [esp + 0x14]
mov edx, dword [0x41414c]
mov byte [esp + 0x3a0], 0
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x402375
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x402375
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.004080ac
add esp, 4
lea eax, [esp + 0x158]
push eax
call fcn.00408d43
add esp, 4
lea ecx, [esp + 0x2d0]
lea edx, [esp + 0x158]
push ecx
push str.addr_a_z_help.dll
push edx
call fcn.00408d0f
add esp, 0xc
cmp eax, 1
je 0x4023eb
lea eax, [esp + 0x2d0]
lea ecx, [esp + 0x158]
push eax
push str.gd__a_z_i32.dll
push ecx
call fcn.00408d0f
add esp, 0xc
cmp eax, 1
je 0x4023eb
lea edx, [esp + 0x2d0]
lea eax, [esp + 0x158]
push edx
push str.bj__a_z_rl.dll
push eax
call fcn.00408d0f
add esp, 0xc
cmp eax, 1
jne 0x402467
lea ecx, [esp + 0x28]
push ecx
call fcn.00407040
add esp, 4
test eax, eax
je 0x402467
lea edx, [esp + 0x28]
lea ebp, [ebx + 0x1c]
push edx
push ebp
call fcn.00406dd0
lea eax, [esp + 0x30]
push 0x2e
push eax
call fcn.00408c9d
mov edx, eax
mov edi, str..cfg
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
test ecx, ecx
je 0x402467
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402467
test al, 0x10
jne 0x402467
lea eax, [esp + 0x28]
push eax
push ebp
call fcn.00406dd0
add esp, 8
lea ecx, [esp + 0x158]
push 0x2e
push ecx
call fcn.00408c9d
add esp, 8
test eax, eax
je 0x4024e8
push str..sys
push eax
call fcn.00408bee
add esp, 8
test eax, eax
jne 0x4024e8
lea edx, [esp + 0x24]
lea eax, [esp + 0x28]
push edx
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
jne 0x4024e8
mov cl, byte [eax + 0x411310]
inc eax
not cl
mov byte [esp + eax + 0x26b], cl
cmp eax, 0x2f
jb 0x4024a2
lea edx, [esp + 0x26c]
push 0x2f
push edx
lea eax, [esp + 0x30]
push str..rdata
push eax
call fcn.00407420
add esp, 0x10
test eax, eax
je 0x4024e8
lea ecx, [esp + 0x28]
lea edx, [ebx + 0x1c]
push ecx
push edx
call fcn.00406dd0
add esp, 8
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x12c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x402270
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop ebx
mov eax, dword [esp + 0xc]
mov edx, dword [0x41414c]
pop edi
pop esi
lea ecx, [eax - 0xc]
pop ebp
cmp ecx, edx
je 0x40253d
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40253d
mov edx, dword [esp]
add edx, 0xfffffff4
push edx
call fcn.004080ac
add esp, 4
mov ecx, dword [esp + 0x388]
mov dword fs:[0], ecx
add esp, 0x394
ret 8