Function at 0x417da0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ef237
mov eax, dword fs:[0]
push eax
sub esp, 0x128
mov eax, dword [0x5564b0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor ebx, ebx
mov dword [ebp - 4], ebx
mov esi, ecx
cmp dword [0x567c94], ebx
jne 0x417e9f
push 0x24
call fcn.0049ad6c
add esp, 4
mov dword [ebp - 0x90], eax
mov byte [ebp - 4], 1
cmp eax, ebx
je 0x417e07
push esi
push eax
call fcn.00417c60
mov edi, eax
jmp 0x417e09
xor edi, edi
lea eax, [ebp - 0x98]
push eax
mov byte [ebp - 4], 0
call fcn.00418540
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [eax + 4], ebx
mov dword [eax], ebx
mov esi, dword [0x567c98]
mov dword [0x567c94], ecx
mov dword [0x567c98], edx
cmp esi, ebx
je 0x417e67
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x417e67
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x417e67
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov byte [ebp - 4], 0
mov esi, dword [ebp - 0x94]
cmp esi, ebx
je 0x417e9f
lea ecx, [esi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x417e9f
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
lea eax, [esi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x417e9f
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov edx, dword [0x567c94]
cmp edx, ebx
setne al
test al, al
jne 0x417ee0
xor ecx, ecx
push 0xf
mov word [ebp - 0x4c], cx
push str.Incorrect_state
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x38], 7
mov dword [ebp - 0x3c], ebx
call fcn.0040a420
push 0x60
mov ecx, 0x5186c4
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 3
call fcn.0041f6a0
lea esi, [ebp - 0x30]
call fcn.00417d70
mov byte [ebp - 4], 4
cmp dword [ebp - 0x20], ebx
setne al
test al, al
jne 0x417f28
push 0xf
xor edx, edx
push str.Incorrect_state
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x38], 7
mov dword [ebp - 0x3c], ebx
mov word [ebp - 0x4c], dx
call fcn.0040a420
push 0x63
mov ecx, 0x5186c4
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 5
call fcn.0041f6a0
mov ebx, dword [0x567fbc]
mov eax, dword [0x567c94]
mov edx, dword [ebx]
mov ecx, dword [eax + 0x1c]
push edx
mov dword [ebp - 0x90], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x567fb0]
mov edx, dword [0x567fac]
cmp edx, ecx
je 0x417f78
mov eax, ecx
sub eax, ecx
sar eax, 2
lea esi, [eax*4]
push esi
push ecx
push edx
mov edi, edx
call fcn.0049b0e0
add esp, 0xc
add edi, esi
mov dword [0x567fb0], edi
mov ecx, dword [ebx]
mov eax, dword [ebp - 0x90]
push ecx
mov dword [0x567a90], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x30]
mov edi, 8
cmp dword [ebp - 0x1c], edi
jae 0x417f9c
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x417ff5
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x1c], edi
jae 0x417fb3
lea eax, [ebp - 0x30]
lea edx, [ebp - 0x70]
push edx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x417ff5
mov eax, dword [ebp - 0x50]
xor ecx, ecx
xor esi, esi
add eax, ecx
adc esi, dword [ebp - 0x54]
mov dword [ebp - 0x94], esi
js 0x417ff5
jg 0x417fe1
cmp eax, 0x100000
jb 0x417ff5
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x1c], edi
jae 0x417fec
lea eax, [ebp - 0x30]
push 0x40
push 0x5186f0
jmp 0x418007
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x1c], edi
jae 0x418000
lea eax, [ebp - 0x30]
push 0x40
push 0x5186f4
push eax
call fcn.0049ba86
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x418046
push 0xf
push str.Incorrect_state
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x38], 7
mov dword [ebp - 0x3c], eax
mov word [ebp - 0x4c], ax
call fcn.0040a420
push 0x71
mov ecx, 0x5186c4
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 6
call fcn.0041f6a0
push edi
call fcn.0049ad6c
add esp, 4
test eax, eax
je 0x41805e
mov dword [eax], vtable.GFE::FileTraceHandler.0
mov dword [eax + 4], esi
jmp 0x418060
xor eax, eax
push eax
call fcn.0046392b
add esp, 4
cmp dword [ebp - 0x1c], edi
jb 0x41807a
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.0049acb7
add esp, 4
mov al, 1
jmp 0x418105
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0049ab39
mov esp, ebp
pop ebp
ret