Function at 0x404360
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
sub esp, 0x7c
mov ebp, dword [0x56cd08]
mov dword [esp + 0x3c], eax
mov byte [esp + 0x33], dl
test ebp, ebp
jne 0x404add
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._open
mov esi, eax
test eax, eax
js 0x404b9d
lea eax, [esp + 0x40]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat32i64]
test eax, eax
js 0x404b9d
mov eax, dword [esp + 0x58]
add eax, 1
mov dword [esp], eax
call sym._xmalloc
mov dword [esp], esi
mov ebx, eax
mov eax, dword [esp + 0x58]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
call sym._read
mov ebp, eax
test eax, eax
js 0x404b9d
mov byte [ebx + eax], 0
add ebp, 1
mov dword [esp], esi
call sym._close
mov dword [esp], ebp
call sym._xmalloc
movzx ecx, byte [ebx]
mov dword [esp + 0x28], eax
test cl, cl
je 0x404451
mov esi, eax
mov eax, ebx
movzx edx, byte [eax + 1]
cmp cl, 0xd
je 0x404437
mov byte [esi], cl
add esi, 1
add eax, 1
test dl, dl
je 0x404455
mov ecx, edx
movzx edx, byte [eax + 1]
cmp cl, 0xd
jne 0x404420
cmp ebx, eax
jae 0x404441
cmp byte [eax - 1], 0xa
je 0x404425
cmp dl, 0xa
je 0x404a9f
mov ecx, 0xa
jmp 0x404420
mov esi, dword [esp + 0x28]
mov byte [esi], 0
mov dword [esp], ebx
call sym._free
mov eax, edi
mov ebx, dword [esp + 0x28]
movzx eax, al
mov dword [esp + 0x38], eax
lea esi, [esi]
mov eax, ebx
call sym.skip_whitespace_char_
mov ebp, eax
movzx eax, byte [eax]
test al, al
je 0x404716
mov esi, ebp
cmp al, 0x25
jne 0x4044a7
cmp byte [esp + 0x33], 0
jne 0x4044a7
jmp 0x4044d4
movzx eax, byte [esi + 1]
add esi, 1
test al, al
je 0x404740
cmp al, 0x3a
je 0x404748
cmp al, 0xa
jne 0x404498
mov eax, dword [0x56cefc]
sub esi, dword [esp + 0x28]
mov dword [esp + 4], str.specs_file_malformed_after__ld_characters
mov dword [esp + 8], esi
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
cmp al, 0xa
je 0x4044e1
mov ebx, esi
movzx eax, byte [esi + 1]
add esi, 1
test al, al
jne 0x4044d0
mov dword [esp + 8], 8
add ebx, 2
mov dword [esp + 4], 0x4f5718
mov dword [esp], ebp
call sym._strncmp
test eax, eax
jne 0x404514
movzx eax, byte [ebp + 8]
cmp al, 0x20
je 0x404978
cmp al, 9
je 0x404978
mov dword [esp + 8], 0xe
mov dword [esp + 4], str._include_noerr
mov dword [esp], ebp
call sym._strncmp
test eax, eax
jne 0x404544
movzx eax, byte [ebp + 0xe]
cmp al, 0x20
je 0x4049e8
cmp al, 9
je 0x4049e8
mov dword [esp + 8], 7
mov dword [esp + 4], str._rename
mov dword [esp], ebp
call sym._strncmp
test eax, eax
jne 0x404bdd
movzx eax, byte [ebp + 7]
cmp al, 0x20
je 0x404574
cmp al, 9
jne 0x404bdd
movzx eax, byte [ebp + 8]
lea edx, [ebp + 8]
cmp al, 9
je 0x404588
cmp al, 0x20
jne 0x404597
lea esi, [esi]
nop
movzx eax, byte [edx + 1]
add edx, 1
cmp al, 0x20
je 0x404588
cmp al, 9
je 0x404588
test byte [eax + eax + 0x568980], 0x88
je 0x404bfa
movzx ecx, byte [edx]
mov eax, edx
test cl, cl
jne 0x4045c7
jmp 0x404939
movzx ecx, byte [eax + 1]
add eax, 1
test cl, cl
je 0x404939
movzx edi, cl
test byte [edi + edi + 0x568980], 0x40
je 0x4045b8
cmp cl, 0x20
jne 0x404930
mov ecx, eax
mov byte [eax], 0
lea edi, [eax + 1]
movzx eax, byte [eax + 1]
sub ecx, edx
cmp al, 9
je 0x4045f8
cmp al, 0x20
jne 0x404607
lea esi, [esi]
nop
movzx eax, byte [edi + 1]
add edi, 1
cmp al, 0x20
je 0x4045f8
cmp al, 9
je 0x4045f8
test byte [eax + eax + 0x568980], 0x88
je 0x404b5b
movzx eax, byte [edi]
mov ebp, edi
test al, al
jne 0x40462b
jmp 0x404635
movzx eax, byte [ebp + 1]
add ebp, 1
test al, al
je 0x404635
test byte [eax + eax + 0x568980], 0x40
je 0x404620
cmp esi, ebp
jne 0x404b07
mov ebp, dword [0x56a140]
mov byte [esi], 0
test ebp, ebp
je 0x404912
mov dword [esp + 0x2c], edi
mov esi, ecx
mov edi, ebp
mov dword [esp + 0x34], ebx
mov ebx, edx
jmp 0x40466b
mov edi, dword [edi + 0xc]
test edi, edi
je 0x404910
cmp dword [edi + 0x10], esi
jne 0x404660
mov dword [esp + 4], ebx
mov eax, dword [edi]
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x404660
mov esi, edi
mov edi, dword [esp + 0x2c]
mov edx, ebx
mov ebx, dword [esp + 0x34]
mov dword [esp], edx
mov dword [esp + 4], edi
mov dword [esp + 0x2c], edx
call sym._strcmp
test eax, eax
je 0x404470
mov ebx, ebp
mov ebp, dword [esp + 0x2c]
mov dword [esp + 4], edi
mov eax, dword [ebx]
mov dword [esp], eax
call sym._strcmp
test eax, eax
je 0x404b78
mov ebx, dword [ebx + 0xc]
test ebx, ebx
jne 0x4046ac
mov ecx, dword [0x56cd08]
mov ebx, dword [esp + 0x34]
test ecx, ecx
jne 0x404a61
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x38]
mov edx, dword [eax]
mov eax, edi
call sym.set_spec_char_const__char_const__bool_
cmp byte [esi + 0x15], 0
jne 0x404a4f
mov eax, dword [esi + 8]
mov dword [eax], 0x4f5098
mov eax, ebx
mov byte [esi + 0x15], 0
call sym.skip_whitespace_char_
mov ebp, eax
movzx eax, byte [eax]
test al, al
jne 0x404484
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__________flinker_output:_plugin_opt_linker_output_known_______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:__r:__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:__r:__nodefaultlibs:__:sanitize_address_:_______:sanitize_hwaddress_:_______: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:__r:__nodefaultlibs:__:sanitize_address_:_static_libasan:_Bstatic__lasan__static_libasan:_Bdynamic__static_libasanstatic:_:include_libsanitizer.spec___link_libasan______static:_ecannot_specify__static_with__fsanitizeaddress______:sanitize_hwaddress_:_static_libhwasan:_Bstatic__lhwasan__static_libhwasan:_Bdynamic__static_libhwasanstatic:_:include_libsanitizer.spec___link_libhwasan__t_static:_ecannot_specify__static_with__fsanitizehwaddress______: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:__r:__nodefaultlibs:__link_ssp____link_gcc_c_sequence_______nostdlib:__r:__nostartfiles:_E__T___n__post_link__]
test eax, eax
je 0x404b24
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call sym._free
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp al, 0x3a
jne 0x4044b3
mov ecx, dword [esp + 0x28]
mov eax, esi
cmp esi, dword [esp + 0x28]
jbe 0x40476d
lea esi, [esi]
movzx edx, byte [eax - 1]
cmp dl, 0x20
je 0x404766
cmp dl, 9
jne 0x40476d
sub eax, 1
cmp eax, ecx
jne 0x404758
sub eax, ebp
mov ebx, eax
lea eax, [eax + 1]
mov dword [esp], eax
call sym._xmalloc
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov edi, eax
mov dword [esp], eax
call sym._memcpy
mov byte [edi + ebx], 0
lea eax, [esi + 1]
call sym.skip_whitespace_char_
mov edx, eax
movzx eax, byte [eax + 1]
test al, al
je 0x404bc0
movzx ecx, byte [edx]
mov ebx, edx
test cl, cl
jne 0x4047cd
jmp 0x404a93
add ebx, 1
test al, al
je 0x4047e0
mov ecx, eax
movzx eax, byte [ebx + 1]
cmp cl, 0xa
jne 0x4047c0
cmp al, 0xa
je 0x4047e0
test al, al
je 0x4047e0
add ebx, 1
jmp 0x4047c7
mov ebp, ebx
sub ebp, edx
lea eax, [ebp + 1]
mov dword [esp], eax
mov dword [esp + 0x2c], edx
call sym._xmalloc
mov edx, dword [esp + 0x2c]
mov dword [esp + 8], ebp
mov dword [esp], eax
mov esi, eax
mov dword [esp + 4], edx
call sym._memcpy
mov byte [esi + ebp], 0
movzx eax, byte [esi]
mov ecx, esi
test al, al
je 0x404850
mov edx, esi
jmp 0x404833
cmp al, 0x23
je 0x404883
mov byte [ecx], al
add edx, 1
movzx eax, byte [edx]
add ecx, 1
test al, al
je 0x404850
cmp al, 0x5c
jne 0x404820
cmp byte [edx + 1], 0xa
jne 0x404824
movzx eax, byte [edx + 2]
add edx, 2
test al, al
jne 0x404833
lea esi, [esi]
nop
cmp byte [edi], 0x2a
mov byte [ecx], 0
jne 0x404896
mov dword [esp + 4], str.link_command
mov dword [esp], edi
call sym._strcmp
test eax, eax
jne 0x404960
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__________flinker_output:_plugin_opt_linker_output_known_______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:__r:__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:__r:__nodefaultlibs:__:sanitize_address_:_______:sanitize_hwaddress_:_______: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:__r:__nodefaultlibs:__:sanitize_address_:_static_libasan:_Bstatic__lasan__static_libasan:_Bdynamic__static_libasanstatic:_:include_libsanitizer.spec___link_libasan______static:_ecannot_specify__static_with__fsanitizeaddress______:sanitize_hwaddress_:_static_libhwasan:_Bstatic__lhwasan__static_libhwasan:_Bdynamic__static_libhwasanstatic:_:include_libsanitizer.spec___link_libhwasan__t_static:_ecannot_specify__static_with__fsanitizehwaddress______: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:__r:__nodefaultlibs:__link_ssp____link_gcc_c_sequence_______nostdlib:__r:__nostartfiles:_E__T___n__post_link__], esi
jmp 0x404470
add edx, 1
movzx eax, byte [edx]
cmp al, 0xa
je 0x40482f
test al, al
jne 0x404880
cmp byte [edi], 0x2a
mov byte [ecx], 0
je 0x404858
mov eax, dword [0x56a16c]
lea eax, [eax + eax*4 + 0xa]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [0x56a170]
mov dword [esp], eax
call sym._xrealloc
mov edx, dword [0x56a16c]
mov dword [0x56a170], eax
lea ecx, [edx + edx*4]
add edx, 1
shl ecx, 2
mov dword [0x56a16c], edx
lea ebp, [eax + ecx]
lea eax, [eax + ecx + 0x14]
mov dword [ebp], edi
mov dword [ebp + 4], esi
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
cmp byte [edi], 0
je 0x404870
jmp 0x404470
mov edx, ebx
mov eax, dword [0x56cefc]
mov dword [esp + 8], edx
mov dword [esp + 4], str.specs__s_spec_was_not_found_to_be_renamed
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
lea esi, [esi]
nop
cmp cl, 9
je 0x4045dd
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 [0x56cefc]
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
lea esi, [esi]
lea esi, [esi]
mov ecx, dword [esp + 0x38]
lea eax, [edi + 1]
mov edx, esi
call sym.set_spec_char_const__char_const__bool_
mov dword [esp], esi
call sym._free
jmp 0x4048fc
movzx edx, byte [ebp + 9]
lea eax, [ebp + 9]
cmp dl, 0x20
je 0x404990
cmp dl, 9
jne 0x4049a1
lea esi, [esi]
movzx edx, byte [eax + 1]
add eax, 1
cmp dl, 9
je 0x404990
cmp dl, 0x20
je 0x404990
lea edi, [eax + 1]
cmp dl, 0x3c
jne 0x404b39
cmp byte [esi - 1], 0x3e
jne 0x404b39
mov byte [esi - 1], 0
mov edx, edi
mov ecx, 4
mov eax, 0x4f3524
mov dword [esp], 1
call sym.find_a_file_path_prefix_const__char_const__int__bool_
mov ecx, dword [esp + 0x38]
test eax, eax
cmove eax, edi
xor edx, edx
call sym.read_specs_char_const__bool__bool_
jmp 0x404470
movzx edx, byte [ebp + 0xf]
lea eax, [ebp + 0xf]
cmp dl, 0x20
jne 0x404a04
lea esi, [esi]
movzx edx, byte [eax + 1]
add eax, 1
cmp dl, 0x20
je 0x4049f8
cmp dl, 9
je 0x4049f8
lea edi, [eax + 1]
cmp dl, 0x3c
jne 0x404b39
cmp byte [esi - 1], 0x3e
jne 0x404b39
mov byte [esi - 1], 0
mov ecx, 4
mov edx, edi
mov eax, 0x4f3524
mov dword [esp], 1
call sym.find_a_file_path_prefix_const__char_const__int__bool_
test eax, eax
je 0x404aa9
mov ecx, dword [esp + 0x38]
xor edx, edx
call sym.read_specs_char_const__bool__bool_
jmp 0x404470
mov eax, dword [esi + 8]
mov eax, dword [eax]
mov dword [esp], eax
call sym._free
jmp 0x4046f5
mov dword [esp + 0x2c], ebp
mov dword [esp], 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0xc], edi
mov dword [esp + 4], str.rename_spec__s_to__s_n
mov dword [esp + 8], edx
mov dword [esp], eax
call sym.fnotice__iobuf__char_const__..._
jmp 0x4046db
xor ebp, ebp
mov eax, 1
jmp 0x4047e7
add eax, 1
mov ecx, edx
jmp 0x40442e
mov esi, dword [0x56cd08]
test esi, esi
je 0x404470
mov dword [esp], 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov dword [esp + 8], edi
mov dword [esp + 4], str.could_not_find_specs_file__s_n
mov dword [esp], eax
call sym.fnotice__iobuf__char_const__..._
jmp 0x404470
mov dword [esp], 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov ebx, dword [esp + 0x3c]
mov dword [esp + 4], str.Reading_specs_from__s_n
mov dword [esp], eax
mov dword [esp + 8], ebx
call sym.fnotice__iobuf__char_const__..._
jmp 0x40437f
mov eax, dword [0x56cefc]
sub ebp, dword [esp + 0x28]
mov dword [esp + 4], str.specs___rename_syntax_malformed_after__ld_characters
mov dword [esp + 8], ebp
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
mov eax, dword [0x56cefc]
mov dword [esp + 4], str.spec_file_has_no_spec_for_linking
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
mov eax, edi
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 [0x56cefc]
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
mov eax, dword [0x56cefc]
sub edi, dword [esp + 0x28]
mov dword [esp + 4], str.specs___rename_syntax_malformed_after__ld_characters
mov dword [esp + 8], edi
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [0x56cefc]
mov dword [esp + 4], str._s:_attempt_to_rename_spec__qs_to_already_defined_spec__qs
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], str.cannot_read_spec_file__qs:__m
mov dword [esp + 8], eax
mov eax, dword [0x56cefc]
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
lea esi, [esi]
mov eax, dword [0x56cefc]
sub edx, dword [esp + 0x28]
mov dword [esp + 4], str.specs_file_malformed_after__ld_characters
mov dword [esp + 8], edx
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
mov eax, dword [0x56cefc]
sub ebp, dword [esp + 0x28]
mov dword [esp + 4], str.specs_unknown____command_after__ld_characters
mov dword [esp + 8], ebp
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
mov eax, dword [0x56cefc]
sub edx, dword [esp + 0x28]
mov dword [esp + 4], str.specs___rename_syntax_malformed_after__ld_characters
mov dword [esp + 8], edx
mov dword [esp], eax
call sym.fatal_error_unsigned_int__char_const__..._
lea esi, [esi]
nop