Function at 0x5832c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d3485
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x638fe4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
mov dword [0x6441b8], 0
call dword [0x643b64]
test al, al
jne 0x58331b
push 0x62e4b0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x158
push eax
call fcn.005479aa
cmp dword [ebp + 0x10], 0
je 0x583669
mov ebx, dword [ebp + 0x14]
lea ecx, [ebp + 0x14]
push 0xa0009
mov edx, ebx
call fcn.005b5f80
add esp, 4
mov byte [ebp - 4], 1
push dword [ebp + 0x14]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x58336d
mov ecx, dword [ebp + 0x14]
call fcn.005b4740
test al, al
je 0x58336d
mov eax, dword [ebp + 0x14]
cmp dword [eax - 0xc], 0xae
jg 0x58336d
mov edi, 1
jmp 0x58351f
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x583382
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x583397
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x583399
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 2
mov edi, 1
mov eax, dword [esi - 8]
mov ecx, edi
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5833c9
push 0x104
lea ecx, [ebp - 0x18]
call fcn.00402cf0
mov esi, dword [ebp - 0x18]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58369b
cmp eax, dword [esi - 8]
jg 0x58369b
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov edx, edi
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x583420
push 0x104
lea ecx, [ebp + 0x14]
call fcn.00402cf0
mov eax, dword [ebp + 0x14]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
mov eax, dword [ebp + 0x14]
push dword [eax - 8]
push eax
call fcn.0054c667
mov edx, eax
add esp, 8
test edx, edx
js 0x58369b
mov ecx, dword [ebp + 0x14]
cmp edx, dword [ecx - 8]
jg 0x58369b
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp + 0x14]
mov word [eax + edx*2], cx
mov edx, edi
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x583483
push 0x104
lea ecx, [ebp + 0x14]
call fcn.00402cf0
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
mov eax, dword [ebp + 0x14]
push dword [eax - 8]
push eax
call fcn.0054c667
mov edx, eax
add esp, 8
test edx, edx
js 0x58369b
mov ecx, dword [ebp + 0x14]
cmp edx, dword [ecx - 8]
jg 0x58369b
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp + 0x14]
mov word [eax + edx*2], cx
mov edx, dword [0x643be0]
test edx, edx
je 0x5834ea
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax - 0xc]
inc ecx
push ecx
push eax
xor eax, eax
cmp ebx, 0x9fbf1
push 0xa0009
setne al
dec eax
and eax, 4
push dword [eax + 0x644028]
call edx
push ecx
mov esi, esp
mov byte [ebp + 0x13], 1
mov dword [ebp - 0x1c], esi
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff0
push eax
call fcn.004035b0
mov cl, byte [ebp + 0x13]
add esp, 4
add eax, 0x10
mov dword [esi], eax
call fcn.0058c700
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x18]
call fcn.00402b90
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x583534
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x583549
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x58354b
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 3
mov eax, dword [esi - 8]
sub edi, dword [esi - 4]
sub eax, 0x104
or eax, edi
jge 0x583574
push 0x104
lea ecx, [ebp - 0x18]
call fcn.00402cf0
mov esi, dword [ebp - 0x18]
push 0x104
push esi
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58369b
cmp eax, dword [esi - 8]
jg 0x58369b
mov edi, dword [sym.imp.SUCMLIB.dll_Ordinal_65]
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov dword [ebp - 0x14], ecx
mov eax, dword [esi - 0xc]
inc eax
push eax
push esi
lea eax, [ebp - 0x14]
push eax
call edi
push dword [ebp - 0x14]
call dword [0x643b60]
test al, al
lea eax, [ebp - 0x14]
push eax
jne 0x5835ea
call dword [sym.imp.SUCMLIB.dll_Ordinal_67]
push 0x62e4b0
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0x17c
push eax
call fcn.005479aa
mov esi, dword [sym.imp.SUCMLIB.dll_Ordinal_67]
call esi
cmp dword [0x643b48], 0
je 0x583659
push 0x20002
mov edx, ebx
lea ecx, [ebp - 0x1c]
call fcn.005b5f80
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 edi
push dword [ebp + 0x10]
call dword [0x643b48]
test al, al
lea eax, [ebp + 0x10]
push eax
jne 0x58364f
call esi
push 0x62e4b0
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0x18b
push eax
call fcn.005479aa
call esi
lea ecx, [ebp - 0x1c]
call fcn.00402b90
lea ecx, [ebp - 0x18]
call fcn.00402b90
lea ecx, [ebp + 0x14]
call fcn.00402b90
cmp byte [ebp + 8], 0
je 0x583676
mov byte [0x6441cd], 1
cmp dword [0x6441b4], 0
mov byte [0x6441cc], 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 0x10
push 0x80070057
call fcn.00402650
cmp dword [0x6441b4], 0
jne 0x5836b9
push 0x6441b4
call dword [0x643b34]
mov eax, 0x583676
ret