Function at 0x40eaf0
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 0x4677fc
mov eax, dword fs:[0]
push eax
sub esp, 0x870
mov eax, dword [0x48602c]
xor eax, esp
mov dword [esp + 0x868], eax
push ebx
push esi
push edi
mov eax, dword [0x48602c]
xor eax, esp
push eax
lea eax, [esp + 0x880]
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 + 0x59]
push edi
push edx
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x2c], edi
mov byte [esp + 0x60], 0
call sub.MSVCR80.dll_memset
push 0x207
lea eax, [esp + 0x67d]
push edi
push eax
mov byte [esp + 0x684], 0
call sub.MSVCR80.dll_memset
push 0x206
lea ecx, [esp + 0x482]
push edi
push ecx
mov word [esp + 0x488], di
call sub.MSVCR80.dll_memset
push 0x48
call fcn.0043ae6c
add esp, 0x28
mov dword [esp + 0x3c], eax
cmp eax, edi
mov dword [esp + 0x888], edi
je 0x40ebba
push eax
call fcn.00437760
mov dword [esp + 0x1c], eax
jmp 0x40ebbe
mov dword [esp + 0x1c], edi
push 0x208
lea edx, [esp + 0x468]
mov dword [esp + 0x88c], 0xffffffff
call fcn.0040e000
lea eax, [esp + 0x464]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x40ebe4
sub eax, edx
sar eax, 1
lea esi, [ebx + 4]
mov ebx, dword [esi + 4]
lea ecx, [esp + 0x24]
mov dword [esp + 0x2c], eax
call fcn.00401370
cmp dword [esi + 4], ebx
mov edi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
ja 0x40ec16
cmp ebx, dword [esi + 8]
jbe 0x40ec18
call edi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], ebx
mov ebx, dword [esi + 8]
lea ecx, [esp + 0x3c]
call fcn.00401370
cmp dword [esi + 4], ebx
ja 0x40ec36
cmp ebx, dword [esi + 8]
jbe 0x40ec38
call edi
mov eax, dword [esp + 0x24]
test eax, eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], ebx
je 0x40ec4c
cmp eax, esi
je 0x40ec52
call edi
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
cmp edx, dword [esp + 0x40]
je 0x40ecbc
test eax, eax
jne 0x40ec66
call edi
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
cmp ecx, dword [eax + 8]
jb 0x40ec71
call edi
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push edx
lea eax, [esp + 0x468]
push eax
push ecx
call dword [sym.imp.MSVCR80.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x40ecb5
cmp dword [esp + 0x24], 0
jne 0x40ec99
call edi
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
cmp eax, dword [edx + 8]
jb 0x40eca8
call edi
add dword [esp + 0x28], 0x61c
jmp 0x40ec20
xor eax, eax
jmp 0x40f598
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea ecx, [esp + 0x54]
push ecx
push 0
push 0
push 0x23
push 0
call esi
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
jl 0x40ed43
lea eax, [esp + 0x54]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x40ece2
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 + 0x54]
push eax
lea ecx, [esp + 0x670]
push 0x208
push ecx
call dword [sym.imp.MSVCR80.dll_strcpy_s]
add esp, 0xc
lea edx, [esp + 0x54]
push edx
call edi
cmp eax, 0xffffffff
jne 0x40ee30
push 0x208
lea eax, [esp + 0x58]
push 0
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x208
lea ecx, [esp + 0x58]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x54]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ed70
sub eax, edx
test eax, eax
jle 0x40ed95
nop
cmp byte [esp + eax + 0x54], 0x5c
je 0x40ed90
sub eax, 1
test eax, eax
jg 0x40ed80
jmp 0x40ed95
mov byte [esp + eax + 0x54], 0
lea eax, [esp + 0x54]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x40eda0
mov edx, dword [str.NAS.XML]
mov ecx, dword [0x47bb18]
mov dword [eax], edx
mov dl, byte [0x47bb1c]
mov dword [eax + 4], ecx
mov byte [eax + 8], dl
lea eax, [esp + 0x54]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40ee30
call sub.Comn.dll_GetObjectSys
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x1c]
call eax
test eax, eax
lea ecx, [esp + 0x54]
je 0x40eef1
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x40eeae
call sub.Comn.dll_GetObjectLog
mov ebx, eax
mov esi, dword [ebx]
push 0x316
add esi, 0xc
call fcn.0040cbd0
mov edx, dword [esi]
push eax
push str._s:create_nas_file_fail
push ebx
call edx
add esp, 0x10
mov esi, dword [esp + 0x1c]
push 1
lea eax, [esp + 0x58]
push eax
push esi
call fcn.00437820
movzx eax, al
test eax, eax
jne 0x40f12f
push 0x80
push eax
push 0x14a3480
call sub.MSVCR80.dll_memset
push 0x5c
push str..NetworkMgr.cpp
call fcn.00401000
xor eax, eax
push 0x34c
lea ecx, [esp + 0x54]
push str.__d_
push ecx
mov byte [esp + 0x5c], 0
mov dword [esp + 0x5d], eax
mov dword [esp + 0x61], eax
mov word [esp + 0x65], ax
mov byte [esp + 0x67], al
call dword [sym.imp.MSVCR80.dll_sprintf]
push 0x14a3480
push str.xmlAllTasks__LoadFile_sCurPath__TIXML_ENCODING_UTF8_
push 0
call fcn.00401020
add esp, 0x2c
jmp 0x40f4f4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x54]
push eax
call fcn.0040e8f0
test eax, eax
jne 0x40ee30
push 0x31b
mov dword [esp + 0x24], 0x31b1005
call fcn.0040cbd0
push eax
push str.CreateDefaultNasXML_sCurPath_
push 0x31b1005
call fcn.00401020
add esp, 0x10
jmp 0x40f4f4
push 0x208
push 0
push ecx
call sub.MSVCR80.dll_memset
add esp, 0xc
lea edx, [esp + 0x54]
push edx
push 0
push 0
push 0x23
push 0
call esi
test eax, eax
jge 0x40ef5f
call sub.Comn.dll_GetObjectLog
mov ebx, eax
mov esi, dword [ebx]
push 0x324
add esi, 0xc
call fcn.0040cbd0
push eax
mov eax, dword [esi]
push str._s:_get_data_folder_path_fail
push ebx
call eax
push 0x325
mov dword [esp + 0x34], 0x3251005
call fcn.0040cbd0
push eax
push str.FALSE
push 0x3251005
call fcn.00401020
add esp, 0x20
jmp 0x40f4f4
lea eax, [esp + 0x54]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x40ef66
mov ecx, dword [str.AomeiBR]
mov edx, dword [0x47bce4]
mov dword [eax], ecx
mov cl, byte [0x47bce8]
mov dword [eax + 4], edx
lea edx, [esp + 0x54]
push edx
mov byte [eax + 8], cl
call edi
cmp eax, 0xffffffff
je 0x40efe9
test al, 0x10
jne 0x40f076
call sub.Comn.dll_GetObjectLog
mov ebx, eax
mov esi, dword [ebx]
push 0x32c
add esi, 0xc
call fcn.0040cbd0
push eax
mov eax, dword [esi]
push str._s:_aomei_data_folder_cannt_create
push ebx
call eax
push 0x32d
mov dword [esp + 0x34], 0x32d1005
call fcn.0040cbd0
push eax
push str.FALSE
push 0x32d1005
call fcn.00401020
add esp, 0x20
jmp 0x40f4f4
push 0
lea ecx, [esp + 0x58]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40f045
call sub.Comn.dll_GetObjectLog
mov ebx, eax
mov esi, dword [ebx]
push 0x334
add esi, 0xc
call fcn.0040cbd0
mov edx, dword [esi]
push eax
push str._s:_create_aomei_data_dir_fail
push ebx
call edx
push 0x335
mov dword [esp + 0x34], 0x3351005
call fcn.0040cbd0
push eax
push str.FALSE
push 0x3351005
call fcn.00401020
add esp, 0x20
jmp 0x40f4f4
lea eax, [esp + 0x54]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x40f050
mov ecx, dword [str.NAS.XML]
mov edx, dword [0x47bb18]
mov dword [eax], ecx
mov cl, byte [0x47bb1c]
mov dword [eax + 4], edx
mov byte [eax + 8], cl
jmp 0x40f0a4
lea eax, [esp + 0x54]
add eax, 0xffffffff
lea ecx, [ecx]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x40f080
mov edx, dword [str.NAS.XML]
mov ecx, dword [0x47bb18]
mov dword [eax], edx
mov dl, byte [0x47bb1c]
mov dword [eax + 4], ecx
mov byte [eax + 8], dl
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x40f0ec
call sub.Comn.dll_GetObjectLog
mov ebx, eax
mov esi, dword [ebx]
push 0x341
add esi, 0xc
call fcn.0040cbd0
mov ecx, dword [esi]
push eax
push str._s:create_nas_file_fail
push ebx
call ecx
jmp 0x40ee2d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x54]
push edx
call fcn.0040e8f0
test eax, eax
jne 0x40ee30
push 0x346
mov dword [esp + 0x24], 0x3461005
call fcn.0040cbd0
push eax
push str.CreateDefaultNasXML_sCurPath_
push 0x3461005
call fcn.00401020
add esp, 0x10
jmp 0x40f4f4
push 0x207
lea edx, [esp + 0x261]
push 0
push edx
mov byte [esp + 0x268], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
mov ecx, esi
call fcn.004077c0
xor ecx, ecx
test eax, eax
setne cl
mov dword [esp + 0x3c], eax
mov eax, ecx
test eax, eax
jne 0x40f1c8
push 0x80
push ecx
push 0x14a3480
call sub.MSVCR80.dll_memset
push 0x5c
push str..NetworkMgr.cpp
call fcn.00401000
xor eax, eax
push 0x354
lea edx, [esp + 0x60]
push str.__d_
push edx
mov byte [esp + 0x68], 0
mov dword [esp + 0x69], eax
mov dword [esp + 0x6d], eax
mov word [esp + 0x71], ax
mov byte [esp + 0x73], al
call dword [sym.imp.MSVCR80.dll_sprintf]
push 0x14a3480
push str.__pRoot__NULL_
push 0
call fcn.00401020
add esp, 0x2c
jmp 0x40f4f4
push 0x50
call fcn.0043ae6c
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
mov dword [esp + 0x888], 1
je 0x40f1f6
push str.Item
push eax
call fcn.00437190
mov dword [esp + 0x2c], eax
jmp 0x40f1fe
mov dword [esp + 0x2c], 0
mov edi, dword [esp + 0x30]
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x88c], 0xffffffff
push 0
mov dword [esp + 0x20], 0
call fcn.0040f680
mov eax, dword [esp + 0x18]
xor ecx, ecx
cmp ecx, eax
sbb edx, edx
neg edx
jne 0x40f24e
push 0x359
call fcn.0040cbd0
push eax
push str.dwLength___0
push 0
call fcn.00401020
add esp, 0x10
jmp 0x40f4f4
lea ebx, [eax + 1]
push ebx
call fcn.0043acf2
push ebx
mov esi, eax
push 0
push esi
mov dword [esp + 0x24], esi
call sub.MSVCR80.dll_memset
add esp, 0x10
lea eax, [esp + 0x18]
push eax
push esi
call fcn.0040f680
test eax, eax
jne 0x40f297
push 0x35d
call fcn.0040cbd0
push eax
push str._WideCharToMultiByte_pPassword__pTmp__dwLength_
push 0
call fcn.00401020
add esp, 0x10
jmp 0x40f4e7
lea ecx, [esp + 0x25c]
push ecx
mov edi, esi
call fcn.0040f770
mov ecx, dword [esp + 0x2c]
add ecx, 0x2c
mov eax, str.password
mov dword [esp + 0x30], ecx
call fcn.00438520
test eax, eax
je 0x40f2f0
lea ecx, [esp + 0x25c]
lea esi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x40f2d0
sub ecx, esi
lea esi, [eax + 0x18]
mov edi, ecx
lea ebx, [esp + 0x25c]
call fcn.00438b10
mov esi, dword [esp + 0x14]
test esi, esi
je 0x40f309
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov dword [esp + 0x18], 0
mov esi, dword [esp + 0x18]
add esp, 4
push 0x208
lea edx, [esp + 0x260]
push 0
push edx
call sub.MSVCR80.dll_memset
mov ebx, dword [esp + 0x44]
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push 0
mov edi, ebx
mov dword [esp + 0x20], 0
call fcn.0040f680
mov edi, dword [esp + 0x18]
xor ecx, ecx
cmp ecx, edi
sbb edx, edx
neg edx
jne 0x40f367
push 0x368
call fcn.0040cbd0
push eax
push str.dwLength___0
push 0
call fcn.00401020
add esp, 0x10
jmp 0x40f4e7
add edi, 1
push edi
call fcn.0043acf2
push edi
mov esi, eax
push 0
push esi
mov dword [esp + 0x24], esi
call sub.MSVCR80.dll_memset
add esp, 0x10
lea eax, [esp + 0x18]
push eax
push esi
mov edi, ebx
call fcn.0040f680
test eax, eax
jne 0x40f3b2
push 0x36c
call fcn.0040cbd0
push eax
push str._WideCharToMultiByte_pUsername__pTmp__dwLength_
push 0
call fcn.00401020
add esp, 0x10
jmp 0x40f4e3
lea ecx, [esp + 0x25c]
push ecx
mov edi, esi
call fcn.0040f770
mov ecx, dword [esp + 0x30]
mov eax, str.username
call fcn.00438520
test eax, eax
je 0x40f400
lea ecx, [esp + 0x25c]
lea esi, [ecx + 1]
lea ecx, [ecx]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x40f3e0
sub ecx, esi
lea esi, [eax + 0x18]
mov edi, ecx
lea ebx, [esp + 0x25c]
call fcn.00438b10
mov esi, dword [esp + 0x14]
test esi, esi
je 0x40f415
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esp + 0x14], 0
push 0x208
lea edx, [esp + 0x260]
push 0
push edx
call sub.MSVCR80.dll_memset
mov ebx, dword [esp + 0x40]
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push 0
mov edi, ebx
mov dword [esp + 0x20], 0
call fcn.0040f680
mov edi, dword [esp + 0x18]
xor ecx, ecx
cmp ecx, edi
sbb edx, edx
neg edx
jne 0x40f470
push 0x377
call fcn.0040cbd0
push eax
push str.dwLength___0
push 0
call fcn.00401020
add esp, 0x10
jmp 0x40f4e3
add edi, 1
push edi
call fcn.0043acf2
push edi
mov esi, eax
push 0
push esi
mov dword [esp + 0x24], esi
call sub.MSVCR80.dll_memset
add esp, 0x10
lea eax, [esp + 0x18]
push eax
push esi
mov edi, ebx
call fcn.0040f680
test eax, eax
jne 0x40f4b8
push 0x37b
call fcn.0040cbd0
push eax
push str._WideCharToMultiByte_pPath__pTmp__dwLength_
push 0
call fcn.00401020
add esp, 0x10
jmp 0x40f4e3
mov edi, dword [esp + 0x2c]
mov edx, esi
mov eax, str.nasipname
mov ecx, edi
call fcn.00437430
mov edx, esi
mov eax, str.displayname
mov ecx, edi
call fcn.00437430
mov ecx, dword [esp + 0x3c]
mov eax, edi
call fcn.00436f50
mov esi, dword [esp + 0x14]
test esi, esi
je 0x40f4f4
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
cmp dword [esp + 0x1c], 0
je 0x40f594
mov ecx, dword [esp + 0x1c]
add ecx, 0x20
call fcn.00408d70
push eax
mov ebx, 0x47bc84
call fcn.00436b50
mov ebx, dword [esp + 0x20]
mov esi, eax
xor edi, edi
add esp, 4
cmp esi, edi
je 0x40f56c
cmp byte [ebx + 0x44], 0
je 0x40f550
mov ebx, dword [sym.imp.MSVCR80.dll_fputc]
push esi
push 0xef
call ebx
push esi
push 0xbb
call ebx
push esi
push 0xbf
call ebx
mov ebx, dword [esp + 0x34]
add esp, 0x18
mov edx, dword [ebx]
mov eax, dword [edx + 4]
push edi
push esi
mov ecx, ebx
call eax
push esi
call dword [sym.imp.MSVCR80.dll_ferror]
push esi
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 8
mov esi, dword [ebx + 0x18]
cmp esi, edi
je 0x40f584
mov ecx, esi
mov edx, dword [ecx]
mov eax, dword [edx]
mov esi, dword [esi + 0x28]
push 1
call eax
cmp esi, edi
jne 0x40f573
mov dword [ebx + 0x18], edi
mov dword [ebx + 0x1c], edi
mov edx, dword [ebx]
mov eax, dword [edx]
push 1
mov ecx, ebx
call eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x880]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x868]
xor ecx, esp
call fcn.0043ad38
mov esp, ebp
pop ebp
ret 8