Function at 0x40eb80
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bebb1
mov eax, dword fs:[0]
push eax
mov eax, 0x188c
call fcn.004a87d0
mov eax, dword [0x4ea688]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
push 0x1862
mov dword [ebp - 0x1884], eax
lea eax, [ebp - 0x1878]
push 0
push eax
mov dword [ebp - 0x188c], ecx
mov dword [ebp - 0x1888], edx
call fcn.004982c0
add esp, 0xc
cmp dword [ebx], 0
mov byte [ebp - 0x1874], 0x62
jne 0x40ebf8
push 0
call fcn.00494daa
add esp, 4
mov dword [ebx], eax
mov eax, dword [ebx + 8]
mov edx, dword [ebx + 4]
mov ecx, dword [ebx]
lea edi, [ebx + 0xc]
mov dword [ebp - 0x186b], eax
mov eax, edi
mov dword [ebp - 0x186f], edx
mov dword [ebp - 0x1873], ecx
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40ec20
sub eax, edx
sar eax, 1
lea esi, [eax + eax]
mov dword [ebp - 0x1867], esi
test esi, esi
je 0x40ec52
push esi
lea ecx, [ebp - 0x1863]
push edi
push ecx
call fcn.00499f30
add esp, 0xc
lea eax, [esi + 4]
jmp 0x40ec57
mov eax, 4
lea edx, [ebx + 0x4c]
lea esi, [ebp + eax - 0x1867]
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40ec66
sub eax, edi
sar eax, 1
lea edi, [eax + eax]
mov dword [esi], edi
lea eax, [esi + 4]
test edi, edi
je 0x40ec91
push edi
push edx
push eax
call fcn.00499f30
add esp, 0xc
add edi, 4
jmp 0x40ec96
mov edi, 4
lea edx, [ebx + 0x84c]
mov eax, edx
add esi, edi
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40eca3
sub eax, edi
sar eax, 1
lea edi, [eax + eax]
mov dword [esi], edi
lea eax, [esi + 4]
test edi, edi
je 0x40ecce
push edi
push edx
push eax
call fcn.00499f30
add esp, 0xc
add edi, 4
jmp 0x40ecd3
mov edi, 4
mov edx, dword [ebx + 0x184c]
mov ebx, dword [ebp - 0x1884]
add esi, edi
mov dword [esi], edx
add esi, 4
mov byte [esi], 0x65
inc esi
lea eax, [ebp - 0x1878]
sub esi, eax
lea edi, [ebx + 4]
mov dword [ebp - 0x1890], esi
add esi, 0xfffffffc
push edi
mov dword [ebp - 0x1878], esi
mov dword [ebp - 0x1880], edi
mov dword [ebp - 0x1894], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov esi, dword [ebx + 0x20]
cmp dword [esi - 0xc], 0
jne 0x40ed35
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x40eefd
xor edi, edi
mov dword [ebp - 0x187c], edi
mov byte [ebp - 4], 1
call fcn.00423730
test eax, eax
je 0x40ed8f
cmp eax, 0xffffffff
je 0x40ed8f
mov edi, eax
mov dword [ebp - 0x187c], edi
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push 0
push edi
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_LockFile]
test eax, eax
je 0x40ede8
mov esi, dword [ebp - 0x188c]
mov eax, dword [esi]
mov dword [ebp - 0x1884], edi
cmp eax, 0xffffffff
je 0x40ee07
push 0
push 0
push eax
jmp 0x40ee10
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x40edcb
mov esi, ebx
call fcn.0040e230
mov eax, dword [ebx + 0x20]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40ed4f
call fcn.00423a20
test eax, eax
je 0x40ed57
mov edx, dword [ebp - 0x1880]
mov ecx, dword [ebp - 0x1888]
push edx
mov byte [ecx], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x40eefd
test edi, edi
je 0x40edf3
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1880]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x40eefd
inc dword [ebx + 0x28]
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x40ee58
mov eax, ebx
call fcn.0040e380
cmp edi, 0xffffffff
je 0x40ee39
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
test edi, edi
je 0x40ee44
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1880]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x40eefd
mov ecx, dword [ebp - 0x1890]
lea edx, [ebp - 0x187c]
push edx
lea edx, [ebp - 0x1878]
call fcn.004237e0
test eax, eax
je 0x40eea2
mov eax, ebx
call fcn.0040e380
lea eax, [ebp - 0x1884]
call fcn.00401bd0
lea esi, [ebp - 0x187c]
call fcn.00423a40
mov eax, dword [ebp - 0x1880]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x40eefd
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40eec8
lea ecx, [ebp - 0x187c]
push ecx
lea edx, [ebx + 0x28]
mov ecx, 8
call fcn.004237e0
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x40eed8
call fcn.00423a20
lea eax, [ebp - 0x1884]
call fcn.00401bd0
lea esi, [ebp - 0x187c]
call fcn.00423a40
mov edx, dword [ebp - 0x1880]
push edx
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 ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00491db1
mov esp, ebp
pop ebp
ret 8