Function at 0x603f0850
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x24
mov eax, dword [ebp + 8]
push 0x603ee4f2
push eax
call sym.exchndl.dll_bfd_get_section_by_name
add esp, 0x10
mov ebx, eax
mov eax, 1
test ebx, ebx
je 0x603f088b
test byte [ebx + 0x14], 2
jne 0x603f0a79
mov eax, dword [ebx + 0x24]
test eax, eax
jne 0x603f0893
mov eax, 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0xc]
push eax
push 0x41
push 1
push 0x603f0750
call sub.msvcrt.dll_fwrite
add esp, 0x10
test byte [ebx + 0x14], 2
jne 0x603f0a6c
sub esp, 0xc
mov esi, dword [ebx + 0x24]
push esi
call sym.exchndl.dll_bfd_malloc
add esp, 0x10
test eax, eax
mov dword [ebp - 0x10], eax
je 0x603f0a5d
sub esp, 0xc
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp + 8]
push esi
push 0
push eax
push ebx
push edi
call sym.exchndl.dll_bfd_get_section_contents
add esp, 0x20
test byte [ebx + 0x14], 2
jne 0x603f0a48
mov ebx, dword [ebx + 0x24]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], ebx
cmp dword [ebp - 0x14], ebx
jb 0x603f0910
sub esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
call sub.msvcrt.dll_free
jmp 0x603f0886
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x14]
sub esp, 0xc
add ecx, ebx
mov eax, dword [edx + 4]
mov dword [ebp - 0x28], ecx
push ecx
call dword [eax + 0x28]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 0x28]
add eax, 4
mov dword [esp], eax
call dword [edx + 0x28]
add esp, 0x10
mov edx, eax
sub edx, 8
mov dword [ebp - 0x24], eax
mov eax, edx
mov ecx, dword [ebp - 0x24]
shr eax, 0x1f
add edx, eax
sar edx, 1
test ecx, ecx
mov dword [ebp - 0x20], edx
je 0x603f08ff
xor esi, esi
push eax
push eax
mov eax, dword [ebp - 0x24]
push edx
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp + 0xc]
push 0x603f07b0
push eax
call fcn.6041d180
add esp, 0x20
cmp esi, dword [ebp - 0x20]
jl 0x603f09a0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
add eax, ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x14], eax
jb 0x603f0910
jmp 0x603f08ff
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 8]
sub esp, 0xc
lea edi, [eax + esi*2]
mov edx, dword [ecx + 4]
lea eax, [edi + 8]
push eax
call dword [edx + 0x34]
and eax, 0xffff
add esp, 0x10
mov ebx, eax
mov edx, eax
shr ebx, 0xc
and edx, 0xfff
cmp ebx, 0xb
jbe 0x603f09d5
mov ebx, 0xb
mov ecx, dword [ebx*4 + 0x603f0710]
push eax
push eax
push ecx
mov ecx, dword [ebp - 0x1c]
lea eax, [ecx + edx]
push eax
mov eax, dword [ebp + 0xc]
push edx
push esi
push 0x603f0810
push eax
call fcn.6041d180
add esp, 0x20
cmp ebx, 4
je 0x603f0a20
inc esi
push eax
push eax
mov eax, dword [ebp + 0xc]
push eax
push 0xa
call sub.msvcrt.dll_fputc
add esp, 0x10
cmp esi, dword [ebp - 0x20]
jl 0x603f09a0
jmp 0x603f0982
mov edx, dword [ebp + 8]
sub esp, 0xc
inc esi
mov eax, dword [edx + 4]
lea edx, [edi + 0xa]
push edx
call dword [eax + 0x34]
add esp, 0xc
push eax
mov eax, dword [ebp + 0xc]
push 0x603f0830
push eax
call fcn.6041d180
add esp, 0x10
jmp 0x603f09fe
push esi
push 0x603f0837
push 0x69f
push 0x603ef5b6
call sym.exchndl.dll__bfd_abort
xor eax, eax
test esi, esi
jne 0x603f088b
jmp 0x603f08cc
push eax
push 0x603f0837
push 0x695
jmp 0x603f0a53
push eax
push 0x603f0837
push 0x68f
jmp 0x603f0a53