Function at 0x1012719
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x1022018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push edi
xor edi, edi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x1c], edi
cmp eax, edi
jne 0x101274b
mov eax, 0x80070057
jmp 0x1012957
push ebx
push esi
mov esi, 0x1002f3c
push esi
lea eax, [ebp - 0x58]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea eax, [ebp - 0x58]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x50]
push eax
push 1
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x50], 0x18
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x44], 0x40
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
call dword [sym.imp.ntdll.dll_NtOpenDirectoryObject]
cmp eax, edi
jl 0x1012932
push 0x400
push 8
mov dword [ebp - 0x30], edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, edi
je 0x10128de
mov byte [ebp - 0x2c], 1
mov dword [ebp - 0x20], edi
push edi
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x2c]
push 1
push 0x400
push ebx
push dword [ebp - 0x28]
call dword [sym.imp.ntdll.dll_NtQueryDirectoryObject]
mov esi, eax
cmp esi, edi
jl 0x1012896
mov esi, 0x1002f28
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor eax, eax
movsw word es:[edi], word [esi]
mov byte [ebp - 0x2c], 0
cmp ax, word [ebx]
je 0x1012880
mov eax, dword [ebx + 4]
test eax, eax
je 0x1012880
lea ecx, [ebp - 0x18]
push ecx
push eax
call fcn.0101488c
test eax, eax
je 0x1012880
mov ecx, dword [ebx + 4]
mov eax, ecx
lea esi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x101281a
sub eax, esi
sar eax, 1
cmp eax, 8
jbe 0x1012880
xor ebx, ebx
lea esi, [ecx + 0x10]
xor eax, eax
inc ebx
mov edi, esi
cmp ax, word [esi]
je 0x1012861
test ebx, ebx
je 0x101287d
movzx eax, word [edi]
push 4
push eax
call dword [sym.imp.msvcrt.dll_iswctype]
pop ecx
pop ecx
test eax, eax
jne 0x1012854
xor ebx, ebx
inc edi
inc edi
xor eax, eax
cmp ax, word [edi]
jne 0x101283c
test ebx, ebx
je 0x101287d
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x38]
mov eax, dword [ebp - 0x24]
push dword [eax + 4]
push esi
call dword [sym.imp.msvcrt.dll__wtoi]
pop ecx
push eax
call dword [ebp - 0x34]
mov dword [ebp - 0x1c], eax
mov ebx, dword [ebp - 0x24]
xor edi, edi
cmp dword [ebp - 0x1c], edi
jl 0x1012914
cmp dword [ebp - 0x20], edi
je 0x10127bd
jmp 0x1012914
cmp esi, 0x8000001a
jne 0x10128a7
mov dword [ebp - 0x20], 1
jmp 0x1012882
push esi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
cmp eax, edi
jle 0x10128bc
and eax, 0xffff
or eax, 0x80070000
push esi
push 0x1002f3c
push 0x1002ea8
push 0x20001ec
push 0x102273c
mov dword [ebp - 0x1c], eax
call fcn.0100a624
add esp, 0x14
jmp 0x1012882
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, edi
jle 0x10128f6
and eax, 0xffff
or eax, 0x80070000
cmp eax, edi
jge 0x101290d
call esi
cmp eax, edi
jle 0x1012908
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x1c], eax
jmp 0x1012914
mov dword [ebp - 0x1c], 0x80004005
push dword [ebp - 0x28]
call dword [sym.imp.ntdll.dll_NtClose]
cmp ebx, edi
je 0x1012952
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1012952
push eax
push esi
push 0x1002e28
push 0x20001ed
push 0x102273c
mov dword [ebp - 0x1c], 0x80004005
call fcn.0100a624
add esp, 0x14
mov eax, dword [ebp - 0x1c]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.0100b6a5
leave
ret 8