Function at 0x14000f660
Capabilities:
Check if file exists

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x4b8]
sub rsp, 0x5b8
mov rax, qword [0x140092060]
xor rax, rsp
mov qword [rbp + 0x4a0], rax
mov dword [rsp + 0x30], r9d
mov r14, r8
mov rbx, rdx
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x58], r8
mov rcx, r8
cmp qword [r8 + 0x18], 8
jb 0x14000f6b4
mov rcx, qword [r8]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x14000f7da
mov edx, 0x5c
lea rdi, str.C:Usersleonard_tsaiDesktopASUS_ProjAsusOLEDShifterAsusOLEDShifterAsusOLEDShifterOLEDShifterManager.cpp
mov rcx, rdi
call fcn.140044830
test rax, rax
je 0x14000f6ec
mov edx, 0x5c
mov rcx, rdi
call fcn.140044830
lea rdi, [rax + 1]
lea rax, str.Output_image_exists
mov qword [rsp + 0x20], rax
mov r9d, 1
lea r8, str.ProcessingWallpaper
mov edx, 0x206
mov rcx, rdi
call fcn.140004920
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x14000f752
mov rcx, qword [rbx]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x14000f74d
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000ff42
mov rcx, r8
call fcn.140042ba4
xor esi, esi
mov qword [rbx + 0x10], rsi
mov qword [rbx + 0x18], 7
mov word [rbx], si
mov rdx, qword [r14 + 0x18]
cmp rdx, 8
jb 0x14000f7a2
lea rdx, [rdx*2 + 2]
mov rcx, qword [r14]
cmp rdx, 0x1000
jb 0x14000f79d
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000ff30
mov rcx, r8
call fcn.140042ba4
mov eax, 1
mov qword [r14 + 0x10], rsi
mov qword [r14 + 0x18], 7
mov word [r14], si
mov rcx, qword [rbp + 0x4a0]
xor rcx, rsp
call fcn.140042660
add rsp, 0x5b8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rcx, rbx
cmp qword [rbx + 0x18], 8
jb 0x14000f7e7
mov rcx, qword [rbx]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14000f8ec
lea edx, [rax + 0x5c]
lea rdi, str.C:Usersleonard_tsaiDesktopASUS_ProjAsusOLEDShifterAsusOLEDShifterAsusOLEDShifterOLEDShifterManager.cpp
mov rcx, rdi
call fcn.140044830
test rax, rax
je 0x14000f81d
mov edx, 0x5c
mov rcx, rdi
call fcn.140044830
lea rdi, [rax + 1]
mov rax, rbx
cmp qword [rbx + 0x18], 8
jb 0x14000f82a
mov rax, qword [rbx]
mov qword [rsp + 0x28], rax
lea rax, str.Source_image_not_exists:__s
mov qword [rsp + 0x20], rax
mov r9d, 2
lea r8, str.ProcessingWallpaper
mov edx, 0x20c
mov rcx, rdi
call fcn.140004920
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x14000f895
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
mov rcx, qword [rbx]
jb 0x14000f890
mov r8, qword [rcx - 8]
sub rcx, r8
add rdx, 0x27
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000ff42
mov rcx, r8
call fcn.140042ba4
xor esi, esi
mov qword [rbx + 0x10], rsi
mov qword [rbx + 0x18], 7
mov word [rbx], si
mov rdx, qword [r14 + 0x18]
cmp rdx, 8
jb 0x14000f8e5
lea rdx, [rdx*2 + 2]
mov rcx, qword [r14]
cmp rdx, 0x1000
jb 0x14000f8e0
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000ff30
mov rcx, r8
call fcn.140042ba4
xor eax, eax
jmp 0x14000f7a7
xor edx, edx
mov r8d, 0x110
lea rcx, [rsp + 0x60]
call fcn.140045200
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x14000f90b
mov rdx, qword [rbx]
lea rcx, [rsp + 0x60]
call fcn.140012770
nop
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
test byte [rsp + rcx + 0x70], 6
je 0x14000f9fe
mov edx, 0x5c
lea rdi, str.C:Usersleonard_tsaiDesktopASUS_ProjAsusOLEDShifterAsusOLEDShifterAsusOLEDShifterOLEDShifterManager.cpp
mov rcx, rdi
call fcn.140044830
test rax, rax
je 0x14000f954
mov edx, 0x5c
mov rcx, rdi
call fcn.140044830
lea rdi, [rax + 1]
mov rax, rbx
cmp qword [rbx + 0x18], 8
jb 0x14000f961
mov rax, qword [rbx]
mov qword [rsp + 0x28], rax
lea rax, str.Open_file_failed:__s
mov qword [rsp + 0x20], rax
mov r9d, 2
lea r8, str.ProcessingWallpaper
mov edx, 0x214
mov rcx, rdi
call fcn.140004920
nop
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], rax
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x5c], edx
lea rcx, [rsp + 0x70]
call fcn.140012460
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], rax
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x5c], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x10], rax
lea rcx, [rbp + 0x10]
call fcn.140021000
nop
jmp 0x14000f856
xor edx, edx
mov r8d, 0x3b8
lea rcx, [rbp + 0xe0]
call fcn.140045200
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0xe0]
call fcn.140014d90
nop
lea rdi, str.C:Usersleonard_tsaiDesktopASUS_ProjAsusOLEDShifterAsusOLEDShifterAsusOLEDShifterOLEDShifterManager.cpp
mov r15d, 2
cmp dword [rbp + 0xe0], 0
jne 0x14000fa82
lea edx, [r15 + 0x5a]
mov rcx, rdi
call fcn.140044830
test rax, rax
je 0x14000fa5c
lea edx, [r15 + 0x5a]
mov rcx, rdi
call fcn.140044830
inc rax
jmp 0x14000fa5f
mov rax, rdi
lea rcx, str.error:_no_EXIF_or_XMP_metadata_
mov qword [rsp + 0x20], rcx
mov r9d, r15d
lea r8, str.ProcessingWallpaper
mov edx, 0x21a
mov rcx, rax
call fcn.140004920
movzx eax, word [rbp + 0x178]
dec eax
xor esi, esi
cmp eax, 7
ja case.0x14000faa5.1
cdqe
lea rdx, [0x140000000]
mov ecx, dword [rdx + rax*4 + 0xff48]
add rcx, rdx
jmp rcx
mov r15d, 4
jmp case.0x14000faa5.3
mov r15d, 6
jmp case.0x14000faa5.3
mov r15d, 5
jmp case.0x14000faa5.3
mov r15d, 1
jmp case.0x14000faa5.3
mov r15d, 7
jmp case.0x14000faa5.3
mov r15d, 3
jmp case.0x14000faa5.3
mov r15d, esi
mov r13, rbx
cmp qword [rbx + 0x18], 8
jb 0x14000fae7
mov r13, qword [rbx]
mov ecx, 0x18
call qword [sym.imp.gdiplus.dll_GdipAlloc]
mov r12, rax
test rax, rax
je 0x14000fb21
mov qword [rax + 0x10], rsi
lea rax, vtable.Gdiplus::Image.0
mov qword [r12], rax
lea rdx, [r12 + 8]
mov qword [rdx], rsi
mov rcx, r13
call qword [sym.imp.gdiplus.dll_GdipLoadImageFromFile]
mov dword [r12 + 0x10], eax
jmp 0x14000fb24
mov r12, rsi
mov edx, r15d
mov rcx, qword [r12 + 8]
call qword [sym.imp.gdiplus.dll_GdipImageRotateFlip]
test eax, eax
je 0x14000fb3b
mov dword [r12 + 0x10], eax
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x80], xmm0
mov qword [rbp + 0x90], rax
mov dword [rbp + 0x74], esi
lea rdx, [rbp + 0x74]
mov rcx, qword [r12 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageHeight]
test eax, eax
je 0x14000fb69
mov dword [r12 + 0x10], eax
mov r15d, dword [rbp + 0x74]
mov dword [rbp + 0x70], esi
lea rdx, [rbp + 0x70]
mov rcx, qword [r12 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageWidth]
test eax, eax
je 0x14000fb88
mov dword [r12 + 0x10], eax
lea rax, vtable.Gdiplus::Bitmap.0
mov qword [rbp + 0x80], rax
mov qword [rsp + 0x48], rsi
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
mov r9d, 0x26200a
xor r8d, r8d
mov edx, r15d
mov ecx, dword [rbp + 0x70]
call qword [sym.imp.gdiplus.dll_GdipCreateBitmapFromScan0]
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0x48]
mov qword [rbp + 0x88], rax
xorps xmm0, xmm0
movups xmmword [rbp + 0x98], xmm0
mov qword [rsp + 0x40], rsi
lea rdx, [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.gdiplus.dll_GdipGetImageGraphicsContext]
mov r13d, eax
mov rax, qword [rsp + 0x40]
mov qword [rbp + 0x98], rax
mov edx, 0xff000000
mov rcx, rax
call qword [sym.imp.gdiplus.dll_GdipGraphicsClear]
test eax, eax
cmovne r13d, eax
mov dword [rbp + 0x74], esi
lea rdx, [rbp + 0x74]
mov rcx, qword [r12 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageHeight]
test eax, eax
je 0x14000fc2a
mov dword [r12 + 0x10], eax
mov r15d, dword [rbp + 0x74]
mov dword [rbp + 0x70], esi
lea rdx, [rbp + 0x70]
mov rcx, qword [r12 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageWidth]
test eax, eax
je 0x14000fc49
mov dword [r12 + 0x10], eax
movsxd rcx, dword [rsp + 0x30]
mov rax, qword [rsp + 0x38]
mov rax, qword [rax + 0x288]
mov r9d, dword [rax + rcx*8 + 4]
mov r8d, dword [rax + rcx*8]
mov dword [rsp + 0x28], r15d
mov eax, dword [rbp + 0x70]
mov dword [rsp + 0x20], eax
mov rdx, qword [r12 + 8]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.gdiplus.dll_GdipDrawImageRectI]
test eax, eax
cmovne r13d, eax
mov dword [rbp + 0xa0], r13d
mov dword [rbp + 0x74], esi
mov dword [rbp + 0x70], esi
lea rdx, [rbp + 0x70]
lea rcx, [rbp + 0x74]
call qword [sym.imp.gdiplus.dll_GdipGetImageEncodersSize]
mov eax, dword [rbp + 0x70]
test eax, eax
je 0x14000fd37
mov ecx, eax
call fcn.1400505b8
mov r15, rax
test rax, rax
je 0x14000fd37
mov r8, rax
mov edx, dword [rbp + 0x70]
mov ecx, dword [rbp + 0x74]
call qword [sym.imp.gdiplus.dll_GdipGetImageEncoders]
mov r8d, esi
mov r10d, dword [rbp + 0x74]
test r10d, r10d
je 0x14000fd2f
lea r11, str.image_jpeg
mov r9d, r8d
imul rax, r9, 0x68
mov rdx, qword [rax + r15 + 0x40]
mov rax, 0xffffffffffffffff
movzx ecx, word [rdx + rax*2 + 2]
cmp cx, word [r11 + rax*2 + 2]
jne 0x14000fd15
add rax, 2
cmp rax, 0xb
je 0x14000fd1f
movzx ecx, word [rdx + rax*2]
cmp cx, word [r11 + rax*2]
je 0x14000fcf3
inc r8d
cmp r8d, r10d
jae 0x14000fd2f
jmp 0x14000fce0
imul rax, r9, 0x68
movups xmm0, xmmword [rax + r15]
movups xmmword [rbp + 0xd0], xmm0
mov rcx, r15
call fcn.140050050
mov dword [rbp + 0x78], 0x64
mov dword [rbp + 0xa8], 1
movups xmm0, xmmword [0x140076c30]
movups xmmword [rbp + 0xb0], xmm0
mov dword [rbp + 0xc4], 4
mov dword [rbp + 0xc0], 1
lea rax, [rbp + 0x78]
mov qword [rbp + 0xc8], rax
mov rdx, r14
cmp qword [r14 + 0x18], 8
jb 0x14000fd82
mov rdx, qword [r14]
lea r9, [rbp + 0xa8]
lea r8, [rbp + 0xd0]
mov r15, qword [rsp + 0x48]
mov rcx, r15
call qword [sym.imp.gdiplus.dll_GdipSaveImageToFile]
test eax, eax
mov ecx, dword [rsp + 0x34]
cmovne ecx, eax
mov dword [rbp + 0x90], ecx
mov rax, qword [r12]
mov edx, 1
mov rcx, r12
call qword [rax]
mov edx, 0x5c
mov rcx, rdi
call fcn.140044830
test rax, rax
je 0x14000fdde
mov edx, 0x5c
mov rcx, rdi
call fcn.140044830
lea rdi, [rax + 1]
mov rax, r14
cmp qword [r14 + 0x18], 8
jb 0x14000fdeb
mov rax, qword [r14]
mov qword [rsp + 0x28], rax
lea rax, str.Output_image_save_succeeded:__s
mov qword [rsp + 0x20], rax
mov r9d, 1
lea r8, str.ProcessingWallpaper
mov edx, 0x257
mov rcx, rdi
call fcn.140004920
nop
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.gdiplus.dll_GdipDeleteGraphics]
nop
mov rcx, r15
call qword [sym.imp.gdiplus.dll_GdipDisposeImage]
nop
lea rcx, [rbp + 0xe0]
call fcn.140010010
nop
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], rax
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x5c], edx
lea rcx, [rsp + 0x70]
call fcn.140012460
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], rax
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x5c], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x10], rax
lea rcx, [rbp + 0x10]
call fcn.140021000
nop
mov rdx, qword [rbx + 0x18]
cmp rdx, 8
jb 0x14000fee1
mov rcx, qword [rbx]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x14000fedc
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000ff3c
mov rcx, r8
call fcn.140042ba4
mov qword [rbx + 0x10], rsi
mov qword [rbx + 0x18], 7
mov word [rbx], si
mov rdx, qword [r14 + 0x18]
cmp rdx, 8
jb 0x14000f7a2
lea rdx, [rdx*2 + 2]
mov rcx, qword [r14]
cmp rdx, 0x1000
jb 0x14000f79d
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14000ff36
jmp 0x14000f79a
call fcn.1400494f8
int3
call fcn.1400494f8
nop
call fcn.1400494f8
int3
call fcn.1400494f8
int3