Function at 0x507f50
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor eax, eax
xor ecx, ecx
mov dword [ebp - 8], eax
xor edx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], ecx
mov eax, dword [edi + 0xc]
mov dword [ebp - 0xc], edx
test eax, eax
je 0x507f88
mov bl, byte [eax]
mov byte [ebp - 1], bl
mov bl, byte [eax + 1]
mov byte [ebp - 2], bl
mov bl, byte [eax + 2]
mov byte [ebp - 3], bl
jmp 0x507f91
mov byte [ebp - 3], cl
mov byte [ebp - 2], cl
mov byte [ebp - 1], cl
movsx ecx, word [edi]
mov ebx, dword [ebp + 0x14]
lea eax, [ecx + 0xf]
cdq
and edx, 7
add eax, edx
movsx edx, word [edi + 4]
sar eax, 3
and eax, 0xfffffffe
mov dword [ebx + 0x20], ecx
imul edx, eax
mov ecx, 1
cmp word [edi + 4], 8
mov dword [ebp - 0x24], eax
mov eax, 0x800
mov dword [ebp - 0x14], edx
jg 0x507fde
test word [edi + 8], ax
jne 0x507fde
mov word [ebx + 0x18], cx
mov ax, word [edi + 4]
or dword [ebx], 2
mov word [ebx + 0x1a], ax
jmp 0x507fe5
mov dword [ebx + 0x18], 0x80003
movsx eax, word [edi]
mov dword [ebx + 0x10], eax
movsx eax, word [edi + 2]
mov dword [ebx + 0x14], eax
cmp word [edi + 6], 0
je 0x507ffd
mov word [ebx + 0x40], cx
movdqu xmm0, xmmword [str.Amiga_Interchange_Format_IFF_ILBM]
push ebx
push dword [ebp + 0x10]
movdqu xmmword [ebx + 0xe6], xmm0
movdqu xmm0, xmmword [0x5ee09c]
movdqu xmmword [ebx + 0xf6], xmm0
mov ax, word [0x5ee0ac]
mov word [ebx + 0x106], ax
call fcn.00456000
movzx esi, ax
add esp, 8
test si, si
jne 0x508355
mov ecx, dword [ebp - 0x14]
add ecx, 0x40
push 1
push ecx
call fcn.00592c0b
mov edi, eax
add esp, 8
mov dword [ebp - 0x20], edi
test edi, edi
jne 0x508066
lea eax, [edi + 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
xor eax, eax
mov dword [ebp - 0x2c], 0
cmp ax, word [edx + 2]
jge 0x508325
lea esp, [esp]
cmp word [ebx + 0x18], 3
jne 0x5080a1
mov ecx, dword [ebx + 0xc]
movsx eax, word [edx]
mov dword [ebp - 0x10], ecx
lea edx, [eax + ecx]
lea eax, [ecx + eax*2]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 8], eax
jmp 0x5080a7
mov ebx, dword [ebx + 0xc]
mov dword [ebp - 0x18], ebx
movsx eax, word [edx + 6]
sub eax, 0
je 0x508144
dec eax
mov eax, dword [ebp - 0x14]
jne 0x50812c
mov ebx, eax
test eax, eax
jle 0x508129
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.00597fff
add esp, 4
cmp al, 0x80
jae 0x5080f4
inc al
movzx ecx, al
movzx edx, al
cmp ecx, ebx
movzx eax, bl
cmovg edx, eax
mov eax, dword [ebp + 8]
movzx esi, dl
push dword [eax]
push 1
push esi
push edi
call fcn.00595b79
jmp 0x508118
movzx eax, al
mov esi, 0x101
sub esi, eax
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.00597fff
cmp esi, ebx
movzx eax, al
cmovg esi, ebx
push esi
push eax
push edi
call fcn.00595760
sub ebx, esi
add esp, 0x10
add edi, esi
test ebx, ebx
jg 0x5080c0
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 0x20]
cmp byte [edx + 0x10], 0
je 0x50815f
push eax
push edi
push dword [ebp - 0x18]
call fcn.00592150
add esp, 0xc
jmp 0x5082f0
mov eax, dword [ebp + 8]
push dword [eax]
push 1
push dword [ebp - 0x14]
push edi
call fcn.00595b79
mov edx, dword [ebp + 0xc]
add esp, 0x10
mov eax, dword [ebp - 0x14]
jmp 0x50812c
xor eax, eax
mov dword [ebp - 0x1c], edi
mov bl, 0x80
mov dword [ebp - 0x28], 0
cmp ax, word [edx]
jge 0x5082f0
movzx edi, word [edx + 4]
xor eax, eax
movsx edx, di
dec edx
js 0x5081a4
mov esi, dword [ebp - 0x24]
mov ecx, edx
imul ecx, dword [ebp - 0x24]
neg esi
add ecx, dword [ebp - 0x1c]
test byte [ecx], bl
je 0x50819d
lea eax, [eax*2 + 1]
jmp 0x50819f
add eax, eax
add ecx, esi
dec edx
jns 0x508190
mov edx, dword [ebp + 0xc]
mov ecx, 0x800
test word [edx + 8], cx
je 0x508285
mov ecx, eax
cmp di, 6
jg 0x508200
shr ecx, 4
cmp ecx, 3
ja case.default.0x508208
jmp dword [ecx*4 + 0x508370]
and eax, 0xf
jmp 0x508212
mov cl, al
shl al, 4
and cl, 0xf
xor cl, al
mov byte [ebp - 3], cl
jmp case.default.0x508208
mov cl, al
shl al, 4
and cl, 0xf
xor cl, al
mov byte [ebp - 1], cl
jmp case.default.0x508208
mov cl, al
shl al, 4
and cl, 0xf
xor cl, al
jmp 0x508259
shr ecx, 6
cmp ecx, 3
ja case.default.0x508208
jmp dword [ecx*4 + 0x508380]
and eax, 0x3f
lea ecx, [eax + eax*2]
mov eax, dword [edx + 0xc]
mov dl, byte [ecx + eax]
mov byte [ebp - 1], dl
mov dl, byte [ecx + eax + 1]
mov al, byte [ecx + eax + 2]
mov byte [ebp - 2], dl
mov byte [ebp - 3], al
jmp case.default.0x508208
mov cl, byte [ebp - 3]
shl al, 2
and cl, 3
or cl, al
mov byte [ebp - 3], cl
jmp case.default.0x508208
mov cl, byte [ebp - 1]
shl al, 2
and cl, 3
or cl, al
mov byte [ebp - 1], cl
jmp case.default.0x508208
mov cl, byte [ebp - 2]
shl al, 2
and cl, 3
or cl, al
mov byte [ebp - 2], cl
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
mov al, byte [ebp - 1]
mov esi, dword [ebp - 8]
mov byte [ecx], al
inc ecx
mov al, byte [ebp - 2]
mov byte [edx], al
inc edx
mov al, byte [ebp - 3]
mov byte [esi], al
inc esi
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], esi
jmp 0x5082d2
cmp di, 0x18
jne 0x5082b5
mov edx, dword [ebp - 8]
mov ecx, eax
shr ecx, 0x10
mov byte [edx], cl
inc edx
mov dword [ebp - 8], edx
mov ecx, eax
mov edx, dword [ebp - 0xc]
shr ecx, 8
mov byte [edx], cl
inc edx
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 0xc]
mov byte [ecx], al
inc ecx
mov dword [ebp - 0x10], ecx
jmp 0x5082d2
movsx ecx, word [edx + 0xa]
cmp eax, ecx
jae 0x5082c8
mov ecx, dword [ebp - 0x18]
mov byte [ecx], al
inc ecx
mov dword [ebp - 0x18], ecx
jmp 0x5082d2
mov eax, dword [ebp - 0x18]
mov byte [eax], 0
inc eax
mov dword [ebp - 0x18], eax
shr bl, 1
jne 0x5082db
inc dword [ebp - 0x1c]
mov bl, 0x80
mov ecx, dword [ebp - 0x28]
movsx eax, word [edx]
inc ecx
mov dword [ebp - 0x28], ecx
cmp ecx, eax
jl 0x508176
mov edi, dword [ebp - 0x20]
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0x10]
call fcn.004585b0
mov edx, dword [ebp + 0xc]
add esp, 0x10
movzx esi, ax
test si, si
jne 0x508322
mov ecx, dword [ebp - 0x2c]
movsx eax, word [edx + 2]
inc ecx
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x2c], ecx
cmp ecx, eax
jl 0x508080
mov ebx, dword [ebp + 0x14]
cmp word [ebx + 0x18], 1
jne 0x508338
push dword [edx + 0xc]
push 8
push 0x100
jmp 0x50833e
push 0
push 0
push 0
push dword [ebp + 0x10]
call fcn.00453f80
add esp, 0x10
push edi
call fcn.00592c4b
mov edi, dword [ebp + 0xc]
add esp, 4
mov eax, dword [edi + 0xc]
test eax, eax
je 0x508365
push eax
call fcn.00592c4b
add esp, 4
pop edi
mov ax, si
pop esi
pop ebx
mov esp, ebp
pop ebp
ret