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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x62729b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x23c
push ebx
push esi
mov dword [ebp - 0x2c], ecx
push edi
xor edi, edi
xor ecx, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], edi
mov word [ebp - 0x18], di
mov eax, dword [0x6d2310]
mov byte [ebp - 4], 1
cmp eax, edi
jne 0x50a56a
mov eax, 0x6d2314
mov edx, str._sScheduler_
test edx, edx
je 0x50a62d
cmp eax, edi
je 0x50a62d
push eax
lea ecx, [ebp - 0x28]
call fcn.0040e580
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.00401070
push str._sScheduler_
lea ecx, [ebp - 0x38]
call fcn.00402380
mov eax, dword [ebp - 0x28]
mov byte [ebp - 4], 3
cmp eax, edi
jne 0x50a5af
lea eax, [ebp - 0x24]
mov esi, dword [ebp - 0x30]
push eax
call fcn.005e71bf
lea ebx, [eax + esi + 2]
lea esi, [ebx + ebx]
push esi
call fcn.005ffe3f
mov edi, eax
add esp, 8
test edi, edi
mov dword [ebp - 0x1c], edi
je 0x50a610
mov ecx, esi
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea ecx, [ebp - 0x28]
call fcn.00402400
lea ecx, [ebp - 0x38]
mov esi, eax
call fcn.00402400
push esi
push eax
mov eax, dword [ebp - 0x1c]
push ebx
push eax
call fcn.005e714f
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.005e71bf
add esp, 0x14
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 2
call fcn.00401070
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.00401070
mov ecx, dword [ebp - 0x1c]
xor edi, edi
cmp ecx, edi
jne 0x50a634
lea ecx, [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x50a6e0
mov eax, dword [ebp - 0x1c]
cmp eax, edi
jne 0x50a64e
lea eax, [ebp - 0x18]
add eax, 6
push 0x5c
push eax
call fcn.005e77bb
add esp, 8
mov esi, eax
mov bl, 4
cmp esi, edi
je 0x50a6e0
mov eax, dword [ebp - 0x1c]
cmp eax, edi
jne 0x50a66e
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], edi
mov word [ebp - 0x24], di
call fcn.00402410
mov ecx, dword [ebp - 0x28]
mov byte [ebp - 4], bl
cmp ecx, edi
jne 0x50a68e
lea ecx, [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
cmp eax, edi
jne 0x50a698
lea eax, [ebp - 0x18]
mov edx, esi
sub edx, eax
sar edx, 1
mov word [ecx + edx*2], di
mov eax, dword [ebp - 0x28]
cmp eax, edi
jne 0x50a6ac
lea eax, [ebp - 0x24]
push 1
push eax
call fcn.00496570
add esp, 8
cmp eax, edi
jne 0x50a71c
mov eax, dword [ebp - 0x28]
cmp eax, edi
jne 0x50a6c5
lea eax, [ebp - 0x24]
push 1
push eax
call fcn.00496750
add esp, 8
cmp eax, edi
jne 0x50a71c
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.00401070
mov eax, dword [ebp - 0x1c]
cmp eax, edi
jne 0x50a6ea
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x2c]
push 0x6a10a0
lea ecx, [eax + 8]
call fcn.0041aed0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call fcn.00401070
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
add esi, 2
push 0x5c
push esi
call fcn.005e77bb
add esp, 8
lea ecx, [ebp - 0x28]
mov esi, eax
mov byte [ebp - 4], 1
call fcn.00401070
jmp 0x50a660