Function at 0x401170
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4bf8c2
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push esi
push edi
mov eax, dword [0x4e7d04]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov esi, ecx
test esi, esi
je 0x401302
push esi
lea ecx, [esp + 0x14]
call fcn.00403ac0
lea ecx, [esp + 0x10]
mov dword [esp + 0x40], 0
call fcn.00402a80
lea ecx, [esp + 0x10]
call fcn.00402ad0
mov edx, dword [esp + 0x10]
cmp dword [edx - 0xc], 0
jne 0x40120e
lea eax, [edx - 0x10]
mov dword [esp + 0x40], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4011f7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 3
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, esi
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401213
sub eax, esi
sar eax, 1
cmp eax, 0x102
jbe 0x401264
lea eax, [edx - 0x10]
mov dword [esp + 0x40], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40124d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 8
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push edx
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x4012ae
mov dword [esp + 0x40], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401297
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 5
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x10]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push ecx
call edi
test eax, eax
je 0x4012ee
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4012ee
lea ecx, [esp + 0x10]
call fcn.00404680
mov eax, 4
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
lea esi, [esp + 0x10]
call fcn.00401440
test eax, eax
je 0x401319
mov ecx, esi
call fcn.00404680
mov eax, 6
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], 0
jge 0x40132d
push 0x80070057
call fcn.004048a0
movzx edx, word [eax]
call fcn.004080c0
shrd eax, edx, 0x14
shr edx, 0x14
test edx, edx
ja 0x401367
jb 0x401347
cmp eax, 0x78
jae 0x401367
lea ecx, [esp + 0x10]
call fcn.00404680
mov eax, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x10]
push eax
call edi
test eax, eax
jne 0x4013de
lea ecx, [esp + 0x18]
push ecx
call fcn.00402f80
lea edx, [esp + 0x14]
push edx
push ecx
mov byte [esp + 0x48], 1
lea eax, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x1c], esp
push eax
call fcn.004041c0
lea ecx, [esp + 0x20]
push ecx
call fcn.00408790
test eax, eax
jne 0x4013cf
lea edx, [esp + 0x18]
push edx
call fcn.004086c0
lea ecx, [esp + 0x10]
call fcn.00404680
mov eax, 9
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x18]
push eax
mov byte [esp + 0x44], 0
call fcn.004086c0
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x18], esp
push edx
call fcn.004041c0
call fcn.004085a0
add esp, 4
lea ecx, [esp + 0x10]
test eax, eax
jne 0x40141b
call fcn.00404680
mov eax, 2
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call fcn.00404680
xor eax, eax
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret