Function at 0x1004d426
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2b8
mov eax, dword [0x1005f0b4]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x278], eax
xor edi, edi
mov eax, dword [ebp + 0xc]
mov ebx, ecx
push 0x250
mov dword [ebp - 0x27c], eax
mov esi, edi
lea eax, [ebp - 0x25c]
mov dword [ebp - 0x274], edx
push edi
push eax
call sub.msvcrt.dll_memset
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x270], ecx
mov dword [ebp - 0x260], ecx
test ebx, ebx
je 0x1004d962
xor eax, eax
cmp ax, word [ebx]
je 0x1004d962
lea edx, [ebp - 0x260]
mov ecx, ebx
call fcn.1004d278
test eax, eax
je 0x1004d564
cmp dword [ebp - 0x260], esi
je 0x1004d564
and dword [ebp - 0x264], esi
test dword [ebp + 0x10], 2
jne 0x1004d50b
lea edx, [ebp - 0x264]
mov ecx, ebx
call fcn.1004d3de
test eax, eax
je 0x1004d4df
cmp dword [ebp - 0x264], esi
jne 0x1004d564
and dword [ebp - 0x264], esi
test dword [ebp + 0x10], 1
jne 0x1004d50b
lea edx, [ebp - 0x264]
mov ecx, ebx
call fcn.1004d2ee
test eax, eax
je 0x1004d51b
cmp dword [ebp - 0x264], 0x80000008
je 0x1004d564
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
inc eax
jmp 0x1004d96c
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x260]
mov dword [ebp - 0x268], eax
mov ecx, ebx
call fcn.1004d278
test eax, eax
je 0x1004d564
cmp dword [ebp - 0x260], esi
je 0x1004d564
mov esi, dword [ebp - 0x268]
push esi
push 0x10016dd8
push 0x2000000
push 0x1005f83c
call fcn.1002fa5c
add esp, 0x10
push esi
jmp 0x1004d964
mov edx, 0x10016e80
mov ecx, ebx
call fcn.10031593
mov dword [ebp - 0x26c], eax
test eax, eax
je 0x1004d92a
xor edx, edx
mov ecx, eax
call fcn.10030a25
mov esi, eax
test esi, esi
je 0x1004d92a
lea ecx, [ebp - 0x25c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x268], eax
cmp eax, 0xffffffff
je 0x1004d8ca
push 0x38
xor eax, eax
lea ecx, [ebp - 0x2b4]
push eax
push ecx
call sub.msvcrt.dll_memset
add esp, 0xc
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x264], ecx
cmp ax, word [ebx]
je 0x1004d837
mov eax, dword [ebp - 0x25c]
lea edx, [ebp - 0x230]
mov dword [ebp - 0x298], ecx
mov dword [ebp - 0x28c], ecx
mov dword [ebp - 0x288], ecx
mov dword [ebp - 0x284], ecx
mov dword [ebp - 0x280], ecx
mov ecx, dword [ebp - 0x254]
mov dword [ebp - 0x2b4], eax
mov eax, dword [ebp - 0x258]
mov dword [ebp - 0x2ac], ecx
mov ecx, dword [ebp - 0x24c]
mov dword [ebp - 0x2b0], eax
mov eax, dword [ebp - 0x250]
mov dword [ebp - 0x2a4], ecx
mov ecx, dword [ebp - 0x244]
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp - 0x248]
mov dword [ebp - 0x29c], ecx
mov ecx, dword [ebp - 0x240]
mov dword [ebp - 0x2a0], eax
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x290], ecx
mov ecx, ebx
mov dword [ebp - 0x294], eax
call fcn.10031593
mov dword [ebp - 0x28c], eax
test eax, eax
je 0x1004d6b6
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x28c]
test eax, eax
je 0x1004d696
add eax, 2
mov dword [ebp - 0x288], eax
jmp 0x1004d69c
mov dword [ebp - 0x288], ecx
call fcn.1003103a
mov dword [ebp - 0x284], eax
test eax, eax
je 0x1004d6b6
xor eax, eax
inc eax
mov dword [ebp - 0x264], eax
jmp 0x1004d6c3
lea ecx, [ebp - 0x2b4]
call fcn.1004d21c
mov eax, edi
mov dword [ebp - 0x260], eax
cmp eax, 1
jne 0x1004d771
test byte [ebp - 0x2b4], 0x10
mov dword [ebp - 0x260], eax
je 0x1004d809
cmp dword [ebp - 0x274], edi
je 0x1004d771
push 0xffffffffffffffff
push dword [ebp - 0x288]
mov dword [ebp - 0x260], eax
push 0xffffffffffffffff
push 0x1000c7c4
push eax
push 0x409
call dword [sym.imp.KERNEL32.dll_CompareStringW]
dec eax
sub eax, 1
je 0x1004d771
mov eax, dword [ebp - 0x264]
push 0xffffffffffffffff
push dword [ebp - 0x288]
mov dword [ebp - 0x260], eax
push 0xffffffffffffffff
push 0x1000c7c8
push 1
push 0x409
call dword [sym.imp.KERNEL32.dll_CompareStringW]
dec eax
sub eax, 1
je 0x1004d771
push dword [ebp - 0x27c]
mov ecx, dword [ebp - 0x274]
lea eax, [ebp - 0x2b4]
push dword [ebp - 0x278]
push eax
call dword [0x10060380]
call dword [ebp - 0x274]
mov dword [ebp - 0x260], eax
xor eax, eax
cmp dword [ebp - 0x28c], edi
je 0x1004d79b
push dword [ebp - 0x28c]
push eax
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 - 0x28c], eax
mov eax, dword [ebp - 0x284]
test eax, eax
je 0x1004d7b6
push eax
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
push 0x38
push eax
lea eax, [ebp - 0x2b4]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [ebp - 0x260], 1
jne 0x1004d85d
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
cmp eax, 1
je 0x1004d5c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x1004d84c
xor eax, eax
inc eax
mov dword [ebp - 0x270], eax
jmp 0x1004d87e
mov eax, dword [ebp - 0x278]
test eax, eax
je 0x1004d771
push dword [ebp - 0x27c]
lea ecx, [ebp - 0x2b4]
push ecx
mov ecx, eax
call dword [0x10060380]
call dword [ebp - 0x278]
jmp 0x1004d76b
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov dword [ebp - 0x260], eax
jmp 0x1004d773
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push esi
push 0x10016e88
jmp 0x1004d86c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push esi
push 0x10016ef8
push 0x2000000
push 0x1005f83c
call fcn.1002fa5c
add esp, 0x14
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [ebp - 0x270]
mov eax, dword [ebp - 0x26c]
push eax
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
je 0x1004d8bc
push esi
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, ebx
jmp 0x1004d96c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push esi
push 0x10017070
push 0x2000000
push 0x1005f83c
call fcn.1002fa5c
mov ecx, esi
add esp, 0x14
xor ebx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x1004d8f2
sub ecx, edx
sar ecx, 1
cmp ecx, 0x104
jb 0x1004d890
push 0x100170e8
push 0x3000000
push 0x1005f83c
call fcn.1002fa5c
add esp, 0xc
mov edi, 0xce
jmp 0x1004d890
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push edi
push ebx
push 0x10016fe8
push 0x2000000
push 0x1005f83c
call fcn.1002fa5c
xor eax, eax
add esp, 0x14
mov ebx, eax
mov eax, dword [ebp - 0x26c]
test eax, eax
je 0x1004d8a7
jmp 0x1004d896
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.1004f280
leave
ret 0xc