Function at 0x420570
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x459c5c
mov eax, dword fs:[0]
push eax
sub esp, 0x2d8
mov eax, dword [0x46e3d0]
xor eax, esp
mov dword [esp + 0x2d0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46e3d0]
xor eax, esp
push eax
lea eax, [esp + 0x2ec]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2fc]
mov edi, ecx
mov ebx, 8
cmp dword [edi + 0x18], ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x20], eax
lea esi, [edi + 4]
jb 0x4205cd
mov eax, dword [esi]
jmp 0x4205cf
mov eax, esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4207b2
cmp dword [edi + 0x18], ebx
jb 0x4205e5
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4207b2
test al, 0x10
je 0x4207b2
push 3
xor ebp, ebp
mov ebx, 7
push 0x46354c
lea esi, [esp + 0x2c]
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], ebp
mov word [esp + 0x30], bp
call fcn.00406f20
lea ecx, [esp + 0x78]
push ecx
mov edx, esi
mov ecx, edi
mov dword [esp + 0x2f8], ebp
call fcn.0041ddb0
add esp, 4
mov esi, 8
mov byte [esp + 0x2f4], 2
cmp dword [esp + 0x3c], esi
jb 0x420659
mov edx, dword [esp + 0x28]
push edx
call fcn.0043ef40
add esp, 4
push 0x250
lea eax, [esp + 0x98]
push ebp
push eax
mov dword [esp + 0x48], ebx
mov dword [esp + 0x44], ebp
mov word [esp + 0x34], bp
call fcn.00443e10
mov eax, dword [esp + 0x88]
add esp, 0xc
cmp dword [esp + 0x90], esi
jae 0x420690
lea eax, [esp + 0x7c]
lea ecx, [esp + 0x94]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
mov esi, 1
je 0x420846
jmp 0x4206b7
mov edi, dword [esp + 0x14]
cmp esi, ebp
je 0x420842
lea eax, [esp + 0xc0]
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], ebp
mov word [esp + 0x44], bp
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x4206e0
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0xc4]
push edx
lea esi, [esp + 0x48]
call fcn.00406f20
push edi
mov ebx, 0x46042c
lea esi, [esp + 0x60]
mov byte [esp + 0x2f8], 3
call fcn.00408750
add esp, 4
push ebp
lea eax, [esp + 0x44]
push eax
or eax, 0xffffffff
mov byte [esp + 0x2fc], 4
call fcn.00406d90
mov eax, dword [esp + 0x54]
push 0x4620cc
mov edi, 1
lea ecx, [esp + 0x44]
call fcn.00411e60
test eax, eax
je 0x4207e0
mov eax, dword [esp + 0x54]
push 0x463554
mov edi, 2
lea ecx, [esp + 0x44]
call fcn.00411e60
test eax, eax
je 0x4207e0
test byte [esp + 0x94], 0x10
je 0x4207b9
mov ecx, esi
push ecx
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x24], 0x64
call fcn.004208a0
add esp, 8
cmp edx, ebp
jg 0x420797
jl 0x4207e0
cmp eax, ebp
jbe 0x4207e0
lea ecx, [esp + 0x5c]
call fcn.00406ab0
lea ecx, [esp + 0x40]
call fcn.00406ab0
lea ecx, [esp + 0x78]
call fcn.00406ab0
xor eax, eax
jmp 0x420869
mov eax, dword [esp + 0x20]
cmp dword [eax + 0x18], 8
mov edi, dword [eax + 0x14]
jb 0x4207cb
mov eax, dword [eax + 4]
jmp 0x4207ce
add eax, 4
push eax
mov eax, dword [esp + 0x58]
lea ecx, [esp + 0x44]
call fcn.00411e60
test eax, eax
jne 0x420797
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x94]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov edi, 8
cmp dword [esp + 0x74], edi
mov esi, eax
jb 0x42080d
mov edx, dword [esp + 0x60]
push edx
call fcn.0043ef40
add esp, 4
mov byte [esp + 0x2f4], 2
cmp dword [esp + 0x58], edi
mov dword [esp + 0x74], 7
mov dword [esp + 0x70], ebp
mov word [esp + 0x60], bp
jb 0x4206b3
mov eax, dword [esp + 0x44]
push eax
call fcn.0043ef40
add esp, 4
jmp 0x4206b3
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [esp + 0x90], 8
jb 0x420864
mov ecx, dword [esp + 0x7c]
push ecx
call fcn.0043ef40
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x2ec]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2d0]
xor ecx, esp
call fcn.0043ef12
add esp, 0x2e4
ret