Function at 0x4c2080
Capabilities:
Enumerate pe sections

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x10
mov ecx, dword [esp + 0x1c]
push ebx
mov ebx, dword [esp + 0x28]
push ebp
push esi
push edi
mov edi, dword [esp + 0x24]
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], ecx
test ebx, ebx
je 0x4c20ae
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 0x10]
mov edx, dword [edi + 0x14]
test eax, 0x800
jne 0x4c22d9
push edx
push ecx
push edi
call fcn.004cc030
mov ecx, dword [edi + 0x304]
add esp, 0xc
test eax, eax
jne 0x4c20f6
push dword [edi]
push str._s:_Seek_error_accessing_TIFF_directory
push str.TIFFFetchDirectory
push ecx
call fcn.004c1110
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
test dword [edi + 0xc], 0x80000
mov eax, dword [edi + 0x308]
jne 0x4c216d
push 2
lea edx, [esp + 0x28]
push edx
push ecx
call eax
add esp, 0xc
cmp eax, 2
je 0x4c213b
push dword [edi]
push str._s:_Can_not_read_TIFF_directory_count
push str.TIFFFetchDirectory
push dword [edi + 0x304]
call fcn.004c1110
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
test byte [edi + 0xc], 0x80
je 0x4c214e
lea eax, [esp + 0x24]
push eax
call fcn.004c1900
add esp, 4
mov eax, dword [esp + 0x24]
mov ecx, 0x1000
cmp ax, cx
jbe 0x4c2166
push str.Sanity_check_on_directory_count_failed__this_is_probably_not_a_valid_IFD_offset
jmp 0x4c2683
mov esi, 0xc
jmp 0x4c21b0
push 8
lea edx, [esp + 0x2c]
push edx
push ecx
call eax
add esp, 0xc
cmp eax, 8
jne 0x4c2117
test byte [edi + 0xc], 0x80
je 0x4c2192
lea eax, [esp + 0x28]
push eax
call fcn.004c18c0
add esp, 4
cmp dword [esp + 0x2c], 0
ja 0x4c215c
mov eax, dword [esp + 0x28]
cmp eax, 0x1000
ja 0x4c215c
movzx eax, ax
mov esi, 0x14
mov dword [esp + 0x24], eax
push str.to_read_TIFF_directory
push esi
movzx eax, ax
push eax
push edi
call fcn.004cbe00
mov ebp, eax
add esp, 0x10
mov dword [esp + 0x28], ebp
test ebp, ebp
je 0x4c2696
movzx ecx, word [esp + 0x24]
mov eax, dword [edi + 0x308]
imul ecx, esi
push ecx
push ebp
push dword [edi + 0x304]
call eax
movzx ecx, word [esp + 0x30]
add esp, 0xc
imul ecx, esi
cmp eax, ecx
je 0x4c2222
push dword [edi]
push str._.100s:_Can_not_read_TIFF_directory
push str.TIFFFetchDirectory
push dword [edi + 0x304]
call fcn.004c1110
push ebp
call fcn.004b62c0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
test ebx, ebx
je 0x4c22a4
test dword [edi + 0xc], 0x80000
mov eax, dword [edi + 0x304]
mov ecx, dword [edi + 0x308]
jne 0x4c227a
push 4
lea edx, [esp + 0x38]
push edx
push eax
call ecx
mov ecx, dword [esp + 0x40]
xor edx, edx
add esp, 0xc
cmp eax, 4
cmovne ecx, edx
test byte [edi + 0xc], 0x80
mov dword [esp + 0x34], ecx
je 0x4c226f
lea eax, [esp + 0x34]
push eax
call fcn.004c18a0
mov ecx, dword [esp + 0x38]
add esp, 4
mov dword [ebx], ecx
mov dword [ebx + 4], 0
jmp 0x4c22a4
push 8
push ebx
push eax
call ecx
add esp, 0xc
cmp eax, 8
je 0x4c2295
mov dword [ebx], 0
mov dword [ebx + 4], 0
test byte [edi + 0xc], 0x80
je 0x4c22a4
push ebx
call fcn.004c18c0
add esp, 4
movzx eax, word [esp + 0x24]
push str.to_read_TIFF_directory
push 0x20
push eax
push edi
call fcn.004cbe00
add esp, 0x10
mov dword [esp + 0x34], eax
test eax, eax
jne 0x4c24ed
push ebp
call fcn.004b62c0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
cmp edx, 0x7fffffff
jb 0x4c22f0
ja 0x4c267e
cmp ecx, 0xffffffff
ja 0x4c267e
test eax, 0x80000
jne 0x4c235b
lea esi, [ecx + 2]
cmp esi, ecx
jl 0x4c267e
cmp esi, 2
jl 0x4c267e
cmp esi, dword [edi + 0x2f8]
jg 0x4c267e
mov eax, dword [edi + 0x2f4]
add eax, ecx
push 2
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.004b6350
add esp, 0xc
test byte [edi + 0xc], 0x80
je 0x4c2342
lea eax, [esp + 0x24]
push eax
call fcn.004c1900
add esp, 4
mov eax, dword [esp + 0x24]
mov ecx, 0x1000
cmp ax, cx
ja 0x4c215c
mov ecx, 0xc
jmp 0x4c23cc
lea esi, [ecx + 8]
cmp esi, ecx
jl 0x4c267e
cmp esi, 8
jl 0x4c267e
cmp esi, dword [edi + 0x2f8]
jg 0x4c267e
mov eax, dword [edi + 0x2f4]
add eax, ecx
push 8
push eax
lea eax, [esp + 0x20]
push eax
call fcn.004b6350
add esp, 0xc
test byte [edi + 0xc], 0x80
je 0x4c23a6
lea eax, [esp + 0x18]
push eax
call fcn.004c18c0
add esp, 4
cmp dword [esp + 0x1c], 0
ja 0x4c215c
mov eax, dword [esp + 0x18]
cmp eax, 0x1000
ja 0x4c215c
movzx eax, ax
mov ecx, 0x14
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], ecx
test ax, ax
jne 0x4c23df
push str.Sanity_check_on_directory_count_failed__zero_tag_directories_not_supported
jmp 0x4c2683
push str.to_read_TIFF_directory
push ecx
movzx eax, ax
push eax
push edi
call fcn.004cbe00
mov ebp, eax
add esp, 0x10
mov dword [esp + 0x28], ebp
test ebp, ebp
je 0x4c2696
movzx eax, word [esp + 0x24]
imul eax, dword [esp + 0x34]
lea ecx, [eax + esi]
cmp ecx, esi
jl 0x4c2656
cmp ecx, eax
jl 0x4c2656
cmp ecx, dword [edi + 0x2f8]
jg 0x4c2656
push eax
mov eax, dword [edi + 0x2f4]
add eax, esi
push eax
push ebp
call fcn.004b6350
add esp, 0xc
test ebx, ebx
je 0x4c22a4
movzx eax, word [esp + 0x24]
imul eax, dword [esp + 0x34]
add esi, eax
test dword [edi + 0xc], 0x80000
jne 0x4c24b4
lea eax, [esi + 4]
cmp eax, esi
jl 0x4c2487
cmp eax, 4
jl 0x4c2487
cmp eax, dword [edi + 0x2f8]
jg 0x4c2487
mov eax, dword [edi + 0x2f4]
add eax, esi
push 4
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.004b6350
add esp, 0xc
jmp 0x4c248f
mov dword [esp + 0x34], 0
test byte [edi + 0xc], 0x80
je 0x4c24a2
lea eax, [esp + 0x34]
push eax
call fcn.004c18a0
add esp, 4
mov eax, dword [esp + 0x34]
mov dword [ebx], eax
mov dword [ebx + 4], 0
jmp 0x4c22a4
lea eax, [esi + 8]
cmp eax, esi
jl 0x4c2288
cmp eax, 8
jl 0x4c2288
cmp eax, dword [edi + 0x2f8]
jg 0x4c2288
mov eax, dword [edi + 0x2f4]
push 8
add eax, esi
push eax
push ebx
call fcn.004b6350
add esp, 0xc
jmp 0x4c2295
mov esi, ebp
xor ecx, ecx
xor ebp, ebp
cmp cx, word [esp + 0x24]
jae 0x4c2633
lea ebx, [eax + 8]
mov byte [ebx + 0x10], 0
test byte [edi + 0xc], 0x80
je 0x4c2514
push esi
call fcn.004c1900
add esp, 4
mov ax, word [esi]
add esi, 2
mov word [ebx - 8], ax
test byte [edi + 0xc], 0x80
je 0x4c252d
push esi
call fcn.004c1900
add esp, 4
mov ax, word [esi]
add esi, 2
mov word [ebx - 6], ax
mov ecx, dword [edi + 0xc]
and ecx, 0x80
test dword [edi + 0xc], 0x80000
jne 0x4c257a
test ecx, ecx
je 0x4c2556
push esi
call fcn.004c18a0
add esp, 4
mov eax, dword [esi]
mov dword [ebx], eax
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov eax, dword [esi + 4]
add esi, 8
jmp 0x4c2621
test ecx, ecx
je 0x4c2587
push esi
call fcn.004c18c0
add esp, 4
movzx eax, byte [esi]
mov byte [esp + 0x10], al
movzx eax, byte [esi + 1]
mov byte [esp + 0x11], al
movzx eax, byte [esi + 2]
mov byte [esp + 0x12], al
movzx eax, byte [esi + 3]
mov byte [esp + 0x13], al
movzx eax, byte [esi + 4]
mov byte [esp + 0x14], al
movzx eax, byte [esi + 5]
mov byte [esp + 0x15], al
movzx eax, byte [esi + 6]
mov byte [esp + 0x16], al
movzx eax, byte [esi + 7]
mov byte [esp + 0x17], al
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
movzx eax, byte [esi + 8]
mov byte [esp + 0x18], al
movzx eax, byte [esi + 9]
mov byte [esp + 0x19], al
movzx eax, byte [esi + 0xa]
mov byte [esp + 0x1a], al
movzx eax, byte [esi + 0xb]
mov byte [esp + 0x1b], al
movzx eax, byte [esi + 0xc]
mov byte [esp + 0x1c], al
movzx eax, byte [esi + 0xd]
mov byte [esp + 0x1d], al
movzx eax, byte [esi + 0xe]
mov byte [esp + 0x1e], al
movzx eax, byte [esi + 0xf]
add esi, 0x10
mov byte [esp + 0x1f], al
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov dword [ebx + 0xc], ecx
mov dword [ebx + 8], eax
inc ebp
add ebx, 0x20
cmp bp, word [esp + 0x24]
jb 0x4c2501
push dword [esp + 0x28]
call fcn.004b62c0
mov eax, dword [esp + 0x34]
add esp, 4
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebp
mov dword [eax], ecx
mov ax, word [esp + 0x18]
pop ebx
add esp, 0x10
ret
push str.Can_not_read_TIFF_directory
push str.TIFFFetchDirectory
push dword [edi + 0x304]
call fcn.004c1110
push ebp
call fcn.004b62c0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push str.Can_not_read_TIFF_directory_count
push str.TIFFFetchDirectory
push dword [edi + 0x304]
call fcn.004c1110
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret