Function at 0x140108a90
Capabilities:
Check if file exists

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, 0x110
mov qword [rbp - 0x10], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov edi, r9d
mov rsi, r8
mov r14, rdx
xor r12d, r12d
mov dword [rbp - 0x50], r12d
lea ecx, [r12 + 0x18]
call qword [sym.imp.gdiplus.dll_GdipAlloc]
mov rbx, rax
mov qword [rbp + 0x50], rax
lea r8, vtable.Gdiplus::Bitmap.0
test rax, rax
je 0x140108b2b
mov rax, qword [rbp + 0x70]
mov edx, dword [rax + 0xc]
sub edx, dword [rax + 4]
mov ecx, dword [rax + 8]
sub ecx, dword [rax]
mov qword [rbx], r8
mov qword [rbp - 0x20], r12
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
mov r9d, 0x26200a
xor r8d, r8d
call qword [sym.imp.gdiplus.dll_GdipCreateBitmapFromScan0]
mov dword [rbx + 0x10], eax
mov rax, qword [rbp - 0x20]
mov qword [rbx + 8], rax
jmp 0x140108b2e
mov rbx, r12
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x80], xmm0
mov rdx, rbx
lea rcx, [rbp - 0x80]
call fcn.1400e2a70
nop
mov r13, qword [rbp - 0x80]
test r13, r13
jne 0x140108b9d
mov qword [r14], r12
mov qword [r14 + 8], r12
mov dword [rbp - 0x50], 1
mov rcx, qword [rbp - 0x78]
test rcx, rcx
je 0x140108b95
mov edi, 0xffffffff
mov eax, edi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140108b95
mov rbx, qword [rbp - 0x78]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jne 0x140108b95
mov rcx, qword [rbp - 0x78]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rax, r14
jmp 0x1401093e4
mov qword [rsp + 0x78], r12
lea rdx, [rsp + 0x78]
mov rcx, qword [r13 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageGraphicsContext]
mov r15d, eax
mov rbx, qword [rsp + 0x78]
mov qword [rbp - 0x30], rbx
mov ecx, 1
call qword [sym.imp.USER32.dll_GetSysColor]
movzx r8d, al
or r8d, 0xffffff00
shl r8d, 8
movzx ecx, ax
shr ecx, 8
or ecx, r8d
shl ecx, 8
shr eax, 0x10
movzx eax, al
or ecx, eax
lea rax, vtable.Gdiplus::SolidBrush.0
mov qword [rbp - 8], rax
mov qword [rbp - 0x48], r12
lea rdx, [rbp - 0x48]
call qword [sym.imp.gdiplus.dll_GdipCreateSolidFill]
mov dword [rbp + 8], eax
mov r12, qword [rbp - 0x48]
mov qword [rbp], r12
mov dword [rbp - 0x70], 0
lea rdx, [rbp - 0x70]
mov rcx, qword [r13 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageHeight]
test eax, eax
je 0x140108c2c
mov dword [r13 + 0x10], eax
mov dword [rbp - 0x6c], 0
lea rdx, [rbp - 0x6c]
mov rcx, qword [r13 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageWidth]
test eax, eax
je 0x140108c49
mov dword [r13 + 0x10], eax
mov eax, dword [rbp - 0x70]
mov dword [rsp + 0x28], eax
mov eax, dword [rbp - 0x6c]
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
mov rdx, r12
mov rcx, rbx
call qword [sym.imp.gdiplus.dll_GdipFillRectangleI]
test eax, eax
cmovne r15d, eax
mov dword [rbp - 0x28], r15d
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x140108ca7
mov qword [r14], r13
mov rax, qword [rbp - 0x78]
mov qword [r14 + 8], rax
mov rcx, r12
call qword [sym.imp.gdiplus.dll_GdipDeleteBrush]
nop
mov rcx, rbx
call qword [sym.imp.gdiplus.dll_GdipDeleteGraphics]
nop
mov rax, r14
jmp 0x1401093e4
mov ecx, ILCombine
call qword [sym.imp.gdiplus.dll_GdipAlloc]
mov rbx, rax
test rax, rax
je 0x140108ce6
lea rax, vtable.Gdiplus::Bitmap.0
mov qword [rbx], rax
mov qword [rbp - 0x18], 0
lea rdx, [rbp - 0x18]
mov rcx, rsi
call qword [sym.imp.gdiplus.dll_GdipCreateBitmapFromFile]
mov dword [rbx + 0x10], eax
mov rax, qword [rbp - 0x18]
mov qword [rbx + 8], rax
jmp 0x140108ce8
xor ebx, ebx
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x40], xmm0
mov rdx, rbx
lea rcx, [rbp - 0x40]
call fcn.1400e2a70
nop
mov r14, qword [rbp - 0x40]
test r14, r14
je 0x14010936f
mov eax, dword [r14 + 0x10]
mov dword [r14 + 0x10], 0
test eax, eax
jne 0x14010936f
mov eax, 4
cmp edi, 5
cmovb eax, edi
test eax, eax
jne 0x140108e60
mov rcx, r14
call fcn.1400901b0
mov ebx, eax
mov rcx, r13
call fcn.1400901b0
cmp eax, ebx
jb 0x140108d77
mov rcx, r14
call fcn.1400901b0
mov ebx, eax
mov rcx, r13
call fcn.1400901b0
mov esi, eax
sub esi, ebx
shr esi, 1
mov rcx, r14
call fcn.1400901b0
mov dword [rsp + 0x70], eax
mov rcx, r14
call fcn.1400901b0
xor edi, edi
jmp 0x140108da3
mov rcx, r13
call fcn.1400901b0
mov dword [rsp + 0x70], eax
mov rcx, r14
call fcn.1400901b0
mov edi, eax
mov rcx, r13
call fcn.1400901b0
sub edi, eax
shr edi, 1
mov rcx, r13
call fcn.1400901b0
xor esi, esi
mov dword [rbp + 0x50], eax
mov rcx, r14
call fcn.140090170
mov ebx, eax
mov rcx, r13
call fcn.140090170
cmp eax, ebx
jb 0x140108df0
mov rcx, r14
call fcn.140090170
mov ebx, eax
mov rcx, r13
call fcn.140090170
mov r15d, eax
sub r15d, ebx
shr r15d, 1
mov rcx, r14
call fcn.140090170
mov r12d, eax
mov rcx, r14
call fcn.140090170
xor ecx, ecx
mov ebx, ecx
jmp 0x140108e1e
mov rcx, r13
call fcn.140090170
mov r12d, eax
mov rcx, r14
call fcn.140090170
mov ebx, eax
mov rcx, r13
call fcn.140090170
sub ebx, eax
shr ebx, 1
mov rcx, r13
call fcn.140090170
xor ecx, ecx
mov r15d, ecx
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x58], rcx
mov dword [rsp + 0x50], 2
mov dword [rsp + 0x48], eax
mov eax, dword [rbp + 0x50]
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], r12d
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x20], eax
mov r9d, r15d
mov r8d, esi
jmp 0x1401091a1
cmp eax, 1
jne 0x140109013
xor edi, edi
mov dword [rbp - 0x54], edi
xor ebx, ebx
mov dword [rbp + 0x50], ebx
mov rcx, r14
call fcn.1400901b0
test eax, eax
je 0x140108e9d
mov rcx, r14
call fcn.1400901b0
mov ebx, eax
mov rcx, r13
call fcn.1400901b0
xor edx, edx
div ebx
mov edi, eax
mov dword [rbp - 0x54], eax
mov ebx, dword [rbp + 0x50]
mov rcx, r14
call fcn.140090170
test eax, eax
je 0x140108ec4
mov rcx, r14
call fcn.140090170
mov ebx, eax
mov rcx, r13
call fcn.140090170
xor edx, edx
div ebx
mov ebx, eax
mov dword [rbp + 0x50], eax
xor r12d, r12d
test edi, edi
js 0x1401092fd
mov r13, qword [rsp + 0x78]
xor esi, esi
test ebx, ebx
js 0x140108ffe
nop
xor ebx, ebx
mov dword [rsp + 0x70], ebx
lea rdx, [rsp + 0x70]
mov rcx, qword [r14 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageWidth]
test eax, eax
je 0x140108efd
mov dword [r14 + 0x10], eax
mov edi, dword [rsp + 0x70]
imul edi, r12d
mov dword [rbp - 0x58], ebx
lea rdx, [rbp - 0x58]
mov rcx, qword [r14 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageWidth]
test eax, eax
je 0x140108f1e
mov dword [r14 + 0x10], eax
mov dword [rbp - 0x68], ebx
lea rdx, [rbp - 0x68]
mov rcx, qword [r14 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageHeight]
test eax, eax
je 0x140108f37
mov dword [r14 + 0x10], eax
mov ebx, dword [rbp - 0x68]
imul ebx, esi
mov dword [rbp - 0x5c], 0
lea rdx, [rbp - 0x5c]
mov rcx, qword [r14 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageHeight]
test eax, eax
je 0x140108f5a
mov dword [r14 + 0x10], eax
mov dword [rbp - 0x60], 0
lea rdx, [rbp - 0x60]
mov rcx, qword [r14 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageWidth]
test eax, eax
je 0x140108f77
mov dword [r14 + 0x10], eax
mov dword [rbp - 0x64], 0
lea rdx, [rbp - 0x64]
mov rcx, qword [r14 + 8]
call qword [sym.imp.gdiplus.dll_GdipGetImageHeight]
test eax, eax
je 0x140108f94
mov dword [r14 + 0x10], eax
xor ecx, ecx
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x58], rcx
mov dword [rsp + 0x50], 2
mov eax, dword [rbp - 0x64]
mov dword [rsp + 0x48], eax
mov eax, dword [rbp - 0x60]
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], ecx
mov eax, dword [rbp - 0x5c]
mov dword [rsp + 0x28], eax
mov eax, dword [rbp - 0x58]
mov dword [rsp + 0x20], eax
mov r9d, ebx
mov r8d, edi
mov rdx, qword [r14 + 8]
mov rcx, r13
call qword [sym.imp.gdiplus.dll_GdipDrawImageRectRectI]
test eax, eax
cmovne r15d, eax
inc esi
mov ebx, dword [rbp + 0x50]
cmp esi, ebx
jle 0x140108ee0
mov dword [rbp - 0x28], r15d
mov edi, dword [rbp - 0x54]
inc r12d
cmp r12d, edi
jle 0x140108ed4
mov r13, qword [rbp - 0x80]
jmp 0x1401092fd
cmp eax, 2
jne 0x14010907a
mov rcx, r13
call fcn.1400901b0
mov esi, eax
mov rcx, r13
call fcn.140090170
mov edi, eax
mov rcx, r14
call fcn.1400901b0
mov ebx, eax
mov rcx, r14
call fcn.140090170
xor ecx, ecx
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x58], rcx
mov dword [rsp + 0x50], 2
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
jmp 0x1401091a1
cmp eax, 3
jne 0x1401091c0
xor esi, esi
xor edi, edi
mov rcx, r13
call fcn.140090170
test eax, eax
je 0x1401090b3
mov rcx, r13
call fcn.1400901b0
imul ebx, eax, 0xffff
mov rcx, r13
call fcn.140090170
mov ecx, eax
xor edx, edx
mov eax, ebx
div ecx
mov esi, eax
mov rcx, r14
call fcn.140090170
test eax, eax
je 0x1401090df
mov rcx, r14
call fcn.1400901b0
imul ebx, eax, 0xffff
mov rcx, r14
call fcn.140090170
mov ecx, eax
xor edx, edx
mov eax, ebx
div ecx
mov edi, eax
mov rcx, r14
call fcn.1400901b0
mov r15d, eax
mov rcx, r14
call fcn.140090170
mov r12d, eax
cmp esi, edi
jge 0x14010912f
xor esi, esi
test edi, edi
je 0x140109113
mov rcx, r13
call fcn.1400901b0
imul eax, eax, 0xffff
xor edx, edx
div edi
mov esi, eax
mov rcx, r13
call fcn.1400901b0
mov ebx, eax
mov rcx, r13
call fcn.140090170
sub eax, esi
shr eax, 1
xor ecx, ecx
mov edi, ecx
jmp 0x14010916a
xor ebx, ebx
test edi, edi
je 0x14010914e
mov rcx, r13
call fcn.140090170
mov ecx, eax
imul ecx, edi
mov eax, 0x80008001
mul ecx
mov ebx, edx
shr ebx, 0xf
mov rcx, r13
call fcn.1400901b0
mov edi, eax
sub edi, ebx
shr edi, 1
mov rcx, r13
call fcn.140090170
mov esi, eax
xor ecx, ecx
mov eax, ecx
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x58], rcx
mov dword [rsp + 0x50], 2
mov dword [rsp + 0x48], r12d
mov dword [rsp + 0x40], r15d
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], ebx
mov r9d, eax
mov r8d, edi
mov rdx, qword [r14 + 8]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.gdiplus.dll_GdipDrawImageRectRectI]
test eax, eax
je 0x1401092fd
mov dword [rbp - 0x28], eax
jmp 0x1401092fd
cmp eax, 4
jne 0x1401092fd
mov rcx, r13
call fcn.1400901b0
imul ebx, eax, 0xffff
mov rcx, r13
call fcn.140090170
mov ecx, eax
xor edx, edx
mov eax, ebx
div ecx
mov edi, eax
mov rcx, r14
call fcn.1400901b0
imul ebx, eax, 0xffff
mov rcx, r14
call fcn.140090170
mov ecx, eax
xor edx, edx
mov eax, ebx
div ecx
mov ebx, eax
mov rcx, r13
call fcn.1400901b0
mov r12d, eax
mov rcx, r13
call fcn.140090170
mov dword [rbp + 0x50], eax
cmp edi, ebx
jge 0x14010925a
mov rcx, r14
call fcn.140090170
mov ecx, eax
imul ecx, edi
mov eax, 0x80008001
mul ecx
mov esi, edx
shr esi, 0xf
mov rcx, r14
call fcn.1400901b0
mov edi, eax
sub edi, esi
shr edi, 1
mov rcx, r14
call fcn.140090170
mov ebx, eax
xor ecx, ecx
mov eax, ecx
jmp 0x1401092ab
xor ebx, ebx
test edi, edi
je 0x140109274
mov rcx, r14
call fcn.1400901b0
imul eax, eax, 0xffff
xor edx, edx
div edi
mov ebx, eax
mov rcx, r14
call fcn.1400901b0
mov esi, eax
call fcn.140135f40
mov rcx, r14
test al, al
je 0x14010929e
call fcn.140090170
mov ecx, eax
sub ecx, ebx
mov eax, 0xaaaaaaab
mul ecx
mov eax, edx
jmp 0x1401092a5
call fcn.140090170
sub eax, ebx
shr eax, 1
xor ecx, ecx
mov edi, ecx
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x58], rcx
mov dword [rsp + 0x50], 2
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], edi
mov eax, dword [rbp + 0x50]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [r14 + 8]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.gdiplus.dll_GdipDrawImageRectRectI]
test eax, eax
cmovne r15d, eax
mov dword [rbp - 0x28], r15d
mov rsi, qword [rbp + 0x58]
mov qword [rsi], r13
mov rax, qword [rbp - 0x78]
mov qword [rsi + 8], rax
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x80], xmm0
mov dword [rbp - 0x50], 1
mov rcx, qword [rbp - 0x38]
test rcx, rcx
je 0x140109356
mov edi, 0xffffffff
mov eax, edi
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140109356
mov rbx, qword [rbp - 0x38]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jne 0x140109356
mov rcx, qword [rbp - 0x38]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rcx, qword [rbp - 0x48]
call qword [sym.imp.gdiplus.dll_GdipDeleteBrush]
nop
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.gdiplus.dll_GdipDeleteGraphics]
nop
jmp 0x1401093e1
mov qword [rbp - 0x40], 0
mov rbx, qword [rbp - 0x38]
mov qword [rbp - 0x38], 0
test rbx, rbx
je 0x1401093bc
mov edi, 0xffffffff
mov eax, edi
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x1401093b4
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jne 0x1401093b4
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov r12, qword [rbp - 0x48]
mov r13, qword [rbp - 0x80]
mov rsi, qword [rbp + 0x58]
mov qword [rsi], r13
mov rax, qword [rbp - 0x78]
mov qword [rsi + 8], rax
mov rcx, r12
call qword [sym.imp.gdiplus.dll_GdipDeleteBrush]
nop
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.gdiplus.dll_GdipDeleteGraphics]
nop
mov rax, rsi
mov rbx, qword [rsp + 0x160]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret