Function at 0x4ba920
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x566360
mov eax, dword fs:[0]
push eax
sub esp, 0x74
push ebx
push esi
push edi
mov eax, dword [0x5c3678]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
cmp byte [ebx + 0x18], 0
je 0x4ba976
cmp byte [ebx + 0x1a], 0
jne 0x4ba976
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [ebx + 0xb0]
jne 0x4ba993
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4ba976
cmp dword [ebx + 0x9c], 0x20
jg 0x4ba976
mov eax, dword [ebx + 0xec]
mov eax, dword [eax]
mov esi, dword [ebx + 0xd4]
mov edi, eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], edi
jmp 0x4ba9d0
mov ecx, dword [ebp + 8]
mov ebx, dword [ebx + 0xec]
mov eax, dword [ecx + 0xd4]
test esi, esi
je 0x4ba9e7
cmp esi, eax
je 0x4ba9ec
call fcn.0053d6a6
cmp edi, ebx
je 0x4baa39
test esi, esi
jne 0x4baa2c
call fcn.0053d6a6
cmp edi, dword [esi + 0x18]
jne 0x4baa03
call fcn.0053d6a6
mov eax, dword [edi + 0x14]
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx]
push eax
push ecx
call fcn.0053cead
add esp, 8
test eax, eax
je 0x4baa30
lea esi, [ebp - 0x1c]
call fcn.004c9aa0
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp + 8]
jmp 0x4ba9d0
mov esi, dword [esi]
jmp 0x4ba9f9
mov eax, dword [ebp + 8]
push eax
jmp 0x4babca
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
xor ebx, ebx
push ebx
push 0x42000000
push 3
push ebx
push 3
push 1
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x18], edi
cmp edi, 0xffffffff
je 0x4bab5d
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ebx, eax
test ebx, ebx
je 0x4bab5d
push 0x5cc9fe
push 0x7de
call fcn.0053d8d6
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4bab5d
push 0x5cc9fe
push 0x14
call fcn.0053dd33
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
je 0x4bab5d
mov edx, eax
lea esi, [ebp - 0x40]
mov dword [edx + 0x10], ebx
call fcn.0040e410
xor eax, eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], al
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x44], edi
mov edi, esi
call fcn.00423c70
mov ecx, dword [ebp - 0x14]
sub esp, 0x18
lea edi, [ebp - 0x44]
mov esi, esp
mov dword [ebp - 0x38], 0x7de
mov dword [ebp - 0x34], ecx
mov dword [ebp + 0xc], esp
call fcn.004bb4a0
push ebx
lea esi, [ebp - 0x7c]
call fcn.004cb150
add esp, 0x1c
mov edi, eax
lea esi, [ebp - 0x60]
mov byte [ebp - 4], 2
call fcn.004cb1f0
mov edx, esi
push edx
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
add eax, 0xd4
push eax
mov byte [ebp - 4], 3
call fcn.004c7650
mov eax, esi
call fcn.004bb4d0
lea eax, [ebp - 0x7c]
call fcn.004bb4d0
lea esi, [ebp - 0x44]
call fcn.004bb3d0
test eax, eax
jne 0x4babb1
mov eax, esi
call fcn.004bb480
mov edi, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x4bab6a
push edi
call esi
test ebx, ebx
je 0x4bab71
push ebx
call esi
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4bab81
push eax
call fcn.0053d6b6
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4bab91
push eax
call fcn.0053c152
add esp, 4
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0xa0]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea eax, [ebp - 0x44]
call fcn.004bb480
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8