Function at 0x10046147
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10053854
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x1005f0b4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, edx
mov dword [ebp - 0x98], ebx
mov esi, ecx
and dword [ebp - 4], 0
lea edi, [ebp - 0x90]
xor eax, eax
stosd dword es:[edi], eax
push 0x50
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x68]
xor edi, edi
push edi
push eax
mov dword [ebp - 0x94], edi
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x94]
mov byte [ebp - 0xa4], 1
add esp, 0xc
mov dword [ebp - 0xa8], eax
mov byte [ebp - 4], 1
test esi, esi
je 0x100461cf
cmp word [esi], di
jne 0x100462fc
push edi
push edi
mov esi, edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ebx, eax
mov dword [ebp - 0xa0], ebx
test ebx, ebx
jne 0x10046221
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x80070000
test eax, eax
jle 0x100461fb
movzx eax, ax
or eax, edi
test eax, eax
jns 0x10046217
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10046210
movzx esi, si
or esi, edi
test esi, esi
jns 0x10046226
jmp 0x100462d4
mov esi, 0x80004005
jmp 0x100462da
mov edi, 0x80070000
lea eax, [ebx*2 + 2]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
jne 0x1004626b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10046254
movzx eax, ax
or eax, edi
test eax, eax
jns 0x10046217
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x10046269
movzx esi, si
or esi, edi
test esi, esi
js 0x100462d4
push ebx
push dword [ebp - 0xa0]
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x100462a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1004628d
movzx eax, ax
or eax, edi
test eax, eax
jns 0x100462c7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x100462a2
movzx esi, si
or esi, edi
test esi, esi
js 0x100462b0
xor eax, eax
cmp ax, word [ebx]
jne 0x100462ce
mov esi, 0x8007000d
xor edi, edi
test ebx, ebx
je 0x100462d6
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x100462d6
mov esi, 0x80004005
jmp 0x100462b0
mov dword [ebp - 0x94], ebx
xor edi, edi
test esi, esi
jns 0x100462f0
mov ecx, dword [ebp + 4]
push esi
push 0x100152f8
push 0x2f
pop edx
call fcn.1002b85f
jmp 0x1004640d
mov esi, dword [ebp - 0x94]
mov ebx, dword [ebp - 0x98]
xor eax, eax
mov dword [ebp - 0x6c], 7
mov dword [ebp - 0x70], edi
mov word [ebp - 0x80], ax
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.1002a688
push eax
push esi
lea ecx, [ebp - 0x80]
call fcn.10028225
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x10046326
sub ecx, edx
sar ecx, 1
cmp word [esi + ecx*2 - 2], 0x5c
je 0x10046353
mov esi, 0x10006b98
mov ecx, esi
call fcn.1002a688
push eax
push esi
lea ecx, [ebp - 0x80]
call fcn.100279aa
lea eax, [ebp - 0x90]
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
mov esi, eax
test esi, esi
jns 0x10046387
mov ecx, dword [ebp + 4]
push esi
push 0x100152f8
push 0x3a
pop edx
call fcn.1002b85f
push edi
push 1
lea ecx, [ebp - 0x80]
call fcn.1002795e
jmp 0x1004640d
push 0x28
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x90]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
mov esi, 0x1000d8f0
mov ecx, esi
call fcn.1002a688
push eax
push esi
lea ecx, [ebp - 0x80]
call fcn.100279aa
lea ecx, [ebp - 0x68]
call fcn.1002a688
push eax
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x80]
call fcn.100279aa
cmp dword [ebp - 0x6c], 8
mov ecx, dword [ebp - 0x80]
jae 0x100463d1
lea ecx, [ebp - 0x80]
call fcn.10030f3d
test eax, eax
jne 0x100463ee
mov ecx, dword [ebp + 4]
push 0x100152f8
push 0x41
pop edx
call fcn.1002b64a
mov esi, eax
jmp 0x10046377
lea eax, [ebp - 0x80]
cmp ebx, eax
je 0x10046400
push 0xffffffffffffffff
push edi
push eax
mov ecx, ebx
call fcn.1002866d
push edi
push 1
lea ecx, [ebp - 0x80]
call fcn.1002795e
mov esi, edi
lea ecx, [ebp - 0xa8]
call fcn.10046e7f
mov eax, esi
jmp 0x1004643e
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1004f280
leave
ret