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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x554
mov eax, dword [0x48602c]
xor eax, esp
mov dword [esp + 0x550], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
xor ebx, ebx
mov edi, ecx
push 0x103
lea ecx, [esp + 0x45]
push ebx
push ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x40], esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x4c], bl
call sub.MSVCR80.dll_memset
push 0x206
lea edx, [esp + 0x362]
push ebx
push edx
mov word [esp + 0x368], bx
call sub.MSVCR80.dll_memset
push 0x206
lea eax, [esp + 0x166]
push ebx
push eax
mov word [esp + 0x16c], bx
call sub.MSVCR80.dll_memset
add esp, 0x24
lea ecx, [esp + 0x14]
call fcn.00401370
lea ecx, [edi + 0x38]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x30], ecx
call fcn.00402520
mov eax, dword [ebp + 8]
cmp eax, ebx
jne 0x40ffa6
push 0x4b9
mov dword [esp + 0x14], 0x4b91002
call fcn.0040cbd0
push eax
push str.pRemotePath___NULL
push 0x4b91002
jmp 0x41031d
cmp esi, ebx
jne 0x40ffcc
push 0x4ba
mov dword [esp + 0x14], 0x4ba1002
call fcn.0040cbd0
push eax
push str.pUsername___NULL
push 0x4ba1002
jmp 0x41031d
cmp dword [esp + 0x24], ebx
jne 0x40fff4
push 0x4bb
mov dword [esp + 0x14], 0x4bb1002
call fcn.0040cbd0
push eax
push str.pPassword___NULL
push 0x4bb1002
jmp 0x41031d
push 0x104
mov esi, eax
lea edx, [esp + 0x14c]
call fcn.0040e000
test al, al
jne 0x41002d
push 0x4bd
mov dword [esp + 0x14], 0x4bd1002
call fcn.0040cbd0
push eax
push str.GetRootPath_wszRoot__pRemotePath__sizeof_wszRoot__sizeof_wszRoot_0___
push 0x4bd1002
jmp 0x41031d
lea eax, [esp + 0x148]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x410037
sub eax, edx
sar eax, 1
lea ebx, [edi + 4]
mov ecx, ebx
mov dword [esp + 0x28], eax
call fcn.004103b0
test eax, eax
jne 0x410182
mov ecx, edi
call fcn.0040d830
movzx ecx, ax
test ecx, ecx
mov dword [esp + 0x10], eax
je 0x410182
lea edx, [esp + 0x40]
push edx
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jge 0x4100ab
push 0x4c6
mov dword [esp + 0x14], 0x4c61004
call fcn.0040cbd0
push eax
push str.SUCCEEDED_SHGetFolderPathA_NULL__CSIDL_COMMON_APPDATA__NULL__SHGFP_TYPE_CURRENT__szNasProfile__
push 0x4c61004
jmp 0x41031d
lea eax, [esp + 0x40]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4100b2
mov ecx, dword [str.AomeiBR]
mov edx, dword [0x47bce4]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [eax], ecx
mov cl, byte [0x47bce8]
mov dword [eax + 4], edx
lea edx, [esp + 0x40]
push edx
mov byte [eax + 8], cl
call esi
cmp eax, 0xffffffff
jne 0x41011b
push 0
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x41011b
push 0x4ca
mov dword [esp + 0x14], 0x4ca1005
call fcn.0040cbd0
push eax
push str.CreateDirectoryA_szNasProfile__NULL_
push 0x4ca1005
jmp 0x41031d
lea eax, [esp + 0x40]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x410122
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 + 0x40]
push edx
mov byte [eax + 8], cl
call esi
cmp eax, 0xffffffff
jne 0x410182
lea eax, [esp + 0x40]
push eax
call fcn.0040e8f0
test eax, eax
jne 0x410182
push 0x4d0
mov dword [esp + 0x14], 0x4d01005
call fcn.0040cbd0
push eax
push str.CreateDefaultNasXML_szNasProfile_
push 0x4d01005
jmp 0x41031d
lea esi, [esp + 0x1c]
mov edi, ebx
call fcn.00410380
mov ecx, dword [eax]
mov dword [esp + 0x14], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x18], edx
lea ebx, [ebx]
mov esi, dword [ebx + 8]
lea ecx, [esp + 0x1c]
call fcn.00401370
cmp dword [ebx + 4], esi
ja 0x4101b6
cmp esi, dword [ebx + 8]
jbe 0x4101c0
mov edi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
call edi
jmp 0x4101c6
mov edi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x14]
test ecx, ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], esi
je 0x4101da
cmp ecx, ebx
je 0x4101e0
call edi
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x20]
je 0x410290
test ecx, ecx
jne 0x4101fc
call edi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
cmp eax, dword [ecx + 8]
jb 0x410207
call edi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
mov edi, dword [sym.imp.MSVCR80.dll__wcsnicmp]
push ecx
lea edx, [esp + 0x14c]
push edx
push eax
mov esi, eax
call edi
add esp, 0xc
test eax, eax
je 0x41028a
push 0x208
lea eax, [esp + 0x354]
push 0
push eax
call sub.MSVCR80.dll_memset
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
add esp, 0xc
push esi
push 0x104
lea eax, [esp + 0x358]
push eax
call edx
test al, al
je 0x410278
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x14c]
push ecx
lea edx, [esp + 0x358]
push edx
call edi
add esp, 0xc
test eax, eax
je 0x41028a
lea edi, [esp + 0x38]
lea esi, [esp + 0x14]
call fcn.00410510
jmp 0x4101a0
mov edi, dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [ebx + 8]
lea ecx, [esp + 0x1c]
call fcn.00401370
cmp dword [ebx + 4], esi
ja 0x4102a6
cmp esi, dword [ebx + 8]
jbe 0x4102a8
call edi
mov eax, dword [esp + 0x14]
test eax, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], esi
je 0x4102bc
cmp eax, ebx
je 0x4102be
call edi
mov ecx, dword [esp + 0x20]
xor eax, eax
cmp dword [esp + 0x18], ecx
sete al
test eax, eax
jne 0x4102e3
push 0x4e5
call fcn.0040cbd0
push eax
push str.itm_vecAlReadyRemoteInfo.end__
push 0
jmp 0x41031d
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x14c]
push eax
call fcn.0040eaf0
movzx ecx, ax
test ecx, ecx
mov dword [esp + 0x10], eax
je 0x410325
push 0x4e6
call fcn.0040cbd0
mov edx, dword [esp + 0x14]
push eax
push str.AddToProfile_wszRoot__pUsername__pPassword_
push edx
call fcn.00401020
add esp, 0x10
mov ecx, dword [esp + 0x30]
call fcn.00402540
mov ecx, dword [esp + 0x55c]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0043ad38
mov esp, ebp
pop ebp
ret 0xc