Function at 0x140001070
Capabilities:
Terminate process

Disassembly:
push rbp
push rsi
push rdi
lea rbp, [rsp - 0x570]
sub rsp, 0x670
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x550], rax
mov rax, qword [rdx]
mov rsi, rdx
mov qword [0x14000a048], rax
mov edi, ecx
test rax, rax
je 0x1400010ad
cmp byte [rax], 0
jne 0x1400010bb
lea rax, str.jpegtran
mov qword [0x14000a048], rax
lea rcx, [rbp + 0x3f0]
call sub.libjpeg.dll_jpeg_std_error
mov edx, 0x5a
mov qword [rsp + 0x30], rax
mov r8d, 0x278
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_CreateDecompress
lea rcx, [rbp + 0x4a0]
call sub.libjpeg.dll_jpeg_std_error
mov edx, 0x5a
mov qword [rbp + 0x1b0], rax
mov r8d, 0x238
lea rcx, [rbp + 0x1b0]
call sub.libjpeg.dll_jpeg_CreateCompress
xor r9d, r9d
mov byte [rsp + 0x20], 0
mov r8, rsi
lea rcx, [rbp + 0x1b0]
mov edx, edi
call fcn.140001440
cmp qword [0x14000a050], 0
mov ecx, dword [rbp + 0x51c]
mov dword [rbp + 0x46c], ecx
mov rcx, qword [rbp + 0x1b8]
movsxd r8, eax
mov edx, dword [rcx + 0x58]
mov rcx, qword [rsp + 0x38]
mov dword [rcx + 0x58], edx
jne 0x1400011f2
lea ecx, [rdi - 2]
cmp r8d, ecx
je 0x140001182
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [0x14000a048]
lea rdx, str._s:_must_name_one_input_and_one_output_file_n
mov rcx, rax
call fcn.140001020
call fcn.140001ca0
int3
lea eax, [r8 + 1]
movsxd rcx, eax
mov rax, qword [rsi + rcx*8]
mov qword [0x14000a050], rax
mov qword [rsp + 0x6a0], rbx
mov qword [rsp + 0x668], r14
cmp r8d, edi
jge 0x140001221
mov rcx, qword [rsi + r8*8]
lea r14, [rsi + r8*8]
lea rdx, [0x140007b18]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rbx, rax
test rax, rax
jne 0x140001229
lea ecx, [rax + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [r14]
lea rdx, str._s:_cant_open__s_for_reading_n
mov r8, qword [0x14000a048]
mov rcx, rax
call fcn.140001020
lea ecx, [rbx + 1]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea eax, [rdi - 1]
cmp r8d, eax
je 0x140001194
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [0x14000a048]
lea rdx, str._s:_must_name_one_input_and_one_output_file_n
mov rcx, rax
call fcn.140001020
call fcn.140001ca0
int3
call fcn.1400028e0
mov rbx, rax
mov rdx, rbx
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_stdio_src
mov edx, dword [0x14000a060]
lea rcx, [rsp + 0x30]
call fcn.140005100
mov dl, 1
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_read_header
mov rcx, qword [0x14000a058]
test rcx, rcx
je 0x14000127f
lea r9, [rsp + 0x78]
lea r8, [rsp + 0x74]
lea rdx, str._u__u
call fcn.140001c50
cmp eax, 1
jge 0x14000127f
call fcn.140001ca0
int3
lea rdx, [0x14000a070]
lea rcx, [rsp + 0x30]
call fcn.1400057a0
test al, al
jne 0x1400012c1
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [0x14000a048]
lea rdx, str._s:_transformation_is_not_perfect_n
mov rcx, rax
call fcn.140001020
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x660], r15
call sub.libjpeg.dll_jpeg_read_coefficients
lea rdx, [rbp + 0x1b0]
mov r14, rax
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_copy_critical_parameters
lea r9, [0x14000a070]
mov r8, r14
lea rdx, [rbp + 0x1b0]
lea rcx, [rsp + 0x30]
call fcn.1400051e0
xor ecx, ecx
mov r15, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x14000131b
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [0x14000a050]
test rcx, rcx
je 0x14000136c
lea rdx, [0x140007b6c]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rbx, rax
test rax, rax
jne 0x140001374
lea ecx, [rax + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [0x14000a050]
lea rdx, str._s:_cant_open__s_for_writing_n
mov r8, qword [0x14000a048]
mov rcx, rax
call fcn.140001020
lea ecx, [rbx + 1]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
call fcn.140002920
mov rbx, rax
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8, rsi
lea rcx, [rbp + 0x1b0]
mov edx, edi
call fcn.140001440
mov rdx, rbx
lea rcx, [rbp + 0x1b0]
call sub.libjpeg.dll_jpeg_stdio_dest
mov rdx, r15
lea rcx, [rbp + 0x1b0]
call sub.libjpeg.dll_jpeg_write_coefficients
mov r8d, dword [0x14000a060]
lea rdx, [rbp + 0x1b0]
lea rcx, [rsp + 0x30]
call fcn.140005040
lea r9, [0x14000a070]
mov r8, r14
lea rdx, [rbp + 0x1b0]
lea rcx, [rsp + 0x30]
call fcn.140005360
lea rcx, [rbp + 0x1b0]
call sub.libjpeg.dll_jpeg_finish_compress
lea rcx, [rbp + 0x1b0]
call sub.libjpeg.dll_jpeg_destroy_compress
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_finish_decompress
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_destroy_decompress
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rbx, rax
je 0x140001423
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ecx, dword [rbp + 0x470]
add ecx, dword [rbp + 0x520]
neg ecx
sbb ecx, ecx
and ecx, 2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3