Function at 0x476ee0
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xffffffffffffffff
push 0x509a39
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x570074]
xor eax, ebp
mov dword [ebp + 0x208], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
push 0
push 0x25
lea eax, [ebp]
mov dword [ebp - 0x18], esi
push eax
push 0
mov dword [ebp - 0x10], 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4770f0
call fcn.0040cc51
mov ecx, eax
test ecx, ecx
jne 0x476f55
push 0x80004005
call fcn.0040d173
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x528840
jne 0x476f6a
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x476f6c
call edx
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 4], 1
lea eax, [ebp]
test eax, 0xffff0000
jne 0x476f92
movzx eax, ax
mov ecx, esi
push eax
call fcn.0040ceac
jmp 0x4770ee
push eax
call fcn.004d5c34
mov edi, eax
add esp, 4
mov eax, dword [esi]
test edi, edi
jne 0x47703c
cmp dword [eax - 0xc], 0
lea ecx, [eax - 0x10]
mov edi, dword [ecx]
je 0x4770ee
cmp dword [ecx + 0xc], 0
lea edx, [ecx + 0xc]
jge 0x476fe2
cmp dword [eax - 8], 0
jge 0x476fcf
push 0x80070057
call fcn.0040d173
mov dword [eax - 0xc], 0
xor ecx, ecx
mov eax, dword [esi]
mov word [eax], cx
jmp 0x4770ee
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x477011
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
cmp eax, 0x528840
jne 0x47700d
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x477011
mov ecx, edx
call ebx
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
cmp eax, 0x528840
jne 0x47702e
lock inc dword [edi + 0x14]
lea eax, [edi + 8]
add eax, 0x10
mov dword [esi], eax
jmp 0x4770ee
mov ecx, edi
call edx
add eax, 0x10
mov dword [esi], eax
jmp 0x4770ee
mov ecx, dword [eax - 0xc]
lea ebx, [ebp]
sub ebx, eax
mov dword [ebp - 0x14], ecx
sar ebx, 1
test edi, edi
jns 0x477057
push 0x80070057
call fcn.0040d173
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, edi
or eax, ecx
jge 0x477070
push edi
mov ecx, esi
call fcn.0040d01b
mov ecx, dword [esi]
cmp ebx, dword [ebp - 0x14]
ja 0x4770c3
mov eax, dword [ecx - 8]
lea edx, [ecx + ebx*2]
lea ebx, [edi + edi]
test ebx, ebx
je 0x4770d8
test ecx, ecx
jne 0x47709a
call fcn.004d5d64
mov dword [eax], 0x16
call fcn.004d5bd4
jmp 0x4770d8
test edx, edx
je 0x477088
add eax, eax
cmp eax, ebx
jae 0x4770b6
call fcn.004d5d64
mov dword [eax], 0x22
call fcn.004d5bd4
jmp 0x4770d8
push ebx
push edx
push ecx
call fcn.004d1e90
add esp, 0xc
jmp 0x4770d8
mov edx, dword [ecx - 8]
lea ebx, [edi + edi]
lea eax, [ebp]
add edx, edx
push ebx
push eax
call fcn.0040d0ee
add esp, 8
mov eax, dword [esi]
cmp edi, dword [eax - 8]
jg 0x476fc5
mov dword [eax - 0xc], edi
xor eax, eax
mov ecx, dword [esi]
mov word [ebx + ecx], ax
jmp 0x477121
call fcn.0040cc51
mov ecx, eax
test ecx, ecx
jne 0x477105
push 0x80004005
call fcn.0040d173
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x528840
jne 0x47711a
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x47711c
call edx
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 1
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.004d0217
lea esp, [ebp + 0x20c]
pop ebp
ret