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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x33c
mov ebx, dword [esp + 0x350]
mov eax, dword [ebx + 0x74]
test al, 1
je 0x46ee75
test al, 2
jne 0x46ee65
test al, 4
jne 0x46ed80
movzx ecx, byte [ebx + 0x14f]
or eax, 2
mov dword [ebx + 0x74], eax
test cl, 2
je 0x46edb0
cmp dword [esp + 0x358], 0x300
ja 0x46ed44
mov edx, 0xaaaaaaab
mov eax, edx
mul dword [esp + 0x358]
shr edx, 1
lea eax, [edx + edx*2]
cmp dword [esp + 0x358], eax
jne 0x46ed44
mov edx, 0x55555556
mov eax, edx
imul dword [esp + 0x358]
mov eax, dword [esp + 0x358]
sar eax, 0x1f
sub edx, eax
cmp cl, 3
mov dword [esp + 0x18], edx
je 0x46ee10
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x30]
mov dword [esp + 0x1c], eax
test edx, edx
jle 0x46eca3
mov ecx, dword [esp + 0x18]
lea ebp, [esp + 0x2d]
mov edi, eax
lea esi, [ecx + ecx*2]
add esi, eax
lea esi, [esi]
mov dword [esp + 8], 3
mov dword [esp + 4], ebp
add edi, 3
mov dword [esp], ebx
call fcn.0046e300
movzx eax, byte [esp + 0x2d]
mov byte [edi - 3], al
movzx eax, byte [esp + 0x2e]
mov byte [edi - 2], al
movzx eax, byte [esp + 0x2f]
mov byte [edi - 1], al
cmp esi, edi
jne 0x46ec70
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x358]
mov dword [esp], ebx
lea eax, [esi + esi*2]
sub ecx, eax
mov dword [esp + 4], ecx
call fcn.0046e400
mov eax, dword [esp + 0x1c]
mov dword [esp + 0xc], esi
mov dword [esp], ebx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x354]
mov dword [esp + 4], eax
call fcn.00474030
cmp word [ebx + 0x148], 0
je 0x46ede0
mov edi, dword [esp + 0x354]
xor esi, esi
mov word [ebx + 0x148], si
test edi, edi
je 0x46ee50
mov eax, dword [esp + 0x354]
xor edx, edx
mov word [eax + 0x16], dx
mov dword [esp + 4], str.tRNS_must_be_after
mov dword [esp], ebx
call fcn.00460eb0
mov eax, dword [esp + 0x354]
mov eax, dword [eax + 8]
test al, 0x40
jne 0x46ee30
test al, 0x20
je 0x46ed74
mov dword [esp + 4], str.bKGD_must_be_after
mov dword [esp], ebx
jmp 0x46ed6f
mov eax, dword [esp + 0x358]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0046e400
cmp byte [ebx + 0x14f], 3
mov dword [esp + 4], str.invalid
mov dword [esp], ebx
je 0x46ee85
call fcn.00460eb0
add esp, 0x33c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x358]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0046e400
mov dword [esp], ebx
mov dword [esp + 4], str.out_of_place
call fcn.00460eb0
add esp, 0x33c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x358]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0046e400
mov dword [esp], ebx
mov dword [esp + 4], str.ignored_in_grayscale_PNG
call fcn.00460eb0
add esp, 0x33c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, dword [esp + 0x354]
test ebp, ebp
je 0x46ed74
mov eax, dword [esp + 0x354]
mov eax, dword [eax + 8]
test al, 0x10
je 0x46ed2b
xor ecx, ecx
mov word [ebx + 0x148], cx
jmp 0x46ed04
movzx ecx, byte [ebx + 0x150]
mov eax, 1
shl eax, cl
cmp edx, eax
cmovle eax, edx
mov dword [esp + 0x18], eax
jmp 0x46ec4a
mov dword [esp + 4], str.hIST_must_be_after
mov dword [esp], ebx
call fcn.00460eb0
mov eax, dword [esp + 0x354]
mov eax, dword [eax + 8]
jmp 0x46ed33
mov dword [esp + 4], str.tRNS_must_be_after
mov dword [esp], ebx
call fcn.00460eb0
jmp 0x46ed74
mov dword [esp + 4], str.duplicate
mov dword [esp], ebx
call fcn.00460e60
mov dword [esp + 4], str.missing_IHDR
mov dword [esp], ebx
call fcn.00460e60
call fcn.00460e60
lea esi, [esi]