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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xa5c
mov ecx, dword [eax + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [eax + 0xc]
mov dword [esp + 0x20], eax
cmp ecx, 4
jle 0x410140
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x1c]
sub ecx, 5
shr eax, 5
mov dword [edi + 8], ecx
mov dword [esp + 0x24], eax
mov dword [edi + 0xc], eax
cmp ecx, 4
jle 0x4100f0
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
sub ecx, 5
shr ebx, 5
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ebx
cmp ecx, 3
jg 0x40f730
mov edx, dword [eax + 4]
jmp 0x40f720
mov esi, dword [eax]
cmp esi, edx
jae 0x40f712
lea edi, [esi + 1]
mov dword [eax], edi
movzx esi, byte [esi]
shl esi, cl
or ebx, esi
add ecx, 8
mov dword [eax + 0xc], ebx
mov dword [eax + 8], ecx
cmp ecx, 0x18
jg 0x40f730
mov esi, ebx
shr esi, cl
test esi, esi
je 0x40f700
mov eax, dword [esp + 0x1c]
mov dword [eax], edx
nop
mov esi, dword [esp + 0x1c]
mov eax, ebx
and ebx, 0xf
lea edx, [ecx - 4]
lea edi, [ebx + 4]
shr eax, 4
mov dword [esp + 0x5d], 0
mov ecx, edx
mov ebp, edi
mov dword [esi + 0xc], eax
xor edi, edi
mov dword [esi + 8], edx
mov dword [esp + 0x51], 0
mov dword [esp + 0x55], 0
mov dword [esp + 0x59], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x18], esi
jmp 0x40f7a9
mov ebx, dword [esp + 0x18]
mov esi, eax
sub ecx, 3
shr eax, 3
and esi, 7
add edi, 1
mov dword [ebx + 0xc], eax
mov edx, esi
mov dword [ebx + 8], ecx
movzx ebx, byte [edi + 0x4ecb3f]
mov byte [esp + ebx + 0x51], dl
cmp ebp, edi
jle 0x40f808
cmp ecx, 2
jg 0x40f780
mov edx, dword [esp + 0x18]
mov dword [esp + 0x18], edi
mov esi, dword [edx + 4]
jmp 0x40f7e0
mov ebx, dword [edx]
cmp ebx, esi
jae 0x40f7d2
lea edi, [ebx + 1]
mov dword [edx], edi
movzx ebx, byte [ebx]
shl ebx, cl
or eax, ebx
add ecx, 8
mov dword [edx + 0xc], eax
mov dword [edx + 8], ecx
cmp ecx, 0x18
jg 0x40f7f8
mov ebx, eax
shr ebx, cl
test ebx, ebx
je 0x40f7c0
mov edi, dword [esp + 0x18]
mov dword [edx], esi
mov dword [esp + 0x18], edx
jmp 0x40f780
mov edi, dword [esp + 0x18]
mov dword [esp + 0x18], edx
jmp 0x40f780
xor eax, eax
lea edi, [esp + 0xa4]
lea ebx, [esp + 0x64]
mov edx, ecx
mov ecx, 0x11
rep stosd dword es:[edi], eax
mov ecx, 0x100
lea edi, [esp + 0x26c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x51]
movzx ecx, byte [eax]
add eax, 1
add dword [esp + ecx*4 + 0xa4], 1
cmp eax, ebx
jne 0x40f830
mov ebx, dword [esp + 0xa8]
mov dword [esp + 0xa4], 0
cmp ebx, 2
jg 0x40fe90
mov ecx, dword [esp + 0xac]
cmp ecx, 4
jg 0x40fe90
mov edi, dword [esp + 0xb0]
cmp edi, 8
jg 0x40fe90
mov eax, dword [esp + 0xb4]
mov dword [esp + 0x18], eax
cmp eax, 0x10
jg 0x40fe90
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x28], eax
cmp eax, 0x20
jg 0x40fe90
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x2c], eax
cmp eax, 0x40
jg 0x40fe90
mov eax, dword [esp + 0xc0]
mov dword [esp + 0x30], eax
cmp eax, 0x80
jg 0x40fe90
mov eax, dword [esp + 0xc4]
mov dword [esp + 0x34], eax
cmp eax, 0x100
jg 0x40fe90
mov eax, dword [esp + 0xc8]
mov dword [esp + 0x38], eax
cmp eax, 0x200
jg 0x40fe90
mov eax, dword [esp + 0xcc]
mov dword [esp + 0x3c], eax
cmp eax, 0x400
jg 0x40fe90
mov eax, dword [esp + 0xd0]
mov dword [esp + 0x40], eax
cmp eax, 0x800
jg 0x40fe90
mov eax, dword [esp + 0xd4]
mov dword [esp + 0x44], eax
cmp eax, 0x1000
jg 0x40fe90
mov eax, dword [esp + 0xd8]
mov dword [esp + 0x48], eax
cmp eax, 0x2000
jg 0x40fe90
mov eax, dword [esp + 0xdc]
mov dword [esp + 0x4c], eax
cmp eax, 0x4000
jg 0x40fe90
mov ebp, dword [esp + 0xe0]
cmp ebp, 0x8000
jg 0x40fe90
xor eax, eax
xor esi, esi
mov dword [esp + 0x68], 0
mov word [esp + 0x66e], ax
mov eax, ebx
shl eax, 0xf
mov word [esp + 0x6d2], si
mov dword [esp + 0x690], eax
lea eax, [ebx + ebx]
mov dword [esp + 0x6c], eax
mov word [esp + 0x670], ax
add eax, ecx
mov word [esp + 0x6d4], bx
test ecx, ecx
je 0x40f9ca
cmp eax, 4
jg 0x40fe90
mov esi, eax
add ecx, ebx
add eax, eax
shl esi, 0xe
mov dword [esp + 0x70], eax
mov word [esp + 0x672], ax
add eax, edi
mov dword [esp + 0x694], esi
mov word [esp + 0x6d6], cx
test edi, edi
je 0x40f9fd
cmp eax, 8
jg 0x40fe90
mov ebx, eax
add ecx, edi
mov edi, dword [esp + 0x18]
add eax, eax
shl ebx, 0xd
mov dword [esp + 0x74], eax
mov word [esp + 0x674], ax
add eax, edi
mov dword [esp + 0x698], ebx
mov word [esp + 0x6d8], cx
test edi, edi
je 0x40fa34
cmp eax, 0x10
jg 0x40fe90
mov edi, dword [esp + 0x18]
mov ebx, eax
add eax, eax
shl ebx, 0xc
mov dword [esp + 0x78], eax
add ecx, edi
mov edi, dword [esp + 0x28]
mov word [esp + 0x676], ax
mov dword [esp + 0x69c], ebx
mov word [esp + 0x6da], cx
add eax, edi
test edi, edi
je 0x40fa6f
cmp eax, 0x20
jg 0x40fe90
mov edi, dword [esp + 0x28]
mov ebx, eax
add eax, eax
shl ebx, 0xb
mov dword [esp + 0x7c], eax
add ecx, edi
mov edi, dword [esp + 0x2c]
mov word [esp + 0x678], ax
mov dword [esp + 0x6a0], ebx
mov word [esp + 0x6dc], cx
add eax, edi
test edi, edi
je 0x40faaa
cmp eax, 0x40
jg 0x40fe90
mov edi, dword [esp + 0x2c]
mov ebx, eax
add eax, eax
shl ebx, 0xa
mov dword [esp + 0x80], eax
add ecx, edi
mov edi, dword [esp + 0x30]
mov word [esp + 0x67a], ax
mov dword [esp + 0x6a4], ebx
mov word [esp + 0x6de], cx
add eax, edi
test edi, edi
je 0x40faea
cmp eax, 0x80
jg 0x40fe90
mov edi, dword [esp + 0x30]
mov ebx, eax
add eax, eax
shl ebx, 9
mov dword [esp + 0x84], eax
add ecx, edi
mov edi, dword [esp + 0x34]
mov word [esp + 0x67c], ax
mov dword [esp + 0x6a8], ebx
mov word [esp + 0x6e0], cx
add eax, edi
test edi, edi
je 0x40fb2a
cmp eax, 0x100
jg 0x40fe90
mov edi, dword [esp + 0x34]
mov ebx, eax
add eax, eax
shl ebx, 8
mov dword [esp + 0x88], eax
add ecx, edi
mov edi, dword [esp + 0x38]
mov word [esp + 0x67e], ax
mov dword [esp + 0x6ac], ebx
mov word [esp + 0x6e2], cx
add eax, edi
test edi, edi
je 0x40fb6a
cmp eax, 0x200
jg 0x40fe90
mov edi, dword [esp + 0x38]
mov ebx, eax
add eax, eax
shl ebx, 7
mov dword [esp + 0x8c], eax
add ecx, edi
mov edi, dword [esp + 0x3c]
mov word [esp + 0x680], ax
mov dword [esp + 0x6b0], ebx
mov word [esp + 0x6e4], cx
add eax, edi
test edi, edi
je 0x40fbaa
cmp eax, 0x400
jg 0x40fe90
mov edi, eax
add eax, eax
shl edi, 6
mov dword [esp + 0x90], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x6b4], edi
mov edi, dword [esp + 0x3c]
mov word [esp + 0x682], ax
add ecx, edi
mov edi, dword [esp + 0x40]
mov word [esp + 0x6e6], cx
add eax, edi
test edi, edi
je 0x40fbee
cmp eax, 0x800
jg 0x40fe90
mov edi, eax
add eax, eax
shl edi, 5
mov dword [esp + 0x94], eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x6b8], edi
mov edi, dword [esp + 0x40]
mov word [esp + 0x684], ax
add ecx, edi
mov edi, dword [esp + 0x44]
mov word [esp + 0x6e8], cx
add eax, edi
test edi, edi
je 0x40fc32
cmp eax, 0x1000
jg 0x40fe90
mov edi, eax
add eax, eax
shl edi, 4
mov dword [esp + 0x98], eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x6bc], edi
mov edi, dword [esp + 0x44]
mov word [esp + 0x686], ax
add ecx, edi
mov edi, dword [esp + 0x48]
mov word [esp + 0x6ea], cx
add eax, edi
test edi, edi
je 0x40fc76
cmp eax, 0x2000
jg 0x40fe90
lea edi, [eax*8]
add eax, eax
mov dword [esp + 0x34], edi
mov dword [esp + 0x6c0], edi
mov edi, dword [esp + 0x48]
mov dword [esp + 0x9c], eax
add ecx, edi
mov edi, dword [esp + 0x4c]
mov word [esp + 0x688], ax
mov word [esp + 0x6ec], cx
add eax, edi
test edi, edi
je 0x40fcbc
cmp eax, 0x4000
jg 0x40fe90
lea edi, [eax*4]
add eax, eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x6c4], edi
mov edi, dword [esp + 0x4c]
mov dword [esp + 0xa0], eax
add ecx, edi
mov word [esp + 0x68a], ax
add eax, ebp
mov word [esp + 0x6ee], cx
test ebp, ebp
jne 0x410282
add eax, eax
mov dword [esp + 0x40], edx
xor edi, edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x6c8], eax
mov dword [esp + 0x6cc], 0x10000
jmp 0x40fd33
add esi, 1
mov dword [esp + edx*4 + 0x64], esi
add edi, 1
cmp edi, 0x13
je 0x40feb0
movzx edx, byte [esp + edi + 0x51]
test edx, edx
je 0x40fd27
mov esi, dword [esp + edx*4 + 0x64]
movzx ecx, word [esp + edx*2 + 0x66c]
mov eax, esi
sub eax, ecx
movzx ecx, word [esp + edx*2 + 0x6d0]
add eax, ecx
mov byte [esp + eax + 0x6f0], dl
mov word [esp + eax*2 + 0x810], di
cmp edx, 9
jg 0x40fd20
mov ecx, esi
lea eax, [esi + esi]
mov ebp, edx
sar ecx, 1
and eax, 0xaaaa
shl ebp, 9
and ecx, 0x5555
or ebp, edi
or eax, ecx
mov ecx, eax
shl eax, 2
sar ecx, 2
and eax, 0xcccc
and ecx, 0x3333
or ecx, eax
mov eax, ecx
shl ecx, 4
sar eax, 4
and ecx, 0xf0f0
and eax, 0xf0f
or ecx, eax
mov eax, ecx
shl ecx, 8
movzx ecx, cx
sar eax, 8
or eax, ecx
mov ecx, 0x10
sub ecx, edx
sar eax, cl
mov ecx, edx
mov dword [esp + 0x18], eax
mov eax, 1
shl eax, cl
mov ecx, eax
mov eax, dword [esp + 0x18]
lea esi, [esi]
nop
mov word [esp + eax*2 + 0x26c], bp
add eax, ecx
cmp eax, 0x1ff
jle 0x40fde0
jmp 0x40fd20
mov edi, eax
lea ecx, [eax + eax]
sar edi, 1
and ecx, 0xaaaa
and edi, 0x5555
or ecx, edi
mov edi, ecx
shl ecx, 2
sar edi, 2
and ecx, 0xcccc
and edi, 0x3333
or ecx, edi
mov edi, ecx
shl ecx, 4
sar edi, 4
and ecx, 0xf0f0
and edi, 0xf0f
or ecx, edi
mov edi, ecx
shl ecx, 8
sar edi, 8
movzx ecx, cx
or edi, ecx
cmp dword [esp + 0x28], edi
jg 0x4101d0
cmp dword [esp + 0x2c], edi
jg 0x410230
mov ecx, dword [esp + 0x30]
cmp edi, ecx
jl 0x41027b
mov ecx, dword [esp + 0x34]
cmp edi, ecx
jl 0x4102ab
mov ecx, dword [esp + 0x38]
cmp edi, ecx
jl 0x4102b2
cmp dword [esp + 0x3c], edi
jg 0x410298
mov dword [esp], 0x4e9010
call sym.___emutls_get_address
mov dword [eax], str.Corrupt_PNG
xor eax, eax
add esp, 0xa5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x40]
xor ebx, ebx
and eax, 0x1f
lea esi, [eax + 0x101]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], esi
and eax, 0x1f
lea edi, [eax + 1]
lea eax, [esi + edi]
mov dword [esp + 0x24], edi
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
cmp edx, 0xf
jg 0x40ff8d
lea esi, [esi]
mov edi, dword [esi + 4]
cmp dword [esi], edi
jae 0x40fe90
mov eax, dword [esi + 0xc]
mov ecx, edx
jmp 0x40ff24
mov edx, dword [esi]
cmp edx, edi
jae 0x40ff12
lea ebp, [edx + 1]
mov dword [esi], ebp
movzx edx, byte [edx]
shl edx, cl
or eax, edx
add ecx, 8
mov dword [esi + 0xc], eax
mov dword [esi + 8], ecx
cmp ecx, 0x18
jg 0x410060
mov edx, eax
shr edx, cl
test edx, edx
je 0x40ff00
mov dword [esi], edi
mov edx, ecx
mov ecx, eax
and ecx, 0x1ff
movzx ecx, word [esp + ecx*2 + 0x26c]
mov edi, ecx
test ecx, ecx
je 0x40fe00
sar ecx, 9
and edi, 0x1ff
shr eax, cl
sub edx, ecx
mov dword [esi + 0xc], eax
mov dword [esi + 8], edx
cmp edi, 0x12
jg 0x40fe90
cmp edi, 0xf
jg 0x40ff98
mov eax, edi
mov byte [esp + ebx + 0xa4], al
add ebx, 1
cmp dword [esp + 0x18], ebx
jle 0x41000d
mov edx, dword [esi + 8]
cmp edx, 0xf
jle 0x40fef0
mov eax, dword [esi + 0xc]
jmp 0x40ff30
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0xc]
cmp edi, 0x10
je 0x410090
cmp edi, 0x11
je 0x4100c8
cmp ecx, 6
jle 0x410190
sub ecx, 7
mov edx, eax
and eax, 0x7f
mov dword [esi + 8], ecx
shr edx, 7
mov dword [esi + 0xc], edx
lea edx, [eax + 0xb]
xor eax, eax
mov ecx, dword [esp + 0x18]
sub ecx, ebx
cmp ecx, edx
jl 0x40fe90
imul eax, eax, 0x1010101
lea edi, [esp + 0xa4]
lea ecx, [edi + ebx]
cmp edx, 4
jae 0x410070
test edx, edx
je 0x410001
mov byte [ecx], al
test dl, 2
jne 0x41029f
add ebx, edx
cmp dword [esp + 0x18], ebx
jg 0x40ff81
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
jne 0x40fe90
mov ebx, dword [esp + 0x1c]
mov ecx, esi
lea edx, [esp + 0xa4]
lea eax, [ebx + 0x20]
call sym.stbi__zbuild_huffman_stbi__zhuffman__unsigned_char_const__int_
test eax, eax
je 0x40fea2
lea eax, [esp + 0xa4]
mov ecx, edi
lea edx, [eax + esi]
mov eax, ebx
add eax, 0x804
call sym.stbi__zbuild_huffman_stbi__zhuffman__unsigned_char_const__int_
test eax, eax
setne al
movzx eax, al
jmp 0x40fea4
mov edx, ecx
jmp 0x40ff30
lea edi, [ecx + 4]
mov dword [ecx], eax
add ebx, edx
and edi, 0xfffffffc
mov dword [ecx + edx - 4], eax
sub ecx, edi
add ecx, edx
shr ecx, 2
rep stosd dword es:[edi], eax
jmp 0x410003
cmp ecx, 1
jle 0x41023e
mov edx, eax
sub ecx, 2
and eax, 3
shr edx, 2
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
lea edx, [eax + 3]
test ebx, ebx
je 0x40fe90
movzx eax, byte [esp + ebx + 0xa3]
jmp 0x40ffcf
cmp ecx, 2
jle 0x4102bc
mov edx, eax
sub ecx, 3
and eax, 7
shr edx, 3
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
lea edx, [eax + 3]
xor eax, eax
jmp 0x40ffcf
mov ebx, eax
mov edx, dword [edi + 4]
mov eax, edi
jmp 0x410124
mov esi, dword [eax]
cmp esi, edx
jae 0x410112
lea edi, [esi + 1]
mov dword [eax], edi
movzx esi, byte [esi]
shl esi, cl
or ebx, esi
add ecx, 8
mov dword [eax + 0xc], ebx
mov dword [eax + 8], ecx
cmp ecx, 0x18
jg 0x4102fb
mov esi, ebx
shr esi, cl
test esi, esi
je 0x410100
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x24], ebx
mov dword [eax], edx
jmp 0x40f6e2
mov ebx, eax
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 4]
jmp 0x410174
mov esi, dword [eax]
cmp esi, edx
jae 0x410162
lea edi, [esi + 1]
mov dword [eax], edi
movzx esi, byte [esi]
shl esi, cl
or ebx, esi
add ecx, 8
mov dword [eax + 0xc], ebx
mov dword [eax + 8], ecx
cmp ecx, 0x18
jg 0x41030a
mov esi, ebx
shr esi, cl
test esi, esi
je 0x410150
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x20], ebx
mov dword [eax], edx
jmp 0x40f6c1
mov edi, dword [esi + 4]
jmp 0x4101bc
mov edx, dword [esi]
cmp edx, edi
jae 0x4101aa
lea ebp, [edx + 1]
mov dword [esi], ebp
movzx edx, byte [edx]
shl edx, cl
or eax, edx
add ecx, 8
mov dword [esi + 0xc], eax
mov dword [esi + 8], ecx
cmp ecx, 0x18
jg 0x40ffb9
mov edx, eax
shr edx, cl
test edx, edx
je 0x410198
mov dword [esi], edi
jmp 0x40ffb9
mov ecx, 6
mov ebp, 0xa
lea esi, [esi]
sar edi, cl
movzx ecx, word [esp + ebp*2 + 0x66c]
sub edi, ecx
movzx ecx, word [esp + ebp*2 + 0x6d0]
add edi, ecx
cmp edi, 0x11f
jg 0x40fe90
movzx ecx, byte [esp + edi + 0x6f0]
cmp ebp, ecx
jne 0x40fe90
mov ecx, ebp
sub edx, ebp
movzx edi, word [esp + edi*2 + 0x810]
shr eax, cl
mov dword [esi + 8], edx
mov dword [esi + 0xc], eax
jmp 0x40ff5d
mov ebp, 0xb
mov ecx, 0x10
sub ecx, ebp
jmp 0x4101e0
mov edi, dword [esi + 4]
jmp 0x41026c
mov edx, dword [esi]
cmp edx, edi
jae 0x41025a
lea ebp, [edx + 1]
mov dword [esi], ebp
movzx edx, byte [edx]
shl edx, cl
or eax, edx
add ecx, 8
mov dword [esi + 0xc], eax
mov dword [esi + 8], ecx
cmp ecx, 0x18
jg 0x410099
mov edx, eax
shr edx, cl
test edx, edx
je 0x410248
mov dword [esi], edi
jmp 0x410099
mov ebp, 0xc
jmp 0x410235
cmp eax, 0x8000
jle 0x40fcf7
jmp 0x40fe90
mov ebp, 0xf
jmp 0x410235
mov word [ecx + edx - 2], ax
add ebx, edx
jmp 0x410003
mov ebp, 0xd
jmp 0x410235
mov ebp, 0xe
jmp 0x410235
mov edi, dword [esi + 4]
jmp 0x4102ec
mov edx, dword [esi]
cmp edx, edi
jae 0x4102da
lea ebp, [edx + 1]
mov dword [esi], ebp
movzx edx, byte [edx]
shl edx, cl
or eax, edx
add ecx, 8
mov dword [esi + 0xc], eax
mov dword [esi + 8], ecx
cmp ecx, 0x18
jg 0x4100d1
mov edx, eax
shr edx, cl
test edx, edx
je 0x4102c8
mov dword [esi], edi
jmp 0x4100d1
mov dword [esp + 0x24], ebx
sub ecx, 5
shr ebx, 5
jmp 0x40f730
mov eax, ebx
mov edi, ebx
mov dword [esp + 0x20], ebx
sub ecx, 0xa
shr edi, 5
shr eax, 0xa
mov dword [esp + 0x24], edi
mov ebx, eax
jmp 0x40f730