Function at 0x1008ed10
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x101437bc
mov eax, dword fs:[0]
push eax
sub esp, 0x850
mov eax, dword [0x10170024]
xor eax, esp
mov dword [esp + 0x848], eax
push ebx
push esi
push edi
mov eax, dword [0x10170024]
xor eax, esp
push eax
lea eax, [esp + 0x860]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
xor edi, edi
push 0x207
mov ebx, edx
lea edx, [esp + 0x39]
push edi
push edx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], edi
mov byte [esp + 0x40], 0
call sub.MSVCR80.dll_memset
push 0x207
lea eax, [esp + 0x65d]
push edi
push eax
mov byte [esp + 0x664], 0
call sub.MSVCR80.dll_memset
push 0x206
lea ecx, [esp + 0x462]
push edi
push ecx
mov word [esp + 0x468], di
call sub.MSVCR80.dll_memset
push 0x48
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
add esp, 0x28
mov dword [esp + 0x24], eax
cmp eax, edi
mov dword [esp + 0x868], edi
je 0x1008edda
push eax
call fcn.1007dea0
mov dword [esp + 0x20], eax
jmp 0x1008edde
mov dword [esp + 0x20], edi
push 0x208
lea edx, [esp + 0x448]
mov dword [esp + 0x86c], 0xffffffff
call fcn.1008e210
lea eax, [esp + 0x444]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x1008ee04
lea esi, [ebx + 4]
mov ebx, dword [esi + 4]
sub eax, edx
sar eax, 1
cmp ebx, dword [esi + 8]
mov dword [esp + 0x1c], eax
jbe 0x1008ee28
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edi, dword [esi + 8]
cmp dword [esi + 4], edi
jbe 0x1008ee36
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, esi
je 0x1008ee40
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebx, edi
je 0x1008ee84
cmp ebx, dword [esi + 8]
jb 0x1008ee4f
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x448]
push eax
push ebx
call dword [sym.imp.MSVCR80.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x1008ee7d
cmp ebx, dword [esi + 8]
jb 0x1008ee75
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
add ebx, 0x61c
jmp 0x1008ee28
xor eax, eax
jmp 0x1008f745
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea ecx, [esp + 0x34]
push ecx
xor ebx, ebx
push ebx
push ebx
push 0x23
push ebx
call esi
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
jl 0x1008ef11
lea eax, [esp + 0x34]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x1008eeb0
mov edx, dword [str.AomeiBRNAS.XML]
mov ecx, dword [0x101546e4]
mov dword [eax], edx
mov edx, dword [0x101546e8]
mov dword [eax + 4], ecx
mov ecx, dword [0x101546ec]
mov dword [eax + 8], edx
mov dl, byte [0x101546f0]
mov dword [eax + 0xc], ecx
mov byte [eax + 0x10], dl
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x650]
push 0x208
push ecx
call dword [sym.imp.MSVCR80.dll_strcpy_s]
add esp, 0xc
lea edx, [esp + 0x34]
push edx
call edi
cmp eax, 0xffffffff
jne 0x1008effa
push 0x208
lea eax, [esp + 0x38]
push ebx
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x208
lea ecx, [esp + 0x38]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x34]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1008ef40
sub eax, edx
cmp eax, ebx
jle 0x1008ef65
mov cl, 0x5c
cmp byte [esp + eax + 0x34], cl
je 0x1008ef60
sub eax, 1
cmp eax, ebx
jg 0x1008ef51
jmp 0x1008ef65
mov byte [esp + eax + 0x34], 0
lea eax, [esp + 0x34]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x1008ef70
mov edx, dword [str.NAS.XML]
mov ecx, dword [0x101546f8]
mov dword [eax], edx
mov dl, byte [0x101546fc]
mov dword [eax + 4], ecx
mov byte [eax + 8], dl
lea eax, [esp + 0x34]
push eax
call edi
cmp eax, 0xffffffff
jne 0x1008effa
call sub.Comn.dll_GetObjectSys
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x1c]
call eax
test eax, eax
je 0x1008f07c
push ebx
push 0x80
push 2
push ebx
push 3
push 0xc0000000
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x1008f02e
call sub.Comn.dll_GetObjectLog
mov edi, eax
mov esi, dword [edi]
push 0x316
add esi, 0xc
call fcn.1008ce00
mov edx, dword [esi]
push eax
push str._s:create_nas_file_fail
push edi
call edx
add esp, 0x10
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x34]
push eax
push esi
call fcn.1007df90
movzx eax, al
cmp eax, ebx
jne 0x1008f2c7
push 0x34c
call fcn.1008ce00
mov esi, eax
call sub.Comn.dll_GetObjectLog
push esi
push ebx
push str.xmlAllTasks__LoadFile_sCurPath__TIXML_ENCODING_UTF8_
jmp 0x1008f067
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x34]
push eax
call fcn.1008eaf0
cmp eax, ebx
jne 0x1008effa
push 0x31b
mov dword [esp + 0x1c], 0x31b1005
call fcn.1008ce00
mov esi, eax
call sub.Comn.dll_GetObjectLog
push esi
push 0x31b1005
push str.CreateDefaultNasXML_sCurPath_
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push str._s_return_code:_0x_08X___s.
push eax
call edx
add esp, 0x18
jmp 0x1008f6a4
push 0x208
lea eax, [esp + 0x38]
push ebx
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
push ebx
push ebx
push 0x23
push ebx
call esi
cmp eax, ebx
jge 0x1008f0f9
call sub.Comn.dll_GetObjectLog
mov ebx, eax
mov esi, dword [ebx]
push 0x324
add esi, 0xc
call fcn.1008ce00
mov edx, dword [esi]
push eax
push str._s:_get_data_folder_path_fail
push ebx
call edx
push 0x325
mov dword [esp + 0x2c], 0x3251005
call fcn.1008ce00
mov esi, eax
call sub.Comn.dll_GetObjectLog
push esi
push 0x3251005
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push str.FALSE
push str._s_return_code:_0x_08X___s.
push eax
call edx
add esp, 0x28
jmp 0x1008f6a4
lea eax, [esp + 0x34]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x1008f100
mov ecx, dword [0x1014db0c]
mov edx, dword [0x1014db10]
mov dword [eax], ecx
mov cl, byte [0x1014db14]
mov dword [eax + 4], edx
lea edx, [esp + 0x34]
push edx
mov byte [eax + 8], cl
call edi
cmp eax, 0xffffffff
je 0x1008f17d
test al, 0x10
jne 0x1008f216
call sub.Comn.dll_GetObjectLog
mov ebx, eax
mov esi, dword [ebx]
push 0x32c
add esi, 0xc
call fcn.1008ce00
push eax
mov eax, dword [esi]
push str._s:_aomei_data_folder_cannt_create
push ebx
call eax
push 0x32d
mov dword [esp + 0x2c], 0x32d1005
call fcn.1008ce00
mov esi, eax
call sub.Comn.dll_GetObjectLog
push esi
push 0x32d1005
jmp 0x1008f0df
push ebx
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x1008f1e7
call sub.Comn.dll_GetObjectLog
mov ebx, eax
mov esi, dword [ebx]
push 0x334
add esi, 0xc
call fcn.1008ce00
mov ecx, dword [esi]
push eax
push str._s:_create_aomei_data_dir_fail
push ebx
call ecx
push 0x335
mov dword [esp + 0x2c], 0x3351005
call fcn.1008ce00
mov esi, eax
call sub.Comn.dll_GetObjectLog
mov edx, dword [eax]
push esi
push 0x3351005
push str.FALSE
push str._s_return_code:_0x_08X___s.
push eax
mov eax, dword [edx + 0xc]
call eax
add esp, 0x28
jmp 0x1008f6a4
lea eax, [esp + 0x34]
add eax, 0xffffffff
mov edi, edi
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x1008f1f0
mov ecx, dword [str.NAS.XML]
mov edx, dword [0x101546f8]
mov dword [eax], ecx
mov cl, byte [0x101546fc]
mov dword [eax + 4], edx
mov byte [eax + 8], cl
jmp 0x1008f244
lea eax, [esp + 0x34]
add eax, 0xffffffff
lea ecx, [ecx]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x1008f220
mov edx, dword [str.NAS.XML]
mov ecx, dword [0x101546f8]
mov dword [eax], edx
mov dl, byte [0x101546fc]
mov dword [eax + 4], ecx
mov byte [eax + 8], dl
push ebx
push 0x80
push 2
push ebx
push 3
push 0xc0000000
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x1008f28a
call sub.Comn.dll_GetObjectLog
mov edi, eax
mov esi, dword [edi]
push 0x341
add esi, 0xc
call fcn.1008ce00
mov ecx, dword [esi]
push eax
push str._s:create_nas_file_fail
push edi
call ecx
jmp 0x1008eff7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x34]
push edx
call fcn.1008eaf0
cmp eax, ebx
jne 0x1008effa
push 0x346
mov dword [esp + 0x1c], 0x3461005
call fcn.1008ce00
mov esi, eax
call sub.Comn.dll_GetObjectLog
push esi
push 0x3461005
jmp 0x1008f062
push 0x207
lea eax, [esp + 0x241]
push ebx
push eax
mov byte [esp + 0x248], 0
call sub.MSVCR80.dll_memset
mov esi, dword [esi + 0x18]
add esp, 0xc
cmp esi, ebx
je 0x1008f304
lea esp, [esp]
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
mov ecx, esi
call eax
test eax, eax
jne 0x1008f344
mov esi, dword [esi + 0x28]
cmp esi, ebx
jne 0x1008f2f0
mov dword [esp + 0x1c], ebx
xor ecx, ecx
cmp dword [esp + 0x1c], ebx
setne cl
mov esi, ecx
cmp esi, ebx
jne 0x1008f353
push 0x354
call fcn.1008ce00
mov edi, eax
call sub.Comn.dll_GetObjectLog
mov edx, dword [eax]
push edi
push esi
push str.__pRoot__NULL_
push str._s_return_code:_0x_08X___s.
push eax
mov eax, dword [edx + 0xc]
call eax
add esp, 0x18
jmp 0x1008f6a4
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
mov ecx, esi
call eax
mov dword [esp + 0x1c], eax
jmp 0x1008f308
push 0x50
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x24], eax
cmp eax, ebx
mov dword [esp + 0x868], 1
je 0x1008f381
push eax
mov ecx, str.Item
call fcn.1007d7f0
mov dword [esp + 0x28], eax
jmp 0x1008f385
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x10]
push 0
mov dword [esp + 0x86c], 0xffffffff
push ebx
lea edi, [esp + 0x1c]
mov dword [esp + 0x1c], 0
call fcn.1008f850
mov edi, dword [esp + 0x14]
xor ecx, ecx
cmp ecx, edi
sbb edx, edx
neg edx
jne 0x1008f3d4
push 0x359
call fcn.1008ce00
mov esi, eax
call sub.Comn.dll_GetObjectLog
push esi
push 0
push str.dwLength___0
jmp 0x1008f067
add edi, 1
push edi
call sub.MSVCR80.dll_void____cdecl_operator_new___unsigned_int_
push edi
mov esi, eax
push 0
push esi
mov dword [esp + 0x20], esi
call sub.MSVCR80.dll_memset
add esp, 0x10
push esi
push ebx
lea edi, [esp + 0x1c]
call fcn.1008f850
test eax, eax
jne 0x1008f42c
push 0x35d
call fcn.1008ce00
mov edi, eax
call sub.Comn.dll_GetObjectLog
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push edi
push 0
push str._WideCharToMultiByte_pPassword__pTmp__dwLength_
push str._s_return_code:_0x_08X___s.
push eax
call edx
add esp, 0x18
jmp 0x1008f697
lea eax, [esp + 0x23c]
push eax
mov edi, esi
call fcn.1008f970
mov eax, dword [esp + 0x28]
add eax, 0x2c
push 0x10154798
mov dword [esp + 0x28], eax
call fcn.1007ed80
test eax, eax
je 0x1008f480
lea ecx, [esp + 0x23c]
lea esi, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x1008f460
sub ecx, esi
lea edi, [eax + 0x18]
mov esi, ecx
lea ebx, [esp + 0x23c]
call fcn.10080f80
mov esi, dword [esp + 0x10]
test esi, esi
je 0x1008f499
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov dword [esp + 0x14], 0
mov esi, dword [esp + 0x14]
add esp, 4
push 0x208
lea ecx, [esp + 0x240]
push 0
push ecx
call sub.MSVCR80.dll_memset
mov ebx, dword [esp + 0x38]
add esp, 0xc
push 0
push ebx
lea edi, [esp + 0x1c]
mov dword [esp + 0x1c], 0
call fcn.1008f850
mov edi, dword [esp + 0x14]
xor edx, edx
cmp edx, edi
sbb eax, eax
neg eax
jne 0x1008f504
push 0x368
call fcn.1008ce00
mov edi, eax
call sub.Comn.dll_GetObjectLog
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push edi
push 0
push str.dwLength___0
push str._s_return_code:_0x_08X___s.
push eax
call edx
add esp, 0x18
jmp 0x1008f697
add edi, 1
push edi
call sub.MSVCR80.dll_void____cdecl_operator_new___unsigned_int_
push edi
mov esi, eax
push 0
push esi
mov dword [esp + 0x20], esi
call sub.MSVCR80.dll_memset
add esp, 0x10
push esi
push ebx
lea edi, [esp + 0x1c]
call fcn.1008f850
test eax, eax
jne 0x1008f55c
push 0x36c
call fcn.1008ce00
mov esi, eax
call sub.Comn.dll_GetObjectLog
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push esi
push 0
push str._WideCharToMultiByte_pUsername__pTmp__dwLength_
push str._s_return_code:_0x_08X___s.
push eax
call edx
add esp, 0x18
jmp 0x1008f693
lea eax, [esp + 0x23c]
push eax
mov edi, esi
call fcn.1008f970
mov eax, dword [esp + 0x24]
push str.username
call fcn.1007ed80
test eax, eax
je 0x1008f5a7
lea ecx, [esp + 0x23c]
lea esi, [ecx + 1]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x1008f587
sub ecx, esi
lea edi, [eax + 0x18]
mov esi, ecx
lea ebx, [esp + 0x23c]
call fcn.10080f80
mov esi, dword [esp + 0x10]
test esi, esi
je 0x1008f5bc
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esp + 0x10], 0
push 0x208
lea ecx, [esp + 0x240]
push 0
push ecx
call sub.MSVCR80.dll_memset
mov ebx, dword [esp + 0x3c]
add esp, 0xc
push 0
push ebx
lea edi, [esp + 0x1c]
mov dword [esp + 0x1c], 0
call fcn.1008f850
mov edi, dword [esp + 0x14]
xor edx, edx
cmp edx, edi
sbb eax, eax
neg eax
jne 0x1008f624
push 0x377
call fcn.1008ce00
mov esi, eax
call sub.Comn.dll_GetObjectLog
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push esi
push 0
push str.dwLength___0
push str._s_return_code:_0x_08X___s.
push eax
call edx
add esp, 0x18
jmp 0x1008f693
add edi, 1
push edi
call sub.MSVCR80.dll_void____cdecl_operator_new___unsigned_int_
push edi
mov esi, eax
push 0
push esi
mov dword [esp + 0x20], esi
call sub.MSVCR80.dll_memset
add esp, 0x10
push esi
push ebx
lea edi, [esp + 0x1c]
call fcn.1008f850
test eax, eax
jne 0x1008f66a
push 0x37b
call fcn.1008ce00
push eax
push str._WideCharToMultiByte_pPath__pTmp__dwLength_
xor esi, esi
call fcn.100016d0
add esp, 0xc
jmp 0x1008f693
mov edi, dword [esp + 0x28]
push edi
mov ecx, esi
mov eax, str.nasipname
call fcn.1007db20
push edi
mov ecx, esi
mov eax, str.displayname
call fcn.1007db20
mov ecx, dword [esp + 0x1c]
mov eax, edi
call fcn.1007d440
mov esi, dword [esp + 0x10]
test esi, esi
je 0x1008f6a4
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov edi, dword [esp + 0x20]
test edi, edi
je 0x1008f741
mov eax, dword [edi + 0x20]
add eax, 8
push eax
mov ebx, 0x101536b4
call fcn.1007d100
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
je 0x1008f712
cmp byte [edi + 0x44], bl
je 0x1008f6f6
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 + 0x38]
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 0x1008f731
lea esp, [esp]
mov ecx, esi
mov eax, dword [ecx]
mov edx, dword [eax]
mov esi, dword [esi + 0x28]
push 1
call edx
cmp esi, ebx
jne 0x1008f720
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]
mov ecx, dword [esp + 0x860]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x848]
xor ecx, esp
call fcn.1012d370
mov esp, ebp
pop ebp
ret 8