Function at 0x586f90
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d3733
mov eax, dword fs:[0]
push eax
sub esp, 0x18
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 eax, ecx
mov dword [ebp - 0x1c], eax
push 0xa0009
mov edx, eax
lea ecx, [ebp - 0x20]
call fcn.005b5f80
add esp, 4
mov dword [ebp - 4], 0
mov ebx, dword [ebp - 0x20]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
or edi, 0xffffffff
test eax, eax
jne 0x58722b
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x587000
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x587015
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x587017
call edx
lea edi, [eax + 0x10]
mov dword [ebp - 0x18], edi
mov byte [ebp - 4], 1
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x587045
push 0x104
lea ecx, [ebp - 0x18]
call fcn.00402cf0
mov edi, dword [ebp - 0x18]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push dword [edi - 8]
push edi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58726b
cmp eax, dword [edi - 8]
jg 0x58726b
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x58708c
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5870a1
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x5870a3
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 2
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5870d1
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402cf0
mov esi, dword [ebp - 0x14]
push 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58726b
cmp eax, dword [esi - 8]
jg 0x58726b
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x587128
push 0x104
lea ecx, [ebp - 0x14]
call fcn.00402cf0
mov esi, dword [ebp - 0x14]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x58726b
cmp eax, dword [esi - 8]
jg 0x58726b
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov ecx, dword [0x643be0]
test ecx, ecx
je 0x587182
mov eax, dword [esi - 0xc]
inc eax
push eax
xor eax, eax
cmp dword [ebp - 0x1c], 0x9fbf1
push esi
setne al
dec eax
and eax, 4
push 0xa0009
push dword [eax + 0x644028]
call ecx
push ecx
add esi, 0xfffffff0
mov dword [ebp - 0x24], esp
push esi
mov byte [ebp - 0xd], 1
call fcn.004035b0
mov edx, dword [ebp - 0x24]
add esp, 4
mov cl, byte [ebp - 0xd]
add eax, 0x10
mov dword [edx], eax
call fcn.0058c700
add esp, 4
mov byte [ebp - 4], 1
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x5871e9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5871e7
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5871e7
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ecx + 4]
call esi
jmp 0x5871ef
call edx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x587228
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x587267
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x587267
push 0
push dword [ecx + 4]
call esi
or edi, 0xffffffff
mov ecx, dword [0x643bf0]
test ecx, ecx
je 0x58729a
xor eax, eax
cmp dword [ebp - 0x1c], 0x9fbf1
push 0x50000
setne al
dec eax
and eax, 4
mov dword [ebp - 0x1c], eax
push dword [eax + 0x644028]
call ecx
test eax, eax
jns 0x58729a
mov eax, dword [0x643bf0]
mov esi, dword [ebp - 0x1c]
test eax, eax
jne 0x587275
jmp 0x587282
call edx
jmp 0x587228
push 0x80070057
call fcn.00402650
push 0x10001
push dword [esi + 0x644028]
call eax
mov ecx, dword [0x643bf4]
test ecx, ecx
je 0x58729a
push eax
push 0x50000
push dword [esi + 0x644028]
call ecx
mov dword [ebp - 4], 0xffffffff
add ebx, 0xfffffff0
lock xadd dword [ebx + 0xc], edi
dec edi
test edi, edi
jg 0x5872eb
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5872e9
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5872e9
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call edx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret