Function at 0x1004e240
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1428
call fcn.100c4c20
mov eax, dword [0x101383dc]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
xor eax, eax
mov byte [ebp - 0x13fd], 0
push esi
mov ebx, edx
mov byte [ebp - 0x13fe], 0
mov esi, ecx
mov dword [ebp - 0x1414], ebx
push edi
mov dword [ebp - 0x1418], esi
xor edi, edi
mov dword [ebp - 0x1410], eax
mov dword [ebp - 0x1408], eax
mov dword [ebp - 0x140c], eax
mov dword [ebp - 0x1404], 1
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1004e2b4
push eax
call fcn.100cd848
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004e2c7
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x1004e2c5
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x1004e2c7
xor ecx, ecx
movzx eax, byte [edi + 0x1010c6e0]
cmp ecx, eax
jne 0x1004ebc6
inc edi
cmp edi, 8
jl 0x1004e298
cmp ebx, 1
je 0x1004eaf0
mov ecx, esi
call fcn.10049f40
mov ecx, esi
mov ebx, eax
call fcn.10049f40
shl ebx, 0x10
mov ecx, esi
add ebx, eax
call fcn.10049f40
mov ecx, esi
mov edi, eax
call fcn.10049f40
shl edi, 0x10
lea ecx, [edi + eax]
mov eax, dword [ebp - 0x1404]
test eax, eax
je 0x1004e326
cmp ecx, 0x49484452
jne 0x1004e506
cmp ecx, 0x49484452
ja 0x1004e72e
je 0x1004e543
cmp ecx, 0x49444154
je 0x1004e47f
cmp ecx, 0x49454e44
jne 0x1004e742
cmp dword [ebp - 0x1414], 0
jne 0x1004eaf0
mov edi, dword [esi + 0x1c]
test edi, edi
je 0x1004e506
push 0x4000
call fcn.100d397d
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x1004eb14
mov eax, dword [ebp - 0x1410]
add eax, edi
mov dword [ebp - 0x13e8], ecx
mov dword [ebp - 0x13f8], eax
lea eax, [ecx + 0x4000]
mov dword [ebp - 0x13ec], ecx
lea ecx, [ebp - 0x13fc]
mov dword [ebp - 0x13fc], edi
mov dword [ebp - 0x13e4], eax
mov dword [ebp - 0x13e0], 1
call fcn.1004d440
test eax, eax
je 0x1004eb06
mov eax, dword [ebp - 0x13e8]
mov edi, dword [ebp - 0x13ec]
sub edi, eax
mov dword [esi + 0x20], eax
test eax, eax
je 0x1004ebd0
push dword [esi + 0x1c]
call fcn.100ce041
mov dword [esi + 0x1c], 0
add esp, 4
mov ecx, dword [esi + 8]
lea eax, [ecx + 1]
cmp dword [ebp + 8], eax
jne 0x1004e407
cmp byte [ebp - 0x13fd], 0
je 0x1004e412
cmp byte [ebp - 0x13fe], 0
jne 0x1004e412
mov eax, ecx
mov ecx, 0xc
mov ebx, esi
push eax
push edi
mov dword [ecx + ebx], eax
mov ecx, esi
mov edx, dword [esi + 0x20]
call fcn.1004d5d0
add esp, 8
test eax, eax
je 0x1004ebd0
cmp byte [ebp - 0x13fe], 0
mov eax, 0xc
je 0x1004e9c2
mov edx, dword [esi + 4]
imul edx, dword [esi]
mov ecx, dword [esi + 0x24]
mov edi, dword [eax + ebx]
test edx, edx
je 0x1004e9c2
cmp edi, 2
jne 0x1004e98f
mov bl, byte [ebp - 0x410]
cmp byte [ecx], bl
lea ecx, [ecx + 2]
sete al
dec al
mov byte [ecx - 1], al
sub edx, 1
jne 0x1004e468
jmp 0x1004e9bb
cmp byte [ebp - 0x13fd], 0
je 0x1004e491
cmp dword [ebp - 0x140c], 0
je 0x1004e506
mov ecx, dword [ebp - 0x1410]
mov eax, dword [ebp - 0x1408]
lea edi, [ebx + ecx]
cmp edi, eax
jbe 0x1004e4e9
test eax, eax
jne 0x1004e4c0
mov eax, 0x1000
cmp ebx, eax
cmova eax, ebx
mov dword [ebp - 0x1408], eax
cmp edi, eax
jbe 0x1004e4cc
nop dword [eax]
add eax, eax
cmp edi, eax
ja 0x1004e4c0
mov dword [ebp - 0x1408], eax
push eax
push dword [esi + 0x1c]
call fcn.100d48a4
add esp, 8
test eax, eax
je 0x1004ea15
mov ecx, dword [ebp - 0x1410]
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1004e523
push eax
mov eax, dword [esi + 0x1c]
push ebx
add eax, ecx
push 1
push eax
call fcn.100ce3e9
add esp, 0x10
cmp eax, ebx
je 0x1004e538
mov dword [0x1018d91c], str.Corrupt_PNG
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x1c]
push ebx
push dword [esi + 0x14]
add eax, ecx
push eax
call fcn.100c58f0
add esp, 0xc
add dword [esi + 0x14], ebx
mov dword [ebp - 0x1410], edi
jmp 0x1004e972
test eax, eax
je 0x1004e506
cmp ebx, 0xd
jne 0x1004e506
mov ecx, esi
call fcn.10049f40
mov ecx, esi
mov edi, eax
call fcn.10049f40
shl edi, 0x10
add eax, edi
mov dword [esi], eax
cmp eax, 0x1000000
ja 0x1004eb68
mov ecx, esi
call fcn.10049f40
mov ecx, esi
mov edi, eax
call fcn.10049f40
shl edi, 0x10
add eax, edi
mov dword [esi + 4], eax
cmp eax, 0x1000000
ja 0x1004eb68
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1004e5ad
push eax
call fcn.100cd848
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004e5c0
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x1004eb4b
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
cmp ecx, 8
jne 0x1004eb4b
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1004e5e5
push eax
call fcn.100cd848
mov edi, eax
add esp, 4
xor eax, eax
cmp edi, 0xffffffff
cmove edi, eax
jmp 0x1004e5f4
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x1004e619
movzx edi, byte [eax]
inc eax
mov dword [esi + 0x14], eax
mov eax, edi
cmp edi, 6
jg 0x1004e506
cmp edi, 3
jne 0x1004e60d
mov byte [ebp - 0x13fd], 3
jmp 0x1004e61b
mov edi, eax
test al, 1
jne 0x1004e506
jmp 0x1004e61b
xor edi, edi
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1004e637
push eax
call fcn.100cd848
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004e646
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x1004e64e
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
test ecx, ecx
jne 0x1004e506
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1004e66a
push eax
call fcn.100cd848
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004e679
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x1004e681
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
test ecx, ecx
jne 0x1004e506
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1004e69d
push eax
call fcn.100cd848
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004e6ac
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x1004e6b4
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
test ecx, ecx
jne 0x1004eb2e
mov ecx, dword [esi]
test ecx, ecx
je 0x1004e506
mov ebx, dword [esi + 4]
test ebx, ebx
je 0x1004e506
xor edx, edx
mov eax, 0x40000000
div ecx
cmp byte [ebp - 0x13fd], 0
jne 0x1004e717
mov ecx, edi
xor edx, edx
shr ecx, 2
and edi, 2
and ecx, 1
or edi, 1
add ecx, edi
div ecx
mov dword [esi + 8], ecx
cmp eax, ebx
jae 0x1004e972
mov dword [0x1018d91c], str.Image_too_large_to_decode
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret
shr eax, 2
mov dword [esi + 8], 1
cmp eax, ebx
jb 0x1004e506
jmp 0x1004e972
cmp ecx, 0x504c5445
je 0x1004e829
cmp ecx, 0x74524e53
je 0x1004e76e
test ecx, 0x20000000
je 0x1004eb85
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1004e766
push 1
push ebx
push eax
call fcn.100ce839
add esp, 0xc
jmp 0x1004e972
add dword [esi + 0x14], ebx
jmp 0x1004e972
cmp dword [esi + 0x1c], 0
jne 0x1004e506
cmp byte [ebp - 0x13fd], 0
je 0x1004e7e8
mov eax, dword [ebp - 0x140c]
test eax, eax
je 0x1004e506
cmp ebx, eax
ja 0x1004e506
xor edi, edi
mov byte [ebp - 0x13fd], 4
test ebx, ebx
je 0x1004e972
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1004e7c4
push eax
call fcn.100cd848
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004e7d7
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jae 0x1004e7d5
movzx ecx, byte [eax]
inc eax
mov dword [esi + 0x14], eax
jmp 0x1004e7d7
xor ecx, ecx
mov byte [ebp + edi*4 - 0x409], cl
inc edi
cmp edi, ebx
jb 0x1004e7a8
jmp 0x1004e972
mov ecx, dword [esi + 8]
test cl, 1
je 0x1004e506
lea eax, [ecx + ecx]
cmp ebx, eax
jne 0x1004e506
xor edi, edi
mov byte [ebp - 0x13fe], 1
test ecx, ecx
jle 0x1004e972
mov ecx, esi
call fcn.10049f40
mov byte [ebp + edi - 0x410], al
inc edi
cmp edi, dword [esi + 8]
jl 0x1004e810
jmp 0x1004e972
cmp ebx, 0x300
ja 0x1004e506
mov eax, 0xaaaaaaab
mul ebx
mov ecx, edx
shr ecx, 1
mov dword [ebp - 0x140c], ecx
lea eax, [ecx + ecx*2]
cmp eax, ebx
jne 0x1004e506
mov dword [ebp - 0x1404], 0
test ecx, ecx
je 0x1004e972
lea ebx, [esi + 0x18]
lea edi, [esi + 0x14]
nop dword [eax]
mov eax, dword [esi + 0x10]
mov edx, edi
mov dword [ebp - 0x141c], edi
mov dword [ebp - 0x1428], ebx
mov dword [ebp - 0x1420], edx
mov dword [ebp - 0x1424], ebx
test eax, eax
je 0x1004e8a8
push eax
call fcn.100cd848
mov ecx, eax
add esp, 4
xor eax, eax
mov edx, edi
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004e8b8
mov eax, dword [edi]
cmp eax, dword [ebx]
jae 0x1004e8b6
movzx ecx, byte [eax]
inc eax
mov dword [edi], eax
jmp 0x1004e8b8
xor ecx, ecx
mov eax, dword [ebp - 0x1404]
mov byte [ebp + eax*4 - 0x40c], cl
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1004e8e7
push eax
call fcn.100cd848
mov ecx, eax
lea ebx, [esi + 0x18]
xor eax, eax
lea edi, [esi + 0x14]
add esp, 4
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004e901
mov ecx, dword [ebp - 0x1424]
mov edi, edx
mov eax, dword [edx]
mov ebx, ecx
cmp eax, dword [ecx]
jae 0x1004e8ff
movzx ecx, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x1004e901
xor ecx, ecx
mov eax, dword [ebp - 0x1404]
mov byte [ebp + eax*4 - 0x40b], cl
mov eax, dword [esi + 0x10]
test eax, eax
je 0x1004e92a
push eax
call fcn.100cd848
mov ecx, eax
add esp, 4
xor eax, eax
cmp ecx, 0xffffffff
cmove ecx, eax
jmp 0x1004e94a
mov edx, dword [ebp - 0x141c]
mov edi, edx
mov ecx, dword [ebp - 0x1428]
mov ebx, ecx
mov eax, dword [edx]
cmp eax, dword [ecx]
jae 0x1004e948
movzx ecx, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x1004e94a
xor ecx, ecx
mov eax, dword [ebp - 0x1404]
mov byte [ebp + eax*4 - 0x40a], cl
mov byte [ebp + eax*4 - 0x409], 0xff
inc eax
mov dword [ebp - 0x1404], eax
cmp eax, dword [ebp - 0x140c]
jb 0x1004e870
mov ecx, esi
call fcn.10049f40
mov ecx, esi
call fcn.10049f40
mov dword [ebp - 0x1404], 0
jmp 0x1004e2e5
mov al, byte [ebp - 0x40e]
mov bl, byte [ebp - 0x40f]
mov ah, byte [ebp - 0x410]
cmp byte [ecx], ah
jne 0x1004e9b3
cmp byte [ecx + 1], bl
jne 0x1004e9b3
cmp byte [ecx + 2], al
jne 0x1004e9b3
mov byte [ecx + 3], 0
add ecx, 4
sub edx, 1
jne 0x1004e9a1
mov eax, 0xc
mov ebx, esi
mov cl, byte [ebp - 0x13fd]
test cl, cl
je 0x1004eade
movzx edi, cl
mov ecx, dword [ebp + 8]
mov dword [esi + 8], edi
mov dword [eax + ebx], edi
cmp ecx, 3
jl 0x1004e9e6
mov dword [eax + ebx], ecx
mov edi, ecx
mov ebx, dword [esi + 4]
xor ecx, ecx
imul ebx, dword [esi]
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x1408], eax
mov eax, ebx
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100d397d
add esp, 4
mov dword [ebp - 0x1414], eax
test eax, eax
jne 0x1004ea32
mov dword [0x1018d91c], str.Out_of_memory
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret
cmp edi, 3
jne 0x1004ea7c
xor edi, edi
test ebx, ebx
je 0x1004eaca
mov esi, dword [ebp - 0x1408]
lea edx, [eax + 2]
nop word [eax + eax]
movzx ecx, byte [edi + esi]
lea edx, [edx + 3]
inc edi
mov al, byte [ebp + ecx*4 - 0x40c]
mov byte [edx - 5], al
mov al, byte [ebp + ecx*4 - 0x40b]
mov byte [edx - 4], al
mov al, byte [ebp + ecx*4 - 0x40a]
mov byte [edx - 3], al
cmp edi, ebx
jb 0x1004ea50
jmp 0x1004eac4
xor edi, edi
test ebx, ebx
je 0x1004eaca
mov esi, dword [ebp - 0x1408]
lea edx, [eax + 2]
nop dword [eax + eax]
movzx ecx, byte [edi + esi]
lea edx, [edx + 4]
inc edi
mov al, byte [ebp + ecx*4 - 0x40c]
mov byte [edx - 6], al
mov al, byte [ebp + ecx*4 - 0x40b]
mov byte [edx - 5], al
mov al, byte [ebp + ecx*4 - 0x40a]
mov byte [edx - 4], al
mov al, byte [ebp + ecx*4 - 0x409]
mov byte [edx - 3], al
cmp edi, ebx
jb 0x1004ea90
mov esi, dword [ebp - 0x1418]
push dword [esi + 0x24]
call fcn.100ce041
mov eax, dword [ebp - 0x1414]
add esp, 4
mov dword [esi + 0x24], eax
push dword [esi + 0x20]
call fcn.100ce041
add esp, 4
mov dword [esi + 0x20], 0
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x13e8]
call fcn.100ce041
add esp, 4
mov dword [esi + 0x20], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret
mov dword [0x1018d91c], str.PNG_not_supported:_interlaced_mode
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret
mov dword [0x1018d91c], str.PNG_not_supported:_8_bit_only
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret
mov dword [0x1018d91c], str.Very_large_image__corrupt__
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret
mov eax, ecx
mov byte [0x10186c37], cl
shr eax, 0x18
mov byte [str.XXXX_chunk_not_known], al
mov eax, ecx
shr eax, 0x10
mov byte [0x10186c35], al
mov eax, ecx
shr eax, 8
mov byte [0x10186c36], al
xor eax, eax
mov dword [0x1018d91c], 0x1010c510
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret
mov dword [0x1018d91c], str.Not_a_PNG
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100c2ed5
mov esp, ebp
pop ebp
ret