Function at 0x40f970
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x466bea
mov eax, dword fs:[0]
push eax
sub esp, 0x444
mov eax, dword [0x48602c]
xor eax, esp
mov dword [esp + 0x440], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x48602c]
xor eax, esp
push eax
lea eax, [esp + 0x458]
mov dword fs:[0], eax
mov eax, dword [esp + 0x468]
xor ebx, ebx
push 0x103
lea edx, [esp + 0x49]
push ebx
push edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x28], ecx
mov byte [esp + 0x50], bl
call sub.MSVCR80.dll_memset
push 0x48
call fcn.0043ae6c
add esp, 0x10
mov dword [esp + 0x18], eax
cmp eax, ebx
mov dword [esp + 0x460], ebx
je 0x40f9f7
push eax
call fcn.00437760
mov edi, eax
mov dword [esp + 0x14], edi
jmp 0x40f9fd
mov dword [esp + 0x14], ebx
mov edi, ebx
mov dword [esp + 0x460], 0xffffffff
call sub.Encrypt.dll_CreateEncryptObject
mov edx, dword [eax]
mov dword [esp + 0x18], eax
mov ecx, eax
mov eax, dword [edx + 8]
push 2
call eax
lea ecx, [esp + 0x44]
push ecx
push ebx
push ebx
push 0x23
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
jl 0x40fa86
lea eax, [esp + 0x44]
add eax, 0xffffffff
lea ecx, [ecx]
mov cl, byte [eax + 1]
add eax, 1
cmp cl, bl
jne 0x40fa40
mov edx, dword [str.AomeiBRNAS.XML]
mov ecx, dword [0x47bb04]
mov dword [eax], edx
mov edx, dword [0x47bb08]
mov dword [eax + 4], ecx
mov ecx, dword [0x47bb0c]
mov dword [eax + 8], edx
mov dl, byte [0x47bb10]
mov dword [eax + 0xc], ecx
mov byte [eax + 0x10], dl
lea eax, [esp + 0x44]
push eax
call esi
cmp eax, 0xffffffff
jne 0x40fb37
push 0x104
lea ecx, [esp + 0x48]
push ebx
push ecx
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x104
lea edx, [esp + 0x48]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x44]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40fab1
sub eax, edx
cmp eax, ebx
jle 0x40fad5
mov cl, 0x5c
cmp byte [esp + eax + 0x44], cl
je 0x40fad1
sub eax, 1
cmp eax, ebx
jg 0x40fac2
jmp 0x40fad5
mov byte [esp + eax + 0x44], bl
lea eax, [esp + 0x44]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
cmp cl, bl
jne 0x40fae0
mov ecx, dword [str.NAS.XML]
mov edx, dword [0x47bb18]
mov dword [eax], ecx
mov cl, byte [0x47bb1c]
mov dword [eax + 4], edx
lea edx, [esp + 0x44]
push edx
mov byte [eax + 8], cl
call esi
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
cmp eax, ebx
jne 0x40fb37
push 0x439
call fcn.0040cbd0
push eax
push str.__::GetFileAttributesA_sCurPath___INVALID_FILE_ATTRIBUTES_
push ebx
call fcn.00401020
add esp, 0x10
jmp 0x40fe0c
push 1
lea edx, [esp + 0x48]
push edx
push edi
call fcn.00437820
movzx eax, al
cmp eax, ebx
jne 0x40fb69
push 0x43c
call fcn.0040cbd0
push eax
push str.xmlAllTasks__LoadFile_sCurPath__TIXML_ENCODING_UTF8_
push ebx
call fcn.00401020
add esp, 0x10
jmp 0x40fe0c
mov ecx, edi
call fcn.004077c0
mov ecx, eax
xor eax, eax
cmp ecx, ebx
setne al
mov dword [esp + 0x20], ecx
cmp eax, ebx
jne 0x40fb9f
push 0x440
call fcn.0040cbd0
push eax
push str.__pRoot__NULL_
push ebx
call fcn.00401020
add esp, 0x10
jmp 0x40fe0c
call fcn.00407780
mov ebp, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
lea esp, [esp]
push 0x103
lea eax, [esp + 0x14d]
push ebx
push eax
mov byte [esp + 0x154], bl
call sub.MSVCR80.dll_memset
xor eax, eax
add esp, 0xc
cmp esi, ebx
setne al
cmp eax, ebx
je 0x40fdd6
lea ecx, [esi + 0x2c]
push ecx
mov ebx, str.nasipname
call fcn.004384c0
test eax, eax
je 0x40fbf8
lea ecx, [eax + 0x18]
call fcn.00408d70
jmp 0x40fbfa
xor eax, eax
push eax
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
push 0x104
lea edx, [esp + 0x14c]
push 0
push edx
mov dword [esp + 0x46c], 1
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP80.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
lea eax, [esp + 0x14c]
push 0x104
push eax
call dword [sym.imp.MSVCR80.dll_strcpy_s]
push 0x206
lea ecx, [esp + 0x25e]
push 0
push ecx
mov word [esp + 0x264], 0
call sub.MSVCR80.dll_memset
add esp, 0x18
push 0
push 0
push 0xffffffffffffffff
lea edx, [esp + 0x154]
push edx
push 0
push 0xfde9
call ebp
push eax
lea eax, [esp + 0x250]
push eax
push 0xffffffffffffffff
lea ecx, [esp + 0x154]
push ecx
push 0
push 0xfde9
call ebp
mov edi, dword [esp + 0x46c]
mov edx, dword [esp + 0x1c]
mov ebx, dword [sym.imp.MSVCR80.dll__wcsnicmp]
push edi
push edx
lea eax, [esp + 0x254]
push eax
call ebx
add esp, 0xc
test eax, eax
jne 0x40fd25
mov ecx, esi
call fcn.00408eb0
test esi, esi
mov edi, eax
je 0x40fd07
mov ecx, dword [esp + 0x20]
cmp dword [esi + 0x10], ecx
jne 0x40fd07
mov eax, dword [esi + 0x28]
test eax, eax
je 0x40fce2
mov edx, dword [esi + 0x24]
mov dword [eax + 0x24], edx
jmp 0x40fce8
mov eax, dword [esi + 0x24]
mov dword [ecx + 0x1c], eax
mov eax, dword [esi + 0x24]
test eax, eax
je 0x40fcf7
mov ecx, dword [esi + 0x28]
mov dword [eax + 0x28], ecx
jmp 0x40fcfd
mov edx, dword [esi + 0x28]
mov dword [ecx + 0x18], edx
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
test edi, edi
mov dword [esp + 0x460], 0xffffffff
lea ecx, [esp + 0x28]
je 0x40fe00
mov esi, edi
jmp 0x40fdb8
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx]
mov eax, dword [eax + 0x14]
lea edx, [esp + 0x24c]
push edx
push 0x104
push edx
call eax
test al, al
je 0x40fda9
mov ecx, dword [esp + 0x1c]
push edi
push ecx
lea edx, [esp + 0x254]
push edx
call ebx
add esp, 0xc
test eax, eax
jne 0x40fda9
mov ecx, esi
call fcn.00408eb0
test esi, esi
mov edi, eax
je 0x40fda3
mov ecx, dword [esp + 0x20]
cmp dword [esi + 0x10], ecx
jne 0x40fda3
mov eax, dword [esi + 0x28]
test eax, eax
je 0x40fd7e
mov edx, dword [esi + 0x24]
mov dword [eax + 0x24], edx
jmp 0x40fd84
mov eax, dword [esi + 0x24]
mov dword [ecx + 0x1c], eax
mov eax, dword [esi + 0x24]
test eax, eax
je 0x40fd93
mov ecx, dword [esi + 0x28]
mov dword [eax + 0x28], ecx
jmp 0x40fd99
mov edx, dword [esi + 0x28]
mov dword [ecx + 0x18], edx
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
test edi, edi
je 0x40fdf1
mov esi, edi
mov dword [esp + 0x460], 0xffffffff
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ecx, esi
call fcn.00408eb0
mov esi, eax
test esi, esi
je 0x40fe06
mov edi, dword [esp + 0x14]
xor ebx, ebx
jmp 0x40fbb0
push 0x449
call fcn.0040cbd0
push eax
push str.__pItem__NULL_
push ebx
call fcn.00401020
add esp, 0x10
jmp 0x40fe0c
mov dword [esp + 0x460], 0xffffffff
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov edi, dword [esp + 0x14]
xor ebx, ebx
cmp edi, ebx
je 0x40fea1
lea ecx, [edi + 0x20]
call fcn.00408d70
push eax
mov ebx, 0x47bc84
call fcn.00436b50
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
je 0x40fe78
cmp byte [edi + 0x44], bl
je 0x40fe5c
mov edi, dword [sym.imp.MSVCR80.dll_fputc]
push esi
push 0xef
call edi
push esi
push 0xbb
call edi
push esi
push 0xbf
call edi
mov edi, dword [esp + 0x2c]
add esp, 0x18
mov eax, dword [edi]
mov edx, dword [eax + 4]
push ebx
push esi
mov ecx, edi
call edx
push esi
call dword [sym.imp.MSVCR80.dll_ferror]
push esi
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 8
mov esi, dword [edi + 0x18]
cmp esi, ebx
je 0x40fe91
nop
mov ecx, esi
mov eax, dword [ecx]
mov edx, dword [eax]
mov esi, dword [esi + 0x28]
push 1
call edx
cmp esi, ebx
jne 0x40fe80
mov dword [edi + 0x18], ebx
mov dword [edi + 0x1c], ebx
mov eax, dword [edi]
mov edx, dword [eax]
push 1
mov ecx, edi
call edx
mov eax, dword [esp + 0x18]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x458]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x440]
xor ecx, esp
call fcn.0043ad38
add esp, 0x450
ret 8