Function at 0x478850
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 esi, ecx
mov dword [ebp - 0x14], esi
lea eax, [ebp]
mov dword [ebp - 0x1c], esi
push eax
push 0x104
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x478909
call fcn.0040d266
mov ecx, eax
test ecx, ecx
je 0x478ac6
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x534850
jne 0x478ad0
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
lea ecx, [eax + 0x10]
mov dword [esi], ecx
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.004da696
lea esp, [ebp + 0x20c]
pop ebp
ret
cmp word [ebp + eax*2 - 2], 0x5c
je 0x47891c
mov ecx, 0x5c
mov word [ebp + eax*2], cx
inc eax
add eax, eax
cmp eax, 0x208
jae 0x478b0e
xor ecx, ecx
mov word [ebp + eax], cx
call fcn.0040d266
mov ecx, eax
test ecx, ecx
je 0x478ad7
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x534850
jne 0x478ae1
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 4], 2
lea eax, [ebp]
test eax, 0xffff0000
jne 0x47897c
movzx eax, ax
mov ecx, esi
push eax
call fcn.0040d4c8
jmp 0x4788d6
push eax
call fcn.004e07a4
mov edi, dword [esi]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x478a17
lea ecx, [edi - 0x10]
mov ebx, dword [ecx]
cmp dword [ecx + 4], eax
je 0x4788d6
cmp dword [ecx + 0xc], eax
lea edx, [ecx + 0xc]
jge 0x4789bf
cmp dword [edi - 8], eax
jl 0x478ae8
mov dword [edi - 0xc], eax
xor ecx, ecx
mov eax, dword [esi]
mov word [eax], cx
jmp 0x4788d6
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x4789ec
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, 0x534850
jne 0x478af2
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 0x478afb
lock inc dword [ebx + 0x14]
lea eax, [ebx + 8]
add eax, 0x10
mov dword [esi], eax
jmp 0x4788d6
add eax, 0x10
mov dword [esi], eax
jmp 0x4788d6
mov eax, dword [edi - 0xc]
lea edx, [ebp]
sub edx, edi
mov dword [ebp - 0x14], eax
sar edx, 1
mov dword [ebp - 0x18], edx
test ebx, ebx
js 0x478b04
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, ebx
or eax, ecx
jge 0x478a4d
push ebx
mov ecx, esi
call fcn.0040d637
mov edi, dword [esi]
mov edx, dword [ebp - 0x18]
lea ecx, [ebx + ebx]
mov eax, dword [edi - 8]
cmp edx, dword [ebp - 0x14]
ja 0x478a9a
lea edx, [edi + edx*2]
test ecx, ecx
je 0x478aaf
test edx, edx
jne 0x478a75
call fcn.004e08d4
mov dword [eax], 0x16
call fcn.004e0744
jmp 0x478aac
add eax, eax
cmp eax, ecx
jae 0x478a8d
call fcn.004e08d4
mov dword [eax], 0x22
call fcn.004e0744
jmp 0x478aac
push ecx
push edx
push edi
call fcn.004dc330
add esp, 0xc
jmp 0x478aac
push ecx
lea ecx, [ebp]
push ecx
lea edx, [eax + eax]
mov ecx, edi
call fcn.0040d710
add esp, 8
lea ecx, [ebx + ebx]
mov eax, dword [esi]
cmp ebx, dword [eax - 8]
jg 0x478ae8
mov dword [eax - 0xc], ebx
xor edx, edx
mov eax, dword [esi]
mov word [ecx + eax], dx
jmp 0x4788d6
push 0x80004005
call fcn.0040d795
call edx
jmp 0x4788d1
push 0x80004005
call fcn.0040d795
call edx
jmp 0x478956
push 0x80070057
call fcn.0040d795
mov ecx, edx
call edi
jmp 0x4789ec
mov ecx, ebx
call edx
jmp 0x478a0d
push 0x80070057
call fcn.0040d795
call fcn.004daeef
int3