Function at 0x404fc0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408298
push 0x40439e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov esi, ecx
mov dword [ebp - 0x24], esi
xor edi, edi
cmp dword [0x40ae20], edi
jne 0x405007
call dword [sym.imp.rtapi_w32.dll_RtIsInRtss]
neg eax
sbb eax, eax
add eax, 2
mov dword [0x40ae20], eax
cmp dword [0x40a1d4], 0xffffffff
jne 0x40501b
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x40a1d4], eax
mov dword [ebp - 4], edi
mov eax, dword [esi + 0x18]
cmp eax, edi
je 0x40507c
push eax
mov ebx, dword [sym.imp.rtapi_w32.dll_RtCloseHandle]
call ebx
mov dword [ebp - 0x1c], eax
cmp eax, 1
je 0x405073
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp dword [0x40ae20], 2
push edi
jne 0x40505f
mov eax, dword [esi + 0x18]
push eax
push esi
push str.__MM____CloseComResResources_pHandleData:_p_:_RtCloseHandle_hSendSemaphore:0x_08X__Error._0x_08X__n
call fcn.00403a90
add esp, 0x10
jmp 0x405082
mov ecx, dword [esi + 0x18]
push ecx
push esi
push str.__MC____CloseComResResources_pHandleData:_p_:_RtCloseHandle_hSendSemaphore:0x_08X__Error._0x_08X__n
call fcn.00403a90
add esp, 0x10
jmp 0x405082
mov dword [esi + 0x18], 0
jmp 0x405082
mov ebx, dword [sym.imp.rtapi_w32.dll_RtCloseHandle]
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4050d8
push eax
call ebx
mov dword [ebp - 0x1c], eax
cmp eax, 1
je 0x4050d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp dword [0x40ae20], 2
push edi
jne 0x4050bd
mov edx, dword [esi + 0x14]
push edx
push esi
push str.__MM____CloseComResResources_pHandleData:_p_:_RtCloseHandle_hRecvSemaphore:0x_08X__Error._0x_08X__n
call fcn.00403a90
add esp, 0x10
jmp 0x4050d8
mov eax, dword [esi + 0x14]
push eax
push esi
push str.__MC____CloseComResResources_pHandleData:_p_:_RtCloseHandle_hRecvSemaphore:0x_08X__Error._0x_08X__n
call fcn.00403a90
add esp, 0x10
jmp 0x4050d8
mov dword [esi + 0x14], 0
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4050eb
mov ecx, esi
call fcn.00404820
mov edi, eax
mov dword [ebp - 0x20], edi
mov eax, dword [esi + 0xc]
test eax, eax
je 0x40514f
push eax
call ebx
mov dword [ebp - 0x1c], eax
cmp eax, 1
je 0x405148
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x20], edi
cmp dword [0x40ae20], 2
push edi
jne 0x40512d
mov ecx, dword [esi + 0xc]
push ecx
push esi
push str.__MM____CloseComResResources_pHandleData:_p_:_RtCloseHandle_hResourceSemaphore:0x_08X__Error._0x_08X__n
call fcn.00403a90
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
jmp 0x405170
mov edx, dword [esi + 0xc]
push edx
push esi
push str.__MC____CloseComResResources_pHandleData:_p_:_RtCloseHandle_hResourceSemaphore:0x_08X__Error._0x_08X__n
call fcn.00403a90
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
jmp 0x405170
mov dword [esi + 0xc], 0
mov dword [ebp - 4], 0xffffffff
jmp 0x405170
test edi, edi
je 0x405193
cmp dword [0x40ae20], 2
push edi
push esi
jne 0x405186
push str.__MM____CloseComResResources_pHandleData:_p_:_Error._0x_08X.
jmp 0x40518b
push str.__MC____CloseComResResources_pHandleData:_p_:_Error._0x_08X.
call fcn.00403a90
add esp, 0xc
mov eax, edi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret