Function at 0x4dafc0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
push 0x10000
mov dword [ebp - 4], esi
call fcn.0059922e
mov ebx, eax
add esp, 4
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x4dafeb
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
mov edi, dword [ebp + 8]
push 0x1dc
push 0
push edi
call fcn.00595760
mov dword [edi + 0x1c], 0x7fffffff
push dword [esi + 0x4fa58]
call fcn.00597fff
push dword [esi + 0x4fa58]
call fcn.00597fff
add esp, 0x14
cmp eax, 0xd8
jne 0x4db2f5
jmp 0x4db030
push dword [esi + 0x4fa58]
push 2
push 2
push ebx
call fcn.00595b79
add esp, 0x10
test eax, eax
je 0x4db2f5
movzx ecx, byte [ebx]
lea esi, [ebx + 2]
movzx eax, byte [ebx + 1]
shl cx, 8
or cx, ax
movzx eax, byte [ebx + 3]
movzx edx, cx
movzx ecx, byte [esi]
shl cx, 8
or cx, ax
mov dword [ebp - 0xc], edx
sub cx, 2
movzx eax, cx
mov ecx, 0xff00
mov dword [ebp + 8], eax
cmp dx, cx
jbe 0x4db2f5
movzx ecx, ax
mov eax, dword [ebp - 4]
mov dword [ebp - 8], ecx
push dword [eax + 0x4fa58]
push ecx
push 1
push ebx
call fcn.00595b79
mov eax, dword [ebp - 0xc]
add esp, 0x10
movzx edx, ax
lea eax, [edx - 0xffc0]
cmp eax, 0x1d
ja case.default.0x4db0bf
movzx eax, byte [eax + 0x4db31c]
jmp dword [eax*4 + 0x4db300]
movzx eax, byte [ebx + 7]
mov ecx, eax
shr ecx, 4
imul ecx, eax
dec ecx
and ecx, 3
mov dword [edi + 0x14], ecx
movzx eax, dl
mov dword [edi], eax
movzx eax, byte [ebx]
mov dword [edi + 4], eax
movzx ecx, byte [ebx + 1]
movzx eax, byte [esi]
mov esi, dword [ebp - 4]
shl ecx, 8
or ecx, eax
mov dword [edi + 8], ecx
movzx ecx, byte [ebx + 3]
movzx eax, byte [ebx + 4]
shl ecx, 8
or ecx, eax
mov dword [edi + 0xc], ecx
movzx eax, byte [ebx + 5]
add eax, dword [edi + 0x14]
cmp word [ebp + 8], 9
mov dword [edi + 0x10], eax
jne 0x4db187
cmp dword [esi + 0x440c], 0
jne 0x4db187
push dword [esi + 0x4fa58]
call fcn.00597fff
add esp, 4
jmp 0x4db187
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x4db2ed
mov eax, dword [ebp - 8]
mov ecx, ebx
add eax, ebx
cmp ebx, eax
jae 0x4db2ed
lea ebx, [ebx]
movzx esi, byte [ecx]
inc ecx
mov eax, esi
mov dword [ebp + 8], ecx
and eax, 0xffffffec
jne case.0x4db0bf.65474
mov ecx, dword [ebp - 4]
lea eax, [ebp + 8]
push eax
call fcn.004dc490
mov ecx, dword [ebp + 8]
mov dword [edi + esi*4 + 0x138], eax
mov dword [edi + esi*4 + 0x188], eax
mov eax, dword [ebp - 8]
add eax, ebx
cmp ecx, eax
jb 0x4db150
mov esi, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
mov eax, 0xffda
cmp word [ebp - 0xc], ax
jne 0x4db030
mov eax, dword [edi + 4]
cmp eax, 0x10
jg 0x4db2f5
mov ecx, dword [edi + 0x10]
cmp ecx, 6
jg 0x4db2f5
test eax, eax
je 0x4db2f5
cmp dword [edi + 8], 0
je 0x4db2f5
cmp dword [edi + 0xc], 0
je 0x4db2f5
test ecx, ecx
je 0x4db2f5
test edx, edx
jne 0x4db27e
cmp dword [edi + 0x138], edx
je 0x4db2f5
lea ecx, [edi + 0x13c]
mov edx, 0x13
cmp dword [ecx], 0
jne 0x4db1fe
mov eax, dword [ecx - 4]
mov dword [ecx], eax
add ecx, 4
dec edx
jne 0x4db1f4
cmp dword [edi + 0x14], edx
je 0x4db246
lea ecx, [edi + 0x140]
mov edx, 4
mov eax, dword [edi + 0x13c]
lea ecx, [ecx + 4]
mov dword [ecx - 4], eax
dec edx
jne 0x4db214
xor ecx, ecx
cmp dword [edi + 0x14], ecx
jle 0x4db246
lea ebx, [ebx]
mov eax, dword [edi + 0x138]
inc ecx
mov dword [edi + edx*4 + 0x13c], eax
movzx edx, cx
cmp edx, dword [edi + 0x14]
jl 0x4db230
mov eax, dword [edi + 0x10]
imul eax, dword [edi + 0xc]
push 4
push eax
call fcn.00592c0b
add esp, 8
mov dword [edi + 0x1d8], eax
mov ecx, esi
push str.ljpeg_start__
push eax
call fcn.004dc800
push ebx
call fcn.005992a4
add esp, 4
mov dword [esi + 0x4404], 1
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 8
movzx eax, byte [ebx]
movzx eax, byte [ebx + eax*2 + 1]
mov dword [edi + 0x18], eax
movzx eax, byte [ebx]
movzx eax, byte [ebx + eax*2 + 3]
and eax, 0xf
sub dword [edi + 4], eax
jmp case.0x4db0bf.65474
lea edx, [edi + 0x38]
mov ebx, 0x40
movzx ecx, byte [esi - 1]
lea esi, [esi + 2]
movzx eax, byte [esi - 2]
lea edx, [edx + 2]
shl cx, 8
or cx, ax
mov word [edx - 2], cx
dec ebx
jne 0x4db2b2
mov ebx, dword [ebp - 0x10]
jmp case.0x4db0bf.65474
movzx ecx, byte [ebx]
movzx eax, byte [ebx + 1]
shl ecx, 8
or ecx, eax
mov dword [edi + 0x1c], ecx
jmp case.0x4db0bf.65474
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp - 4]
jmp 0x4db18a
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8