Function at 0x4015b1
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x40
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
movzx eax, byte [0x0040f066]
cmp al, 1
je 0x4015f9
movzx eax, byte [0x0040f066]
movzx eax, al
mov r9d, 1
mov r8d, eax
mov rdx, qword [rbp + 0x10]
lea rcx, str._s:_Unsupported_EI_VERSION:__d_is_not__d_n
call fcn.00402b7f
mov eax, 0
jmp 0x401923
movzx eax, word [0x0040f092]
movzx edx, ax
mov eax, dword [0x0040902c]
cmp edx, eax
jne 0x401617
mov eax, 1
jmp 0x401923
movzx eax, byte [0x0040f064]
movzx eax, al
mov dword [rbp - 8], eax
movzx eax, word [0x0040f092]
movzx eax, ax
mov dword [rbp - 0xc], eax
mov eax, dword [0x00409040]
cmp eax, 0xffffffff
jne 0x40164c
mov eax, dword [rbp - 0xc]
mov ecx, eax
call fcn.00401560
mov dword [0x00409040], eax
mov eax, dword [0x00409040]
cmp eax, 3
je 0x40168b
mov eax, dword [0x00409040]
cmp dword [rbp - 8], eax
je 0x40168b
mov edx, dword [0x00409040]
mov eax, dword [rbp - 8]
mov r9d, edx
mov r8d, eax
mov rdx, qword [rbp + 0x10]
lea rcx, str._s:_Unmatched_input_EI_CLASS:__d_is_not__d_n
call fcn.00402b7f
mov eax, 0
jmp 0x401923
mov eax, dword [0x00409044]
cmp eax, 3
je 0x4016ca
mov eax, dword [0x00409044]
cmp dword [rbp - 8], eax
je 0x4016ca
mov edx, dword [0x00409044]
mov eax, dword [rbp - 8]
mov r9d, edx
mov r8d, eax
mov rdx, qword [rbp + 0x10]
lea rcx, str._s:_Unmatched_output_EI_CLASS:__d_is_not__d_n
call fcn.00402b7f
mov eax, 0
jmp 0x401923
mov eax, dword [0x00409028]
cmp eax, 0xffffffff
je 0x401709
mov eax, dword [0x00409028]
cmp dword [rbp - 0xc], eax
je 0x401709
mov edx, dword [0x00409028]
mov eax, dword [rbp - 0xc]
mov r9d, edx
mov r8d, eax
mov rdx, qword [rbp + 0x10]
lea rcx, str._s:_Unmatched_e_machine:__d_is_not__d_n
call fcn.00402b7f
mov eax, 0
jmp 0x401923
movzx eax, word [0x0040f090]
movzx eax, ax
mov dword [rbp - 0x10], eax
mov eax, dword [0x00409030]
cmp eax, 0xffffffff
je 0x401755
mov eax, dword [0x00409030]
cmp dword [rbp - 0x10], eax
je 0x401755
mov edx, dword [0x00409030]
mov eax, dword [rbp - 0x10]
mov r9d, edx
mov r8d, eax
mov rdx, qword [rbp + 0x10]
lea rcx, str._s:_Unmatched_e_type:__d_is_not__d_n
call fcn.00402b7f
mov eax, 0
jmp 0x401923
movzx eax, byte [0x0040f067]
movzx eax, al
mov dword [rbp - 0x14], eax
mov eax, dword [0x00409038]
cmp eax, 0xffffffff
je 0x4017a1
mov eax, dword [0x00409038]
cmp dword [rbp - 0x14], eax
je 0x4017a1
mov edx, dword [0x00409038]
mov eax, dword [rbp - 0x14]
mov r9d, edx
mov r8d, eax
mov rdx, qword [rbp + 0x10]
lea rcx, str._s:_Unmatched_EI_OSABI:__d_is_not__d_n
call fcn.00402b7f
mov eax, 0
jmp 0x401923
mov eax, dword [rbp - 8]
cmp eax, 1
je 0x4017b7
cmp eax, 2
je 0x401858
call sub.msvcrt.dll_abort
mov eax, dword [0x0040902c]
cmp eax, 0xffffffff
je 0x4017e4
mov rax, qword [0x0040bc30]
mov rax, qword [rax]
mov edx, dword [0x0040902c]
movsxd rdx, edx
mov r8d, 2
lea rcx, [0x0040f0d2]
call rax
mov eax, dword [0x00409034]
cmp eax, 0xffffffff
je 0x401811
mov rax, qword [0x0040bc30]
mov rax, qword [rax]
mov edx, dword [0x00409034]
movsxd rdx, edx
mov r8d, 2
lea rcx, [0x0040f0d0]
call rax
mov eax, dword [0x0040903c]
cmp eax, 0xffffffff
je 0x401828
mov eax, dword [0x0040903c]
mov byte [0x0040f0c7], al
mov rax, qword [rbp + 0x18]
mov r9, rax
mov r8d, 1
mov edx, 0x34
lea rcx, [0x0040f0c0]
call sub.msvcrt.dll_fwrite
cmp rax, 1
sete al
movzx eax, al
mov dword [rbp - 4], eax
jmp 0x4018f5
mov eax, dword [0x0040902c]
cmp eax, 0xffffffff
je 0x401885
mov rax, qword [0x0040bc30]
mov rax, qword [rax]
mov edx, dword [0x0040902c]
movsxd rdx, edx
mov r8d, 2
lea rcx, [0x0040f112]
call rax
mov eax, dword [0x00409034]
cmp eax, 0xffffffff
je 0x4018b2
mov rax, qword [0x0040bc30]
mov rax, qword [rax]
mov edx, dword [0x00409034]
movsxd rdx, edx
mov r8d, 2
lea rcx, [0x0040f110]
call rax
mov eax, dword [0x0040903c]
cmp eax, 0xffffffff
je 0x4018c9
mov eax, dword [0x0040903c]
mov byte [0x0040f107], al
mov rax, qword [rbp + 0x18]
mov r9, rax
mov r8d, 1
mov edx, 0x40
lea rcx, [0x0040f100]
call sub.msvcrt.dll_fwrite
cmp rax, 1
sete al
movzx eax, al
mov dword [rbp - 4], eax
nop
cmp dword [rbp - 4], 1
je 0x401920
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
mov ecx, eax
call sub.msvcrt.dll_strerror
mov r8, rax
mov rdx, qword [rbp + 0x10]
lea rcx, str._s:_Failed_to_update_ELF_header:__s_n
call fcn.00402b7f
mov eax, dword [rbp - 4]
add rsp, 0x40
pop rbp
ret