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

Disassembly:
sub esp, 0x84
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0x80], eax
push ebx
mov eax, 2
push ebp
xor ebx, ebx
mov edx, 1
push esi
mov esi, ecx
add dword [esi + 0xe4], edx
mov ecx, 4
mov ebp, 8
mov dword [esp + 0x3c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov eax, dword [esi + 0xe4]
cmp eax, dword [esi + 0xd0]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], edx
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], ebp
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], ecx
jb 0x507b2b
cmp byte [esi + 0x123], bl
push edi
je 0x5078ad
mov eax, dword [esi + 0xd8]
mov ecx, dword [esi + 0xe8]
add eax, edx
push eax
push ebx
push ecx
mov dword [esi + 0xe4], ebx
call fcn.00580260
add esp, 0xc
jmp 0x507810
add byte [esi + 0x124], 1
mov al, byte [esi + 0x124]
cmp al, 7
jae 0x5078ad
movzx ecx, al
mov eax, dword [esi + 0xc8]
add ecx, ecx
add ecx, ecx
sub eax, dword [esp + ecx + 0x34]
mov edi, dword [esp + ecx + 0x18]
lea eax, [eax + edi - 1]
xor edx, edx
div edi
mov edi, eax
mov al, byte [esi + 0x129]
cmp al, 8
mov dword [esi + 0xe0], edi
movzx eax, al
jb 0x50785f
shr eax, 3
imul eax, edi
jmp 0x507868
imul eax, edi
add eax, 7
shr eax, 3
add eax, 1
test byte [esi + 0x70], 2
mov dword [esi + 0xdc], eax
jne 0x5078a0
mov edx, dword [esi + 0xcc]
sub edx, dword [esp + ecx + 0x6c]
mov ebp, dword [esp + ecx + 0x50]
lea eax, [edx + ebp - 1]
xor edx, edx
div ebp
cmp edi, ebx
mov ebp, 8
mov dword [esi + 0xd0], eax
je 0x507810
cmp byte [esi + 0x124], 7
jb 0x507b2a
test byte [esi + 0x6c], 0x20
jne 0x507abf
lea eax, [esp + 0x13]
mov byte [esp + 0x88], 0x49
mov byte [esp + 0x89], 0x44
mov byte [esp + 0x8a], 0x41
mov byte [esp + 0x8b], 0x54
mov byte [esp + 0x8c], bl
mov dword [esi + 0x80], eax
mov dword [esi + 0x84], 1
cmp dword [esi + 0x78], ebx
jne 0x507a69
cmp dword [esi + 0x10c], ebx
jne 0x507a34
lea ebp, [esi + 0x11c]
jmp 0x507912
xor ebx, ebx
push ebx
mov ecx, esi
call fcn.005041a0
mov eax, dword [esi + 0x50]
add esp, 4
cmp eax, ebx
je 0x507933
push 4
lea ecx, [esp + 0x18]
push ecx
push esi
call eax
add esp, 0xc
jmp 0x507941
push esi
mov ecx, str.Call_to_NULL_read_function
call fcn.004f99a0
add esp, 4
mov eax, dword [esp + 0x14]
movzx ecx, byte [esp + 0x17]
movzx edi, al
shl edi, 8
movzx edx, ah
movzx eax, byte [esp + 0x16]
add edi, edx
shl edi, 8
add edi, eax
shl edi, 8
add edi, ecx
cmp edi, 0x7fffffff
jbe 0x50797a
push esi
mov ecx, str.PNG_unsigned_integer_out_of_range.
call fcn.004f99a0
add esp, 4
mov dword [esi + 0x10c], edi
mov dword [esi + 0x110], ebx
mov ebx, 4
mov edi, ebp
call fcn.00504130
mov eax, ebx
lea ecx, [esp + 0x88]
mov edx, ebp
lea ecx, [ecx]
mov edi, dword [edx]
cmp edi, dword [ecx]
jne 0x5079b6
sub eax, 4
add ecx, ebx
add edx, ebx
cmp eax, 4
jae 0x5079a0
test eax, eax
je 0x507a13
movzx edi, byte [ecx]
movzx ebx, byte [edx]
sub ebx, edi
jne 0x507a05
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x507a13
movzx edi, byte [ecx]
movzx ebx, byte [edx]
sub ebx, edi
jne 0x507a05
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x507a13
movzx edi, byte [ecx]
movzx ebx, byte [edx]
sub ebx, edi
jne 0x507a05
sub eax, 1
add ecx, 1
add edx, 1
test eax, eax
je 0x507a13
movzx eax, byte [ecx]
movzx ebx, byte [edx]
sub ebx, eax
je 0x507a13
test ebx, ebx
mov eax, 1
jg 0x507a15
or eax, 0xffffffff
jmp 0x507a15
xor eax, eax
test eax, eax
je 0x507a27
push esi
mov ecx, str.Not_enough_image_data
call fcn.004f99a0
add esp, 4
cmp dword [esi + 0x10c], 0
je 0x507910
mov eax, dword [esi + 0xb0]
mov ecx, dword [esi + 0x10c]
cmp eax, ecx
mov edi, dword [esi + 0xac]
mov dword [esi + 0x78], eax
mov dword [esi + 0x74], edi
jbe 0x507a53
mov dword [esi + 0x78], ecx
mov ebx, dword [esi + 0x78]
call fcn.00504130
mov ecx, dword [esi + 0x78]
sub dword [esi + 0x10c], ecx
xor ebx, ebx
lea ebp, [ebx + 8]
lea eax, [esi + 0x74]
push eax
call fcn.00508090
add esp, 4
cmp eax, 1
je 0x507b43
cmp eax, ebx
je 0x507a9c
mov eax, dword [esi + 0x8c]
cmp eax, ebx
jne 0x507a91
mov eax, str.Decompression_Error
push esi
mov ecx, eax
call fcn.004f99a0
add esp, 4
cmp dword [esi + 0x84], ebx
jne 0x5078f2
mov edx, str.Extra_compressed_data.
call fcn.004f9a60
or dword [esi + 0x68], ebp
or dword [esi + 0x6c], 0x20
mov dword [esi + 0x84], ebx
cmp dword [esi + 0x10c], ebx
jne 0x507acc
cmp dword [esi + 0x78], ebx
je 0x507ad6
mov edx, str.Extra_compression_data
call fcn.004f9a60
lea ecx, [esi + 0x74]
cmp ecx, ebx
je 0x507b27
mov eax, dword [ecx + 0x1c]
cmp eax, ebx
je 0x507b27
mov dword [eax + 0x1c], ebx
mov dword [ecx + 0x14], ebx
mov dword [ecx + 8], ebx
mov dword [ecx + 0x18], ebx
mov dword [ecx + 0x30], 1
lea ecx, [eax + 0x530]
mov dword [eax], ebx
mov dword [eax + 4], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x14], 0x8000
mov dword [eax + 0x20], ebx
mov dword [eax + 0x28], ebx
mov dword [eax + 0x2c], ebx
mov dword [eax + 0x30], ebx
mov dword [eax + 0x38], ebx
mov dword [eax + 0x3c], ebx
mov dword [eax + 0x6c], ecx
mov dword [eax + 0x50], ecx
mov dword [eax + 0x4c], ecx
or dword [esi + 0x68], ebp
pop edi
mov ecx, dword [esp + 0x8c]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005787fd
add esp, 0x84
ret
cmp dword [esi + 0x84], ebx
je 0x507b5c
cmp dword [esi + 0x78], ebx
jne 0x507b5c
cmp dword [esi + 0x10c], ebx
je 0x507ab2
mov edx, str.Extra_compressed_data
jmp 0x507aad