Function at 0x40e240
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xd4c
mov dword [ebp - 0x5c], edx
mov esi, ecx
push 0x250
push 0
call sym._xrealloc
add esp, 8
mov dword [ebp - 0x20], eax
test esi, esi
mov dword [ebp - 0x2c], esi
je 0x40e4d8
xor ebx, ebx
mov eax, dword [sym.imp.kernel32.dll_lstrcmpW]
mov edi, dword [sym.imp.kernel32.dll_FindNextFileW]
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x54], 0
mov edx, esi
jmp 0x40e2d2
lea eax, [ebp - 0x558]
push eax
push 0x418ce0
call dbg.WCMD_output
mov edx, dword [ebp - 0x14]
add esp, 8
mov dword [ebp - 0x18], 1
nop word cs:[eax + eax]
mov edx, dword [edx]
test edx, edx
mov esi, dword [ebp - 0x2c]
mov eax, dword [sym.imp.kernel32.dll_lstrcmpW]
je 0x40e4eb
push dword [edx + 4]
push dword [esi + 4]
mov esi, edx
call eax
test eax, eax
jne 0x40e4ed
mov dword [ebp - 0x14], esi
mov eax, dword [esi + 4]
xor ecx, ecx
nop dword [eax]
movzx edx, word [eax + ecx]
mov word [ebp + ecx - 0x558], dx
add ecx, 2
test dx, dx
jne 0x40e2f0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 8]
lea ecx, [ebp - 0x55a]
cmp word [ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x40e310
xor edx, edx
nop dword [eax]
movzx esi, word [eax + edx]
mov word [ecx + edx], si
add edx, 2
test si, si
jne 0x40e320
test byte [0x41d020], 8
je 0x40e363
lea ecx, [ebp - 0x558]
call sym._wine_dbgstr_w
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Looking_for_matches_to__s_n
mov dword [esp + 8], str.WCMD_list_directory
call sym._wine_dbg_log_2
add esp, 0x14
imul eax, ebx, 0x250
mov esi, dword [ebp - 0x20]
add eax, esi
push eax
lea eax, [ebp - 0x558]
push eax
call dword [sym.imp.kernel32.dll_FindFirstFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x40e3b4
jmp 0x40e439
inc ebx
add eax, 0x4a0
push eax
push esi
call sym._xrealloc
add esp, 8
mov esi, eax
imul eax, ebx, 0x250
add eax, esi
push eax
push dword [ebp - 0x1c]
call edi
test eax, eax
je 0x40e430
imul eax, ebx, 0x250
mov ecx, dword [esi + eax]
mov edx, dword [0x4210cc]
and edx, ecx
cmp edx, dword [0x4210c8]
jne 0x40e3a2
mov edx, dword [0x421098]
or edx, dword [0x4210ac]
je 0x40e390
mov edi, ebx
mov ebx, esi
add esi, eax
add esi, 0x2c
mov edx, 0xfffffffe
nop dword [eax]
cmp word [esi + edx + 2], 0
lea edx, [edx + 2]
jne 0x40e3f0
sar edx, 1
and ecx, 0x10
shr ecx, 3
add ecx, edx
add ecx, 3
mov edx, dword [ebp - 0x44]
cmp ecx, edx
cmovg edx, ecx
mov dword [ebp - 0x44], edx
mov esi, ebx
mov ebx, edi
mov edi, dword [sym.imp.kernel32.dll_FindNextFileW]
jmp 0x40e390
push dword [ebp - 0x1c]
call dword [sym.imp.kernel32.dll_FindClose]
inc dword [ebp - 0x54]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 4]
xor ecx, ecx
nop word cs:[eax + eax]
movzx edx, word [eax + ecx]
mov word [ebp + ecx - 0x558], dx
add ecx, 2
test dx, dx
jne 0x40e450
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 4]
mov ecx, 0xfffffffe
nop
cmp word [eax + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x40e470
lea eax, [ebp - 0x558]
mov word [ecx + eax - 2], 0
cmp dword [0x42109c], 0
mov dword [ebp - 0x20], esi
jne 0x40e2c0
cmp dword [ebp - 0x5c], 0
je 0x40e4b2
test ebx, ebx
jle 0x40e4b2
push 0x418cda
call sym._WCMD_output_asis
mov edx, dword [ebp - 0x14]
add esp, 4
test ebx, ebx
setg al
cmp dword [ebp - 0x18], 0
sete cl
cmp dword [0x421094], 0
je 0x40e294
and al, cl
je 0x40e2c0
jmp 0x40e294
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x14], 0
jmp 0x40ed75
xor esi, esi
mov dword [ebp - 0x14], esi
test ebx, ebx
jle 0x40ed75
push dbg.WCMD_dir_sort
push 0x250
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.ucrtbase.dll_qsort]
add esp, 0x10
test byte [0x41d020], 8
je 0x40e547
mov eax, dword [0x4210d0]
sub esp, 0x1c
mov ecx, dword [ebp - 0x44]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str._d_entries__maxwidth_d__widest_d_n
mov dword [esp + 8], str.WCMD_list_directory
call sym._wine_dbg_log_2
add esp, 0x1c
mov eax, dword [0x421098]
mov dword [ebp - 0x50], 1
or eax, dword [0x4210ac]
mov dword [ebp - 0x40], ebx
je 0x40e5ea
mov eax, dword [0x4210d0]
cdq
idiv dword [ebp - 0x44]
cmp eax, 2
mov ecx, 1
cmovge ecx, eax
mov eax, ebx
xor edx, edx
mov dword [ebp - 0x50], ecx
div ecx
cmp edx, 1
sbb eax, 0xffffffff
mov dword [ebp - 0x40], eax
test byte [0x41d020], 8
je 0x40e5f3
sub esp, 0x18
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.cols_d__rows_d_n
mov dword [esp + 8], str.WCMD_list_directory
call sym._wine_dbg_log_2
add esp, 0x18
cmp dword [ebp - 0x40], 0
jne 0x40e5f9
mov dword [ebp - 0x3c], 0
cmp dword [0x42109c], 0
mov dword [ebp - 0x38], 0
mov esi, 0
mov ecx, 0
jne 0x40ed2c
jmp 0x40ec14
test byte [0x41d020], 8
jne 0x40e591
cmp dword [ebp - 0x40], 0
je 0x40e5c0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
xor eax, eax
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x24], ebx
jmp 0x40e62a
inc eax
cmp eax, dword [ebp - 0x40]
je 0x40eb30
mov ecx, eax
imul ecx, dword [ebp - 0x50]
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x4c], 0
xor esi, esi
mov dword [ebp - 0x28], eax
jmp 0x40e65f
mov dword [ebp - 0x58], 0
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp - 0x10]
inc esi
cmp esi, dword [ebp - 0x50]
je 0x40eb10
cmp dword [0x4210ac], 0
mov dword [ebp - 0x10], esi
je 0x40e680
imul esi, dword [ebp - 0x40]
add esi, eax
cmp esi, ebx
jge 0x40e652
jmp 0x40e689
mov ecx, dword [ebp - 0x64]
add esi, ecx
cmp esi, ebx
jge 0x40e652
cmp dword [0x4210a0], 0
je 0x40e6aa
imul eax, esi, 0x250
mov ecx, dword [ebp - 0x20]
add eax, ecx
add eax, 0x2c
push eax
call dword [sym.imp.ucrtbase.dll__wcslwr]
add esp, 4
cmp dword [0x4210a8], 0
je 0x40e721
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
xor ecx, ecx
nop dword [eax + eax]
movzx edx, word [eax + ecx]
mov word [ebp + ecx - 0xd58], dx
add ecx, 2
test dx, dx
jne 0x40e6c0
lea eax, [ebp - 0xd5a]
nop word [eax + eax]
cmp word [eax + 2], 0
lea eax, [eax + 2]
jne 0x40e6e0
imul ecx, esi, 0x250
mov edx, dword [ebp - 0x20]
add ecx, edx
add ecx, 0x2c
xor edx, edx
nop word [eax + eax]
movzx edi, word [ecx + edx]
mov word [eax + edx], di
add edx, 2
test di, di
jne 0x40e700
lea ecx, [ebp - 0xd58]
lea edx, [ebp - 0x350]
call dbg.WCMD_getfileowner
mov eax, dword [0x4210b4]
cmp eax, 1
je 0x40e740
cmp eax, 2
jne 0x40e750
imul eax, esi, 0x250
mov edi, dword [ebp - 0x20]
add eax, edi
add eax, 0x14
jmp 0x40e75e
imul eax, esi, 0x250
mov edi, dword [ebp - 0x20]
add eax, edi
add eax, 0xc
jmp 0x40e75e
imul eax, esi, 0x250
mov edi, dword [ebp - 0x20]
add eax, edi
add eax, 4
lea ebx, [ebp - 0x80]
push ebx
push eax
call dword [sym.imp.kernel32.dll_FileTimeToLocalFileTime]
lea eax, [ebp - 0x78]
push eax
push ebx
call dword [sym.imp.kernel32.dll_FileTimeToSystemTime]
push 0x20
lea eax, [ebp - 0x100]
push eax
push 0x4210d4
lea eax, [ebp - 0x78]
push eax
push 0
push 0x400
call dword [sym.imp.kernel32.dll_GetDateFormatW]
push 0x20
lea eax, [ebp - 0xc0]
push eax
push 0x421214
lea eax, [ebp - 0x78]
push eax
push 2
push 0x400
call dword [sym.imp.kernel32.dll_GetTimeFormatW]
imul ecx, esi, 0x250
cmp dword [0x421098], 0
mov eax, dword [edi + ecx]
mov esi, edi
je 0x40e81e
add esi, ecx
add esi, 0x2c
test al, 0x10
jne 0x40e85f
mov edi, ecx
push esi
push 0x418d44
call dbg.WCMD_output
add esp, 8
mov eax, 0xfffffffe
mov ebx, dword [ebp - 0x24]
nop dword [eax + eax]
cmp word [esi + eax + 2], 0
lea eax, [eax + 2]
jne 0x40e7f0
sar eax, 1
mov esi, dword [ebp - 0x4c]
add eax, esi
inc dword [ebp - 0x34]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x3c]
add edx, dword [ecx + edi + 0x20]
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp - 0x38]
adc edx, dword [ecx + edi + 0x1c]
mov dword [ebp - 0x38], edx
jmp 0x40e898
test al, 0x10
mov ebx, dword [ebp - 0x24]
jne 0x40e8db
inc dword [ebp - 0x34]
mov edi, dword [esi + ecx + 0x1c]
mov edx, dword [esi + ecx + 0x20]
add dword [ebp - 0x3c], edx
adc dword [ebp - 0x38], edi
cmp dword [0x42109c], 0
mov eax, dword [ebp - 0x2c]
je 0x40e92f
cmp dword [0x421094], 0
je 0x40eae5
mov eax, dword [eax + 4]
jmp 0x40eaea
push esi
push 0x418d3a
call dbg.WCMD_output
add esp, 8
mov eax, 0xfffffffe
mov ebx, dword [ebp - 0x24]
nop word cs:[eax + eax]
cmp word [esi + eax + 2], 0
lea eax, [eax + 2]
jne 0x40e880
inc dword [ebp - 0x30]
sar eax, 1
mov esi, dword [ebp - 0x4c]
add eax, esi
add eax, 2
mov ecx, dword [ebp - 0x44]
add esi, ecx
add ecx, esi
cmp ecx, dword [0x4210d0]
mov ecx, esi
mov esi, dword [ebp - 0x10]
jle 0x40e8bb
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x28]
jmp 0x40e655
mov dword [ebp - 0x4c], ecx
sub ecx, eax
push 0x418d58
push ecx
push str._1_s_
call dbg.WCMD_output
add esp, 0xc
mov eax, dword [ebp - 0x28]
jmp 0x40e655
inc dword [ebp - 0x30]
cmp dword [0x42109c], 0
je 0x40e9fa
add esi, ecx
add esi, 0x2c
push 0x418a86
push esi
mov edi, dword [sym.imp.kernel32.dll_lstrcmpW]
call edi
test eax, eax
je 0x40e648
push 0x418db2
push esi
call edi
test eax, eax
je 0x40e648
cmp dword [0x421094], 0
mov eax, dword [ebp - 0x2c]
je 0x40eb03
mov eax, dword [eax + 4]
push esi
jmp 0x40eaf0
mov dword [ebp - 0x60], ecx
mov esi, 0x421354
mov dword [ebp - 0x48], 0xfffffffd
mov eax, dword [0x4210b0]
mov dword [ebp - 0x68], eax
jmp 0x40e9cb
mov ecx, edi
shld ecx, edx, 0x1f
mov ebx, edi
shr ebx, 1
mov dword [ebp - 0x1c], edi
mov edi, ecx
add edi, ebx
adc edi, 0
mov eax, edi
mov dword [ebp - 0x18], edx
mov edx, 0xcccccccd
mul edx
shr edx, 2
lea eax, [edx + edx*4]
sub edi, eax
sub ecx, edi
sbb ebx, 0
mov eax, ecx
mov edx, 0xcccccccd
mul edx
imul edi, ecx, 0xcccccccc
add edi, edx
imul ecx, ebx, 0xcccccccd
add ecx, edi
imul edx, eax, 0xfff6
mov edi, 9
mov ebx, dword [ebp - 0x18]
cmp edi, ebx
mov edi, 0
sbb edi, dword [ebp - 0x1c]
lea edx, [edx + ebx + 0x30]
mov word [esi], dx
mov word [esi + 2], 0
lea esi, [esi + 2]
mov edx, eax
mov edi, ecx
mov ebx, dword [ebp - 0x24]
jae 0x40ea5b
cmp dword [ebp - 0x68], 0
je 0x40e950
mov ecx, dword [ebp - 0x48]
imul eax, ecx, 0xaaaaaaab
inc ecx
mov dword [ebp - 0x48], ecx
cmp eax, 0x55555554
ja 0x40e950
mov word [esi], 0x2c
add esi, 2
jmp 0x40e950
mov edi, ecx
lea eax, [ebp - 0xc0]
push eax
lea eax, [ebp - 0x100]
push eax
push str._1___2_____DIR_
call dbg.WCMD_output
add esp, 0xc
cmp dword [0x4210a4], 0
je 0x40ea36
lea eax, [esi + edi]
add eax, 0x234
push eax
push str._1__13s_
call dbg.WCMD_output
add esp, 8
cmp dword [0x4210a8], 0
je 0x40ea53
lea eax, [ebp - 0x350]
push eax
push str._1__23s_
call dbg.WCMD_output
add esp, 8
lea eax, [esi + edi]
add eax, 0x2c
jmp 0x40ead2
push 0x421354
call dword [sym.imp.ucrtbase.dll__wcsrev]
add esp, 4
push 0x421354
lea eax, [ebp - 0xc0]
push eax
lea eax, [ebp - 0x100]
push eax
push str._1___2_____3_14s_
call dbg.WCMD_output
add esp, 0x10
cmp dword [0x4210a4], 0
mov esi, dword [ebp - 0x20]
je 0x40eaad
mov eax, dword [ebp - 0x60]
add eax, esi
add eax, 0x234
push eax
push str._1__13s_
call dbg.WCMD_output
add esp, 8
cmp dword [0x4210a8], 0
je 0x40eaca
lea eax, [ebp - 0x350]
push eax
push str._1__23s_
call dbg.WCMD_output
add esp, 8
mov eax, dword [ebp - 0x60]
add eax, esi
add eax, 0x2c
push eax
push 0x418d44
call dbg.WCMD_output
add esp, 8
jmp 0x40e64f
mov eax, 0x418d58
add ecx, esi
add ecx, 0x2c
push ecx
push eax
push 0x418db8
call dbg.WCMD_output
add esp, 0xc
jmp 0x40e64f
mov eax, 0x418d58
push esi
jmp 0x40eaf0
cmp dword [ebp - 0x58], 0
je 0x40e620
push 0x418cda
mov esi, eax
call sym._WCMD_output_asis
mov eax, esi
add esp, 4
jmp 0x40e620
cmp dword [0x42109c], 0
jne 0x40ed26
mov esi, dword [ebp - 0x34]
cmp esi, 1
jne 0x40ec11
mov ebx, 0x421354
mov dword [ebp - 0x10], 0xfffffffd
mov eax, dword [0x4210b0]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x38]
jmp 0x40ebe6
mov ecx, esi
shld ecx, edx, 0x1f
mov dword [ebp - 0x1c], esi
shr esi, 1
mov edi, ecx
add edi, esi
adc edi, 0
mov eax, edi
mov dword [ebp - 0x18], edx
mov edx, 0xcccccccd
mul edx
shr edx, 2
lea eax, [edx + edx*4]
sub edi, eax
sub ecx, edi
sbb esi, 0
mov eax, ecx
mov edx, 0xcccccccd
mul edx
imul edi, ecx, 0xcccccccc
add edi, edx
imul ecx, esi, 0xcccccccd
add ecx, edi
imul edx, eax, 0xfff6
mov esi, 9
mov edi, dword [ebp - 0x18]
cmp esi, edi
mov esi, 0
sbb esi, dword [ebp - 0x1c]
lea edx, [edx + edi + 0x30]
mov word [ebx], dx
mov word [ebx + 2], 0
lea ebx, [ebx + 2]
mov edx, eax
mov esi, ecx
jae 0x40ed06
cmp dword [ebp - 0x24], 0
je 0x40eb70
mov ecx, dword [ebp - 0x10]
imul eax, ecx, 0xaaaaaaab
inc ecx
mov dword [ebp - 0x10], ecx
cmp eax, 0x55555554
ja 0x40eb70
mov word [ebx], 0x2c
add ebx, 2
jmp 0x40eb70
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], ecx
mov ebx, 0x421354
mov dword [ebp - 0x10], 0xfffffffd
mov eax, dword [0x4210b0]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x38]
jmp 0x40ecb2
mov ecx, esi
shld ecx, edx, 0x1f
mov dword [ebp - 0x1c], esi
shr esi, 1
mov edi, ecx
add edi, esi
adc edi, 0
mov eax, edi
mov dword [ebp - 0x18], edx
mov edx, 0xcccccccd
mul edx
shr edx, 2
lea eax, [edx + edx*4]
sub edi, eax
sub ecx, edi
sbb esi, 0
mov eax, ecx
mov edx, 0xcccccccd
mul edx
imul edi, ecx, 0xcccccccc
add edi, edx
imul ecx, esi, 0xcccccccd
add ecx, edi
imul edx, eax, 0xfff6
mov esi, 9
mov edi, dword [ebp - 0x18]
cmp esi, edi
mov esi, 0
sbb esi, dword [ebp - 0x1c]
lea edx, [edx + edi + 0x30]
mov word [ebx], dx
mov word [ebx + 2], 0
lea ebx, [ebx + 2]
mov edx, eax
mov esi, ecx
jae 0x40ecdd
cmp dword [ebp - 0x24], 0
je 0x40ec40
mov ecx, dword [ebp - 0x10]
imul eax, ecx, 0xaaaaaaab
inc ecx
mov dword [ebp - 0x10], ecx
cmp eax, 0x55555554
ja 0x40ec40
mov word [ebx], 0x2c
add ebx, 2
jmp 0x40ec40
push 0x421354
call dword [sym.imp.ucrtbase.dll__wcsrev]
add esp, 4
push 0x421354
mov esi, dword [ebp - 0x34]
push esi
push str._1_8d__files__2_24s__bytes_n
call dbg.WCMD_output
add esp, 0xc
mov ecx, dword [ebp - 0x30]
jmp 0x40ed2c
push 0x421354
call dword [sym.imp.ucrtbase.dll__wcsrev]
add esp, 4
push 0x421354
push str._______1_file__1_25s__bytes_n
call dbg.WCMD_output
add esp, 8
mov ecx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x3c]
add dword [0x421080], eax
mov eax, dword [ebp - 0x38]
adc dword [0x421084], eax
add dword [0x42108c], esi
add dword [0x421088], ecx
mov esi, dword [0x421094]
mov eax, dword [0x42109c]
or eax, esi
jne 0x40ed7b
cmp ecx, 1
jne 0x40ed67
push 1
push str._1_8d__directory
jmp 0x40ed6d
push ecx
push str._1_8d__directories
call dbg.WCMD_output
add esp, 8
mov esi, dword [0x421094]
push dword [ebp - 0x20]
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
test esi, esi
je 0x40f073
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
xor ecx, ecx
nop word [eax + eax]
movzx edx, word [eax + ecx]
mov word [ebp + ecx - 0xd58], dx
add ecx, 2
test dx, dx
jne 0x40eda0
lea eax, [ebp - 0xd58]
nop word [eax + eax]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x40edc0
mov dword [eax - 2], 0x2a
test byte [0x41d020], 8
je 0x40ee03
lea ecx, [ebp - 0xd58]
call sym._wine_dbgstr_w
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Recursive__looking_for__s_n
mov dword [esp + 8], str.WCMD_list_directory
call sym._wine_dbg_log_2
add esp, 0x14
lea eax, [ebp - 0x350]
lea esi, [ebp - 0xd58]
push eax
push esi
call dword [sym.imp.kernel32.dll_FindFirstFileW]
mov dword [ebp - 0x48], eax
cmp eax, 0xffffffff
je 0x40f073
lea edi, [ebp - 0x324]
mov dword [ebp - 0x10], 0
xor ecx, ecx
jmp 0x40ee5c
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x350]
push eax
push dword [ebp - 0x48]
mov edi, ecx
call dword [sym.imp.kernel32.dll_FindNextFileW]
mov ecx, edi
test eax, eax
lea edi, [ebp - 0x324]
je 0x40f00d
test byte [ebp - 0x350], 0x10
je 0x40ee3a
mov dword [ebp - 0x18], ecx
push 0x418db2
push edi
mov ebx, dword [sym.imp.kernel32.dll_lstrcmpW]
call ebx
test eax, eax
je 0x40ee37
push 0x418a86
push edi
call ebx
test eax, eax
mov eax, dword [ebp - 0x14]
cmovne eax, dword [ebp - 0x2c]
je 0x40ee34
mov ecx, dword [ebp - 0x54]
test ecx, ecx
jle 0x40ee34
mov edx, ecx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x18]
jmp 0x40eec5
mov dword [ecx + 8], edi
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x1c], 1
mov edx, dword [ebp - 0x24]
jle 0x40ee3a
mov edi, ecx
mov eax, edx
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 4]
xor ecx, ecx
nop word cs:[eax + eax]
movzx edx, word [eax + ecx]
mov word [ebp + ecx - 0xd58], dx
add ecx, 2
test dx, dx
jne 0x40eee0
lea eax, [ebp - 0xd5a]
nop word [eax + eax]
cmp word [eax + 2], 0
lea eax, [eax + 2]
jne 0x40ef00
xor ecx, ecx
nop dword [eax]
movzx edx, word [ebp + ecx - 0x324]
mov word [eax + ecx], dx
add ecx, 2
test dx, dx
jne 0x40ef10
mov eax, esi
nop word cs:[eax + eax]
cmp word [eax], 0
lea eax, [eax + 2]
jne 0x40ef30
mov dword [eax - 2], 0x5c
test byte [0x41d020], 8
je 0x40ef6f
mov ecx, esi
call sym._wine_dbgstr_w
sub esp, 0x14
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Recursive__Adding_to_search_list__s_n
mov dword [esp + 8], str.WCMD_list_directory
call sym._wine_dbg_log_2
add esp, 0x14
mov ebx, esi
push 0xc
push 0
call sym._xrealloc
add esp, 8
mov ecx, dword [ebp - 0x10]
test ecx, ecx
cmove ecx, eax
test edi, edi
je 0x40ef8b
mov dword [edi], eax
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x1c]
dec ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x18], eax
mov dword [eax], 0
xor esi, esi
cmp word [ebp + esi - 0xd58], 0
lea esi, [esi + 2]
jne 0x40efa0
push esi
push 0
call sym._xrealloc
add esp, 8
mov edi, eax
push esi
mov esi, ebx
push ebx
push eax
call sym._memcpy
add esp, 0xc
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 4], edi
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax + 8]
xor edi, edi
test ebx, ebx
je 0x40eeb0
nop
cmp word [ebx + edi], 0
lea edi, [edi + 2]
jne 0x40efe0
push edi
push 0
call sym._xrealloc
add esp, 8
push edi
mov edi, eax
push ebx
push eax
call sym._memcpy
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
jmp 0x40eeb0
push dword [ebp - 0x48]
call dword [sym.imp.kernel32.dll_FindClose]
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x40f073
mov edi, dword [sym.imp.ucrtbase.dll_free]
jmp 0x40f036
mov ebx, eax
test eax, eax
je 0x40f073
mov ecx, ebx
mov edx, 1
call dbg.WCMD_list_directory
cmp ebx, eax
je 0x40f030
mov dword [ebp - 0x1c], eax
nop dword [eax]
mov esi, dword [ebx]
push dword [ebx + 4]
call edi
add esp, 4
push dword [ebx + 8]
call edi
add esp, 4
push ebx
call edi
mov eax, dword [ebp - 0x1c]
add esp, 4
mov ebx, esi
cmp esi, eax
jne 0x40f050
jmp 0x40f030
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x5c], 0
jne 0x40f0af
xor ecx, ecx
sub ecx, dword [0x421088]
cmp dword [0x42108c], ecx
jne 0x40f0af
mov ecx, dword fs:[0x18]
mov dword [ecx + 0x34], 2
mov esi, eax
call dbg.WCMD_print_error
mov eax, esi
mov ecx, dword [0x4162c0]
mov dword [ecx], 1
add esp, 0xd4c
pop esi
pop edi
pop ebx
pop ebp
ret