Function at 0x41ef50
Capabilities:
Check if file exists
Get file attributes
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
mov eax, 0x10074
call fcn.004a7dd0
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov byte [0x4da9a0], 1
mov word [0x4db20c], 0
cmp esi, ebx
jne 0x41ef81
mov esi, dword [0x4db1f0]
cmp dword [0x4db208], ebx
jne 0x41efc6
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41efc6
push esi
push str.Script_file_not_found:_n_s
mov esi, 0x8018
lea edi, [esp + 0x58]
call fcn.0047ffb0
fldz
fstp qword [esp]
mov eax, edi
push ebx
push ebx
push 0x10
push eax
call fcn.00484f30
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x4da650], ebx
jne 0x41efdc
call fcn.0047d030
mov dword [0x4da650], eax
cmp eax, ebx
je 0x41f028
mov ecx, dword [0x4da654]
cmp dword [ecx + 8], 0x14
jae 0x41effa
call fcn.0047d030
mov ecx, dword [0x4da654]
mov dword [ecx + 0xc], eax
cmp eax, ebx
je 0x41f028
mov eax, dword [ecx + 4]
add dword [ecx + 8], 0xffffffec
lea edx, [eax + 0x14]
mov dword [0x4da658], eax
mov dword [ecx + 4], edx
cmp eax, ebx
je 0x41f028
mov dword [eax], vtable.Label.0
mov dword [eax + 4], 0x4b0cf8
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
jmp 0x41f02a
xor eax, eax
mov dword [0x4dad60], eax
cmp eax, ebx
je 0x41f26f
cmp dword [0x4db208], 2
mov eax, 0x4b6410
je 0x41f047
mov eax, esi
mov edi, dword [0x4da634]
push ebx
push ebx
push eax
lea eax, [esp + 0x54]
push eax
push 0x4da728
mov dword [esp + 0x5c], ebx
call fcn.0041f410
mov ebx, dword [esp + 0x48]
mov esi, eax
cmp esi, 3
jne 0x41f07c
push edi
push ebx
push 0x4da728
call fcn.0041f800
mov esi, eax
mov edi, 1
test ebx, ebx
je 0x41f08e
mov edx, dword [ebx]
mov eax, dword [edx]
push edi
mov ecx, ebx
call eax
cmp esi, edi
jne 0x41f26f
push 0
push 0
push 0
push 0x68
push 0x4da728
call fcn.004260f0
test eax, eax
je 0x41f26f
mov ecx, dword [0x4da72c]
mov dword [ecx + 0xc], edi
mov eax, dword [0x4da728]
call fcn.0042db20
test eax, eax
je 0x41f26f
mov eax, dword [0x4da728]
call fcn.0042dc20
cmp dword [0x4da730], 0
je 0x41f105
mov eax, dword [0x4da728]
mov edx, dword [0x4da734]
mov dword [edx + 0x14], eax
mov ecx, dword [0x4da728]
mov edx, dword [0x4da734]
mov dword [ecx + 0x10], edx
mov eax, dword [0x4da730]
mov dword [0x4da728], eax
xor ebx, ebx
cmp dword [0x4da744], ebx
jle 0x41f14b
nop
mov ecx, dword [0x4da740]
mov edi, dword [ecx + ebx*4]
cmp byte [edi + 0x3d], 0
jne 0x41f13d
test byte [edi + 0x3c], 4
jne 0x41f13d
mov eax, dword [edi + 0x1c]
lea esi, [edi + 0x28]
push edi
call fcn.0043ac10
mov eax, dword [edi + 0x20]
lea esi, [edi + 0x30]
push edi
call fcn.0043ac10
inc ebx
cmp ebx, dword [0x4da744]
jl 0x41f110
mov edi, 1
cmp dword [0x4da98c], 0
je 0x41f178
call fcn.0042b1f0
test eax, eax
je 0x41f26f
mov eax, dword [0x4da98c]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [0x4da98c], 0
cmp dword [0x4d985c], 0
je 0x41f186
call fcn.0043acb0
cmp dword [0x4db214], 0
jne 0x41efbd
mov ecx, dword [0x4d9f1c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
add dword [0x4da99c], edi
push 0
push 0
push 0
push 0x68
push 0x4da728
call fcn.004260f0
test eax, eax
je 0x41f26f
push 0
push 0
push 0
push 0x68
push 0x4da728
call fcn.004260f0
test eax, eax
je 0x41f26f
mov edx, dword [0x4da72c]
mov eax, dword [edx + 0x10]
mov dword [eax + 0xc], edi
mov ecx, dword [0x4da72c]
mov dword [ecx + 0xc], edi
mov edx, dword [0x4dad60]
mov eax, dword [0x4da72c]
push 0
push 0
mov dword [edx + 8], eax
mov ecx, dword [0x4da728]
push 0
push ecx
mov ecx, 0x4da728
call fcn.0042dc90
test eax, eax
je 0x41f26f
mov eax, dword [0x4da728]
call fcn.0042e0b0
test eax, eax
je 0x41f26f
push 3
push 0
push 0x4b6414
mov ecx, 0x4da728
call fcn.0042d110
mov dword [0x4d9f14], eax
test eax, eax
je 0x41f26f
push edi
push 0
push 0xffffffffffffffff
push 0x4af9a8
push eax
call fcn.00483320
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [esp + 0x48]
call fcn.00419e10
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret