Function at 0x422700
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 0x4227a2
mov eax, dword [esp + 0x4c]
cmp eax, 9
je 0x4227ce
cmp eax, 0xb
je 0x422981
cmp eax, 0xa
jne 0x42299c
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 0x422ac4
mov eax, esp
push eax
push esi
call dbg.ffAppendFDBuffer
add esp, 8
mov ebx, eax
jmp 0x422ac6
test bl, bl
je 0x4229bd
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 sym._fprintf_2
add esp, 0xc
jmp 0x4229bd
lea ecx, [esp + 0x2c]
mov edx, 0x5062b8
call dbg.base64Encode
cmp dword [0x506334], 0
je 0x4229c9
cmp dword [0x506338], 0
je 0x4229c9
mov esi, dword [0x50633c]
test esi, esi
je 0x42286b
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 0x42284c
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 sym._fwrite
add esp, 0x10
add edi, 0x20
cmp edi, esi
jbe 0x422830
and esi, 0x1f
je 0x42286b
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 sym._fwrite
add esp, 0x10
mov esi, dword [0x506340]
test esi, esi
je 0x4228db
movaps xmm0, xmmword [0x4f2000]
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
cmp esi, 0x20
jb 0x4228bc
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 sym._fwrite
add esp, 0x10
add edi, 0x20
cmp edi, esi
jbe 0x4228a0
and esi, 0x1f
je 0x4228db
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 sym._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 sym._printf
add esp, 0x10
cmp byte [0x50634b], 0
je 0x422b36
mov dword [0x507638], 0
mov dword [0x507634], 0
mov esi, dword [0x506344]
test esi, esi
je 0x422e4c
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 0x422c1c
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 sym._fwrite
add esp, 0x10
add ebx, 0x20
cmp ebx, esi
jbe 0x422960
jmp 0x422c1c
test bl, bl
je 0x4229bd
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 0x4229b5
test bl, bl
je 0x4229bd
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 sym._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 0x422b6f
test esi, esi
je 0x422a4b
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 0x422a2c
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 sym._fwrite
add esp, 0x10
add edi, 0x20
cmp edi, esi
jbe 0x422a10
and esi, 0x1f
je 0x422a4b
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 sym._fwrite
add esp, 0x10
mov esi, dword [0x506340]
test esi, esi
je 0x422b83
movaps xmm0, xmmword [0x4f2000]
movups xmmword [esp + 0x10], xmm0
movups xmmword [esp], xmm0
cmp esi, 0x20
jb 0x422a9c
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 sym._fwrite
add esp, 0x10
add edi, 0x20
cmp edi, esi
jbe 0x422a80
and esi, 0x1f
je 0x422b83
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 sym._fwrite
add esp, 0x10
jmp 0x422b83
xor ebx, ebx
mov eax, esi
inc eax
cmp eax, 2
jae 0x422b09
test bl, bl
je 0x422b14
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call sym._fflush
add esp, 4
lea ecx, [esp + 0x2c]
mov esi, esp
mov edx, esi
call dbg.base64Encode
cmp dword [esp], 0
je 0x422c44
mov eax, dword [esp + 8]
mov byte [eax], 0
jmp 0x422c4d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
jne 0x422ad2
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 sym._fwrite
add esp, 0x10
jmp 0x423045
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 sym._printf
add esp, 8
jmp 0x422e4c
push dword [0x506340]
push esi
push 0x4f20c0
call sym._printf
add esp, 0xc
mov edi, dword [esp + 0x34]
push edi
push str.e_GaT_f100_tf__se_
call sym._printf
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 sym._fflush
add esp, 4
cmp byte [0x50634b], 0
je 0x422cc3
mov dword [0x507638], 0
mov dword [0x507634], 0
mov esi, dword [0x506344]
test esi, esi
je 0x422e4c
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 0x422c1c
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 sym._fwrite
add esp, 0x10
add ebx, 0x20
cmp ebx, esi
jbe 0x422c00
and esi, 0x1f
je 0x422c3b
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 sym._fwrite
add esp, 0x10
mov edi, dword [esp + 0x24]
jmp 0x422e4c
mov eax, dword [0x5052b0]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
cmp dword [0x506334], 0
je 0x422c96
cmp dword [0x506338], 0
je 0x422c96
mov edi, dword [0x50633c]
test edi, edi
je 0x422ed4
mov eax, dword [esp]
mov ecx, eax
sub ecx, 1
jb 0x422ddd
cmp ecx, edi
jb 0x422ddd
xor ecx, ecx
mov eax, dword [esp + 8]
jmp 0x422eb6
cmp byte [0x50634b], 0
mov eax, dword [0x50633c]
je 0x422d13
push 0xa
push eax
push esi
call dbg.ffStrbufAppendNC
add esp, 0xc
push 0x20
push dword [0x506340]
push esi
call dbg.ffStrbufAppendNC
add esp, 0xc
jmp 0x422d28
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 dbg.ffGetTerminalResponse
add esp, 0x10
test eax, eax
je 0x422e16
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 sym._fprintf_2
add esp, 0xc
jmp 0x422e4c
push dword [0x506340]
push eax
push 0x4f20c0
push esi
call dbg.ffStrbufAppendF
add esp, 0x10
mov edi, dword [esp + 0x34]
push edi
push str.e_1337_Fileinline1:_s_a
push esi
call dbg.ffStrbufAppendF
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 0x422d8e
mov dword [0x507638], 0
mov dword [0x507634], 0
push dword [0x506344]
push 0xa
call dbg.ffPrintCharTimes
add esp, 8
jmp 0x423035
mov word [esp + 0x20], 0
mov word [esp + 0x2a], 0
lea eax, [esp + 0x2a]
push esi
push eax
push 0x4f20ef
push 0x4f20ea
call dbg.ffGetTerminalResponse
add esp, 0x10
test eax, eax
je 0x422e63
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 sym._fprintf_2
add esp, 0xc
jmp 0x423035
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 0x422df0
test eax, eax
je 0x422e9f
push esi
push dword [esp + 0xc]
call sym._realloc
add esp, 8
mov ecx, dword [esp + 4]
jmp 0x422ead
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 sym._fwrite
add esp, 0x10
cmp dword [esp + 0x2c], 0
je 0x422e5c
push edi
call sym._free
add esp, 4
mov bl, 1
jmp 0x4229bf
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 sym._fwrite
add esp, 0x10
jmp 0x423035
push esi
call sym._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 sym._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 0x422f8b
mov eax, dword [esp]
mov esi, dword [esp + 4]
test eax, eax
je 0x422ef7
mov ecx, esi
not ecx
add ecx, eax
cmp ecx, ebp
jae 0x422f33
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 0x422f10
test eax, eax
je 0x422f39
push edi
push dword [esp + 0xc]
call sym._realloc
add esp, 8
mov dword [esp + 8], eax
mov esi, dword [esp + 4]
jmp 0x422f68
mov eax, dword [esp + 8]
jmp 0x422f6b
push edi
call sym._malloc
add esp, 4
test esi, esi
je 0x422f61
lea ecx, [esi + 1]
push ecx
push dword [esp + 0xc]
push eax
mov dword [esp + 0x30], eax
call sym._memcpy
mov eax, dword [esp + 0x30]
add esp, 0xc
jmp 0x422f64
mov byte [eax], 0
mov dword [esp + 8], eax
mov dword [esp], edi
add esi, eax
push ebp
push 0x20
push esi
call sym._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 dbg.ffStrbufAppendF
add esp, 0x18
cmp byte [0x50634b], 0
je 0x422fdf
mov dword [0x507638], 0
mov dword [0x507634], 0
push 0xa
push dword [0x506344]
push esi
call dbg.ffStrbufAppendNC
jmp 0x423011
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 dbg.ffStrbufAppendF
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 0x423045
push edi
call sym._free
add esp, 4
cmp dword [esp], 0
mov dword [esp + 4], 0
je 0x4229bf
mov dword [esp], 0
push dword [esp + 8]
call sym._free
add esp, 4
jmp 0x4229bf