Function at 0x587840
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b01f9
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push esi
push edi
mov eax, dword [0x614040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov esi, ecx
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0
call fcn.00414eab
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x587898
push 0x80004005
call fcn.00402740
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 4], 0
mov ecx, dword [edi]
mov dword [ebp - 0x14], 1
cmp dword [ecx - 0xc], 0
jge 0x5878c2
push 0x80070057
call fcn.00402740
cmp word [ecx], 0x40
jne 0x587aa9
mov eax, str._Evernote
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x5878f7
test dx, dx
je 0x5878f3
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x5878f7
add ecx, 4
add eax, 4
test dx, dx
jne 0x5878d1
xor eax, eax
jmp 0x5878fc
sbb eax, eax
or eax, 1
test eax, eax
jne 0x587933
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_PathsEvernote.exe
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x587b1c
mov edx, 0x5e7af0
jmp 0x587a1e
push str._DropBox
push edi
call fcn.00403c30
add esp, 8
test al, al
je 0x5879c2
mov eax, dword [esi]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or ecx, eax
jge 0x587967
push 0x104
mov ecx, esi
call fcn.00402c20
push 0x104
push dword [esi]
push str._USERPROFILE_DropBox
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov eax, dword [esi]
test eax, eax
jne 0x587983
xor ecx, ecx
jmp 0x587999
push dword [eax - 8]
push eax
call fcn.00528e42
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x5878b8
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x5878b8
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [esi]
mov word [eax + ecx*2], dx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str._OneDrive
push edi
call fcn.00403c30
add esp, 8
test al, al
je 0x587a43
mov edx, esi
mov ecx, 0x5e793c
call fcn.00585a10
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
jne 0x587b1c
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 0x20019
push 0
push str.SoftwareMicrosoftOneDriveAccountsPersonal
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x587b1c
mov edx, str.Userfolder
push esi
call fcn.00589660
add esp, 4
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str._Box_Sync
push edi
call fcn.00403c30
add esp, 8
test al, al
je 0x587b1c
mov eax, dword [esi]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or ecx, eax
jge 0x587a7b
push 0x104
mov ecx, esi
call fcn.00402c20
push 0x104
push dword [esi]
push str._USERPROFILE_Box_Sync
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0xffffffffffffffff
mov ecx, esi
call fcn.00403da0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, str.AdobeDC
mov edi, edi
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x587ad6
test dx, dx
je 0x587ad2
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x587ad6
add ecx, 4
add eax, 4
test dx, dx
jne 0x587ab0
xor eax, eax
jmp 0x587adb
sbb eax, eax
or eax, 1
test eax, eax
sete al
test al, al
je 0x587b1c
lea ecx, [ebp - 0x10]
call fcn.005842a0
push eax
mov ecx, esi
mov dword [ebp - 4], 1
call fcn.004032d0
mov byte [ebp - 4], 0
or ecx, 0xffffffff
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x587b1c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret