Function at 0x409340
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov rax, qword [0x005cfdf0]
mov qword [rsp + 0x38], rcx
mov ecx, dword [rax + 0xed0]
mov r12d, edx
mov byte [rsp + 0x37], r8b
test ecx, ecx
jne 0x409aa0
mov rcx, qword [rsp + 0x38]
xor r8d, r8d
xor edx, edx
call sub.msvcrt.dll__open_1
test eax, eax
mov edi, eax
js 0x409ac4
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.msvcrt.dll__stat64]
test eax, eax
js 0x409ac4
mov rax, qword [rsp + 0x58]
lea rcx, [rax + 1]
call fcn.00482890
mov r8d, dword [rsp + 0x58]
mov ecx, edi
mov rdx, rax
mov rsi, rax
call sub.msvcrt.dll__read_1
test eax, eax
mov ebx, eax
js 0x409ac4
cdqe
mov ecx, edi
mov byte [rsi + rax], 0
call sub.msvcrt.dll__close_1
lea ecx, [rbx + 1]
movsxd rcx, ecx
call fcn.00482890
mov rbx, rax
mov rcx, rax
mov rax, rsi
jmp 0x4093ff
mov byte [rcx], dl
add rcx, 1
add rax, 1
je 0x409423
movzx edx, byte [rax]
test dl, dl
je 0x409423
cmp dl, 0xd
jne 0x4093f3
cmp rsi, rax
jae 0x409416
cmp byte [rax - 1], 0xa
je 0x4093f9
cmp byte [rax + 1], 0xa
je 0x4093f9
mov edx, 0xa
jmp 0x4093f3
mov byte [rcx], 0
mov rcx, rsi
mov r13, rbx
call fcn.0049a918
mov rcx, r13
call fcn.00401550
movzx edx, byte [rax]
test dl, dl
je 0x4096e9
cmp dl, 0x25
jne 0x409451
test r12b, r12b
mov r13, rax
je 0x4094a8
cmp dl, 0x3a
mov rsi, rax
jne 0x409478
jmp 0x4095c9
add rsi, 1
movzx edx, byte [rsi]
test dl, dl
je 0x4095c0
cmp dl, 0x3a
je 0x4095c0
cmp dl, 0xa
jne 0x409460
mov r8d, esi
mov rax, qword [0x005cfe40]
sub r8d, ebx
lea rdx, str.specs_file_malformed_after__ld_characters
mov ecx, dword [rax]
call fcn.00428180
nop dword [rax + rax]
cmp cl, 0xa
je 0x4094b5
mov r13, rdx
movzx ecx, byte [r13 + 1]
lea rdx, [r13 + 1]
test cl, cl
jne 0x4094a0
mov ecx, 8
mov rsi, rax
add r13, 2
lea rdi, [0x004a3c77]
repe cmpsb byte [rsi], byte [rdi]
seta cl
sbb cl, 0
test cl, cl
jne 0x4094ea
movzx ecx, byte [rax + 8]
cmp cl, 9
je 0x409928
cmp cl, 0x20
je 0x409928
lea rdi, str._include_noerr
mov ecx, 0xe
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
seta cl
sbb cl, 0
test cl, cl
jne 0x40951b
movzx ecx, byte [rax + 0xe]
cmp cl, 9
je 0x4099a0
cmp cl, 0x20
je 0x4099a0
lea rdi, str._rename
mov ecx, 7
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
seta cl
sbb cl, 0
test cl, cl
jne 0x409ad3
movzx ecx, byte [rax + 7]
cmp cl, 9
je 0x40954c
cmp cl, 0x20
jne 0x409ad3
lea r14, [rax + 8]
movzx eax, byte [rax + 8]
cmp al, 0x20
je 0x409560
cmp al, 9
jne 0x409570
nop dword [rax]
add r14, 1
movzx eax, byte [r14]
cmp al, 9
je 0x409560
cmp al, 0x20
je 0x409560
mov rcx, qword [0x005cfd20]
test byte [rcx + rax*2], 0x88
je 0x409ace
movzx eax, byte [r14]
test al, al
je 0x409a82
movzx r8d, al
test byte [rcx + r8*2], 0x40
mov r8, r14
je 0x4095af
jmp 0x4097ec
movzx r9d, al
test byte [rcx + r9*2], 0x40
jne 0x4097ec
add r8, 1
movzx eax, byte [r8]
test al, al
jne 0x4095a0
jmp 0x409a85
cmp dl, 0x3a
jne 0x40947d
cmp rbx, rsi
jae 0x409920
movzx edx, byte [rsi - 1]
cmp dl, 0x20
je 0x4095e4
cmp dl, 9
jne 0x409920
mov rdx, rsi
nop word [rax + rax]
sub rdx, 1
cmp rdx, rbx
je 0x409607
movzx ecx, byte [rdx - 1]
cmp cl, 9
je 0x4095f0
cmp cl, 0x20
je 0x4095f0
sub rdx, rax
mov rcx, rax
call fcn.00401810
lea rcx, [rsi + 1]
mov rbp, rax
call fcn.00401550
movzx edx, byte [rax + 1]
test dl, dl
je 0x409b61
movzx r8d, byte [rax]
mov r13, rax
test r8b, r8b
jne 0x409650
jmp 0x409a44
add r13, 1
test dl, dl
je 0x409665
mov r8d, edx
movzx edx, byte [r13 + 1]
cmp r8b, 0xa
jne 0x409640
cmp dl, 0xa
je 0x409665
test dl, dl
je 0x409665
add r13, 1
jmp 0x409648
mov edx, r13d
sub edx, eax
mov rcx, rax
call fcn.00401810
mov r14, rax
movzx eax, byte [rax]
mov rcx, r14
mov rdx, r14
test al, al
je 0x4096a4
cmp al, 0x5c
je 0x409730
cmp al, 0x23
je 0x40971a
mov byte [rcx], al
movzx eax, byte [rdx + 1]
add rcx, 1
add rdx, 1
test al, al
jne 0x409682
mov byte [rcx], 0
cmp byte [rbp], 0x2a
jne 0x409750
lea rdi, str.link_command
mov ecx, 0xe
mov rsi, rbp
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
jne 0x4097d0
mov rcx, r13
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__], r14
call fcn.00401550
movzx edx, byte [rax]
test dl, dl
jne 0x409444
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 0x409aee
mov rcx, rbx
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.0049a918
cmp al, 0xa
je 0x40967e
add rdx, 1
movzx eax, byte [rdx]
test al, al
jne 0x409712
jmp 0x40967e
cmp byte [rdx + 1], 0xa
jne 0x409692
movzx eax, byte [rdx + 2]
add rdx, 2
jmp 0x40967e
mov eax, dword [0x005de220]
mov rcx, qword [0x005de228]
lea edx, [rax + 2]
movsxd rdx, edx
shl rdx, 5
call fcn.00482910
movsxd rdx, dword [0x005de220]
mov qword [0x005de228], rax
mov rcx, rdx
shl rdx, 5
lea r8, [rax + rdx]
add ecx, 1
lea rax, [rax + rdx + 0x20]
mov qword [r8], rbp
mov qword [r8 + 8], r14
mov dword [0x005de220], ecx
mov qword [rax], 0
mov qword [rax + 8], 0
mov qword [rax + 0x10], 0
mov qword [rax + 0x18], 0
cmp byte [rbp], 0
je 0x4096cf
jmp 0x409431
movzx r8d, byte [rsp + 0x37]
lea rcx, [rbp + 1]
mov rdx, r14
call fcn.004025f0
mov rcx, r14
call fcn.0049a918
jmp 0x4097b9
cmp al, 0x20
jne 0x40990b
movzx eax, byte [r8 + 1]
lea rdi, [r8 + 1]
mov ebp, r8d
mov byte [r8], 0
sub ebp, r14d
cmp al, 0x20
jne 0x40981b
nop dword [rax + rax]
add rdi, 1
movzx eax, byte [rdi]
cmp al, 0x20
je 0x409810
cmp al, 9
je 0x409810
test byte [rcx + rax*2], 0x88
je 0x409b59
movzx eax, byte [rdi]
mov r8, rdi
test al, al
jne 0x409841
jmp 0x409847
add r8, 1
movzx eax, byte [r8]
test al, al
je 0x409847
test byte [rcx + rax*2], 0x40
je 0x409835
cmp rdx, r8
jne 0x409a85
mov r15, qword [0x005de1c8]
mov byte [rdx], 0
test r15, r15
je 0x409b41
mov rsi, r15
jmp 0x40987d
mov rsi, qword [rsi + 0x18]
test rsi, rsi
je 0x409b41
cmp dword [rsi + 0x20], ebp
jne 0x409870
mov rcx, qword [rsi]
mov rdx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x409870
mov rdx, rdi
mov rcx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x409431
mov rcx, qword [r15]
mov rdx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x409b1f
mov r15, qword [r15 + 0x18]
test r15, r15
jne 0x4098a4
mov rax, qword [0x005cfdf0]
mov eax, dword [rax + 0xed0]
test eax, eax
jne 0x409a1f
mov rax, qword [rsi + 0x10]
mov rcx, rdi
movzx r8d, byte [rsp + 0x37]
mov rdx, qword [rax]
call fcn.004025f0
cmp byte [rsi + 0x25], 0
jne 0x409a0e
mov rax, qword [rsi + 0x10]
lea rdi, section..rdata
mov qword [rax], rdi
mov byte [rsi + 0x25], 0
jmp 0x409431
cmp al, 9
je 0x4097f4
jmp 0x409a85
mov rdx, rsi
jmp 0x409607
lea rcx, [rax + 9]
movzx eax, byte [rax + 9]
cmp al, 0x20
je 0x409940
cmp al, 9
jne 0x40994f
nop dword [rax + rax]
add rcx, 1
movzx eax, byte [rcx]
cmp al, 9
je 0x409940
cmp al, 0x20
je 0x409940
lea rsi, [rcx + 1]
cmp al, 0x3c
jne 0x409b03
cmp byte [rdx - 1], 0x3e
jne 0x409b03
mov byte [rdx - 1], 0
mov r9d, 1
mov rdx, rsi
mov r8d, 4
lea rcx, [0x004a18a0]
call fcn.00403930
movzx r8d, byte [rsp + 0x37]
test rax, rax
cmove rax, rsi
xor edx, edx
mov rcx, rax
call fcn.00409340
jmp 0x409431
lea rcx, [rax + 0xf]
movzx eax, byte [rax + 0xf]
cmp al, 0x20
je 0x4099b0
cmp al, 9
jne 0x4099bf
add rcx, 1
movzx eax, byte [rcx]
cmp al, 9
je 0x4099b0
cmp al, 0x20
je 0x4099b0
lea rsi, [rcx + 1]
cmp al, 0x3c
jne 0x409b03
cmp byte [rdx - 1], 0x3e
jne 0x409b03
mov byte [rdx - 1], 0
mov r9d, 1
mov r8d, 4
mov rdx, rsi
lea rcx, [0x004a18a0]
call fcn.00403930
test rax, rax
je 0x409a4b
movzx r8d, byte [rsp + 0x37]
xor edx, edx
mov rcx, rax
call fcn.00409340
jmp 0x409431
mov rax, qword [rsi + 0x10]
mov rcx, qword [rax]
call fcn.0049a918
jmp 0x4098f4
mov ecx, 2
call qword [fcn.0049ab10]
mov r9, rdi
mov r8, r14
lea rdx, str.rename_spec__s_to__s_n
mov rcx, rax
call fcn.00426ce0
jmp 0x4098d5
xor edx, edx
jmp 0x40966a
mov rax, qword [0x005cfdf0]
mov edx, dword [rax + 0xed0]
test edx, edx
je 0x409431
mov ecx, 2
call qword [fcn.0049ab10]
lea rdx, str.could_not_find_specs_file__s_n
mov r8, rsi
mov rcx, rax
call fcn.00426ce0
jmp 0x409431
mov r8, r14
mov rax, qword [0x005cfe40]
sub r8d, ebx
lea rdx, str.specs___rename_syntax_malformed_after__ld_characters
mov ecx, dword [rax]
call fcn.00428180
nop dword [rax]
mov ecx, 2
call qword [fcn.0049ab10]
mov r8, qword [rsp + 0x38]
lea rdx, str.Reading_specs_from__s_n
mov rcx, rax
call fcn.00426ce0
jmp 0x409375
mov rcx, qword [rsp + 0x38]
call fcn.004092f0
mov r8d, r14d
jmp 0x409a85
lea rdx, str.specs_unknown____command_after__ld_characters
mov r8d, eax
mov rax, qword [0x005cfe40]
sub r8d, ebx
mov ecx, dword [rax]
call fcn.00428180
mov rax, qword [0x005cfe40]
lea rdx, str.spec_file_has_no_spec_for_linking
mov ecx, dword [rax]
call fcn.00428180
mov rax, qword [0x005cfe40]
sub rsi, rbx
lea r8d, [rsi + 1]
lea rdx, str.specs___include_syntax_malformed_after__ld_characters
mov ecx, dword [rax]
call fcn.00428180
mov rax, qword [0x005cfe40]
mov qword [rsp + 0x20], rdi
mov r9, r14
mov r8, qword [rsp + 0x38]
lea rdx, str._s:_attempt_to_rename_spec__qs_to_already_defined_spec__qs
mov ecx, dword [rax]
call fcn.00428180
mov rax, qword [0x005cfe40]
mov r8, r14
lea rdx, str.specs__s_spec_was_not_found_to_be_renamed
mov ecx, dword [rax]
call fcn.00428180
mov r8d, edi
jmp 0x409a85
mov r8d, eax
jmp 0x409480