Function at 0x401650
Capabilities:
Enumerate files on windows
Enumerate files recursively
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x280
test byte [0x40d004], 8
jne 0x4018e8
cmp word [esi], 0
je 0x401953
mov eax, esi
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x401680
sub eax, esi
mov edx, esi
mov dword [ebp - 0x260], eax
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x401698
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + 0x40f044]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4016a8
lea eax, [ebp - 0x25c]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindFirstFileW]
sub esp, 8
mov dword [ebp - 0x264], eax
cmp eax, 0xffffffff
je 0x401968
mov ebx, dword [ebp - 0x260]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
lea edx, [ebx + 0x210]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edi, eax
sub esp, 0xc
xor eax, eax
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [edi + eax], dx
add eax, 2
test dx, dx
jne 0x401718
mov eax, dword [ebp - 0x260]
mov edx, 0x5c
mov dword [ebp - 0x268], 1
mov ebx, dword [ebp - 0x264]
mov word [edi + eax], dx
lea eax, [ebp - 0x230]
mov dword [esp + 4], 0x40f070
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x4017f0
lea eax, [ebp - 0x25c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindNextFileW]
sub esp, 8
test eax, eax
jne 0x401747
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x12
je 0x4017a3
test byte [0x40d004], 8
jne 0x401a88
mov dword [ebp - 0x268], 0
mov eax, dword [ebp - 0x264]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0x268]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x230]
mov dword [esp + 4], 0x40f074
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
je 0x401766
test byte [0x40d004], 8
jne 0x401990
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 0x26c], eax
and eax, 0x10
cmp word [ebp - 0x230], 0
je 0x401c18
lea edx, [ebp - 0x230]
nop
add edx, 2
cmp word [edx], 0
jne 0x401840
lea ecx, [ebp - 0x230]
sub edx, ecx
test eax, eax
jne 0x401a15
cmp edx, 8
jle 0x401766
mov eax, dword [sym.imp.kernel32.dll_lstrcmpiW]
lea ecx, [ebp + edx - 0x238]
mov dword [ebp - 0x270], edx
mov dword [esp], ecx
mov dword [esp + 4], 0x40f000
mov dword [ebp - 0x26c], ecx
mov dword [ebp - 0x274], eax
call eax
mov ecx, dword [ebp - 0x26c]
sub esp, 8
test eax, eax
mov edx, dword [ebp - 0x270]
je 0x4018ca
mov dword [ebp - 0x26c], edx
mov dword [esp + 4], 0x40f080
mov dword [esp], ecx
mov eax, dword [ebp - 0x274]
call eax
mov edx, dword [ebp - 0x26c]
sub esp, 8
test eax, eax
jne 0x401766
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 0x26c], eax
and eax, 0x10
mov dword [ebp - 0x270], eax
jmp 0x401a1f
test eax, eax
je 0x401b60
shr eax, 0x10
test eax, eax
je 0x401a00
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40f022
test edx, edx
jne 0x401921
mov eax, esi
call fcn.00401380
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.scanning_directory__s_n
mov dword [esp + 8], str.cx_process_dir
mov dword [esp + 4], 0x40d004
mov dword [esp], 3
call fcn.00401600
cmp word [esi], 0
jne 0x401675
mov dword [ebp - 0x260], 0
mov edx, esi
jmp 0x4016a1
test byte [0x40d004], 8
jne 0x401b00
mov dword [ebp - 0x268], 0
mov eax, dword [ebp - 0x268]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x230]
shr eax, 0x10
test eax, eax
je 0x401bfd
lea eax, [ebp - 0x230]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40f022
test edx, edx
jne 0x4019d1
lea eax, [ebp - 0x230]
call fcn.00401380
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.___s_n
mov dword [esp + 8], str.cx_process_dir
mov dword [esp + 4], 0x40d004
mov dword [esp], 3
call fcn.00401600
jmp 0x40181c
mov dword [esp + 4], esi
mov dword [esp], 0x40f015
call fcn.00401540
jmp 0x401921
mov dword [ebp - 0x270], 0x10
mov eax, dword [ebp - 0x260]
mov dword [ebp - 0x274], ebx
lea ecx, [edi + eax + 2]
xor eax, eax
lea esi, [esi]
movzx ebx, word [ebp + eax - 0x230]
mov word [ecx + eax], bx
add eax, 2
test bx, bx
jne 0x401a38
mov eax, dword [ebp - 0x270]
mov ebx, dword [ebp - 0x274]
test eax, eax
je 0x401b6a
test dword [ebp - 0x26c], 0x400
jne 0x401766
mov eax, edi
call fcn.00401650
test eax, eax
jne 0x401766
jmp 0x401b94
mov eax, esi
shr eax, 0x10
test eax, eax
je 0x401be8
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x40f022
test ecx, ecx
jne 0x401abb
mov eax, esi
call fcn.00401380
mov dword [esp + 0x14], eax
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x34]
mov dword [esp + 0xc], str.got_error__lu_while_scanning_the__s_directory_n
mov dword [esp + 8], str.cx_process_dir
mov dword [esp + 4], 0x40d004
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.00401600
jmp 0x401799
mov eax, esi
shr eax, 0x10
test eax, eax
je 0x401c31
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40f022
test edx, edx
jne 0x401b33
mov eax, esi
call fcn.00401380
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.unable_to_open_the__s_directory_n
mov dword [esp + 8], str.cx_process_dir
mov dword [esp + 4], 0x40d004
mov dword [esp], 3
call fcn.00401600
jmp 0x401975
mov eax, 0x40f01b
jmp 0x401921
cmp edx, 8
jg 0x401ba3
test byte [0x40d004], 8
jne 0x401c46
mov dword [esp + 4], 0
mov dword [esp], edi
call fcn.00409420
test eax, eax
jne 0x401766
mov dword [ebp - 0x268], 0
jmp 0x401766
lea eax, [ebp + edx - 0x238]
mov dword [esp + 4], 0x40f080
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x401b6f
test byte [0x40d004], 8
jne 0x401cb4
mov dword [esp + 4], 0
mov dword [esp], edi
call fcn.00409790
test eax, eax
je 0x401b94
jmp 0x401766
mov dword [esp + 4], esi
mov dword [esp], 0x40f015
call fcn.00401540
jmp 0x401abb
lea eax, [ebp - 0x230]
mov dword [esp], 0x40f015
mov dword [esp + 4], eax
call fcn.00401540
jmp 0x4019d1
test eax, eax
je 0x401766
mov dword [ebp - 0x270], 0x10
xor edx, edx
jmp 0x401a1f
mov dword [esp + 4], esi
mov dword [esp], 0x40f015
call fcn.00401540
jmp 0x401b33
mov eax, edi
shr eax, 0x10
test eax, eax
je 0x401ca2
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40f022
test edx, edx
jne 0x401c75
mov eax, edi
call fcn.00401380
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__link__s_n
mov dword [esp + 8], str.cx_process_dir
mov dword [esp + 4], 0x40d004
mov dword [esp], 3
call fcn.00401600
jmp 0x401b7c
mov dword [esp + 4], edi
mov dword [esp], 0x40f015
call fcn.00401540
jmp 0x401c75
mov eax, edi
shr eax, 0x10
test eax, eax
je 0x401d10
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40f022
test edx, edx
jne 0x401ce3
mov eax, edi
call fcn.00401380
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__url__s_n
mov dword [esp + 8], str.cx_process_dir
mov dword [esp + 4], 0x40d004
mov dword [esp], 3
call fcn.00401600
jmp 0x401bcf
mov dword [esp + 4], edi
mov dword [esp], 0x40f015
call fcn.00401540
jmp 0x401ce3