Function at 0x406540
Capabilities:
Create directory
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x42711b
mov eax, dword fs:[0]
push eax
sub esp, 0x318
mov eax, dword [0x43c648]
xor eax, esp
mov dword [esp + 0x314], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43c648]
xor eax, esp
push eax
lea eax, [esp + 0x32c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x33c]
mov edi, ecx
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov eax, dword [edi + 0x78]
cmp eax, ecx
mov dword [esp + 0x334], ecx
jne 0x40659f
mov esi, 0x80004003
jmp 0x4065ac
mov edx, dword [eax]
push ecx
push 4
push eax
mov eax, dword [edx + 0x20]
call eax
mov esi, eax
push 0x400
lea ecx, [esp + 0x18]
push ecx
push ecx
mov dword [esp + 0x24], esp
mov ebx, esp
push str.TV_RecordingFolder
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
test eax, eax
mov dword [ebx], eax
jne 0x4065d8
push 0x8007000e
call fcn.00401210
mov edi, dword [edi + 0x78]
push edi
call fcn.00406480
add esp, 0x10
test eax, eax
jl 0x40661c
mov edi, dword [esp + 0x14]
test edi, edi
je 0x40661c
cmp word [edi], 0
je 0x40661c
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x40661c
test esi, esi
jl 0x406784
push edi
push 0x104
push ebp
call fcn.00402ac0
mov esi, eax
jmp 0x406784
lea edx, [esp + 0x120]
push edx
push 0
push 0
push 0x8005
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov esi, eax
test esi, esi
jl 0x406780
push str.Nero_Home
lea eax, [esp + 0x124]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
jne 0x406660
mov esi, 0x80004005
jmp 0x406780
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0
lea ecx, [esp + 0x124]
push ecx
call edi
test eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x40669d
call ebx
cmp eax, 0xb7
je 0x40669d
test eax, eax
jle 0x406693
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x406780
push 0x42ac20
lea edx, [esp + 0x124]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x406656
push 0
lea eax, [esp + 0x124]
push eax
call edi
test eax, eax
jne 0x4066e5
call ebx
cmp eax, 0xb7
je 0x4066e5
test eax, eax
jle 0x4066db
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
test esi, esi
jl 0x406780
lea edx, [esp + 0x120]
lea ecx, [esp + 0x20]
push edx
mov dword [esp + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
push 0x80
lea eax, [esp + 0x24]
push eax
add esi, 1
lea ecx, [esp + 0x24]
push esi
push ecx
call fcn.00405560
lea eax, [esi + esi]
push eax
lea edx, [esp + 0x134]
push edx
push eax
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.MSVCR80.dll_memcpy_s]
push eax
call fcn.00404bf0
mov ebx, dword [esp + 0x40]
mov edx, ebx
add esp, 0x24
xor esi, esi
mov edi, 0x104
mov eax, ebp
sub edx, ebp
movzx ecx, word [edx + eax]
test cx, cx
je 0x40675d
mov word [eax], cx
add eax, 2
sub edi, 1
jne 0x406747
jmp 0x406761
test edi, edi
jne 0x406769
sub eax, 2
mov esi, 0x8007007a
lea ecx, [esp + 0x20]
cmp ebx, ecx
mov word [eax], 0
je 0x406780
push ebx
call dword [sym.imp.MSVCR80.dll_free]
add esp, 4
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, esi
mov ecx, dword [esp + 0x32c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x314]
xor ecx, esp
call fcn.00423e66
add esp, 0x324
ret 4