Function at 0x415350
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x501513
mov eax, dword fs:[0]
push eax
sub esp, 0xb8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5466b0]
xor eax, esp
push eax
lea eax, [esp + 0xcc]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xdc]
call fcn.0040fb50
test eax, eax
jne 0x415392
call fcn.0040fc80
mov eax, dword [0x54d210]
mov edx, dword [eax + 0xc]
mov ecx, 0x54d210
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0xd4], 0
mov eax, dword [ebp + 0x14c]
push 3
lea ecx, [esp + 0x50]
push eax
lea eax, [esp + 0x50]
mov dword [esp + 0x50], ecx
call fcn.00418470
lea edx, [esp + 0x18]
mov byte [esp + 0xd4], 1
mov ecx, dword [esp + 0x48]
push edx
call fcn.00417170
mov byte [esp + 0xd4], 3
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x4c]
cmp eax, ecx
je 0x415400
push eax
call fcn.004cc15e
add esp, 4
push 0x515f7c
push 0x515f80
lea edx, [esp + 0x20]
push edx
call fcn.00417250
mov eax, dword [esp + 0x18]
push eax
push str.uidir__s__js.ui.respath_uidir__
lea edi, [esp + 0x24]
call fcn.00404c30
mov edx, dword [ebp + 0x30]
mov edi, dword [esp + 0x24]
mov eax, dword [edx + 0xc]
lea esi, [ebp + 0x30]
add esp, 8
push edi
mov ecx, esi
call eax
push str.ui.dat
lea ecx, [esp + 0x18]
push ecx
push ebp
call fcn.00413e00
mov byte [esp + 0xd4], 4
mov edx, dword [esp + 0x14]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push edx
call ebx
test eax, eax
je 0x415509
mov ecx, dword [esp + 0x14]
push ebp
call fcn.00414f20
test eax, eax
jne 0x41562c
cmp dword [0x54e764], eax
jne 0x41548b
push 1
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov byte [esp + 0xd4], 3
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4154b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd4], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4154db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xd4], 0xffffffff
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x415502
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x41588c
push str.main.script
lea ecx, [esp + 0x3c]
push ecx
push ebp
call fcn.00413e00
lea edi, [esp + 0x14]
mov byte [esp + 0xd4], 5
call fcn.00407fc0
mov byte [esp + 0xd4], 4
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x415552
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
push ecx
call ebx
test eax, eax
jne 0x4155a6
push str.ui.script
lea edx, [esp + 0x3c]
push edx
push ebp
call fcn.00413e00
lea edi, [esp + 0x14]
mov byte [esp + 0xd4], 6
call fcn.00407fc0
mov byte [esp + 0xd4], 4
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4155a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
push ecx
push ebp
call fcn.00414d50
test eax, eax
jne 0x41562c
cmp dword [0x54e764], eax
jne 0x4155c5
push 1
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov byte [esp + 0xd4], 3
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4155ed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd4], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x415615
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xd4], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
jmp 0x4154e9
xor eax, eax
mov ebx, vtable.os::script_shared_ptr_class__variant__.0
lea ecx, [esp + 0x20]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], ebx
call dword [vtable.os::script_shared_ptr_class__variant__.0]
xor edi, edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], edi
mov byte [esp + 0xd4], 7
mov edx, dword [esi]
mov edx, dword [edx + 0x30]
lea eax, [esp + 0x20]
push eax
push str.__windowless__
mov ecx, esi
call edx
test eax, eax
je 0x4156d7
mov ecx, dword [esp + 0x24]
cmp ecx, edi
je 0x4156d7
call fcn.0040c5b0
or eax, edx
je 0x4156d7
mov eax, dword [ebp + 4]
mov ecx, dword [ebp + 0x10]
push edi
push eax
push ecx
push ebp
call fcn.00414010
cmp dword [0x54e764], edi
jne 0x4156a2
push 1
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov byte [esp + 0xd4], 4
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], ebx
call fcn.0040ea60
lea ecx, [esp + 0x14]
call fcn.004087f0
lea eax, [esp + 0x18]
call fcn.0042afc0
lea eax, [esp + 0x1c]
call fcn.0042afc0
jmp 0x415887
push str.hwndjs.ui.hwnd
mov edi, 0xf
lea eax, [esp + 0x20]
call fcn.004185d0
mov eax, dword [esi]
mov ebp, dword [esp + 0x1c]
mov edx, dword [eax + 0xc]
push ebp
mov ecx, esi
call edx
xor edi, edi
lea ecx, [esp + 0x2c]
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x2c], ebx
call dword [vtable.os::script_shared_ptr_class__variant__.0]
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], edi
mov byte [esp + 0xd4], 8
mov eax, dword [esi]
mov edx, dword [eax + 0x30]
lea ecx, [esp + 0x2c]
push ecx
push str.hwnd
mov ecx, esi
call edx
mov eax, dword [esp + 0x30]
cmp eax, edi
je 0x415748
call fcn.0040ef50
test al, al
jne 0x4157ea
lea ecx, [esp + 0x3c]
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x3c], ebx
call dword [vtable.os::script_shared_ptr_class__variant__.0]
mov dword [esp + 0x44], edi
mov dword [esp + 0x40], edi
mov byte [esp + 0xd4], 9
mov edx, dword [esi]
mov edx, dword [edx + 0x30]
lea eax, [esp + 0x3c]
push eax
push str.__mainwindow__
mov ecx, esi
call edx
test eax, eax
je 0x4157c5
mov eax, dword [esp + 0x40]
cmp eax, edi
je 0x4157c5
call fcn.0040ef50
test al, al
je 0x4157c5
mov byte [esp + 0xd4], 8
lea ecx, [esp + 0x3c]
mov dword [esp + 0x3c], ebx
call fcn.0040ea60
mov byte [esp + 0xd4], 7
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2c], ebx
call fcn.0040ea60
jmp 0x4156a2
mov byte [esp + 0xd4], 8
lea ecx, [esp + 0x3c]
mov dword [esp + 0x3c], ebx
call fcn.0040ea60
cmp dword [0x54e764], edi
jne 0x4157ea
push 1
call dword [sym.imp.USER32.dll_PostQuitMessage]
mov byte [esp + 0xd4], 7
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2c], ebx
call fcn.0040ea60
mov byte [esp + 0xd4], 4
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], ebx
call fcn.0040ea60
mov byte [esp + 0xd4], 3
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41583c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd4], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x415864
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0xd4], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x415887
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0xcc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc4
ret 4