Function at 0x1012378
Capabilities:
Get common file path

Disassembly:
push 0x648
mov eax, 0x101de94
call int.01001630
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x648], eax
lea eax, [ebp - 0x63c]
push eax
xor ebx, ebx
push 0x1012660
lea ecx, [ebp - 0x654]
mov dword [ebp - 0x64c], esi
mov dword [ebp - 0x644], edi
mov dword [ebp - 0x63c], ebx
call fcn.01001580
xor eax, eax
mov word [esi], ax
mov word [edi], ax
lea eax, [ebp - 0x218]
push eax
mov esi, 0x104
push esi
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, ebx
jbe 0x1012569
xor eax, eax
mov dword [ebp - 0x638], ebx
lea edi, [ebp - 0x634]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x638]
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
cmp eax, ebx
mov dword [ebp - 0x63c], eax
jl 0x10125f0
lea eax, [ebp - 0x640]
push eax
lea eax, [ebp - 0x638]
push eax
mov dword [ebp - 0x640], ebx
call dword [sym.imp.ole32.dll_StringFromCLSID]
cmp eax, ebx
mov dword [ebp - 0x63c], eax
mov edi, 0x1010d3c
jl 0x10124c4
push dword [ebp - 0x640]
lea eax, [ebp - 0x628]
push 0x1012638
push esi
push eax
call fcn.0100a675
add esp, 0x10
cmp eax, ebx
mov dword [ebp - 0x63c], eax
jl 0x101248a
push dword [ebp - 0x640]
lea eax, [ebp - 0x420]
push 0x1012610
push esi
push eax
call fcn.0100a675
add esp, 0x10
cmp eax, ebx
mov dword [ebp - 0x63c], eax
jge 0x10124b0
mov eax, dword [section..data]
cmp eax, section..data
je 0x10124b0
test byte [eax + 0x1c], 4
je 0x10124b0
push dword [ebp - 0x63c]
push edi
push 0x11
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101113b
push dword [ebp - 0x640]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [ebp - 0x640], ebx
jmp 0x10124ea
mov eax, dword [section..data]
cmp eax, section..data
je 0x10124ea
test byte [eax + 0x1c], 4
je 0x10124ea
push dword [ebp - 0x63c]
push edi
push 0x12
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101113b
cmp dword [ebp - 0x63c], ebx
jl 0x10125f0
mov esi, dword [sym.imp.SHELL32.dll_PathYetAnotherMakeUniqueName]
lea eax, [ebp - 0x628]
push eax
push ebx
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x644]
call esi
cmp eax, ebx
je 0x1012532
lea eax, [ebp - 0x420]
push eax
push ebx
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x64c]
call esi
cmp eax, ebx
jne 0x10125ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1012546
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x63c], eax
mov eax, dword [section..data]
cmp eax, section..data
je 0x10125ad
test byte [eax + 0x1c], 4
je 0x10125ad
push dword [ebp - 0x63c]
push edi
push 0x13
jmp 0x10125a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x101257d
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x63c], eax
mov eax, dword [section..data]
cmp eax, section..data
je 0x10125ad
test byte [eax + 0x1c], 4
je 0x10125ad
push dword [ebp - 0x63c]
push 0x1010d3c
push 0x14
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0101113b
cmp dword [ebp - 0x63c], ebx
jl 0x10125f0
mov ecx, dword [ebp - 0x648]
push ebx
push dword [ebp - 0x644]
call fcn.01018389
cmp eax, ebx
mov dword [ebp - 0x63c], eax
jl 0x10125f0
mov ecx, dword [ebp - 0x648]
push 1
push dword [ebp - 0x644]
push dword [ebp - 0x64c]
call fcn.0101766d
mov dword [ebp - 0x63c], eax
mov esi, dword [ebp - 0x63c]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x654]
call fcn.010015c0
mov eax, esi
call fcn.01001670
ret 0xc