Function at 0x14015bf80
Capabilities:
Delete file

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov qword [rbp - 0x41], 0xfffffffffffffffe
mov qword [rsp + 0xe0], rbx
mov rax, qword [0x1403b8c08]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rdi, rdx
mov r13, rcx
movdqa xmm0, xmmword [0x1402ecd10]
movdqu xmmword [rbp - 9], xmm0
xor r12d, r12d
mov word [rbp - 0x19], r12w
mov r10, qword [rdx + 0x18]
cmp r10, 8
jb 0x14015bfde
mov rdx, qword [rdx]
mov r8, qword [rdi + 0x10]
mov r9, 0xffffffffffffffff
test r8, r8
je 0x14015c01d
lea rcx, [r8 - 1]
mov rax, r9
cmp rcx, rax
cmovb rax, rcx
lea rcx, [rdx + rax*2]
cmp word [rcx], 0x2e
je 0x14015c015
cmp rcx, rdx
je 0x14015c01d
sub rcx, 2
cmp word [rcx], 0x2e
jne 0x14015c006
sub rcx, rdx
sar rcx, 1
jmp 0x14015c020
mov rcx, r9
inc rcx
movdqa xmm0, xmmword [0x1402ecd10]
movdqu xmmword [rbp - 0x29], xmm0
mov word [rbp - 0x39], r12w
cmp r8, rcx
jb 0x14015c2b1
sub r8, rcx
cmp r8, r9
cmovb r9, r8
mov rax, rdi
cmp r10, 8
jb 0x14015c054
mov rax, qword [rdi]
lea rdx, [rax + rcx*2]
mov r8, r9
lea rcx, [rbp - 0x39]
call fcn.1400810d0
nop
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 8
cmovae rcx, qword [rbp - 0x39]
lea rdx, str.jpeg
call fcn.140299718
test eax, eax
je 0x14015c0fb
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 8
cmovae rcx, qword [rbp - 0x39]
lea rdx, [0x1403276e8]
call fcn.140299718
test eax, eax
je 0x14015c0fb
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 8
cmovae rcx, qword [rbp - 0x39]
lea rdx, [0x140327708]
call fcn.140299718
test eax, eax
jne 0x14015c0cc
lea r8d, [rax + 9]
lea rdx, str.image_png
jmp 0x14015c108
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 8
cmovae rcx, qword [rbp - 0x39]
lea rdx, [0x140327700]
call fcn.140299718
test eax, eax
jne 0x14015c18b
lea r8d, [rax + 9]
lea rdx, str.image_bmp
jmp 0x14015c108
mov r8d, 0xa
lea rdx, str.image_jpeg
lea rcx, [rbp - 0x19]
call fcn.1400810d0
lea r15, [rbp - 0x19]
cmp qword [rbp - 1], 8
cmovae r15, qword [rbp - 0x19]
mov dword [rbp - 0x49], r12d
mov dword [rbp - 0x45], r12d
lea rdx, [rbp - 0x45]
lea rcx, [rbp - 0x49]
call sub.gdiplus.dll_GdipGetImageEncodersSize
mov eax, dword [rbp - 0x45]
test eax, eax
je 0x14015c18b
mov ecx, eax
call fcn.14028fd08
mov rsi, rax
test rax, rax
je 0x14015c18b
mov r8, rax
mov edx, dword [rbp - 0x45]
mov ecx, dword [rbp - 0x49]
call sub.gdiplus.dll_GdipGetImageEncoders
mov ebx, r12d
cmp dword [rbp - 0x49], ebx
jbe 0x14015c183
mov r14d, ebx
imul rcx, r14, 0x68
mov rdx, r15
mov rcx, qword [rcx + rsi + 0x40]
call fcn.140299718
test eax, eax
je 0x14015c249
inc ebx
cmp ebx, dword [rbp - 0x49]
jb 0x14015c160
mov rcx, rsi
call fcn.14028fcf4
mov ebx, r12d
mov rdx, qword [rbp - 0x21]
cmp rdx, 8
jb 0x14015c1ce
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14015c1c9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14015c2b7
call fcn.140171af0
movdqa xmm0, xmmword [0x1402ecd10]
movdqu xmmword [rbp - 0x29], xmm0
mov word [rbp - 0x39], r12w
mov rdx, qword [rbp - 1]
cmp rdx, 8
jb 0x14015c220
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x19]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14015c21b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14015c2ab
call fcn.140171af0
mov eax, ebx
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140172190
mov rbx, qword [rsp + 0xe0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
imul rax, r14, 0x68
movups xmm0, xmmword [rax + rsi]
movups xmmword [rbp + 7], xmm0
mov rcx, rsi
call fcn.14028fcf4
cmp ebx, 0xffffffff
je 0x14015c18b
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14015c273
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp qword [rdi + 0x18], 8
jb 0x14015c283
mov rdi, qword [rdi]
mov rbx, qword [r13 + 0x18]
xor r9d, r9d
lea r8, [rbp + 7]
mov rdx, rdi
mov rcx, qword [rbx + 8]
call sub.gdiplus.dll_GdipSaveImageToFile
test eax, eax
je 0x14015c2a1
mov dword [rbx + 0x10], eax
mov ebx, 1
jmp 0x14015c18e
call fcn.14028c66c
nop
call fcn.140013020
int3
call fcn.14028c66c
int3
cmp qword [rcx + 0x18], 0
jne 0x14015d5aa
xor eax, eax
ret
jmp 0x14015bf80