Function at 0x10002f00
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1010db40
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x1016039c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 0
call fcn.10003c70
mov esi, dword [ebp + 8]
mov byte [ebp - 4], 1
test esi, esi
jne 0x10002f5a
push 0x1014bf64
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x24], 2
call fcn.100f70ba
call fcn.10008288
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x10002f74
push 0x80004005
call fcn.10001030
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov eax, esi
mov byte [ebp - 4], 2
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10002f90
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x14]
call fcn.10001a30
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x10002fc6
push 0x1014bf64
lea edx, [ebp - 0x28]
push edx
mov dword [ebp - 0x28], 1
call fcn.100f70ba
mov eax, dword [0x10161868]
push 0xf003f
push eax
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x1c]
call fcn.10003c90
mov edi, eax
test edi, edi
jne 0x10002ff9
push 0x1014bf64
lea ecx, [ebp - 0x2c]
push ecx
mov dword [ebp - 0x2c], 1
call fcn.100f70ba
call fcn.10008288
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x10003013
push 0x80004005
call fcn.10001030
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov bl, 3
mov byte [ebp - 4], bl
call fcn.10008288
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x10003041
push 0x80004005
call fcn.10001030
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x20], eax
mov eax, dword [0x101618e0]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 4
call fcn.10001d00
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x18]
push edx
lea eax, [ebp - 0x14]
push eax
push edi
call fcn.100027c0
mov esi, dword [ebp - 0x18]
add esp, 0x10
cmp al, 1
jne 0x1000309c
mov eax, dword [esi - 0xc]
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
test eax, eax
jne 0x1000309c
push esi
push edi
lea ecx, [ebp - 0x1c]
call fcn.10003cf0
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
mov byte [ebp - 4], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x100030c5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100030e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10003108
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call fcn.10003c80
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret