Function at 0x404940
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x407e30
push 0x40439e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x118
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov esi, edx
mov dword [ebp - 0x128], esi
mov ebx, ecx
mov dword [ebp - 0x124], ebx
xor edi, edi
mov dword [ebp - 0x120], edi
cmp dword [0x40ae20], edi
jne 0x40499b
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 0x4049af
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x40a1d4], eax
mov dword [ebp - 4], edi
mov dword [ebp - 4], 1
push ebx
push str.GX6.IPC.ComRes.MT_u
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [ebp - 0x11c]
push ecx
push 1
push edi
push edi
call dword [sym.imp.rtapi_w32.dll_RtCreateSemaphoreA]
mov dword [esi + 0xc], eax
cmp eax, edi
jne 0x404a43
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x120], edi
cmp dword [0x40ae20], 2
push edi
jne 0x404a21
lea edx, [ebp - 0x11c]
push edx
push esi
push ebx
push str.__MM____CreateComResResources_ulID:0x_08X_pHandleData:_p_:_RtCreateSemaphore__s__Error_0x_08X_n
call fcn.00403a90
add esp, 0x14
mov dword [ebp - 4], 0
jmp 0x404be0
lea eax, [ebp - 0x11c]
push eax
push esi
push ebx
push str.__MC____CreateComResResources_ulID:0x_08X_pHandleData:_p_:_RtCreateSemaphore__s__Error_0x_08X_n
call fcn.00403a90
add esp, 0x14
mov dword [ebp - 4], 0
jmp 0x404be0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x120], edi
test edi, edi
jne 0x404bb0
mov edx, esi
mov ecx, ebx
call fcn.00404670
mov edi, eax
mov dword [ebp - 0x120], edi
test edi, edi
jne 0x404bb0
mov ecx, 0x20e
mov edi, dword [esi + 0x1c]
rep stosd dword es:[edi], eax
push ebx
push str.GX6.IPC.ComRes.RS_u
lea ecx, [ebp - 0x11c]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [ebp - 0x11c]
push edx
push 1
push 0
push 0
call dword [sym.imp.rtapi_w32.dll_RtCreateSemaphoreA]
mov dword [esi + 0x14], eax
test eax, eax
jne 0x404b08
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x120], edi
cmp dword [0x40ae20], 2
push edi
jne 0x404ae6
lea eax, [ebp - 0x11c]
push eax
push esi
push ebx
push str.__MM____CreateComResResources_ulID:0x_08X_pHandleData:_p_:_RtCreateSemaphore__s__Error_0x_08X_n
call fcn.00403a90
add esp, 0x14
mov dword [ebp - 4], 0
jmp 0x404be0
lea ecx, [ebp - 0x11c]
push ecx
push esi
push ebx
push str.__MC____CreateComResResources_ulID:0x_08X_pHandleData:_p_:_RtCreateSemaphore__s__Error_0x_08X_n
call fcn.00403a90
add esp, 0x14
mov dword [ebp - 4], 0
jmp 0x404be0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x120], edi
test edi, edi
jne 0x404bb0
push ebx
push str.GX6.IPC.ComRes.SS_u
lea edx, [ebp - 0x11c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [ebp - 0x11c]
push eax
push 1
push edi
push edi
call dword [sym.imp.rtapi_w32.dll_RtCreateSemaphoreA]
mov dword [esi + 0x18], eax
test eax, eax
jne 0x404ba2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x120], edi
cmp dword [0x40ae20], 2
push edi
jne 0x404b83
lea ecx, [ebp - 0x11c]
push ecx
push esi
push ebx
push str.__MM____CreateComResResources_ulID:0x_08X_pHandleData:_p_:_RtCreateSemaphore__s__Error_0x_08X_n
call fcn.00403a90
add esp, 0x14
mov dword [ebp - 4], 0
jmp 0x404be0
lea edx, [ebp - 0x11c]
push edx
push esi
push ebx
push str.__MC____CreateComResResources_ulID:0x_08X_pHandleData:_p_:_RtCreateSemaphore__s__Error_0x_08X_n
call fcn.00403a90
add esp, 0x14
mov dword [ebp - 4], 0
jmp 0x404be0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x120], edi
mov dword [ebp - 4], 0
jmp 0x404be0
mov dword [ebp - 4], 0xffffffff
call fcn.00404c19
test edi, edi
je 0x404c78
cmp dword [0x40ae20], 2
push edi
push esi
push ebx
jne 0x404c6b
push str.__MM____CreateComResResources_ulID:0x_08X_pHandleData:_p_:_Error_0x_08X.__n
jmp 0x404c70
push str.__MC____CreateComResResources_ulID:0x_08X_pHandleData:_p_:_Error_0x_08X.__n
call fcn.00403a90
add esp, 0x10
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