Function at 0x40a3f0
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x28
mov dword [0x004e11a8], 0x15
cmp edx, 0x14
mov qword [0x004e11a0], rcx
mov dword [0x004e1198], edx
ja 0x40a3d5
add rsp, 0x28
ret
lea r8, str.bfd_set_input_error
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_bfd.c
mov edx, 0x2fc
call fcn.0040a320
nop
nop
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x188
lea rdi, [rsp + 0xf0]
mov qword [rsp + 0x1d8], rdx
lea rdx, [rsp + 0x180]
mov qword [rsp + 0x1d0], rcx
mov rax, rdi
nop word cs:[rax + rax]
mov dword [rax], 0
add rax, 0x10
cmp rdx, rax
jne 0x40a430
mov r13, qword [0x004d2a30]
mov rax, qword [rsp + 0x1d0]
lea rbx, str.__0I
lea rbp, [0x004a8bfa]
mov dword [rsp + 0x28], 0
mov rsi, r13
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x38], r13
movzx edx, byte [rax]
test dl, dl
je 0x40a48f
cmp dl, 0x25
je 0x40a4e0
mov edx, 0x25
mov rcx, rax
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x40a471
mov edx, dword [rsp + 0x28]
test edx, edx
je 0x40a746
mov rax, qword [rsp + 0x1d8]
mov rbx, qword [rsp + 0x1d8]
lea rcx, [0x004a8c24]
lea rdx, [rax + 8]
mov eax, dword [rsp + 0x28]
sub eax, 1
lea r8, [rbx + rax*8 + 0x10]
cmp dword [rdi], 6
ja case.0x40a4d4.0
mov eax, dword [rdi]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
movzx r15d, byte [rax + 1]
cmp r15b, 0x25
je 0x40a600
cmp r15b, 0x30
lea r14, [rax + 1]
je 0x40a610
mov rcx, qword [rsp + 0x38]
movzx edx, r15b
movsx r12d, r15b
mov dword [rsp + 0x44], 0xffffffff
test byte [rcx + rdx*2], 4
je 0x40a540
cmp byte [rax + 2], 0x24
jne 0x40a540
lea ecx, [r12 - 0x31]
movsx r12d, byte [rax + 3]
lea r14, [rax + 3]
mov dword [rsp + 0x44], ecx
mov r15d, r12d
jmp 0x40a540
add r14, 1
movsx r12d, byte [r14]
mov r15d, r12d
mov edx, r12d
mov rcx, rbx
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x40a535
cmp r15b, 0x2a
je 0x40a670
movzx r12d, r12b
test byte [rsi + r12*2], 4
je 0x40a576
add r14, 1
movzx eax, byte [r14]
test byte [rsi + rax*2], 4
mov r15, rax
jne 0x40a565
cmp r15b, 0x2e
je 0x40a623
mov dword [rsp + 0x30], 0
xor r12d, r12d
movsx edx, r15b
mov rcx, rbp
call sub.msvcrt.dll_strchr
test rax, rax
je 0x40a890
cmp r15b, 0x68
je 0x40a5d0
cmp r15b, 0x6c
je 0x40a5f0
cmp r15b, 0x4c
je 0x40a5e2
lea r8, str._bfd_doprnt_scan
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_bfd.c
mov edx, 0x4d4
call fcn.0040a320
nop word [rax + rax]
mov dword [rsp + 0x30], 1
add r14, 1
movzx r15d, byte [r14]
jmp 0x40a58b
mov r12d, 2
jmp 0x40a5d8
add r12d, 1
jmp 0x40a5d8
add rax, 2
jmp 0x40a471
mov dword [rsp + 0x44], 0xffffffff
mov r12d, 0x30
jmp 0x40a540
movzx r15d, byte [r14 + 1]
cmp r15b, 0x2a
je 0x40a6cd
movzx eax, r15b
add r14, 1
test byte [r13 + rax*2], 4
je 0x40a580
nop word cs:[rax + rax]
add r14, 1
movzx eax, byte [r14]
test byte [r13 + rax*2], 4
mov r15, rax
jne 0x40a650
jmp 0x40a580
movzx edx, byte [r14 + 1]
mov r10d, dword [rsp + 0x28]
lea rcx, [r14 + 1]
mov eax, r10d
cmp dl, 0x30
je 0x40a6a4
mov r11, qword [rsp + 0x48]
movsx r9d, dl
movzx edx, dl
test byte [r11 + rdx*2], 4
je 0x40a6a4
cmp byte [r14 + 2], 0x24
je 0x40a94c
cmp eax, 8
ja 0x40ae0b
shl rax, 4
add dword [rsp + 0x28], 1
movzx r15d, byte [rcx]
mov dword [rsp + rax + 0xf0], 1
mov r14, rcx
jmp 0x40a576
movzx edx, byte [r14 + 2]
mov r11d, dword [rsp + 0x28]
lea rcx, [r14 + 2]
mov eax, r11d
cmp dl, 0x30
je 0x40a707
mov r10, qword [0x004d2a30]
movsx r9d, dl
movzx edx, dl
test byte [r10 + rdx*2], 4
je 0x40a707
cmp byte [r14 + 3], 0x24
jne 0x40a707
lea eax, [r9 - 0x31]
lea rcx, [r14 + 4]
cmp eax, 8
ja 0x40addb
shl rax, 4
add dword [rsp + 0x28], 1
movzx r15d, byte [rcx]
mov dword [rsp + rax + 0xf0], 1
mov r14, rcx
jmp 0x40a580
mov eax, dword [rdx - 8]
mov dword [rdi], eax
add rdx, 8
add rdi, 0x10
cmp r8, rdx
jne 0x40a4c2
mov rax, qword [sym.imp.msvcrt.dll___iob_func]
mov qword [rsp + 0x30], rax
call rax
lea rcx, [rax + 0x30]
call sub.msvcrt.dll_fflush
mov rbx, qword [0x004e1190]
test rbx, rbx
je 0x40ab91
mov rax, qword [rsp + 0x30]
call rax
lea rdx, str._s:
lea rcx, [rax + 0x60]
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov rax, qword [rsp + 0x30]
call rax
lea rdi, [rax + 0x60]
lea rax, [rsp + 0x70]
mov r12, qword [rsp + 0x1d0]
mov dword [rsp + 0x38], 0
mov qword [rsp + 0x28], rax
mov rax, qword [0x004d2a30]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x58], rax
mov rsi, rax
mov qword [rsp + 0x50], rax
movzx eax, byte [r12]
test al, al
je 0x40a80f
cmp al, 0x25
je 0x40a971
mov edx, 0x25
mov rcx, r12
call sub.msvcrt.dll_strchr
test rax, rax
je 0x40aaa7
mov r8d, eax
lea rdx, str._.s
mov r9, r12
sub r8d, r12d
mov rcx, rdi
call sub.msvcrt.dll_fprintf
movsxd rdx, eax
add r12, rdx
cmp eax, 0xffffffff
jne 0x40a7c5
mov rbx, qword [rsp + 0x30]
call rbx
lea rdx, [rax + 0x60]
mov ecx, 0xa
call sub.msvcrt.dll_fputc
call rbx
lea rcx, [rax + 0x60]
call sub.msvcrt.dll_fflush
nop
add rsp, 0x188
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rdx - 8]
mov qword [rdi], rax
jmp 0x40a735
movsd xmm0, qword [rdx - 8]
movsd qword [rdi], xmm0
jmp 0x40a735
mov rax, qword [rdx - 8]
fld xword [rax]
fstp xword [rdi]
jmp 0x40a735
lea r8, str.error_handler_internal
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_bfd.c
mov edx, 0x549
call fcn.0040a320
nop dword [rax + rax]
mov ecx, dword [rsp + 0x44]
lea r9d, [r15 - 0x45]
lea rax, [r14 + 1]
test ecx, ecx
cmovs ecx, dword [rsp + 0x28]
cmp r9b, 0x33
mov dword [rsp + 0x44], ecx
ja case.0x40a8c3.1
lea rcx, [0x004a8c40]
movzx r9d, r9b
movsxd rdx, dword [rcx + r9*4]
add rdx, rcx
jmp rdx
mov dword [rsp + 0x30], 6
cmp dword [rsp + 0x44], 8
ja 0x40adf3
mov r14d, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x30]
add dword [rsp + 0x28], 1
shl r14, 4
mov dword [rsp + r14 + 0xf0], ecx
jmp 0x40a471
movzx ecx, byte [r14 + 1]
lea r8, [r14 + 2]
mov dword [rsp + 0x30], 6
lea edx, [rcx - 0x41]
cmp dl, 1
cmovbe rax, r8
jmp 0x40a8cd
mov ecx, dword [rsp + 0x30]
test ecx, ecx
jne 0x40a8cd
test r12d, r12d
mov dword [rsp + 0x30], 1
je 0x40a8cd
xor ecx, ecx
cmp r12d, 1
setne cl
add ecx, 2
mov dword [rsp + 0x30], ecx
jmp 0x40a8cd
xor ecx, ecx
test r12d, r12d
setne cl
add ecx, 4
mov dword [rsp + 0x30], ecx
jmp 0x40a8cd
lea eax, [r9 - 0x31]
lea rcx, [r14 + 3]
jmp 0x40a6a4
lea r8, str._bfd_doprnt_scan
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_bfd.c
mov edx, 0x51b
call fcn.0040a320
movzx ebx, byte [r12 + 1]
cmp bl, 0x25
je 0x40abb8
cmp bl, 0x30
lea rbp, [r12 + 1]
mov byte [rsp + 0x70], 0x25
je 0x40ab80
mov rcx, qword [rsp + 0x50]
movzx eax, bl
movsx r14d, bl
mov r13d, 0xffffffff
test byte [rcx + rax*2], 4
je 0x40a9b7
cmp byte [r12 + 2], 0x24
je 0x40ad1c
mov rax, qword [rsp + 0x28]
lea r12, str.__0I
lea r15, [rax + 1]
jmp 0x40a9e4
add rbp, 1
movsx r14d, byte [rbp]
add r15, 1
mov byte [r15 - 1], bl
mov ebx, r14d
mov edx, r14d
mov rcx, r12
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x40a9d0
cmp bl, 0x2a
je 0x40ab0f
movzx r14d, r14b
test byte [rsi + r14*2], 4
je 0x40aa29
nop dword [rax + rax]
add rbp, 1
movzx eax, byte [rbp]
add r15, 1
mov byte [r15 - 1], bl
test byte [rsi + rax*2], 4
mov rbx, rax
jne 0x40aa10
cmp bl, 0x2e
je 0x40aabe
lea r12, [0x004a8bfa]
mov dword [rsp + 0x44], 0
xor r14d, r14d
movsx edx, bl
mov rcx, r12
call sub.msvcrt.dll_strchr
test rax, rax
je 0x40abce
cmp bl, 0x68
je 0x40aa7f
cmp bl, 0x6c
je 0x40aaa1
cmp bl, 0x4c
je 0x40aa99
lea r8, str._bfd_doprnt
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_bfd.c
mov edx, 0x3e4
call fcn.0040a320
mov dword [rsp + 0x44], 1
add r15, 1
add rbp, 1
mov byte [r15 - 1], bl
movzx ebx, byte [rbp]
jmp 0x40aa44
mov r14d, 2
jmp 0x40aa87
add r14d, 1
jmp 0x40aa87
lea rdx, [0x004a8c0e]
mov r8, r12
mov rcx, rdi
call sub.msvcrt.dll_fprintf
jmp 0x40a804
movzx ebx, byte [rbp + 1]
lea r14, [r15 + 1]
mov byte [r15], 0x2e
cmp bl, 0x2a
je 0x40ad33
mov rcx, qword [rsp + 0x48]
movzx eax, bl
add rbp, 1
mov r15, r14
mov rdx, qword [rsp + 0x48]
test byte [rcx + rax*2], 4
je 0x40aa32
add rbp, 1
movzx eax, byte [rbp]
add r15, 1
mov byte [r15 - 1], bl
test byte [rdx + rax*2], 4
mov rbx, rax
jne 0x40aaf1
jmp 0x40aa32
movzx edx, byte [rbp + 1]
mov ebx, dword [rsp + 0x38]
lea r12, [rbp + 1]
mov eax, ebx
cmp dl, 0x30
je 0x40ab3e
mov r11, qword [rsp + 0x58]
movsx ecx, dl
movzx edx, dl
test byte [r11 + rdx*2], 4
je 0x40ab3e
cmp byte [rbp + 2], 0x24
je 0x40ada4
shl rax, 4
mov rcx, r15
add dword [rsp + 0x38], 1
mov edx, dword [rsp + rax + 0xf0]
mov r8d, dword [rsp + rax + 0xf0]
mov rbp, r12
sar edx, 0x1f
xor r8d, edx
sub r8d, edx
lea rdx, [0x004a8c11]
call sub.msvcrt.dll_sprintf
cdqe
movzx ebx, byte [r12]
add r15, rax
jmp 0x40aa29
mov r13d, 0xffffffff
mov r14d, 0x30
jmp 0x40a9b7
mov rax, qword [rsp + 0x30]
call rax
lea rcx, str.BFD:
lea r9, [rax + 0x60]
mov r8d, 5
mov edx, 1
call sub.msvcrt.dll_fwrite
jmp 0x40a787
mov rdx, rdi
mov ecx, 0x25
add r12, 2
call sub.msvcrt.dll_fputc
jmp 0x40a7c5
lea eax, [rbx - 0x45]
test r13d, r13d
cmovs r13d, dword [rsp + 0x38]
lea r12, [rbp + 1]
mov byte [r15], bl
mov byte [r15 + 1], 0
cmp al, 0x33
ja case.0x40abff.1
lea rdx, [0x004a8d10]
movzx eax, al
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
mov byte [r15 - 2], 0x49
mov byte [r15 - 1], 0x36
mov byte [r15], 0x34
mov byte [r15 + 1], bl
mov byte [r15 + 2], 0
mov eax, r13d
mov rdx, qword [rsp + 0x28]
mov rcx, rdi
shl rax, 4
mov r8, qword [rsp + rax + 0xf0]
call sub.msvcrt.dll_fprintf
add dword [rsp + 0x38], 1
jmp 0x40a80a
movzx eax, byte [rbp + 1]
cmp al, 0x41
je 0x40ae3b
cmp al, 0x42
jne case.0x40abff.46
mov eax, r13d
lea r12, [rbp + 2]
shl rax, 4
mov rax, qword [rsp + rax + 0xf0]
test rax, rax
je 0x40ae23
mov rdx, qword [rax + 0xd0]
test rdx, rdx
je 0x40ac80
test byte [rdx + 0x45], 0x10
je 0x40aebc
mov r8, qword [rax]
lea rdx, [0x004a8c0e]
mov rcx, rdi
call sub.msvcrt.dll_fprintf
jmp 0x40ac34
mov eax, dword [rsp + 0x44]
test eax, eax
jne 0x40acab
test r14d, r14d
je 0x40acab
cmp r14d, 1
jne 0x40ac01
mov eax, r13d
mov rdx, qword [rsp + 0x28]
mov rcx, rdi
shl rax, 4
mov r8d, dword [rsp + rax + 0xf0]
call sub.msvcrt.dll_fprintf
jmp 0x40ac34
mov eax, r13d
shl rax, 4
test r14d, r14d
jne 0x40adb0
movsd xmm0, qword [rsp + rax + 0xf0]
mov rdx, qword [rsp + 0x28]
mov rcx, rdi
movapd xmm2, xmm0
movq r8, xmm0
call sub.msvcrt.dll_fprintf
jmp 0x40ac34
lea r8, str._bfd_doprnt
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_bfd.c
mov edx, 0x466
call fcn.0040a320
lea r13d, [r14 - 0x31]
movsx r14d, byte [r12 + 3]
lea rbp, [r12 + 3]
mov ebx, r14d
jmp 0x40a9b7
movzx edx, byte [rbp + 2]
mov ebx, dword [rsp + 0x38]
lea r12, [rbp + 2]
mov eax, ebx
cmp dl, 0x30
je 0x40ad60
mov r11, qword [0x004d2a30]
movsx ecx, dl
movzx edx, dl
test byte [r11 + rdx*2], 4
je 0x40ad60
cmp byte [rbp + 3], 0x24
je 0x40add2
shl rax, 4
mov rcx, r14
add dword [rsp + 0x38], 1
mov edx, dword [rsp + rax + 0xf0]
mov r8d, dword [rsp + rax + 0xf0]
mov rbp, r12
sar edx, 0x1f
xor r8d, edx
sub r8d, edx
lea rdx, [0x004a8c11]
call sub.msvcrt.dll_sprintf
movsxd r9, eax
movzx ebx, byte [r12]
lea r15, [r14 + r9]
jmp 0x40aa32
lea eax, [rcx - 0x31]
lea r12, [rbp + 3]
jmp 0x40ab3e
fld xword [rsp + rax + 0xf0]
mov rdx, qword [rsp + 0x28]
lea r8, [rsp + 0x60]
mov rcx, rdi
fstp xword [rsp + 0x60]
call sub.msvcrt.dll_fprintf
jmp 0x40ac34
lea eax, [rcx - 0x31]
lea r12, [rbp + 4]
jmp 0x40ad60
lea r8, str._bfd_doprnt_scan
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_bfd.c
mov edx, 0x4bd
call fcn.0040a320
lea r8, str._bfd_doprnt_scan
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_bfd.c
mov edx, 0x51f
call fcn.0040a320
lea r8, str._bfd_doprnt_scan
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_bfd.c
mov edx, 0x4a4
call fcn.0040a320
lea r8, str._bfd_doprnt
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_bfd.c
mov edx, 0x459
call fcn.0040a320
mov eax, r13d
lea r12, [rbp + 2]
shl rax, 4
mov rax, qword [rsp + rax + 0xf0]
test rax, rax
je 0x40aefe
mov rdx, qword [rax + 0xf8]
test rdx, rdx
je 0x40ac80
mov rdx, qword [rdx + 8]
mov edx, dword [rdx + 8]
cmp edx, 5
je 0x40aed6
cmp edx, 2
jne 0x40ac80
mov rdx, qword [rax + 0xe8]
test rdx, rdx
je 0x40ac80
mov rdx, qword [rdx + 0x40]
test rdx, rdx
je 0x40ac80
mov r9, qword [rdx]
test r9, r9
je 0x40ac80
mov r8, qword [rax]
lea rdx, [0x004a8c14]
mov rcx, rdi
call sub.msvcrt.dll_fprintf
jmp 0x40ac34
mov r8, qword [rdx]
mov r9, qword [rax]
lea rdx, str._s__s_
mov rcx, rdi
call sub.msvcrt.dll_fprintf
jmp 0x40ac34
mov rdx, qword [rax + 0xe8]
cmp qword [rdx + 0xc0], 0
je 0x40ac80
test byte [rax + 0x2b], 2
jne 0x40ac80
mov r9, qword [rdx + 0xb0]
jmp 0x40ae9c
lea r8, str._bfd_doprnt
lea rcx, str._builds_idf_crosstool_NG_.build_HOST_x86_64_w64_mingw32_xtensa_esp32s2_elf_src_binutils_bfd_bfd.c
mov edx, 0x43f
call fcn.0040a320
nop
nop word [rax + rax]