Function at 0x561960
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57b4cb
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5d52e0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
mov eax, dword [eax - 0xc]
xor edi, edi
cmp eax, edi
je 0x561cb7
call fcn.0040c84f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x5619b4
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x14]
mov dword [ebp - 4], edi
push edx
mov ecx, esi
mov dword [ebp - 0x10], edi
call fcn.00532f00
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 0xc]
add esp, 8
cmp eax, edi
jne 0x561a07
mov eax, dword [esi]
cmp dword [eax - 0xc], edi
jge 0x5619f6
push 0x80070057
call fcn.004010a0
cmp word [eax], 0x40
je 0x561a3c
push esi
lea ecx, [ebp - 0x14]
call fcn.004015b0
jmp 0x561a3c
cmp dword [ebp - 0x10], edi
jne 0x561a3c
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x1c], 0xffffff
call fcn.0040da38
mov eax, dword [eax + 8]
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x18]
push edx
push 0x20
push 1
push 1
push 1
push eax
call dword [sym.imp.USER32.dll_CreateIcon]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x46c]
mov eax, dword [eax + 0x474]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], edi
cmp eax, edi
jle 0x561bf5
lea esp, [esp]
mov eax, ebx
test ebx, ebx
je 0x561f1e
mov esi, dword [eax + 8]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov ebx, dword [ebx]
mov edx, dword [eax + 0x10]
mov dword [ebp - 0x20], ebx
call edx
cmp dword [esi - 4], 0
lea ecx, [esi - 4]
jl 0x561a98
cmp eax, dword [esi - 0x10]
jne 0x561a98
lea edi, [esi - 0x10]
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x561ad0
mov ecx, dword [esi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x561c32
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
mov eax, dword [esi - 0xc]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.004ffad4
add esp, 0x10
add edi, 0x10
mov dword [ebp - 0x18], edi
mov byte [ebp - 4], 1
cmp dword [edi - 0xc], 0
jl 0x5619ec
cmp word [edi], 0x40
jne 0x561b7b
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x18]
call fcn.0052c750
add esp, 4
mov byte [ebp - 4], 2
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
cmp eax, esi
je 0x561b58
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x561b48
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x561b48
push eax
call fcn.00401a10
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x561b3d
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
lea edi, [ebx + 0x10]
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x18], edi
jmp 0x561b58
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x18]
call fcn.00401900
mov edi, dword [ebp - 0x18]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x561b7b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
je 0x5619aa
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x561bb7
test dx, dx
je 0x561bb3
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x561bb7
add eax, 4
add ecx, 4
test dx, dx
jne 0x561b91
xor eax, eax
jmp 0x561bbc
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
mov byte [ebp - 4], 0
test al, al
jne 0x561c37
lea eax, [edi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x561be5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 0x28]
jl 0x561a60
mov edi, dword [ebp + 0xc]
mov esi, dword [edi]
mov ecx, str._None
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x561cce
test dx, dx
je 0x561c2b
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x561cce
add eax, 4
add ecx, 4
test dx, dx
jne 0x561c01
xor eax, eax
jmp 0x561cd3
call fcn.00401ae0
add edi, 0xfffffff0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x561c53
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
cmp dword [ebp - 0x1c], 0
jl 0x561bf5
mov ecx, dword [ebp + 8]
push 0x1f60
call fcn.0041a9d4
test eax, eax
je 0x561c83
mov eax, dword [eax + 0x20]
test eax, eax
je 0x561c83
mov ecx, dword [ebp - 0x1c]
push 0
push ecx
push 0x186
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x561c91
push eax
call dword [sym.imp.USER32.dll_DestroyIcon]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x561cb7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x561d01
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x561ce5
push eax
call dword [sym.imp.USER32.dll_DestroyIcon]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x561cab
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0x460]
xor eax, eax
cmp ecx, 6
ja case.default.0x561d11
jmp dword [ecx*4 + 0x562160]
mov eax, 2
jmp case.default.0x561d11
mov eax, 1
jmp case.default.0x561d11
mov eax, 3
test al, 1
je 0x561e31
cmp dword [esi - 0xc], 0
jge 0x561d43
push 0x80070057
call fcn.004010a0
cmp word [esi], 0x40
je 0x561e31
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x561e31
lea ecx, [ebp - 0x18]
push ecx
mov ecx, edi
call fcn.0052c750
mov edx, dword [ebp - 0x18]
add esp, 4
push edx
call fcn.0052a9f0
add esp, 4
test al, al
jne 0x561de6
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x561d88
push eax
call dword [sym.imp.USER32.dll_DestroyIcon]
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x561da7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x561dcd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x9f401
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 0x18]
cmp dword [ecx - 0xc], 0xae
jle 0x561e29
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x561e00
push eax
call dword [sym.imp.USER32.dll_DestroyIcon]
lea ecx, [ebp - 0x18]
call fcn.00404b10
lea ecx, [ebp - 0x14]
call fcn.00404b10
mov eax, 0x97901
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea ecx, [ebp - 0x18]
call fcn.00404b10
mov ecx, dword [ebx + 0x460]
xor eax, eax
cmp ecx, 6
ja case.default.0x561e3e
jmp dword [ecx*4 + 0x56217c]
mov eax, 2
jmp case.default.0x561e3e
mov eax, 1
jmp case.default.0x561e3e
mov eax, 3
test al, 2
je 0x561ea7
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jge 0x561e6e
push 0x80070057
call fcn.004010a0
cmp word [eax], 0x40
je 0x561ea7
push eax
call dword [sym.imp.SHELL32.dll_PathIsExe]
test eax, eax
je 0x561ea7
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x561ea7
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x561e9a
push eax
call dword [sym.imp.USER32.dll_DestroyIcon]
lea ecx, [ebp - 0x14]
call fcn.00404b10
jmp 0x561cb7
cmp dword [ebp + 0x10], 0
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
je 0x561edb
push 0x1f60
mov ecx, ebx
call fcn.0041a9d4
test eax, eax
je 0x561edb
mov edx, dword [eax + 0x20]
push 0
push 0
push 0x18b
push edx
call edi
cmp eax, 0xa
jge 0x561cd7
mov esi, dword [ebx + 0x474]
mov dword [ebp + 0x10], esi
cmp esi, esi
jg 0x561f0e
jmp 0x561ef0
push 0x5a95c8
lea ecx, [ebx + 0x468]
call fcn.00417000
cmp dword [ebx + 0x474], esi
jle 0x561ef0
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push esi
lea ecx, [ebx + 0x468]
call fcn.00416c3e
test eax, eax
jne 0x561f23
call fcn.0040d0ac
mov esi, dword [ebp + 0xc]
push esi
lea ecx, [eax + 8]
call fcn.004015b0
mov ecx, dword [ebp - 0x14]
cmp dword [ecx - 0xc], 0
jne 0x561f88
push 0x1f60
mov ecx, ebx
xor esi, esi
call fcn.0041a9d4
test eax, eax
je 0x561f59
mov edx, dword [eax + 0x20]
push esi
push esi
push 0x18b
push edx
call edi
mov esi, eax
push 0x1f60
mov ecx, ebx
call fcn.0041a9d4
test eax, eax
je 0x561cd7
mov eax, dword [eax + 0x20]
test eax, eax
je 0x561cd7
push 0
push esi
push 0x186
push eax
call edi
jmp 0x561cd7
lea edi, [ebx + 0x484]
lea eax, [ebp + 0x10]
call fcn.00403640
mov eax, dword [ebx + 0x494]
mov eax, dword [eax + 4]
push eax
call fcn.0040da38
mov ecx, dword [eax + 0x78]
mov ecx, dword [ecx]
call fcn.00401fe0
mov edi, eax
mov eax, dword [esi]
mov ecx, str._Evernote
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x561fde
test dx, dx
je 0x561fda
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x561fde
add eax, 4
add ecx, 4
test dx, dx
jne 0x561fb8
xor eax, eax
jmp 0x561fe3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x562063
lea edx, [ebp + 0xc]
push 0x259
push edx
mov dword [ebp + 0xc], eax
call fcn.0052b8f0
mov eax, dword [ebx + 0x494]
mov eax, dword [eax + 4]
add esp, 8
push eax
call fcn.0040da38
mov eax, dword [eax + 0x78]
mov ecx, dword [eax]
call fcn.00401fe0
cmp edi, eax
jge 0x56203d
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004188f6
mov edx, dword [ebx + 0x494]
push edi
push edx
call fcn.00402a40
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, dword [ebp - 0x10]
jmp 0x5620ad
mov eax, dword [ebp + 0xc]
push eax
call fcn.004188f6
mov ecx, dword [ebx + 0x494]
push 0
push eax
call fcn.00402a00
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, dword [ebp - 0x10]
jmp 0x5620ad
mov eax, dword [ebx + 0x494]
mov eax, dword [eax + 4]
push eax
call fcn.0040da38
mov edx, dword [eax + 0x78]
mov ecx, dword [edx]
call fcn.00401fe0
mov esi, dword [ebp - 0x10]
cmp edi, eax
mov eax, dword [ebx + 0x494]
mov eax, dword [eax + 4]
push esi
jge 0x56209b
push edi
push eax
call fcn.0040da38
mov eax, dword [eax + 0x78]
mov ecx, dword [eax]
jmp 0x5620a8
push 0xffffffffffffffff
push eax
call fcn.0040da38
mov ecx, dword [eax + 0x78]
mov ecx, dword [ecx]
call fcn.00402290
test esi, esi
je 0x5620b8
push esi
call dword [sym.imp.USER32.dll_DestroyIcon]
push 0x1f60
mov ecx, ebx
call fcn.0041a9d4
mov esi, eax
test esi, esi
je 0x5620f6
cmp dword [esi + 0x20], 0
je 0x5620f6
mov eax, dword [ebp - 0x14]
push edi
push ecx
add eax, 0xfffffff0
mov dword [ebp + 0x10], esp
mov ebx, esp
push eax
call fcn.00401a10
add esp, 4
add eax, 0x10
push edi
mov ecx, esi
mov dword [ebx], eax
call fcn.00544790
mov ebx, dword [ebp + 8]
push 0x1f60
mov ecx, ebx
call fcn.0041a9d4
test eax, eax
je 0x56211c
mov eax, dword [eax + 0x20]
test eax, eax
je 0x56211c
push 0
push edi
push 0x186
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
push ebx
call fcn.005609f0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x562148
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc