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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1280
call fcn.00429400
mov eax, dword [0x4ae7ec]
xor eax, ebp
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x127c], ecx
push esi
xor ecx, ecx
push edi
mov dword [ebp - 0x1278], eax
test ebx, ebx
je 0x40e9c7
cmp word [ebx], cx
je 0x40e9bd
lea edx, [ebp - 0x101c]
mov eax, ebx
sub edx, ebx
cmp ecx, 0x400
jae 0x40e9bd
mov si, word [eax]
mov word [edx + eax], si
add eax, 2
inc ecx
cmp word [eax], 0
jne 0x40e9a4
xor edx, edx
mov word [ebp + ecx*2 - 0x101c], dx
push 0x5c
push 0x401
lea eax, [ebp - 0x101c]
push eax
push 0x435770
call sym.SelectBehaviorsExe.exe_TM_AddFileNametoPathExW
add esp, 0x10
lea ecx, [ebp - 0x126c]
push ecx
lea edx, [ebp - 0x101c]
push edx
mov dword [ebp - 0x1270], 0
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x1274], eax
cmp eax, 0xffffffff
je 0x40ebe0
mov edi, dword [ebp + 0x18]
xor ecx, ecx
test ebx, ebx
je 0x40ea4a
cmp word [ebx], cx
je 0x40ea40
lea edx, [ebp - 0x814]
mov eax, ebx
sub edx, ebx
cmp ecx, 0x400
jae 0x40ea40
mov si, word [eax]
mov word [edx + eax], si
add eax, 2
inc ecx
cmp word [eax], 0
jne 0x40ea27
xor eax, eax
mov word [ebp + ecx*2 - 0x814], ax
push 0x5c
push 0x401
lea ecx, [ebp - 0x814]
push ecx
lea edx, [ebp - 0x1240]
push edx
call sym.SelectBehaviorsExe.exe_TM_AddFileNametoPathExW
add esp, 0x10
test byte [ebp - 0x126c], 0x10
lea eax, [ebp - 0x1240]
je 0x40eb40
mov ecx, 0x435778
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40eaa6
test dx, dx
je 0x40eaa2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40eaa6
add eax, 4
add ecx, 4
test dx, dx
jne 0x40ea80
xor eax, eax
jmp 0x40eaab
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40eb75
mov ecx, 0x43577c
lea eax, [ebp - 0x1240]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40eae6
test dx, dx
je 0x40eae2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40eae6
add eax, 4
add ecx, 4
test dx, dx
jne 0x40eac0
xor eax, eax
jmp 0x40eaeb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40eb75
lea eax, [ebp - 0x814]
push eax
push str.Search___s__n
mov esi, 0x4357a0
call fcn.0040b280
add esp, 8
test edi, edi
je 0x40eb75
mov eax, edi
jle 0x40eb17
lea eax, [edi - 1]
mov ecx, dword [ebp - 0x127c]
mov edx, dword [ebp - 0x1278]
push eax
push 0x401
push ecx
push edx
lea eax, [ebp - 0x814]
push eax
call sym.SelectBehaviorsExe.exe_TM_SearchFileNameW
add esp, 0x14
test eax, eax
je 0x40ebad
jmp 0x40eb75
mov ecx, dword [ebp - 0x1278]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40eb6c
test dx, dx
je 0x40eb68
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40eb6c
add eax, 4
add ecx, 4
test dx, dx
jne 0x40eb46
xor eax, eax
jmp 0x40eb71
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40eb93
mov edx, dword [ebp - 0x1274]
lea ecx, [ebp - 0x126c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40ea12
jmp 0x40ebb7
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp - 0x127c]
push eax
lea ecx, [ebp - 0x814]
push ecx
push edx
call sym.SelectBehaviorsExe.exe_TM_CopyStringW
add esp, 0xc
mov dword [ebp - 0x1270], 1
mov eax, dword [ebp - 0x1274]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x1270], 0
je 0x40ebe0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004171f3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
mov eax, 0x23
pop ebx
call fcn.004171f3
mov esp, ebp
pop ebp
ret