Function at 0x1003f980
Capabilities:
Check if file exists
Get common file path
Get file attributes
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x1004923c
mov eax, dword fs:[0]
push eax
sub esp, 0x544
mov eax, dword [0x10056024]
xor eax, esp
mov dword [esp + 0x540], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10056024]
xor eax, esp
push eax
lea eax, [esp + 0x558]
mov dword fs:[0], eax
mov eax, dword [esp + 0x56c]
mov esi, dword [esp + 0x568]
xor ebx, ebx
push 0x103
mov edi, edx
lea edx, [esp + 0x39]
push ebx
push edx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], ebx
mov byte [esp + 0x40], bl
call sub.MSVCR80.dll_memset
push 0x103
lea eax, [esp + 0x255]
push ebx
push eax
mov byte [esp + 0x25c], bl
call sub.MSVCR80.dll_memset
push 0x206
lea ecx, [esp + 0x36a]
push ebx
push ecx
mov word [esp + 0x370], bx
call sub.MSVCR80.dll_memset
push 0x48
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
add esp, 0x28
mov dword [esp + 0x20], eax
cmp eax, ebx
mov dword [esp + 0x560], ebx
je 0x1003fa4b
push eax
call fcn.10039a50
mov dword [esp + 0x18], eax
jmp 0x1003fa4f
mov dword [esp + 0x18], ebx
lea edx, [esp + 0x34c]
mov dword [esp + 0x560], 0xffffffff
call fcn.1003f2c0
lea eax, [esp + 0x34c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x1003fa70
mov ebp, dword [edi + 8]
add edi, 4
sub eax, edx
sar eax, 1
cmp ebp, dword [edi + 8]
mov ebx, eax
jbe 0x1003fa92
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [edi + 8]
cmp dword [edi + 4], esi
jbe 0x1003faa0
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp edi, edi
je 0x1003faaa
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebp, esi
je 0x1003faea
cmp ebp, dword [edi + 8]
jb 0x1003fab9
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
push ebx
lea edx, [esp + 0x350]
push edx
push ebp
call dword [sym.imp.MSVCR80.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x1003fae3
cmp ebp, dword [edi + 8]
jb 0x1003fadb
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
add ebp, 0x30c
jmp 0x1003fa92
xor eax, eax
jmp 0x100400f5
lea eax, [esp + 0x34]
push eax
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
jl 0x1003fb71
lea eax, [esp + 0x34]
add eax, 0xffffffff
mov edi, edi
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x1003fb10
mov ecx, dword [str.AomeiBRNAS.XML]
mov edx, dword [0x1004f13c]
mov dword [eax], ecx
mov ecx, dword [0x1004f140]
mov dword [eax + 4], edx
mov edx, dword [0x1004f144]
mov dword [eax + 8], ecx
mov cl, byte [0x1004f148]
mov dword [eax + 0xc], edx
lea edx, [esp + 0x34]
push edx
mov byte [eax + 0x10], cl
lea eax, [esp + 0x248]
push 0x104
push eax
call dword [sym.imp.MSVCR80.dll_strcpy_s]
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
call esi
cmp eax, 0xffffffff
jne 0x1003fc47
push 0x104
lea edx, [esp + 0x38]
push 0
push edx
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x104
lea eax, [esp + 0x38]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x34]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1003fba0
sub eax, edx
test eax, eax
jle 0x1003fbc5
mov cl, 0x5c
cmp byte [esp + eax + 0x34], cl
je 0x1003fbc0
sub eax, 1
test eax, eax
jg 0x1003fbb1
jmp 0x1003fbc5
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 0x1003fbd0
mov ecx, dword [str.NAS.XML]
mov edx, dword [0x1004f150]
mov dword [eax], ecx
mov cl, byte [0x1004f154]
mov dword [eax + 4], edx
lea edx, [esp + 0x34]
push edx
mov byte [eax + 8], cl
call esi
cmp eax, 0xffffffff
jne 0x1003fc47
lea eax, [esp + 0x34]
push eax
call fcn.1003f770
test eax, eax
jne 0x1003fc47
push 0x23e
call fcn.1003dfc0
mov esi, eax
call sub.Comn.dll_GetObjectLog
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push esi
push 0x23e1005
push str.CreateDefaultNasXML_sCurPath_
push str._s_return_code:_0x_08X___s.
push eax
call edx
add esp, 0x18
mov dword [esp + 0x2c], 0x23e1005
jmp 0x10040039
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x34]
push eax
push esi
call fcn.10039b00
movzx eax, al
test eax, eax
jne 0x1003fc8b
push 0x242
call fcn.1003dfc0
mov esi, eax
call sub.Comn.dll_GetObjectLog
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push esi
push 0
push str.xmlAllTasks__LoadFile_sCurPath__TIXML_ENCODING_UTF8_
push str._s_return_code:_0x_08X___s.
push eax
call edx
add esp, 0x18
jmp 0x10040039
push 0x103
lea eax, [esp + 0x141]
push 0
push eax
mov byte [esp + 0x148], 0
call sub.MSVCR80.dll_memset
mov edi, dword [esi + 0x18]
add esp, 0xc
test edi, edi
je 0x1003fcc5
mov edx, dword [edi]
mov eax, dword [edx + 0x18]
mov ecx, edi
call eax
test eax, eax
jne 0x1003fd05
mov edi, dword [edi + 0x28]
test edi, edi
jne 0x1003fcb1
xor eax, eax
xor ecx, ecx
test eax, eax
setne cl
mov dword [esp + 0x20], eax
mov edi, ecx
test edi, edi
jne 0x1003fd10
push 0x24a
call fcn.1003dfc0
mov esi, eax
call sub.Comn.dll_GetObjectLog
mov edx, dword [eax]
push esi
push edi
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 0x10040039
mov edx, dword [edi]
mov eax, dword [edx + 0x18]
mov ecx, edi
call eax
jmp 0x1003fcc7
push 0x50
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov dword [esp + 0x560], 1
je 0x1003fd40
push eax
mov ecx, str.Item
call fcn.10039400
mov esi, eax
mov dword [esp + 0x1c], eax
jmp 0x1003fd46
xor esi, esi
mov dword [esp + 0x1c], esi
mov ebx, dword [esp + 0x24]
push 0
mov dword [esp + 0x564], 0xffffffff
push ebx
lea edi, [esp + 0x1c]
mov dword [esp + 0x1c], 0
call fcn.100401e0
mov eax, dword [esp + 0x14]
xor ecx, ecx
cmp ecx, eax
sbb edx, edx
neg edx
jne 0x1003fda5
push 0x250
call fcn.1003dfc0
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 0x10040039
lea edi, [eax + 1]
push edi
call sub.MSVCR80.dll_void____cdecl_operator_new___unsigned_int_
push edi
mov ebp, eax
push 0
push ebp
call sub.MSVCR80.dll_memset
add esp, 0x10
push ebp
push ebx
lea edi, [esp + 0x1c]
call fcn.100401e0
test eax, eax
jne 0x1003fdf9
push 0x253
call fcn.1003dfc0
mov esi, eax
call sub.Comn.dll_GetObjectLog
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push esi
push 0
push str._WideCharToMultiByte_pPassword__pTmp__dwLength_
push str._s_return_code:_0x_08X___s.
push eax
call edx
add esp, 0x18
jmp 0x1004002c
lea eax, [esp + 0x13c]
push eax
mov edi, ebp
call fcn.100402e0
lea eax, [esi + 0x2c]
push str.password
call fcn.1003a930
test eax, eax
je 0x1003fe43
lea ecx, [esp + 0x13c]
lea esi, [ecx + 1]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x1003fe23
sub ecx, esi
lea edi, [eax + 0x18]
mov esi, ecx
lea ebx, [esp + 0x13c]
call fcn.1003cb60
mov esi, dword [esp + 0x1c]
test ebp, ebp
je 0x1003fe52
push ebp
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
xor ebp, ebp
push 0x104
lea ecx, [esp + 0x140]
push 0
push ecx
call sub.MSVCR80.dll_memset
mov ebx, dword [esp + 0x34]
add esp, 0xc
push 0
push ebx
lea edi, [esp + 0x1c]
mov dword [esp + 0x1c], 0
call fcn.100401e0
mov eax, dword [esp + 0x14]
xor edx, edx
cmp edx, eax
sbb ecx, ecx
neg ecx
jne 0x1003febd
push 0x25d
call fcn.1003dfc0
mov esi, eax
call sub.Comn.dll_GetObjectLog
mov edx, dword [eax]
push esi
push 0
push str.dwLength_0
push str._s_return_code:_0x_08X___s.
push eax
mov eax, dword [edx + 0xc]
call eax
add esp, 0x18
jmp 0x1004002c
lea edi, [eax + 1]
push edi
call sub.MSVCR80.dll_void____cdecl_operator_new___unsigned_int_
push edi
mov ebp, eax
push 0
push ebp
call sub.MSVCR80.dll_memset
add esp, 0x10
push ebp
push ebx
lea edi, [esp + 0x1c]
call fcn.100401e0
test eax, eax
jne 0x1003ff11
push 0x260
call fcn.1003dfc0
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 0x1004002c
lea eax, [esp + 0x13c]
push eax
mov edi, ebp
call fcn.100402e0
push str.username
lea eax, [esi + 0x2c]
call fcn.1003a930
test eax, eax
je 0x1003ff60
lea ecx, [esp + 0x13c]
lea esi, [ecx + 1]
jmp 0x1003ff40
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x1003ff40
sub ecx, esi
lea edi, [eax + 0x18]
mov esi, ecx
lea ebx, [esp + 0x13c]
call fcn.1003cb60
mov esi, dword [esp + 0x1c]
test ebp, ebp
je 0x1003ff6f
push ebp
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
xor ebp, ebp
push 0x104
lea ecx, [esp + 0x140]
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.100401e0
mov eax, dword [esp + 0x14]
xor edx, edx
cmp edx, eax
sbb ecx, ecx
neg ecx
jne 0x1003ffb6
push 0x26a
jmp 0x1003fe94
lea edi, [eax + 1]
push edi
call sub.MSVCR80.dll_void____cdecl_operator_new___unsigned_int_
push edi
mov ebp, eax
push 0
push ebp
call sub.MSVCR80.dll_memset
add esp, 0x10
push ebp
push ebx
lea edi, [esp + 0x1c]
call fcn.100401e0
test eax, eax
jne 0x10040007
push 0x26d
call fcn.1003dfc0
mov esi, eax
call sub.Comn.dll_GetObjectLog
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push esi
push 0
push str._WideCharToMultiByte_pPath__pTmp__dwLength_
push str._s_return_code:_0x_08X___s.
push eax
call edx
add esp, 0x18
jmp 0x1004002c
push esi
mov ecx, ebp
mov eax, str.nasipname
call fcn.100396f0
push esi
mov ecx, ebp
mov eax, str.displayname
call fcn.100396f0
mov ecx, dword [esp + 0x20]
mov eax, esi
call fcn.10039160
test ebp, ebp
je 0x10040039
push ebp
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
je 0x100400f1
mov edi, dword [eax + 0x20]
mov ebx, dword [sym.imp.MSVCR80.dll__fsopen]
add edi, 8
xor ebp, ebp
push 0x10
push 0x1004e9e0
push edi
call ebx
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1004007f
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
add ebp, 1
cmp ebp, 0x3e8
jl 0x10040053
mov edi, dword [esp + 0x18]
jmp 0x100400c7
mov edi, dword [esp + 0x18]
cmp byte [edi + 0x44], 0
je 0x100400aa
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
add esp, 0x18
mov eax, dword [edi]
mov edx, dword [eax + 4]
push 0
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]
xor ebx, ebx
cmp esi, ebx
je 0x100400e1
mov ecx, esi
mov eax, dword [ecx]
mov edx, dword [eax]
mov esi, dword [esi + 0x28]
push 1
call edx
cmp esi, ebx
jne 0x100400d0
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 + 0x2c]
mov ecx, dword [esp + 0x558]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x540]
xor ecx, esp
call fcn.10045f6c
add esp, 0x550
ret 8