Function at 0x504890
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4b4
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x328]
push edi
mov edi, dword [ebp + 8]
push edi
push eax
mov dword [ebp - 0x494], ebx
call fcn.00505000
movzx eax, ax
add esp, 8
test ax, ax
jne 0x504fed
lea eax, [ebp - 0x490]
push eax
call fcn.00457d90
mov eax, dword [ebp + 0x14]
add esp, 4
mov ecx, dword [ebp - 0x31c]
mov word [ebp - 0x48c], ax
mov eax, 2
mov word [ebp - 0x450], ax
mov eax, ecx
and eax, 7
inc eax
mov word [ebp - 0x476], ax
test cl, cl
jns 0x50492d
mov cl, byte [ebp - 0x476]
mov eax, 1
push dword [edi]
shl eax, cl
push 1
lea eax, [eax + eax*2]
push eax
lea eax, [ebp - 0x314]
push eax
call fcn.00595b79
add esp, 0x10
xor eax, eax
mov dword [ebx + 0x3c], 0
push esi
xor esi, esi
mov dword [ebp - 0x4a8], eax
mov dword [ebp - 0x498], esi
push dword [edi]
call fcn.00597fff
add esp, 4
cmp eax, 0xffffffff
je 0x504fc1
cmp eax, 0x3b
je 0x504fc1
cmp eax, 0x21
jne 0x504ba1
push dword [edi]
call fcn.00597fff
add esp, 4
mov dword [ebp - 0x4a0], eax
sub eax, 0xf9
je 0x504a71
sub eax, 5
je 0x504ac1
dec eax
jne 0x504b9b
push dword [edi]
call fcn.00597fff
mov esi, eax
add esp, 4
cmp esi, 0xb
jne 0x504cd7
push dword [edi]
push 1
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00595b79
add esp, 0x10
mov byte [ebp - 9], 0
lea ecx, [ebp - 0x14]
mov edx, str.XMP_DataXMP
mov esi, 7
lea esp, [esp]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x504ce9
add ecx, 4
add edx, 4
sub esi, 4
jae 0x5049d0
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x504ce9
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x504ce9
push 0x800
call fcn.00593e38
push dword [edi]
mov dword [ebp - 0x49c], eax
xor esi, esi
mov dword [ebp - 0x4a4], 0x800
call fcn.00597fff
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x504c77
lea ecx, [ecx]
cmp ebx, 0xffffffff
je 0x504c77
mov eax, dword [ebp - 0x4a4]
lea ecx, [ebx + 1]
add ecx, esi
cmp ecx, eax
jl 0x504c4a
add eax, 0x800
push eax
push dword [ebp - 0x49c]
mov dword [ebp - 0x4a4], eax
call fcn.00593eca
add esp, 8
mov dword [ebp - 0x49c], eax
jmp 0x504c50
push dword [edi]
call fcn.00597fff
add esp, 4
cmp eax, 4
jne 0x504ab7
push dword [edi]
call fcn.00597fff
push edi
mov bl, al
call fcn.0045d210
push dword [edi]
call fcn.00597fff
add esp, 0xc
test bl, 1
mov ebx, dword [ebp - 0x494]
je 0x504945
movzx eax, al
mov word [ebp - 0x44c], ax
jmp 0x504945
push eax
push edi
call fcn.0045d3f0
add esp, 8
test dword [ebx + 0x8c], 0x10000
je 0x504995
push dword [edi]
xor ebx, ebx
mov dword [ebp - 0x49c], ebx
call fcn.00597fff
mov esi, eax
add esp, 4
test esi, esi
je 0x504b8f
lea ecx, [ecx]
cmp esi, 0xffffffff
je 0x504b58
test ebx, ebx
je 0x504b0e
mov eax, dword [ebp - 0x49c]
inc eax
add eax, esi
push eax
push ebx
call fcn.00593eca
add esp, 8
jmp 0x504b1a
lea eax, [esi + 1]
push eax
call fcn.00593e38
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x504b3e
push dword [edi]
mov eax, dword [ebp - 0x49c]
push 1
add eax, ebx
push esi
push eax
call fcn.00595b79
add esp, 0x10
add dword [ebp - 0x49c], esi
jmp 0x504b48
push esi
push edi
call fcn.0045d3f0
add esp, 8
push dword [edi]
call fcn.00597fff
mov esi, eax
add esp, 4
test esi, esi
jne 0x504af0
test ebx, ebx
je 0x504b8f
push 3
push 0x5edeb8
push ebx
call fcn.00596360
add esp, 0xc
test eax, eax
je 0x504b86
push dword [ebp - 0x49c]
mov eax, dword [ebp - 0x494]
push ebx
push eax
call fcn.004522a0
add esp, 0xc
push ebx
call fcn.00592c4b
add esp, 4
mov ebx, dword [ebp - 0x494]
mov esi, dword [ebp - 0x498]
mov eax, dword [ebp - 0x4a0]
cmp eax, 0x2c
jne 0x504945
lea eax, [ebp - 0x4b4]
push edi
push eax
call fcn.004f3be0
add esp, 8
test ax, ax
je 0x504fbc
mov ebx, dword [ebp - 0x4ac]
mov esi, 1
test bl, bl
jns 0x504bff
push dword [edi]
mov eax, ebx
and eax, 7
inc eax
mov word [ebp - 0x476], ax
mov eax, esi
mov cl, byte [ebp - 0x476]
shl eax, cl
push esi
lea eax, [eax + eax*2]
push eax
lea eax, [ebp - 0x314]
push eax
call fcn.00595b79
add esp, 0x10
mov eax, dword [ebp + 0x10]
shr ebx, 6
and ebx, 1
test eax, eax
jne 0x504d33
movzx eax, byte [ebp - 0x323]
push eax
movzx eax, byte [ebp - 0x324]
push eax
movzx eax, byte [ebp - 0x325]
push eax
lea eax, [ebp - 0x3aa]
test bx, bx
je 0x504d23
push str.Compuserve_GIF__Version__c_c_c___Interlaced_
push eax
call fcn.005933b1
add esp, 0x14
jmp 0x504d4d
mov eax, dword [ebp - 0x49c]
mov byte [esi + eax], bl
inc esi
push dword [edi]
add eax, esi
push ebx
push 1
push eax
call fcn.00595b79
push dword [edi]
add esi, ebx
call fcn.00597fff
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x504a30
mov ebx, dword [ebp - 0x49c]
push str.__xpacket_end_w___
push ebx
call fcn.00596770
add esp, 8
test eax, eax
jne 0x504ca1
push str.__xpacket_endw__
push ebx
call fcn.00596770
add esp, 8
test eax, eax
je 0x504cb9
mov esi, ebx
mov byte [eax + 0x13], 0
lea ecx, [esi + 1]
lea ebx, [ebx]
mov al, byte [esi]
inc esi
test al, al
jne 0x504cb0
sub esi, ecx
mov eax, dword [ebp - 0x494]
push esi
push ebx
push 3
push eax
call fcn.00452460
push ebx
call fcn.00592c4b
add esp, 0x14
jmp 0x504b8f
push esi
push edi
call fcn.0045d3f0
add esp, 8
test esi, esi
je 0x504b95
push dword [edi]
call fcn.00597fff
add esp, 4
test eax, eax
je 0x504b95
jmp 0x504d00
cmp eax, 0xffffffff
je 0x504b95
push eax
push edi
call fcn.0045d3f0
push dword [edi]
call fcn.00597fff
add esp, 0xc
test eax, eax
jne 0x504d00
jmp 0x504b95
push str.Compuserve_GIF__Version__c_c_c_
push eax
call fcn.005933b1
add esp, 0x14
jmp 0x504d4d
lea edx, [ebp - 0x3aa]
mov ecx, eax
sub edx, eax
lea ecx, [ecx]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x504d40
movzx eax, word [ebp - 0x4ae]
mov word [ebp - 0x478], si
movzx esi, word [ebp - 0x4b0]
mov dword [ebp - 0x490], 2
mov dword [ebp - 0x480], esi
mov dword [ebp - 0x47c], eax
mov dword [ebp - 0x470], esi
test esi, esi
jle 0x504f83
test eax, eax
jle 0x504f83
push dword [edi]
call fcn.00597fff
movzx eax, ax
add esp, 4
mov dword [ebp - 0x4a4], eax
cmp ax, 2
jl 0x504f5c
mov ecx, 9
cmp cx, ax
jl 0x504f5c
call fcn.0045bc00
test al, al
je 0x504f23
mov edx, dword [ebp - 0x494]
mov ecx, dword [edx + 0x3c]
lea eax, [ecx + 1]
mov dword [edx + 0x3c], eax
cmp dword [edx + 0x90], ecx
jne 0x504eb2
lea eax, [ebp - 0x490]
push eax
push edx
call fcn.00456000
movzx eax, ax
add esp, 8
mov dword [ebp - 0x498], eax
test ax, ax
jne 0x504ef9
mov eax, dword [ebp - 0x494]
push eax
movzx eax, word [ebp - 0x4ae]
push eax
push esi
push 1
push ebx
push dword [ebp - 0x484]
push dword [ebp - 0x4a4]
push edi
call fcn.00504240
add esp, 0x20
movzx esi, ax
cmp word [ebp - 0x476], 1
mov dword [ebp - 0x498], esi
jne 0x504e84
cmp byte [ebp - 0x314], 0
jne 0x504e84
cmp byte [ebp - 0x313], 0
jne 0x504e84
cmp byte [ebp - 0x312], 0
jne 0x504e84
cmp byte [ebp - 0x311], 0
jne 0x504e84
cmp byte [ebp - 0x310], 0
jne 0x504e84
cmp byte [ebp - 0x30f], 0
jne 0x504e84
mov word [ebp - 0x310], 0xffff
mov byte [ebp - 0x311], 0xff
mov ebx, dword [ebp - 0x494]
lea eax, [ebp - 0x314]
push eax
push 8
push 0x100
push ebx
call fcn.00453f80
add esp, 0x10
test si, si
jne 0x504f05
mov dword [ebp - 0x4a8], 1
jmp 0x504f05
lea eax, [esi + 0x400]
push eax
call fcn.00593e38
mov esi, eax
mov eax, dword [ebp - 0x494]
push eax
movzx eax, word [ebp - 0x4ae]
push eax
movzx eax, word [ebp - 0x4b0]
push eax
push 0
push ebx
push esi
push dword [ebp - 0x4a4]
push edi
call fcn.00504240
movzx eax, ax
push esi
mov dword [ebp - 0x498], eax
call fcn.00592c4b
add esp, 0x28
mov esi, dword [ebp - 0x498]
mov ebx, dword [ebp - 0x494]
test dword [ebx + 0x8c], 0x8000
jne 0x504fc1
test si, si
je 0x504945
jmp 0x504fc1
movdqu xmm0, xmmword [str.GIF_:_Bad_compression__LZW___]
mov ecx, dword [ebp - 0x494]
mov esi, 9
movdqu xmmword [ecx + 0x44], xmm0
movq xmm0, qword [0x5edf84]
movq qword [ecx + 0x54], xmm0
mov eax, dword [0x5edf8c]
mov dword [ecx + 0x5c], eax
mov ax, word [0x5edf90]
mov word [ecx + 0x60], ax
jmp 0x504fc1
movdqu xmm0, xmmword [str.GIF_:_Bad_codes_size__]
mov eax, dword [ebp - 0x494]
mov esi, 9
movdqu xmmword [eax + 0x44], xmm0
movq xmm0, qword [0x5edf6c]
movq qword [eax + 0x54], xmm0
jmp 0x504fc1
movdqu xmm0, xmmword [str.GIF_:_Bad_pictures_size__]
mov ecx, dword [ebp - 0x494]
mov esi, 9
movdqu xmmword [ecx + 0x44], xmm0
movq xmm0, qword [0x5edf50]
movq qword [ecx + 0x54], xmm0
mov ax, word [0x5edf58]
mov word [ecx + 0x5c], ax
mov al, byte [0x5edf5a]
mov byte [ecx + 0x5e], al
jmp 0x504fc1
mov esi, 4
mov eax, dword [ebp - 0x4a8]
test ax, ax
je 0x504fdf
pop esi
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
movsx eax, si
test si, si
jne 0x504fec
mov eax, 2
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret