Function at 0x402d60
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x4b5178
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4e1370]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, edx
lea eax, [ebx + 0x28]
push eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, 1
mov byte [esp + 0x24], al
xor ebp, ebp
mov dword [esp + 0x30], ebp
mov dword [ebx + 0x24], eax
push esi
lea eax, [esp + 0x1c]
push eax
mov edi, ebx
mov dword [ebx + 0x20], ebp
call fcn.00403680
mov ecx, dword [esp + 0x18]
mov edi, dword [ebx + 0x18]
mov eax, dword [ebx]
cmp ecx, ebp
je 0x402dcc
cmp ecx, eax
je 0x402dd1
call fcn.00490387
push esi
call fcn.00403500
mov ebp, dword [esp + 0x38]
cmp dword [esp + 0x1c], edi
je 0x402de8
inc dword [eax]
jmp 0x402f3f
mov esi, eax
mov dword [esi], 1
mov edi, dword [ebp]
mov eax, dword [esi + 8]
cmp edi, eax
je 0x402e24
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
test edi, edi
je 0x402e1d
push edi
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [esi + 8], eax
test eax, eax
jne 0x402e24
push 0x8007000e
call fcn.004058d0
mov dword [esi + 8], 0
mov ecx, dword [esp + 0x3c]
mov edi, dword [ecx]
mov eax, dword [esi + 0xc]
cmp edi, eax
je 0x402e5b
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
test edi, edi
je 0x402e54
push edi
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [esi + 0xc], eax
test eax, eax
jne 0x402e5b
push 0x8007000e
call fcn.004058d0
mov dword [esi + 0xc], 0
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
mov dword [esi + 0x10], edx
cmp dword [eax], 0
je 0x402f3f
mov edx, dword [0x4e7464]
mov eax, dword [edx + 0xc]
mov ecx, 0x4e7464
call eax
add eax, 0x10
mov dword [esp + 0x38], eax
lea ecx, [esp + 0x3c]
push 0x4c4694
push ecx
mov byte [esp + 0x38], 1
call fcn.0047b34a
mov byte [esp + 0x38], 2
mov edx, dword [ebp]
mov eax, dword [eax]
push edx
push eax
push str._s_s.dat
lea edi, [esp + 0x4c]
call fcn.00404aa0
mov byte [esp + 0x44], 1
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
add esp, 0x14
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402edc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
mov ecx, dword [ecx]
mov edx, edi
call fcn.004060b0
mov eax, dword [esi + 4]
cmp edi, eax
je 0x402f1e
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
test edi, edi
je 0x402f17
push edi
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [esi + 4], eax
test eax, eax
jne 0x402f1e
push 0x8007000e
call fcn.004058d0
mov dword [esi + 4], 0
lea eax, [edi - 0x10]
mov byte [esp + 0x30], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402f3f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x4e7464]
mov eax, dword [edx + 0xc]
mov ecx, 0x4e7464
call eax
add eax, 0x10
mov dword [esp + 0x38], eax
lea ecx, [esp + 0x3c]
push 0x4c4694
push ecx
mov byte [esp + 0x38], 3
call fcn.0047b34a
mov byte [esp + 0x38], 4
mov edx, dword [ebp]
mov eax, dword [eax]
push edx
push eax
push str._s_s.dat
lea edi, [esp + 0x4c]
call fcn.00404aa0
mov byte [esp + 0x44], 3
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
add esp, 0x14
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402fac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x40]
cmp dword [edi], 0
mov esi, dword [esp + 0x38]
je 0x402fcd
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402fcd
mov ecx, dword [edi]
mov edx, esi
call fcn.004060b0
mov ebx, dword [ebx + 0x1c]
lea eax, [esi - 0x10]
mov byte [esp + 0x30], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402ff1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0x10