Function at 0x60400260
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [ebp + 0x14]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
cmp eax, 1
je 0x604004c5
cmp eax, 1
jb 0x604004b0
cmp eax, 2
je 0x60400294
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x1c], 0x60400209
test eax, eax
je 0x604002a7
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x178]
mov eax, dword [eax + 0x84]
test eax, eax
jne 0x60400491
mov eax, dword [esi + 4]
mov dword [ebp - 0x20], eax
push eax
push esi
push ebx
push edi
call sym.exchndl.dll_bfd_print_symbol_vandf
add esp, 0x10
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
push 0x60400212
push ebx
call fcn.6041d180
mov eax, dword [esi + 0x10]
add esp, 0x10
cmp word [eax + 0x10], 0
jns 0x60400489
mov eax, dword [esi + 0x18]
push edx
push eax
push ebx
push edi
call sym.exchndl.dll_bfd_fprintf_vma
mov edx, dword [edi + 0x90]
add esp, 0x10
mov eax, dword [edx + 0x228]
test eax, eax
je 0x60400387
mov eax, dword [edx + 0x22c]
test eax, eax
jne 0x60400324
mov edi, dword [edx + 0x230]
test edi, edi
je 0x60400387
mov ax, word [esi + 0x30]
mov dword [ebp - 0x24], 0x603fe78f
mov ecx, eax
mov word [ebp - 0x38], ax
and ecx, 0x7fff
je 0x60400369
mov dword [ebp - 0x24], 0x60400217
cmp ecx, 1
je 0x60400369
cmp ecx, dword [edx + 0x298]
ja 0x60400445
lea eax, [ecx + ecx*4]
mov ecx, dword [edx + 0x2a0]
shl eax, 3
add eax, ecx
mov eax, dword [eax - 0x10]
mov dword [ebp - 0x24], eax
cmp word [ebp - 0x38], 0
js 0x60400402
push eax
mov eax, dword [ebp - 0x24]
push eax
push 0x6040021c
push ebx
call fcn.6041d180
add esp, 0x10
mov al, byte [esi + 0x25]
xor edx, edx
mov dl, al
cmp edx, 1
je 0x604003f6
cmp edx, 1
jle 0x604003f0
cmp edx, 2
je 0x604003e4
cmp edx, 3
je 0x604003d3
and eax, 0xff
push edx
push eax
push 0x60400224
push ebx
call fcn.6041d180
add esp, 0x10
mov eax, dword [ebp - 0x20]
mov dword [ebp + 0xc], 0x6040022c
mov dword [ebp + 0x10], eax
mov dword [ebp + 8], ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.6041d180
push ebx
push 0xb
push 1
push 0x60400230
call sub.msvcrt.dll_fwrite
jmp 0x604003b4
push ebx
push 8
push 1
push 0x6040023c
jmp 0x604003dd
test edx, edx
je 0x604003b7
jmp 0x604003a2
push ebx
push 0xa
push 1
push 0x60400245
jmp 0x604003dd
push eax
mov eax, dword [ebp - 0x24]
push eax
push 0x60400250
push ebx
call fcn.6041d180
pop eax
mov edi, dword [ebp - 0x24]
push edi
mov edi, 0xa
call sub.msvcrt.dll_strlen
add esp, 0x10
sub edi, eax
test edi, edi
jle 0x60400387
dec edi
push ecx
push ecx
push ebx
push 0x20
call sub.msvcrt.dll_putc
add esp, 0x10
test edi, edi
jg 0x6040042e
jmp 0x60400387
mov edi, dword [edx + 0x2a4]
mov dword [ebp - 0x24], 0x603fe78f
test edi, edi
je 0x60400369
mov edx, dword [edi + 0x18]
test edx, edx
je 0x60400475
mov ax, word [edx + 6]
and eax, 0xffff
cmp eax, ecx
je 0x60400481
mov edx, dword [edx + 0x14]
test edx, edx
jne 0x60400461
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x6040045a
jmp 0x60400369
mov edx, dword [edx + 0x10]
mov dword [ebp - 0x24], edx
jmp 0x60400475
mov eax, dword [esi + 0x1c]
jmp 0x604002f4
push edx
push esi
push ebx
push edi
call eax
add esp, 0x10
test eax, eax
mov dword [ebp - 0x20], eax
jne 0x604002d0
jmp 0x604002be
mov eax, dword [esi + 4]
mov dword [ebp + 0xc], ebx
mov dword [ebp + 8], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.6041d2a0
push ebx
push 4
push 1
push 0x60400256
call sub.msvcrt.dll_fwrite
mov ecx, dword [esi + 8]
add esp, 0xc
push ecx
push ebx
push edi
call sym.exchndl.dll_bfd_fprintf_vma
mov eax, dword [esi + 0xc]
add esp, 0x10
mov dword [ebp + 0x10], eax
mov dword [ebp + 0xc], 0x603ff897
jmp 0x604003c4