Function at 0x1008f070
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 0x1014977c
mov eax, dword fs:[0]
push eax
sub esp, 0x850
mov eax, dword [0x10177024]
xor eax, esp
mov dword [esp + 0x848], eax
push ebx
push esi
push edi
mov eax, dword [0x10177024]
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 0x1008f13a
push eax
call fcn.1007e1c0
mov dword [esp + 0x20], eax
jmp 0x1008f13e
mov dword [esp + 0x20], edi
push 0x208
lea edx, [esp + 0x448]
mov dword [esp + 0x86c], 0xffffffff
call fcn.1008e570
lea eax, [esp + 0x444]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x1008f164
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 0x1008f188
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edi, dword [esi + 8]
cmp dword [esi + 4], edi
jbe 0x1008f196
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, esi
je 0x1008f1a0
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebx, edi
je 0x1008f1e4
cmp ebx, dword [esi + 8]
jb 0x1008f1af
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 0x1008f1dd
cmp ebx, dword [esi + 8]
jb 0x1008f1d5
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
add ebx, 0x61c
jmp 0x1008f188
xor eax, eax
jmp 0x1008faa5
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 0x1008f271
lea eax, [esp + 0x34]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x1008f210
mov edx, dword [str.AomeiBRNAS.XML]
mov ecx, dword [0x1015aa14]
mov dword [eax], edx
mov edx, dword [0x1015aa18]
mov dword [eax + 4], ecx
mov ecx, dword [0x1015aa1c]
mov dword [eax + 8], edx
mov dl, byte [0x1015aa20]
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 0x1008f35a
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 0x1008f2a0
sub eax, edx
cmp eax, ebx
jle 0x1008f2c5
mov cl, 0x5c
cmp byte [esp + eax + 0x34], cl
je 0x1008f2c0
sub eax, 1
cmp eax, ebx
jg 0x1008f2b1
jmp 0x1008f2c5
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 0x1008f2d0
mov edx, dword [str.NAS.XML]
mov ecx, dword [0x1015aa28]
mov dword [eax], edx
mov dl, byte [0x1015aa2c]
mov dword [eax + 4], ecx
mov byte [eax + 8], dl
lea eax, [esp + 0x34]
push eax
call edi
cmp eax, 0xffffffff
jne 0x1008f35a
call sub.Comn.dll_GetObjectSys
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x1c]
call eax
test eax, eax
je 0x1008f3dc
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 0x1008f38e
call sub.Comn.dll_GetObjectLog
mov edi, eax
mov esi, dword [edi]
push 0x316
add esi, 0xc
call fcn.1008d160
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.1007e2b0
movzx eax, al
cmp eax, ebx
jne 0x1008f627
push 0x34c
call fcn.1008d160
mov esi, eax
call sub.Comn.dll_GetObjectLog
push esi
push ebx
push str.xmlAllTasks__LoadFile_sCurPath__TIXML_ENCODING_UTF8_
jmp 0x1008f3c7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x34]
push eax
call fcn.1008ee50
cmp eax, ebx
jne 0x1008f35a
push 0x31b
mov dword [esp + 0x1c], 0x31b1005
call fcn.1008d160
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 0x1008fa04
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 0x1008f459
call sub.Comn.dll_GetObjectLog
mov ebx, eax
mov esi, dword [ebx]
push 0x324
add esi, 0xc
call fcn.1008d160
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.1008d160
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 0x1008fa04
lea eax, [esp + 0x34]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x1008f460
mov ecx, dword [0x10153e3c]
mov edx, dword [0x10153e40]
mov dword [eax], ecx
mov cl, byte [0x10153e44]
mov dword [eax + 4], edx
lea edx, [esp + 0x34]
push edx
mov byte [eax + 8], cl
call edi
cmp eax, 0xffffffff
je 0x1008f4dd
test al, 0x10
jne 0x1008f576
call sub.Comn.dll_GetObjectLog
mov ebx, eax
mov esi, dword [ebx]
push 0x32c
add esi, 0xc
call fcn.1008d160
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.1008d160
mov esi, eax
call sub.Comn.dll_GetObjectLog
push esi
push 0x32d1005
jmp 0x1008f43f
push ebx
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x1008f547
call sub.Comn.dll_GetObjectLog
mov ebx, eax
mov esi, dword [ebx]
push 0x334
add esi, 0xc
call fcn.1008d160
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.1008d160
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 0x1008fa04
lea eax, [esp + 0x34]
add eax, 0xffffffff
mov edi, edi
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x1008f550
mov ecx, dword [str.NAS.XML]
mov edx, dword [0x1015aa28]
mov dword [eax], ecx
mov cl, byte [0x1015aa2c]
mov dword [eax + 4], edx
mov byte [eax + 8], cl
jmp 0x1008f5a4
lea eax, [esp + 0x34]
add eax, 0xffffffff
lea ecx, [ecx]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x1008f580
mov edx, dword [str.NAS.XML]
mov ecx, dword [0x1015aa28]
mov dword [eax], edx
mov dl, byte [0x1015aa2c]
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 0x1008f5ea
call sub.Comn.dll_GetObjectLog
mov edi, eax
mov esi, dword [edi]
push 0x341
add esi, 0xc
call fcn.1008d160
mov ecx, dword [esi]
push eax
push str._s:create_nas_file_fail
push edi
call ecx
jmp 0x1008f357
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x34]
push edx
call fcn.1008ee50
cmp eax, ebx
jne 0x1008f35a
push 0x346
mov dword [esp + 0x1c], 0x3461005
call fcn.1008d160
mov esi, eax
call sub.Comn.dll_GetObjectLog
push esi
push 0x3461005
jmp 0x1008f3c2
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 0x1008f664
lea esp, [esp]
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
mov ecx, esi
call eax
test eax, eax
jne 0x1008f6a4
mov esi, dword [esi + 0x28]
cmp esi, ebx
jne 0x1008f650
mov dword [esp + 0x1c], ebx
xor ecx, ecx
cmp dword [esp + 0x1c], ebx
setne cl
mov esi, ecx
cmp esi, ebx
jne 0x1008f6b3
push 0x354
call fcn.1008d160
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 0x1008fa04
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
mov ecx, esi
call eax
mov dword [esp + 0x1c], eax
jmp 0x1008f668
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 0x1008f6e1
push eax
mov ecx, str.Item
call fcn.1007db10
mov dword [esp + 0x28], eax
jmp 0x1008f6e5
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.1008fbb0
mov edi, dword [esp + 0x14]
xor ecx, ecx
cmp ecx, edi
sbb edx, edx
neg edx
jne 0x1008f734
push 0x359
call fcn.1008d160
mov esi, eax
call sub.Comn.dll_GetObjectLog
push esi
push 0
push str.dwLength___0
jmp 0x1008f3c7
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.1008fbb0
test eax, eax
jne 0x1008f78c
push 0x35d
call fcn.1008d160
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 0x1008f9f7
lea eax, [esp + 0x23c]
push eax
mov edi, esi
call fcn.1008fcd0
mov eax, dword [esp + 0x28]
add eax, 0x2c
push 0x1015aac8
mov dword [esp + 0x28], eax
call fcn.1007f0d0
test eax, eax
je 0x1008f7e0
lea ecx, [esp + 0x23c]
lea esi, [ecx + 1]
mov edi, edi
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x1008f7c0
sub ecx, esi
lea edi, [eax + 0x18]
mov esi, ecx
lea ebx, [esp + 0x23c]
call fcn.100812d0
mov esi, dword [esp + 0x10]
test esi, esi
je 0x1008f7f9
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.1008fbb0
mov edi, dword [esp + 0x14]
xor edx, edx
cmp edx, edi
sbb eax, eax
neg eax
jne 0x1008f864
push 0x368
call fcn.1008d160
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 0x1008f9f7
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.1008fbb0
test eax, eax
jne 0x1008f8bc
push 0x36c
call fcn.1008d160
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 0x1008f9f3
lea eax, [esp + 0x23c]
push eax
mov edi, esi
call fcn.1008fcd0
mov eax, dword [esp + 0x24]
push str.username
call fcn.1007f0d0
test eax, eax
je 0x1008f907
lea ecx, [esp + 0x23c]
lea esi, [ecx + 1]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x1008f8e7
sub ecx, esi
lea edi, [eax + 0x18]
mov esi, ecx
lea ebx, [esp + 0x23c]
call fcn.100812d0
mov esi, dword [esp + 0x10]
test esi, esi
je 0x1008f91c
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.1008fbb0
mov edi, dword [esp + 0x14]
xor edx, edx
cmp edx, edi
sbb eax, eax
neg eax
jne 0x1008f984
push 0x377
call fcn.1008d160
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 0x1008f9f3
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.1008fbb0
test eax, eax
jne 0x1008f9ca
push 0x37b
call fcn.1008d160
push eax
push str._WideCharToMultiByte_pPath__pTmp__dwLength_
xor esi, esi
call fcn.100016d0
add esp, 0xc
jmp 0x1008f9f3
mov edi, dword [esp + 0x28]
push edi
mov ecx, esi
mov eax, str.nasipname
call fcn.1007de40
push edi
mov ecx, esi
mov eax, str.displayname
call fcn.1007de40
mov ecx, dword [esp + 0x1c]
mov eax, edi
call fcn.1007d760
mov esi, dword [esp + 0x10]
test esi, esi
je 0x1008fa04
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov edi, dword [esp + 0x20]
test edi, edi
je 0x1008faa1
mov eax, dword [edi + 0x20]
add eax, 8
push eax
mov ebx, 0x101599e4
call fcn.1007d420
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
je 0x1008fa72
cmp byte [edi + 0x44], bl
je 0x1008fa56
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 0x1008fa91
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 0x1008fa80
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.10130e50
mov esp, ebp
pop ebp
ret 8