Function at 0x40c066
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x41c
mov eax, dword [0x491330]
xor eax, esp
mov dword [esp + 0x418], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x40c339
mov ebx, 0x47b848
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor eax, eax
mov edi, 0x206
push edi
push eax
mov word [esp + 0x18], ax
lea eax, [esp + 0x1a]
push eax
call fcn.00447ae0
xor eax, eax
push edi
push eax
mov word [esp + 0x22c], ax
lea eax, [esp + 0x22e]
push eax
call fcn.00447ae0
mov edi, dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
add esp, 0x18
cmp word [0x495680], 0
je 0x40c11e
lea eax, [esp + 0x218]
push eax
push 0
push ebx
push 0x495680
call edi
mov ebx, eax
test ebx, ebx
je 0x40c111
push 0x104
lea edx, [esp + 0x21c]
mov ecx, esi
call fcn.004021b8
pop ecx
mov eax, ebx
jmp 0x40c33b
xor eax, eax
mov ebx, 0x47b848
mov word [0x495680], ax
lea eax, [esp + 0x10]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x218]
push eax
push 0
push ebx
lea eax, [esp + 0x1c]
push eax
call edi
mov ebx, eax
test ebx, ebx
jne 0x40c0f6
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [esp + 0x10]
push eax
call ebx
push eax
push str.GetTempFileName_fail:_d__temp_path:__s_
push 0
push 4
push str..._npatgpc_npbase_win.cpp
push 0x80b
call fcn.0042ab69
lea eax, [esp + 0x2c]
push eax
call fcn.0040b2d9
add esp, 0x20
lea eax, [esp + 0x218]
push eax
push 0
push 0x47b848
lea eax, [esp + 0x1c]
push eax
call edi
mov dword [esp + 0xc], eax
test eax, eax
je 0x40c1b4
push 0x104
lea edx, [esp + 0x21c]
mov ecx, esi
call fcn.004021b8
mov eax, dword [esp + 0x10]
pop ecx
jmp 0x40c33b
call ebx
push eax
lea eax, [esp + 0x14]
push eax
push str.No_writable_right_in_temp_path:__s___err__d_
push 0
push 4
push str..._npatgpc_npbase_win.cpp
push 0x816
call fcn.0042ab69
lea eax, [esp + 0x2c]
push 0x104
push eax
call fcn.0040206e
add esp, 0x24
test eax, eax
je 0x40c288
push str.temp
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0x10]
push eax
push str.Use_following_temp_folder:__s_
push 0
push 1
push str..._npatgpc_npbase_win.cpp
push 0x81d
call fcn.0042ab69
add esp, 0x18
lea eax, [esp + 0x218]
push eax
push 0
push 0x47b848
lea eax, [esp + 0x1c]
push eax
call edi
mov dword [esp + 0xc], eax
test eax, eax
je 0x40c265
mov ebx, 0x104
lea edx, [esp + 0x218]
push ebx
mov ecx, esi
call fcn.004021b8
push ebx
lea edx, [esp + 0x18]
mov ecx, 0x495680
call fcn.004021b8
pop ecx
jmp 0x40c1aa
call ebx
push eax
lea eax, [esp + 0x14]
push eax
push str.GetTempFileName_fail__path:__s___err__d_
push 0
push 4
push str..._npatgpc_npbase_win.cpp
push 0x826
call fcn.0042ab69
add esp, 0x1c
push ecx
lea ecx, [esp + 0x14]
call fcn.0040220a
pop ecx
test eax, eax
je 0x40c316
push str.temp
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0x10]
push eax
push str.Use_following_temp_folder:__s_
push 0
push 1
push str..._npatgpc_npbase_win.cpp
push 0x82e
call fcn.0042ab69
lea eax, [esp + 0x28]
push eax
call fcn.0040b2d9
add esp, 0x1c
lea eax, [esp + 0x218]
push eax
push 0
push 0x47b848
lea eax, [esp + 0x1c]
push eax
call edi
mov edi, eax
test edi, edi
je 0x40c316
mov ebx, 0x104
lea edx, [esp + 0x218]
push ebx
mov ecx, esi
call fcn.004021b8
push ebx
lea edx, [esp + 0x18]
mov ecx, 0x495680
call fcn.004021b8
pop ecx
pop ecx
mov eax, edi
jmp 0x40c33b
call ebx
push eax
lea eax, [esp + 0x14]
push eax
push str.GetTempFileName_fail__path:__s___err__d_
push 0
push 8
push str..._npatgpc_npbase_win.cpp
push 0x83a
call fcn.0042ab69
add esp, 0x1c
xor eax, eax
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00441f6f
mov esp, ebp
pop ebp
ret