Function at 0x1400080a0
Capabilities:
Read file on windows
Terminate process
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x458
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x3d0], 0xfffffffffffffffe
cmp qword [0x140019238], 0x10
jb 0x1400080d9
mov rdx, qword [0x140019220]
jmp 0x1400080e0
lea rdx, [0x140019220]
sub rsp, 0x20
lea rcx, [0x140019280]
lea r8, [0x140016d12]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
add rsp, 0x20
mov r9, qword [0x140019280]
sub rsp, 0x20
lea rsi, [rbp - 0x80]
mov edx, 1
mov r8d, 0x400
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add rsp, 0x20
vxorps xmm0, xmm0, xmm0
vmovups ymmword [rbp + 0x390], ymm0
sub rsp, 0x20
mov rcx, rsi
vzeroupper
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add rsp, 0x20
test rax, rax
js 0x140008b20
mov rsi, rax
cmp rax, 0xf
ja 0x14000818e
mov qword [rbp + 0x3a0], rsi
mov qword [rbp + 0x3a8], 0xf
sub rsp, 0x20
lea rcx, [rbp + 0x390]
lea rdx, [rbp - 0x80]
mov r8, rsi
call fcn.140009e80
add rsp, 0x20
mov byte [rbp + rsi + 0x390], 0
jmp 0x14000820e
mov rax, rsi
or rax, 0xf
cmp rax, 0x17
mov ebx, 0x16
cmovae rbx, rax
cmp rbx, 0xfff
jb 0x1400081ca
lea rcx, [rbx + 0x28]
sub rsp, 0x20
call fcn.140011dd4
add rsp, 0x20
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x1400081de
lea rcx, [rbx + 1]
sub rsp, 0x20
call fcn.140011dd4
add rsp, 0x20
mov rdi, rax
mov qword [rbp + 0x390], rdi
mov qword [rbp + 0x3a0], rsi
mov qword [rbp + 0x3a8], rbx
sub rsp, 0x20
lea rdx, [rbp - 0x80]
mov rcx, rdi
mov r8, rsi
call fcn.140009e80
add rsp, 0x20
mov byte [rdi + rsi], 0
vxorps xmm0, xmm0, xmm0
vmovaps xmmword [rbp + 0x3b0], xmm0
mov r12, qword [rbp + 0x390]
mov r15, qword [rbp + 0x3a0]
cmp r15, 2
mov r14d, 2
cmovb r14, r15
mov r13, qword [rbp + 0x3a8]
cmp r13, 0x10
lea rbx, [rbp + 0x390]
cmovae rbx, r12
mov qword [rbp + 0x3c0], r14
mov qword [rbp + 0x3c8], 0xf
sub rsp, 0x20
lea rdi, [rbp + 0x3b0]
mov rcx, rdi
mov rdx, rbx
mov r8, r14
call fcn.140009e80
add rsp, 0x20
or r14, rdi
mov byte [r14], 0
mov rax, qword [0x140019278]
cmp rax, 0x10
jb 0x1400082cf
mov rcx, qword [0x140019260]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x1400082c2
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140008b85
add rax, 0x28
mov rdx, rax
mov rcx, r8
sub rsp, 0x20
call fcn.140011e18
add rsp, 0x20
vmovups ymm0, ymmword [rbp + 0x3b0]
vmovups ymmword [0x140019260], ymm0
mov esi, 3
cmp byte [rbp - 0x7d], 0x23
jne 0x14000833a
mov rcx, 0xffffffffffffffff
cmp r15, 4
jb 0x140008335
lea r8, [r15 - 3]
cmp r13, 0x10
lea rcx, [rbp + 0x390]
cmovae rcx, r12
add rcx, 3
sub rsp, 0x20
mov edx, 0xa
vzeroupper
call sub.VCRUNTIME140.dll_memchr
add rsp, 0x20
mov rdx, rax
sub rdx, rbx
xor ecx, ecx
cmp rax, 1
sbb rcx, rcx
or rcx, rdx
inc ecx
movzx esi, cx
mov r12, 0xffffffffffffffff
mov r8, r15
sub r8, rsi
jbe 0x140008375
lea rcx, [rbx + rsi]
sub rsp, 0x20
mov edx, 0x20
vzeroupper
call sub.VCRUNTIME140.dll_memchr
add rsp, 0x20
mov rcx, rax
sub rcx, rbx
xor r12d, r12d
cmp rax, 1
sbb r12, r12
or r12, rcx
vxorps xmm0, xmm0, xmm0
vmovups ymmword [rbp + 0x3b0], ymm0
sub r15, rsi
lea r13, [rbp + 0x390]
jb 0x140008b29
mov r14d, r12d
sub r14d, esi
cmp r15, r14
cmovb r14, r15
add rbx, rsi
cmp r14, 0xf
ja 0x1400083e4
mov qword [rbp + 0x3c0], r14
mov qword [rbp + 0x3c8], 0xf
sub rsp, 0x20
lea rcx, [rbp + 0x3b0]
mov rdx, rbx
mov r8, r14
vzeroupper
call fcn.140009e80
add rsp, 0x20
mov byte [rbp + r14 + 0x3b0], 0
jmp 0x14000846d
mov rax, r14
or rax, 0xf
cmp rax, 0x17
mov esi, 0x16
cmovae rsi, rax
cmp rsi, 0xfff
jb 0x140008426
lea rcx, [rsi + 0x28]
sub rsp, 0x20
vzeroupper
call fcn.140011dd4
add rsp, 0x20
mov r15, rax
add r15, 0x27
and r15, 0xffffffffffffffe0
mov qword [r15 - 8], rax
jmp 0x14000843d
lea rcx, [rsi + 1]
sub rsp, 0x20
vzeroupper
call fcn.140011dd4
add rsp, 0x20
mov r15, rax
mov qword [rbp + 0x3b0], r15
mov qword [rbp + 0x3c0], r14
mov qword [rbp + 0x3c8], rsi
sub rsp, 0x20
mov rcx, r15
mov rdx, rbx
mov r8, r14
call fcn.140009e80
add rsp, 0x20
mov byte [r15 + r14], 0
sub rsp, 0x20
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
add rsp, 0x20
mov rbx, rax
mov rsi, qword [rbp + 0x3c8]
cmp rsi, 0x10
jb 0x140008492
mov rdi, qword [rbp + 0x3b0]
mov dword [rbx], 0
sub rsp, 0x20
lea rdx, [rbp + 0x388]
mov rcx, rdi
mov r8d, 0xa
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
add rsp, 0x20
cmp rdi, qword [rbp + 0x388]
je 0x140008b39
cmp dword [rbx], 0x22
je 0x140008b4d
mov dword [0x140019290], eax
cmp rsi, 0x10
jb 0x140008518
mov rcx, qword [rbp + 0x3b0]
lea rdx, [rsi + 1]
cmp rdx, 0x1000
jb 0x14000850b
mov rax, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rax
cmp rcx, 0x20
jae 0x140008b85
add rsi, 0x28
mov rdx, rsi
mov rcx, rax
sub rsp, 0x20
call fcn.140011e18
add rsp, 0x20
mov r14d, r12d
mov r15, qword [rbp + 0x3a0]
mov rdi, 0xffffffffffffffff
mov r8, r15
sub r8, r14
jbe 0x140008573
cmp qword [rbp + 0x3a8], 0x10
jb 0x140008544
mov rsi, qword [rbp + 0x390]
jmp 0x14000854b
lea rsi, [rbp + 0x390]
lea rcx, [rsi + r14]
sub rsp, 0x20
mov edx, 0xa
call sub.VCRUNTIME140.dll_memchr
add rsp, 0x20
mov rcx, rax
sub rcx, rsi
xor edi, edi
cmp rax, 1
sbb rdi, rdi
or rdi, rcx
vxorps xmm0, xmm0, xmm0
vmovups ymmword [rbp + 0x3b0], ymm0
sub r15, r14
jb 0x140008b61
mov ebx, edi
sub ebx, r12d
cmp r15, rbx
cmovb rbx, r15
cmp qword [rbp + 0x3a8], 0x10
jb 0x1400085a5
mov r13, qword [rbp + 0x390]
add r13, r14
cmp rbx, 0xf
ja 0x1400085ea
mov qword [rbp + 0x3c0], rbx
mov qword [rbp + 0x3c8], 0xf
sub rsp, 0x20
lea rcx, [rbp + 0x3b0]
mov rdx, r13
mov r8, rbx
vzeroupper
call fcn.140009e80
add rsp, 0x20
mov byte [rbp + rbx + 0x3b0], 0
jmp 0x140008673
mov rax, rbx
or rax, 0xf
cmp rax, 0x17
mov esi, 0x16
cmovae rsi, rax
cmp rsi, 0xfff
jb 0x14000862c
lea rcx, [rsi + 0x28]
sub rsp, 0x20
vzeroupper
call fcn.140011dd4
add rsp, 0x20
mov r14, rax
add r14, 0x27
and r14, 0xffffffffffffffe0
mov qword [r14 - 8], rax
jmp 0x140008643
lea rcx, [rsi + 1]
sub rsp, 0x20
vzeroupper
call fcn.140011dd4
add rsp, 0x20
mov r14, rax
mov qword [rbp + 0x3b0], r14
mov qword [rbp + 0x3c0], rbx
mov qword [rbp + 0x3c8], rsi
sub rsp, 0x20
mov rcx, r14
mov rdx, r13
mov r8, rbx
call fcn.140009e80
add rsp, 0x20
mov byte [r14 + rbx], 0
sub rsp, 0x20
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
add rsp, 0x20
mov rsi, rax
mov r14, qword [rbp + 0x3c8]
cmp r14, 0x10
jb 0x14000869a
mov rbx, qword [rbp + 0x3b0]
jmp 0x1400086a1
lea rbx, [rbp + 0x3b0]
mov dword [rsi], 0
sub rsp, 0x20
lea rdx, [rbp + 0x388]
mov rcx, rbx
mov r8d, 0xa
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
add rsp, 0x20
cmp rbx, qword [rbp + 0x388]
je 0x140008b71
cmp dword [rsi], 0x22
je 0x140008b8f
mov dword [0x140019294], eax
cmp r14, 0x10
jb 0x140008727
mov rcx, qword [rbp + 0x3b0]
lea rdx, [r14 + 1]
cmp rdx, 0x1000
jb 0x14000871a
mov rax, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, rax
cmp rcx, 0x20
jae 0x140008b85
add r14, 0x28
mov rdx, r14
mov rcx, rax
sub rsp, 0x20
call fcn.140011e18
add rsp, 0x20
cmp qword [0x140019270], 2
jne 0x140008b10
cmp qword [0x140019278], 0x10
jb 0x140008748
mov rax, qword [0x140019260]
jmp 0x14000874f
lea rax, [0x140019260]
movzx ecx, word [rax]
cmp ecx, 0x3550
je 0x140008769
movzx ecx, word [rax]
cmp ecx, 0x3650
jne 0x140008b10
mov ecx, dword [0x140019290]
cmp ecx, 8
jb 0x140008ba3
mov edx, dword [0x140019294]
cmp edx, 7
jbe 0x140008ba3
cmp ecx, 0x10000
ja 0x140008bb0
cmp edx, 0x10001
jae 0x140008bb0
movzx eax, word [rax]
rol ax, 8
movzx eax, ax
xor ecx, ecx
cmp eax, 0x5036
sete cl
lea eax, [rcx*2 + 1]
mov dword [0x140019298], eax
add edi, 5
mov rcx, qword [0x140019280]
sub rsp, 0x20
mov edx, edi
xor r8d, r8d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add rsp, 0x20
mov rax, qword [rbp + 0x3a8]
cmp rax, 0x10
jb 0x14000882a
mov rcx, qword [rbp + 0x390]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x14000881d
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140008b85
add rax, 0x28
mov rdx, rax
mov rcx, r8
sub rsp, 0x20
call fcn.140011e18
add rsp, 0x20
cmp qword [0x140019258], 0x10
jb 0x14000883d
mov rdx, qword [0x140019240]
jmp 0x140008844
lea rdx, [0x140019240]
sub rsp, 0x20
lea rcx, [0x140019288]
lea r8, [0x140016d0f]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
add rsp, 0x20
mov r9, qword [0x140019288]
sub rsp, 0x20
lea rcx, str.HALIC_0.7.2___Single_Thread
mov rsi, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov edx, 1
mov r8d, 0xb
call rsi
add rsp, 0x20
mov r9, qword [0x140019288]
cmp qword [0x140019278], 0x10
jb 0x1400088a4
mov rcx, qword [0x140019260]
jmp 0x1400088ab
lea rcx, [0x140019260]
sub rsp, 0x20
mov edx, 1
mov r8d, 2
call rsi
add rsp, 0x20
mov r9, qword [0x140019288]
sub rsp, 0x20
lea rcx, [0x140019290]
mov edx, 1
mov r8d, 2
call rsi
add rsp, 0x20
mov r9, qword [0x140019288]
sub rsp, 0x20
lea rcx, [0x140019294]
mov edx, 1
mov r8d, 2
call rsi
add rsp, 0x20
mov edx, dword [0x140019294]
imul rax, rdx, 0x51eb851f
shr rax, 0x26
test ax, ax
je 0x14000896a
imul r8d, eax, 0xc8
mov ecx, edx
sub ecx, r8d
cmp ecx, 0x65
sbb ax, 0xffff
movzx edi, ax
lea eax, [rdi*2 + 0xf]
and eax, 0xfffffff0
call fcn.140012920
sub rsp, rax
mov rbx, rsp
cmp di, 1
je 0x14000897a
mov eax, edi
dec eax
je 0x140008aef
mov edx, eax
cmp eax, 8
jae 0x140008a5d
xor r8d, r8d
jmp 0x140008ae0
mov eax, 0x10
call fcn.140012920
sub rsp, rax
mov rbx, rsp
mov word [rbx], dx
mov edi, 1
mov eax, dword [0x140019290]
imul eax, dword [0x140019298]
imul ecx, eax, 0x12c
sub rsp, 0x20
vzeroupper
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add rsp, 0x20
mov rsi, rax
test edi, edi
je 0x140008a14
mov r14d, edi
xor r15d, r15d
mov r12, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
nop word [rax + rax]
movzx edi, word [rbx + r15*2]
mov r8d, edi
imul r8d, dword [0x140019290]
imul r8d, dword [0x140019298]
mov r9, qword [0x140019280]
sub rsp, 0x20
mov edx, 1
mov rcx, rsi
call r12
add rsp, 0x20
movzx edx, word [0x140019290]
sub rsp, 0x20
mov rcx, rsi
mov r8d, edi
call fcn.1400076d0
add rsp, 0x20
inc r15
cmp r14, r15
jne 0x1400089c0
sub rsp, 0x20
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add rsp, 0x20
mov rcx, qword [0x140019280]
sub rsp, 0x20
mov rsi, qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call rsi
add rsp, 0x20
mov rcx, qword [0x140019288]
mov rax, rsi
lea rsp, [rbp + 0x3d8]
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rax
cmp eax, 0x40
jae 0x140008a67
xor r8d, r8d
jmp 0x140008aae
mov r8d, edx
and r8d, 0xffffffc0
xor r9d, r9d
vmovaps ymm0, ymmword [0x1400153a0]
nop dword [rax]
vmovups ymmword [rbx + r9*2], ymm0
vmovups ymmword [rbx + r9*2 + 0x20], ymm0
vmovups ymmword [rbx + r9*2 + 0x40], ymm0
vmovups ymmword [rbx + r9*2 + 0x60], ymm0
add r9, 0x40
cmp r8, r9
jne 0x140008a80
cmp r8, rdx
je 0x140008aef
test dl, 0x38
je 0x140008ae0
mov r9, r8
mov r8d, edx
and r8d, 0xfffffff8
vmovaps xmm0, xmmword [0x1400153c0]
vmovaps xmmword [rbx + r9*2], xmm0
add r9, 8
cmp r8, r9
jne 0x140008ac0
cmp r8, rdx
je 0x140008aef
nop word cs:[rax + rax]
mov word [rbx + r8*2], 0xc8
inc r8
cmp rdx, r8
jne 0x140008ae0
cmp ecx, 0x64
jbe 0x140008aff
cdqe
mov word [rbx + rax*2], cx
jmp 0x140008982
add ecx, 0xc8
cdqe
mov word [rbx + rax*2], cx
jmp 0x140008982
sub rsp, 0x20
lea rcx, str.Only_.ppm_.pnm_or_.pgm_types_are_supported_for_input_
jmp 0x140008bbb
sub rsp, 0x20
call fcn.140003080
sub rsp, 0x20
vzeroupper
call fcn.1400030a0
add rsp, 0x20
sub rsp, 0x20
lea rcx, str.invalid_stoi_argument
call sub.MSVCP140.dll_void___cdecl_std::_Xinvalid_argument_char_const____ptr64_
add rsp, 0x20
sub rsp, 0x20
lea rcx, str.stoi_argument_out_of_range
call sub.MSVCP140.dll_void___cdecl_std::_Xout_of_range_char_const____ptr64_
add rsp, 0x20
sub rsp, 0x20
vzeroupper
call fcn.1400030a0
add rsp, 0x20
sub rsp, 0x20
lea rcx, str.invalid_stoi_argument
call sub.MSVCP140.dll_void___cdecl_std::_Xinvalid_argument_char_const____ptr64_
add rsp, 0x20
sub rsp, 0x20
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
sub rsp, 0x20
lea rcx, str.stoi_argument_out_of_range
call sub.MSVCP140.dll_void___cdecl_std::_Xout_of_range_char_const____ptr64_
add rsp, 0x20
sub rsp, 0x20
lea rcx, str.Image_width_and_height_should_be_greater_than_8_pixels_
jmp 0x140008bbb
sub rsp, 0x20
lea rcx, str.Image_width_and_height_should_be_less_than_65536_pixels_
call sub.api_ms_win_crt_stdio_l1_1_0.dll_puts
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3