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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x29c
test byte [global___dbch.0], 8
jne 0x4018d0
cmp word [ebx], 0
je 0x401939
mov eax, ebx
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x401640
sub eax, ebx
mov edx, ebx
mov dword [ebp - 0x26c], eax
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x401658
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [eax + 0x40e044]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x401668
lea eax, [ebp - 0x268]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindFirstFileW]
mov dword [ebp - 0x270], eax
sub esp, 8
cmp eax, 0xffffffff
je 0x401950
mov edi, dword [ebp - 0x26c]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
lea edx, [edi + 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 esi, eax
sub esp, 0xc
xor eax, eax
lea esi, [esi]
movzx edx, word [ebx + eax]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x4016d8
mov eax, dword [ebp - 0x26c]
mov edx, 0x5c
mov dword [ebp - 0x274], 1
mov dword [ebp - 0x278], ebx
mov ebx, dword [ebp - 0x270]
mov word [esi + eax], dx
lea eax, [ebp - 0x23c]
mov dword [esp + 4], 0x40e070
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
jne 0x4017b8
lea eax, [ebp - 0x268]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_FindNextFileW]
sub esp, 8
test eax, eax
jne 0x40170d
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x12
mov ebx, dword [ebp - 0x278]
je 0x40176f
test byte [global___dbch.0], 8
jne 0x401a00
mov dword [ebp - 0x274], 0
mov eax, dword [ebp - 0x270]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
mov dword [esp + 8], esi
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 - 0x274]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x23c]
mov dword [esp + 4], 0x40e074
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
je 0x40172c
test byte [global___dbch.0], 8
jne 0x401978
mov eax, dword [ebp - 0x268]
and eax, 0x10
cmp word [ebp - 0x23c], 0
je 0x401b86
lea edi, [ebp - 0x23c]
lea esi, [esi]
add edi, 2
cmp word [edi], 0
jne 0x401808
lea ecx, [ebp - 0x23c]
sub edi, ecx
test eax, eax
jne 0x401880
cmp edi, 8
jle 0x40172c
mov edx, dword [sym.imp.kernel32.dll_lstrcmpiW]
lea ecx, [ebp + edi - 0x244]
mov dword [esp + 4], 0x40e000
mov dword [esp], ecx
mov dword [ebp - 0x280], ecx
mov dword [ebp - 0x27c], edx
call edx
sub esp, 8
test eax, eax
je 0x401880
mov dword [esp + 4], str..url
mov ecx, dword [ebp - 0x280]
mov dword [esp], ecx
mov edx, dword [ebp - 0x27c]
call edx
sub esp, 8
test eax, eax
jne 0x40172c
lea esi, [esi]
nop
mov eax, dword [ebp - 0x26c]
lea ecx, [esi + eax + 2]
xor eax, eax
lea esi, [esi]
movzx edx, word [ebp + eax - 0x23c]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x401890
mov eax, dword [ebp - 0x268]
test al, 0x10
je 0x401ad8
test ah, 4
jne 0x40172c
mov eax, esi
call dbg.cx_process_dir
test eax, eax
jne 0x40172c
jmp 0x401b02
test eax, eax
je 0x401ace
shr eax, 0x10
je 0x4019e8
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40e022
test edx, edx
jne 0x401907
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.scanning_directory__s_n
mov dword [esp + 8], global___FUNCTION__.9
mov dword [esp + 4], global___dbch.0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
cmp word [ebx], 0
jne 0x401635
mov dword [ebp - 0x26c], 0
mov edx, ebx
jmp 0x401661
test byte [global___dbch.0], 8
jne 0x401a70
mov dword [ebp - 0x274], 0
mov eax, dword [ebp - 0x274]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x23c]
shr eax, 0x10
je 0x401b6b
lea eax, [ebp - 0x23c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40e022
test edx, edx
jne 0x4019b7
lea eax, [ebp - 0x23c]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.___s_n
mov dword [esp + 8], global___FUNCTION__.9
mov dword [esp + 4], global___dbch.0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4017e4
mov dword [esp + 4], ebx
mov dword [esp], 0x40e015
call sym._wine_dbg_sprintf.constprop.0
jmp 0x401907
mov eax, ebx
shr eax, 0x10
je 0x401b56
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40e022
test edx, edx
jne 0x401a31
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x14], eax
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x34]
mov dword [esp + 0xc], str.got_error__d_while_scanning_the__s_directory_n
mov dword [esp + 8], global___FUNCTION__.9
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch.0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x401765
mov eax, ebx
shr eax, 0x10
je 0x401b95
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40e022
test edx, edx
jne 0x401aa1
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.unable_to_open_the__s_directory_n
mov dword [esp + 8], global___FUNCTION__.9
mov dword [esp + 4], global___dbch.0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40195d
mov eax, 0x40e01b
jmp 0x401907
cmp edi, 8
jg 0x401b11
test byte [global___dbch.0], 8
jne 0x401baa
mov dword [esp + 4], 0
mov dword [esp], esi
call dbg.Process_Link
test eax, eax
jne 0x40172c
mov dword [ebp - 0x274], 0
jmp 0x40172c
lea eax, [ebp + edi - 0x244]
mov dword [esp + 4], str..url
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x401add
test byte [global___dbch.0], 8
jne 0x401c16
mov dword [esp + 4], 0
mov dword [esp], esi
call dbg.Process_URL
test eax, eax
je 0x401b02
jmp 0x40172c
mov dword [esp + 4], ebx
mov dword [esp], 0x40e015
call sym._wine_dbg_sprintf.constprop.0
jmp 0x401a31
lea eax, [ebp - 0x23c]
mov dword [esp], 0x40e015
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x4019b7
test eax, eax
je 0x40172c
xor edi, edi
jmp 0x401880
mov dword [esp + 4], ebx
mov dword [esp], 0x40e015
call sym._wine_dbg_sprintf.constprop.0
jmp 0x401aa1
mov eax, esi
shr eax, 0x10
je 0x401c04
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40e022
test edx, edx
jne 0x401bd7
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__link__s_n
mov dword [esp + 8], global___FUNCTION__.9
mov dword [esp + 4], global___dbch.0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x401aea
mov dword [esp + 4], esi
mov dword [esp], 0x40e015
call sym._wine_dbg_sprintf.constprop.0
jmp 0x401bd7
mov eax, esi
shr eax, 0x10
je 0x401c70
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x40e022
test edx, edx
jne 0x401c43
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__url__s_n
mov dword [esp + 8], global___FUNCTION__.9
mov dword [esp + 4], global___dbch.0
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x401b3d
mov dword [esp + 4], esi
mov dword [esp], 0x40e015
call sym._wine_dbg_sprintf.constprop.0
jmp 0x401c43