Function at 0x40bf60
Capabilities:
Packed with generic packer

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x34
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov edx, dword [edi + 0x5604]
test edx, edx
jle 0x40c12c
mov ecx, dword [edi + 0x8c]
mov eax, dword [ecx + 0x7f8]
cmp eax, 0x33
jl 0x40bf93
cmp eax, 0x3c
jle 0x40bfa3
test eax, eax
jne 0x40bfac
mov eax, dword [ecx + 0x82c]
cmp dword [eax + 0x24], 0x23
jne 0x40bfac
cmp dword [ecx + 0x844], 0
jne 0x40c013
add edx, 0xffffffff
mov dword [edi + 0x5604], edx
cmp dword [ecx + 0x7f8], 0
jne 0x40c013
call fcn.004538f0
test al, al
je 0x40c013
cmp edx, 0x12c
jne 0x40c013
mov ebx, ecx
call fcn.004541b0
mov ecx, dword [edi + 0x160]
cmp dword [ecx + 0x6c], 0
mov esi, dword [edi + 0x8c]
jne 0x40bfef
push 0xa8c
jmp 0x40bff4
push 0xaf0
call fcn.00454430
mov edi, dword [edi + 0x160]
call fcn.00429e50
mov edx, dword [ebp + 8]
mov dword [edx + 0x5604], 0x64
mov edi, edx
cmp dword [edi + 0x5604], 1
jne 0x40c044
mov eax, dword [edi + 0x8c]
mov ecx, dword [eax + 0x7f8]
cmp ecx, 1
jl 0x40c044
cmp ecx, 0xf
jg 0x40c044
mov eax, ecx
cmp eax, 1
jl 0x40c044
cmp eax, 0xf
jg 0x40c044
push edi
call fcn.00408c30
cmp dword [edi + 0x5604], 0
jne 0x40c12c
mov esi, dword [edi + 0x8c]
mov eax, dword [esi + 0x7f8]
cmp eax, 0x33
jl 0x40c067
cmp eax, 0x3c
jle 0x40c077
test eax, eax
jne 0x40c084
mov eax, dword [esi + 0x82c]
cmp dword [eax + 0x24], 0x23
jne 0x40c084
cmp dword [esi + 0x7f8], 0
je 0x40c2a8
mov eax, dword [esi + 0x7f8]
cmp eax, 0x33
jl 0x40c094
cmp eax, 0x3c
jle 0x40c0a4
test eax, eax
jne 0x40c0d1
mov ecx, dword [esi + 0x82c]
cmp dword [ecx + 0x24], 0x23
jne 0x40c0d1
mov edx, edi
call fcn.004138d0
test al, al
jne 0x40c0d1
mov edi, dword [edi + 0x160]
call fcn.00429e50
mov edx, dword [ebp + 8]
mov esi, dword [edx + 0x160]
call fcn.004286f0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov esi, dword [esi + 0x7f8]
cmp esi, 0x46
jne 0x40c0ff
jmp 0x796400
cmp esi, 0x1f
jne 0x40c117
or eax, 0xffffffff
mov esi, edi
call fcn.0040cab0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov byte [edi + 0x55fc], 1
call fcn.0040df00
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 0x5600]
test eax, eax
jl 0x40c2a8
add eax, 0xffffffff
mov dword [edi + 0x5600], eax
jne 0x40c155
mov byte [edi + 0x55fc], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 0x12c
jne 0x40c1a6
mov eax, edi
call fcn.004139e0
mov ecx, dword [edi + 0x5550]
cmp ecx, 9
je 0x40c186
cmp ecx, 0x13
je 0x40c186
cmp ecx, 0x1d
je 0x40c186
cmp ecx, 0x27
je 0x40c186
cmp ecx, 0x31
je 0x40c186
xor cl, cl
jmp 0x40c188
mov cl, 1
test al, al
jne 0x40c1a6
test cl, cl
jne 0x40c1a6
mov ecx, dword [edi + 0x8c]
mov edx, dword [ecx]
mov eax, dword [0x6a75ec]
mov edx, dword [edx + 0xd8]
push eax
call edx
mov eax, dword [edi + 0x5608]
test eax, eax
jle 0x40c1bf
add eax, 0xffffffff
mov dword [edi + 0x5608], eax
jne 0x40c2a8
mov edx, edi
call fcn.0041d2c0
test al, al
je 0x40c2a8
mov eax, edi
call fcn.004139e0
test al, al
jne 0x40c2a8
mov edx, edi
mov dword [edi + 0x5608], 0x28
call fcn.0040bf10
mov ebx, eax
test ebx, ebx
je 0x40c2a8
fld dword [ebx + 0xc]
push 4
fld qword [0x6794c8]
push 2
fadd st(1), st(0)
fxch st(1)
call fcn.006397d0
fadd dword [ebx + 8]
push eax
call fcn.006397d0
push eax
mov ecx, edi
call fcn.0040cb10
mov eax, dword [edi + 0x8c]
mov ecx, dword [eax + 0x4b4]
mov edx, dword [ecx]
mov eax, dword [0x6a779c]
mov edx, dword [edx + 0x20]
push eax
call edx
mov esi, eax
test esi, esi
je 0x40c2a1
mov eax, dword [esi]
mov edx, dword [eax + 0x1c]
push 1
push 0
mov ecx, esi
call edx
mov edx, edi
call fcn.00408bf0
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fsubr qword [0x6793b8]
fstp dword [esp + 0x3c]
fldz
fld dword [esp + 0x3c]
fcom st(1)
fnstsw ax
test ah, 0x41
jnp 0x40c288
fstp st(1)
fld dword [0x679320]
fcom st(1)
fnstsw ax
test ah, 0x41
jp 0x40c288
fstp st(1)
jmp 0x40c28a
fstp st(0)
mov eax, dword [esi]
fstp dword [esp + 0x3c]
fld dword [esp + 0x3c]
mov edx, dword [eax + 0x10]
sub esp, 8
mov ecx, esi
fstp qword [esp]
call edx
mov eax, ebx
call fcn.00458d10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4