Function at 0x404800
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x440b4a
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x452040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], 0
mov eax, dword fs:[0x2c]
mov ecx, dword [0x454264]
mov dword [ebp - 0x24], esi
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x45378c]
cmp eax, dword [ecx + 4]
jg 0x404a9b
cmp dword [0x453784], 0
mov dword [ebp - 0x28], 0x7ffffffe
jne 0x4049b2
movups xmm0, xmmword [0x446600]
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
push 0
push 0
lea eax, [ebp - 0x20]
push eax
movups xmmword [ebp - 0x20], xmm0
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
js 0x4049b2
mov ecx, dword [ebp - 0x34]
mov edi, ecx
mov dword [ebp - 0x3c], ecx
lea edx, [edi + 2]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x4048a4
sub edi, edx
mov edx, dword [0x453788]
sar edi, 1
mov dword [ebp - 0x40], edx
cmp edi, edx
ja 0x4048f1
lea eax, [edi + edi]
mov dword [0x453784], edi
cmp edx, 7
mov esi, 0x453774
push eax
cmova esi, dword [0x453774]
push ecx
push esi
call fcn.00422bc0
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
mov esi, dword [ebp - 0x24]
jmp 0x4049a9
cmp edi, 0x7ffffffe
ja 0x404b0b
mov eax, edi
or eax, 7
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x2c], eax
cmp eax, 0x7ffffffe
jbe 0x404916
mov eax, 0x7ffffffe
jmp 0x404941
mov eax, dword [ebp - 0x28]
mov ecx, edx
shr ecx, 1
sub eax, ecx
cmp edx, eax
jbe 0x40492a
mov eax, 0x7ffffffe
jmp 0x404941
mov ecx, edx
lea eax, [ebp - 0x30]
shr ecx, 1
add ecx, edx
lea edx, [ebp - 0x2c]
cmp dword [ebp - 0x38], ecx
mov dword [ebp - 0x30], ecx
cmovae eax, edx
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
push 0x453774
call fcn.00401740
mov ecx, dword [ebp - 0x2c]
mov dword [0x453788], ecx
lea ecx, [edi + edi]
push ecx
push dword [ebp - 0x3c]
mov dword [ebp - 0x30], eax
push eax
mov dword [0x453784], edi
call fcn.00422bc0
mov ecx, dword [ebp - 0x30]
xor eax, eax
add esp, 0x14
mov word [ecx + edi*2], ax
mov eax, dword [ebp - 0x40]
cmp eax, 7
jbe 0x4049a3
push eax
push dword [0x453774]
push 0x453774
call fcn.00403800
mov eax, dword [ebp - 0x30]
add esp, 0xc
mov dword [0x453774], eax
jmp 0x4049a9
mov dword [0x453774], ecx
push dword [ebp - 0x34]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xorps xmm0, xmm0
mov eax, 0x453774
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
cmp dword [0x453788], 7
mov edi, dword [0x453784]
cmova eax, dword [0x453774]
mov dword [ebp - 0x38], eax
cmp edi, 0x7ffffffe
ja 0x404b10
mov dword [esi + 0x14], 7
cmp edi, 7
ja 0x404a05
mov dword [esi + 0x10], edi
movups xmm0, xmmword [eax]
movups xmmword [esi], xmm0
jmp 0x404a70
mov ecx, dword [esi + 0x14]
mov edx, edi
or edx, 7
mov dword [ebp - 0x3c], edx
cmp edx, 0x7ffffffe
jbe 0x404a1f
mov eax, 0x7ffffffe
jmp 0x404a44
mov eax, ecx
shr eax, 1
sub dword [ebp - 0x28], eax
cmp ecx, dword [ebp - 0x28]
ja 0x404a18
mov esi, dword [ebp - 0x24]
mov eax, ecx
shr eax, 1
add eax, ecx
lea ecx, [ebp - 0x40]
cmp edx, eax
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x3c]
cmovae ecx, eax
mov eax, dword [ecx]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push esi
call fcn.00401740
mov ecx, dword [ebp - 0x24]
mov dword [esi + 0x14], ecx
lea ecx, [edi*2 + 2]
push ecx
push dword [ebp - 0x38]
mov dword [esi], eax
push eax
mov dword [esi + 0x10], edi
call fcn.00422bc0
add esp, 0x14
mov dword [ebp - 4], 0
mov dword [ebp - 0x44], 1
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00421ea0
mov esp, ebp
pop ebp
ret
push 0x45378c
call fcn.00421e3c
add esp, 4
cmp dword [0x45378c], 0xffffffff
jne 0x40485a
mov dword [ebp - 4], 1
xorps xmm0, xmm0
push 0
push 0x443408
mov ecx, 0x453774
mov dword [0x453784], 0
movups xmmword [0x453774], xmm0
mov dword [0x453788], 0
call fcn.00401950
push 0x4424a0
call fcn.00421bae
mov byte [ebp - 4], 0
push 0x45378c
call fcn.00421deb
add esp, 8
jmp 0x40485a
call fcn.004038e0
call fcn.004038e0
int3