Function at 0x10002080
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x3c
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov eax, dword [0x100db010]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp edi, 7
jbe 0x100020e2
mov eax, dword [ebp + 0xc]
cmp dword [eax], edi
jne 0x100020e2
movzx ecx, word [eax + 6]
xor ebx, ebx
test cx, cx
mov esi, eax
cmove esi, ebx
test esi, esi
je 0x100020ed
movzx edx, word [esi + 4]
cmp edx, 0x10
jb 0x1000215c
cmp dword [esi], edx
jb 0x1000215c
lea ebx, [edx - 0x10]
test bl, 7
jne 0x1000215c
mov word [ebp - 0x28], cx
sub edi, edx
add edx, eax
jmp 0x100020f7
mov dword [esi], 0
jmp 0x100023b2
mov word [ebp - 0x28], cx
add edi, 0xfffffff8
lea edx, [eax + 8]
mov ecx, eax
lea eax, [esi + 8]
add ecx, 4
test esi, esi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x2c], ecx
cmove eax, ecx
cmp ebx, 0x103
ja 0x1000215c
shr ebx, 2
movzx eax, word [eax]
mov dword [ebp - 0x40], eax
cmp ebx, eax
jb 0x1000215c
mov dword [ebp - 0x38], edx
push 0x20
call fcn.10099c14
add esp, 4
mov ecx, eax
movzx eax, word [ebp - 0x28]
mov dword [ebp - 0x24], ecx
push eax
push ebx
push edi
push edi
call fcn.10001f30
test edi, edi
mov ebx, dword [ebp - 0x40]
je 0x10002178
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
cmp word [eax + 6], 0
mov edx, dword [ebp - 0x38]
je 0x1000216a
movzx ecx, word [eax + 4]
add eax, ecx
jmp 0x1000216d
mov esi, dword [ebp + 8]
mov dword [esi], 0
jmp 0x100023b2
add eax, 8
push edi
push edx
push eax
call fcn.1009d0a0
add esp, 0xc
test esi, esi
je 0x100022d6
mov edi, dword [ebp - 0x24]
mov eax, dword [edi]
movzx ecx, word [eax + 4]
add ecx, 0xfffffff0
je 0x100021a4
add eax, 0x10
mov edx, dword [ebp + 0xc]
add edx, 0x10
push ecx
push edx
push eax
call fcn.1009d0a0
add esp, 0xc
mov eax, dword [edi]
mov ecx, dword [ebp - 0x3c]
movzx ecx, word [ecx]
mov word [eax + 8], cx
test bx, bx
je 0x100022ee
mov edi, ebx
shl edi, 4
push edi
call fcn.10099c14
add esp, 4
mov ebx, eax
add eax, edi
mov dword [ebp - 0x34], eax
xor esi, esi
nop
lea ecx, [ebx + esi]
call fcn.100197f0
add esi, 0x10
cmp edi, esi
jne 0x100021d0
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x30], ebx
cmp word [ebp - 0x40], 0
je 0x100022f4
xor esi, esi
mov ebx, dword [ebp - 0x30]
jmp 0x1000223d
mov dword [ebp - 0x28], esp
push eax
push eax
mov eax, esp
push ecx
push edi
push eax
call fcn.10019b30
add esp, 0xc
lea edi, [ebp - 0x20]
mov ecx, edi
call fcn.10019820
mov esp, dword [ebp - 0x28]
mov ecx, ebx
push edi
call fcn.100198f0
mov ecx, edi
call fcn.10019980
add esi, 1
add ebx, 0x10
cmp dword [ebp - 0x40], esi
je 0x1000235a
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x1c]
mov edi, dword [eax + esi*4]
push edi
call fcn.10019b10
add esp, 4
test al, al
jne 0x100022ff
mov ecx, dword [ebp + 0x14]
test ecx, ecx
jne 0x10002200
mov dword [ebp - 0x28], esp
push eax
push eax
mov ecx, esp
mov dword [ebp - 0x3c], esp
push eax
mov eax, esp
mov dword [eax], 0
test edi, edi
je 0x100022c9
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx]
add edx, 1
cmp edx, 2
jb 0x100022af
mov dword [ebp - 0x48], eax
call fcn.1003f7b0
mov eax, dword [ebp - 0x2c]
push dword [eax]
call fcn.10045060
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x2c]
add esp, 4
mov dword [ecx], 0
cmp edi, 0xffffffff
je 0x100022bf
mov dword [ecx], edi
mov edi, eax
call fcn.1003f7b0
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x38]
call fcn.100547bc
mov esp, dword [ebp - 0x3c]
jmp 0x10002212
mov eax, dword [ebp - 0x2c]
movzx eax, word [eax]
mov edi, dword [ebp - 0x24]
mov ecx, dword [edi]
mov word [ecx + 4], ax
test bx, bx
jne 0x100021b7
xor ecx, ecx
xor edx, edx
jmp 0x10002363
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x24]
jmp 0x10002363
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov edi, dword [ebp - 0x30]
cmp dword [ebp - 0x34], edi
mov ebx, dword [ebp - 0x44]
je 0x1000232d
mov esi, edi
add esi, 0xfffffff0
nop dword [eax + eax]
lea ecx, [esi + ebx]
call fcn.10019980
add ebx, 0xfffffff0
jne 0x10002320
push edi
call fcn.10099c44
add esp, 4
mov ebx, dword [ebp - 0x24]
mov edi, dword [ebx + 0x10]
test edi, edi
je 0x10002391
mov esi, dword [ebx + 0x14]
cmp esi, edi
je 0x10002383
add esi, 0xfffffff0
mov ecx, esi
call fcn.10019980
cmp edi, esi
jne 0x10002347
mov eax, dword [ebx + 0x10]
jmp 0x10002385
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
mov esi, esp
push eax
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov ecx, edi
call fcn.100023f0
mov esp, esi
mov esi, dword [ebp + 8]
mov dword [esi], edi
jmp 0x100023b2
mov eax, edi
mov dword [ebx + 0x14], edi
push eax
call fcn.10099c44
add esp, 4
mov eax, dword [ebx]
mov dword [ebx], 0
test eax, eax
je 0x100023a6
push eax
call fcn.100451c0
add esp, 4
push ebx
call fcn.10099c44
add esp, 4
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10099c81
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret