Function at 0x40fdb0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b435c
mov eax, dword fs:[0]
push eax
sub esp, 0x314
mov eax, dword [0x6319d0]
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, ecx
mov dword [ebp - 0x320], ebx
call fcn.0046d4f0
test eax, eax
je 0x40fe64
push 0
push str.CInstall::SetUserInfoReg_n
push 0x641788
call fcn.00599ee3
mov eax, dword [str.ENTRY:]
mov ecx, dword [0x5ccf7c]
mov dword [0x641688], eax
mov eax, 0x641788
mov dword [0x64168c], ecx
add esp, 0xc
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40fe20
mov edi, 0x641688
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40fe31
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d500
push 0x641688
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
mov edx, dword [ebx + 0x4fac]
mov eax, dword [edx + 0xce0]
mov eax, dword [edx + 0xce4]
not eax
and eax, 0x400000
xor ecx, ecx
or ecx, eax
je 0x41012d
push 0
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x310]
call fcn.0047aa50
call fcn.004a8620
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40feb3
push 0x80004005
call fcn.00401b60
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x314], esi
mov dword [ebp - 4], 0
call fcn.004a8620
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40fee6
push 0x80004005
call fcn.00401b60
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x31c], edi
lea ecx, [ebp - 0x114]
push ecx
push 0
push 0
push 0x1a
mov bl, 1
push 0
mov byte [ebp - 4], bl
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jne 0x4100b7
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ff23
sub eax, edx
push eax
lea edx, [ebp - 0x114]
push edx
lea ecx, [ebp - 0x314]
call fcn.004026b0
lea eax, [ebp - 0x114]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40ff48
sub eax, edx
push eax
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x31c]
call fcn.004026b0
lea ecx, [ebp - 0x31c]
call fcn.004027d0
mov edi, dword [ebp - 0x31c]
cmp dword [edi - 0xc], 0
jl 0x40ffdc
push str.ROAMING
push edi
call fcn.0059a963
add esp, 8
test eax, eax
je 0x40ffdc
sub eax, edi
cmp eax, 0xffffffff
je 0x40ffdc
push eax
lea ecx, [ebp - 0x318]
push ecx
lea ecx, [ebp - 0x314]
call fcn.004024f0
push eax
lea ecx, [ebp - 0x314]
mov byte [ebp - 4], 2
call fcn.00402af0
mov eax, dword [ebp - 0x318]
add eax, 0xfffffff0
mov byte [ebp - 4], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ffdc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x314]
push 0x5c
push esi
call fcn.0059aa24
add esp, 8
test eax, eax
je 0x410047
sub eax, esi
cmp eax, 0xffffffff
je 0x410047
inc eax
push eax
lea ecx, [ebp - 0x318]
push ecx
lea ecx, [ebp - 0x314]
call fcn.004024f0
push eax
lea ecx, [ebp - 0x314]
mov byte [ebp - 4], 3
call fcn.00402af0
mov eax, dword [ebp - 0x318]
add eax, 0xfffffff0
mov byte [ebp - 4], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x410041
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x314]
call fcn.0049cb90
test eax, eax
je 0x41005a
mov dword [ebp - 0x118], 0x100
mov ebx, dword [ebp - 0x320]
mov ecx, dword [ebx + 0x4fac]
add ecx, 0x68
push ecx
lea ecx, [ebp - 0x310]
call fcn.0047acd0
mov eax, dword [esi - 0xc]
mov edx, dword [ebx + 0x4fac]
push eax
push esi
push str.UserName
add edx, 0x68
push edx
lea ecx, [ebp - 0x310]
call fcn.0047b0f0
call fcn.0046d4f0
test eax, eax
je 0x4100ea
push esi
push str.csUserPath___s_n
push 0x641588
call fcn.00599ee3
add esp, 0xc
push 0x641588
jmp 0x4100de
call fcn.0046d4f0
test eax, eax
je 0x4100ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_SHGetFolderPath_CSIDL_APPDATA__:_GetLastError_____d_n
push 0x641488
call fcn.00599ee3
add esp, 0xc
push 0x641488
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41010a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41012d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call fcn.0046d4f0
test eax, eax
je 0x4101b4
push 0
push str.CInstall::SetUserInfoReg_n
push 0x641388
call fcn.00599ee3
mov ecx, dword [str.EXIT:]
mov edx, dword [0x5ccefc]
mov eax, 0x641388
mov dword [0x641288], ecx
add esp, 0xc
mov dword [0x64128c], edx
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x410170
mov edi, 0x641288
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x410181
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x641288
rep movsb byte es:[edi], byte [esi]
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d510
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.00599ed4
mov esp, ebp
pop ebp
ret