Function at 0x41f000
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.004a7e90
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov byte [0x4db9a0], 1
mov word [0x4dc20c], 0
cmp esi, ebx
jne 0x41f031
mov esi, dword [0x4dc1f0]
cmp dword [0x4dc208], ebx
jne 0x41f076
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x41f076
push esi
push str.Script_file_not_found:_n_s
mov esi, 0x8018
lea edi, [esp + 0x58]
call fcn.00480070
fldz
fstp qword [esp]
mov eax, edi
push ebx
push ebx
push 0x10
push eax
call fcn.00484ff0
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x4db650], ebx
jne 0x41f08c
call fcn.0047d0f0
mov dword [0x4db650], eax
cmp eax, ebx
je 0x41f0d8
mov ecx, dword [0x4db654]
cmp dword [ecx + 8], 0x14
jae 0x41f0aa
call fcn.0047d0f0
mov ecx, dword [0x4db654]
mov dword [ecx + 0xc], eax
cmp eax, ebx
je 0x41f0d8
mov eax, dword [ecx + 4]
add dword [ecx + 8], 0xffffffec
lea edx, [eax + 0x14]
mov dword [0x4db658], eax
mov dword [ecx + 4], edx
cmp eax, ebx
je 0x41f0d8
mov dword [eax], vtable.Label.0
mov dword [eax + 4], 0x4b09ac
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
jmp 0x41f0da
xor eax, eax
mov dword [0x4dbd60], eax
cmp eax, ebx
je 0x41f31f
cmp dword [0x4dc208], 2
mov eax, 0x4b7438
je 0x41f0f7
mov eax, esi
mov edi, dword [0x4db634]
push ebx
push ebx
push eax
lea eax, [esp + 0x54]
push eax
push 0x4db728
mov dword [esp + 0x5c], ebx
call fcn.0041f4c0
mov ebx, dword [esp + 0x48]
mov esi, eax
cmp esi, 3
jne 0x41f12c
push edi
push ebx
push 0x4db728
call fcn.0041f8b0
mov esi, eax
mov edi, 1
test ebx, ebx
je 0x41f13e
mov edx, dword [ebx]
mov eax, dword [edx]
push edi
mov ecx, ebx
call eax
cmp esi, edi
jne 0x41f31f
push 0
push 0
push 0
push 0x68
push 0x4db728
call fcn.004261a0
test eax, eax
je 0x41f31f
mov ecx, dword [0x4db72c]
mov dword [ecx + 0xc], edi
mov eax, dword [0x4db728]
call fcn.0042dbd0
test eax, eax
je 0x41f31f
mov eax, dword [0x4db728]
call fcn.0042dcd0
cmp dword [0x4db730], 0
je 0x41f1b5
mov eax, dword [0x4db728]
mov edx, dword [0x4db734]
mov dword [edx + 0x14], eax
mov ecx, dword [0x4db728]
mov edx, dword [0x4db734]
mov dword [ecx + 0x10], edx
mov eax, dword [0x4db730]
mov dword [0x4db728], eax
xor ebx, ebx
cmp dword [0x4db744], ebx
jle 0x41f1fb
nop
mov ecx, dword [0x4db740]
mov edi, dword [ecx + ebx*4]
cmp byte [edi + 0x3d], 0
jne 0x41f1ed
test byte [edi + 0x3c], 4
jne 0x41f1ed
mov eax, dword [edi + 0x1c]
lea esi, [edi + 0x28]
push edi
call fcn.0043acd0
mov eax, dword [edi + 0x20]
lea esi, [edi + 0x30]
push edi
call fcn.0043acd0
inc ebx
cmp ebx, dword [0x4db744]
jl 0x41f1c0
mov edi, 1
cmp dword [0x4db98c], 0
je 0x41f228
call fcn.0042b2a0
test eax, eax
je 0x41f31f
mov eax, dword [0x4db98c]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [0x4db98c], 0
cmp dword [0x4da85c], 0
je 0x41f236
call fcn.0043ad70
cmp dword [0x4dc214], 0
jne 0x41f06d
mov ecx, dword [0x4daf1c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
add dword [0x4db99c], edi
push 0
push 0
push 0
push 0x68
push 0x4db728
call fcn.004261a0
test eax, eax
je 0x41f31f
push 0
push 0
push 0
push 0x68
push 0x4db728
call fcn.004261a0
test eax, eax
je 0x41f31f
mov edx, dword [0x4db72c]
mov eax, dword [edx + 0x10]
mov dword [eax + 0xc], edi
mov ecx, dword [0x4db72c]
mov dword [ecx + 0xc], edi
mov edx, dword [0x4dbd60]
mov eax, dword [0x4db72c]
push 0
push 0
mov dword [edx + 8], eax
mov ecx, dword [0x4db728]
push 0
push ecx
mov ecx, 0x4db728
call fcn.0042dd40
test eax, eax
je 0x41f31f
mov eax, dword [0x4db728]
call fcn.0042e160
test eax, eax
je 0x41f31f
push 3
push 0
push 0x4b743c
mov ecx, 0x4db728
call fcn.0042d1c0
mov dword [0x4daf14], eax
test eax, eax
je 0x41f31f
push edi
push 0
push 0xffffffffffffffff
push 0x4b09bc
push eax
call fcn.004833e0
lea edx, [esp + 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [esp + 0x48]
call fcn.00419e60
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