Function at 0x140001070
Capabilities:
Terminate process

Disassembly:
push rbp
push r14
push r15
lea rbp, [rsp - 0x240]
sub rsp, 0x340
mov rax, qword [0x14000a008]
xor rax, rsp
mov qword [rbp + 0x220], rax
mov rax, qword [rdx]
mov r15, rdx
mov qword [0x14000a048], rax
mov r14d, ecx
test rax, rax
je 0x1400010b0
cmp byte [rax], 0
jne 0x1400010be
lea rax, str.cjpeg
mov qword [0x14000a048], rax
lea rcx, [rbp + 0x170]
call sub.libjpeg.dll_jpeg_std_error
mov edx, 0x5a
mov qword [rsp + 0x30], rax
mov r8d, 0x238
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_CreateCompress
lea rax, [0x1400072e0]
mov dword [rbp + 0x210], 0x3e8
lea rcx, [rsp + 0x30]
mov qword [rbp + 0x208], rax
mov dword [rbp + 0x214], 0x416
mov dword [rsp + 0x6c], 2
call sub.libjpeg.dll_jpeg_set_defaults
xor r9d, r9d
mov byte [rsp + 0x20], 0
mov r8, r15
lea rcx, [rsp + 0x30]
mov edx, r14d
call fcn.140001410
cmp qword [0x14000a050], 0
movsxd r8, eax
jne 0x1400011e1
lea edx, [r14 - 2]
cmp r8d, edx
je 0x140001171
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.140001c90
int3
lea eax, [r8 + 1]
movsxd rcx, eax
mov rax, qword [r15 + rcx*8]
mov qword [0x14000a050], rax
mov qword [rsp + 0x370], rbx
mov qword [rsp + 0x330], rdi
cmp r8d, r14d
jge 0x140001211
mov rcx, qword [r15 + r8*8]
lea rbx, [r15 + r8*8]
lea rdx, [0x1400082d8]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
test rax, rax
jne 0x140001219
lea ecx, [rax + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [rbx]
lea rdx, str._s:_cant_open__s_n
mov r8, qword [0x14000a048]
mov rcx, rax
call fcn.140001020
lea ecx, [rdi + 1]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea eax, [r14 - 1]
cmp r8d, eax
je 0x140001183
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.140001c90
int3
call fcn.140005e50
mov rdi, rax
mov rcx, qword [0x14000a050]
mov qword [rsp + 0x338], rsi
test rcx, rcx
je 0x140001272
lea rdx, [0x1400082f4]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rsi, rax
test rax, rax
jne 0x14000127a
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_n
mov r8, qword [0x14000a048]
mov rcx, rax
call fcn.140001020
lea ecx, [rsi + 1]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
call fcn.140005e90
mov rsi, rax
cmp byte [0x14000a040], 0
jne 0x14000131b
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov ebx, eax
cmp eax, 0xffffffff
jne 0x1400012af
mov rcx, qword [rsp + 0x30]
mov dword [rcx + 0x28], 0x2b
lea rcx, [rsp + 0x30]
mov rdx, qword [rsp + 0x30]
call qword [rdx]
mov rdx, rdi
mov ecx, ebx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ungetc]
cmp eax, 0xffffffff
jne 0x1400012d7
mov rax, qword [rsp + 0x30]
lea rcx, [rsp + 0x30]
mov dword [rax + 0x28], 0x413
mov rax, qword [rsp + 0x30]
call qword [rax]
test ebx, ebx
je 0x14000131b
lea rcx, [rsp + 0x30]
cmp ebx, 0x42
je 0x140001314
cmp ebx, 0x47
je 0x14000130d
cmp ebx, 0x50
je 0x140001306
mov rax, qword [rsp + 0x30]
mov dword [rax + 0x28], 0x414
mov rax, qword [rsp + 0x30]
call qword [rax]
xor ebx, ebx
jmp 0x140001328
call fcn.1400026e0
jmp 0x140001325
call fcn.140003430
jmp 0x140001325
call fcn.140004590
jmp 0x140001325
lea rcx, [rsp + 0x30]
call fcn.140003cd0
mov rbx, rax
mov rdx, rbx
mov qword [rbx + 0x18], rdi
lea rcx, [rsp + 0x30]
call qword [rbx]
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_default_colorspace
xor r9d, r9d
mov byte [rsp + 0x20], 1
mov r8, r15
lea rcx, [rsp + 0x30]
mov edx, r14d
call fcn.140001410
mov rdx, rsi
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_stdio_dest
mov dl, 1
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_start_compress
mov eax, dword [rsp + 0x64]
cmp dword [rbp + 0x78], eax
jae 0x1400013a5
nop word [rax + rax]
mov rdx, rbx
lea rcx, [rsp + 0x30]
call qword [rbx + 8]
mov rdx, qword [rbx + 0x20]
lea rcx, [rsp + 0x30]
mov r8d, eax
call sub.libjpeg.dll_jpeg_write_scanlines
mov eax, dword [rsp + 0x64]
cmp dword [rbp + 0x78], eax
jb 0x140001380
mov rdx, rbx
lea rcx, [rsp + 0x30]
call qword [rbx + 0x10]
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_finish_compress
lea rcx, [rsp + 0x30]
call sub.libjpeg.dll_jpeg_destroy_compress
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rdi, rax
je 0x1400013da
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
cmp rsi, rax
je 0x1400013f3
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, dword [rbp + 0x1f0]
neg eax
sbb ecx, ecx
and ecx, 2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3