Function at 0x403009
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x10004
call fcn.00442760
mov eax, dword [0x4596ac]
xor eax, esp
mov dword [esp + 0x10000], eax
cmp dword [esp + 0x10008], 0
push ebp
push edi
jne 0x403025
push 0x6000
push 0
push 0x486360
call fcn.00436440
mov edi, 0x486360
add esp, 0xc
mov dword [0x465f4c], edi
jmp 0x40302b
mov edi, dword [0x465f4c]
push 0x50
push 0
push esi
call fcn.00436440
mov eax, dword [0x486344]
push eax
push 1
lea ecx, [esp + 0x1c]
lea ebp, [esi + 0x38]
push 2
mov dword [esi + 0x34], edi
mov dword [ebp], edi
mov dword [esi + 0x3c], edi
mov dword [esi + 0x40], edi
mov dword [esi + 0x44], edi
mov dword [esi + 0x48], edi
push ecx
mov dword [esi + 0x18], 0x7fffffff
call fcn.00435763
add esp, 0x1c
cmp byte [esp + 9], 0xd8
je 0x403088
pop edi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x10000]
xor ecx, esp
call fcn.004334ab
add esp, 0x10004
ret
push ebx
lea esp, [esp]
mov edx, dword [0x486344]
push edx
push 2
lea eax, [esp + 0x14]
push 2
push eax
call fcn.00435763
movzx edi, byte [esp + 0x1e]
movzx ebx, byte [esp + 0x1c]
movzx edx, byte [esp + 0x1f]
movzx ecx, byte [esp + 0x1d]
shl edi, 8
shl ebx, 8
or edi, edx
or ebx, ecx
add esp, 0x10
sub edi, 2
cmp ebx, 0xff00
jle 0x403216
mov eax, dword [0x486344]
push eax
push edi
lea ecx, [esp + 0x14]
push 1
push ecx
call fcn.00435763
lea eax, [ebx - 0xffc0]
add esp, 0x10
cmp eax, 0x1d
ja case.0x403101.65473
movzx edx, byte [eax + 0x4032e8]
jmp dword [edx*4 + 0x4032d0]
movzx eax, byte [esp + 0x13]
mov ecx, eax
shr ecx, 4
imul ecx, eax
dec ecx
and ecx, 3
mov dword [esi + 0x10], ecx
movzx eax, byte [esp + 0xd]
movzx edx, byte [esp + 0xc]
movzx ecx, byte [esp + 0xe]
shl eax, 8
or eax, ecx
movzx ecx, byte [esp + 0x11]
add ecx, dword [esi + 0x10]
mov dword [esi], edx
movzx edx, byte [esp + 0xf]
mov dword [esi + 4], eax
movzx eax, byte [esp + 0x10]
shl edx, 8
or edx, eax
mov dword [esi + 8], edx
mov dword [esi + 0xc], ecx
cmp edi, 9
jne case.0x403101.65473
cmp dword [0x465f60], 0
jne case.0x403101.65473
mov edx, dword [0x486344]
push edx
call fcn.004361ad
add esp, 4
jmp case.0x403101.65473
cmp dword [esp + 0x10014], 0
jne case.0x403101.65473
lea eax, [esp + 0xc]
lea edi, [esp + edi + 0xc]
mov ecx, eax
cmp ecx, edi
jae case.0x403101.65473
lea ecx, [ecx]
mov cl, byte [eax]
cmp cl, 4
jae case.0x403101.65473
movzx edx, cl
mov ecx, dword [0x465f4c]
inc eax
push 0
push eax
mov dword [esi + edx*4 + 0x34], ecx
call fcn.00402680
add esp, 8
cmp eax, edi
jb 0x403190
jmp case.0x403101.65473
movzx eax, byte [esp + 0xc]
add eax, eax
movzx edx, byte [esp + eax + 0xd]
movzx eax, byte [esp + eax + 0xf]
and eax, 0xf
sub dword [esi], eax
mov dword [esi + 0x14], edx
jmp case.0x403101.65473
movzx ecx, byte [esp + 0xc]
movzx edx, byte [esp + 0xd]
shl ecx, 8
or ecx, edx
mov dword [esi + 0x18], ecx
cmp ebx, 0xffda
jne 0x403090
cmp dword [esp + 0x10014], 0
je 0x403230
pop ebx
pop edi
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x10000]
xor ecx, esp
call fcn.004334ab
add esp, 0x10004
ret
pop ebx
pop edi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x10000]
xor ecx, esp
call fcn.004334ab
add esp, 0x10004
ret
cmp dword [esi + 0x10], 0
je 0x403265
mov eax, dword [ebp]
mov dword [esi + 0x3c], eax
mov ecx, dword [ebp]
mov dword [esi + 0x40], ecx
mov edx, dword [ebp]
mov dword [esi + 0x44], edx
mov eax, dword [ebp]
mov dword [esi + 0x48], eax
xor eax, eax
cmp dword [esi + 0x10], eax
jle 0x403265
mov ecx, ebp
mov edx, dword [esi + 0x34]
mov dword [ecx], edx
inc eax
add ecx, 4
cmp eax, dword [esi + 0x10]
jl 0x403257
mov eax, dword [esi + 0xc]
imul eax, dword [esi + 8]
push 4
push eax
call fcn.004348ad
add esp, 8
mov dword [esi + 0x4c], eax
test eax, eax
je 0x4032a0
mov ecx, dword [esp + 0x1000c]
pop ebx
pop edi
pop ebp
mov eax, 1
xor ecx, esp
mov dword [0x4ac400], eax
call fcn.004334ab
add esp, 0x10004
ret
mov ecx, dword [0x4ac404]
push str.ljpeg_start__
push ecx
push str._s:_Out_of_memory_in__s_n
call fcn.00434a96
add eax, 0x40
push eax
call fcn.00435780
add esp, 0x10
push 1
push 0x4660c0
call fcn.00435cb8
mov edi, edi
sbb al, 0x31
inc eax
add byte [eax], cl
xor dword [eax], eax
jne 0x40330b
inc eax
add byte [esi - 0x2effbfcf], dh
xor dword [eax], eax
jecxz 0x403317
inc eax
add byte [eax], al
add eax, 0x5020105
add eax, 84215045
add eax, 84215045
add eax, 84215045
add eax, 84215045
add eax, dword [-859044859]
int3
int3
in al, dx
and byte [ebx - 0x50f0f7bd], cl
inc ebp
or byte [ecx + 0x56187bf7], bl
push edi
xor edi, edi
xor esi, esi
mov dword [esp + 0x18], edi
test edx, edx
jne 0x403391
lea eax, [ebx + 0x1c]
lea edx, [edi + 6]
mov ecx, dword [ebx]
dec ecx
mov edi, 1
shl edi, cl
add eax, 4
sub edx, 1
mov dword [eax - 4], edi
jne 0x403338
xor edi, edi
cmp dword [ebp + 8], edi
je 0x40337f
mov eax, dword [0x486344]
push eax
call fcn.004361ad
shl esi, 8
add esi, eax
add esp, 4
movzx esi, si
cmp eax, 0xffffffff
je 0x40337f
mov ecx, esi
and ecx, 0xfff0
cmp ecx, 0xffd0
jne 0x403354
mov dword [0x464abc], edi
mov dword [0x464ab8], edi
mov dword [0x464ab4], edi
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
mov esi, dword [ebx + 0x4c]
xor ecx, ecx
mov edi, dword [ebp + 8]
add edi, ecx
and edi, 1
imul edi, eax
imul edi, edx
lea edi, [esi + edi*2]
mov dword [esp + ecx*4 + 0x1c], edi
inc ecx
cmp ecx, 3
jl 0x40339c
mov dword [esp + 0x10], 0
test edx, edx
jle 0x40358c
mov dword [esp + 0x14], 0
test eax, eax
jle 0x40357a
lea edx, [ebx + 0x1c]
mov dword [esp + 0xc], edx
mov eax, dword [esp + 0xc]
mov edi, dword [eax + 0x18]
cmp dword [edi], 0
je 0x403402
lea ebx, [ebx]
mov esi, 1
call fcn.00402590
mov edi, dword [edi + eax*4]
cmp dword [edi], 0
jne 0x4033f0
mov edi, dword [edi + 8]
cmp edi, 0x10
jne 0x403421
mov eax, dword [0x465f60]
test eax, eax
je 0x40341a
cmp eax, 0x1010000
jb 0x403421
mov edx, 0xffff8000
jmp 0x40344a
mov esi, edi
call fcn.00402590
lea ecx, [edi - 1]
mov edx, 1
shl edx, cl
test eax, edx
jne 0x403448
mov ecx, edi
mov edx, 1
shl edx, cl
mov ecx, 1
sub ecx, edx
add eax, ecx
mov edx, eax
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x403469
mov ecx, dword [esp + 0x14]
cmp ecx, eax
jg 0x403469
mov esi, dword [esp + 0x10]
mov eax, esi
or eax, ecx
je 0x40346d
mov eax, dword [esp + 0x18]
jmp 0x40348b
mov esi, dword [esp + 0x10]
test esi, esi
je 0x403481
mov ecx, dword [ebx + 0xc]
mov eax, dword [esp + 0x1c]
add ecx, ecx
sub eax, ecx
movzx eax, word [eax]
jmp 0x40348b
mov eax, dword [esp + 0xc]
add dword [eax], edx
mov eax, dword [eax]
sub eax, edx
cmp dword [ebp + 8], 0
je case.0x4034aa.1
test esi, esi
je case.0x4034aa.1
mov ecx, dword [ebx + 0x14]
dec ecx
cmp ecx, 6
ja case.default.0x4034aa
jmp dword [ecx*4 + 0x403598]
mov ecx, dword [esp + 0x20]
movzx eax, word [ecx]
jmp case.0x4034aa.1
mov eax, dword [ebx + 0xc]
mov ecx, dword [esp + 0x20]
add eax, eax
sub ecx, eax
movzx eax, word [ecx]
jmp case.0x4034aa.1
mov ecx, dword [ebx + 0xc]
add ecx, ecx
mov esi, ecx
mov ecx, dword [esp + 0x20]
mov edi, ecx
movzx ecx, word [ecx]
sub edi, esi
movzx esi, word [edi]
sub ecx, esi
add eax, ecx
jmp case.0x4034aa.1
mov ecx, dword [ebx + 0xc]
add ecx, ecx
mov esi, ecx
mov ecx, dword [esp + 0x20]
mov edi, ecx
movzx ecx, word [ecx]
sub edi, esi
movzx esi, word [edi]
sub ecx, esi
sar ecx, 1
add eax, ecx
jmp case.0x4034aa.1
mov ecx, dword [ebx + 0xc]
add ecx, ecx
mov esi, ecx
mov ecx, dword [esp + 0x20]
mov edi, ecx
movzx ecx, word [ecx]
sub edi, esi
movzx esi, word [edi]
sub eax, esi
sar eax, 1
add eax, ecx
jmp case.0x4034aa.1
mov ecx, dword [esp + 0x20]
movzx ecx, word [ecx]
add ecx, eax
sar ecx, 1
mov eax, ecx
jmp case.0x4034aa.1
xor eax, eax
mov esi, dword [esp + 0x1c]
mov cx, word [ebx]
add eax, edx
mov word [esi], ax
shr ax, cl
test ax, ax
je 0x403549
call fcn.004010f0
mov ecx, dword [esp + 0x14]
cmp ecx, dword [ebx + 0x10]
jg 0x403559
movzx edx, word [esi]
mov dword [esp + 0x18], edx
mov eax, dword [ebx + 0xc]
add dword [esp + 0x20], 2
add dword [esp + 0xc], 4
inc ecx
add esi, 2
cmp ecx, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], ecx
jl 0x4033de
mov ecx, dword [esp + 0x10]
inc ecx
cmp ecx, dword [ebx + 8]
mov dword [esp + 0x10], ecx
jl 0x4033c7
mov eax, dword [esp + 0x24]
pop edi
pop esi
mov esp, ebp
pop ebp
ret