Function at 0x1008e670
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x40
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov eax, dword [0x102b0014]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp esi, 7
jbe 0x1008e76c
mov eax, dword [ebp + 0xc]
cmp dword [eax], esi
jne 0x1008e76c
movzx ecx, word [eax + 6]
xor edi, edi
test cx, cx
mov ebx, eax
cmove ebx, edi
test ebx, ebx
je 0x1008e6da
movzx edx, word [ebx + 4]
cmp edx, 0x10
jb 0x1008e769
cmp dword [ebx], edx
jb 0x1008e769
test dl, 7
jne 0x1008e769
mov word [ebp - 0x28], cx
lea edi, [edx - 0x10]
sub esi, edx
add edx, eax
jmp 0x1008e6e4
mov word [ebp - 0x28], cx
add esi, 0xfffffff8
lea edx, [eax + 8]
mov ecx, eax
lea eax, [ebx + 8]
add ecx, 4
test ebx, ebx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], ecx
cmove eax, ecx
cmp edi, 0x103
ja 0x1008e769
shr edi, 2
movzx eax, word [eax]
cmp edi, eax
jb 0x1008e769
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x44], eax
push 0x24
call fcn.1020d865
add esp, 4
mov ecx, eax
movzx eax, word [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
mov edx, esi
push eax
push edi
push esi
call fcn.1008e560
add esp, 0xc
test esi, esi
je 0x1008e796
mov edi, dword [ebp - 0x2c]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
movzx eax, word [eax + 6]
mov word [ebp - 0x28], ax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
cmp word [ebp - 0x28], 0
je 0x1008e786
mov dword [ebp - 0x28], eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
movzx eax, word [eax + 4]
add dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
jmp 0x1008e789
mov edi, dword [ebp + 8]
mov dword [edi], 0
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10205d16
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
add eax, 8
push esi
push dword [ebp - 0x3c]
push eax
call fcn.10208400
add esp, 0xc
test ebx, ebx
je 0x1008e7e5
mov ebx, dword [ebp - 0x2c]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0xc]
mov edi, 8
cmp word [eax + 4], 0x10
je 0x1008e7e0
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0xc]
mov esi, eax
add esi, 0x10
mov edi, dword [ebp + 0xc]
add edi, 0x10
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0xc]
movzx eax, word [eax + 4]
add eax, 0xfffffff0
push eax
push edi
mov edi, 8
push esi
call fcn.10208400
add esp, 0xc
mov eax, dword [ebp - 0x38]
jmp 0x1008e7f0
mov edi, 4
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x2c]
movzx esi, word [eax]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0xc]
mov word [eax + edi], si
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x1008e928
lea eax, [eax*4]
lea edi, [eax + eax*4]
push edi
call fcn.1020d865
add esp, 4
mov ebx, eax
add eax, edi
mov dword [ebp - 0x40], eax
xor esi, esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
lea ecx, [ebx + esi]
call fcn.100a7f00
add esi, 0x14
cmp edi, esi
jne 0x1008e830
mov dword [ebp - 0x48], edi
xor edi, edi
mov dword [ebp - 0x34], ebx
jmp 0x1008e894
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x1008e8b0
mov dword [ebp - 0x28], esp
push eax
push eax
mov eax, esp
push ecx
push esi
push eax
call fcn.100a8230
add esp, 0xc
lea esi, [ebp - 0x24]
mov ecx, esi
call fcn.100a7f30
mov esp, dword [ebp - 0x28]
mov ecx, ebx
push esi
call fcn.100a8020
mov ecx, esi
call fcn.100a80b0
add edi, 1
add ebx, 0x14
cmp dword [ebp - 0x44], edi
je 0x1008e98e
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x20]
mov esi, dword [eax + edi*4]
test esi, esi
jns 0x1008e850
cmp esi, 0xfffffff3
jle 0x1008e850
jmp 0x1008e931
mov dword [ebp - 0x28], esp
push eax
push eax
mov ecx, esp
mov dword [ebp - 0x38], esp
push eax
mov eax, esp
mov dword [eax], 0
test esi, esi
je 0x1008e91b
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x30], eax
call dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx]
add edx, 1
cmp edx, 2
jb 0x1008e901
mov dword [ebp - 0x4c], eax
call fcn.1014e410
mov eax, dword [ebp - 0x30]
push dword [eax]
call fcn.1016f280
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x30]
add esp, 4
mov dword [ecx], 0
cmp esi, 0xffffffff
je 0x1008e911
mov dword [ecx], esi
mov esi, eax
call fcn.1014e410
mov eax, esi
push eax
call dword [sym.imp.kernel32.dll_SetLastError]
mov ecx, dword [ebp - 0x3c]
call fcn.1018bddc
mov esp, dword [ebp - 0x38]
jmp 0x1008e869
xor ecx, ecx
xor edx, edx
mov edi, dword [ebp + 8]
jmp 0x1008e99a
mov edi, dword [ebp + 8]
mov dword [edi], 0
mov eax, dword [ebp - 0x34]
test eax, eax
mov ecx, dword [ebp - 0x2c]
je 0x1008e97b
cmp dword [ebp - 0x40], eax
mov ebx, dword [ebp - 0x48]
je 0x1008e96d
mov esi, dword [ebp - 0x34]
add esi, 0xffffffec
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
lea ecx, [esi + ebx]
call fcn.100a80b0
add ebx, 0xffffffec
jne 0x1008e960
push dword [ebp - 0x34]
call fcn.10205096
add esp, 4
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x1008e772
mov eax, dword [ecx]
push 1
call dword [eax]
jmp 0x1008e772
mov edi, dword [ebp + 8]
mov ebx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x40]
mov esi, esp
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x14]
mov esp, esi
mov dword [edi], ebx
jmp 0x1008e772