Function at 0x1004876b
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10053ae6
mov eax, dword fs:[0]
push eax
sub esp, 0x2dc
mov eax, dword [0x1005f0b4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x2d4], ecx
mov eax, dword [ebp + 0xc]
xor ebx, ebx
mov edi, dword [ebp + 8]
push 0x250
mov dword [ebp - 0x2e4], eax
lea eax, [ebp - 0x2c8]
push ebx
push eax
mov dword [ebp - 0x2e0], edi
mov dword [ebp - 0x2dc], ebx
mov dword [ebp - 4], ebx
call sub.msvcrt.dll_memset
mov ecx, dword [ebp - 0x2e4]
add esp, 0xc
mov esi, dword [edi*4 + 0x1005b1ac]
xor eax, eax
mov byte [ebp - 0x2c9], al
call fcn.1003c833
xor eax, eax
mov dword [ebp - 0x48], 7
mov dword [ebp - 0x4c], eax
mov word [ebp - 0x5c], ax
mov ecx, dword [ebp - 0x2d4]
mov byte [ebp - 4], 1
mov ecx, dword [ecx + 4]
call fcn.1002a688
push eax
mov eax, dword [ebp - 0x2d4]
lea ecx, [ebp - 0x5c]
push dword [eax + 4]
call fcn.10028225
mov ecx, 0x1000c670
call fcn.1002a688
push eax
push 0x1000c670
lea ecx, [ebp - 0x5c]
call fcn.100279aa
test esi, esi
je 0x10048869
mov ecx, esi
call fcn.1002a688
push eax
push esi
lea ecx, [ebp - 0x5c]
call fcn.100279aa
mov ebx, esi
xor edx, edx
lea ecx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
cmp ax, dx
jne 0x10048858
sub ebx, ecx
sar ebx, 1
jmp 0x10048870
mov byte [ebp - 0x2c9], 1
cmp dword [ebp - 0x48], 8
mov eax, dword [ebp - 0x5c]
jae 0x1004887c
lea eax, [ebp - 0x5c]
lea ecx, [ebp - 0x2c8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [ebp - 0x2d8], esi
cmp esi, 0xffffffff
jne 0x100488c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x10048c86
push 0x10015818
push 0x10015740
push 0x56
push dword [ebp + 4]
call fcn.10038242
add esp, 0x10
jmp 0x10048c82
test byte [ebp - 0x2c8], 0x10
mov dword [ebp - 0x2d0], 1
je 0x10048c55
mov ecx, 0x1000c7c4
lea eax, [ebp - 0x29c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1004890a
test dx, dx
je 0x10048906
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1004890a
add eax, 4
add ecx, 4
test dx, dx
jne 0x100488e4
xor eax, eax
jmp 0x1004890f
sbb eax, eax
or eax, 1
test eax, eax
je 0x10048c55
mov ecx, 0x1000c7c8
lea eax, [ebp - 0x29c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1004894a
test dx, dx
je 0x10048944
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1004894a
add eax, 4
add ecx, 4
test dx, dx
jne 0x10048922
xor ecx, ecx
mov eax, ecx
jmp 0x10048951
sbb eax, eax
or eax, 1
xor ecx, ecx
test eax, eax
je 0x10048c55
push 7
pop esi
xor eax, eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ecx
mov word [ebp - 0x2c], ax
lea ecx, [ebp - 0x29c]
mov byte [ebp - 4], 2
call fcn.1002a688
push eax
lea eax, [ebp - 0x29c]
push eax
lea ecx, [ebp - 0x2c]
call fcn.10028225
cmp byte [ebp - 0x2c9], 0
jne 0x10048a38
mov eax, dword [ebp - 0x1c]
xor edx, edx
sub eax, ebx
mov dword [ebp - 0x60], esi
push eax
xor ecx, ecx
mov dword [ebp - 0x64], edx
push edx
lea eax, [ebp - 0x2c]
mov word [ebp - 0x74], cx
push eax
lea ecx, [ebp - 0x74]
call fcn.1002866d
or dword [ebp - 0x2dc], 1
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x2c]
call fcn.10026c38
xor eax, eax
lea ecx, [ebp - 0x74]
push eax
push 1
call fcn.1002795e
cmp edi, 4
jne 0x10048ae8
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x100489ea
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x2d0]
push ecx
mov ecx, dword [ebp - 0x2d4]
push eax
call fcn.1004a5d2
mov esi, eax
test esi, esi
jns 0x10048ae8
lea eax, [ebp - 0x29c]
push eax
push 0x10010818
push esi
push 0x10015740
push 0x74
push dword [ebp + 4]
call fcn.1002dfef
add esp, 0x18
xor eax, eax
lea ecx, [ebp - 0x2c]
push eax
push 1
call fcn.1002795e
jmp 0x10048c88
xor eax, eax
mov esi, eax
mov dword [ebp - 0x2d0], eax
cmp ax, word [ebp - 0x29c]
je 0x10048a81
lea eax, [ebp - 0x29c]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
pop ecx
pop ecx
mov edi, eax
lea eax, [ebp - 0x29c]
push 0x2e
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
mov esi, eax
pop ecx
pop ecx
test edi, edi
je 0x10048a81
test esi, esi
je 0x10048a81
cmp esi, edi
sbb eax, eax
not eax
and esi, eax
mov edi, 0x1005b1ac
cmp dword [edi], 0
je 0x10048a9a
push dword [edi]
push esi
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x10048ae2
add edi, 4
cmp edi, 0x1005b1c0
jl 0x10048a86
lea eax, [ebp - 0x2d0]
push eax
lea eax, [ebp - 0x29c]
push eax
mov eax, dword [ebp - 0x2d4]
mov ecx, dword [eax]
call fcn.1003580a
mov esi, eax
test esi, esi
jns 0x10048ae2
lea eax, [ebp - 0x29c]
push eax
push 0x10010818
push esi
push 0x10015740
push 0x80
jmp 0x10048a1b
mov edi, dword [ebp - 0x2e0]
cmp dword [ebp - 0x2d0], 0
je 0x10048c3e
xor eax, eax
mov dword [ebp - 0x2d0], eax
mov esi, eax
mov dword [ebp - 0x30], 7
mov dword [ebp - 0x34], eax
mov word [ebp - 0x44], ax
mov eax, dword [ebp - 0x2d4]
mov byte [ebp - 4], 4
mov ecx, dword [eax + 4]
call fcn.1002a688
push eax
mov eax, dword [ebp - 0x2d4]
lea ecx, [ebp - 0x44]
push dword [eax + 4]
call fcn.10028225
mov ecx, 0x10006b98
call fcn.1002a688
push eax
push 0x10006b98
lea ecx, [ebp - 0x44]
call fcn.100279aa
lea ecx, [ebp - 0x29c]
call fcn.1002a688
push eax
lea eax, [ebp - 0x29c]
push eax
lea ecx, [ebp - 0x44]
call fcn.100279aa
cmp edi, 2
je 0x10048b73
cmp edi, 3
je 0x10048b73
cmp edi, 4
jne 0x10048b76
xor esi, esi
inc esi
lea ecx, [ebp - 0x2d0]
call fcn.1003b602
cmp dword [ebp - 0x30], 8
mov ecx, dword [ebp - 0x44]
jae 0x10048b8d
lea ecx, [ebp - 0x44]
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x10048b99
lea eax, [ebp - 0x2c]
lea edx, [ebp - 0x2d0]
push edx
push ecx
push eax
mov eax, dword [ebp - 0x2d4]
mov edx, esi
mov ecx, dword [eax]
call fcn.1004b733
mov esi, eax
test esi, esi
jns 0x10048bf6
lea eax, [ebp - 0x29c]
push eax
push 0x10015848
push esi
push 0x10015740
push 0x9b
push dword [ebp + 4]
call fcn.1002dfef
add esp, 0x18
lea ecx, [ebp - 0x44]
xor eax, eax
push eax
push 1
call fcn.1002795e
lea ecx, [ebp - 0x2d0]
call fcn.1001a5e0
jmp 0x10048a26
push dword [ebp - 0x2d0]
mov ecx, dword [ebp - 0x2e4]
call fcn.1004ab15
mov esi, eax
test esi, esi
jns 0x10048c26
lea eax, [ebp - 0x29c]
push eax
push 0x1001587c
push esi
push 0x10015740
push 0xa0
jmp 0x10048bce
xor eax, eax
lea ecx, [ebp - 0x44]
push eax
push 1
call fcn.1002795e
lea ecx, [ebp - 0x2d0]
call fcn.1001a5e0
xor eax, eax
mov byte [ebp - 4], 1
push eax
push 1
lea ecx, [ebp - 0x2c]
call fcn.1002795e
mov esi, dword [ebp - 0x2d8]
lea eax, [ebp - 0x2c8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x100488c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x10048c86
test eax, eax
jle 0x10048c82
movzx eax, ax
or eax, 0x80070000
mov esi, eax
jmp 0x10048c88
xor esi, esi
push 0
push 1
lea ecx, [ebp - 0x5c]
call fcn.1002795e
mov eax, esi
jmp 0x10048cbc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1004f280
leave
ret 8