Function at 0x4093c0
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x7c
mov esi, dword [0x4ddd1c]
mov dword [esp + 0x38], eax
mov byte [esp + 0x33], dl
test esi, esi
jne 0x409ac9
mov eax, dword [esp + 0x38]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll__open_1
test eax, eax
mov esi, eax
js 0x409b37
lea eax, [esp + 0x40]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__stati64]
test eax, eax
js 0x409b37
mov eax, dword [esp + 0x58]
add eax, 1
mov dword [esp], eax
call fcn.0046ea40
mov edi, eax
mov eax, dword [esp + 0x58]
mov dword [esp], esi
mov dword [esp + 4], edi
mov dword [esp + 8], eax
call sub.msvcrt.dll__read_1
test eax, eax
mov ebp, eax
js 0x409b37
mov byte [edi + eax], 0
add ebp, 1
mov dword [esp], esi
call sub.msvcrt.dll__close_1
mov dword [esp], ebp
call fcn.0046ea40
mov dword [esp + 0x28], eax
mov ecx, eax
mov eax, edi
jmp 0x40947c
mov byte [ecx], dl
add ecx, 1
add eax, 1
je 0x4094a2
movzx edx, byte [eax]
test dl, dl
je 0x4094a2
cmp dl, 0xd
jne 0x409472
cmp edi, eax
jae 0x409492
cmp byte [eax - 1], 0xa
je 0x409477
cmp byte [eax + 1], 0xa
mov edx, 0xa
jne 0x409472
add eax, 1
jne 0x40947c
mov byte [ecx], 0
mov dword [esp], edi
call sub.msvcrt.dll_free
mov ebp, dword [esp + 0x28]
movzx eax, bl
mov dword [esp + 0x34], eax
nop
lea esi, [esi]
mov eax, ebp
call fcn.00401570
movzx edx, byte [eax]
test dl, dl
je 0x40971c
cmp dl, 0x25
jne 0x4095e0
cmp byte [esp + 0x33], 0
mov ebp, eax
je 0x4094f6
jmp 0x4095e0
test cl, cl
je 0x409502
mov ebp, edx
movzx ecx, byte [ebp + 1]
lea edx, [ebp + 1]
cmp cl, 0xa
jne 0x4094f0
mov edi, 0x48fbfb
mov ecx, 8
mov esi, eax
add ebp, 2
repe cmpsb byte [esi], byte es:[edi]
jne 0x40952b
movzx ecx, byte [eax + 8]
cmp cl, 0x20
je 0x409978
cmp cl, 9
je 0x409978
mov edi, str._include_noerr
mov ecx, 0xe
mov esi, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x409551
movzx ecx, byte [eax + 0xe]
cmp cl, 0x20
je 0x4099e4
cmp cl, 9
je 0x4099e4
mov edi, str._rename
mov ecx, 7
mov esi, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x409b43
movzx ecx, byte [eax + 7]
cmp cl, 0x20
je 0x409577
cmp cl, 9
jne 0x409b43
lea edi, [eax + 8]
movzx eax, byte [eax + 8]
cmp al, 9
jne 0x40958c
add edi, 1
movzx eax, byte [edi]
cmp al, 9
je 0x409582
cmp al, 0x20
je 0x409582
test byte [eax + eax + 0x4d7540], 0x88
je 0x409af1
movzx ecx, byte [edi]
test cl, cl
je 0x409af1
movzx eax, cl
test byte [eax + eax + 0x4d7540], 0x40
mov eax, edi
je 0x4095d1
jmp 0x40981e
movzx ebx, cl
test byte [ebx + ebx + 0x4d7540], 0x40
jne 0x40981e
add eax, 1
movzx ecx, byte [eax]
test cl, cl
jne 0x4095c0
jmp 0x409af3
cmp dl, 0x3a
je 0x409aea
cmp dl, 0xa
mov ebx, eax
je 0x409604
add ebx, 1
movzx edx, byte [ebx]
test dl, dl
je 0x409621
cmp dl, 0x3a
je 0x409621
cmp dl, 0xa
jne 0x4095f0
sub ebx, dword [esp + 0x28]
mov eax, dword [0x4dded0]
mov dword [esp + 4], str.specs_file_malformed_after__ld_characters
mov dword [esp], eax
mov dword [esp + 8], ebx
call fcn.00426430
cmp dl, 0x3a
jne 0x409604
cmp dword [esp + 0x28], ebx
jae 0x4096a4
movzx edx, byte [ebx - 1]
cmp dl, 9
je 0x40963a
cmp dl, 0x20
jne 0x4096a4
mov edx, ebx
lea esi, [esi]
sub edx, 1
cmp edx, dword [esp + 0x28]
je 0x409657
movzx ecx, byte [edx - 1]
cmp cl, 0x20
je 0x409640
cmp cl, 9
je 0x409640
sub edx, eax
call fcn.00401760
mov dword [esp + 0x2c], eax
lea eax, [ebx + 1]
call fcn.00401570
movzx edx, byte [eax + 1]
test dl, dl
je 0x409b9a
movzx ecx, byte [eax]
mov ebp, eax
test cl, cl
jne 0x409691
jmp 0x409817
add ebp, 1
test dl, dl
je 0x4096b0
mov ecx, edx
movzx edx, byte [ebp + 1]
cmp cl, 0xa
jne 0x409684
cmp dl, 0xa
je 0x4096b0
test dl, dl
je 0x4096b0
add ebp, 1
jmp 0x40968b
mov edx, ebx
jmp 0x409657
mov edx, ebp
sub edx, eax
call fcn.00401760
mov ebx, eax
movzx eax, byte [eax]
mov ecx, ebx
mov edx, ebx
test al, al
je 0x4096e2
cmp al, 0x5c
je 0x409760
cmp al, 0x23
je 0x409748
mov byte [ecx], al
movzx eax, byte [edx + 1]
add ecx, 1
add edx, 1
test al, al
jne 0x4096c6
mov esi, dword [esp + 0x2c]
mov byte [ecx], 0
cmp byte [esi], 0x2a
jne 0x409780
mov edi, str.link_command
mov ecx, 0xe
repe cmpsb byte [esi], byte es:[edi]
jne 0x4097fb
mov eax, ebp
mov dword [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__], ebx
call fcn.00401570
movzx edx, byte [eax]
test dl, dl
jne 0x4094d2
mov eax, dword [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__]
test eax, eax
je 0x409b60
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_free
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp al, 0xa
je 0x4096c2
add edx, 1
movzx eax, byte [edx]
test al, al
jne 0x409740
jmp 0x4096c2
cmp byte [edx + 1], 0xa
jne 0x4096d2
movzx eax, byte [edx + 2]
add edx, 2
jmp 0x4096c2
mov eax, dword [0x4dc144]
lea eax, [eax + eax*4 + 0xa]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [0x4dc148]
mov dword [esp], eax
call fcn.0046eac0
mov edx, dword [0x4dc144]
mov edi, dword [esp + 0x2c]
mov dword [0x4dc148], eax
lea ecx, [edx + edx*4]
add edx, 1
mov dword [0x4dc144], edx
shl ecx, 2
lea esi, [eax + ecx]
lea eax, [eax + ecx + 0x14]
mov dword [esi], edi
mov dword [esi + 4], ebx
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov eax, dword [esp + 0x2c]
cmp byte [eax], 0
je 0x409704
jmp 0x4094c0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
mov edx, ebx
add eax, 1
call fcn.00402690
mov dword [esp], ebx
call sub.msvcrt.dll_free
jmp 0x4097e9
xor edx, edx
jmp 0x4096b4
cmp cl, 0x20
jne 0x409a5d
mov esi, eax
lea ebx, [eax + 1]
mov byte [eax], 0
movzx eax, byte [eax + 1]
sub esi, edi
mov dword [esp + 0x2c], esi
cmp al, 0x20
je 0x409841
cmp al, 9
jne 0x40984f
add ebx, 1
movzx eax, byte [ebx]
cmp al, 9
je 0x409841
cmp al, 0x20
je 0x409841
test byte [eax + eax + 0x4d7540], 0x88
je 0x409bb7
movzx eax, byte [ebx]
test al, al
je 0x409b10
test byte [eax + eax + 0x4d7540], 0x40
mov ecx, ebx
je 0x40988a
jmp 0x409894
test byte [eax + eax + 0x4d7540], 0x40
jne 0x409894
add ecx, 1
movzx eax, byte [ecx]
test al, al
jne 0x409880
cmp edx, ecx
jne 0x409b1a
mov byte [edx], 0
mov edx, dword [0x4dc118]
test edx, edx
je 0x40995f
mov dword [esp + 0x3c], ebx
mov esi, edx
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x2c], edx
jmp 0x4098cb
mov esi, dword [esi + 0xc]
test esi, esi
je 0x40995f
cmp ebx, dword [esi + 0x10]
jne 0x4098c0
mov dword [esp + 4], edi
mov eax, dword [esi]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x4098c0
mov ebx, dword [esp + 0x3c]
mov dword [esp], edi
mov dword [esp + 4], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4094c0
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x3c], esi
mov esi, edx
mov dword [esp + 4], ebx
mov eax, dword [esi]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x409b75
mov esi, dword [esi + 0xc]
test esi, esi
jne 0x409904
mov edx, dword [0x4ddd1c]
mov esi, dword [esp + 0x3c]
test edx, edx
jne 0x409aa4
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x34]
mov edx, dword [eax]
mov eax, ebx
call fcn.00402690
cmp byte [esi + 0x15], 0
jne 0x409a92
mov eax, dword [esi + 8]
mov dword [eax], 0x48e040
mov byte [esi + 0x15], 0
jmp 0x4094c0
mov eax, dword [0x4dded0]
mov dword [esp + 8], edi
mov dword [esp + 4], str.specs__s_spec_was_not_found_to_be_renamed
mov dword [esp], eax
call fcn.00426430
lea ecx, [eax + 9]
movzx eax, byte [eax + 9]
cmp al, 9
je 0x409990
cmp al, 0x20
jne 0x40999e
mov esi, esi
lea edi, [edi]
add ecx, 1
movzx eax, byte [ecx]
cmp al, 0x20
je 0x409990
cmp al, 9
je 0x409990
cmp al, 0x3c
lea ebx, [ecx + 1]
jne 0x409a70
cmp byte [edx - 1], 0x3e
jne 0x409a70
mov byte [edx - 1], 0
mov ecx, 4
mov dword [esp], 1
mov edx, ebx
mov eax, 0x48d508
call fcn.004038b0
test eax, eax
cmove eax, ebx
mov ecx, dword [esp + 0x34]
xor edx, edx
call fcn.004093c0
jmp 0x4094c0
lea ecx, [eax + 0xf]
movzx eax, byte [eax + 0xf]
cmp al, 0x20
je 0x4099f3
cmp al, 9
jne 0x409a01
add ecx, 1
movzx eax, byte [ecx]
cmp al, 9
je 0x4099f3
cmp al, 0x20
je 0x4099f3
cmp al, 0x3c
lea ebx, [ecx + 1]
jne 0x409a70
cmp byte [edx - 1], 0x3e
jne 0x409a70
mov byte [edx - 1], 0
mov ecx, 4
mov dword [esp], 1
mov edx, ebx
mov eax, 0x48d508
call fcn.004038b0
test eax, eax
jne 0x4099d4
mov ecx, dword [0x4ddd1c]
test ecx, ecx
je 0x4094c0
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.could_not_find_specs_file__s_n
add eax, 0x40
mov dword [esp], eax
call fcn.00424d30
jmp 0x4094c0
cmp cl, 9
je 0x409827
jmp 0x409af3
mov eax, ebx
sub eax, dword [esp + 0x28]
mov dword [esp + 4], str.specs___include_syntax_malformed_after__ld_characters
add eax, 1
mov dword [esp + 8], eax
mov eax, dword [0x4dded0]
mov dword [esp], eax
call fcn.00426430
mov eax, dword [esi + 8]
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x40994d
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], str.rename_spec__s_to__s_n
add eax, 0x40
mov dword [esp], eax
call fcn.00424d30
jmp 0x409933
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.Reading_specs_from__s_n
add eax, 0x40
mov dword [esp], eax
call fcn.00424d30
jmp 0x4093df
mov ebx, eax
jmp 0x409626
mov eax, edi
sub eax, dword [esp + 0x28]
mov dword [esp + 4], str.specs___rename_syntax_malformed_after__ld_characters
mov dword [esp + 8], eax
mov eax, dword [0x4dded0]
mov dword [esp], eax
call fcn.00426430
mov ecx, ebx
cmp edx, ecx
je 0x40989c
sub ecx, dword [esp + 0x28]
mov eax, dword [0x4dded0]
mov dword [esp + 4], str.specs___rename_syntax_malformed_after__ld_characters
mov dword [esp], eax
mov dword [esp + 8], ecx
call fcn.00426430
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.00409370
sub eax, dword [esp + 0x28]
mov dword [esp + 4], str.specs_unknown____command_after__ld_characters
mov dword [esp + 8], eax
mov eax, dword [0x4dded0]
mov dword [esp], eax
call fcn.00426430
mov eax, dword [0x4dded0]
mov dword [esp + 4], str.spec_file_has_no_spec_for_linking
mov dword [esp], eax
call fcn.00426430
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], edi
mov dword [esp + 4], str._s:_attempt_to_rename_spec__qs_to_already_defined_spec__qs
mov dword [esp + 8], eax
mov eax, dword [0x4dded0]
mov dword [esp], eax
call fcn.00426430
sub eax, dword [esp + 0x28]
mov dword [esp + 4], str.specs_file_malformed_after__ld_characters
mov dword [esp + 8], eax
mov eax, dword [0x4dded0]
mov dword [esp], eax
call fcn.00426430
sub ebx, dword [esp + 0x28]
mov eax, dword [0x4dded0]
mov dword [esp + 4], str.specs___rename_syntax_malformed_after__ld_characters
mov dword [esp], eax
mov dword [esp + 8], ebx
call fcn.00426430
lea esi, [esi]
lea edi, [edi]
push ebx
sub esp, 0x18
cmp dword [esp + 0x20], 1
mov ebx, dword [esp + 0x24]
jne 0x409c32
mov dword [esp], 1
mov edx, dword [ebx]
mov ecx, 4
mov eax, 0x48d508
call fcn.004038b0
test eax, eax
je 0x409c20
xor ecx, ecx
xor edx, edx
call fcn.004093c0
add esp, 0x18
xor eax, eax
pop ebx
ret
mov eax, dword [ebx]
xor ecx, ecx
xor edx, edx
call fcn.004093c0
add esp, 0x18
xor eax, eax
pop ebx
ret
mov dword [esp + 8], str.include_spec_function
mov dword [esp + 4], 0x2584
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_gcc_gcc_gcc.c
call fcn.0048c200
nop