Function at 0x412a20
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x49e931
mov eax, dword fs:[0]
push eax
mov eax, 0x1888
call fcn.0048ef80
mov eax, dword [0x4c13e0]
xor eax, esp
mov dword [esp + 0x1884], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4c13e0]
xor eax, esp
push eax
lea eax, [esp + 0x189c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x18ac]
mov ebx, dword [esp + 0x18b0]
push 0x1862
mov dword [esp + 0x20], eax
lea eax, [esp + 0x34]
push 0
push eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], edx
call fcn.0047c020
add esp, 0xc
cmp dword [ebx], 0
mov byte [esp + 0x34], 0x62
jne 0x412aa3
push 0
call fcn.00477050
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 [esp + 0x3d], eax
mov eax, edi
mov dword [esp + 0x39], edx
mov dword [esp + 0x35], ecx
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x412ac0
sub eax, edx
sar eax, 1
lea esi, [eax + eax]
mov dword [esp + 0x41], esi
test esi, esi
je 0x412aee
push esi
lea ecx, [esp + 0x49]
push edi
push ecx
call fcn.0047cd80
add esp, 0xc
lea eax, [esi + 4]
jmp 0x412af3
mov eax, 4
lea ebp, [ebx + 0x4c]
lea esi, [esp + eax + 0x41]
mov eax, ebp
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x412b00
sub eax, edx
sar eax, 1
lea edi, [eax + eax]
mov dword [esi], edi
lea eax, [esi + 4]
test edi, edi
je 0x412b2b
push edi
push ebp
push eax
call fcn.0047cd80
add esp, 0xc
lea eax, [edi + 4]
jmp 0x412b30
mov eax, 4
lea ebp, [ebx + 0x84c]
add esi, eax
mov eax, ebp
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x412b40
sub eax, edx
sar eax, 1
lea edi, [eax + eax]
mov dword [esi], edi
lea eax, [esi + 4]
test edi, edi
je 0x412b6b
push edi
push ebp
push eax
call fcn.0047cd80
add esp, 0xc
lea eax, [edi + 4]
jmp 0x412b70
mov eax, 4
mov edx, dword [ebx + 0x184c]
add esi, eax
mov dword [esi], edx
add esi, 4
mov byte [esi], 0x65
inc esi
lea eax, [esp + 0x30]
sub esi, eax
mov eax, dword [esp + 0x18b4]
lea ecx, [esi - 4]
mov dword [esp + 0x28], esi
mov dword [esp + 0x30], ecx
test eax, eax
je 0x412ba5
cmp eax, esi
jne 0x412c74
mov ebp, dword [esp + 0x1c]
lea ebx, [ebp + 4]
push ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edi, edi
mov dword [esp + 0x18a4], edi
mov esi, dword [ebp + 0x20]
cmp dword [esi - 0xc], edi
je 0x412c6d
mov dword [esp + 0x18], edi
mov byte [esp + 0x18a4], 1
call fcn.00411da0
test eax, eax
je 0x412c27
cmp eax, 0xffffffff
je 0x412c27
mov edi, eax
mov dword [esp + 0x18], edi
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push 0
push edi
mov byte [esp + 0x18b8], 2
call dword [sym.imp.KERNEL32.dll_LockFile]
test eax, eax
je 0x412c7b
mov ebx, dword [esp + 0x24]
mov eax, dword [ebx]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x20], edi
cmp eax, 0xffffffff
je 0x412c94
push 0
push 0
push eax
jmp 0x412c9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x412c63
mov ecx, ebp
call fcn.004124c0
mov eax, dword [ebp + 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 0x412bea
call fcn.00408010
test eax, eax
je 0x412bf0
mov edx, dword [esp + 0x20]
mov dword [edx], 0
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x412d85
test edi, edi
je 0x412c86
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x412d85
inc dword [ebp + 0x28]
push 2
push 0
push 0
push edi
call esi
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x412cdf
mov eax, ebp
call fcn.00412640
cmp edi, 0xffffffff
je 0x412cc2
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
test edi, edi
je 0x412ccd
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x412d85
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x34]
call fcn.00415c70
test eax, eax
je 0x412d28
mov eax, ebp
call fcn.00412640
cmp edi, 0xffffffff
je 0x412d10
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
lea esi, [esp + 0x18]
call fcn.00408030
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x412d85
push 0
push 0
push 4
push edi
call esi
cmp eax, 0xffffffff
je 0x412d48
lea eax, [esp + 0x18]
lea edx, [ebp + 0x28]
push eax
mov ecx, 8
call fcn.00415c70
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x412d58
call fcn.00408010
cmp edi, 0xffffffff
je 0x412d6c
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
lea esi, [esp + 0x18]
call fcn.00408030
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov ecx, dword [esp + 0x189c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1884]
xor ecx, esp
call fcn.00476dfd
add esp, 0x1894
ret 0xc