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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100d1303
mov eax, dword fs:[0]
push eax
sub esp, 0x330
mov eax, dword [0x10104610]
xor eax, esp
mov dword [esp + 0x328], eax
push ebx
push esi
push edi
mov eax, dword [0x10104610]
xor eax, esp
push eax
lea eax, [esp + 0x340]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, ecx
xor ebx, ebx
xor ecx, ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0xa4], 7
mov dword [esp + 0xa0], ebx
mov word [esp + 0x90], cx
mov dword [esp + 0x348], ebx
cmp dword [esi + 0x14], 8
jb 0x10021cbc
mov eax, dword [esi]
jmp 0x10021cbe
mov eax, esi
push eax
push str.parsing_all_files_in_directory:_ls
call fcn.10006700
mov ecx, 0x100d9d14
call fcn.10006d20
push 0x100d99f4
lea edx, [esp + 0xb8]
push esi
push edx
call fcn.10019800
add esp, 0x14
push eax
mov edx, 0x100e0538
lea eax, [esp + 0x40]
mov byte [esp + 0x34c], 1
call fcn.10002000
add esp, 4
mov edi, eax
lea esi, [esp + 0x90]
mov byte [esp + 0x348], 2
call fcn.10002070
mov esi, 8
cmp dword [esp + 0x50], esi
jb 0x10021d31
mov eax, dword [esp + 0x3c]
push eax
call fcn.100afa01
add esp, 4
xor ecx, ecx
mov edi, 7
mov byte [esp + 0x348], bl
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebx
mov word [esp + 0x3c], cx
cmp dword [esp + 0xc0], esi
jb 0x10021d65
mov edx, dword [esp + 0xac]
push edx
call fcn.100afa01
add esp, 4
mov eax, dword [esp + 0x90]
cmp dword [esp + 0xa4], esi
jae 0x10021d7c
lea eax, [esp + 0x90]
lea ecx, [esp + 0xe4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
jne 0x10021dcb
push str.Failed_to_get_handle_n
call fcn.10006700
mov ecx, 0x100d9d70
call fcn.10006b20
add esp, 4
cmp dword [esp + 0xa4], esi
jb 0x10021dc4
mov edx, dword [esp + 0x90]
push edx
call fcn.100afa01
add esp, 4
xor al, al
jmp 0x100221eb
mov eax, dword [esp + 0x14]
mov byte [esp + 0x13], 1
mov dword [eax], ebx
jmp 0x10021de0
mov ecx, 0x100e053c
lea eax, [esp + 0x110]
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10021e16
cmp dx, bx
je 0x10021e12
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10021e16
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x10021df0
xor eax, eax
jmp 0x10021e1b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x100220aa
mov ecx, 0x100e0540
lea eax, [esp + 0x110]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10021e56
cmp dx, bx
je 0x10021e52
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10021e56
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x10021e30
xor eax, eax
jmp 0x10021e5b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x100220aa
test byte [esp + 0xe4], 0x10
je 0x100220aa
xor ecx, ecx
lea eax, [esp + 0x110]
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebx
mov word [esp + 0x3c], cx
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x10021e90
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x114]
lea esi, [esp + 0x40]
call fcn.10001b60
mov edx, dword [esp + 0x18]
push 0x100d99f4
push edx
lea eax, [esp + 0xb4]
push eax
mov byte [esp + 0x354], 3
call fcn.10019800
add esp, 0xc
mov ecx, eax
lea edx, [esp + 0xc8]
push edx
mov eax, esi
mov byte [esp + 0x34c], 4
call fcn.1001da00
add esp, 4
push eax
mov edx, str.RefCount.txt
lea eax, [esp + 0x5c]
mov byte [esp + 0x34c], 5
call fcn.10002000
add esp, 4
mov esi, 8
cmp dword [esp + 0xdc], esi
jb 0x10021f26
mov eax, dword [esp + 0xc8]
push eax
call fcn.100afa01
add esp, 4
xor ecx, ecx
mov dword [esp + 0xdc], edi
mov dword [esp + 0xd8], ebx
mov word [esp + 0xc8], cx
mov byte [esp + 0x348], 8
cmp dword [esp + 0xc0], esi
jb 0x10021f5f
mov edx, dword [esp + 0xac]
push edx
call fcn.100afa01
add esp, 4
xor eax, eax
mov word [esp + 0xac], ax
xor ecx, ecx
push edi
mov eax, str..aamref
lea esi, [esp + 0x24]
mov dword [esp + 0xc4], edi
mov dword [esp + 0xc0], ebx
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], ebx
mov word [esp + 0x24], cx
call fcn.10001b60
mov byte [esp + 0x348], 9
mov ecx, dword [esp + 0x4c]
push ecx
sub ecx, dword [esp + 0x34]
lea esi, [esp + 0x78]
lea edx, [esp + 0x40]
call fcn.100234a0
mov byte [esp + 0x348], 0xa
cmp dword [esp + 0x34], 8
mov eax, dword [esp + 0x20]
jae 0x10021fca
lea eax, [esp + 0x20]
mov edi, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x88]
lea ecx, [esp + 0x78]
call fcn.1001dc80
mov esi, 8
test eax, eax
jne 0x1002201c
mov eax, dword [esp + 0x58]
cmp dword [esp + 0x6c], esi
jae 0x10021ff6
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x100220ca
push str.File_does_not_exist
call fcn.10006700
mov ecx, str.Utilities
call fcn.10006d80
add esp, 4
cmp dword [esp + 0x88], esi
jb 0x10022032
mov edx, dword [esp + 0x74]
push edx
call fcn.100afa01
add esp, 4
xor eax, eax
mov edi, 7
mov dword [esp + 0x88], edi
mov dword [esp + 0x84], ebx
mov word [esp + 0x74], ax
cmp dword [esp + 0x34], esi
jb 0x1002205f
mov ecx, dword [esp + 0x20]
push ecx
call fcn.100afa01
add esp, 4
xor edx, edx
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], dx
cmp dword [esp + 0x6c], esi
jb 0x10022081
mov eax, dword [esp + 0x58]
push eax
call fcn.100afa01
add esp, 4
xor ecx, ecx
mov byte [esp + 0x348], bl
mov dword [esp + 0x6c], edi
mov dword [esp + 0x68], ebx
mov word [esp + 0x58], cx
cmp dword [esp + 0x50], esi
jb 0x100220aa
mov edx, dword [esp + 0x3c]
push edx
call fcn.100afa01
add esp, 4
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0xe4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10021de0
jmp 0x1002218d
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x14], esi
jb 0x100220d5
mov eax, dword [eax]
push eax
lea edx, [esp + 0x114]
push edx
push str.AAMRef_file_:_ls_exists_at_path_:_ls
call fcn.10006700
mov ecx, 0x100d9d14
call fcn.10006d80
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [eax], 1
cmp dword [esp + 0x88], esi
jb 0x10022115
mov ecx, dword [esp + 0x74]
push ecx
call fcn.100afa01
add esp, 4
xor edx, edx
mov edi, 7
mov dword [esp + 0x88], edi
mov dword [esp + 0x84], ebx
mov word [esp + 0x74], dx
cmp dword [esp + 0x34], esi
jb 0x10022142
mov eax, dword [esp + 0x20]
push eax
call fcn.100afa01
add esp, 4
xor ecx, ecx
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], cx
cmp dword [esp + 0x6c], esi
jb 0x10022164
mov edx, dword [esp + 0x58]
push edx
call fcn.100afa01
add esp, 4
xor eax, eax
mov byte [esp + 0x348], bl
mov dword [esp + 0x6c], edi
mov dword [esp + 0x68], ebx
mov word [esp + 0x58], ax
cmp dword [esp + 0x50], esi
jb 0x1002218d
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.100afa01
add esp, 4
mov esi, dword [esp + 0x14]
cmp dword [esi], ebx
jne 0x100221c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x100221c0
push eax
push str.Last_Error_Incurred:_d
call fcn.10006700
mov ecx, 0x100d9d14
call fcn.10006de0
add esp, 8
mov dword [esi], 0xffffffff
jmp 0x100221c4
mov bl, byte [esp + 0x13]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [esp + 0xa4], 8
jb 0x100221e9
mov eax, dword [esp + 0x90]
push eax
call fcn.100afa01
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x340]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.100afa0c
mov esp, ebp
pop ebp
ret