Function at 0x40ed30
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
lea rax, [0x004e8baf]
test rcx, rcx
mov qword [rsp + 0x110], rcx
mov rbx, rdx
mov qword [0x005395c8], rax
mov qword [0x005395c0], rax
je 0x40f5d4
mov rcx, qword [rsp + 0x110]
lea rdx, [0x004e8c24]
call sub.msvcrt.dll_fopen
test rax, rax
mov qword [0x005395e8], rax
mov dword [rsp + 0x48], 0
je 0x40f5b0
mov r13, qword [0x0051f230]
mov eax, dword [r13]
test al, 4
je 0x40edb1
mov dword [0x004d40e4], 0
test al, 0x80
jne 0x40ee00
mov edi, eax
and edi, 1
mov dword [rsp + 0x4c], edi
jne 0x40ef77
test al, 2
jne 0x40f310
mov eax, dword [rsp + 0x48]
test eax, eax
je 0x40f555
mov rcx, qword [0x005395f8]
test rcx, rcx
je 0x40edea
call sub.msvcrt.dll_fclose
nop
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor ecx, ecx
mov dword [0x005395d4], 1
lea rbp, [rbx + 8]
call fcn.0040e2d0
lea rax, [0x004e8c90]
mov rcx, qword [0x005395e8]
lea r9, str.xtensa_esp32s2_elf
lea r8, str.2.35.1
lea rdx, str._GNU_assembler_version__s___s__n_t_using_BFD_version__s.
mov r14d, 0x13
mov qword [rsp + 0x20], rax
lea r12, [0x004e8d47]
lea r15, [0x004e8d4a]
call sub.msvcrt.dll_fprintf
mov r9, qword [0x005395e8]
lea rcx, str._n_options_passed_t:
mov r8d, 0x13
mov edx, 1
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x40ee8d
jmp 0x40eec0
mov rbx, qword [rbp + 8]
add rbp, 8
test rbx, rbx
je 0x40eec0
cmp byte [rbx], 0x2d
jne 0x40ee80
mov ecx, 3
mov rsi, rbx
mov rdi, r12
repe cmpsb byte [rsi], byte [rdi]
jne 0x40f020
cmp qword [rbp + 8], 0
je 0x40eec0
mov rbx, qword [rbp + 0x10]
add rbp, 8
add rbp, 8
test rbx, rbx
jne 0x40ee8d
nop dword [rax]
mov r8, qword [0x005395d8]
mov rcx, qword [0x005395e8]
lea rdx, str._n_input_file_____t:__s
lea rbx, [rsp + 0xa0]
call sub.msvcrt.dll_fprintf
mov rax, qword [0x0051f3c0]
mov rcx, qword [0x005395e8]
lea rdx, str._n_output_file____t:__s
mov r8, qword [rax]
call sub.msvcrt.dll_fprintf
mov rcx, qword [0x005395e8]
lea r8, str.xtensa_esp32s2_elf
lea rdx, str._n_target_________t:__s
call sub.msvcrt.dll_fprintf
xor ecx, ecx
call qword [sym.imp.msvcrt.dll__time64]
lea rcx, [rsp + 0x98]
mov qword [rsp + 0x98], rax
call qword [sym.imp.msvcrt.dll__localtime64]
lea r8, str._Y__m__dT_H:_M:_S.000_z
mov r9, rax
mov edx, 0x1e
mov rcx, rbx
call sub.msvcrt.dll_strftime
mov rcx, qword [0x005395e8]
lea rdx, str._n_time_stamp_____t:__s_n_n
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov eax, dword [r13]
mov edi, eax
and edi, 1
mov dword [rsp + 0x4c], edi
je 0x40edc4
movsxd rcx, dword [0x004d40ec]
call fcn.004cb930
mov r14, rax
mov eax, dword [0x004d40f4]
mov edx, dword [0x004d40f8]
lea eax, [rax + rax*8]
lea edx, [rdx + rdx*8]
imul eax, dword [0x004d40f0]
lea ecx, [rax + rdx + 0x14]
movsxd rcx, ecx
call fcn.004cb930
mov rdx, qword [0x005395f0]
mov qword [0x005395e0], rax
mov dword [0x005395d4], 1
mov rbx, qword [rdx + 0x20]
test rbx, rbx
je 0x40fa24
xor r12d, r12d
mov r15d, dword [rsp + 0x4c]
mov rax, r12
mov r12, rbx
mov rbx, rax
mov eax, dword [r12 + 0x48]
mov esi, dword [0x004d40e8]
cmp dword [0x004d40ec], esi
mov edi, dword [r12 + 8]
cmovle esi, dword [0x004d40ec]
cmp eax, 6
ja case.default.0x40f017
lea rcx, [0x004e8e7c]
mov edx, eax
movsxd rdx, dword [rcx + rdx*4]
add rdx, rcx
jmp rdx
mov ecx, 3
mov rsi, rbx
mov rdi, r15
repe cmpsb byte [rsi], byte [rdi]
je 0x40ee80
mov rcx, rbx
call sub.msvcrt.dll_strlen
add r14d, eax
cmp r14d, dword [0x004d40e8]
mov rsi, rax
mov r8, rbx
jl 0x40fa02
mov rcx, qword [0x005395e8]
lea rdx, str._n_t_s
mov r14d, esi
call sub.msvcrt.dll_fprintf
mov rbx, qword [rbp + 8]
jmp 0x40ee84
mov rdx, qword [r12 + 0x50]
mov qword [0x005395c8], rdx
test r15d, r15d
jle 0x40f220
cmp eax, 4
jne 0x40f09a
add r15d, 1
add edi, 1
test r15d, r15d
jle 0x40f11b
mov rbp, qword [r12 + 0x28]
test rbp, rbp
je 0x40f6b0
mov r11d, dword [r12 + 0x30]
test r11d, r11d
je 0x40f0bd
test byte [r13], 8
jne 0x40f6c1
mov rcx, qword [r12 + 0x18]
test rcx, rcx
je 0x40f182
test byte [r13], 0x10
je 0x40f2b2
mov r8d, dword [r12 + 0x58]
test r8d, r8d
je 0x40f2a1
mov dword [0x00539440], 1
call sub.msvcrt.dll_free
mov qword [r12 + 0x18], 0
mov eax, dword [r12 + 0x48]
cmp eax, 6
je 0x40f2f5
cmp r15d, 1
mov rbx, rbp
jne 0x40f11b
cmp eax, 5
jne 0x40f11b
xor r15d, r15d
mov r12, qword [r12 + 0x20]
test r12, r12
jne 0x40efe1
mov rbx, qword [0x005395e0]
mov rcx, r14
call sub.msvcrt.dll_free
mov rcx, rbx
call sub.msvcrt.dll_free
mov qword [0x005395e0], 0
mov eax, dword [r13]
jmp 0x40edc4
mov rcx, qword [r12 + 0x20]
mov rdx, rbx
mov dword [rsp + 0x50], r9d
call fcn.0040e090
test eax, eax
mov r9d, dword [rsp + 0x50]
jne 0x40f182
mov rax, qword [r12 + 0x10]
mov r8, rbx
mov rcx, r12
mov edx, dword [rax + 0x14]
call fcn.0040e4a0
mov rcx, qword [r12 + 0x10]
cmp edi, dword [rcx + 0x14]
jbe 0x40f0fc
mov edx, dword [rcx + 0x18]
test edx, edx
jne 0x40f0fc
mov r8d, esi
mov rdx, r14
call fcn.0040e790
mov rbx, rax
mov rax, qword [r12 + 0x10]
mov r9d, 0xffffffff
cmp edi, dword [rax + 0x14]
jbe 0x40f2e5
test byte [r13], 0x10
je 0x40f16f
mov ecx, dword [r12 + 0x58]
test ecx, ecx
je 0x40f154
mov rcx, qword [r12 + 0x10]
mov dword [0x00539440], 1
cmp edi, dword [rcx + 0x14]
ja 0x40f190
jmp 0x40f0fc
test r15d, r15d
jne case.0x40f017.0
mov rcx, qword [r12 + 0x10]
sub edi, 1
cmp edi, dword [rcx + 0x14]
ja 0x40f22a
jmp 0x40f08a
sub edi, 1
test r15d, r15d
jg 0x40f08a
nop dword [rax]
mov rcx, qword [r12 + 0x10]
cmp edi, dword [rcx + 0x14]
jbe 0x40f258
mov r11d, dword [rcx + 0x18]
test r11d, r11d
je 0x40f23e
jmp 0x40f258
mov r10d, dword [rcx + 0x18]
test r10d, r10d
jne 0x40f253
mov r8d, esi
mov rdx, r14
call fcn.0040e790
mov rcx, qword [r12 + 0x10]
cmp dword [rcx + 0x14], edi
jb 0x40f235
mov eax, dword [r12 + 0x48]
cmp eax, 4
je 0x40f08a
test r15d, r15d
jne 0x40f11b
cmp eax, 5
je 0x40f08a
jmp 0x40f11b
sub r15d, 1
jmp case.0x40f017.0
mov rdx, qword [r12 + 0x50]
mov qword [0x005395c0], rdx
jmp case.0x40f017.0
mov rdx, rcx
mov rcx, qword [r12 + 0x20]
call fcn.0040e090
test eax, eax
jne 0x40f2db
mov rcx, r12
call fcn.0040dea0
mov r9d, eax
mov rax, qword [r12 + 0x10]
mov r8, qword [r12 + 0x18]
mov edx, dword [rax + 0x14]
test edx, edx
jne 0x40f2d3
mov edx, dword [r12 + 8]
mov rcx, r12
call fcn.0040e4a0
mov rcx, qword [r12 + 0x18]
jmp 0x40f0ee
mov rcx, r12
call fcn.0040dea0
mov r9d, eax
jmp 0x40f1bd
mov dword [0x005395d4], 1
mov rbx, rbp
jmp 0x40f11b
xor ecx, ecx
mov dword [0x005395d4], 1
xor r12d, r12d
call fcn.0040e2d0
mov rax, qword [0x0051f4b0]
mov rsi, qword [0x0051ed80]
mov rbx, qword [rax]
test rbx, rbx
je 0x40f640
mov rdi, qword [0x0051f400]
mov rbp, qword [0x0051f020]
lea r14, [rsp + 0xa0]
jmp 0x40f39b
mov rcx, rbx
call fcn.0041db50
cmp rax, qword [rdi]
je 0x40f3c3
mov rcx, rbx
call fcn.0041db50
cmp rax, qword [rbp]
je 0x40f3c3
mov rcx, rbx
call fcn.00420920
test eax, eax
je 0x40f485
mov rcx, rbx
call fcn.004202b0
test rax, rax
mov rbx, rax
je 0x40f3e7
mov rcx, rbx
call fcn.0041db50
lea rdx, [rsi + 0x250]
cmp rax, rdx
je 0x40f3c3
mov rcx, rbx
call fcn.0041db50
lea rdx, [rsi + 0x128]
cmp rax, rdx
jne 0x40f360
mov rcx, rbx
call fcn.0041db50
lea rdx, [rsi + 0x250]
cmp rax, rdx
je 0x40f37b
mov rcx, rbx
call fcn.004202b0
test rax, rax
mov rbx, rax
jne 0x40f39b
test r12d, r12d
je 0x40f640
lea rdx, [0x004e8bef]
xor ecx, ecx
xor edi, edi
call fcn.0040e460
mov rax, qword [0x0051f4b0]
mov rbx, qword [rax]
mov rax, qword [0x0051ed80]
test rbx, rbx
lea rsi, [rax + 0x128]
jne 0x40f436
jmp 0x40f5fa
mov rcx, rbx
call fcn.004202b0
test rax, rax
mov rbx, rax
je 0x40f5f2
mov rcx, rbx
call fcn.0041db20
test rax, rax
je 0x40f422
mov rcx, rbx
call fcn.0041db20
cmp byte [rax], 0
je 0x40f422
mov rcx, rbx
call fcn.0041db50
cmp rax, rsi
jne 0x40f422
test edi, edi
je 0x40f9ef
mov rcx, rbx
mov edi, 1
call fcn.0041db20
lea rdx, [0x004e8bab]
mov r8, rax
xor ecx, ecx
call fcn.0040e460
jmp 0x40f422
mov rcx, rbx
call fcn.0041db20
test rax, rax
je 0x40f38b
mov rcx, rbx
call fcn.0041ef20
lea rdx, [0x004e8e02]
mov r8, rax
mov rcx, r14
call sub.msvcrt.dll_sprintf
test r12d, r12d
je 0x40f610
mov rcx, rbx
call fcn.004205a0
test rax, rax
je 0x40f670
mov rcx, rbx
call fcn.004205a0
cmp qword [rax + 0x50], 0
je 0x40f670
mov rcx, rbx
call fcn.0041db20
mov rcx, rbx
mov r15, rax
call fcn.0041db50
mov rcx, rbx
mov r13, qword [rax]
call fcn.004205a0
mov rax, qword [rax + 0x50]
mov rcx, rbx
mov r12d, dword [rax + 8]
call fcn.004205a0
mov rax, qword [rax + 0x50]
mov rcx, qword [0x005395e8]
lea rdx, str._20s:__5d___s:_s__s_n
mov r9d, r12d
mov rax, qword [rax + 0x10]
mov r8, qword [rax + 8]
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r13
call sub.msvcrt.dll_fprintf
xor ecx, ecx
add dword [0x005395b8], 1
mov r12d, 1
call fcn.0040e2d0
jmp 0x40f38b
mov rcx, qword [0x005395e8]
call sub.msvcrt.dll_fclose
cmp eax, 0xffffffff
jne 0x40edd8
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call fcn.004cba30
mov rdx, qword [rsp + 0x110]
lea rcx, [0x004e8e66]
mov r8, rax
call fcn.004129a0
jmp 0x40edd8
lea r8, str.listing_listing
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_gas_listing.c
mov edx, 0x4db
call fcn.00412bc0
nop dword [rax + rax]
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call fcn.004cba30
mov rdx, qword [rsp + 0x110]
lea rcx, str.cant_open__s:__s
mov r8, rax
call fcn.004129a0
call qword [sym.imp.msvcrt.dll___iob_func]
add rax, 0x30
mov dword [rsp + 0x48], 1
mov qword [0x005395e8], rax
jmp 0x40ed98
test edi, edi
jne 0x40edcc
lea rdx, str.NO_UNDEFINED_SYMBOLS_n
xor ecx, ecx
call fcn.0040e460
jmp 0x40edcc
mov r9, qword [0x005395e8]
lea rcx, str.DEFINED_SYMBOLS_n
mov r8d, 0x10
mov edx, 1
call sub.msvcrt.dll_fwrite
add dword [0x005395b8], 1
jmp 0x40f4b9
mov r9, qword [0x005395e8]
lea rcx, str.NO_DEFINED_SYMBOLS_n
mov r8d, 0x13
mov edx, 1
call sub.msvcrt.dll_fwrite
add dword [0x005395b8], 1
jmp 0x40f3f0
mov rcx, rbx
call fcn.0041db20
mov rcx, rbx
mov r12, rax
call fcn.0041db50
mov qword [rsp + 0x20], r12
mov rcx, qword [0x005395e8]
lea rdx, str._33s:_s__s_n
mov r8, qword [rax]
mov r9, r14
call sub.msvcrt.dll_fprintf
jmp 0x40f53c
test rbx, rbx
je 0x40f0bd
mov rbp, rbx
jmp 0x40f0a8
mov eax, dword [rbp + 0x14]
cmp r11d, eax
jae 0x40f920
lea rax, [0x00539460]
mov rbx, rax
mov rdx, rax
xor eax, eax
cmp qword [rdx], rbp
je 0x40fa2c
add eax, 1
add rdx, 0x70
cmp eax, 3
jne 0x40f6dc
movsxd rdx, dword [0x00539444]
mov ecx, 0
lea eax, [rdx + 1]
cmp eax, 3
cmove eax, ecx
mov dword [0x00539444], eax
lea rax, [rdx*8]
sub rax, rdx
shl rax, 4
add rax, rbx
cmp esi, 1
mov qword [rsp + 0x58], rax
mov qword [rax], rbp
lea r10, [rax + 0xc]
mov dword [rax + 8], r11d
mov byte [rax + 0xc], 0
jbe 0x40fa6a
mov rbx, qword [0x00539600]
mov rcx, qword [0x005395f8]
test rbx, rbx
je 0x40f753
cmp rbx, rbp
je 0x40f7c9
test rcx, rcx
je 0x40f780
mov qword [rsp + 0x60], r10
mov dword [rsp + 0x50], r11d
call sub.msvcrt.dll_ftell
mov rcx, qword [0x005395f8]
mov dword [rbx + 0x10], eax
call sub.msvcrt.dll_fclose
mov r10, qword [rsp + 0x60]
mov r11d, dword [rsp + 0x50]
mov rcx, qword [rbp + 8]
lea rdx, [0x004e8bf1]
mov qword [rsp + 0x60], r10
mov dword [rsp + 0x50], r11d
mov qword [0x00539600], rbp
call sub.msvcrt.dll_fopen
test rax, rax
mov rcx, rax
mov qword [0x005395f8], rax
mov r11d, dword [rsp + 0x50]
mov r10, qword [rsp + 0x60]
je 0x40fc3d
mov edx, dword [rbp + 0x10]
test edx, edx
jne 0x40fa7d
mov qword [rsp + 0x60], r10
mov dword [rsp + 0x50], r11d
call sub.msvcrt.dll_ftell
cmp eax, 2
mov dword [rsp + 0x78], eax
mov r11d, dword [rsp + 0x50]
mov r10, qword [rsp + 0x60]
jle 0x40fa6f
lea eax, [rsi - 1]
mov ebx, dword [rbp + 0x14]
mov qword [rsp + 0x70], r12
mov dword [rsp + 0x7c], esi
mov dword [rsp + 0x80], edi
mov rsi, r10
mov dword [rsp + 0x60], eax
mov qword [rsp + 0x50], rax
add rax, r10
mov rdx, rax
mov byte [rax], 0
mov eax, dword [rsp + 0x78]
mov qword [rsp + 0x88], rbp
add ebx, 1
mov qword [rsp + 0x68], r14
mov dword [rsp + 0x84], r15d
mov ebp, r11d
mov rdi, rdx
mov ecx, eax
xor eax, eax
mov r12d, ecx
mov r14d, eax
xor r14d, 1
mov r15d, r14d
mov r14, rdi
test r12d, r12d
jle 0x40faa5
test r15b, r15b
je 0x40faa5
mov eax, dword [rsp + 0x60]
cmp eax, r12d
jg 0x40fa1a
mov edi, r12d
sub edi, eax
mov r12d, edi
mov rcx, qword [0x005395f8]
xor r8d, r8d
mov edx, r12d
call sub.msvcrt.dll_fseek
mov r9, qword [0x005395f8]
mov r8, qword [rsp + 0x50]
mov edx, 1
mov rcx, rsi
call sub.msvcrt.dll_fread
cmp qword [rsp + 0x50], rax
jne 0x40fb99
cmp rsi, r14
mov rax, r14
jbe 0x40f8c9
jmp 0x40f850
sub rax, 1
cmp rsi, rax
ja 0x40f850
cmp byte [rax], 0xa
jne 0x40f8c0
sub ebx, 1
cmp ebp, ebx
jne 0x40f8c0
mov rdx, rax
mov r15d, edi
mov rdi, r14
sub rdx, rsi
add r15d, edx
lea rdx, [rax + 1]
cmp r14, rdx
je 0x40fc1d
cmp byte [rax + 1], 0xd
sete al
movzx eax, al
lea r12d, [r15 + rax + 1]
mov rcx, qword [0x005395f8]
xor r8d, r8d
mov edx, r12d
call sub.msvcrt.dll_fseek
mov eax, dword [rsp + 0x4c]
jmp 0x40f843
mov ebx, dword [rbp + 0x18]
test ebx, ebx
jne 0x40f0bd
cmp r11d, eax
jbe 0x40f0bd
lea rdx, [0x00539460]
mov qword [rsp + 0x50], r14
mov dword [rsp + 0x58], edi
mov r14, rdx
jmp 0x40f95d
mov r9d, dword [rbp + 0x18]
test r9d, r9d
jne 0x40f9e1
movsxd rdx, dword [0x00539444]
add eax, 1
mov r8d, esi
mov rcx, rbp
lea r10, [rdx*8]
sub r10, rdx
shl r10, 4
lea rdi, [r14 + r10]
lea rdx, [rdi + 0xc]
mov qword [rdi], rbp
mov dword [rdi + 8], eax
mov byte [rdi + 0xc], 0
call fcn.0040e790
test ebx, ebx
jne 0x40f9b1
mov edx, dword [0x00539444]
mov ecx, 0
add edx, 1
cmp edx, 3
cmove edx, ecx
mov dword [0x00539444], edx
mov rdx, qword [rdi]
mov r8d, dword [rdi + 8]
mov rcx, r12
add ebx, 1
mov r9, qword [rdx + 8]
lea rdx, str._4u:__13s___s_n
mov qword [rsp + 0x20], rax
call fcn.0040e460
mov eax, dword [rbp + 0x14]
cmp eax, dword [r12 + 0x30]
jb 0x40f950
mov r14, qword [rsp + 0x50]
mov edi, dword [rsp + 0x58]
jmp 0x40f0bd
lea rdx, str.UNDEFINED_SYMBOLS_n
xor ecx, ecx
call fcn.0040e460
jmp 0x40f465
mov rcx, qword [0x005395e8]
lea rdx, [0x004e8d4d]
call sub.msvcrt.dll_fprintf
jmp 0x40ee80
xor r12d, r12d
xor edi, edi
jmp 0x40f877
mov rbx, rax
jmp 0x40f130
cmp r11d, dword [rdx + 8]
jne 0x40f6e5
cdqe
imul rax, rax, 0x70
add rbx, rax
mov rax, qword [rbx]
mov r11d, dword [rbx + 8]
lea r10, [rbx + 0xc]
mov r9, qword [rax + 8]
lea rdx, str._4u:__13s___s_n
mov qword [rsp + 0x20], r10
mov r8d, r11d
mov rcx, r12
call fcn.0040e460
jmp 0x40f0bd
mov rax, rbp
jmp 0x40fa4a
mov rdx, qword [rsp + 0x58]
mov rax, qword [rdx]
mov r11d, dword [rdx + 8]
jmp 0x40fa4a
xor r8d, r8d
mov qword [rsp + 0x60], r10
mov dword [rsp + 0x50], r11d
call sub.msvcrt.dll_fseek
mov rcx, qword [0x005395f8]
mov r10, qword [rsp + 0x60]
mov r11d, dword [rsp + 0x50]
jmp 0x40f7c9
mov rcx, qword [0x005395f8]
mov qword [rsp + 0x50], rsi
mov r14, qword [rsp + 0x68]
mov r12, qword [rsp + 0x70]
mov edi, dword [rsp + 0x80]
mov r15d, dword [rsp + 0x84]
mov rbp, qword [rsp + 0x88]
mov esi, dword [rsp + 0x7c]
call sub.msvcrt.dll_fgetc
mov r10, qword [rsp + 0x50]
cmp eax, 0xffffffff
mov rbx, r10
je 0x40fb4a
cmp eax, 0xa
je 0x40fb4a
cmp eax, 0xd
je 0x40fbe1
xor edx, edx
mov dword [rsp + 0x50], esi
mov qword [rsp + 0x68], r10
mov rsi, r10
mov ebx, edx
jmp 0x40fb1e
cmp eax, 0xa
je 0x40fb3e
cmp eax, 0xd
je 0x40fbd5
cmp dword [rsp + 0x60], ebx
jbe 0x40fb2a
mov byte [rsi], al
add rsi, 1
mov rcx, qword [0x005395f8]
add ebx, 1
call sub.msvcrt.dll_fgetc
cmp eax, 0xffffffff
jne 0x40fb10
mov rbx, rsi
mov r10, qword [rsp + 0x68]
mov esi, dword [rsp + 0x50]
cmp eax, 0xd
sete r8b
cmp eax, 0xa
sete dl
test r8b, r8b
jne 0x40fc55
test dl, dl
jne 0x40fc55
mov edx, dword [rsp + 0x78]
mov rcx, qword [0x005395f8]
xor r8d, r8d
mov byte [rbx], 0
mov qword [rsp + 0x50], r10
call sub.msvcrt.dll_fseek
mov rdx, qword [rsp + 0x58]
mov r10, qword [rsp + 0x50]
mov rax, qword [rdx]
mov r11d, dword [rdx + 8]
jmp 0x40fa4a
mov rbp, qword [rsp + 0x88]
lea rcx, str.unable_to_rebuffer_file:__s_n
mov qword [rsp + 0x50], rsi
mov r14, qword [rsp + 0x68]
mov r12, qword [rsp + 0x70]
mov edi, dword [rsp + 0x80]
mov r15d, dword [rsp + 0x84]
mov rdx, qword [rbp + 8]
mov esi, dword [rsp + 0x7c]
call fcn.004129a0
jmp 0x40fb83
mov rbx, rsi
mov r10, qword [rsp + 0x68]
mov esi, dword [rsp + 0x50]
mov rcx, qword [0x005395f8]
mov qword [rsp + 0x50], r10
call sub.msvcrt.dll_fgetc
cmp eax, 0xa
mov r10, qword [rsp + 0x50]
je 0x40fb68
mov rdx, qword [0x005395f8]
mov ecx, eax
mov qword [rsp + 0x50], r10
call sub.msvcrt.dll_ungetc
mov r10, qword [rsp + 0x50]
jmp 0x40fb68
mov rcx, qword [0x005395f8]
lea r12d, [r15 + 1]
add r15d, 2
call sub.msvcrt.dll_fgetc
cmp eax, 0xd
cmove r12d, r15d
jmp 0x40f900
mov rdx, qword [rsp + 0x58]
mov dword [rbp + 0x18], 1
mov rax, qword [rdx]
mov r11d, dword [rdx + 8]
jmp 0x40fa4a
mov rcx, qword [0x005395f8]
mov byte [rsp + 0x68], dl
mov qword [rsp + 0x50], r10
mov byte [rsp + 0x60], r8b
call sub.msvcrt.dll_fgetc
cmp eax, 0xa
mov r10, qword [rsp + 0x50]
movzx edx, byte [rsp + 0x68]
je 0x40fc8d
movzx r8d, byte [rsp + 0x60]
test r8b, r8b
jne 0x40fc00
cmp eax, 0xd
je 0x40fb68
test dl, dl
jne 0x40fc00
jmp 0x40fb68