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

Disassembly:
push 0xffffffffffffffff
push 0x5cfdda
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x5c]
xor ecx, ecx
xor ebx, ebx
mov cx, word [edi + 0x2e]
mov ebp, dword [edi + 0x24]
mov eax, dword [edi + 0x28]
lea esi, [edi + 0x20]
cmp ecx, 0x20
mov dword [esp + 0x20], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], esi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x18], eax
ja case.0x4d76d6.3
xor edx, edx
mov dl, byte [ecx + 0x4d7c50]
jmp dword [edx*4 + 0x4d7c40]
mov eax, dword [esi + 0x20]
mov dword [esp + 0x28], 1
cmp eax, ebx
mov dword [esp + 0x20], eax
jne 0x4d76fb
mov eax, 1
shl eax, cl
mov dword [esp + 0x20], eax
mov eax, dword [esi]
mov ebx, dword [esp + 0x20]
lea ecx, [eax + edi + 0x20]
mov dword [esp + 0x3c], ecx
jmp case.0x4d76d6.0
push 0x480
call fcn.00596900
add esp, 4
mov dword [esp + 0x5c], eax
xor esi, esi
cmp eax, esi
mov dword [esp + 0x54], esi
je 0x4d772f
mov ecx, eax
call fcn.004e5b80
mov esi, eax
push edi
mov ecx, esi
mov dword [esp + 0x58], 0xffffffff
call fcn.004e6430
mov eax, dword [edi + 0x28]
mov ecx, dword [edi + 0x24]
xor edx, edx
push 0x2ffffff
mov dx, word [edi + 0x2c]
push 0
push 0x18
push edx
push eax
push ecx
mov ecx, esi
call fcn.004e6960
mov dword [esp + 0x5c], esi
mov edi, dword [esp + 0x5c]
add esi, 0x20
mov dword [esp + 0x24], esi
push 0
push 0x400000
push 1
call dword [sym.imp.kernel32.dll_HeapCreate]
mov edx, dword [edi + 0x448]
mov ecx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], ecx
test eax, eax
mov dword [esp + 0x38], edx
jne 0x4d7849
lea eax, [ebp + ebp*2 + 3]
cdq
and edx, 3
add eax, edx
mov edi, eax
mov eax, dword [esp + 0x18]
sar edi, 2
lea edx, [eax*4]
push edx
push 1
push ecx
shl edi, 2
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x30], eax
test ecx, ecx
jle 0x4d7840
lea ecx, [ebp + ebp*2]
mov ebp, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x38]
mov ebx, edi
lea esi, [eax - 1]
mov dword [esp + 0x34], eax
imul esi, edi
neg ebx
add esi, ecx
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
push edx
push 1
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edi, dword [esp + 0x2c]
mov dword [ebp], eax
test edi, edi
mov ecx, esi
jle 0x4d7824
mov dl, byte [ecx + 2]
add ecx, 3
mov byte [eax], dl
mov dl, byte [ecx - 2]
inc eax
mov byte [eax], dl
mov dl, byte [ecx - 3]
inc eax
mov byte [eax], dl
inc eax
dec edi
jne 0x4d780c
mov eax, dword [esp + 0x34]
add ebp, 4
add esi, ebx
dec eax
mov dword [esp + 0x34], eax
jne 0x4d77ed
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x2c]
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x5c]
jmp 0x4d795e
lea eax, [ebx + ebx*2]
push eax
push 1
push ecx
call dword [sym.imp.kernel32.dll_HeapAlloc]
test ebx, ebx
mov dword [esp + 0x34], eax
jle 0x4d788a
mov ecx, dword [esp + 0x3c]
add eax, 2
inc ecx
mov esi, ebx
mov dl, byte [ecx + 1]
add ecx, 4
mov byte [eax - 2], dl
mov dl, byte [ecx - 4]
mov byte [eax - 1], dl
mov dl, byte [ecx - 5]
mov byte [eax], dl
add eax, 3
dec esi
jne 0x4d7868
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x5c]
xor eax, eax
mov ax, word [esi + 0xe]
dec eax
je 0x4d78ba
sub eax, 3
je 0x4d78b0
sub eax, 4
jne 0x4d78d9
lea eax, [ebp + 3]
cdq
and edx, 3
add eax, edx
mov esi, eax
sar esi, 2
shl esi, 2
jmp 0x4d78dd
lea eax, [ebp + 1]
cdq
sub eax, edx
sar eax, 1
jmp 0x4d78c6
lea eax, [ebp + 3]
cdq
and edx, 7
add eax, edx
sar eax, 3
add eax, 3
cdq
and edx, 3
add eax, edx
mov esi, eax
sar esi, 2
shl esi, 2
jmp 0x4d78dd
mov esi, dword [esp + 0x5c]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ecx, [eax*4]
push ecx
push 1
push edx
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x4d795a
lea edi, [eax - 1]
mov ecx, dword [esp + 0x38]
imul edi, esi
mov ebp, dword [esp + 0x30]
mov ebx, esi
neg ebx
add edi, ecx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x1c]
push esi
push 1
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp], eax
mov ecx, eax
xor eax, eax
test esi, esi
jle 0x4d793e
mov dl, byte [edi + eax]
mov byte [ecx], dl
inc ecx
inc eax
cmp eax, esi
jl 0x4d7933
mov eax, dword [esp + 0x38]
add ebp, 4
add edi, ebx
dec eax
mov dword [esp + 0x38], eax
jne 0x4d791a
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x5c]
mov esi, dword [esp + 0x24]
push 0
push 0
push 0
push str.1.2.1
call fcn.00580b42
add esp, 0x10
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4d798a
push str.png_create_write_struct_error__n
call fcn.004f9867
mov eax, dword [esp + 0x18]
add esp, 4
push eax
call fcn.0057c3b3
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x4d79a8
push str.png_create_info_struct_error__n
call fcn.004f9867
add esp, 4
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.0057c7d5
mov eax, dword [esp + 0x30]
add esp, 8
test eax, eax
push 0
push 0
jne 0x4d79f0
mov ecx, dword [esp + 0x74]
mov eax, dword [esp + 0x20]
xor edx, edx
test ecx, ecx
mov ecx, dword [esp + 0x18]
setne dl
push edx
mov edx, dword [esp + 0x20]
push 2
push 8
push eax
push ebp
push ecx
push edx
call fcn.00581922
add esp, 0x24
jmp 0x4d7a3c
mov edx, dword [esp + 0x74]
xor eax, eax
test edx, edx
mov edx, dword [esp + 0x20]
setne al
xor ecx, ecx
push eax
mov cx, word [esi + 0xe]
mov eax, dword [esp + 0x1c]
push 3
push ecx
mov ecx, dword [esp + 0x28]
push edx
push ebp
push eax
push ecx
call fcn.00581922
mov edx, dword [esp + 0x38]
push edx
call fcn.0058239a
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
push ebx
push eax
push ecx
push edx
call fcn.00581cd3
add esp, 0x38
mov eax, dword [esp + 0x10]
xor esi, esi
mov ecx, dword [eax + 8]
or cl, 0x80
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x10]
mov byte [eax + 0x78], 1
mov edx, dword [esp + 0x10]
mov ecx, dword [edi + 0x38]
mov dword [edx + 0x70], ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [edi + 0x3c]
mov dword [ecx + 0x74], eax
mov eax, dword [esp + 0x64]
test eax, eax
je 0x4d7b7a
mov eax, dword [esp + 0x10]
xor dx, dx
mov edi, dword [eax + 8]
or edi, 0x10
mov dword [eax + 8], edi
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x10]
mov dl, al
mov word [ecx + 0x52], dx
mov cx, ax
shr cx, 8
xor dx, dx
mov word [esp + 0x5c], cx
mov dl, cl
mov ecx, dword [esp + 0x10]
shr eax, 0x10
mov word [ecx + 0x54], dx
xor dx, dx
mov dword [esp + 0x6c], eax
mov dl, al
mov eax, dword [esp + 0x10]
mov word [eax + 0x56], dx
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x28]
mov byte [ecx + 0x50], 0
mov edx, dword [esp + 0x10]
test eax, eax
mov word [edx + 0x58], si
je 0x4d7b7a
mov eax, dword [esp + 0x10]
push ebx
add eax, 0x50
push 1
mov ecx, dword [eax]
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [eax + 4]
push ecx
mov dword [esp + 0x50], edx
mov ax, word [eax + 8]
mov word [esp + 0x54], ax
call dword [sym.imp.kernel32.dll_HeapAlloc]
test ebx, ebx
mov esi, eax
jle 0x4d7b20
mov ecx, ebx
or eax, 0xffffffff
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor ecx, ecx
test ebx, ebx
jle 0x4d7b61
mov eax, dword [esp + 0x34]
add eax, 2
mov dl, byte [esp + 0x68]
cmp byte [eax - 2], dl
jne 0x4d7b47
mov dl, byte [esp + 0x5c]
cmp byte [eax - 1], dl
jne 0x4d7b47
mov dl, byte [esp + 0x6c]
cmp byte [eax], dl
je 0x4d7b51
inc ecx
add eax, 3
cmp ecx, ebx
jl 0x4d7b2d
jmp 0x4d7b61
cmp ecx, ebx
jge 0x4d7b61
test esi, esi
mov byte [esp + 0x40], cl
je 0x4d7b61
mov byte [esi + ecx], 0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x40]
push eax
push ebx
push esi
push ecx
push edx
call fcn.005820ee
add esp, 0x14
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.0058077e
mov ebp, dword [esp + 0x38]
mov edx, dword [esp + 0x1c]
push ebp
push edx
call fcn.00580cc2
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
push eax
push ecx
call fcn.00580a0a
lea edx, [esp + 0x28]
lea eax, [esp + 0x2c]
push edx
push eax
call fcn.00580fb0
mov eax, dword [esp + 0x48]
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
add esp, 0x20
test eax, eax
je 0x4d7bd5
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x1c]
push ecx
push 1
push edx
call edi
test esi, esi
je 0x4d7be3
mov eax, dword [esp + 0x1c]
push esi
push 1
push eax
call edi
mov ebx, dword [esp + 0x18]
test ebx, ebx
jle 0x4d7bff
mov esi, ebp
mov ecx, dword [esi]
mov edx, dword [esp + 0x1c]
push ecx
push 1
push edx
call edi
add esi, 4
dec ebx
jne 0x4d7bed
mov esi, dword [esp + 0x1c]
push ebp
push 1
push esi
call edi
push esi
call dword [sym.imp.kernel32.dll_HeapDestroy]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x48
ret