Function at 0x54edf0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57871f
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5d52e0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor esi, esi
mov dword [ebp - 4], esi
mov dword [0x5dda04], esi
call dword [0x5dd46c]
test al, al
jne 0x54ee45
push 0x5c77e8
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x14b
call fcn.005039bf
cmp dword [ebp + 0xc], esi
je 0x54f1b6
mov ebx, dword [ebp + 0x10]
push ebx
mov ecx, 0xa0009
lea edi, [ebp + 0xc]
call fcn.00530ca0
add esp, 4
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x54ee94
mov edx, dword [ebp + 0xc]
push edx
call fcn.0052a9f0
add esp, 4
test al, al
je 0x54ee94
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], 0xae
jle 0x54f029
call fcn.0040c84f
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x54eeae
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 2
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x54eee5
push 0x104
lea ecx, [ebp - 0x18]
call fcn.004019b0
mov esi, dword [ebp - 0x18]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004ff818
add esp, 8
test eax, eax
js 0x54f1e8
cmp eax, dword [esi - 8]
jg 0x54f1e8
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, 0x104
or eax, ecx
jge 0x54ef3f
push 0x104
lea ecx, [ebp + 0xc]
call fcn.004019b0
mov edx, dword [ebp + 0xc]
push 0x104
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.004ff818
add esp, 8
test eax, eax
js 0x54f1e8
mov ecx, dword [ebp + 0xc]
cmp eax, dword [ecx - 8]
jg 0x54f1e8
mov dword [ecx - 0xc], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov word [ecx + eax*2], dx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, 0x104
or eax, ecx
jge 0x54efa3
push 0x104
lea ecx, [ebp + 0xc]
call fcn.004019b0
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.004ff818
add esp, 8
test eax, eax
js 0x54f1e8
mov ecx, dword [ebp + 0xc]
cmp eax, dword [ecx - 8]
jg 0x54f1e8
mov dword [ecx - 0xc], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov word [ecx + eax*2], dx
cmp ebx, 0x9fbf1
jne 0x54efe7
mov edx, 1
mov edi, dword [0x5dd53c]
test edi, edi
je 0x54f009
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax - 0xc]
mov edx, dword [edx*4 + 0x5dd9a0]
inc ecx
push ecx
push eax
push 0xa0009
push edx
call edi
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x54f029
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.0040c84f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x54f043
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 3
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x54f07a
push 0x104
lea ecx, [ebp - 0x18]
call fcn.004019b0
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
push 0x104
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004ff818
add esp, 8
test eax, eax
js 0x54f1e8
cmp eax, dword [esi - 8]
jg 0x54f1e8
mov ebx, dword [sym.imp.SUCMLIB.dll_Ordinal_65]
mov dword [esi - 0xc], eax
xor edx, edx
mov word [esi + eax*2], dx
mov dword [ebp - 0x14], edx
mov eax, dword [esi - 0xc]
inc eax
push eax
push esi
lea eax, [ebp - 0x14]
push eax
call ebx
mov ecx, dword [ebp - 0x14]
push ecx
call dword [0x5dd474]
test al, al
jne 0x54f0f3
lea edx, [ebp - 0x14]
push edx
call dword [sym.imp.SUCMLIB.dll_Ordinal_67]
push 0x5c77e8
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x24], 0x16f
call fcn.005039bf
lea ecx, [ebp - 0x14]
push ecx
call dword [sym.imp.SUCMLIB.dll_Ordinal_67]
cmp dword [0x5dd4b4], 0
je 0x54f173
mov edx, dword [ebp + 0x10]
push edx
mov ecx, 0x20002
lea edi, [ebp - 0x1c]
call fcn.00530ca0
add esp, 4
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x1c]
mov dword [ebp + 0x10], 0
mov ecx, dword [eax - 0xc]
inc ecx
push ecx
push eax
lea eax, [ebp + 0x10]
push eax
call ebx
mov ecx, dword [ebp + 0x10]
push ecx
call dword [0x5dd4b4]
test al, al
jne 0x54f161
lea edx, [ebp + 0x10]
push edx
call dword [sym.imp.SUCMLIB.dll_Ordinal_67]
push 0x5c77e8
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x28], 0x17e
call fcn.005039bf
lea ecx, [ebp + 0x10]
push ecx
call dword [sym.imp.SUCMLIB.dll_Ordinal_67]
lea ecx, [ebp - 0x1c]
call fcn.00404b10
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x54f193
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x54f1b6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp + 8], 0
je 0x54f1c3
mov byte [0x5dda19], 1
cmp dword [0x5dda00], 0
mov byte [0x5dda18], 1
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0x80070057
call fcn.004010a0
cmp dword [0x5dda00], 0
jne 0x54f206
push 0x5dda00
call dword [0x5dd4a0]
mov eax, 0x54f1c3
ret