Function at 0x495980
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a56f7
mov eax, dword fs:[0]
push eax
sub esp, 0x21c
mov eax, dword [0x639354]
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, ecx
mov eax, dword fs:[0x2c]
mov edx, dword [0x643da0]
mov edx, dword [eax + edx*4]
mov eax, dword [0x641fa4]
cmp eax, dword [edx + 4]
jg 0x495c0e
cmp dword [0x613578], 0
je 0x495bee
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00560a80
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x26
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x5c0508
lea eax, [esi + 0x10]
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.00429810
push str.wpscloudsvr.exe
push eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 0
push eax
call fcn.00429810
add esp, 0x18
mov edx, dword [eax]
mov ecx, edx
mov byte [ebp - 4], 1
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x495a41
sub ecx, esi
sar ecx, 1
push ecx
push edx
mov ecx, 0x613518
call fcn.0042e330
mov edx, dword [ebp - 0x21c]
or esi, 0xffffffff
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x495a7c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x220]
mov eax, esi
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x495aa0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00429250
mov ecx, eax
test ecx, ecx
je 0x495c44
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 2
test eax, 0xffff0000
jne 0x495ae2
movzx eax, ax
lea ecx, [ebp - 0x21c]
push eax
call fcn.00429d90
jmp 0x495b12
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
jmp 0x495af0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x495af0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x21c]
call fcn.0042a060
push str.Kingsoftoffice6_
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 3
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.00429810
push str.wpscloudsvr.exe
push eax
lea eax, [ebp - 0x224]
mov byte [ebp - 4], 4
push eax
call fcn.00429810
add esp, 0x18
mov edx, dword [eax]
mov ecx, edx
mov byte [ebp - 4], 5
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x495b55
sub ecx, edi
sar ecx, 1
push ecx
push edx
mov ecx, 0x613530
call fcn.0042e330
mov edx, dword [ebp - 0x224]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x495b8d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x228]
mov eax, esi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x495baa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x495bcc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0xe
push str.InstallService
mov ecx, 0x613548
call fcn.0042e330
push 0x10
push str.UninstallService
mov ecx, 0x613560
call fcn.0042e330
mov eax, 0x613518
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.0055c3a9
mov esp, ebp
pop ebp
ret
push 0x641fa4
call fcn.0055c868
add esp, 4
cmp dword [0x641fa4], 0xffffffff
jne 0x4959cf
push 0x5b4920
call fcn.0055cb7a
push 0x641fa4
call fcn.0055c81e
add esp, 8
jmp 0x4959cf
push 0x80004005
call fcn.00429b60
int3