Function at 0x409400
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov rax, qword [0x004e1d10]
mov qword [rsp + 0x40], rcx
mov byte [rsp + 0x3e], dl
mov byte [rsp + 0x3f], r8b
mov ecx, dword [rax + 0xdb0]
test ecx, ecx
jne 0x409b4f
mov rcx, qword [rsp + 0x40]
xor r8d, r8d
xor edx, edx
call sub.msvcrt.dll__open_1
test eax, eax
mov edi, eax
js 0x409bba
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.msvcrt.dll__stat64]
test eax, eax
js 0x409bba
mov rax, qword [rsp + 0x68]
lea rcx, [rax + 1]
call fcn.0046aaf0
mov r8d, dword [rsp + 0x68]
mov rdx, rax
mov ecx, edi
mov rsi, rax
call sub.msvcrt.dll__read_1
test eax, eax
mov ebx, eax
js 0x409bba
cdqe
mov ecx, edi
mov byte [rsi + rax], 0
call sub.msvcrt.dll__close_1
lea ecx, [rbx + 1]
movsxd rcx, ecx
call fcn.0046aaf0
mov rbx, rax
mov rcx, rax
mov rax, rsi
jmp 0x4094c0
mov byte [rcx], dl
add rcx, 1
add rax, 1
je 0x4094e8
movzx edx, byte [rax]
test dl, dl
je 0x4094e8
cmp dl, 0xd
jne 0x4094b4
cmp rsi, rax
jae 0x4094d7
cmp byte [rax - 1], 0xa
je 0x4094ba
cmp byte [rax + 1], 0xa
mov edx, 0xa
jne 0x4094b4
add rax, 1
jne 0x4094c0
mov byte [rcx], 0
mov rcx, rsi
mov r15, rbx
call fcn.00483488
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
mov r12, qword [0x004e1c40]
mov qword [rsp + 0x48], rax
nop dword [rax]
mov rcx, r15
call fcn.004015b0
movzx edx, byte [rax]
test dl, dl
je 0x409792
cmp dl, 0x25
jne 0x40963f
cmp byte [rsp + 0x3e], 0
mov r15, rax
je 0x409547
jmp 0x40963f
test dl, dl
je 0x409555
mov r15, r9
movzx edx, byte [r15 + 1]
lea r9, [r15 + 1]
cmp dl, 0xa
jne 0x409540
lea rdi, [0x0048bc9f]
mov ecx, 8
mov rsi, rax
add r15, 2
repe cmpsb byte [rsi], byte [rdi]
jne 0x409582
movzx edx, byte [rax + 8]
cmp dl, 0x20
je 0x4099f5
cmp dl, 9
je 0x4099f5
lea rdi, str._include_noerr
mov ecx, 0xe
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
jne 0x4095ab
movzx edx, byte [rax + 0xe]
cmp dl, 0x20
je 0x409a67
cmp dl, 9
je 0x409a67
lea rdi, str._rename
mov ecx, 7
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
jne 0x409b9a
movzx edx, byte [rax + 7]
cmp dl, 0x20
je 0x4095d4
cmp dl, 9
jne 0x409b9a
lea rdi, [rax + 8]
movzx eax, byte [rax + 8]
cmp al, 9
jne 0x4095eb
add rdi, 1
movzx eax, byte [rdi]
cmp al, 9
je 0x4095e0
cmp al, 0x20
je 0x4095e0
test byte [r12 + rax*2], 0x88
je 0x409bb5
movzx eax, byte [rdi]
test al, al
je 0x409b77
movzx edx, al
mov r8, rdi
test byte [r12 + rdx*2], 0x40
je 0x40962e
jmp 0x4098a3
movzx edx, al
test byte [r12 + rdx*2], 0x40
jne 0x4098a3
add r8, 1
movzx eax, byte [r8]
test al, al
jne 0x409620
jmp 0x409b7a
cmp dl, 0x3a
je 0x409b6f
cmp dl, 0xa
mov rsi, rax
je 0x409665
add rsi, 1
movzx edx, byte [rsi]
test dl, dl
je 0x409680
cmp dl, 0x3a
je 0x409680
cmp dl, 0xa
jne 0x409650
mov r8d, esi
mov rax, qword [0x004e1d60]
lea rdx, str.specs_file_malformed_after__ld_characters
sub r8d, ebx
mov ecx, dword [rax]
call fcn.004246b0
cmp dl, 0x3a
jne 0x409665
cmp rbx, rsi
jae 0x40989b
movzx edx, byte [rsi - 1]
cmp dl, 9
je 0x4096a0
cmp dl, 0x20
jne 0x40989b
mov rdx, rsi
sub rdx, 1
cmp rdx, rbx
je 0x4096ba
movzx ecx, byte [rdx - 1]
cmp cl, 0x20
je 0x4096a3
cmp cl, 9
je 0x4096a3
sub rdx, rax
mov rcx, rax
call fcn.00401820
lea rcx, [rsi + 1]
mov rbp, rax
call fcn.004015b0
movzx edx, byte [rax + 1]
test dl, dl
je 0x409bd9
movzx r8d, byte [rax]
mov r15, rax
test r8b, r8b
jne 0x409700
jmp 0x409894
add r15, 1
test dl, dl
je 0x409715
mov r8d, edx
movzx edx, byte [r15 + 1]
cmp r8b, 0xa
jne 0x4096f0
cmp dl, 0xa
je 0x409715
test dl, dl
je 0x409715
add r15, 1
jmp 0x4096f8
mov edx, r15d
sub edx, eax
mov rcx, rax
call fcn.00401820
mov r13, rax
movzx eax, byte [rax]
mov rcx, r13
mov rdx, r13
test al, al
je 0x409754
cmp al, 0x5c
je 0x4097e0
cmp al, 0x23
je 0x4097c8
mov byte [rcx], al
movzx eax, byte [rdx + 1]
add rcx, 1
add rdx, 1
test al, al
jne 0x409732
mov byte [rcx], 0
cmp byte [rbp], 0x2a
jne 0x409800
lea rdi, str.link_command
mov ecx, 0xe
mov rsi, rbp
repe cmpsb byte [rsi], byte [rdi]
jne 0x409878
mov rcx, r15
mov qword [str.__fsyntax_only:__c:__M:__MM:__E:__S:______linker____fno_use_linker_plugin:__fno_lto:______plugin___linker_plugin_file_______plugin_opt__lto_wrapper_______plugin_opt_fresolution_u.res_______nostdlib:__nodefaultlibs:_:pass_through_libs___link_gcc_c_sequence________fltoflto:__fcompare_debug______flto__fno_lto__flto__l__staticsharedr:_pie:_pie__fuse_ld:_fuse_ld____gzgzzlib:__compress_debug_sectionszlib__gznone:__compress_debug_sectionsnone__gzzlib_gnu:__compress_debug_sectionszlib_gnu__X__o__e__N__n__r_____s__t__u__z__Z___nostdlib:__nostartfiles:_S______staticno_piestatic_pie:__L___mfwrap____link_libgcc___fvtable_verifynone:__fvtable_verifystd:____e_fvtable_verifystd_is_not_supported_in_this_configuration__fvtable_verifypreinit:____e_fvtable_verifypreinit_is_not_supported_in_this_configuration___nostdlib:__nodefaultlibs:__:sanitize_address_:_______:sanitize_thread_:_______:sanitize_leak_:__o_______fopenaccfopenmp_:gt__ftree_parallelize_loops:__1_:_t_:include_libgomp.spec___link_gomp______fgnu_tm:_:include_libitm.spec___link_itm_______mflib____fsplit_stack:___wrappthread_create_____fprofile_arcsfprofile_generatecoverage:_lgcov___nostdlib:__nodefaultlibs:__:sanitize_address_:_static_libasan:_Bstatic__lasan__static_libasan:_Bdynamic__static_libasanstatic:_:include_libsanitizer.spec___link_libasan______static:_ecannot_specify__static_with__fsanitizeaddress______:sanitize_thread_:_static_libtsan:_Bstatic__ltsan__static_libtsan:_Bdynamic__static_libtsanstatic:_:include_libsanitizer.spec___link_libtsan______static:_ecannot_specify__static_with__fsanitizethread______:sanitize_undefined_:_static_libubsan:_Bstatic__lubsan__static_libubsan:_Bdynamic__static_libubsanstatic:_:include_libsanitizer.spec___link_libubsan_______:sanitize_leak_:_static_liblsan:_Bstatic__llsan__static_liblsan:_Bdynamic__static_liblsanstatic:_:include_libsanitizer.spec___link_liblsan________nostdlib:__nodefaultlibs:__link_ssp____link_gcc_c_sequence_______nostdlib:__nostartfiles:_E__T___n__post_link__], r13
call fcn.004015b0
movzx edx, byte [rax]
test dl, dl
jne 0x409523
cmp qword [str.__fsyntax_only:__c:__M:__MM:__E:__S:______linker____fno_use_linker_plugin:__fno_lto:______plugin___linker_plugin_file_______plugin_opt__lto_wrapper_______plugin_opt_fresolution_u.res_______nostdlib:__nodefaultlibs:_:pass_through_libs___link_gcc_c_sequence________fltoflto:__fcompare_debug______flto__fno_lto__flto__l__staticsharedr:_pie:_pie__fuse_ld:_fuse_ld____gzgzzlib:__compress_debug_sectionszlib__gznone:__compress_debug_sectionsnone__gzzlib_gnu:__compress_debug_sectionszlib_gnu__X__o__e__N__n__r_____s__t__u__z__Z___nostdlib:__nostartfiles:_S______staticno_piestatic_pie:__L___mfwrap____link_libgcc___fvtable_verifynone:__fvtable_verifystd:____e_fvtable_verifystd_is_not_supported_in_this_configuration__fvtable_verifypreinit:____e_fvtable_verifypreinit_is_not_supported_in_this_configuration___nostdlib:__nodefaultlibs:__:sanitize_address_:_______:sanitize_thread_:_______:sanitize_leak_:__o_______fopenaccfopenmp_:gt__ftree_parallelize_loops:__1_:_t_:include_libgomp.spec___link_gomp______fgnu_tm:_:include_libitm.spec___link_itm_______mflib____fsplit_stack:___wrappthread_create_____fprofile_arcsfprofile_generatecoverage:_lgcov___nostdlib:__nodefaultlibs:__:sanitize_address_:_static_libasan:_Bstatic__lasan__static_libasan:_Bdynamic__static_libasanstatic:_:include_libsanitizer.spec___link_libasan______static:_ecannot_specify__static_with__fsanitizeaddress______:sanitize_thread_:_static_libtsan:_Bstatic__ltsan__static_libtsan:_Bdynamic__static_libtsanstatic:_:include_libsanitizer.spec___link_libtsan______static:_ecannot_specify__static_with__fsanitizethread______:sanitize_undefined_:_static_libubsan:_Bstatic__lubsan__static_libubsan:_Bdynamic__static_libubsanstatic:_:include_libsanitizer.spec___link_libubsan_______:sanitize_leak_:_static_liblsan:_Bstatic__llsan__static_liblsan:_Bdynamic__static_liblsanstatic:_:include_libsanitizer.spec___link_liblsan________nostdlib:__nodefaultlibs:__link_ssp____link_gcc_c_sequence_______nostdlib:__nostartfiles:_E__T___n__post_link__], 0
je 0x409bc4
mov rcx, rbx
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.00483488
cmp al, 0xa
je 0x40972e
add rdx, 1
movzx eax, byte [rdx]
test al, al
jne 0x4097c0
jmp 0x40972e
cmp byte [rdx + 1], 0xa
jne 0x409742
movzx eax, byte [rdx + 2]
add rdx, 2
jmp 0x40972e
mov eax, dword [0x004ee220]
mov rcx, qword [0x004ee228]
lea edx, [rax + 2]
movsxd rdx, edx
shl rdx, 5
call fcn.0046ab70
movsxd rdx, dword [0x004ee220]
mov qword [0x004ee228], rax
mov rcx, rdx
shl rdx, 5
lea r8, [rax + rdx]
lea rax, [rax + rdx + 0x20]
add ecx, 1
mov dword [0x004ee220], ecx
mov qword [r8], rbp
mov qword [r8 + 8], r13
mov qword [rax], 0
mov qword [rax + 8], 0
mov qword [rax + 0x10], 0
mov qword [rax + 0x18], 0
cmp byte [rbp], 0
je 0x409778
jmp 0x409510
movzx r8d, byte [rsp + 0x3f]
lea rcx, [rbp + 1]
mov rdx, r13
call fcn.00402750
mov rcx, r13
call fcn.00483488
jmp 0x409869
xor edx, edx
jmp 0x40971a
mov rdx, rsi
jmp 0x4096ba
cmp al, 0x20
jne 0x409af7
movzx eax, byte [r8 + 1]
mov r14d, r8d
lea rbp, [r8 + 1]
sub r14d, edi
mov byte [r8], 0
cmp al, 0x20
je 0x4098d0
cmp al, 9
jne 0x4098e0
nop word cs:[rax + rax]
add rbp, 1
movzx eax, byte [rbp]
cmp al, 9
je 0x4098d0
cmp al, 0x20
je 0x4098d0
test byte [r12 + rax*2], 0x88
je 0x409be1
movzx eax, byte [rbp]
test al, al
je 0x409b92
test byte [r12 + rax*2], 0x40
mov r8, rbp
je 0x40990a
jmp 0x409916
test byte [r12 + rax*2], 0x40
jne 0x409916
add r8, 1
movzx eax, byte [r8]
test al, al
jne 0x409903
cmp r9, r8
jne 0x409b7a
mov r13, qword [0x004ee1c8]
mov byte [r9], 0
test r13, r13
je 0x4099dd
mov rsi, r13
jmp 0x40994d
mov rsi, qword [rsi + 0x18]
test rsi, rsi
je 0x4099dd
cmp r14d, dword [rsi + 0x20]
jne 0x409940
mov rcx, qword [rsi]
mov rdx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x409940
mov rdx, rbp
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x409510
mov rcx, qword [r13]
mov rdx, rbp
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x409be6
mov r13, qword [r13 + 0x18]
test r13, r13
jne 0x409975
mov rax, qword [0x004e1d10]
mov eax, dword [rax + 0xdb0]
test eax, eax
jne 0x409b2e
mov rax, qword [rsi + 0x10]
movzx r8d, byte [rsp + 0x3f]
mov rcx, rbp
mov rdx, qword [rax]
call fcn.00402750
cmp byte [rsi + 0x25], 0
jne 0x409b1d
mov rax, qword [rsi + 0x10]
lea rdi, [0x0048a040]
mov qword [rax], rdi
mov byte [rsi + 0x25], 0
jmp 0x409510
mov rax, qword [0x004e1d60]
lea rdx, str.specs__s_spec_was_not_found_to_be_renamed
mov r8, rdi
mov ecx, dword [rax]
call fcn.004246b0
lea rdx, [rax + 9]
movzx eax, byte [rax + 9]
cmp al, 9
je 0x409a05
cmp al, 0x20
jne 0x409a14
add rdx, 1
movzx eax, byte [rdx]
cmp al, 0x20
je 0x409a05
cmp al, 9
je 0x409a05
cmp al, 0x3c
lea rsi, [rdx + 1]
jne 0x409b01
cmp byte [r9 - 1], 0x3e
jne 0x409b01
lea rcx, [0x004898a0]
mov byte [r9 - 1], 0
mov r8d, 4
mov r9d, 1
mov rdx, rsi
call fcn.00403810
test rax, rax
cmove rax, rsi
movzx r8d, byte [rsp + 0x3f]
xor edx, edx
mov rcx, rax
call fcn.00409400
jmp 0x409510
lea rdx, [rax + 0xf]
movzx eax, byte [rax + 0xf]
cmp al, 0x20
je 0x409a80
cmp al, 9
jne 0x409a8f
nop word [rax + rax]
add rdx, 1
movzx eax, byte [rdx]
cmp al, 9
je 0x409a80
cmp al, 0x20
je 0x409a80
cmp al, 0x3c
lea rsi, [rdx + 1]
jne 0x409b01
cmp byte [r9 - 1], 0x3e
jne 0x409b01
lea rcx, [0x004898a0]
mov byte [r9 - 1], 0
mov r8d, 4
mov r9d, 1
mov rdx, rsi
call fcn.00403810
test rax, rax
jne 0x409a52
mov rax, qword [0x004e1d10]
mov edx, dword [rax + 0xdb0]
test edx, edx
je 0x409510
mov rax, qword [rsp + 0x48]
call rax
lea rdx, str.could_not_find_specs_file__s_n
lea rcx, [rax + 0x60]
mov r8, rsi
call fcn.004230f0
jmp 0x409510
cmp al, 9
je 0x4098ab
jmp 0x409b7a
mov rax, qword [0x004e1d60]
sub rsi, rbx
lea rdx, str.specs___include_syntax_malformed_after__ld_characters
lea r8d, [rsi + 1]
mov ecx, dword [rax]
call fcn.004246b0
mov rax, qword [rsi + 0x10]
mov rcx, qword [rax]
call fcn.00483488
jmp 0x4099c6
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str.rename_spec__s_to__s_n
lea rcx, [rax + 0x60]
mov r9, rbp
mov r8, rdi
call fcn.004230f0
jmp 0x4099a7
call qword [sym.imp.msvcrt.dll___iob_func]
mov r8, qword [rsp + 0x40]
lea rcx, [rax + 0x60]
lea rdx, str.Reading_specs_from__s_n
call fcn.004230f0
jmp 0x409436
mov rsi, rax
jmp 0x409685
mov r8, rdi
mov rax, qword [0x004e1d60]
lea rdx, str.specs___rename_syntax_malformed_after__ld_characters
sub r8d, ebx
mov ecx, dword [rax]
call fcn.004246b0
mov r8, rbp
jmp 0x409916
mov r8d, eax
mov rax, qword [0x004e1d60]
lea rdx, str.specs_unknown____command_after__ld_characters
sub r8d, ebx
mov ecx, dword [rax]
call fcn.004246b0
mov r8d, edi
jmp 0x409b7a
mov rcx, qword [rsp + 0x40]
call fcn.004093b0
mov rax, qword [0x004e1d60]
lea rdx, str.spec_file_has_no_spec_for_linking
mov ecx, dword [rax]
call fcn.004246b0
mov r8d, eax
jmp 0x409668
mov r8d, ebp
jmp 0x409b7a
mov rax, qword [0x004e1d60]
mov qword [rsp + 0x20], rbp
lea rdx, str._s:_attempt_to_rename_spec__qs_to_already_defined_spec__qs
mov r8, qword [rsp + 0x40]
mov r9, rdi
mov ecx, dword [rax]
call fcn.004246b0
nop
nop dword [rax]
push rbx
sub rsp, 0x20
cmp ecx, 1
mov rbx, rdx
jne 0x409c57
mov rdx, qword [rdx]
lea rcx, [0x004898a0]
mov r9d, 1
mov r8d, 4
call fcn.00403810
test rax, rax
je 0x409c52
mov rcx, rax
xor r8d, r8d
xor edx, edx
call fcn.00409400
xor eax, eax
add rsp, 0x20
pop rbx
ret
mov rax, qword [rbx]
jmp 0x409c3d
lea r8, str.include_spec_function
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s3_elf_src_gcc_gcc_gcc.c
mov edx, 0x2584
call fcn.00487f40
nop