Function at 0x40d0f5
Capabilities:
Get common file path

Disassembly:
push 0x248
mov eax, 0x451055
call fcn.0042c0a7
mov ebx, ecx
mov dword [ebp - 0x250], ebx
mov edi, dword [ebp + 8]
test edi, edi
je 0x40d362
mov eax, dword [edi + 0x14]
test eax, eax
je 0x40d122
mov al, byte [eax]
jmp 0x40d125
mov al, byte [edi + 0x18]
test al, al
je 0x40d362
mov ecx, edi
call fcn.0040ee0f
xor edx, edx
mov esi, eax
push 7
pop ecx
xor eax, eax
mov dword [ebp - 0x238], edx
mov dword [ebp - 0x234], edx
mov dword [ebp - 0x234], ecx
mov dword [ebp - 0x238], edx
mov word [ebp - 0x248], ax
mov dword [ebp - 4], edx
mov dword [ebp - 0x220], edx
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x21c], ecx
mov dword [ebp - 0x220], edx
mov word [ebp - 0x230], ax
mov byte [ebp - 4], 1
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsFileSpecW]
add ebx, 0xbc
test eax, eax
je 0x40d1c9
push ebx
xor eax, eax
push eax
push eax
push 0x8023
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push ebx
call fcn.004061c6
pop ecx
push eax
push ebx
lea ecx, [ebp - 0x248]
call fcn.004060b9
push esi
call fcn.004061c6
pop ecx
push eax
push esi
lea ecx, [ebp - 0x230]
jmp 0x40d20b
push esi
push 0x104
push ebx
call fcn.00434581
add esp, 0xc
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov esi, eax
push esi
call fcn.004061c6
pop ecx
push eax
push esi
lea ecx, [ebp - 0x230]
call fcn.004060b9
push ebx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push ebx
call fcn.004061c6
pop ecx
push eax
push ebx
lea ecx, [ebp - 0x248]
call fcn.004060b9
test dword [edi + 0x10], 0x20000
je 0x40d28b
cmp dword [ebp - 0x21c], 8
lea ecx, [ebp - 0x230]
push ebx
cmovae ecx, dword [ebp - 0x230]
lea eax, [ebp - 0x248]
cmp dword [ebp - 0x234], 8
push 0
cmovae eax, dword [ebp - 0x248]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x40d28b
push 0x104
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x40d28b
mov esi, dword [edi + 0x14]
test esi, esi
je 0x40d28b
lea eax, [ebp - 0x218]
push eax
call fcn.004061c6
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [esi + 4]
call fcn.004060b9
mov ecx, edi
call fcn.0040ee0f
mov esi, eax
push esi
mov dword [ebp - 0x24c], esi
call fcn.00434185
pop ecx
test eax, eax
je 0x40d301
xor eax, eax
test dword [edi + 0x10], 0x10000
push eax
push 0x80
je 0x40d2ba
push 2
jmp 0x40d2bc
push 4
push eax
push eax
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40d301
lea eax, [ebp - 0x254]
push eax
push ebx
push 0x104
push 0
push dword [ebp - 0x24c]
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathW]
test eax, eax
je 0x40d2fa
push ebx
mov ecx, edi
call fcn.0040ee28
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test dword [edi + 0xc], 0x40000000
je 0x40d32f
mov esi, dword [ebp - 0x250]
mov ecx, esi
push edi
call fcn.0040ce2e
test dword [edi + 0x10], 0x100000
je 0x40d32f
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
mov ecx, esi
call fcn.0040cd93
mov eax, dword [edi + 0x14]
xor ebx, ebx
test eax, eax
je 0x40d33c
mov byte [eax], bl
jmp 0x40d33f
mov byte [edi + 0x18], bl
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x230]
push ebx
push 1
call fcn.00406923
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x248]
push ebx
push 1
call fcn.00406923
call fcn.0042c051
ret 4