Function at 0x402770
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get startup folder

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b795c
mov eax, dword fs:[0]
push eax
sub esp, 0x28c
mov eax, dword [0x4f9008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x290], esi
mov dword [ebp - 0x294], esi
inc dword [sym.XNewLook.exe_unsigned_int_LString::_ui_instance_count]
xor eax, eax
mov dword [ebp - 0x298], esi
mov dword [ebp - method.LString.virtual_0], vtable.LString.0
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 7
mov word [ebp - 0x268], ax
push 0x208
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x218]
push eax
call fcn.004773d0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0x2e
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov dword [ebp - method.LString.virtual_0], vtable.LString.0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
test eax, eax
jne 0x40296e
mov word [ebp - 0x230], ax
push 8
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x230]
inc dword [sym.XNewLook.exe_unsigned_int_LString::_ui_instance_count]
push str.XNewLook
call fcn.00409940
xor eax, eax
mov dword [ebp - method.LString.virtual_0], vtable.LString.0
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 7
mov word [ebp - 0x24c], ax
lea ecx, [ebp - 0x218]
mov byte [ebp - 4], 3
inc dword [sym.XNewLook.exe_unsigned_int_LString::_ui_instance_count]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402890
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x24c]
call fcn.00409940
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x23c]
test ecx, ecx
je 0x40294b
mov edx, dword [ebp - 0x238]
lea eax, [ebp - 0x24c]
mov ebx, dword [ebp - 0x24c]
cmp edx, 8
cmovae eax, ebx
movzx eax, word [eax + ecx*2 - 2]
cmp eax, 0x5c
je 0x40294b
cmp eax, 0x2f
je 0x40294b
mov eax, edx
sub eax, ecx
cmp eax, 1
jb 0x40292a
cmp edx, 8
lea esi, [ebp - 0x24c]
push 2
cmovae esi, ebx
lea edi, [ecx + 1]
push 0x4d2b88
mov dword [ebp - 0x23c], edi
lea eax, [esi + ecx*2]
push eax
call fcn.00478b30
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
mov esi, dword [ebp - 0x290]
jmp 0x40294b
push 1
push 0x4d2b88
mov byte [ebp - 0x290], 0
lea ecx, [ebp - 0x24c]
push dword [ebp - 0x290]
push 1
call fcn.004090c0
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x288]
push eax
call sym.XNewLook.exe_class_LString___cdecl_operator_class_LString_const___class_LString_const__
add esp, 0xc
mov byte [ebp - 4], 5
jmp 0x4029c4
xor eax, eax
mov word [ebp - 0x230], ax
push 8
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x230]
inc dword [sym.XNewLook.exe_unsigned_int_LString::_ui_instance_count]
push str.XNewLook
call fcn.00409940
lea eax, [ebp - 0x250]
mov byte [ebp - 4], 7
push 1
push eax
call sym.XNewLook.exe_class_LString___cdecl_LEnvironment::GetTempDir_bool_
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 8
push ecx
push eax
lea eax, [ebp - 0x288]
push eax
call sym.XNewLook.exe_class_LString___cdecl_operator_class_LString_const___class_LString_const__
add esp, 0x14
mov byte [ebp - 4], 9
add eax, 4
lea ecx, [ebp - 0x268]
cmp ecx, eax
je 0x4029ea
cmp dword [eax + 0x14], 8
mov ecx, eax
jb 0x4029db
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x268]
call fcn.00409940
lea ecx, [ebp - 0x288]
call sym.XNewLook.exe_public_virtual:_void___thiscall_LString::destructor_void_
lea ecx, [ebp - 0x250]
call sym.XNewLook.exe_public_virtual:_void___thiscall_LString::destructor_void_
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 0
call sym.XNewLook.exe_public_virtual:_void___thiscall_LString::destructor_void_
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x26c]
call sym.XNewLook.exe_public:_class_LString___thiscall_LString::get_real_file_from_env_format_void_
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x402a52
mov byte [ebp - 0x289], 0
mov bl, byte [ebp - 0x289]
jmp 0x402a5f
shr ebx, 4
mov byte [ebp - 0x289], 1
and bl, 1
lea ecx, [ebp - 0x234]
call sym.XNewLook.exe_public_virtual:_void___thiscall_LString::destructor_void_
cmp byte [ebp - 0x289], 0
je 0x402a77
test bl, bl
jne 0x402a86
lea eax, [ebp - 0x26c]
push eax
call sym.XNewLook.exe_int___cdecl_LFile::make_dir_class_LString_const__
add esp, 4
push 1
lea ecx, [ebp - 0x26c]
call sym.XNewLook.exe_public:_class_LString____thiscall_LString::dir_fit_bool_
lea ecx, [esi + 4]
mov dword [esi], vtable.LString.0
xor edx, edx
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 7
mov word [ecx], dx
mov byte [ebp - 4], 0xa
add eax, 4
inc dword [sym.XNewLook.exe_unsigned_int_LString::_ui_instance_count]
cmp ecx, eax
je 0x402ad3
cmp dword [eax + 0x14], 8
mov edx, eax
jb 0x402aca
mov edx, dword [eax]
push dword [eax + 0x10]
push edx
call fcn.00409940
lea ecx, [ebp - 0x26c]
call sym.XNewLook.exe_public_virtual:_void___thiscall_LString::destructor_void_
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00475880
mov esp, ebp
pop ebp
ret