Function at 0x412f8c
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
xor eax, eax
cmp dword [0x418538], eax
push ebx
mov ebx, dword [ebp + 8]
setne al
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
mov esi, edx
lea eax, [eax*2 + 1]
xor ecx, ecx
mov dword [ebp - 0x10], esi
test ebx, ebx
jne 0x413052
push ecx
push 0x48000000
push 3
push ecx
push eax
push 0x80000000
test edi, edi
je 0x412fff
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x413052
mov esi, edi
mov eax, 0x406eb4
test edi, edi
jne 0x412ff1
mov eax, 0x406ed0
push esi
push eax
push 0xffffffffffffffff
call fcn.004126ae
add esp, 0xc
jmp 0x413042
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x413052
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x412fe3
mov eax, dword [0x419ef0]
mov ecx, 0x406164
test eax, eax
jne 0x41304b
mov ecx, 0x401120
mov eax, 0x406174
push ecx
push eax
push esi
push 0x406d58
push 0
call fcn.004126ae
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x24
mov eax, 0x40616c
jmp 0x413030
cmp dword [ebp + 0xc], 0
jne 0x413065
push esi
mov edx, edi
mov ecx, ebx
call fcn.00416b62
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x24]
mov ecx, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x28]
or ecx, eax
mov dword [ebp - 8], eax
jne 0x413084
mov ecx, ebx
call fcn.00413349
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], edx
cmp dword [ebp - 4], 0
jne 0x4130cc
mov ecx, ebx
call fcn.00413349
mov ecx, dword [ebp - 0xc]
cmp ecx, eax
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
jne 0x4130a2
cmp eax, edx
je 0x4130cc
cmp dword [0x419f44], 0
push eax
push ecx
push edx
push dword [ebp - 4]
je 0x4130e8
test edi, edi
je 0x4130bd
push edi
push 0x406ef0
jmp 0x4130c3
push esi
push 0x406f38
call dword [sym.imp.msvcrt.dll_printf]
add esp, 0x18
mov ecx, 0x418db4
call fcn.00412ab5
mov esi, eax
push 0x50
test esi, esi
jne 0x4130fb
pop ecx
call fcn.00412965
mov esi, eax
jmp 0x413106
test edi, edi
jne 0x413196
push esi
push 0x406f38
jmp 0x41319c
push 0
push esi
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x10]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esi], ebx
xor ebx, ebx
push ebx
mov dword [esi + 4], edi
mov edi, 0x7fffffff
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 8]
push edi
push dword [ebp + 0x14]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x1c], eax
lea eax, [esi + 0x28]
push ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x18], 0x100000
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
test eax, eax
je 0x41318a
push ebx
push edi
push ebx
push ebx
mov dword [esi + 0x34], eax
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
test eax, eax
je 0x41318a
mov dword [esi + 0x38], eax
call fcn.00412b3b
mov dword [esi + 0x3c], eax
mov edx, esi
mov eax, dword [ebp + 0x18]
mov ecx, 0x412db0
push 2
mov dword [esi + 0x40], eax
mov dword [esi + 0x48], ebx
call fcn.00413462
mov eax, esi
jmp 0x413044
push 0x407078
push 0xffffffffffffffff
call fcn.00412682
push edi
push 0x406ef0
push 0
call fcn.00412682
int3