Function at 0x461320
Capabilities:
Packed with generic packer

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push ebx
push esi
push edi
mov edi, eax
mov ebx, dword [edi]
mov ecx, dword [edi + 0x94]
test ecx, ecx
mov eax, dword [ebx + 0x820]
mov edx, dword [eax + 8]
jne 0x461345
xor esi, esi
jmp 0x46136b
movzx eax, cx
cmp eax, dword [edx + 8]
jb 0x461351
xor esi, esi
jmp 0x46136b
lea eax, [eax + eax*4]
shl eax, 5
add eax, dword [edx]
xor edx, edx
cmp dword [eax + 0x9c], ecx
setne dl
sub edx, 1
and edx, eax
mov esi, edx
mov eax, dword [edi + 0x3c]
cmp eax, 1
jne 0x4613c7
mov eax, dword [edi + 0x1c]
push eax
push edi
xor ecx, ecx
call fcn.004675c0
test eax, eax
je 0x4615c6
push 0x14
push esi
call fcn.00473310
fld dword [0x679638]
push str.anim_bite
fstp dword [esi + 8]
mov ecx, esi
mov dword [esi + 0x10], 3
mov dword [esi + 0x5c], 0
call fcn.00473280
mov dword [edi + 0x3c], 0xa
mov dword [edi + 0x54], 0x46
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0xa
jne 0x46150c
cmp dword [edi + 0x54], 0
jne 0x4615c6
cmp byte [ebx + 0x8c5], 0
fldz
jne 0x46142e
mov ecx, dword [0x6a9f00]
fst dword [esp + 0xc]
fcomp dword [ecx + 0xc68]
mov ebx, dword [ebx + 0x784]
fnstsw ax
test ah, 0x44
jnp 0x461418
fld dword [ecx + 0xc68]
push ecx
fstp dword [esp]
call fcn.005af410
fstp dword [esp + 0x10]
add esp, 4
fld dword [esp + 0xc]
push ecx
mov eax, 0x3d
fstp dword [esp]
mov ecx, ebx
call fcn.00515020
jmp 0x461430
fstp st(0)
mov ecx, dword [edi + 0x1c]
push ecx
push edi
xor ecx, ecx
call fcn.004675c0
mov esi, eax
xor dl, dl
test esi, esi
je 0x461458
mov eax, dword [esi + 0x24]
jmp 0x7c1f00
xor cl, cl
test esi, esi
je 0x461488
cmp dword [esi + 0xb4], 0
jg 0x46148a
cmp dword [esi + 0xb0], 0
jg 0x46148a
mov eax, esi
call fcn.00525460
test al, al
jne 0x461488
mov eax, dword [esi + 0x28]
cmp eax, 0xc
je 0x461488
cmp eax, 0xb
jne 0x46148a
mov cl, 1
test dl, dl
je 0x4614f3
mov eax, dword [edi]
cmp byte [eax + 0x8c5], 0
jne 0x4614dc
fldz
mov ecx, dword [0x6a9f00]
mov ebx, dword [eax + 0x784]
fst dword [esp + 0xc]
fcomp dword [ecx + 0x38]
fnstsw ax
test ah, 0x44
jnp 0x4614c8
fld dword [ecx + 0x38]
push ecx
fstp dword [esp]
call fcn.005af410
fstp dword [esp + 0x10]
add esp, 4
fld dword [esp + 0xc]
push ecx
mov eax, 1
fstp dword [esp]
mov ecx, ebx
call fcn.00515020
push 0x28
xor eax, eax
call fcn.005317c0
mov dword [edi + 0x3c], 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test cl, cl
jne 0x4614e5
mov ecx, esi
call fcn.005302f0
mov dword [edi + 0x3c], 0xb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0xb
jne 0x46155c
xor eax, eax
cmp dword [esi + 0x5c], eax
jle 0x4615c6
fld dword [0x67967c]
push str.anim_chew
mov ecx, esi
fstp dword [esi + 8]
mov dword [esi + 0x10], eax
mov dword [esi + 0x5c], eax
call fcn.00473280
mov eax, dword [edi]
call fcn.004537d0
test al, al
je 0x461547
fldz
fstp dword [esi + 8]
mov dword [edi + 0x3c], 0xd
mov dword [edi + 0x54], 0x5dc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0xd
jne 0x4615a0
cmp dword [edi + 0x54], 0
jne 0x4615c6
push 0x14
push esi
call fcn.00473310
fld dword [0x679388]
push str.anim_swallow
fstp dword [esi + 8]
mov ecx, esi
mov dword [esi + 0x10], 3
mov dword [esi + 0x5c], 0
call fcn.00473280
jmp 0x7d9bc0
cmp eax, 0xe
je 0x4615aa
cmp eax, 0xc
jne 0x4615c6
cmp dword [esi + 0x5c], 0
jle 0x4615c6
mov edx, dword [esi + 0xc]
fld dword [edx + 8]
push ecx
fstp dword [esp]
call fcn.00468280
mov dword [edi + 0x3c], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret