Function at 0x401340
Capabilities:
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x54
call fcn.004019f0
mov dword [ebp - 0x20], 0
push 3
call sub.libvips_42.dll_vips_version
add esp, 4
mov esi, eax
push 5
call sub.libvips_42.dll_vips_version
add esp, 4
sub esi, eax
cmp esi, 0x2a
jne 0x4017c7
mov esi, dword [ebp + 0xc]
push dword [esi]
call sub.libvips_42.dll_vips_init
add esp, 4
test eax, eax
jne 0x40182d
push str.vips8.15
call fcn.00401929
add esp, 4
push 0x4030c5
push 0
call sub.api_ms_win_crt_locale_l1_1_0.dll_setlocale
add esp, 8
push dword [esi]
call dword [sym.imp.libglib_2.0_0.dll_g_path_get_basename]
add esp, 4
mov esi, eax
push eax
call dword [sym.imp.libglib_2.0_0.dll_g_set_prgname]
add esp, 4
push esi
call dword [sym.imp.libglib_2.0_0.dll_g_free]
add esp, 4
call dword [sym.imp.libglib_2.0_0.dll_g_win32_get_command_line]
mov dword [ebp - 0x10], eax
push str.vipsedit___edit_vips_file_header
call 0x401914
add esp, 4
push eax
call dword [sym.imp.libglib_2.0_0.dll_g_option_context_new]
add esp, 4
mov ebx, eax
sub esp, 0x14
xorps xmm0, xmm0
movups xmmword [esp], xmm0
mov dword [esp + 0x10], 0
call dword [sym.imp.libglib_2.0_0.dll_g_option_group_new]
add esp, 0x14
mov edi, eax
push section..data
push eax
call dword [sym.imp.libglib_2.0_0.dll_g_option_group_add_entries]
add esp, 8
push edi
call sub.libvips_42.dll_vips_add_option_entries
add esp, 4
push str.vips8.15
push edi
call dword [sym.imp.libglib_2.0_0.dll_g_option_group_set_translation_domain]
add esp, 8
push edi
push ebx
call dword [sym.imp.libglib_2.0_0.dll_g_option_context_set_main_group]
add esp, 8
lea esi, [ebp - 0x20]
lea eax, [ebp - 0x10]
push esi
push eax
push ebx
call dword [sym.imp.libglib_2.0_0.dll_g_option_context_parse_strv]
add esp, 0xc
test eax, eax
je 0x401837
xor esi, esi
mov eax, dword [ebp - 0x10]
nop dword [eax + eax]
cmp dword [eax + esi*4], 0
lea esi, [esi + 1]
jne 0x401460
cmp dword [0x4062f8], 0
je 0x401485
call sub.libvips_42.dll_vips_version_string
push eax
push str.vips__s_n
call fcn.004022d0
add esp, 8
cmp esi, 3
jne 0x401847
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp - 0x10]
push 0
push dword [eax + 4]
call sub.libvips_42.dll_vips_image_new_from_file
add esp, 8
test eax, eax
je 0x40187b
mov edi, eax
push 0
push 0
push 0
push dword [eax + 0x90]
call sub.libvips_42.dll_vips__seek
add esp, 0x10
lea ebx, [ebp - 0x60]
push 0x40
push ebx
push dword [edi + 0x90]
call sub.api_ms_win_crt_stdio_l1_1_0.dll__read
add esp, 0xc
cmp eax, 0x40
jne 0x40179f
push ebx
push edi
call sub.libvips_42.dll_vips__read_header_bytes
add esp, 8
test eax, eax
jne 0x40179f
mov esi, dword [0x4062e4]
test esi, esi
je 0x401545
push str.little
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
test eax, eax
je 0x40153a
push 0x403152
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
mov ecx, 0x8f2a6b6
test eax, eax
je 0x40153f
push str.bad_endian_ness__s__should_be_big_or_little
call 0x401914
add esp, 4
push dword [0x4062e4]
push eax
call sub.libvips_42.dll_vips_error_exit
mov ecx, 0xb6a6f208
mov dword [edi + 0x9c], ecx
mov esi, dword [0x406304]
test esi, esi
je 0x40156b
push esi
call sub.api_ms_win_crt_convert_l1_1_0.dll_atoi
add esp, 4
mov dword [edi + 0x30], eax
add eax, 0xfff0bdbf
cmp eax, 0xfff0bdbf
jbe 0x4017b3
mov esi, dword [0x406310]
test esi, esi
je 0x401591
push esi
call sub.api_ms_win_crt_convert_l1_1_0.dll_atoi
add esp, 4
mov dword [edi + 0x34], eax
add eax, 0xfff0bdbf
cmp eax, 0xfff0bdbf
jbe 0x4017b3
mov esi, dword [0x4062d8]
test esi, esi
je 0x4015b7
push esi
call sub.api_ms_win_crt_convert_l1_1_0.dll_atoi
add esp, 4
mov dword [edi + 0x38], eax
add eax, 0xfff0bdbf
cmp eax, 0xfff0bdbf
jbe 0x4017b3
mov esi, dword [0x4062e8]
test esi, esi
mov dword [ebp - 0x14], edi
je 0x4015f6
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call sub.libvips_42.dll_vips_band_format_get_type
push esi
push eax
push edi
call sub.libvips_42.dll_vips_enum_from_nick
add esp, 0xc
test eax, eax
js 0x4018aa
mov edi, dword [ebp - 0x14]
mov dword [edi + 0x3c], eax
push eax
call sub.libvips_42.dll_vips_format_sizeof
add esp, 4
shl eax, 3
mov dword [edi + 0x68], eax
mov esi, dword [0x4062ec]
test esi, esi
je 0x401623
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call sub.libvips_42.dll_vips_interpretation_get_type
push esi
push eax
push edi
call sub.libvips_42.dll_vips_enum_from_nick
add esp, 0xc
test eax, eax
js 0x4018c3
mov edi, dword [ebp - 0x14]
mov dword [edi + 0x44], eax
mov esi, dword [0x4062dc]
test esi, esi
je 0x401650
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call sub.libvips_42.dll_vips_coding_get_type
push esi
push eax
push edi
call sub.libvips_42.dll_vips_enum_from_nick
add esp, 0xc
test eax, eax
js 0x4018dc
mov edi, dword [ebp - 0x14]
mov dword [edi + 0x40], eax
mov eax, dword [0x406300]
test eax, eax
je 0x401665
push eax
call sub.api_ms_win_crt_convert_l1_1_0.dll_atof
add esp, 4
fstp qword [edi + 0x48]
mov eax, dword [0x40630c]
test eax, eax
je 0x40167a
push eax
call sub.api_ms_win_crt_convert_l1_1_0.dll_atof
add esp, 4
fstp qword [edi + 0x50]
mov eax, dword [0x4062fc]
test eax, eax
je 0x40168f
push eax
call sub.api_ms_win_crt_convert_l1_1_0.dll_atoi
add esp, 4
mov dword [edi + 0x58], eax
mov eax, dword [0x406308]
test eax, eax
je 0x4016a4
push eax
call sub.api_ms_win_crt_convert_l1_1_0.dll_atoi
add esp, 4
mov dword [edi + 0x5c], eax
push 0
push 0
push 0
push dword [edi + 0x90]
call sub.libvips_42.dll_vips__seek
add esp, 0x10
and edx, eax
cmp edx, 0xffffffff
je 0x401894
push ebx
push edi
call sub.libvips_42.dll_vips__write_header_bytes
add esp, 8
test eax, eax
jne 0x4017a9
push 0x40
push ebx
push dword [edi + 0x90]
call sub.libvips_42.dll_vips__write
add esp, 0xc
test eax, eax
jne 0x4017a9
cmp dword [0x4062f0], 0
je 0x40176e
push 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
lea ecx, [ebp - 0x18]
push ecx
push str.stdin
push eax
call sub.libvips_42.dll_vips__file_read
add esp, 0xc
test eax, eax
je 0x4018f5
mov ebx, eax
mov esi, dword [ebp - 0x18]
xor eax, eax
test esi, esi
je 0x401751
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isspace]
nop dword [eax]
movsx eax, byte [ebx + esi - 1]
push eax
call edi
add esp, 4
test eax, eax
je 0x40174c
dec esi
mov dword [ebp - 0x18], esi
jne 0x401730
mov edi, dword [ebp - 0x14]
xor eax, eax
jmp 0x401751
mov eax, esi
mov edi, dword [ebp - 0x14]
push eax
push ebx
push edi
call sub.libvips_42.dll_vips__write_extension_block
add esp, 0xc
test eax, eax
jne 0x4018fc
push ebx
call dword [sym.imp.libglib_2.0_0.dll_g_free]
add esp, 4
push edi
call dword [sym.imp.libgobject_2.0_0.dll_g_object_unref]
add esp, 4
push dword [ebp - 0x1c]
call dword [sym.imp.libglib_2.0_0.dll_g_option_context_free]
add esp, 4
push dword [ebp - 0x10]
call dword [sym.imp.libglib_2.0_0.dll_g_strfreev]
add esp, 4
call sub.libvips_42.dll_vips_shutdown
xor eax, eax
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret
push str.could_not_read_VIPS_header_for__s
jmp 0x401899
push str.could_not_write_to__s
jmp 0x401899
push str._s_is_not_a_positive_integer
call 0x401914
add esp, 4
push esi
push eax
call sub.libvips_42.dll_vips_error_exit
mov edi, dword [sym.imp.libglib_2.0_0.dll_g_log]
push str.ABI_mismatch
push 0x10
push str.VIPS
call edi
add esp, 0xc
push 3
call sub.libvips_42.dll_vips_version
add esp, 4
mov esi, eax
push 5
call sub.libvips_42.dll_vips_version
add esp, 4
sub esi, eax
push esi
push str.library_has_ABI_version__d
push 0x10
push str.VIPS
call edi
add esp, 0x10
push 0x2a
push str.application_needs_ABI_version__d
push 0x10
push str.VIPS
call edi
add esp, 0x10
push str.ABI_mismatch
push 0x40309a
call sub.libvips_42.dll_vips_error
add esp, 8
push str.unable_to_start_VIPS
jmp 0x401901
push esi
call sub.libvips_42.dll_vips_g_error
add esp, 4
push 0xffffffffffffffff
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov esi, eax
push str.usage:__s__OPTION...__vips_file_n
call 0x401914
add esp, 4
mov edi, eax
call dword [sym.imp.libglib_2.0_0.dll_g_get_prgname]
push eax
push edi
push esi
call fcn.004022a0
add esp, 0xc
push 0xffffffffffffffff
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
push str.could_not_open_image__s
call 0x401914
add esp, 4
mov ecx, dword [ebp - 0x10]
push dword [ecx + 4]
push eax
call sub.libvips_42.dll_vips_error_exit
push str.could_not_seek_on__s
call 0x401914
add esp, 4
push dword [edi + 0x74]
push eax
call sub.libvips_42.dll_vips_error_exit
push str.bad_format__s
call 0x401914
add esp, 4
push dword [0x4062e8]
push eax
call sub.libvips_42.dll_vips_error_exit
push str.bad_interpretation__s
call 0x401914
add esp, 4
push dword [0x4062ec]
push eax
call sub.libvips_42.dll_vips_error_exit
push str.bad_coding__s
call 0x401914
add esp, 4
push dword [0x4062dc]
push eax
call sub.libvips_42.dll_vips_error_exit
push str.could_not_get_ext_data
jmp 0x401901
push str.could_not_set_extension
call 0x401914
add esp, 4
push eax
push 0x4030a4
call sub.libvips_42.dll_vips_error_exit
mov eax, dword [esp + 4]
cmp byte [0x4062f4], 0
jne 0x401928
mov byte [0x4062f4], 1
ret