Function at 0x53ceb0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x308
mov edi, dword [esp + 0x31c]
lea ebx, [esp + 8]
push 0x300
push 0
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov eax, dword [edi + 0x70]
test al, 1
je 0x53d171
test al, 2
jne 0x53d17c
mov esi, dword [esp + 0x324]
test al, 4
jne 0x53cf14
or eax, 2
mov dword [edi + 0x70], eax
mov al, byte [edi + 0x14b]
test al, 2
jne 0x53cf34
push esi
push edi
call fcn.0053cb40
add esp, 8
push str.ignored_in_grayscale_PNG
jmp 0x53cf23
push esi
push edi
call fcn.0053cb40
add esp, 8
push str.out_of_place
push edi
call fcn.00522fd0
add esp, 0x310
pop esi
pop edi
pop ebx
pop ebp
ret
cmp al, 3
jne 0x53d039
mov ecx, 0xaaaaaaab
mov eax, esi
mul ecx
cmp esi, 0x300
ja 0x53d045
shr edx, 1
lea eax, [edx + edx*2]
mov ecx, esi
sub ecx, eax
jne 0x53d045
movzx eax, si
imul eax, eax, 0xaaab
shr eax, 0x11
mov cl, byte [edi + 0x14c]
mov ebp, 1
shl ebp, cl
cmp ebp, eax
cmovge ebp, eax
test ebp, ebp
jle 0x53cfec
mov ecx, esp
mov eax, ebx
mov dword [esp + 4], ebp
mov ebx, ebp
mov ebp, edi
mov edi, eax
mov byte [esp + 2], 0
mov word [esp], 0
push 3
push ecx
push ebp
mov esi, ecx
call fcn.0053c680
add esp, 0xc
push 3
push esi
push ebp
call fcn.0051ab50
add esp, 0xc
movzx eax, word [esp]
movzx ecx, byte [esp + 2]
mov word [edi], ax
mov byte [edi + 2], cl
mov ecx, esi
add edi, 3
add ebx, 0xffffffff
jne 0x53cf90
cmp byte [ebp + 0x14b], 3
mov edi, ebp
lea ebx, [esp + 8]
mov ebp, dword [esp + 4]
mov esi, dword [esp + 0x324]
jne 0x53d090
lea eax, [ebp*2]
add eax, ebp
sub esi, eax
push esi
push edi
call fcn.0053cb40
add esp, 8
mov esi, dword [esp + 0x320]
push ebp
push ebx
push esi
push edi
call fcn.0052c310
add esp, 0x10
cmp word [edi + 0x144], 0
je 0x53d066
mov word [edi + 0x144], 0
test esi, esi
jne 0x53d125
push str.tRNS_must_be_after
jmp 0x53d15d
push esi
push edi
call fcn.0053cb40
jmp 0x53cf29
push esi
push edi
call fcn.0053cb40
add esp, 8
cmp byte [edi + 0x14b], 3
je 0x53d187
push str.invalid
jmp 0x53cf23
test esi, esi
je 0x53d166
mov eax, dword [esi + 8]
test al, 0x10
jne 0x53d11c
test al, 0x40
jne 0x53d144
test byte [esi + 8], 0x20
jne 0x53d158
jmp 0x53d166
mov dword [esp], 0
test byte [edi + 0x11b], 0x20
mov esi, dword [edi + 0x74]
jne 0x53d0c7
mov dword [edi + 0x2a8], 0x81
push 4
push ecx
push edi
call fcn.0053c680
add esp, 0xc
test esi, 0x800
jne 0x53d001
jmp 0x53d0eb
not esi
mov dword [edi + 0x2a8], 0x81
push 4
push ecx
push edi
call fcn.0053c680
add esp, 0xc
test esi, 0x300
je 0x53d001
mov eax, dword [esp]
bswap eax
cmp eax, dword [edi + 0x134]
je 0x53d001
mov eax, dword [edi + 0x74]
test eax, 0x100
jne 0x53d001
test eax, 0x200
jne 0x53d166
push str.CRC_error
push edi
call fcn.00522d40
mov word [edi + 0x144], 0
mov word [esi + 0x16], 0
push str.tRNS_must_be_after
push edi
call fcn.00522fd0
add esp, 8
mov eax, dword [esi + 8]
test al, 0x40
je 0x53d081
push str.hIST_must_be_after
push edi
call fcn.00522fd0
add esp, 8
test byte [esi + 8], 0x20
je 0x53d166
push str.bKGD_must_be_after
push edi
call fcn.00522fd0
add esp, 8
add esp, 0x308
jmp 0x53cf2f
push str.missing_IHDR
push edi
call fcn.00522d40
push str.duplicate
push edi
call fcn.00522d40
push str.invalid
push edi
call fcn.00522d40
nop word cs:[eax + eax]
nop dword [eax]