Function at 0x5b2480
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d5b77
mov eax, dword fs:[0]
push eax
sub esp, 0x50c
mov eax, dword [0x638fe4]
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 edi, ecx
mov dword [ebp - 0x500], edi
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x504], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x510], eax
mov dword [ebp - 0x514], 0
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x5b24ec
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5b2501
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x5b2503
call edx
add eax, 0x10
mov dword [ebp - 0x508], eax
cmp dword [ebp + 0xc], 0
mov dword [ebp - 4], 0
je 0x5b270c
push 0x60ab98
lea ecx, [ebp - 0x4fc]
call fcn.00403280
push 0x60ab98
lea ecx, [ebp - 0x500]
mov byte [ebp - 4], 1
call fcn.00403280
mov byte [ebp - 4], 2
test esi, esi
jle 0x5b25f0
mov edx, dword [ebp - 0x504]
lea ecx, [ebp - 0x50c]
push esi
call fcn.005b5f80
add esp, 4
push eax
lea ecx, [ebp - 0x4fc]
mov byte [ebp - 4], 3
call fcn.00403220
lea ecx, [ebp - 0x50c]
mov byte [ebp - 4], 2
call fcn.00402b90
cmp esi, 0xa0009
je 0x5b25b8
cmp esi, 0x6020000
jne 0x5b25f0
push esi
push dword [ebp - 0x504]
call fcn.0058c3e0
mov edx, dword [ebp - 0x504]
lea ecx, [ebp - 0x50c]
push eax
call fcn.005b5f80
add esp, 4
mov byte [ebp - 4], 4
jmp 0x5b25d5
mov edx, dword [ebp - 0x504]
lea ecx, [ebp - 0x50c]
push 0x23c2
call fcn.005b5f80
add esp, 4
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x500]
call fcn.00403220
lea ecx, [ebp - 0x50c]
mov byte [ebp - 4], 2
call fcn.00402b90
mov eax, dword [ebp - 0x510]
test eax, eax
je 0x5b2606
push eax
lea ecx, [ebp - 0x4fc]
call fcn.00403220
test ebx, ebx
jne 0x5b260e
xor ecx, ecx
jmp 0x5b2611
mov ecx, dword [ebx + 0x20]
xor eax, eax
lea edx, [ebp - 0x4fc]
cmp esi, 0xa0009
sete al
push eax
lea eax, [ebp - 0x500]
push eax
call fcn.005aafe0
add esp, 8
test eax, eax
jne 0x5b2681
push 0x60ab98
mov ecx, edi
call fcn.00403280
lea ecx, [ebp - 0x500]
call fcn.00402b90
lea ecx, [ebp - 0x4fc]
call fcn.00402b90
lea ecx, [ebp - 0x508]
call fcn.00402b90
mov eax, edi
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.00544774
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x4fc]
cmp dword [eax - 4], 1
jle 0x5b26a1
push dword [eax - 0xc]
lea ecx, [ebp - 0x4fc]
call fcn.00402d90
mov eax, dword [ebp - 0x4fc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
mov eax, dword [ebp - 0x4fc]
push dword [eax - 8]
push eax
call fcn.0054c667
mov edx, eax
add esp, 8
test edx, edx
js 0x5b2702
mov ecx, dword [ebp - 0x4fc]
cmp edx, dword [ecx - 8]
jg 0x5b2702
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x4fc]
mov word [eax + edx*2], cx
lea eax, [ebp - 0x4fc]
push eax
lea ecx, [ebp - 0x508]
call fcn.00403220
lea ecx, [ebp - 0x500]
call fcn.00402b90
lea ecx, [ebp - 0x4fc]
jmp 0x5b28a4
push 0x80070057
call fcn.00402650
push 0x239f
xor edx, edx
lea ecx, [ebp - 0x500]
call fcn.005b5f80
add esp, 4
push 1
push 0
push ebx
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x4f8]
push dword [ebp - 0x500]
push 0x101000
push 0
push 0
push 1
call fcn.004216f5
mov byte [ebp - 4], 7
call fcn.00418413
mov ecx, eax
test ecx, ecx
jne 0x5b275f
push 0x80004005
call fcn.00402650
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5b2774
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x5b2776
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x504], esi
mov byte [ebp - 4], 8
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5b27ad
push 0x104
lea ecx, [ebp - 0x504]
call fcn.00402cf0
mov esi, dword [ebp - 0x504]
push 0
push 0x26
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push dword [esi - 8]
push esi
call fcn.0054c667
add esp, 8
test eax, eax
js 0x5b2702
cmp eax, dword [esi - 8]
jg 0x5b2702
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea ecx, [ebp - 0x4f8]
call fcn.004222b3
lea ecx, [ebp - 0x4f8]
mov dword [eax + 0x2c], esi
call fcn.00422120
cmp eax, 1
je 0x5b282b
push 0x60ab98
mov ecx, edi
call fcn.00403280
lea ecx, [ebp - 0x504]
call fcn.00402b90
lea ecx, [ebp - 0x4f8]
call fcn.004219d3
lea ecx, [ebp - 0x500]
jmp 0x5b2653
lea eax, [ebp - 0x50c]
push eax
lea ecx, [ebp - 0x4f8]
call fcn.004222ba
push eax
lea ecx, [ebp - 0x508]
mov byte [ebp - 4], 9
call fcn.00403220
lea ecx, [ebp - 0x50c]
mov byte [ebp - 4], 8
call fcn.00402b90
lea ecx, [ebp - 0x508]
call fcn.005b0f40
push dword [ebp - 0x508]
call dword [sym.imp.SHELL32.dll_PathIsExe]
test eax, eax
jne 0x5b2888
push eax
push 0x60ab98
lea ecx, [ebp - 0x508]
call fcn.00403620
lea ecx, [ebp - 0x504]
call fcn.00402b90
lea ecx, [ebp - 0x4f8]
call fcn.004219d3
lea ecx, [ebp - 0x500]
mov byte [ebp - 4], 0
call fcn.00402b90
mov esi, dword [ebp - 0x508]
add esi, 0xfffffff0
push esi
call fcn.004035b0
add eax, 0x10
mov dword [ebp - 4], 0xffffffff
mov dword [edi], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x5b2663
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x5b290a
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x5b290a
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x5b2663
call edx
jmp 0x5b2663