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

Disassembly:
push 0xffffffffffffffff
push 0x6125ea
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6963f4]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov esi, dword [esp + 0x5c]
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x24]
lea ebx, [esi + 0x20]
mov dword [esp + 0x1c], ecx
movzx ecx, word [ebx + 0xe]
xor edi, edi
cmp ecx, 0x20
mov dword [esp + 0x24], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], eax
ja case.0x4c5fae.30
movzx edx, byte [ecx + 0x4c64f0]
jmp dword [edx*4 + 0x4c64e0]
mov eax, dword [ebx + 0x20]
cmp eax, edi
mov dword [esp + 0x34], 1
mov dword [esp + 0x24], eax
jne 0x4c5fd3
mov eax, 1
shl eax, cl
mov dword [esp + 0x24], eax
mov eax, dword [ebx]
mov edi, dword [esp + 0x24]
lea ecx, [eax + esi + 0x20]
mov dword [esp + 0x30], ecx
jmp case.0x4c5fae.32
push 0x480
call fcn.0055dbcb
add esp, 4
mov dword [esp + 0x5c], eax
cmp eax, edi
mov dword [esp + 0x54], edi
je 0x4c6006
push eax
call fcn.004e31f0
mov ebx, eax
jmp 0x4c6008
xor ebx, ebx
push esi
mov eax, ebx
mov dword [esp + 0x58], 0xffffffff
call fcn.004e3a10
movzx edx, word [esi + 0x2c]
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x24]
push 0x2ffffff
push edi
push 0x18
push edx
push eax
push ecx
call fcn.004e3ee0
mov dword [esp + 0x5c], ebx
mov esi, dword [esp + 0x5c]
add ebx, 0x20
mov dword [esp + 0x28], ebx
push 0
push 0x400000
push 1
call dword [sym.imp.kernel32.dll_HeapCreate]
cmp dword [esp + 0x34], 0
mov edx, dword [esi + 0x448]
mov ebp, eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x3c], edx
jne 0x4c6115
mov ebx, dword [esp + 0x20]
lea ebx, [ebx + ebx*2]
lea eax, [ebx + 3]
cdq
and edx, 3
add eax, edx
mov esi, eax
mov eax, dword [esp + 0x1c]
lea ecx, [eax*4]
push ecx
sar esi, 2
push 1
add esi, esi
push ebp
add esi, esi
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
xor ebp, ebp
test eax, eax
jle 0x4c620f
lea edi, [eax - 1]
imul edi, esi
mov ecx, esi
neg ecx
add edi, dword [esp + 0x3c]
mov dword [esp + 0x38], ecx
lea ecx, [ecx]
mov edx, dword [esp + 0x2c]
push ebx
push 1
push edx
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x20]
test edx, edx
mov dword [ecx + ebp*4], eax
mov ecx, edi
jle 0x4c6103
mov esi, edx
movzx edx, byte [ecx + 2]
mov byte [eax], dl
movzx edx, byte [ecx + 1]
add eax, 1
mov byte [eax], dl
movzx edx, byte [ecx]
add eax, 1
mov byte [eax], dl
add eax, 1
add ecx, 3
sub esi, 1
jne 0x4c60e1
add edi, dword [esp + 0x38]
add ebp, 1
cmp ebp, dword [esp + 0x1c]
jl 0x4c60c0
jmp 0x4c620b
lea eax, [edi + edi*2]
push eax
push 1
push ebp
call dword [sym.imp.kernel32.dll_HeapAlloc]
test edi, edi
mov dword [esp + 0x38], eax
jle 0x4c6154
mov ecx, dword [esp + 0x30]
add eax, 2
add ecx, 1
mov esi, edi
movzx edx, byte [ecx + 1]
mov byte [eax - 2], dl
movzx edx, byte [ecx]
mov byte [eax - 1], dl
movzx edx, byte [ecx - 1]
mov byte [eax], dl
add eax, 3
add ecx, 4
sub esi, 1
jne 0x4c6136
movzx eax, word [ebx + 0xe]
sub eax, 1
je 0x4c618d
sub eax, 3
je 0x4c617f
sub eax, 4
jne 0x4c619f
mov eax, dword [esp + 0x20]
add eax, 3
cdq
and edx, 3
add eax, edx
mov esi, eax
sar esi, 2
add esi, esi
add esi, esi
jmp 0x4c61a3
mov eax, dword [esp + 0x20]
add eax, 1
cdq
sub eax, edx
sar eax, 1
jmp 0x4c616b
mov eax, dword [esp + 0x20]
add eax, 3
cdq
and edx, 7
add eax, edx
sar eax, 3
jmp 0x4c616b
mov esi, dword [esp + 0x5c]
mov eax, dword [esp + 0x1c]
lea ecx, [eax*4]
push ecx
push 1
push ebp
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
xor ebp, ebp
test eax, eax
jle 0x4c6213
lea edi, [eax - 1]
imul edi, esi
mov ebx, esi
neg ebx
add edi, dword [esp + 0x3c]
mov edx, dword [esp + 0x2c]
push esi
push 1
push edx
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ecx, dword [esp + 0x30]
mov dword [ecx + ebp*4], eax
mov ecx, eax
xor eax, eax
test esi, esi
jle 0x4c6200
mov dl, byte [edi + eax]
mov byte [ecx], dl
add eax, 1
add ecx, 1
cmp eax, esi
jl 0x4c61f1
add ebp, 1
add edi, ebx
cmp ebp, dword [esp + 0x1c]
jl 0x4c61d4
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
push 0
push 0
push 0
push str.1.2.1
call fcn.005f1af6
add esp, 0x10
test eax, eax
mov dword [esp + 0x18], eax
jne 0x4c623f
push str.png_create_write_struct_error__n
call fcn.005a811d
mov eax, dword [esp + 0x1c]
add esp, 4
push eax
call fcn.005ec2c6
add esp, 4
test eax, eax
mov dword [esp + 0x14], eax
jne 0x4c625d
push str.png_create_info_struct_error__n
call fcn.005a811d
add esp, 4
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call fcn.005ec704
mov ebp, dword [esp + 0x3c]
mov eax, dword [esp + 0x24]
add esp, 8
test ebp, ebp
push 0
push 0
jne 0x4c62a7
mov ecx, dword [esp + 0x28]
xor edx, edx
cmp dword [esp + 0x74], edx
setne dl
push edx
mov edx, dword [esp + 0x20]
push 2
push 8
push eax
mov eax, dword [esp + 0x30]
push ecx
push edx
push eax
call fcn.005f2616
add esp, 0x24
jmp 0x4c62f5
movzx edx, word [ebx + 0xe]
xor ecx, ecx
cmp dword [esp + 0x74], ecx
setne cl
push ecx
mov ecx, dword [esp + 0x2c]
push 3
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x30]
push ecx
push edx
push eax
call fcn.005f2616
mov ecx, dword [esp + 0x3c]
add esp, 0x24
push ecx
call fcn.005f2fb7
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add esp, 4
push edi
push edx
push eax
push ecx
call fcn.005f297f
add esp, 0x10
mov eax, dword [esp + 0x14]
or dword [eax + 8], 0x80
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x5c]
mov byte [edx + 0x78], 1
mov ecx, dword [eax + 0x38]
mov edx, dword [esp + 0x14]
mov dword [edx + 0x70], ecx
mov eax, dword [eax + 0x3c]
mov ecx, dword [esp + 0x14]
xor esi, esi
cmp dword [esp + 0x64], esi
mov dword [ecx + 0x74], eax
je 0x4c641d
mov eax, dword [esp + 0x14]
or dword [eax + 8], 0x10
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x14]
movzx dx, al
mov word [ecx + 0x52], dx
mov ecx, dword [esp + 0x14]
mov bx, ax
shr bx, 8
movzx dx, bl
mov word [ecx + 0x54], dx
shr eax, 0x10
test ebp, ebp
movzx dx, al
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x14]
mov word [eax + 0x56], dx
mov ecx, dword [esp + 0x14]
mov byte [ecx + 0x50], 0
mov edx, dword [esp + 0x14]
mov word [edx + 0x58], si
je 0x4c641d
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x50]
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x40], ecx
mov edx, dword [eax + 0x54]
push edi
mov dword [esp + 0x48], edx
mov ax, word [eax + 0x58]
push 1
push ebp
mov word [esp + 0x54], ax
call dword [sym.imp.kernel32.dll_HeapAlloc]
test edi, edi
mov esi, eax
jle 0x4c63c0
push edi
push 0xff
push esi
call fcn.005a3bb0
add esp, 0xc
xor eax, eax
test edi, edi
jle 0x4c6402
mov ecx, dword [esp + 0x38]
add ecx, 2
lea ecx, [ecx]
mov dl, byte [esp + 0x68]
cmp byte [ecx - 2], dl
jne 0x4c63e6
cmp byte [ecx - 1], bl
jne 0x4c63e6
mov dl, byte [esp + 0x5c]
cmp byte [ecx], dl
je 0x4c63f2
add eax, 1
add ecx, 3
cmp eax, edi
jl 0x4c63d0
jmp 0x4c6402
cmp eax, edi
jge 0x4c6402
test esi, esi
mov byte [esp + 0x40], al
je 0x4c6402
mov byte [esi + eax], 0
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x40]
push eax
push edi
push esi
push ecx
push edx
call fcn.005f2d53
add esp, 0x14
jmp 0x4c6421
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call fcn.005f1732
mov ebx, dword [esp + 0x38]
mov edx, dword [esp + 0x20]
push ebx
push edx
call fcn.005f1c72
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
push eax
push ecx
call fcn.005f19be
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x34]
push eax
call fcn.005f1f49
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
add esp, 0x20
cmp dword [esp + 0x34], 0
je 0x4c6477
mov ecx, dword [esp + 0x38]
push ecx
push 1
push ebp
call edi
test esi, esi
je 0x4c6481
push esi
push 1
push ebp
call edi
xor esi, esi
cmp dword [esp + 0x1c], esi
jle 0x4c64a2
lea esp, [esp]
mov edx, dword [ebx + esi*4]
push edx
push 1
push ebp
call edi
add esi, 1
cmp esi, dword [esp + 0x1c]
jl 0x4c6490
push ebx
push 1
push ebp
call edi
push ebp
call dword [sym.imp.kernel32.dll_HeapDestroy]
mov eax, 1
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
xor eax, eax
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret