Function at 0x418080
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56e7bd
mov eax, dword fs:[0]
push eax
sub esp, 0x2bc
mov eax, dword [0x5b8250]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov esi, ecx
mov dword [ebp - 4], 0
xor eax, eax
push 0x206
mov dword [ebp - 0x2bc], 0
push eax
mov word [ebp - 0x298], ax
lea eax, [ebp - 0x296]
push eax
mov dword [ebp - 0x2c4], esi
call fcn.005392b0
add esp, 0xc
call fcn.00418b30
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp al, 2
jb 0x418186
lea eax, [ebp - 0x2b4]
mov dword [ebp - 0x2b8], 1
push eax
push 8
mov dword [ebp - 0x2b4], 0
mov dword [ebp - 0x2c0], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x41815c
lea eax, [ebp - 0x2c0]
push eax
push 4
lea eax, [ebp - 0x2b8]
push eax
push 0x12
push dword [ebp - 0x2b4]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push dword [ebp - 0x2b4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2b8], 3
jne 0x418172
lea ecx, [ebp - 0x298]
call fcn.00415050
jmp 0x418199
lea eax, [ebp - 0x298]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x4181a7
push 1
push 0x1a
lea eax, [ebp - 0x298]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x592dc0
lea eax, [ebp - 0x298]
push eax
call edi
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x2bc], 1
cmp word [ebp - 0x298], ax
je 0x418376
push 0x7e
push eax
mov word [ebp - 0x90], ax
lea eax, [ebp - 0x8e]
push eax
call fcn.005392b0
add esp, 0xc
test ebx, ebx
je 0x4182c3
lea eax, [ebp - 0x2a8]
mov dword [ebp - 0x2a8], 0
xorps xmm0, xmm0
mov dword [ebp - 0x29c], 0
push eax
movq qword [ebp - 0x2a4], xmm0
call dword [sym.imp.ole32.dll_CoCreateGuid]
push 0x40
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x2a8]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x298]
push eax
call edi
cmp word [ebp - 0x298], 0
jne 0x418255
xor ecx, ecx
jmp 0x41826f
lea ecx, [ebp - 0x298]
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x418260
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x298]
mov ecx, esi
push eax
call fcn.004204e0
cmp dword [esi + 0x14], 8
mov ecx, dword [esi + 0x10]
jb 0x41828b
mov eax, dword [esi]
jmp 0x41828d
mov eax, esi
mov edx, 0x5c
cmp dx, word [eax + ecx*2 - 2]
je 0x4182a5
push 0x591538
mov ecx, esi
call fcn.0041b9f0
cmp dword [esi + 0x14], 8
jb 0x4182b7
mov ecx, dword [esi]
call fcn.00411da0
jmp 0x418376
mov ecx, esi
call fcn.00411da0
jmp 0x418376
cmp dword [esi + 0x14], 8
jb 0x4182cd
mov eax, dword [esi]
jmp 0x4182cf
mov eax, esi
push 0xa
lea ecx, [ebp - 0x90]
push ecx
push eax
call fcn.00541dfe
add esp, 0xc
lea eax, [ebp - 0x90]
lea ecx, [ebp - 0x2b0]
push eax
call fcn.00420660
push 4
push str..tmp
lea ecx, [ebp - 0x2b0]
mov dword [ebp - 4], 1
call fcn.0041c1c0
cmp dword [ebp - 0x29c], 8
lea eax, [ebp - 0x2b0]
cmovae eax, dword [ebp - 0x2b0]
push eax
lea eax, [ebp - 0x298]
push eax
call edi
cmp word [ebp - 0x298], 0
jne 0x418338
xor ecx, ecx
jmp 0x418350
lea ecx, [ebp - 0x298]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x418341
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x298]
mov ecx, esi
push eax
call fcn.004204e0
cmp dword [ebp - 0x29c], 8
jb 0x418376
push dword [ebp - 0x2b0]
call fcn.005385cc
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053aa3c
mov esp, ebp
pop ebp
ret