Function at 0x47b810
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xffffffffffffffff
push 0x515369
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x57d074]
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 edi, ecx
mov dword [ebp - 0x14], edi
push 0
push 0x25
lea eax, [ebp]
mov dword [ebp - 0x1c], edi
push eax
push 0
mov dword [ebp - 0x10], 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov esi, eax
call fcn.0040d266
mov ecx, eax
test esi, esi
je 0x47ba02
test ecx, ecx
je 0x47ba59
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x534850
jne 0x47ba63
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
add eax, 0x10
mov dword [edi], eax
mov dword [ebp - 4], 1
lea eax, [ebp]
test eax, 0xffff0000
jne 0x47b8be
movzx eax, ax
mov ecx, edi
push eax
call fcn.0040d4c8
jmp 0x47ba00
push eax
call fcn.004e07a4
mov esi, dword [edi]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x47b959
lea ecx, [esi - 0x10]
mov ebx, dword [ecx]
cmp dword [ecx + 4], eax
je 0x47ba00
cmp dword [ecx + 0xc], eax
lea edx, [ecx + 0xc]
jge 0x47b901
cmp dword [esi - 8], eax
jl 0x47ba6a
mov dword [esi - 0xc], eax
xor ecx, ecx
mov eax, dword [edi]
mov word [eax], cx
jmp 0x47ba00
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x47b92e
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, 0x534850
jne 0x47ba74
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
cmp eax, 0x534850
jne 0x47ba7d
lock inc dword [ebx + 0x14]
lea eax, [ebx + 8]
add eax, 0x10
mov dword [edi], eax
jmp 0x47ba00
add eax, 0x10
mov dword [edi], eax
jmp 0x47ba00
mov eax, dword [esi - 0xc]
lea edx, [ebp]
sub edx, esi
mov dword [ebp - 0x14], eax
sar edx, 1
mov dword [ebp - 0x18], edx
test ebx, ebx
js 0x47ba86
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x47b98f
push ebx
mov ecx, edi
call fcn.0040d637
mov esi, dword [edi]
mov edx, dword [ebp - 0x18]
lea ecx, [ebx + ebx]
mov eax, dword [esi - 8]
cmp edx, dword [ebp - 0x14]
ja 0x47b9dc
lea edx, [esi + edx*2]
test ecx, ecx
je 0x47b9ee
test edx, edx
jne 0x47b9b7
call fcn.004e08d4
mov dword [eax], 0x16
call fcn.004e0744
jmp 0x47b9ee
add eax, eax
cmp eax, ecx
jae 0x47b9cf
call fcn.004e08d4
mov dword [eax], 0x22
call fcn.004e0744
jmp 0x47b9ee
push ecx
push edx
push esi
call fcn.004dc330
add esp, 0xc
jmp 0x47b9ee
push ecx
lea ecx, [ebp]
push ecx
lea edx, [eax + eax]
mov ecx, esi
call fcn.0040d710
add esp, 8
mov eax, dword [edi]
cmp ebx, dword [eax - 8]
jg 0x47ba6a
mov dword [eax - 0xc], ebx
xor eax, eax
mov ecx, dword [edi]
mov word [ecx + ebx*2], ax
jmp 0x47ba26
test ecx, ecx
je 0x47ba90
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x534850
jne 0x47ba9a
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
add eax, 0x10
mov dword [edi], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 1
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 + 0x208]
xor ecx, ebp
call fcn.004da696
lea esp, [ebp + 0x20c]
pop ebp
ret
push 0x80004005
call fcn.0040d795
call edx
jmp 0x47b898
push 0x80070057
call fcn.0040d795
mov ecx, edx
call esi
jmp 0x47b92e
mov ecx, ebx
call edx
jmp 0x47b94f
push 0x80070057
call fcn.0040d795
push 0x80004005
call fcn.0040d795
call edx
jmp 0x47ba21