Function at 0x422750
Capabilities:
Get file attributes
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x38
movzx ebx, byte [esp + 0x50]
push dword [0x5062c0]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
jne 0x4227f2
mov eax, dword [esp + 0x4c]
cmp eax, 9
je 0x42281e
cmp eax, 0xb
je 0x4229d1
cmp eax, 0xa
jne 0x4229ec
mov dword [esp], 0
mov dword [esp + 4], 0
mov eax, dword [0x5052b0]
mov dword [esp + 8], eax
mov eax, dword [0x5062c0]
sub esp, 0x1c
movaps xmm0, xmmword [0x4f2010]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp eax, 0xffffffff
je 0x422b14
mov eax, esp
push eax
push esi
call fcn.00473ec0
add esp, 8
mov ebx, eax
jmp 0x422b16
test bl, bl
je 0x422a0d
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push dword [0x5062c0]
push str.Logo:_Image_source___s__does_not_exist_n
push eax
call fcn.004230c0
add esp, 0xc
jmp 0x422a0d
lea ecx, [esp + 0x2c]
mov edx, 0x5062b8
call fcn.004230e0
cmp dword [0x506334], 0
je 0x422a19
cmp dword [0x506338], 0
je 0x422a19
mov esi, dword [0x50633c]
test esi, esi
je 0x4228bb
movaps xmm0, xmmword [str._n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n]
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
cmp esi, 0x20
jb 0x42289c
mov edi, 0x20
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ebp, esp
nop word cs:[eax + eax]
push 1
call ebx
add esp, 4
push eax
push 0x20
push 1
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
add edi, 0x20
cmp edi, esi
jbe 0x422880
and esi, 0x1f
je 0x4228bb
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov ecx, esp
push eax
push esi
push 1
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
mov esi, dword [0x506340]
test esi, esi
je 0x42292b
movaps xmm0, xmmword [0x4f2000]
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
cmp esi, 0x20
jb 0x42290c
mov edi, 0x20
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ebp, esp
nop word [eax + eax]
push 1
call ebx
add esp, 4
push eax
push 0x20
push 1
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
add edi, 0x20
cmp edi, esi
jbe 0x4228f0
and esi, 0x1f
je 0x42292b
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov ecx, esp
push eax
push esi
push 1
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
mov edi, dword [esp + 0x34]
push edi
push dword [0x506338]
push dword [0x506334]
push str.e_GaT_f100_tf_c_u_r_u__se_n
call fcn.00423250
add esp, 0x10
cmp byte [0x50634b], 0
je 0x422b86
mov dword [0x507638], 0
mov dword [0x507634], 0
mov esi, dword [0x506344]
test esi, esi
je 0x422e9c
mov dword [esp + 0x24], edi
movaps xmm0, xmmword [str._n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n]
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
cmp esi, 0x20
jb 0x422c6c
mov ebx, 0x20
mov ebp, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov edi, esp
nop word cs:[eax + eax]
push 1
call ebp
add esp, 4
push eax
push 0x20
push 1
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
add ebx, 0x20
cmp ebx, esi
jbe 0x4229b0
jmp 0x422c6c
test bl, bl
je 0x422a0d
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push 1
push 0x27
push str.Logo:_Chafa_support_is_not_compiled_in_n
jmp 0x422a05
test bl, bl
je 0x422a0d
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push 1
push 0x2e
push str.Logo:_Image_Magick_support_is_not_compiled_in_n
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
xor ebx, ebx
mov eax, ebx
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret
cmp byte [0x50634b], 0
mov esi, dword [0x50633c]
je 0x422bbf
test esi, esi
je 0x422a9b
movaps xmm0, xmmword [str._n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n]
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
cmp esi, 0x20
jb 0x422a7c
mov edi, 0x20
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ebp, esp
nop word cs:[eax + eax]
push 1
call ebx
add esp, 4
push eax
push 0x20
push 1
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
add edi, 0x20
cmp edi, esi
jbe 0x422a60
and esi, 0x1f
je 0x422a9b
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov ecx, esp
push eax
push esi
push 1
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
mov esi, dword [0x506340]
test esi, esi
je 0x422bd3
movaps xmm0, xmmword [0x4f2000]
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
cmp esi, 0x20
jb 0x422aec
mov edi, 0x20
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ebp, esp
nop dword [eax + eax]
push 1
call ebx
add esp, 4
push eax
push 0x20
push 1
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
add edi, 0x20
cmp edi, esi
jbe 0x422ad0
and esi, 0x1f
je 0x422bd3
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov ecx, esp
push eax
push esi
push 1
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
jmp 0x422bd3
xor ebx, ebx
mov eax, esi
inc eax
cmp eax, 2
jae 0x422b59
test bl, bl
je 0x422b64
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fflush
add esp, 4
lea ecx, [esp + 0x2c]
mov esi, esp
mov edx, esi
call fcn.004230e0
cmp dword [esp], 0
je 0x422c94
mov eax, dword [esp + 8]
mov byte [eax], 0
jmp 0x422c9d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
jne 0x422b22
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push 1
push 0x20
push str.Logo:_Failed_to_load_image_file_n
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
jmp 0x423095
mov eax, dword [0x506340]
add eax, dword [0x506334]
add eax, dword [0x506344]
mov dword [0x507634], eax
mov eax, dword [0x506338]
add eax, dword [0x50633c]
mov dword [0x507638], eax
push eax
push str.e__uA
call fcn.00423250
add esp, 8
jmp 0x422e9c
push dword [0x506340]
push esi
push 0x4f20c0
call fcn.00423250
add esp, 0xc
mov edi, dword [esp + 0x34]
push edi
push str.e_GaT_f100_tf__se_
call fcn.00423250
add esp, 8
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fflush
add esp, 4
cmp byte [0x50634b], 0
je 0x422d13
mov dword [0x507638], 0
mov dword [0x507634], 0
mov esi, dword [0x506344]
test esi, esi
je 0x422e9c
mov dword [esp + 0x24], edi
movaps xmm0, xmmword [str._n_n_n_n_n_n_n_n_n_n_n_n_n_n_n_n]
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
cmp esi, 0x20
jb 0x422c6c
mov ebx, 0x20
mov ebp, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov edi, esp
nop
push 1
call ebp
add esp, 4
push eax
push 0x20
push 1
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
add ebx, 0x20
cmp ebx, esi
jbe 0x422c50
and esi, 0x1f
je 0x422c8b
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov ecx, esp
push eax
push esi
push 1
push ecx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
mov edi, dword [esp + 0x24]
jmp 0x422e9c
mov eax, dword [0x5052b0]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
cmp dword [0x506334], 0
je 0x422ce6
cmp dword [0x506338], 0
je 0x422ce6
mov edi, dword [0x50633c]
test edi, edi
je 0x422f24
mov eax, dword [esp]
mov ecx, eax
sub ecx, 1
jb 0x422e2d
cmp ecx, edi
jb 0x422e2d
xor ecx, ecx
mov eax, dword [esp + 8]
jmp 0x422f06
cmp byte [0x50634b], 0
mov eax, dword [0x50633c]
je 0x422d63
push 0xa
push eax
push esi
call fcn.00472550
add esp, 0xc
push 0x20
push dword [0x506340]
push esi
call fcn.00472550
add esp, 0xc
jmp 0x422d78
mov word [esp], 0
mov word [esp + 0x20], 0
mov eax, esp
lea ecx, [esp + 0x20]
push eax
push ecx
push 0x4f20ef
push 0x4f20ea
call fcn.004742e0
add esp, 0x10
test eax, eax
je 0x422e66
mov esi, eax
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push esi
push str._nLogo__kitty_direct_:_fail_to_query_cursor_position:__s_n
push eax
call fcn.004230c0
add esp, 0xc
jmp 0x422e9c
push dword [0x506340]
push eax
push 0x4f20c0
push esi
call fcn.00472860
add esp, 0x10
mov edi, dword [esp + 0x34]
push edi
push str.e_1337_Fileinline1:_s_a
push esi
call fcn.00472860
add esp, 0xc
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
add esp, 4
lea esi, [esp + 0x20]
push 0
push esi
push dword [esp + 0xc]
push dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp byte [0x50634b], 0
je 0x422dde
mov dword [0x507638], 0
mov dword [0x507634], 0
push dword [0x506344]
push 0xa
call fcn.00419c20
add esp, 8
jmp 0x423085
mov word [esp + 0x20], 0
mov word [esp + 0x2a], 0
lea eax, [esp + 0x2a]
push esi
push eax
push 0x4f20ef
push 0x4f20ea
call fcn.004742e0
add esp, 0x10
test eax, eax
je 0x422eb3
mov esi, eax
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push esi
push str._nLogo__iterm_:_fail_to_query_cursor_position:__s_n
push eax
call fcn.004230c0
add esp, 0xc
jmp 0x423085
mov ebp, esi
cmp eax, 2
mov ecx, 0x20
cmovae ecx, eax
lea edx, [edi + 1]
nop dword [eax]
mov esi, ecx
add ecx, ecx
cmp edx, esi
ja 0x422e40
test eax, eax
je 0x422eef
push esi
push dword [esp + 0xc]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov ecx, dword [esp + 4]
jmp 0x422efd
movzx eax, word [esp]
add eax, dword [0x506344]
mov dword [0x507634], eax
movzx eax, word [esp + 0x20]
mov dword [0x507638], eax
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push 1
push 3
push 0x4f212c
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
cmp dword [esp + 0x2c], 0
je 0x422eac
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
mov bl, 1
jmp 0x422a0f
movzx eax, word [esp + 0x20]
add eax, dword [0x506344]
mov dword [0x507634], eax
movzx eax, word [esp + 0x2a]
mov dword [0x507638], eax
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push 1
push 3
push 0x4f212c
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
jmp 0x423085
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
mov byte [eax], 0
xor ecx, ecx
mov dword [esp + 8], eax
mov dword [esp], esi
mov esi, ebp
add ecx, eax
push edi
push 0xa
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
add edi, dword [esp + 4]
mov dword [esp + 4], edi
mov eax, dword [esp + 8]
mov byte [eax + edi], 0
mov ebp, dword [0x506340]
test ebp, ebp
je 0x422fdb
mov eax, dword [esp]
mov esi, dword [esp + 4]
test eax, eax
je 0x422f47
mov ecx, esi
not ecx
add ecx, eax
cmp ecx, ebp
jae 0x422f83
cmp eax, 2
mov ecx, 0x20
cmovae ecx, eax
lea edx, [esi + ebp]
inc edx
nop word cs:[eax + eax]
mov edi, ecx
add ecx, ecx
cmp edx, edi
ja 0x422f60
test eax, eax
je 0x422f89
push edi
push dword [esp + 0xc]
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
add esp, 8
mov dword [esp + 8], eax
mov esi, dword [esp + 4]
jmp 0x422fb8
mov eax, dword [esp + 8]
jmp 0x422fbb
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
add esp, 4
test esi, esi
je 0x422fb1
lea ecx, [esi + 1]
push ecx
push dword [esp + 0xc]
push eax
mov dword [esp + 0x30], eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov eax, dword [esp + 0x30]
add esp, 0xc
jmp 0x422fb4
mov byte [eax], 0
mov dword [esp + 8], eax
mov dword [esp], edi
add esi, eax
push ebp
push 0x20
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
add ebp, dword [esp + 4]
mov dword [esp + 4], ebp
mov eax, dword [esp + 8]
mov byte [eax + ebp], 0
mov esi, esp
movzx eax, byte [0x506349]
mov edi, dword [esp + 0x34]
push edi
push eax
push dword [0x506338]
push dword [0x506334]
push str.e_1337_Fileinline1_width_u_height_u_preserveAspectRatio_u:_s_a_n
push esi
call fcn.00472860
add esp, 0x18
cmp byte [0x50634b], 0
je 0x42302f
mov dword [0x507638], 0
mov dword [0x507634], 0
push 0xa
push dword [0x506344]
push esi
call fcn.00472550
jmp 0x423061
mov eax, dword [0x506340]
add eax, dword [0x506334]
add eax, dword [0x506344]
mov dword [0x507634], eax
mov eax, dword [0x506338]
add eax, dword [0x50633c]
mov dword [0x507638], eax
push eax
push str.e__uA
push esi
call fcn.00472860
add esp, 0xc
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
add esp, 4
lea ecx, [esp + 0x20]
push 0
push ecx
push dword [esp + 0xc]
push dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [esp + 0x2c], 0
je 0x423095
push edi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
cmp dword [esp], 0
mov dword [esp + 4], 0
je 0x422a0f
mov dword [esp], 0
push dword [esp + 8]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
add esp, 4
jmp 0x422a0f