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

Disassembly:
push ebp
mov ebp, eax
xor eax, eax
push edi
push esi
mov esi, edx
push ebx
mov ebx, ecx
sub esp, 0xec
mov dword [esp + 0x1c], edx
lea edx, [esp + 0x9c]
mov dword [esp + 0x20], ecx
mov edi, edx
mov ecx, 0x11
rep stosd dword es:[edi], eax
mov ecx, 0x100
mov edi, ebp
rep stosd dword es:[edi], eax
mov eax, esi
lea ecx, [ebx + esi]
lea esi, [esi]
nop
movzx edx, byte [eax]
add eax, 1
add dword [esp + edx*4 + 0x9c], 1
cmp ecx, eax
jne 0x40a4a0
mov ecx, dword [esp + 0xa0]
mov dword [esp + 0x9c], 0
cmp ecx, 2
jg 0x40aa2b
mov edx, dword [esp + 0xa4]
cmp edx, 4
jg 0x40aa2b
mov ebx, dword [esp + 0xa8]
cmp ebx, 8
jg 0x40aa2b
mov esi, dword [esp + 0xac]
cmp esi, 0x10
jg 0x40aa2b
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x24], eax
cmp eax, 0x20
jg 0x40aa2b
mov eax, dword [esp + 0xb4]
mov dword [esp + 0x28], eax
cmp eax, 0x40
jg 0x40aa2b
mov eax, dword [esp + 0xb8]
mov dword [esp + 0x2c], eax
cmp eax, 0x80
jg 0x40aa2b
mov eax, dword [esp + 0xbc]
mov dword [esp + 0x30], eax
cmp eax, 0x100
jg 0x40aa2b
mov eax, dword [esp + 0xc0]
mov dword [esp + 0x34], eax
cmp eax, 0x200
jg 0x40aa2b
mov eax, dword [esp + 0xc4]
mov dword [esp + 0x38], eax
cmp eax, 0x400
jg 0x40aa2b
mov eax, dword [esp + 0xc8]
mov dword [esp + 0x3c], eax
cmp eax, 0x800
jg 0x40aa2b
mov eax, dword [esp + 0xcc]
mov dword [esp + 0x40], eax
cmp eax, 0x1000
jg 0x40aa2b
mov eax, dword [esp + 0xd0]
mov dword [esp + 0x44], eax
cmp eax, 0x2000
jg 0x40aa2b
mov eax, dword [esp + 0xd4]
mov dword [esp + 0x48], eax
cmp eax, 0x4000
jg 0x40aa2b
mov eax, dword [esp + 0xd8]
mov dword [esp + 0x4c], eax
cmp eax, 0x8000
jg 0x40aa2b
xor eax, eax
xor edi, edi
mov dword [esp + 0x60], 0
mov word [ebp + 0x402], ax
mov eax, ecx
shl eax, 0xf
mov word [ebp + 0x466], di
mov dword [ebp + 0x424], eax
lea eax, [ecx + ecx]
mov dword [esp + 0x64], eax
mov word [ebp + 0x404], ax
add eax, edx
mov word [ebp + 0x468], cx
test edx, edx
je 0x40a634
cmp eax, 4
jg 0x40aa2b
mov edi, eax
add edx, ecx
add eax, eax
shl edi, 0xe
mov dword [esp + 0x68], eax
mov word [ebp + 0x406], ax
add eax, ebx
mov dword [ebp + 0x428], edi
mov word [ebp + 0x46a], dx
test ebx, ebx
je 0x40a664
cmp eax, 8
jg 0x40aa2b
mov ecx, eax
add edx, ebx
add eax, eax
shl ecx, 0xd
mov dword [esp + 0x6c], eax
mov word [ebp + 0x408], ax
add eax, esi
mov dword [ebp + 0x42c], ecx
mov word [ebp + 0x46c], dx
test esi, esi
je 0x40a694
cmp eax, 0x10
jg 0x40aa2b
mov ecx, eax
add edx, esi
mov esi, dword [esp + 0x24]
add eax, eax
shl ecx, 0xc
mov dword [esp + 0x70], eax
mov word [ebp + 0x40a], ax
add eax, esi
mov dword [ebp + 0x430], ecx
mov word [ebp + 0x46e], dx
test esi, esi
je 0x40a6c8
cmp eax, 0x20
jg 0x40aa2b
mov edi, dword [esp + 0x24]
mov ecx, eax
add eax, eax
shl ecx, 0xb
mov dword [esp + 0x74], eax
add edx, edi
mov edi, dword [esp + 0x28]
mov word [ebp + 0x40c], ax
mov dword [ebp + 0x434], ecx
mov word [ebp + 0x470], dx
add eax, edi
test edi, edi
je 0x40a700
cmp eax, 0x40
jg 0x40aa2b
mov esi, dword [esp + 0x28]
mov ecx, eax
mov edi, dword [esp + 0x2c]
add eax, eax
shl ecx, 0xa
mov dword [esp + 0x78], eax
add edx, esi
mov word [ebp + 0x40e], ax
add eax, edi
mov dword [ebp + 0x438], ecx
mov word [ebp + 0x472], dx
test edi, edi
je 0x40a73a
cmp eax, 0x80
jg 0x40aa2b
mov edi, dword [esp + 0x2c]
mov ecx, eax
add eax, eax
shl ecx, 9
mov dword [esp + 0x7c], eax
add edx, edi
mov edi, dword [esp + 0x30]
mov word [ebp + 0x410], ax
mov dword [ebp + 0x43c], ecx
mov word [ebp + 0x474], dx
add eax, edi
test edi, edi
je 0x40a774
cmp eax, 0x100
jg 0x40aa2b
mov ebx, dword [esp + 0x30]
mov ecx, eax
mov edi, dword [esp + 0x34]
add eax, eax
shl ecx, 8
mov dword [esp + 0x80], eax
add edx, ebx
mov word [ebp + 0x412], ax
add eax, edi
mov dword [ebp + 0x440], ecx
mov word [ebp + 0x476], dx
test edi, edi
je 0x40a7b1
cmp eax, 0x200
jg 0x40aa2b
mov esi, dword [esp + 0x34]
mov ecx, eax
add eax, eax
shl ecx, 7
mov dword [esp + 0x84], eax
add edx, esi
mov esi, dword [esp + 0x38]
mov word [ebp + 0x414], ax
mov dword [ebp + 0x444], ecx
mov word [ebp + 0x478], dx
add eax, esi
test esi, esi
je 0x40a7ee
cmp eax, 0x400
jg 0x40aa2b
mov edi, dword [esp + 0x38]
mov ecx, eax
add eax, eax
shl ecx, 6
mov dword [esp + 0x88], eax
add edx, edi
mov edi, dword [esp + 0x3c]
mov word [ebp + 0x416], ax
mov dword [ebp + 0x448], ecx
mov word [ebp + 0x47a], dx
add eax, edi
test edi, edi
je 0x40a82b
cmp eax, 0x800
jg 0x40aa2b
mov ebx, dword [esp + 0x3c]
mov ecx, eax
add eax, eax
shl ecx, 5
mov dword [esp + 0x8c], eax
add edx, ebx
mov ebx, dword [esp + 0x40]
mov word [ebp + 0x418], ax
mov dword [ebp + 0x44c], ecx
mov word [ebp + 0x47c], dx
add eax, ebx
test ebx, ebx
je 0x40a868
cmp eax, 0x1000
jg 0x40aa2b
mov edi, dword [esp + 0x40]
mov ecx, eax
mov esi, dword [esp + 0x44]
add eax, eax
shl ecx, 4
mov dword [esp + 0x90], eax
add edx, edi
mov word [ebp + 0x41a], ax
add eax, esi
mov dword [ebp + 0x450], ecx
mov word [ebp + 0x47e], dx
test esi, esi
je 0x40a8a5
cmp eax, 0x2000
jg 0x40aa2b
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x48]
lea ecx, [eax*8]
add eax, eax
mov dword [esp + 0x94], eax
add edx, esi
mov word [ebp + 0x41c], ax
add eax, edi
mov dword [ebp + 0x454], ecx
mov word [ebp + 0x480], dx
test edi, edi
je 0x40a8e4
cmp eax, 0x4000
jg 0x40aa2b
mov ebx, dword [esp + 0x48]
lea ecx, [eax*4]
add eax, eax
mov dword [esp + 0x98], eax
add edx, ebx
mov ebx, dword [esp + 0x4c]
mov word [ebp + 0x41e], ax
mov dword [ebp + 0x458], ecx
mov word [ebp + 0x482], dx
add eax, ebx
test ebx, ebx
jne 0x40aa20
mov dword [ebp + 0x460], 0x10000
add eax, eax
xor edx, edx
mov dword [ebp + 0x45c], eax
jmp 0x40a94c
lea eax, [edi + 1]
mov dword [esp + ebx*4 + 0x5c], eax
add edx, 1
cmp dword [esp + 0x20], edx
je 0x40aa50
mov eax, dword [esp + 0x1c]
movzx esi, byte [eax + edx]
mov eax, esi
movzx ebx, al
test ebx, ebx
je 0x40a93f
mov edi, dword [esp + ebx*4 + 0x5c]
movzx ecx, word [ebp + ebx*2 + 0x400]
mov eax, edi
sub eax, ecx
movzx ecx, word [ebp + ebx*2 + 0x464]
add eax, ecx
mov ecx, esi
mov byte [ebp + eax + 0x484], cl
mov word [ebp + eax*2 + 0x5a4], dx
cmp ebx, 9
jg 0x40a938
mov eax, esi
mov ecx, edi
shl eax, 9
sar ecx, 1
or eax, edx
and ecx, 0x5555
mov word [esp + 0x24], ax
lea eax, [edi + edi]
and eax, 0xaaaa
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, ebx
sar eax, cl
mov ecx, esi
movzx esi, word [esp + 0x24]
mov dword [esp + 0x28], eax
mov eax, 1
shl eax, cl
mov ecx, eax
mov eax, dword [esp + 0x28]
lea esi, [esi]
mov word [ebp + eax*2], si
add eax, ecx
cmp eax, 0x1ff
jle 0x40aa08
jmp 0x40a938
cmp eax, 0x8000
jle 0x40a91c
mov dword [esp], 0x4e9010
call sym.___emutls_get_address
mov dword [eax], str.Corrupt_PNG
add esp, 0xec
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
add esp, 0xec
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret