Function at 0x51a490
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb74
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push dword [eax]
mov esi, dword [ebp + 0xc]
push 0xb40
mov dword [ebp - 0xb74], eax
lea eax, [ebp - 0xb64]
push 1
push eax
mov dword [ebp - 0xb6c], esi
call fcn.00595b79
add esp, 0x10
cmp eax, 0xb40
je 0x51a4ee
pop esi
mov eax, 2
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xb68]
push eax
push 0
push str.SIMPLE
lea eax, [ebp - 0xb64]
push 0xb40
push eax
call fcn.0051a860
add esp, 0x14
test ax, ax
je 0x51a4d9
mov eax, dword [ebp - 0xb68]
cmp eax, 0x54
je 0x51a525
cmp eax, 0x46
jne 0x51a4d9
lea eax, [ebp - 0xb68]
push eax
push 1
push str.BITPIX
lea eax, [ebp - 0xb64]
push 0xb40
push eax
call fcn.0051a860
add esp, 0x14
test ax, ax
je 0x51a4d9
mov eax, dword [ebp - 0xb68]
cmp eax, 8
je 0x51a5a7
cmp eax, 0x10
je 0x51a5a7
cmp eax, 0x20
je 0x51a5a7
cmp eax, 0xffffffe0
je 0x51a5a7
movdqu xmm0, xmmword [str.FITS:_Bad_Bits_Per_Pixel__]
pop esi
movdqu xmmword [ebx + 0x44], xmm0
movq xmm0, qword [0x5f0c28]
movq qword [ebx + 0x54], xmm0
mov ax, word [0x5f0c30]
mov word [ebx + 0x5c], ax
mov al, byte [0x5f0c32]
mov byte [ebx + 0x5e], al
mov eax, 9
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
mov dword [esi], eax
test eax, eax
jns 0x51a5b5
neg eax
mov dword [ebp - 0xb68], eax
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [esi + 4], eax
lea eax, [ebp - 0xb68]
push eax
push 1
push str.NAXIS
lea eax, [ebp - 0xb64]
push 0xb40
push eax
call fcn.0051a860
add esp, 0x14
test ax, ax
je 0x51a4d9
mov eax, dword [ebp - 0xb68]
cmp eax, 0x3e7
ja 0x51a823
test eax, eax
jne 0x51a642
movdqu xmm0, xmmword [str.FITS:_Does_not_contain_any_image__]
pop esi
movdqu xmmword [ebx + 0x44], xmm0
movdqu xmm0, xmmword [0x5f0c64]
movdqu xmmword [ebx + 0x54], xmm0
mov ax, word [0x5f0c74]
mov word [ebx + 0x64], ax
mov al, byte [0x5f0c76]
mov byte [ebx + 0x66], al
mov eax, 9
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
cmp eax, 2
jge 0x51a676
movdqu xmm0, xmmword [str.FITS:_Bad_z_dimension__]
pop esi
mov eax, 9
movdqu xmmword [ebx + 0x44], xmm0
movq xmm0, qword [0x5f0c88]
movq qword [ebx + 0x54], xmm0
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push edi
mov dword [esi + 8], eax
lea eax, [ebp - 0xb68]
push eax
push 1
push str.BZERO
lea eax, [ebp - 0xb64]
push 0xb40
push eax
call fcn.0051a860
xor ecx, ecx
lea edi, [esi + 0xc]
add esp, 0x14
test ax, ax
mov eax, dword [ebp - 0xb6c]
cmovne ecx, dword [ebp - 0xb68]
mov dword [esi + 0x20], ecx
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
xor esi, esi
mov dword [edi], 0
cmp dword [eax + 8], esi
jle 0x51a73b
nop
lea eax, [esi + 1]
push eax
mov dword [ebp - 0xb70], eax
lea eax, [ebp - 0x24]
push str.NAXIS_d
push eax
call fcn.005933b1
lea eax, [ebp - 0xb68]
push eax
push 1
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0xb64]
push 0xb40
push eax
call fcn.0051a860
add esp, 0x20
test ax, ax
je 0x51a7f6
mov eax, dword [ebp - 0xb68]
test eax, eax
jle 0x51a7c9
cmp esi, 3
jge 0x51a727
mov dword [edi], eax
mov eax, dword [ebp - 0xb6c]
add edi, 4
mov esi, dword [ebp - 0xb70]
cmp esi, dword [eax + 8]
jl 0x51a6d0
lea eax, [ebp - 0xb68]
push eax
push 2
push str.END
lea eax, [ebp - 0xb64]
push 0xb40
push eax
call fcn.0051a860
add esp, 0x14
test ax, ax
jne 0x51a7b6
mov esi, dword [ebp - 0xb74]
jmp 0x51a770
push dword [esi]
lea eax, [ebp - 0xb64]
push 0xb40
push 1
push eax
call fcn.00595b79
add esp, 0x10
cmp eax, 0xb40
jne 0x51a80d
lea eax, [ebp - 0xb68]
push eax
push 2
push str.END
lea eax, [ebp - 0xb64]
push 0xb40
push eax
call fcn.0051a860
add esp, 0x14
test ax, ax
je 0x51a770
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
movdqu xmm0, xmmword [str.FITS:_Bad_NAXIS__]
movdqu xmmword [ebx + 0x44], xmm0
mov ax, word [0x5f0cc4]
mov word [ebx + 0x54], ax
pop edi
pop esi
mov eax, 9
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
movdqu xmm0, xmmword [str.FITS:_Bad_keyword__]
movdqu xmmword [ebx + 0x44], xmm0
mov eax, dword [0x5f0cb0]
mov dword [ebx + 0x54], eax
jmp 0x51a7e0
pop edi
pop esi
mov eax, 4
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
movdqu xmm0, xmmword [str.FITS:_Bad_NAXIS_value__]
mov ecx, dword [ebp - 4]
mov eax, 9
pop esi
movdqu xmmword [ebx + 0x44], xmm0
xor ecx, ebp
movq xmm0, qword [0x5f0c4c]
movq qword [ebx + 0x54], xmm0
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret