Function at 0x40a960
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x48c5c7
mov eax, dword fs:[0]
push eax
sub esp, 0x498
mov eax, dword [0x4b81f4]
xor eax, esp
mov dword [esp + 0x494], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b81f4]
xor eax, esp
push eax
lea eax, [esp + 0x4ac]
mov dword fs:[0], eax
mov eax, dword [esp + 0x4bc]
mov ebx, ecx
lea ecx, [esp + 0x13c]
mov dword [esp + 0x14], eax
call fcn.0040f730
xor ebp, ebp
mov ecx, 0x105
mov dword [esp + 0x4b4], ebp
lea esi, [esp + 0x144]
mov dword [esp + 0x25c], ecx
call fcn.00410400
cmp byte [esp + 0x258], 0
lea eax, [esp + 0x148]
jne 0x40a9ed
mov eax, dword [esp + 0x144]
mov edi, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
add eax, 4
push eax
push ebp
push ebp
push 0x1a
push ebp
call edi
test eax, eax
je 0x40aaec
cmp dword [esp + 0x25c], ebp
je 0x40aa16
mov dword [esp + 0x25c], ebp
mov ecx, 1
lea esi, [esp + 0x144]
mov dword [esp + 0x140], ebp
call fcn.00410400
cmp byte [esp + 0x258], 0
lea eax, [esp + 0x148]
jne 0x40aa46
mov eax, dword [esp + 0x144]
xor ecx, ecx
mov word [eax + 4], cx
mov ecx, 0x105
lea esi, [esp + 0x144]
mov dword [esp + 0x25c], ecx
call fcn.00410400
cmp byte [esp + 0x258], 0
lea eax, [esp + 0x148]
jne 0x40aa7c
mov eax, dword [esp + 0x144]
add eax, 4
push eax
push 1
push ebp
push 0x1a
push ebp
call edi
test eax, eax
je 0x40aaec
lea eax, [esp + 0x13c]
call fcn.0040f8d0
mov eax, dword [esp + 0x14]
call fcn.0040e680
push 0x4ad208
push 0x4ad42c
mov edx, eax
call fcn.0040fd10
add esp, 8
cmp byte [esp + 0x258], 0
mov dword [esp + method.t_str.virtual_0], vtable.t_str.0
jne 0x40aae5
mov eax, dword [esp + 0x144]
lea edx, [esp + 0x148]
cmp eax, edx
je 0x40aae5
push eax
call fcn.0046b865
add esp, 4
xor al, al
jmp 0x40ad54
lea edi, [esp + 0x13c]
call fcn.0040fb80
cmp byte [esp + 0x258], 0
lea esi, [esp + 0x148]
jne 0x40ab10
mov esi, dword [esp + 0x144]
lea ecx, [esp + 0x260]
call fcn.0040f730
lea eax, [esi + 4]
lea edx, [esp + 0x260]
call fcn.0040f920
mov byte [esp + 0x4b4], 0
cmp byte [esp + 0x37c], 0
lea eax, [esp + 0x26c]
jne 0x40ab4b
mov eax, dword [esp + 0x268]
lea ebp, [ebx + 0x254]
add eax, 4
mov edx, ebp
call fcn.0040f920
cmp byte [esp + 0x37c], 0
mov esi, vtable.t_str.0
mov dword [esp + 0x260], esi
jne 0x40ab8c
mov eax, dword [esp + 0x268]
lea ecx, [esp + 0x26c]
cmp eax, ecx
je 0x40ab8c
push eax
call fcn.0046b865
add esp, 4
cmp byte [ebx], 0
je 0x40ad26
cmp byte [ebp + 0x11c], 0
lea eax, [ebp + 0xc]
jne 0x40aba4
mov eax, dword [ebp + 8]
add eax, 4
push 0x5c
push eax
call fcn.0046d027
add esp, 8
test eax, eax
jne 0x40abc9
cmp byte [ebp + 0x11c], al
lea eax, [ebp + 0xc]
jne 0x40abc4
mov eax, dword [ebp + 8]
add eax, 4
jmp 0x40abcc
add eax, 2
push eax
lea edi, [esp + 0x264]
call fcn.0040f860
mov ecx, str.Application_Data
mov eax, edi
mov byte [esp + 0x4b4], 2
call fcn.0040fa00
test al, al
je 0x40acfa
mov ebx, str.AppDataRoaming
xor edx, edx
cmp edx, ebx
jne 0x40ac05
mov ebx, 0x4ac1f8
mov eax, ebx
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40ac10
sub eax, edx
sar eax, 1
lea edi, [eax + 1]
mov ecx, edi
lea esi, [esp + 0x268]
mov dword [esp + 0x264], eax
call fcn.00410400
cmp byte [esp + 0x37c], 0
lea eax, [esp + 0x26c]
jne 0x40ac4f
mov eax, dword [esp + 0x268]
lea ecx, [edi + edi]
push ecx
add eax, 4
push ebx
push eax
call fcn.0046fa70
add esp, 0xc
lea ecx, [esp + 0x384]
call fcn.0040d0f0
push ebp
lea ebx, [esp + 0x388]
mov byte [esp + 0x4b8], 3
call fcn.0040dfb0
cmp byte [esp + 0x37c], 0
lea esi, [esp + 0x26c]
jne 0x40ac99
mov esi, dword [esp + 0x268]
lea ecx, [esp + 0x18]
call fcn.0040f730
lea eax, [esi + 4]
lea edx, [esp + 0x18]
call fcn.0040f920
lea eax, [esp + 0x18]
lea esi, [esp + 0x384]
call fcn.0040d530
lea ecx, [esp + 0x18]
call fcn.0040d4b0
cmp byte [esp + 0x4a0], 0
lea eax, [esp + 0x390]
jne 0x40acdf
mov eax, dword [esp + 0x38c]
add eax, 4
mov edx, ebp
call fcn.0040f920
lea ecx, [esp + 0x384]
call fcn.0040d4b0
mov esi, vtable.t_str.0
cmp byte [esp + 0x37c], 0
mov dword [esp + 0x260], esi
jne 0x40ad26
mov eax, dword [esp + 0x268]
lea edx, [esp + 0x26c]
cmp eax, edx
je 0x40ad26
push eax
call fcn.0046b865
add esp, 4
cmp byte [esp + 0x258], 0
mov dword [esp + 0x13c], esi
jne 0x40ad52
mov eax, dword [esp + 0x144]
lea ecx, [esp + 0x148]
cmp eax, ecx
je 0x40ad52
push eax
call fcn.0046b865
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x4ac]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x494]
xor ecx, esp
call fcn.0046b4eb
add esp, 0x4a4
ret 4