Function at 0x10078563
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2b0
mov eax, dword [0x100a8ba4]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x26c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
mov edi, ecx
push 0x250
mov dword [ebp - 0x270], eax
mov ebx, esi
lea eax, [ebp - 0x25c]
mov dword [ebp - 0x268], edx
push esi
push eax
call sub.msvcrt.dll_memset
and dword [ebp - 0x274], ebx
add esp, 0xc
and dword [ebp - 0x260], ebx
test edi, edi
je 0x10078a49
xor eax, eax
cmp ax, word [edi]
je 0x10078a49
lea edx, [ebp - 0x260]
mov ecx, edi
call fcn.10078ba2
test eax, eax
je 0x1007869f
cmp dword [ebp - 0x260], ebx
je 0x1007869f
and dword [ebp - 0x264], ebx
test dword [ebp + 0x10], 2
jne 0x10078646
lea edx, [ebp - 0x264]
mov ecx, edi
call fcn.10078c12
test eax, eax
je 0x1007861a
cmp dword [ebp - 0x264], ebx
jne 0x1007869f
and dword [ebp - 0x264], ebx
test dword [ebp + 0x10], 1
jne 0x10078646
lea edx, [ebp - 0x264]
mov ecx, edi
call fcn.10078ab5
test eax, eax
je 0x10078656
cmp dword [ebp - 0x264], 0x80000008
je 0x1007869f
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
inc eax
jmp 0x10078a53
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x260]
mov dword [ebp - 0x264], eax
mov ecx, edi
call fcn.10078ba2
test eax, eax
je 0x1007869f
cmp dword [ebp - 0x260], ebx
je 0x1007869f
mov esi, dword [ebp - 0x264]
push esi
push 0x100273d8
push 0x2000000
push 0x100a9380
call fcn.10077032
add esp, 0x10
push esi
jmp 0x10078a4b
mov edx, 0x10027480
mov ecx, edi
call fcn.10078c54
mov dword [ebp - 0x2b0], eax
test eax, eax
je 0x100789eb
xor edx, edx
mov ecx, eax
call fcn.10077c79
mov ebx, eax
test ebx, ebx
je 0x100789eb
lea ecx, [ebp - 0x25c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x264], eax
cmp eax, 0xffffffff
je 0x1007898e
push 0x38
lea ecx, [ebp - 0x2ac]
push 0
push ecx
call sub.msvcrt.dll_memset
add esp, 0xc
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x260], ecx
cmp ax, word [edi]
je 0x100787f9
mov eax, dword [ebp - 0x25c]
lea edx, [ebp - 0x230]
mov dword [ebp - 0x2ac], eax
mov eax, dword [ebp - 0x258]
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x2a4], eax
mov eax, dword [ebp - 0x250]
mov dword [ebp - 0x2a0], eax
mov eax, dword [ebp - 0x24c]
mov dword [ebp - 0x29c], eax
mov eax, dword [ebp - 0x248]
mov dword [ebp - 0x290], ecx
mov dword [ebp - 0x284], ecx
mov dword [ebp - 0x280], ecx
mov dword [ebp - 0x27c], ecx
mov dword [ebp - 0x278], ecx
mov ecx, dword [ebp - 0x240]
mov dword [ebp - 0x298], eax
mov eax, dword [ebp - 0x244]
mov dword [ebp - 0x294], eax
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x288], ecx
mov ecx, edi
mov dword [ebp - 0x28c], eax
call fcn.10078c54
mov dword [ebp - 0x284], eax
test eax, eax
je 0x100787ea
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x284]
test eax, eax
je 0x100787d0
add eax, 2
mov dword [ebp - 0x280], eax
jmp 0x100787d6
mov dword [ebp - 0x280], ecx
call fcn.10077adc
mov dword [ebp - 0x27c], eax
test eax, eax
je 0x100787ea
xor eax, eax
inc eax
jmp 0x10078803
lea ecx, [ebp - 0x2ac]
call fcn.10078a64
mov eax, esi
jmp 0x10078809
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov dword [ebp - 0x260], eax
cmp eax, 1
jne 0x100788bc
test byte [ebp - 0x2ac], 0x10
je 0x10078891
cmp dword [ebp - 0x268], esi
je 0x100788bc
push 0xffffffffffffffff
push dword [ebp - 0x280]
push 0xffffffffffffffff
push 0x100090f8
push eax
push 0x409
call dword [sym.imp.KERNEL32.dll_CompareStringW]
dec eax
sub eax, 1
je 0x100788bc
push 0xffffffffffffffff
push dword [ebp - 0x280]
push 0xffffffffffffffff
push 0x100090fc
push 1
push 0x409
call dword [sym.imp.KERNEL32.dll_CompareStringW]
dec eax
sub eax, 1
je 0x100788bc
push dword [ebp - 0x270]
mov ecx, dword [ebp - 0x268]
lea eax, [ebp - 0x2ac]
push dword [ebp - 0x26c]
push eax
call dword [0x100aa3f8]
call dword [ebp - 0x268]
jmp 0x100788b6
mov eax, dword [ebp - 0x26c]
test eax, eax
je 0x100788bc
push dword [ebp - 0x270]
lea ecx, [ebp - 0x2ac]
push ecx
mov ecx, eax
call dword [0x100aa3f8]
call dword [ebp - 0x26c]
mov dword [ebp - 0x260], eax
cmp dword [ebp - 0x284], esi
je 0x100788e5
push dword [ebp - 0x284]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
neg eax
sbb eax, eax
not eax
and dword [ebp - 0x284], eax
mov eax, dword [ebp - 0x27c]
test eax, eax
je 0x100788ff
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push 0x38
lea eax, [ebp - 0x2ac]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [ebp - 0x260], 1
jne 0x1007895f
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
cmp eax, 1
je 0x100786fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x1007894e
mov dword [ebp - 0x274], 1
jmp 0x10078980
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
push 0x10027488
jmp 0x1007896e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
push 0x100274f8
push 0x2000000
push 0x100a9380
call fcn.10077032
add esp, 0x14
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x10078a0c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebx
push 0x10027670
push 0x2000000
push 0x100a9380
call fcn.10077032
mov ecx, ebx
add esp, 0x14
xor edi, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x100789b6
sub ecx, edx
sar ecx, 1
cmp ecx, 0x104
jb 0x10078a0e
push 0x100276e8
push 0x3000000
push 0x100a9380
call fcn.10077032
add esp, 0xc
mov esi, 0xce
jmp 0x10078a0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push edi
push 0x100275e8
push 0x2000000
push 0x100a9380
call fcn.10077032
add esp, 0x14
xor edi, edi
mov eax, dword [ebp - 0x2b0]
test eax, eax
je 0x10078a27
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x10078a3a
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x274]
jmp 0x10078a53
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1002c750
leave
ret 0xc