Function at 0x40a610
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
mov dword [0x4fc0e0], 0x15
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
cmp eax, 0x14
mov dword [0x4fc0dc], edx
mov dword [0x4fc0d8], eax
ja 0x40a5e9
add esp, 0x1c
ret
mov dword [esp + 8], str.bfd_set_input_error
mov dword [esp + 4], 0x309
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_bfd.c
call fcn.0040a500
lea esi, [esi]
lea edi, [edi]
push ebp
push edi
push esi
push ebx
sub esp, 0x14c
lea eax, [esp + 0xb0]
lea edx, [esp + 0x140]
mov dword [esp + 0x24], eax
lea esi, [esi]
mov dword [eax], 0
add eax, 0x10
cmp eax, edx
jne 0x40a630
mov eax, dword [esp + 0x160]
mov dword [esp + 0x20], 0
movzx edx, byte [eax]
test dl, dl
je 0x40a66c
cmp dl, 0x25
je 0x40a6a2
mov dword [esp + 4], 0x25
mov dword [esp], eax
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x40a64c
mov ebp, dword [esp + 0x20]
xor ecx, ecx
test ebp, ebp
je 0x40a8f5
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x164]
lea esi, [esi]
cmp dword [eax], 6
ja case.0x40a69b.0
mov ebx, dword [eax]
jmp dword [ebx*4 + 0x4bed58]
movzx edx, byte [eax + 1]
cmp dl, 0x25
je 0x40a7d0
cmp dl, 0x30
lea ebx, [eax + 1]
je 0x40a7e0
movzx ecx, dl
movsx esi, dl
mov edi, 0xffffffff
test byte [ecx + ecx + 0x4fa1e0], 4
jne 0x40a7b5
mov ebp, edx
jmp 0x40a6eb
add ebx, 1
movzx ebp, byte [ebx]
mov eax, ebp
movsx esi, al
mov dword [esp + 4], esi
mov dword [esp], str.__0I
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x40a6e0
mov edx, ebp
cmp dl, 0x2a
je 0x40a830
mov eax, esi
movzx esi, al
test byte [esi + esi + 0x4fa1e0], 4
je 0x40a732
lea esi, [esi]
add ebx, 1
movzx eax, byte [ebx]
test byte [eax + eax + 0x4fa1e0], 4
mov edx, eax
jne 0x40a720
cmp dl, 0x2e
je 0x40a7f1
mov dword [esp + 0x28], edi
xor esi, esi
mov edi, ebx
xor ebp, ebp
mov ebx, edx
movsx eax, bl
mov dword [esp], 0x4bed30
mov dword [esp + 4], eax
call sub.msvcrt.dll_strchr
test eax, eax
je 0x40aa30
cmp bl, 0x68
je 0x40a790
cmp bl, 0x6c
je 0x40a7b0
cmp bl, 0x4c
je 0x40a7a0
mov dword [esp + 8], str._bfd_doprnt_scan
mov dword [esp + 4], 0x4d5
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_bfd.c
call fcn.0040a500
lea esi, [esi]
mov esi, 1
add edi, 1
movzx ebx, byte [edi]
jmp 0x40a747
mov ebp, 2
jmp 0x40a795
add ebp, 1
jmp 0x40a795
cmp byte [eax + 2], 0x24
jne 0x40a6d4
lea edi, [esi - 0x31]
movsx esi, byte [eax + 3]
lea ebx, [eax + 3]
mov ebp, esi
jmp 0x40a6eb
add eax, 2
jmp 0x40a64c
mov edi, 0xffffffff
mov esi, 0x30
mov ebp, edx
jmp 0x40a6eb
movzx edx, byte [ebx + 1]
cmp dl, 0x2a
je 0x40a882
movzx eax, dl
add ebx, 1
test byte [eax + eax + 0x4fa1e0], 4
je 0x40a73b
add ebx, 1
movzx eax, byte [ebx]
test byte [eax + eax + 0x4fa1e0], 4
mov edx, eax
jne 0x40a812
jmp 0x40a73b
movzx edx, byte [ebx + 1]
mov ebp, dword [esp + 0x20]
lea ecx, [ebx + 1]
mov eax, ebp
cmp dl, 0x30
je 0x40a85c
movsx esi, dl
movzx edx, dl
test byte [edx + edx + 0x4fa1e0], 4
je 0x40a85c
cmp byte [ebx + 2], 0x24
je 0x40aab7
cmp eax, 8
ja 0x40afc5
shl eax, 4
add dword [esp + 0x20], 1
movzx edx, byte [ecx]
mov dword [esp + eax + 0xb0], 1
mov ebx, ecx
jmp 0x40a732
movzx edx, byte [ebx + 2]
mov ebp, dword [esp + 0x20]
lea ecx, [ebx + 2]
mov eax, ebp
cmp dl, 0x30
je 0x40a8b0
movsx esi, dl
movzx edx, dl
test byte [edx + edx + 0x4fa1e0], 4
je 0x40a8b0
cmp byte [ebx + 3], 0x24
jne 0x40a8b0
lea eax, [esi - 0x31]
lea ecx, [ebx + 4]
cmp eax, 8
ja 0x40aff0
shl eax, 4
add dword [esp + 0x20], 1
movzx edx, byte [ecx]
mov dword [esp + eax + 0xb0], 1
mov ebx, ecx
jmp 0x40a73b
mov ebx, dword [edx]
add edx, 4
mov dword [eax], ebx
add ecx, 1
add eax, 0x10
cmp ecx, ebp
jne 0x40a690
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [0x4fc0d4]
test eax, eax
je 0x40acfb
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str._s:
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0x28], 0
add eax, 0x40
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x160]
movzx eax, byte [eax]
test al, al
je 0x40a9a8
cmp al, 0x25
je 0x40aade
mov eax, dword [esp + 0x160]
mov dword [esp + 4], 0x25
mov dword [esp], eax
call sub.msvcrt.dll_strchr
test eax, eax
je 0x40ac13
mov ecx, dword [esp + 0x160]
mov dword [esp + 4], str._.s
sub eax, ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
add dword [esp + 0x160], eax
cmp eax, 0xffffffff
jne 0x40a942
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x40
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fflush
add esp, 0x14c
pop ebx
pop esi
pop edi
pop ebp
ret
fld qword [edx]
add edx, 8
fstp qword [eax]
jmp 0x40a8e7
mov esi, dword [edx]
mov edi, dword [edx + 4]
add edx, 8
mov dword [eax], esi
mov dword [eax + 4], edi
jmp 0x40a8e7
fld xword [edx]
add edx, 0xc
fstp xword [eax]
jmp 0x40a8e7
mov dword [esp + 8], str.error_handler_internal
mov dword [esp + 4], 0x540
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_bfd.c
call fcn.0040a500
lea esi, [esi]
mov edx, ebx
mov ebx, edi
mov edi, dword [esp + 0x28]
lea eax, [ebx + 1]
test edi, edi
cmovs edi, dword [esp + 0x20]
sub edx, 0x45
cmp dl, 0x33
ja case.0x40aa4d.1
movzx edx, dl
jmp dword [edx*4 + 0x4bed74]
mov esi, 6
cmp edi, 8
ja 0x40afa9
shl edi, 4
add dword [esp + 0x20], 1
mov dword [esp + edi + 0xb0], esi
jmp 0x40a64c
movzx ecx, byte [ebx + 1]
add ebx, 2
mov esi, 6
lea edx, [ecx - 0x41]
cmp dl, 1
cmovbe eax, ebx
jmp 0x40aa59
test esi, esi
jne 0x40aa59
test ebp, ebp
mov esi, 1
je 0x40aa59
xor ecx, ecx
cmp ebp, 1
setne cl
mov esi, ecx
add esi, 2
jmp 0x40aa59
xor ecx, ecx
test ebp, ebp
setne cl
mov esi, ecx
add esi, 4
jmp 0x40aa59
lea eax, [esi - 0x31]
lea ecx, [ebx + 3]
jmp 0x40a85c
mov dword [esp + 8], str._bfd_doprnt_scan
mov dword [esp + 4], 0x512
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_bfd.c
call fcn.0040a500
mov eax, dword [esp + 0x160]
movzx ebx, byte [eax + 1]
cmp bl, 0x25
je 0x40ad28
mov eax, dword [esp + 0x160]
cmp bl, 0x30
mov byte [esp + 0x30], 0x25
lea edi, [eax + 1]
je 0x40ace9
movzx eax, bl
movsx ebp, bl
mov dword [esp + 0x24], 0xffffffff
test byte [eax + eax + 0x4fa1e0], 4
je 0x40ab33
mov eax, dword [esp + 0x160]
cmp byte [eax + 2], 0x24
je 0x40aec4
lea esi, [esp + 0x31]
jmp 0x40ab4e
add edi, 1
movsx ebp, byte [edi]
add esi, 1
mov byte [esi - 1], bl
mov ebx, ebp
mov dword [esp + 4], ebp
mov dword [esp], str.__0I
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x40ab40
cmp bl, 0x2a
je 0x40ac7d
mov eax, ebp
movzx ebp, al
test byte [ebp + ebp + 0x4fa1e0], 4
je 0x40ab98
lea esi, [esi]
add edi, 1
movzx eax, byte [edi]
add esi, 1
mov byte [esi - 1], bl
test byte [eax + eax + 0x4fa1e0], 4
mov ebx, eax
jne 0x40ab80
cmp bl, 0x2e
je 0x40ac37
mov dword [esp + 0x2c], 0
xor ebp, ebp
movsx eax, bl
mov dword [esp], 0x4bed30
mov dword [esp + 4], eax
call sub.msvcrt.dll_strchr
test eax, eax
je 0x40ad49
cmp bl, 0x68
je 0x40abf1
cmp bl, 0x6c
je 0x40ac0e
cmp bl, 0x4c
je 0x40ac07
mov dword [esp + 8], str._bfd_doprnt
mov dword [esp + 4], 0x3f1
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_bfd.c
call fcn.0040a500
mov dword [esp + 0x2c], 1
add esi, 1
add edi, 1
mov byte [esi - 1], bl
movzx ebx, byte [edi]
jmp 0x40abab
mov ebp, 2
jmp 0x40abf9
add ebp, 1
jmp 0x40abf9
mov eax, dword [esp + 0x160]
mov dword [esp + 4], 0x4bed44
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x40a99c
movzx ebx, byte [edi + 1]
lea ebp, [esi + 1]
mov byte [esi], 0x2e
cmp bl, 0x2a
je 0x40aee0
movzx eax, bl
add edi, 1
mov esi, ebp
test byte [eax + eax + 0x4fa1e0], 4
je 0x40aba1
add edi, 1
movzx eax, byte [edi]
add esi, 1
mov byte [esi - 1], bl
test byte [eax + eax + 0x4fa1e0], 4
mov ebx, eax
jne 0x40ac60
jmp 0x40aba1
movzx ebx, byte [edi + 1]
mov ecx, dword [esp + 0x28]
lea ebp, [edi + 1]
mov eax, ecx
cmp bl, 0x30
je 0x40aca9
movsx edx, bl
movzx ebx, bl
test byte [ebx + ebx + 0x4fa1e0], 4
je 0x40aca9
cmp byte [edi + 2], 0x24
je 0x40af55
shl eax, 4
add dword [esp + 0x28], 1
mov edi, ebp
mov edx, dword [esp + eax + 0xb0]
mov ecx, dword [esp + eax + 0xb0]
mov dword [esp], esi
mov dword [esp + 4], 0x4bed47
sar edx, 0x1f
xor ecx, edx
mov eax, ecx
sub eax, edx
mov dword [esp + 8], eax
call sub.msvcrt.dll_sprintf
movzx ebx, byte [ebp]
add esi, eax
jmp 0x40ab98
mov dword [esp + 0x24], 0xffffffff
mov ebp, 0x30
jmp 0x40ab33
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 5
mov dword [esp + 4], 1
mov dword [esp], str.BFD:
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
jmp 0x40a92e
mov eax, dword [esp + 0x20]
mov dword [esp], 0x25
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputc
add dword [esp + 0x160], 2
jmp 0x40a942
lea eax, [edi + 1]
mov byte [esi], bl
mov byte [esi + 1], 0
mov dword [esp + 0x160], eax
mov eax, dword [esp + 0x24]
test eax, eax
cmovs eax, dword [esp + 0x28]
mov dword [esp + 0x24], eax
lea eax, [ebx - 0x45]
cmp al, 0x33
ja case.0x40ad76.1
movzx eax, al
jmp dword [eax*4 + 0x4bee44]
mov edi, dword [esp + 0x24]
shl edi, 4
mov eax, dword [esp + edi + 0xb0]
mov dword [esp + 8], eax
lea eax, [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
add dword [esp + 0x28], 1
jmp 0x40a9a3
movzx eax, byte [edi + 1]
cmp al, 0x41
je 0x40b028
cmp al, 0x42
jne case.0x40ad76.46
lea eax, [edi + 2]
mov edi, dword [esp + 0x24]
mov dword [esp + 0x160], eax
shl edi, 4
mov eax, dword [esp + edi + 0xb0]
test eax, eax
je 0x40b00c
mov edx, dword [eax + 0xa4]
test edx, edx
je 0x40adf1
test byte [edx + 0x2d], 0x10
je 0x40af84
mov eax, dword [eax]
mov dword [esp + 4], 0x4bed44
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x40ada3
mov edi, dword [esp + 0x2c]
test edi, edi
jne case.0x40ad76.46
test ebp, ebp
je case.0x40ad76.46
cmp ebp, 1
je case.0x40ad76.46
mov edi, dword [esp + 0x24]
mov byte [esi - 2], 0x49
mov byte [esi - 1], 0x36
mov byte [esi], 0x34
mov byte [esi + 1], bl
mov byte [esi + 2], 0
shl edi, 4
mov eax, dword [esp + edi + 0xb0]
mov edx, dword [esp + edi + 0xb4]
mov dword [esp + 8], eax
lea eax, [esp + 0x30]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x40ada3
mov edi, dword [esp + 0x24]
shl edi, 4
test ebp, ebp
jne 0x40af60
lea eax, [esp + 0x30]
fld qword [esp + edi + 0xb0]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
fstp qword [esp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x40ada3
mov dword [esp + 8], str._bfd_doprnt
mov dword [esp + 4], 0x467
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_bfd.c
call fcn.0040a500
lea eax, [ebp - 0x31]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x160]
movsx ebp, byte [eax + 3]
lea edi, [eax + 3]
mov ebx, ebp
jmp 0x40ab33
movzx ecx, byte [edi + 2]
mov esi, dword [esp + 0x28]
lea eax, [edi + 2]
mov dword [esp + 0x2c], eax
mov eax, esi
cmp cl, 0x30
je 0x40af10
movsx ebx, cl
movzx ecx, cl
test byte [ecx + ecx + 0x4fa1e0], 4
je 0x40af10
cmp byte [edi + 3], 0x24
je 0x40afe1
shl eax, 4
add dword [esp + 0x28], 1
mov edx, dword [esp + eax + 0xb0]
mov ecx, dword [esp + eax + 0xb0]
mov dword [esp + 4], 0x4bed47
mov dword [esp], ebp
sar edx, 0x1f
xor ecx, edx
mov eax, ecx
sub eax, edx
mov dword [esp + 8], eax
call sub.msvcrt.dll_sprintf
lea esi, [ebp + eax]
mov eax, dword [esp + 0x2c]
movzx ebx, byte [eax]
mov edi, eax
jmp 0x40aba1
lea eax, [edx - 0x31]
lea ebp, [edi + 3]
jmp 0x40aca9
fld xword [esp + edi + 0xb0]
lea eax, [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
fstp xword [esp + 8]
call sub.msvcrt.dll_fprintf
jmp 0x40ada3
mov eax, dword [eax]
mov dword [esp + 0xc], eax
mov eax, dword [edx]
mov dword [esp + 4], str._s__s_
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x40ada3
mov dword [esp + 8], str._bfd_doprnt_scan
mov dword [esp + 4], 0x516
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_bfd.c
call fcn.0040a500
mov dword [esp + 8], str._bfd_doprnt_scan
mov dword [esp + 4], 0x4a5
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_bfd.c
call fcn.0040a500
lea ecx, [edi + 4]
lea eax, [ebx - 0x31]
mov dword [esp + 0x2c], ecx
jmp 0x40af10
mov dword [esp + 8], str._bfd_doprnt_scan
mov dword [esp + 4], 0x4be
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_bfd.c
call fcn.0040a500
mov dword [esp + 8], str._bfd_doprnt
mov dword [esp + 4], 0x45a
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_bfd.c
call fcn.0040a500
lea eax, [edi + 2]
mov edi, dword [esp + 0x24]
mov dword [esp + 0x160], eax
shl edi, 4
mov eax, dword [esp + edi + 0xb0]
test eax, eax
je 0x40b0ac
mov edx, dword [eax + 0x94]
test edx, edx
je 0x40adf1
mov edx, dword [edx + 4]
mov edx, dword [edx + 4]
cmp edx, 5
je 0x40b0c8
cmp edx, 2
jne 0x40adf1
mov edx, dword [eax + 0x8c]
test edx, edx
je 0x40adf1
mov edx, dword [edx + 0x20]
test edx, edx
je 0x40adf1
mov edx, dword [edx]
test edx, edx
je 0x40adf1
mov dword [esp + 0xc], edx
mov eax, dword [eax]
mov dword [esp + 4], 0x4bed4a
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x40ada3
mov dword [esp + 8], str._bfd_doprnt
mov dword [esp + 4], 0x440
mov dword [esp], str._builds_idf_crosstool_NG_.build_HOST_i686_w64_mingw32_xtensa_esp32s3_elf_src_binutils_bfd_bfd.c
call fcn.0040a500
mov edx, dword [eax + 0x8c]
mov ecx, dword [edx + 0x7c]
test ecx, ecx
je 0x40adf1
test byte [eax + 0x1b], 2
jne 0x40adf1
mov edx, dword [edx + 0x74]
jmp 0x40b081