Function at 0x1401240c0
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 [0x14029e8b8]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rdi, rdx
mov r13, rcx
movdqa xmm0, xmmword [0x1401f5800]
movdqu xmmword [rbp - 9], xmm0
xor r12d, r12d
mov word [rbp - 0x19], r12w
mov r10, qword [rdx + 0x18]
cmp r10, 8
jb 0x140122aee
mov rdx, qword [rdx]
mov r8, qword [rdi + 0x10]
mov r9, 0xffffffffffffffff
test r8, r8
je 0x140122b2d
lea rcx, [r8 - 1]
mov rax, r9
cmp rcx, rax
cmovb rax, rcx
lea rcx, [rdx + rax*2]
cmp word [rcx], 0x2e
je 0x140122b25
cmp rcx, rdx
je 0x140122b2d
sub rcx, 2
cmp word [rcx], 0x2e
jne 0x140122b16
sub rcx, rdx
sar rcx, 1
jmp 0x140122b30
mov rcx, r9
inc rcx
movdqa xmm0, xmmword [0x1401f5800]
movdqu xmmword [rbp - 0x29], xmm0
mov word [rbp - 0x39], r12w
cmp r8, rcx
jb 0x140122dc1
sub r8, rcx
cmp r8, r9
cmovb r9, r8
mov rax, rdi
cmp r10, 8
jb 0x140122b64
mov rax, qword [rdi]
lea rdx, [rax + rcx*2]
mov r8, r9
lea rcx, [rbp - 0x39]
call fcn.14000d810
nop
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 8
cmovae rcx, qword [rbp - 0x39]
lea rdx, str.jpeg
call fcn.1401b6550
test eax, eax
je 0x140122c0b
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 8
cmovae rcx, qword [rbp - 0x39]
lea rdx, [0x140222c40]
call fcn.1401b6550
test eax, eax
je 0x140122c0b
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 8
cmovae rcx, qword [rbp - 0x39]
lea rdx, [0x140222c60]
call fcn.1401b6550
test eax, eax
jne 0x140122bdc
lea r8d, [rax + 9]
lea rdx, str.image_png
jmp 0x140122c18
lea rcx, [rbp - 0x39]
cmp qword [rbp - 0x21], 8
cmovae rcx, qword [rbp - 0x39]
lea rdx, [0x140222c58]
call fcn.1401b6550
test eax, eax
jne 0x140122c9b
lea r8d, [rax + 9]
lea rdx, str.image_bmp
jmp 0x140122c18
mov r8d, 0xa
lea rdx, str.image_jpeg
lea rcx, [rbp - 0x19]
call fcn.14000d810
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 0x140122c9b
mov ecx, eax
call fcn.1401b81b8
mov rsi, rax
test rax, rax
je 0x140122c9b
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 0x140122c93
mov r14d, ebx
imul rcx, r14, 0x68
mov rdx, r15
mov rcx, qword [rcx + rsi + 0x40]
call fcn.1401b6550
test eax, eax
je 0x140122d59
inc ebx
cmp ebx, dword [rbp - 0x49]
jb 0x140122c70
mov rcx, rsi
call fcn.1401b3018
mov ebx, r12d
mov rdx, qword [rbp - 0x21]
cmp rdx, 8
jb 0x140122cde
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140122cd9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140122dc7
call fcn.1401606e8
movdqa xmm0, xmmword [0x1401f5800]
movdqu xmmword [rbp - 0x29], xmm0
mov word [rbp - 0x39], r12w
mov rdx, qword [rbp - 1]
cmp rdx, 8
jb 0x140122d30
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x19]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140122d2b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140122dbb
call fcn.1401606e8
mov eax, ebx
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140160a40
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.1401b3018
cmp ebx, 0xffffffff
je 0x140122c9b
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140122d83
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp qword [rdi + 0x18], 8
jb 0x140122d93
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 0x140122db1
mov dword [rbx + 0x10], eax
mov ebx, 1
jmp 0x140122c9e
call fcn.1401b3260
nop
call fcn.14000d590
int3
call fcn.1401b3260
int3
cmp qword [rcx + 0x18], 0
jne 0x1401240ca
xor eax, eax
ret
jmp 0x140122a90